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

Unified Diff: chrome/browser/extensions/extension_service.h

Issue 11275069: Perform install tasks for newly installed or upgraded component apps/extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: various fixes Created 8 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/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);

Powered by Google App Engine
This is Rietveld 408576698