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

Side by Side Diff: chrome/browser/profiles/off_the_record_profile_impl.cc

Issue 24153012: Fix cyclic dependency between ProfilePolicyConnector and PrefService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/profiles/off_the_record_profile_impl.h" 5 #include "chrome/browser/profiles/off_the_record_profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 134
135 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() { 135 OffTheRecordProfileImpl::~OffTheRecordProfileImpl() {
136 MaybeSendDestroyedNotification(); 136 MaybeSendDestroyedNotification();
137 137
138 #if defined(ENABLE_PLUGINS) 138 #if defined(ENABLE_PLUGINS)
139 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( 139 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
140 io_data_.GetResourceContextNoInit()); 140 io_data_.GetResourceContextNoInit());
141 #endif 141 #endif
142 142
143 io_data_.ReleaseFromBrowserContextServices(this);
144
143 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices( 145 BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
144 this); 146 this);
145 147
146 BrowserThread::PostTask( 148 BrowserThread::PostTask(
147 BrowserThread::IO, FROM_HERE, 149 BrowserThread::IO, FROM_HERE,
148 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this)); 150 base::Bind(&NotifyOTRProfileDestroyedOnIOThread, profile_, this));
149 151
150 if (host_content_settings_map_.get()) 152 if (host_content_settings_map_.get())
151 host_content_settings_map_->ShutdownOnUIThread(); 153 host_content_settings_map_->ShutdownOnUIThread();
152 154
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 486 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
485 #if defined(OS_CHROMEOS) 487 #if defined(OS_CHROMEOS)
486 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 488 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
487 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 489 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
488 g_browser_process->local_state()); 490 g_browser_process->local_state());
489 } 491 }
490 #endif // defined(OS_CHROMEOS) 492 #endif // defined(OS_CHROMEOS)
491 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 493 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
492 GetPrefs(), g_browser_process->local_state()); 494 GetPrefs(), g_browser_process->local_state());
493 } 495 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698