Chromium Code Reviews

Unified Diff: chrome/browser/extensions/extensions_service.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: Same patch but without stuff that is already included in 5204006 Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « chrome/browser/extensions/extension_proxy_api.cc ('k') | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.h
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index c8310392643e35d80b1080ea538ff231283f4a68..8bbdbcdd0c33279455374c23d2f6d6b27dee3771 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -39,7 +39,6 @@ class ExtensionsServiceBackend;
class ExtensionToolbarModel;
class ExtensionUpdater;
class GURL;
-class PrefService;
class Profile;
class Version;
@@ -148,9 +147,12 @@ class ExtensionsService
static bool UninstallExtensionHelper(ExtensionsService* extensions_service,
const std::string& extension_id);
+ // Constructor stores pointers to |profile| and |extension_prefs| but
+ // ownership remains at caller.
ExtensionsService(Profile* profile,
const CommandLine* command_line,
const FilePath& install_directory,
+ ExtensionPrefs* extension_prefs,
bool autoupdate_enabled);
// Gets the list of currently installed extensions.
@@ -402,7 +404,7 @@ class ExtensionsService
// it.
void DestroyingProfile();
- ExtensionPrefs* extension_prefs() { return extension_prefs_.get(); }
+ ExtensionPrefs* extension_prefs() { return extension_prefs_; }
// Whether the extension service is ready.
// TODO(skerner): Get rid of this method. crbug.com/63756
@@ -505,8 +507,8 @@ class ExtensionsService
// The profile this ExtensionsService is part of.
Profile* profile_;
- // Preferences for the owning profile.
- scoped_ptr<ExtensionPrefs> extension_prefs_;
+ // Preferences for the owning profile (weak reference).
+ ExtensionPrefs* extension_prefs_;
// The current list of installed extensions.
ExtensionList extensions_;
« no previous file with comments | « chrome/browser/extensions/extension_proxy_api.cc ('k') | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine