summaryrefslogtreecommitdiff
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-05-23 22:01:39 +0000
committerChristian Persch <chpe@src.gnome.org>2008-05-23 22:01:39 +0000
commitf9247cb83f98f6572fbc4edaf30b925eb2b2fdae (patch)
tree3e64235bdcdb466318688d11ac08abcafc4f8ad5 /embed
parent1b0dc08db56a5f3d03805d594a99fe0b5ec7ef62 (diff)
downloadepiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.gz
nother try to fix bug #534056.
svn path=/branches/gnome-2-22/; revision=8248
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 9558179ca..ba84abae8 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -1073,39 +1073,34 @@ static void
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 @@ impl_remove_password (EphyPasswordManager *manager,
if (!pm) return;
nsCString host (info->host);
- nsCString userName (info->username ? info->username : "");
pm->RemoveUser (host, userName);
#endif /* HAVE_GECKO_1_9 */
}