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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 // If we are creating the profile synchronously, then we should load the | 428 // If we are creating the profile synchronously, then we should load the |
429 // policy data immediately. | 429 // policy data immediately. |
430 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); | 430 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); |
431 policy::BrowserPolicyConnector* connector = | 431 policy::BrowserPolicyConnector* connector = |
432 g_browser_process->browser_policy_connector(); | 432 g_browser_process->browser_policy_connector(); |
433 schema_registry_service_ = | 433 schema_registry_service_ = |
434 policy::SchemaRegistryServiceFactory::CreateForContext( | 434 policy::SchemaRegistryServiceFactory::CreateForContext( |
435 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); | 435 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); |
436 #if defined(OS_CHROMEOS) | 436 #if defined(OS_CHROMEOS) |
437 cloud_policy_manager_ = | 437 configuration_policy_provider_ = |
438 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( | 438 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( |
439 this, force_immediate_policy_load, sequenced_task_runner); | 439 this, force_immediate_policy_load, sequenced_task_runner); |
440 #else | 440 #else |
441 cloud_policy_manager_ = | 441 configuration_policy_provider_ = |
442 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( | 442 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( |
443 this, force_immediate_policy_load, sequenced_task_runner, | 443 this, force_immediate_policy_load, sequenced_task_runner, |
444 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), | 444 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
445 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 445 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
446 #endif | 446 #endif |
447 profile_policy_connector_ = | 447 profile_policy_connector_ = |
448 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( | 448 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( |
449 this, force_immediate_policy_load); | 449 this, force_immediate_policy_load); |
450 | 450 |
451 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || | 451 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || |
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1275 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1276 domain_reliability::DomainReliabilityService* service = | 1276 domain_reliability::DomainReliabilityService* service = |
1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1277 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1278 GetForBrowserContext(this); | 1278 GetForBrowserContext(this); |
1279 if (!service) | 1279 if (!service) |
1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1280 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1281 | 1281 |
1282 return service->CreateMonitor( | 1282 return service->CreateMonitor( |
1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1283 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
1284 } | 1284 } |
OLD | NEW |