diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 15:57:50 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-01 15:57:50 +0000 |
commit | 79e165f54f12b5e928aae70de7ca80929c2fb71a (patch) | |
tree | 92491f46876156eb7e1204dd95ffc998e0c65fcd /chrome/browser/first_run | |
parent | 5ddfd63e1be6378721913af1f26fa1d4cbf09c5d (diff) | |
download | chromium_src-79e165f54f12b5e928aae70de7ca80929c2fb71a.zip chromium_src-79e165f54f12b5e928aae70de7ca80929c2fb71a.tar.gz chromium_src-79e165f54f12b5e928aae70de7ca80929c2fb71a.tar.bz2 |
Set default browser AFTER import.
BUG=53655
TEST=set Firefox as default browser on Windows. Run Chrome with a fresh profile. Import from FF should occur.
Review URL: http://codereview.chromium.org/3298004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run')
-rw-r--r-- | chrome/browser/first_run/first_run.cc | 11 | ||||
-rw-r--r-- | chrome/browser/first_run/first_run.h | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index ef42380..b60252a 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -206,7 +206,7 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, if (installer_util::GetDistroBooleanPreference(prefs.get(), installer_util::master_preferences::kMakeChromeDefaultForUser, &value) && value) - ShellIntegration::SetAsDefaultBrowser(); + out_prefs->make_chrome_default = true; // TODO(mirandac): Refactor skip-first-run-ui process into regular first run // import process. http://crbug.com/49647 @@ -282,6 +282,11 @@ bool FirstRun::ProcessMasterPreferences(const FilePath& user_data_dir, } #endif + if (installer_util::GetDistroBooleanPreference(prefs.get(), + installer_util::master_preferences::kMakeChromeDefaultForUser, &value) && + value) + ShellIntegration::SetAsDefaultBrowser(); + return false; } @@ -466,6 +471,7 @@ void FirstRun::AutoImport( int dont_import_items, bool search_engine_experiment, bool randomize_search_engine_experiment, + bool make_chrome_default, ProcessSingleton* process_singleton) { // We need to avoid dispatching new tabs when we are importing because // that will lead to data corruption or a crash. Because there is no UI for @@ -529,6 +535,9 @@ void FirstRun::AutoImport( ShowFirstRunDialog(profile, randomize_search_engine_experiment); } + if (make_chrome_default) + ShellIntegration::SetAsDefaultBrowser(); + FirstRun::SetShowFirstRunBubblePref(true); // Set the first run bubble to minimal. FirstRun::SetMinimalFirstRunBubblePref(); diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h index 15c5866..51fdb878 100644 --- a/chrome/browser/first_run/first_run.h +++ b/chrome/browser/first_run/first_run.h @@ -45,6 +45,7 @@ class FirstRun { int dont_import_items; bool run_search_engine_experiment; bool randomize_search_engine_experiment; + bool make_chrome_default; std::vector<GURL> new_tabs; std::vector<GURL> bookmarks; }; @@ -74,6 +75,7 @@ class FirstRun { int dont_import_items, bool search_engine_experiment, bool randomize_search_engine_experiment, + bool make_chrome_default, ProcessSingleton* process_singleton); // Does platform specific setup. Called at the start of AutoImport. |