Chromium Code Reviews| 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 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 path_, sequenced_task_runner, create_mode == CREATE_MODE_SYNCHRONOUS); | 453 path_, sequenced_task_runner, create_mode == CREATE_MODE_SYNCHRONOUS); |
| 454 #endif | 454 #endif |
| 455 | 455 |
| 456 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service( | 456 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service( |
| 457 g_browser_process->safe_browsing_service()); | 457 g_browser_process->safe_browsing_service()); |
| 458 if (safe_browsing_service.get()) { | 458 if (safe_browsing_service.get()) { |
| 459 pref_validation_delegate_ = | 459 pref_validation_delegate_ = |
| 460 safe_browsing_service->CreatePreferenceValidationDelegate(this); | 460 safe_browsing_service->CreatePreferenceValidationDelegate(this); |
| 461 } | 461 } |
| 462 | 462 |
| 463 content::BrowserContext::InitializeProfileApplication(this); | |
|
jam
2016/02/27 01:34:45
need to do this for other BrowserContexts, and add
| |
| 464 | |
| 463 { | 465 { |
| 464 prefs_ = chrome_prefs::CreateProfilePrefs( | 466 prefs_ = chrome_prefs::CreateProfilePrefs( |
| 465 path_, sequenced_task_runner, pref_validation_delegate_.get(), | 467 path_, sequenced_task_runner, pref_validation_delegate_.get(), |
| 466 profile_policy_connector_->policy_service(), supervised_user_settings, | 468 profile_policy_connector_->policy_service(), supervised_user_settings, |
| 467 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs); | 469 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs); |
| 468 // Register on BrowserContext. | 470 // Register on BrowserContext. |
| 469 user_prefs::UserPrefs::Set(this, prefs_.get()); | 471 user_prefs::UserPrefs::Set(this, prefs_.get()); |
| 470 } | 472 } |
| 471 | 473 |
| 472 if (async_prefs) { | 474 if (async_prefs) { |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1279 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1281 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1280 domain_reliability::DomainReliabilityService* service = | 1282 domain_reliability::DomainReliabilityService* service = |
| 1281 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1283 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1282 GetForBrowserContext(this); | 1284 GetForBrowserContext(this); |
| 1283 if (!service) | 1285 if (!service) |
| 1284 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1286 return scoped_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1285 | 1287 |
| 1286 return service->CreateMonitor( | 1288 return service->CreateMonitor( |
| 1287 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); | 1289 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)); |
| 1288 } | 1290 } |
| OLD | NEW |