epiphany r8248 - branches/gnome-2-22/embed/mozilla



Author: chpe
Date: Fri May 23 22:01:39 2008
New Revision: 8248
URL: http://svn.gnome.org/viewvc/epiphany?rev=8248&view=rev

Log:
nother try to fix bug #534056.


Modified:
   branches/gnome-2-22/embed/mozilla/mozilla-embed-single.cpp

Modified: branches/gnome-2-22/embed/mozilla/mozilla-embed-single.cpp
==============================================================================
--- branches/gnome-2-22/embed/mozilla/mozilla-embed-single.cpp	(original)
+++ branches/gnome-2-22/embed/mozilla/mozilla-embed-single.cpp	Fri May 23 22:01:39 2008
@@ -1073,39 +1073,34 @@
 impl_remove_password (EphyPasswordManager *manager,
 		      EphyPasswordInfo *info)
 {
+	nsString userName;
+
+        if (info->username)
+          NS_CStringToUTF16 (nsCString(info->username),
+                            NS_CSTRING_ENCODING_UTF8, userName);
 #ifdef HAVE_GECKO_1_9
+        else
+          userName.SetIsVoid (PR_TRUE);
+
 	nsString host;
-	nsString userName;
 	nsString userNameField;
 	nsString password;
 	nsString passwordField;
 	nsString httpRealm;
 	nsString formSubmitURL;
 
-        if (info->username)
+        if (info->host)
           NS_CStringToUTF16 (nsCString(info->host),
                             NS_CSTRING_ENCODING_UTF8, userName);
         else
           host.SetIsVoid (PR_TRUE);
 
-        if (info->username)
-          NS_CStringToUTF16 (nsCString(info->username),
-                            NS_CSTRING_ENCODING_UTF8, userName);
-        else
-          userName.SetIsVoid (PR_TRUE);
-
         if (info->usernameField)
           NS_CStringToUTF16 (nsCString(info->usernameField),
                             NS_CSTRING_ENCODING_UTF8, userNameField);
         else
           userNameField.SetIsVoid (PR_TRUE);
 
-        if (info->host)
-          NS_CStringToUTF16 (nsCString(info->host),
-                            NS_CSTRING_ENCODING_UTF8, host);
-        else
-          host.SetIsVoid (PR_TRUE);
-
         if (info->httpRealm)
           NS_CStringToUTF16 (nsCString(info->httpRealm),
                             NS_CSTRING_ENCODING_UTF8, httpRealm);
@@ -1156,7 +1151,6 @@
 	if (!pm) return;
 
         nsCString host (info->host);
-        nsCString userName (info->username ? info->username : "");
 	pm->RemoveUser (host, userName);
 #endif /* HAVE_GECKO_1_9 */
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]