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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 12463030: Do not do AutoImport on Windows since the import process is already ran earlier as part of ProcessM… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | chrome/browser/first_run/first_run.h » ('j') | chrome/browser/first_run/first_run.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.h » ('j') | chrome/browser/first_run/first_run.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698