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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 SupervisedUserSettingsService* supervised_user_settings = NULL; | 490 SupervisedUserSettingsService* supervised_user_settings = NULL; |
491 #if defined(ENABLE_MANAGED_USERS) | 491 #if defined(ENABLE_MANAGED_USERS) |
492 supervised_user_settings = | 492 supervised_user_settings = |
493 SupervisedUserSettingsServiceFactory::GetForProfile(this); | 493 SupervisedUserSettingsServiceFactory::GetForProfile(this); |
494 supervised_user_settings->Init( | 494 supervised_user_settings->Init( |
495 path_, sequenced_task_runner, create_mode == CREATE_MODE_SYNCHRONOUS); | 495 path_, sequenced_task_runner, create_mode == CREATE_MODE_SYNCHRONOUS); |
496 #endif | 496 #endif |
497 | 497 |
498 scoped_refptr<SafeBrowsingService> safe_browsing_service( | 498 scoped_refptr<SafeBrowsingService> safe_browsing_service( |
499 g_browser_process->safe_browsing_service()); | 499 g_browser_process->safe_browsing_service()); |
500 if (safe_browsing_service) { | 500 if (safe_browsing_service.get()) { |
501 pref_validation_delegate_ = | 501 pref_validation_delegate_ = |
502 safe_browsing_service->CreatePreferenceValidationDelegate(this).Pass(); | 502 safe_browsing_service->CreatePreferenceValidationDelegate(this).Pass(); |
503 } | 503 } |
504 | 504 |
505 { | 505 { |
506 // On startup, preference loading is always synchronous so a scoped timer | 506 // On startup, preference loading is always synchronous so a scoped timer |
507 // will work here. | 507 // will work here. |
508 startup_metric_utils::ScopedSlowStartupUMA | 508 startup_metric_utils::ScopedSlowStartupUMA |
509 scoped_timer("Startup.SlowStartupPreferenceLoading"); | 509 scoped_timer("Startup.SlowStartupPreferenceLoading"); |
510 prefs_ = chrome_prefs::CreateProfilePrefs( | 510 prefs_ = chrome_prefs::CreateProfilePrefs( |
(...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1455 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1455 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1456 GetForBrowserContext(this); | 1456 GetForBrowserContext(this); |
1457 if (!service) | 1457 if (!service) |
1458 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1458 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1459 | 1459 |
1460 return service->CreateMonitor( | 1460 return service->CreateMonitor( |
1461 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 1461 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
1462 local_state, | 1462 local_state, |
1463 prefs::kMetricsReportingEnabled); | 1463 prefs::kMetricsReportingEnabled); |
1464 } | 1464 } |
OLD | NEW |