Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 4f8d737abc6b039c7884c86612f9bff30b29bf50..f132a7a380ac8300a41f003abdf7137b096bdad5 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -130,6 +130,8 @@ class ExtensionServiceInterface : public syncer::SyncableService { |
virtual void CheckForUpdatesSoon() = 0; |
virtual void AddExtension(const extensions::Extension* extension) = 0; |
+ virtual void AddComponentExtension( |
+ const extensions::Extension* extension) = 0; |
virtual void UnloadExtension( |
const std::string& extension_id, |
@@ -423,6 +425,12 @@ class ExtensionService |
// been loaded from a file and installed. |
virtual void AddExtension(const extensions::Extension* extension) OVERRIDE; |
+ // Check if we have preferences for the component extension and, if not or if |
+ // the stored version differs, install the extension (without requirements |
+ // checking) before calling AddExtension. |
+ virtual void AddComponentExtension(const extensions::Extension* extension) |
+ OVERRIDE; |
+ |
// Called by the backend when an extension has been installed. |
void OnExtensionInstalled( |
const extensions::Extension* extension, |
@@ -762,6 +770,15 @@ class ExtensionService |
// terminated extensions if it is there. |
void UntrackTerminatedExtension(const std::string& id); |
+ // Update preferences for a new or updated extension; notify observers that |
+ // the extension is installed, e.g., to update event handlers on background |
+ // pages; and perform other extension install tasks before calling |
+ // AddExtension. |
+ void AddNewOrUpdatedExtension( |
+ const extensions::Extension* extension, |
+ const syncer::StringOrdinal& page_ordinal, |
+ extensions::Extension::State initial_state); |
+ |
// Handles sending notification that |extension| was loaded. |
void NotifyExtensionLoaded(const extensions::Extension* extension); |