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

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

Issue 2745563005: Pref service: add support for tracked prefs. (Closed)
Patch Set: deflake tests Created 3 years, 8 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 ceeacd8dcf205d8783e623ca736314e7275f6bad..0e6340d54882e17307f2bf2a0251ccfcbf8fdbcb 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -115,6 +115,7 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/page_zoom.h"
#include "extensions/features/features.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
#include "ppapi/features/features.h"
#include "printing/features/features.h"
#include "services/identity/identity_service.h"
@@ -485,9 +486,14 @@ ProfileImpl::ProfileImpl(
scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service(
g_browser_process->safe_browsing_service());
+ prefs::mojom::TrackedPreferenceValidationDelegatePtr pref_validation_delegate;
if (safe_browsing_service.get()) {
- pref_validation_delegate_ =
+ auto pref_validation_delegate_impl =
safe_browsing_service->CreatePreferenceValidationDelegate(this);
+ if (pref_validation_delegate_impl) {
+ mojo::MakeStrongBinding(std::move(pref_validation_delegate_impl),
+ mojo::MakeRequest(&pref_validation_delegate));
+ }
}
content::BrowserContext::Initialize(this, path_);
@@ -498,7 +504,7 @@ ProfileImpl::ProfileImpl(
connector = content::BrowserContext::GetConnectorFor(this);
}
prefs_ = chrome_prefs::CreateProfilePrefs(
- path_, sequenced_task_runner, pref_validation_delegate_.get(),
+ path_, std::move(pref_validation_delegate),
profile_policy_connector_->policy_service(), supervised_user_settings,
CreateExtensionPrefStore(this, false), pref_registry_, async_prefs,
connector);

Powered by Google App Engine
This is Rietveld 408576698