diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 16:47:36 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-27 16:47:36 +0000 |
commit | fd974f2b824d23eaf86e0d0ed17d3578a0da80d0 (patch) | |
tree | 02594190ac0c258314259877d6a304856555df36 /chrome/browser/browser_process_impl.cc | |
parent | afb9e50f67098e569a22a9ac771d961828bd31c1 (diff) | |
download | chromium_src-fd974f2b824d23eaf86e0d0ed17d3578a0da80d0.zip chromium_src-fd974f2b824d23eaf86e0d0ed17d3578a0da80d0.tar.gz chromium_src-fd974f2b824d23eaf86e0d0ed17d3578a0da80d0.tar.bz2 |
Revert 184967
> Initialize BrowserPolicyConnector after the IOThread is created.
>
> The import process on Windows spawns a subprocess and spins a nested message loop waiting for it to complete. If this subprocess takes longer than 5 seconds then the message loop will execute a delayed initialization task of the policy code, that grabs the system request context; however, since the IOThread hasn't been created yet this leads to a crash.
>
> BUG=177843
>
> Review URL: https://chromiumcodereview.appspot.com/12310100
TBR=joaodasilva@chromium.org
Review URL: https://codereview.chromium.org/12328146
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_process_impl.cc')
-rw-r--r-- | chrome/browser/browser_process_impl.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc index 507e063..fba82ec 100644 --- a/chrome/browser/browser_process_impl.cc +++ b/chrome/browser/browser_process_impl.cc @@ -475,8 +475,10 @@ policy::BrowserPolicyConnector* BrowserProcessImpl::browser_policy_connector() { DCHECK(CalledOnValidThread()); #if defined(ENABLE_CONFIGURATION_POLICY) if (!created_browser_policy_connector_) { + // Init() should not reenter this function. If it does this will DCHECK. DCHECK(!browser_policy_connector_); browser_policy_connector_.reset(new policy::BrowserPolicyConnector()); + browser_policy_connector_->Init(); created_browser_policy_connector_ = true; } return browser_policy_connector_.get(); @@ -842,16 +844,6 @@ void BrowserProcessImpl::PreCreateThreads() { } void BrowserProcessImpl::PreMainMessageLoopRun() { -#if defined(ENABLE_CONFIGURATION_POLICY) - // browser_policy_connector() is created very early because local_state() - // needs policy to be initialized with the managed preference values. - // However, policy fetches from the network and loading of disk caches - // requires that threads are running; this Init() call lets the connector - // resume its initialization now that the loops are spinning and the - // system request context is available for the fetchers. - browser_policy_connector()->Init(local_state(), system_request_context()); -#endif - if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) ApplyDefaultBrowserPolicy(); |