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

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

Issue 52343002: policy: Register OffTheRecordProfile at UserCloudPolicyManagerFactory. (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
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 // If we are creating the profile synchronously, then we should load the 404 // If we are creating the profile synchronously, then we should load the
405 // policy data immediately. 405 // policy data immediately.
406 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); 406 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS);
407 #if defined(ENABLE_CONFIGURATION_POLICY) 407 #if defined(ENABLE_CONFIGURATION_POLICY)
408 #if defined(OS_CHROMEOS) 408 #if defined(OS_CHROMEOS)
409 cloud_policy_manager_ = 409 cloud_policy_manager_ =
410 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( 410 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile(
411 this, force_immediate_policy_load, sequenced_task_runner); 411 this, force_immediate_policy_load, sequenced_task_runner);
412 #else 412 #else
413 cloud_policy_manager_ = 413 cloud_policy_manager_ =
414 policy::UserCloudPolicyManagerFactory::CreateForProfile( 414 policy::UserCloudPolicyManagerFactory::CreateForOriginalProfile(
415 this, force_immediate_policy_load, sequenced_task_runner); 415 this, force_immediate_policy_load, sequenced_task_runner);
416 #endif 416 #endif
417 #endif 417 #endif
418 profile_policy_connector_ = 418 profile_policy_connector_ =
419 policy::ProfilePolicyConnectorFactory::CreateForProfile( 419 policy::ProfilePolicyConnectorFactory::CreateForProfile(
420 this, force_immediate_policy_load); 420 this, force_immediate_policy_load);
421 421
422 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || 422 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS ||
423 create_mode == CREATE_MODE_SYNCHRONOUS); 423 create_mode == CREATE_MODE_SYNCHRONOUS);
424 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; 424 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS;
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
1241 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() { 1241 PrefProxyConfigTracker* ProfileImpl::CreateProxyConfigTracker() {
1242 #if defined(OS_CHROMEOS) 1242 #if defined(OS_CHROMEOS)
1243 if (chromeos::ProfileHelper::IsSigninProfile(this)) { 1243 if (chromeos::ProfileHelper::IsSigninProfile(this)) {
1244 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState( 1244 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
1245 g_browser_process->local_state()); 1245 g_browser_process->local_state());
1246 } 1246 }
1247 #endif // defined(OS_CHROMEOS) 1247 #endif // defined(OS_CHROMEOS)
1248 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile( 1248 return ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
1249 GetPrefs(), g_browser_process->local_state()); 1249 GetPrefs(), g_browser_process->local_state());
1250 } 1250 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698