Commit 547c1dd7 authored by vasilii's avatar vasilii Committed by Commit bot

Collect statistics from the importer on empty usernames and passwords from other browsers.

Also revert https://codereview.chromium.org/579813002

BUG=404012

Review URL: https://codereview.chromium.org/665113002

Cr-Commit-Position: refs/heads/master@{#300656}
parent 8ba44ef0
......@@ -5,7 +5,6 @@
#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"
......@@ -63,15 +62,6 @@ 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;
......@@ -261,7 +251,6 @@ void InProcessImporterBridge::SetFirefoxSearchEnginesXMLData(
void InProcessImporterBridge::SetPasswordForm(
const autofill::PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form);
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&ProfileWriter::AddPasswordForm, writer_, form));
......
......@@ -5,6 +5,7 @@
#include "chrome/utility/importer/external_process_importer_bridge.h"
#include "base/bind.h"
#include "base/debug/dump_without_crashing.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
......@@ -26,7 +27,16 @@ const int kNumBookmarksToSend = 100;
const int kNumHistoryRowsToSend = 100;
const int kNumFaviconsToSend = 100;
const int kNumAutofillFormDataToSend = 100;
// 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
ExternalProcessImporterBridge::ExternalProcessImporterBridge(
const base::DictionaryValue& localized_strings,
......@@ -138,6 +148,7 @@ void ExternalProcessImporterBridge::SetFirefoxSearchEnginesXMLData(
void ExternalProcessImporterBridge::SetPasswordForm(
const autofill::PasswordForm& form) {
CheckForEmptyUsernameAndPassword(form);
Send(new ProfileImportProcessHostMsg_NotifyPasswordFormReady(form));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment