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

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

Issue 7189029: Implement an initial extension settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add missing files Created 9 years, 6 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 a87fec7aff4c21cac36fcf12f6c7b9e1459af9f1..7f4fe3a26b91182ccee41502ead02b949d5b82ed 100644
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/extensions/extension_pref_store.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/extensions/extension_settings.h"
#include "chrome/browser/extensions/extension_special_storage_policy.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/favicon/favicon_service.h"
@@ -461,6 +462,7 @@ void ProfileImpl::InitExtensions(bool extensions_enabled) {
CommandLine::ForCurrentProcess(),
GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
extension_prefs_.get(),
+ extension_settings_.get(),
autoupdate_enabled,
extensions_enabled));
@@ -815,13 +817,18 @@ void ProfileImpl::OnPrefsLoaded(bool success) {
// Make sure we save to disk that the session has opened.
prefs_->ScheduleSavePersistentPrefs();
+ FilePath install_directory =
+ GetPath().AppendASCII(ExtensionService::kInstallDirectoryName);
+
// 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(
prefs_.get(),
- GetPath().AppendASCII(ExtensionService::kInstallDirectoryName),
+ install_directory,
GetExtensionPrefValueMap()));
+ extension_settings_.reset(new ExtensionSettings(install_directory));
+
DCHECK(!net_pref_observer_.get());
net_pref_observer_.reset(
new NetPrefObserver(prefs_.get(), GetPrerenderManager()));

Powered by Google App Engine
This is Rietveld 408576698