| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 98775e264b732ad0769cc41183049c7ef3da70ed..042b21c97cc727717d0286b161e6f1c5e36c81df 100644
|
| --- a/chrome/browser/chrome_browser_main.cc
|
| +++ b/chrome/browser/chrome_browser_main.cc
|
| @@ -31,7 +31,6 @@
|
| #include "base/sys_info.h"
|
| #include "base/sys_string_conversions.h"
|
| #include "base/threading/platform_thread.h"
|
| -#include "base/threading/sequenced_worker_pool.h"
|
| #include "base/time.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "base/values.h"
|
| @@ -947,6 +946,10 @@ void ChromeBrowserMainParts::PreMainMessageLoopRun() {
|
| // ... additional setup, including CreateProfile()
|
| // PostProfileInit()
|
| // ... additional setup
|
| +// PreInteractiveFirstRunInit()
|
| +// ... first_run::AutoImport()
|
| +// PostInteractiveFirstRunInit()
|
| +// ... additional setup
|
| // PreBrowserStart()
|
| // ... browser_creator_->Start (OR parameters().ui_task->Run())
|
| // PostBrowserStart()
|
| @@ -961,6 +964,16 @@ void ChromeBrowserMainParts::PostProfileInit() {
|
| chrome_extra_parts_[i]->PostProfileInit();
|
| }
|
|
|
| +void ChromeBrowserMainParts::PreInteractiveFirstRunInit() {
|
| + for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
| + chrome_extra_parts_[i]->PreInteractiveFirstRunInit();
|
| +}
|
| +
|
| +void ChromeBrowserMainParts::PostInteractiveFirstRunInit() {
|
| + for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
| + chrome_extra_parts_[i]->PostInteractiveFirstRunInit();
|
| +}
|
| +
|
| void ChromeBrowserMainParts::PreBrowserStart() {
|
| for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
| chrome_extra_parts_[i]->PreBrowserStart();
|
| @@ -1196,25 +1209,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
| // preferences are registered, since some of the code that the importer
|
| // touches reads preferences.
|
| if (is_first_run_) {
|
| -#if defined(OS_WIN)
|
| - // On Windows, trigger the Active Setup command for system-level Chromes to
|
| - // finish configuring this user's install (e.g. per-user shortcuts).
|
| - // Delay the task slightly to give Chrome launch I/O priority while also
|
| - // making sure shortcuts are created promptly to avoid annoying the user by
|
| - // re-creating shortcuts he previously deleted.
|
| - // TODO(gab): Add a first run section to ChromeBrowserMainParts and remove
|
| - // OS specific sections below.
|
| - static const int64 kTiggerActiveSetupDelaySeconds = 5;
|
| - FilePath chrome_exe;
|
| - if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
|
| - NOTREACHED();
|
| - } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) {
|
| - BrowserThread::GetBlockingPool()->PostDelayedTask(
|
| - FROM_HERE,
|
| - base::Bind(&InstallUtil::TriggerActiveSetupCommand),
|
| - base::TimeDelta::FromSeconds(kTiggerActiveSetupDelaySeconds));
|
| - }
|
| -#endif // OS_WIN
|
| + PreInteractiveFirstRunInit();
|
| +
|
| if (!first_run_ui_bypass_) {
|
| first_run::AutoImport(profile_,
|
| master_prefs_->homepage_defined,
|
| @@ -1223,6 +1219,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
| master_prefs_->make_chrome_default,
|
| process_singleton_.get());
|
| #if defined(OS_POSIX) && !defined(OS_CHROMEOS)
|
| + // TODO(thakis): Look into moving this POSIX-specific section to
|
| + // ChromeBrowserMainPartsPosix::PostInteractiveFirstRunInit().
|
| +
|
| // On Windows, the download is tagged with enable/disable stats so there
|
| // is no need for this code.
|
|
|
| @@ -1232,6 +1231,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
| local_state_->SetBoolean(prefs::kMetricsReportingEnabled, true);
|
| #endif // OS_POSIX && !OS_CHROMEOS
|
| } // if (!first_run_ui_bypass_)
|
| + PostInteractiveFirstRunInit();
|
|
|
| browser_process_->profile_manager()->OnImportFinished(profile_);
|
|
|
|
|