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 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 pref_validation_delegate_ = | 481 pref_validation_delegate_ = |
482 safe_browsing_service->CreatePreferenceValidationDelegate(this); | 482 safe_browsing_service->CreatePreferenceValidationDelegate(this); |
483 } | 483 } |
484 | 484 |
485 content::BrowserContext::Initialize(this, path_); | 485 content::BrowserContext::Initialize(this, path_); |
486 | 486 |
487 { | 487 { |
488 prefs_ = chrome_prefs::CreateProfilePrefs( | 488 prefs_ = chrome_prefs::CreateProfilePrefs( |
489 path_, sequenced_task_runner, pref_validation_delegate_.get(), | 489 path_, sequenced_task_runner, pref_validation_delegate_.get(), |
490 profile_policy_connector_->policy_service(), supervised_user_settings, | 490 profile_policy_connector_->policy_service(), supervised_user_settings, |
491 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs); | 491 CreateExtensionPrefStore(this, false), pref_registry_, async_prefs, |
| 492 content::BrowserContext::GetConnectorFor(this)); |
492 // Register on BrowserContext. | 493 // Register on BrowserContext. |
493 user_prefs::UserPrefs::Set(this, prefs_.get()); | 494 user_prefs::UserPrefs::Set(this, prefs_.get()); |
494 } | 495 } |
495 | 496 |
496 if (async_prefs) { | 497 if (async_prefs) { |
497 // Wait for the notification that prefs has been loaded | 498 // Wait for the notification that prefs has been loaded |
498 // (successfully or not). Note that we can use base::Unretained | 499 // (successfully or not). Note that we can use base::Unretained |
499 // because the PrefService is owned by this class and lives on | 500 // because the PrefService is owned by this class and lives on |
500 // the same thread. | 501 // the same thread. |
501 prefs_->AddPrefInitObserver(base::Bind( | 502 prefs_->AddPrefInitObserver(base::Bind( |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1289 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1290 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
1290 domain_reliability::DomainReliabilityService* service = | 1291 domain_reliability::DomainReliabilityService* service = |
1291 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1292 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
1292 GetForBrowserContext(this); | 1293 GetForBrowserContext(this); |
1293 if (!service) | 1294 if (!service) |
1294 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1295 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
1295 | 1296 |
1296 return service->CreateMonitor( | 1297 return service->CreateMonitor( |
1297 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1298 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
1298 } | 1299 } |
OLD | NEW |