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

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

Issue 2740493002: Pref service: create service at browser startup (Closed)
Patch Set: Address sammc's review comments Created 3 years, 9 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 03d8ff3f37acab890adfa982e2b42bc4b0e9cb25..ce8af5daf604166d4a37bc5188bd6f68bf9f3770 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -76,6 +76,7 @@
#include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
@@ -488,10 +489,15 @@ ProfileImpl::ProfileImpl(
content::BrowserContext::Initialize(this, path_);
{
+ service_manager::Connector* connector = nullptr;
+ if (base::FeatureList::IsEnabled(features::kPrefService)) {
+ connector = content::BrowserContext::GetConnectorFor(this);
+ }
prefs_ = chrome_prefs::CreateProfilePrefs(
path_, sequenced_task_runner, pref_validation_delegate_.get(),
profile_policy_connector_->policy_service(), supervised_user_settings,
- CreateExtensionPrefStore(this, false), pref_registry_, async_prefs);
+ CreateExtensionPrefStore(this, false), pref_registry_, async_prefs,
+ connector);
// Register on BrowserContext.
user_prefs::UserPrefs::Set(this, prefs_.get());
}

Powered by Google App Engine
This is Rietveld 408576698