Chromium Code Reviews| Index: chrome/browser/importer/external_process_importer_client.cc |
| diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc |
| index 43946118733fcafe8c7f70a92ffd91a35b1591fb..523d2f8b952c47fa7a6b536ae316094e810a352a 100644 |
| --- a/chrome/browser/importer/external_process_importer_client.cc |
| +++ b/chrome/browser/importer/external_process_importer_client.cc |
| @@ -106,6 +106,10 @@ bool ExternalProcessImporterClient::OnMessageReceived( |
| OnKeywordsImportReady) |
| IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFirefoxSearchEngData, |
| OnFirefoxSearchEngineDataReceived) |
| + IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_AutofillFormDataImportStart, |
| + OnAutofillFormDataImportStart) |
| + IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_AutofillFormDataImportGroup, |
| + OnAutofillFormDataImportGroup) |
| #if defined(OS_WIN) |
| IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyIE7PasswordInfo, |
| OnIE7PasswordReceived) |
| @@ -250,6 +254,28 @@ void ExternalProcessImporterClient::OnFirefoxSearchEngineDataReceived( |
| bridge_->SetFirefoxSearchEnginesXMLData(search_engine_data); |
| } |
| +void ExternalProcessImporterClient::OnAutofillFormDataImportStart( |
| + size_t total_autofill_form_data_entry_count) { |
| + if (cancelled_) |
| + return; |
| + |
| + total_autofill_form_data_entry_count_ = total_autofill_form_data_entry_count; |
| + autofill_form_data_.reserve(total_autofill_form_data_entry_count); |
| +} |
| + |
| +void ExternalProcessImporterClient::OnAutofillFormDataImportGroup( |
| + const std::vector<ImporterAutofillFormDataEntry>& |
| + autofill_form_data_entry_group) { |
| + if (cancelled_) |
| + return; |
| + |
| + autofill_form_data_.insert(autofill_form_data_.end(), |
| + autofill_form_data_entry_group.begin(), |
| + autofill_form_data_entry_group.end()); |
| + if (autofill_form_data_.size() == total_autofill_form_data_entry_count_) |
|
Tom Sepez
2014/08/27 23:10:21
What if the import process can't count? There's n
Nikhil
2014/08/28 06:54:59
Sorry, but I don't fully understand the comment so
Ilya Sherman
2014/08/30 01:30:18
FWIW, all the other importer types use "==" as the
|
| + bridge_->SetAutofillFormData(autofill_form_data_); |
| +} |
| + |
| #if defined(OS_WIN) |
| void ExternalProcessImporterClient::OnIE7PasswordReceived( |
| const importer::ImporterIE7PasswordInfo& importer_password_info) { |