| Index: chrome/browser/profiles/profile_manager.cc
|
| diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
|
| index c08f9a11e1535547eb4fda5079b10e9a69d73b70..52e6a7610a31ea827f7a8adf3eff865ae2b7bd34 100644
|
| --- a/chrome/browser/profiles/profile_manager.cc
|
| +++ b/chrome/browser/profiles/profile_manager.cc
|
| @@ -36,6 +36,8 @@
|
| #include "chrome/common/logging_chrome.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/url_constants.h"
|
| +#include "components/user_prefs/user_prefs.h"
|
| +#include "components/user_prefs/user_prefs_delegate.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/user_metrics.h"
|
| @@ -171,6 +173,20 @@ void CheckCryptohomeIsMounted(chromeos::DBusMethodCallStatus call_status,
|
| }
|
| #endif
|
|
|
| +class ChromeUserPrefsDelegate : public components::UserPrefsDelegate {
|
| + public:
|
| + ChromeUserPrefsDelegate() {}
|
| + virtual ~ChromeUserPrefsDelegate() {}
|
| +
|
| + virtual PrefService* PrefServiceFromBrowserContext(
|
| + content::BrowserContext* context) OVERRIDE {
|
| + return static_cast<Profile*>(context)->GetPrefs();
|
| + }
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(ChromeUserPrefsDelegate);
|
| +};
|
| +
|
| } // namespace
|
|
|
| #if defined(ENABLE_SESSION_SERVICE)
|
| @@ -267,6 +283,10 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
| if (ProfileShortcutManager::IsFeatureEnabled() && !user_data_dir.empty())
|
| profile_shortcut_manager_.reset(ProfileShortcutManager::Create(
|
| this));
|
| +
|
| + components::UserPrefs::GetInstance()->Initialize(
|
| + scoped_ptr<components::UserPrefsDelegate>(
|
| + new ChromeUserPrefsDelegate).Pass());
|
| }
|
|
|
| ProfileManager::~ProfileManager() {
|
|
|