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

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 and move v2 component app added in r169911 (and r170087) into background section in componen… 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
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 70cf33cdf5d8bdeae43f08931bc78ab055a24463..8fc0081163175bc4ae4f4bc70c7e36d578760a05 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -128,6 +128,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,
@@ -421,6 +423,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,
@@ -761,6 +769,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);
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698