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

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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // If we are creating the profile synchronously, then we should load the 401 // If we are creating the profile synchronously, then we should load the
402 // policy data immediately. 402 // policy data immediately.
403 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 403 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
404 #if defined(ENABLE_CONFIGURATION_POLICY) 404 #if defined(ENABLE_CONFIGURATION_POLICY)
405 #if defined(OS_CHROMEOS) 405 #if defined(OS_CHROMEOS)
406 cloud_policy_manager_ = 406 cloud_policy_manager_ =
407 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( 407 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
408 this, force_immediate_policy_load, sequenced_task_runner); 408 this, force_immediate_policy_load, sequenced_task_runner);
409 #else 409 #else
410 cloud_policy_manager_ = 410 cloud_policy_manager_ =
411 policy::UserCloudPolicyManagerFactory::CreateForOriginalProfile( 411 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext(
412 this, force_immediate_policy_load, sequenced_task_runner); 412 this, force_immediate_policy_load, sequenced_task_runner);
413 #endif 413 #endif
414 #endif 414 #endif
415 profile_policy_connector_ = 415 profile_policy_connector_ =
416 policy::ProfilePolicyConnectorFactory::CreateForProfile( 416 policy::ProfilePolicyConnectorFactory::CreateForProfile(
417 this, force_immediate_policy_load); 417 this, force_immediate_policy_load);
418 418
419 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || 419 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS ||
420 create_mode == CREATE_MODE_SYNCHRONOUS); 420 create_mode == CREATE_MODE_SYNCHRONOUS);
421 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; 421 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS;
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1233 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1234 #if defined(OS_CHROMEOS) 1234 #if defined(OS_CHROMEOS)
1235 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1235 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1236 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1236 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1237 g_browser_process->local_state()); 1237 g_browser_process->local_state());
1238 } 1238 }
1239 #endif // defined(OS_CHROMEOS) 1239 #endif // defined(OS_CHROMEOS)
1240 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1240 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1241 GetPrefs(), g_browser_process->local_state()); 1241 GetPrefs(), g_browser_process->local_state());
1242 } 1242 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | chrome/browser/ui/webui/policy_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698