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