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

Unified Diff: chrome/browser/profiles/profile.h

Issue 9369013: Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rerebase Created 8 years, 10 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.h
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 740785343deffbf93e7716817cf5e533ec80a483..2d634ebc1ef94032b779166c787f9edaf874fe7e 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -15,7 +15,6 @@
#include "base/logging.h"
#include "chrome/browser/net/preconnect.h" // TODO: remove this.
#include "chrome/browser/net/pref_proxy_config_tracker.h"
-#include "chrome/common/extensions/extension_constants.h"
#include "content/public/browser/browser_context.h"
class AutocompleteClassifier;
@@ -23,10 +22,8 @@ class BookmarkModel;
class ChromeAppCacheService;
class ChromeURLDataManager;
class Extension;
-class ExtensionDevToolsManager;
class ExtensionEventRouter;
-class ExtensionInfoMap;
-class ExtensionMessageService;
+class ExtensionPrefValueMap;
class ExtensionProcessManager;
class ExtensionService;
class ExtensionSpecialStoragePolicy;
@@ -219,28 +216,32 @@ class Profile : public content::BrowserContext {
// that this method is called.
virtual VisitedLinkMaster* GetVisitedLinkMaster() = 0;
+ // Accessor. The instance is created upon first access.
+ // TODO(yoz): make this a ProfileKeyedService.
+ virtual ExtensionPrefValueMap* GetExtensionPrefValueMap() = 0;
+
+ // DEPRECATED. Instead, use ExtensionSystemFactory::extension_service().
// Retrieves a pointer to the ExtensionService associated with this
// profile. The ExtensionService is created at startup.
+ // TODO(yoz): remove this accessor (bug 104095).
virtual ExtensionService* GetExtensionService() = 0;
+ // DEPRECATED. Instead, use ExtensionSystemFactory::user_script_master().
// Retrieves a pointer to the UserScriptMaster associated with this
// profile. The UserScriptMaster is lazily created the first time
// that this method is called.
+ // TODO(yoz): remove this accessor (bug 104095).
virtual UserScriptMaster* GetUserScriptMaster() = 0;
- // Retrieves a pointer to the ExtensionDevToolsManager associated with this
- // profile. The instance is created at startup.
- virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() = 0;
-
+ // DEPRECATED. Instead, use ExtensionSystemFactory::process_manager().
// Retrieves a pointer to the ExtensionProcessManager associated with this
// profile. The instance is created at startup.
+ // TODO(yoz): remove this accessor (bug 104095).
virtual ExtensionProcessManager* GetExtensionProcessManager() = 0;
- // Retrieves a pointer to the ExtensionMessageService associated with this
- // profile. The instance is created at startup.
- virtual ExtensionMessageService* GetExtensionMessageService() = 0;
-
+ // DEPRECATED. Instead, use ExtensionSystemFactory::event_router().
// Accessor. The instance is created at startup.
+ // TODO(yoz): remove this accessor (bug 104095).
virtual ExtensionEventRouter* GetExtensionEventRouter() = 0;
// Accessor. The instance is created upon first access.
@@ -330,21 +331,6 @@ class Profile : public content::BrowserContext {
virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp(
const std::string& app_id) = 0;
- // Called by the ExtensionService that lives in this profile. Gives the
- // profile a chance to react to the load event before the EXTENSION_LOADED
- // notification has fired. The purpose for handling this event first is to
- // avoid race conditions by making sure URLRequestContexts learn about new
- // extensions before anything else needs them to know.
- virtual void RegisterExtensionWithRequestContexts(
- const Extension* extension) {}
-
- // Called by the ExtensionService that lives in this profile. Lets the
- // profile clean up its RequestContexts once all the listeners to the
- // EXTENSION_UNLOADED notification have finished running.
- virtual void UnregisterExtensionWithRequestContexts(
- const std::string& extension_id,
- const extension_misc::UnloadedExtensionReason) {}
-
// Returns the SSLConfigService for this profile.
virtual net::SSLConfigService* GetSSLConfigService() = 0;
@@ -381,11 +367,6 @@ class Profile : public content::BrowserContext {
// that it can be invoked when the user logs out/powers down (WM_ENDSESSION).
virtual void MarkAsCleanShutdown() = 0;
- // Initializes extensions machinery.
- // Component extensions are always enabled, external and user extensions
- // are controlled by |extensions_enabled|.
- virtual void InitExtensions(bool extensions_enabled) = 0;
-
// Start up service that gathers data from a promo resource feed.
virtual void InitPromoResources() = 0;
@@ -397,9 +378,6 @@ class Profile : public content::BrowserContext {
virtual FilePath last_selected_directory() = 0;
virtual void set_last_selected_directory(const FilePath& path) = 0;
- // Returns the IO-thread-accessible profile data for this profile.
- virtual ExtensionInfoMap* GetExtensionInfoMap() = 0;
-
// Returns the PromoCounter for Instant, or NULL if not applicable.
virtual PromoCounter* GetInstantPromoCounter() = 0;
« no previous file with comments | « chrome/browser/profiles/off_the_record_profile_impl_unittest.cc ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698