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

Side by Side Diff: chrome/browser/profiles/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/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // If we are creating the profile synchronously, then we should load the 408 // If we are creating the profile synchronously, then we should load the
409 // policy data immediately. 409 // policy data immediately.
410 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 410 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
411 #if defined(ENABLE_CONFIGURATION_POLICY) 411 #if defined(ENABLE_CONFIGURATION_POLICY)
412 #if defined(OS_CHROMEOS) 412 #if defined(OS_CHROMEOS)
413 cloud_policy_manager_ = 413 cloud_policy_manager_ =
414 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( 414 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
415 this, force_immediate_policy_load, sequenced_task_runner); 415 this, force_immediate_policy_load, sequenced_task_runner);
416 #else 416 #else
417 cloud_policy_manager_ = 417 cloud_policy_manager_ =
418 policy::UserCloudPolicyManagerFactory::CreateForOriginalProfile( 418 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext(
419 this, force_immediate_policy_load, sequenced_task_runner); 419 this, force_immediate_policy_load, sequenced_task_runner);
420 #endif 420 #endif
421 #endif 421 #endif
422 profile_policy_connector_ = 422 profile_policy_connector_ =
423 policy::ProfilePolicyConnectorFactory::CreateForProfile( 423 policy::ProfilePolicyConnectorFactory::CreateForProfile(
424 this, force_immediate_policy_load); 424 this, force_immediate_policy_load);
425 425
426 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || 426 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS ||
427 create_mode == CREATE_MODE_SYNCHRONOUS); 427 create_mode == CREATE_MODE_SYNCHRONOUS);
428 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; 428 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS;
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1230 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1231 #if defined(OS_CHROMEOS) 1231 #if defined(OS_CHROMEOS)
1232 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1232 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1233 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1233 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1234 g_browser_process->local_state()); 1234 g_browser_process->local_state());
1235 } 1235 }
1236 #endif // defined(OS_CHROMEOS) 1236 #endif // defined(OS_CHROMEOS)
1237 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1237 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1238 GetPrefs(), g_browser_process->local_state()); 1238 GetPrefs(), g_browser_process->local_state());
1239 } 1239 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698