diff options
author | Christian Persch <chpe@src.gnome.org> | 2008-05-24 06:01:39 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2008-05-24 06:01:39 +0800 |
commit | f9247cb83f98f6572fbc4edaf30b925eb2b2fdae (patch) | |
tree | 3e64235bdcdb466318688d11ac08abcafc4f8ad5 | |
parent | 1b0dc08db56a5f3d03805d594a99fe0b5ec7ef62 (diff) | |
download | gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.gz gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.bz2 gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.lz gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.xz gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.tar.zst gsoc2013-epiphany-f9247cb83f98f6572fbc4edaf30b925eb2b2fdae.zip |
nother try to fix bug #534056.
svn path=/branches/gnome-2-22/; revision=8248
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 24 |
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 */ } |