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

Unified Diff: chrome/browser/importer/in_process_importer_bridge.cc

Issue 579813002: Collect statistics on importing empty usernames and passwords from other browsers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/in_process_importer_bridge.cc
diff --git a/chrome/browser/importer/in_process_importer_bridge.cc b/chrome/browser/importer/in_process_importer_bridge.cc
index c5c5927af84fdb7fc309236144633a70690a5ff6..853788ea8c1c3070adcd4aa19b91ba8f82917868 100644
--- a/chrome/browser/importer/in_process_importer_bridge.cc
+++ b/chrome/browser/importer/in_process_importer_bridge.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/importer/in_process_importer_bridge.h"
#include "base/bind.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/files/file_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -62,6 +63,15 @@ history::VisitSource ConvertImporterVisitSourceToHistoryVisitSource(
return history::SOURCE_SYNCED;
}
+// http://crbug.com/404012. Let's see where the empty fields come from.
+void CheckForEmptyUsernameAndPassword(const autofill::PasswordForm& form) {
+ if (form.username_value.empty() &&
+ form.password_value.empty() &&
+ !form.blacklisted_by_user) {
+ base::debug::DumpWithoutCrashing();
+ }
+}
+
} // namespace
using content::BrowserThread;
@@ -251,6 +261,7 @@ void InProcessImporterBridge::SetFirefoxSearchEnginesXMLData(
void InProcessImporterBridge::SetPasswordForm(
const autofill::PasswordForm& form) {
+ CheckForEmptyUsernameAndPassword(form);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&ProfileWriter::AddPasswordForm, writer_, form));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698