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

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

Issue 607953004: Importer - Add defensive check for data from IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 523d2f8b952c47fa7a6b536ae316094e810a352a..85d3e473c642aa8732344699d4a8a01fd537e8f2 100644
--- a/chrome/browser/importer/external_process_importer_client.cc
+++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -174,7 +174,7 @@ void ExternalProcessImporterClient::OnHistoryImportGroup(
history_rows_.insert(history_rows_.end(), history_rows_group.begin(),
history_rows_group.end());
- if (history_rows_.size() == total_history_rows_count_)
+ if (history_rows_.size() >= total_history_rows_count_)
bridge_->SetHistoryItems(history_rows_,
static_cast<importer::VisitSource>(visit_source));
}
@@ -207,7 +207,7 @@ void ExternalProcessImporterClient::OnBookmarksImportGroup(
// total_bookmarks_count_:
bookmarks_.insert(bookmarks_.end(), bookmarks_group.begin(),
bookmarks_group.end());
- if (bookmarks_.size() == total_bookmarks_count_)
+ if (bookmarks_.size() >= total_bookmarks_count_)
bridge_->AddBookmarks(bookmarks_, bookmarks_first_folder_name_);
}
@@ -227,7 +227,7 @@ void ExternalProcessImporterClient::OnFaviconsImportGroup(
favicons_.insert(favicons_.end(), favicons_group.begin(),
favicons_group.end());
- if (favicons_.size() == total_favicons_count_)
+ if (favicons_.size() >= total_favicons_count_)
bridge_->SetFavicons(favicons_);
}
@@ -272,7 +272,7 @@ void ExternalProcessImporterClient::OnAutofillFormDataImportGroup(
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_)
+ if (autofill_form_data_.size() >= total_autofill_form_data_entry_count_)
bridge_->SetAutofillFormData(autofill_form_data_);
}
« 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