| Index: chrome/browser/profile_impl.cc
|
| diff --git a/chrome/browser/profile_impl.cc b/chrome/browser/profile_impl.cc
|
| index 6e19ef48d2765446c168787a0361cb9108ab8f5b..60d34506e9e3813c248a0d6ab0c21cbd90c2927a 100644
|
| --- a/chrome/browser/profile_impl.cc
|
| +++ b/chrome/browser/profile_impl.cc
|
| @@ -35,6 +35,7 @@
|
| #include "chrome/browser/extensions/extension_info_map.h"
|
| #include "chrome/browser/extensions/extension_event_router.h"
|
| #include "chrome/browser/extensions/extension_message_service.h"
|
| +#include "chrome/browser/extensions/extension_pref_store.h"
|
| #include "chrome/browser/extensions/extension_process_manager.h"
|
| #include "chrome/browser/extensions/extensions_service.h"
|
| #include "chrome/browser/extensions/user_script_master.h"
|
| @@ -275,6 +276,12 @@ ProfileImpl::ProfileImpl(const FilePath& path)
|
| pref_change_registrar_.Add(prefs::kEnableAutoSpellCorrect, this);
|
| pref_change_registrar_.Add(prefs::kClearSiteDataOnExit, this);
|
|
|
| + // Ensure that preferences set by extensions are restored in the profile
|
| + // as early as possible. The constructor takes care of that.
|
| + extension_prefs_.reset(new ExtensionPrefs(
|
| + this,
|
| + GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName)));
|
| +
|
| // Convert active labs into switches. Modifies the current command line.
|
| about_flags::ConvertFlagsToSwitches(prefs, CommandLine::ForCurrentProcess());
|
|
|
| @@ -353,6 +360,7 @@ void ProfileImpl::InitExtensions() {
|
| this,
|
| CommandLine::ForCurrentProcess(),
|
| GetPath().AppendASCII(ExtensionsService::kInstallDirectoryName),
|
| + extension_prefs_.get(),
|
| true);
|
|
|
| RegisterComponentExtensions();
|
| @@ -686,6 +694,14 @@ PrefService* ProfileImpl::GetPrefs() {
|
| return prefs_.get();
|
| }
|
|
|
| +PrefStore* ProfileImpl::GetExtensionPrefStore() {
|
| + return extension_pref_store_;
|
| +}
|
| +
|
| +void ProfileImpl::SetExtensionPrefStore(PrefStore* extension_pref_store) {
|
| + extension_pref_store_ = extension_pref_store;
|
| +}
|
| +
|
| FilePath ProfileImpl::GetPrefFilePath() {
|
| FilePath pref_file_path = path_;
|
| pref_file_path = pref_file_path.Append(chrome::kPreferencesFilename);
|
|
|