Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index 4c962b02aff372ed7e945dd928bd43bc8e352d42..e8ba46c0c85fc105941132bd3322fb0089bad3ac 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -968,9 +968,12 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { |
| local_state_->SetInt64(prefs::kVariationsSeedDate, |
| base::Time::Now().ToInternalValue()); |
| } |
| - } else if (parsed_command_line().HasSwitch(switches::kNoFirstRun)) { |
| - // Create the First Run beacon anyways if --no-first-run was passed on the |
| - // command line. |
| + } |
| + |
| + if (do_first_run_tasks_ || |
| + parsed_command_line().HasSwitch(switches::kNoFirstRun)) { |
| + // Create the First Run sentinel whether first run tasks are executed |
| + // or not. |
| first_run::CreateSentinel(); |
| } |
| } |
| @@ -1337,11 +1340,21 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
| // preferences are registered, since some of the code that the importer |
| // touches reads preferences. |
| if (do_first_run_tasks_) { |
| +// On Windows the import process was already launched from |
| +// ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()--> |
| +// ImportSettingsWin(). |
| +// Windows should really use the OOP import (http://crbug.com/22142), but for |
| +// now let's at least not run the import twice on Windows. It has to run before |
| +// the profile is created because the import process is designed to interact |
| +// with the profile itself (and trying to import at this point causes issues |
| +// like http://crbug.com/180459 and http://crbug.com/171475). |
|
Joao da Silva
2013/03/12 13:32:05
nit: indentation
gab
2013/03/25 16:00:43
On purpose since comment is for the #if !defined(O
|
| +#if !defined(OS_WIN) |
|
Joao da Silva
2013/03/12 13:32:05
If OS_WIN, can we CHECK that the import process ha
gab
2013/03/25 16:00:43
Good idea, done.
|
| first_run::AutoImport(profile_, |
| master_prefs_->homepage_defined, |
| master_prefs_->do_import_items, |
| master_prefs_->dont_import_items, |
| process_singleton_.get()); |
| +#endif |
| // Note: this can pop the first run consent dialog on linux. |
| first_run::DoPostImportTasks(profile_, master_prefs_->make_chrome_default); |