Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(337)

Unified Diff: chrome/utility/importer/nss_decryptor.cc

Issue 306123004: NSSDecryptor::ReadAndParseSignons() - improved password form scheme detection, (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Naming fix Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/utility/importer/nss_decryptor.cc
diff --git a/chrome/utility/importer/nss_decryptor.cc b/chrome/utility/importer/nss_decryptor.cc
index 6b22ae2166f4ade49c02368031952f2e90c803d0..77a10a0bc044d1901b9f260cb9b980c81d9bc1fa 100644
--- a/chrome/utility/importer/nss_decryptor.cc
+++ b/chrome/utility/importer/nss_decryptor.cc
@@ -284,8 +284,13 @@ bool NSSDecryptor::ReadAndParseSignons(const base::FilePath& sqlite_file,
autofill::PasswordForm form;
form.origin = url.ReplaceComponents(rep);
form.signon_realm = form.origin.GetOrigin().spec();
- if (!realm.empty())
+ if (!realm.empty()) {
form.signon_realm += realm;
+ // Non-empty realm indicates that it's not html form authentication entry.
+ // Extracted data doesn't allow us to distinguish basic_auth entry from
+ // digest_auth entry, so let's assume basic_auth.
+ form.scheme = autofill::PasswordForm::SCHEME_BASIC;
+ }
form.ssl_valid = form.origin.SchemeIsSecure();
// The user name, password and action.
form.username_element = s2.ColumnString16(3);

Powered by Google App Engine
This is Rietveld 408576698