| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << | 424 DCHECK(!path.empty()) << "Using an empty path will attempt to write " << |
| 425 "profile files to the root directory!"; | 425 "profile files to the root directory!"; |
| 426 | 426 |
| 427 #if defined(ENABLE_SESSION_SERVICE) | 427 #if defined(ENABLE_SESSION_SERVICE) |
| 428 create_session_service_timer_.Start(FROM_HERE, | 428 create_session_service_timer_.Start(FROM_HERE, |
| 429 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, | 429 TimeDelta::FromMilliseconds(kCreateSessionServiceDelayMS), this, |
| 430 &ProfileImpl::EnsureSessionServiceCreated); | 430 &ProfileImpl::EnsureSessionServiceCreated); |
| 431 #endif | 431 #endif |
| 432 | 432 |
| 433 set_is_guest_profile(path == ProfileManager::GetGuestProfilePath()); | 433 set_is_guest_profile(path == ProfileManager::GetGuestProfilePath()); |
| 434 set_is_system_profile(path == ProfileManager::GetSystemProfilePath()); |
| 434 | 435 |
| 435 // Determine if prefetch is enabled for this profile. | 436 // Determine if prefetch is enabled for this profile. |
| 436 // If not profile_manager is present, it means we are in a unittest. | 437 // If not profile_manager is present, it means we are in a unittest. |
| 437 const base::CommandLine* command_line = | 438 const base::CommandLine* command_line = |
| 438 base::CommandLine::ForCurrentProcess(); | 439 base::CommandLine::ForCurrentProcess(); |
| 439 predictor_ = chrome_browser_net::Predictor::CreatePredictor( | 440 predictor_ = chrome_browser_net::Predictor::CreatePredictor( |
| 440 !command_line->HasSwitch(switches::kDisablePreconnect), | 441 !command_line->HasSwitch(switches::kDisablePreconnect), |
| 441 !command_line->HasSwitch(switches::kDnsPrefetchDisable), | 442 !command_line->HasSwitch(switches::kDnsPrefetchDisable), |
| 442 g_browser_process->profile_manager() == NULL); | 443 g_browser_process->profile_manager() == NULL); |
| 443 | 444 |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1422 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1422 domain_reliability::DomainReliabilityService* service = | 1423 domain_reliability::DomainReliabilityService* service = |
| 1423 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1424 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1424 GetForBrowserContext(this); | 1425 GetForBrowserContext(this); |
| 1425 if (!service) | 1426 if (!service) |
| 1426 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1427 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1427 | 1428 |
| 1428 return service->CreateMonitor( | 1429 return service->CreateMonitor( |
| 1429 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1430 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1430 } | 1431 } |
| OLD | NEW |