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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 schema_registry_service_ = | 435 schema_registry_service_ = |
436 policy::SchemaRegistryServiceFactory::CreateForContext( | 436 policy::SchemaRegistryServiceFactory::CreateForContext( |
437 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); | 437 this, connector->GetChromeSchema(), connector->GetSchemaRegistry()); |
438 #if defined(OS_CHROMEOS) | 438 #if defined(OS_CHROMEOS) |
439 cloud_policy_manager_ = | 439 cloud_policy_manager_ = |
440 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( | 440 policy::UserCloudPolicyManagerFactoryChromeOS::CreateForProfile( |
441 this, force_immediate_policy_load, sequenced_task_runner); | 441 this, force_immediate_policy_load, sequenced_task_runner); |
442 #else | 442 #else |
443 cloud_policy_manager_ = | 443 cloud_policy_manager_ = |
444 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( | 444 policy::UserCloudPolicyManagerFactory::CreateForOriginalBrowserContext( |
445 this, | 445 this, force_immediate_policy_load, sequenced_task_runner, |
446 force_immediate_policy_load, | 446 BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), |
447 sequenced_task_runner, | 447 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
448 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), | |
449 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | |
450 #endif | 448 #endif |
451 profile_policy_connector_ = | 449 profile_policy_connector_ = |
452 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( | 450 policy::ProfilePolicyConnectorFactory::CreateForBrowserContext( |
453 this, force_immediate_policy_load); | 451 this, force_immediate_policy_load); |
454 | 452 |
455 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || | 453 DCHECK(create_mode == CREATE_MODE_ASYNCHRONOUS || |
456 create_mode == CREATE_MODE_SYNCHRONOUS); | 454 create_mode == CREATE_MODE_SYNCHRONOUS); |
457 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; | 455 bool async_prefs = create_mode == CREATE_MODE_ASYNCHRONOUS; |
458 | 456 |
459 #if defined(OS_CHROMEOS) | 457 #if defined(OS_CHROMEOS) |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 | 555 |
558 // Initialize components that depend on the current value. | 556 // Initialize components that depend on the current value. |
559 UpdateSupervisedUserIdInStorage(); | 557 UpdateSupervisedUserIdInStorage(); |
560 UpdateIsEphemeralInStorage(); | 558 UpdateIsEphemeralInStorage(); |
561 GAIAInfoUpdateServiceFactory::GetForProfile(this); | 559 GAIAInfoUpdateServiceFactory::GetForProfile(this); |
562 | 560 |
563 PrefService* local_state = g_browser_process->local_state(); | 561 PrefService* local_state = g_browser_process->local_state(); |
564 ssl_config_service_manager_.reset( | 562 ssl_config_service_manager_.reset( |
565 ssl_config::SSLConfigServiceManager::CreateDefaultManager( | 563 ssl_config::SSLConfigServiceManager::CreateDefaultManager( |
566 local_state, | 564 local_state, |
567 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 565 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO))); |
568 | 566 |
569 #if BUILDFLAG(ENABLE_BACKGROUND) | 567 #if BUILDFLAG(ENABLE_BACKGROUND) |
570 // Initialize the BackgroundModeManager - this has to be done here before | 568 // Initialize the BackgroundModeManager - this has to be done here before |
571 // InitExtensions() is called because it relies on receiving notifications | 569 // InitExtensions() is called because it relies on receiving notifications |
572 // when extensions are loaded. BackgroundModeManager is not needed under | 570 // when extensions are loaded. BackgroundModeManager is not needed under |
573 // ChromeOS because Chrome is always running, no need for special keep-alive | 571 // ChromeOS because Chrome is always running, no need for special keep-alive |
574 // or launch-on-startup support unless kKeepAliveForTest is set. | 572 // or launch-on-startup support unless kKeepAliveForTest is set. |
575 bool init_background_mode_manager = true; | 573 bool init_background_mode_manager = true; |
576 #if defined(OS_CHROMEOS) | 574 #if defined(OS_CHROMEOS) |
577 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 575 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 | 1278 |
1281 std::unique_ptr<domain_reliability::DomainReliabilityMonitor> | 1279 std::unique_ptr<domain_reliability::DomainReliabilityMonitor> |
1282 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1280 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1283 domain_reliability::DomainReliabilityService* service = | 1281 domain_reliability::DomainReliabilityService* service = |
1284 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1282 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1285 GetForBrowserContext(this); | 1283 GetForBrowserContext(this); |
1286 if (!service) | 1284 if (!service) |
1287 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1285 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1288 | 1286 |
1289 return service->CreateMonitor( | 1287 return service->CreateMonitor( |
1290 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1288 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
1291 } | 1289 } |
OLD | NEW |