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

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: rebase required due to r169770 (extension_service.cc) and r169694 (component_loader.cc) 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 6aa659d315739e267089c22f799d5fb75d72f95d..f1546b6f1fc992e2728b02fdf9964a868231f797 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,
@@ -763,6 +771,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