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

Unified Diff: chrome/browser/profile_impl.h

Issue 5213002: Fix for Bug 50726 "Save extension list and "winning" prefs from extensions" (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Addressed Mattias' comments Created 10 years, 1 month 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/profile_impl.h
diff --git a/chrome/browser/profile_impl.h b/chrome/browser/profile_impl.h
index 83a4b935f47f43f64f138d12788c7e94b8b3095e..aa420e7ec838e0c9f2fb18ef430208974bcbc93a 100644
--- a/chrome/browser/profile_impl.h
+++ b/chrome/browser/profile_impl.h
@@ -18,7 +18,9 @@
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
+class ExtensionPrefs;
class PrefService;
+class PrefStore;
#if defined(OS_CHROMEOS)
namespace chromeos {
@@ -66,6 +68,8 @@ class ProfileImpl : public Profile,
virtual WebDataService* GetWebDataServiceWithoutCreating();
virtual PasswordStore* GetPasswordStore(ServiceAccessType sat);
virtual PrefService* GetPrefs();
+ virtual PrefStore* GetExtensionPrefStore();
+ virtual void SetExtensionPrefStore(PrefStore* extension_pref_store);
virtual TemplateURLModel* GetTemplateURLModel();
virtual TemplateURLFetcher* GetTemplateURLFetcher();
virtual DownloadManager* GetDownloadManager();
@@ -168,8 +172,12 @@ class ProfileImpl : public Profile,
FilePath path_;
FilePath base_cache_path_;
+ scoped_ptr<PrefService> prefs_; // Keep this on top for destruction order
Aaron Boodman 2010/12/03 08:58:10 Scary comment is scary. What is causing the destru
battre (please use the other) 2010/12/03 19:32:58 Well, this is just playing save. The situation has
Aaron Boodman 2010/12/03 20:00:44 Sorry, I still don't understand. Can you clarify w
battre (please use the other) 2010/12/06 10:28:50 Maybe this comment is clearer: // Keep prefs_ on
Aaron Boodman 2010/12/06 18:20:56 I talked to a few people in this office about this
Mattias Nissler (ping if slow) 2010/12/06 19:29:50 I agree that relying on implicit destruction order
+ // because many other class members depend
+ // on it.
scoped_ptr<VisitedLinkEventListener> visited_link_event_listener_;
scoped_ptr<VisitedLinkMaster> visited_link_master_;
+ scoped_ptr<ExtensionPrefs> extension_prefs_;
scoped_refptr<ExtensionsService> extensions_service_;
scoped_refptr<UserScriptMaster> user_script_master_;
scoped_refptr<ExtensionDevToolsManager> extension_devtools_manager_;
@@ -182,7 +190,6 @@ class ProfileImpl : public Profile,
scoped_refptr<TransportSecurityPersister>
transport_security_persister_;
scoped_ptr<policy::ProfilePolicyContext> profile_policy_context_;
- scoped_ptr<PrefService> prefs_;
scoped_ptr<NetPrefObserver> net_pref_observer_;
scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
scoped_ptr<TemplateURLModel> template_url_model_;
@@ -276,6 +283,10 @@ class ProfileImpl : public Profile,
scoped_refptr<ExtensionInfoMap> extension_info_map_;
+ // weak pointer to ExtensionPrefStore that stores effective extension
+ // controlled preferences.
+ PrefStore* extension_pref_store_;
+
#if defined(OS_CHROMEOS)
scoped_ptr<chromeos::Preferences> chromeos_preferences_;

Powered by Google App Engine
This is Rietveld 408576698