| OLD | NEW |
| 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 Loading... |
| 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::CreateForProfile( | 418 policy::UserCloudPolicyManagerFactory::CreateForOriginalProfile( |
| 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 Loading... |
| 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 } |
| OLD | NEW |