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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 create_session_service_timer_.Start(FROM_HERE, | 394 create_session_service_timer_.Start(FROM_HERE, |
395 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, | 395 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, |
396 &ProfileImpl::EnsureSessionServiceCreated); | 396 &ProfileImpl::EnsureSessionServiceCreated); |
397 #endif | 397 #endif |
398 | 398 |
399 // Determine if prefetch is enabled for this profile. | 399 // Determine if prefetch is enabled for this profile. |
400 // If not profile_manager is present, it means we are in a unittest. | 400 // If not profile_manager is present, it means we are in a unittest. |
401 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 401 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
402 predictor_ = chrome_browser_net::Predictor::CreatePredictor( | 402 predictor_ = chrome_browser_net::Predictor::CreatePredictor( |
403 !command_line->HasSwitch(switches::kDisablePreconnect), | 403 !command_line->HasSwitch(switches::kDisablePreconnect), |
| 404 !command_line->HasSwitch(switches::kDnsPrefetchDisable), |
404 g_browser_process->profile_manager() == NULL); | 405 g_browser_process->profile_manager() == NULL); |
405 | 406 |
406 // If we are creating the profile synchronously, then we should load the | 407 // If we are creating the profile synchronously, then we should load the |
407 // policy data immediately. | 408 // policy data immediately. |
408 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); | 409 bool force_immediate_policy_load = (create_mode == CREATE_MODE_SYNCHRONOUS); |
409 #if defined(ENABLE_CONFIGURATION_POLICY) | 410 #if defined(ENABLE_CONFIGURATION_POLICY) |
410 policy::BrowserPolicyConnector* connector = | 411 policy::BrowserPolicyConnector* connector = |
411 g_browser_process->browser_policy_connector(); | 412 g_browser_process->browser_policy_connector(); |
412 schema_registry_service_ = | 413 schema_registry_service_ = |
413 policy::SchemaRegistryServiceFactory::CreateForContext( | 414 policy::SchemaRegistryServiceFactory::CreateForContext( |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 ProfileImpl::CreateDomainReliabilityMonitor() { | 1324 ProfileImpl::CreateDomainReliabilityMonitor() { |
1324 domain_reliability::DomainReliabilityService* service = | 1325 domain_reliability::DomainReliabilityService* service = |
1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1326 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1326 GetForBrowserContext(this); | 1327 GetForBrowserContext(this); |
1327 if (!service) | 1328 if (!service) |
1328 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1329 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1329 | 1330 |
1330 return service->CreateMonitor( | 1331 return service->CreateMonitor( |
1331 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1332 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
1332 } | 1333 } |
OLD | NEW |