Index: chrome/browser/first_run/first_run.cc |
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc |
index 860dcec84748facd93e445d596587f7334191dcc..b2e65b6f8a26930c9417299172e9dfba7123cd3e 100644 |
--- a/chrome/browser/first_run/first_run.cc |
+++ b/chrome/browser/first_run/first_run.cc |
@@ -65,6 +65,11 @@ namespace { |
bool should_show_welcome_page_ = false; |
bool should_do_autofill_personal_data_manager_first_run_ = false; |
+// Flags indicating whether a first-run profile auto import was performed, and |
+// whether the importer process exited successfully. |
+bool did_perform_profile_import = false; |
+bool profile_import_exited_successfully = false; |
+ |
// Helper class that performs delayed first-run tasks that need more of the |
// chrome infrastructure to be up and running before they can be attempted. |
class FirstRunDelayedTasks : public content::NotificationObserver { |
@@ -695,7 +700,9 @@ void AutoImport( |
importer::FAVORITES, |
items); |
- internal::ImportSettings(profile, importer_host, importer_list, items); |
+ profile_import_exited_successfully = |
+ internal::ImportSettings(profile, importer_host, importer_list, items); |
+ DCHECK(profile_import_exited_successfully); |
} |
content::RecordAction(UserMetricsAction("FirstRunDef_Accept")); |
@@ -703,6 +710,7 @@ void AutoImport( |
process_singleton->Unlock(); |
first_run::CreateSentinel(); |
#endif // !defined(USE_AURA) |
+ did_perform_profile_import = true; |
} |
void DoPostImportTasks(Profile* profile, bool make_chrome_default) { |
@@ -735,4 +743,10 @@ void DoPostImportTasks(Profile* profile, bool make_chrome_default) { |
internal::DoPostImportPlatformSpecificTasks(); |
} |
+bool DidPerformProfileImport(bool* exited_successfully) { |
+ if (exited_successfully) |
+ *exited_successfully = profile_import_exited_successfully; |
+ return did_perform_profile_import; |
+} |
+ |
} // namespace first_run |