Index: chrome/browser/profiles/profile.h |
=================================================================== |
--- chrome/browser/profiles/profile.h (revision 124830) |
+++ chrome/browser/profiles/profile.h (working copy) |
@@ -15,6 +15,7 @@ |
#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; |
@@ -22,8 +23,10 @@ |
class ChromeAppCacheService; |
class ChromeURLDataManager; |
class Extension; |
+class ExtensionDevToolsManager; |
class ExtensionEventRouter; |
-class ExtensionPrefValueMap; |
+class ExtensionInfoMap; |
+class ExtensionMessageService; |
class ExtensionProcessManager; |
class ExtensionService; |
class ExtensionSpecialStoragePolicy; |
@@ -216,32 +219,28 @@ |
// 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; |
- // DEPRECATED. Instead, use ExtensionSystemFactory::process_manager(). |
+ // Retrieves a pointer to the ExtensionDevToolsManager associated with this |
+ // profile. The instance is created at startup. |
+ virtual ExtensionDevToolsManager* GetExtensionDevToolsManager() = 0; |
+ |
// 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; |
- // DEPRECATED. Instead, use ExtensionSystemFactory::event_router(). |
+ // Retrieves a pointer to the ExtensionMessageService associated with this |
+ // profile. The instance is created at startup. |
+ virtual ExtensionMessageService* GetExtensionMessageService() = 0; |
+ |
// 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. |
@@ -331,6 +330,21 @@ |
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; |
@@ -367,6 +381,11 @@ |
// 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; |
@@ -378,6 +397,9 @@ |
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; |