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

Unified Diff: chrome/browser/first_run/first_run_posix.cc

Issue 12094026: Skip a first-run import on Mac when there is nothing left to import. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now, fix it :) Created 7 years, 11 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/browser/first_run/first_run_posix.cc
diff --git a/chrome/browser/first_run/first_run_posix.cc b/chrome/browser/first_run/first_run_posix.cc
index 09cbc9c2be3589fc19057d73e7119c3deabe0ec4..4b3fae112e237b41d9b2c25464ccdfebdaf0ce30 100644
--- a/chrome/browser/first_run/first_run_posix.cc
+++ b/chrome/browser/first_run/first_run_posix.cc
@@ -95,8 +95,10 @@ bool ImportSettings(Profile* profile,
importer_list->GetSourceProfileAt(0);
// Ensure that importers aren't requested to import items that they do not
- // support.
+ // support. If there is no overlap, skip.
items_to_import &= source_profile.services_supported;
+ if (items_to_import == 0)
+ return true;
scoped_ptr<ImportEndedObserver> observer(new ImportEndedObserver);
importer_host->SetObserver(observer.get());

Powered by Google App Engine
This is Rietveld 408576698