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

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

Issue 44083005: policy: Remove UserCloudPolicyManagerFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 : profile_(real_profile), 94 : profile_(real_profile),
95 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)), 95 prefs_(PrefServiceSyncable::IncognitoFromProfile(real_profile)),
96 io_data_(this), 96 io_data_(this),
97 start_time_(Time::Now()) { 97 start_time_(Time::Now()) {
98 // Register on BrowserContext. 98 // Register on BrowserContext.
99 user_prefs::UserPrefs::Set(this, prefs_); 99 user_prefs::UserPrefs::Set(this, prefs_);
100 } 100 }
101 101
102 void OffTheRecordProfileImpl::Init() { 102 void OffTheRecordProfileImpl::Init() {
103 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS) 103 #if defined(ENABLE_CONFIGURATION_POLICY) && !defined(OS_CHROMEOS)
104 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordProfile( 104 policy::UserCloudPolicyManagerFactory::RegisterForOffTheRecordBrowserContext(
105 this->GetOriginalProfile(), this); 105 this->GetOriginalProfile(), this);
106 #endif 106 #endif
107 107
108 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices( 108 BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
109 this); 109 this);
110 110
111 DCHECK_NE(IncognitoModePrefs::DISABLED, 111 DCHECK_NE(IncognitoModePrefs::DISABLED,
112 IncognitoModePrefs::GetAvailability(profile_->GetPrefs())); 112 IncognitoModePrefs::GetAvailability(profile_->GetPrefs()));
113 113
114 #if defined(OS_ANDROID) || defined(OS_IOS) 114 #if defined(OS_ANDROID) || defined(OS_IOS)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() { 495 PrefProxyConfigTracker* OffTheRecordProfileImpl::CreateProxyConfigTracker() {
496 #if defined(OS_CHROMEOS) 496 #if defined(OS_CHROMEOS)
497 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 497 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
498 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 498 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
499 g_browser_process->local_state()); 499 g_browser_process->local_state());
500 } 500 }
501 #endif // defined(OS_CHROMEOS) 501 #endif // defined(OS_CHROMEOS)
502 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 502 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
503 GetPrefs(), g_browser_process->local_state()); 503 GetPrefs(), g_browser_process->local_state());
504 } 504 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698