Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(822)

Unified Diff: chrome/browser/profiles/profile_impl.cc

Issue 2601873002: Add a mojo bridge for PersistentPrefStore. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_impl.cc
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
index 2f493aab7d8d2388ee5a28a51334402f60451c0e..fd486d134352b56079cb85319007c8e20214b530 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -480,13 +480,21 @@ ProfileImpl::ProfileImpl(
if (safe_browsing_service.get()) {
pref_validation_delegate_ =
safe_browsing_service->CreatePreferenceValidationDelegate(this);
+ if (pref_validation_delegate_) {
+ pref_validation_delegate_weak_factory_ = base::MakeUnique<
+ base::WeakPtrFactory<TrackedPreferenceValidationDelegate>>(
+ pref_validation_delegate_.get());
+ }
}
content::BrowserContext::Initialize(this, path_);
{
prefs_ = chrome_prefs::CreateProfilePrefs(
- path_, sequenced_task_runner, pref_validation_delegate_.get(),
+ path_, sequenced_task_runner,
+ pref_validation_delegate_weak_factory_
+ ? pref_validation_delegate_weak_factory_->GetWeakPtr()
+ : base::WeakPtr<TrackedPreferenceValidationDelegate>(),
profile_policy_connector_->policy_service(), supervised_user_settings,
CreateExtensionPrefStore(this, false), pref_registry_, async_prefs);
// Register on BrowserContext.

Powered by Google App Engine
This is Rietveld 408576698