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

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

Issue 297263003: Optimize promotion of ephemeral apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 months 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 b0c38442aa61a0bd4392bd871c7c09a8e589d94f..5688f4ca8a30bba95a84d1da22ac9e14bdc08d1a 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -291,7 +291,14 @@ class ExtensionService
// when installation of that extension was previously delayed because the
// extension was in use.
virtual void FinishDelayedInstallation(
- const std::string& extension_id) OVERRIDE;
+ const std::string& extension_id) OVERRIDE;
+
+ // Promotes an ephemeral app to a regular installed app. Ephemeral apps
+ // are already installed in extension system (albiet transiently) and only
+ // need to be exposed in the UI. Set |is_from_sync| to true if the
+ // install was initiated via sync.
+ void PromoteEphemeralApp(
+ const extensions::Extension* extension, bool is_from_sync);
// Returns an update for an extension with the specified id, if installation
// of that update was previously delayed because the extension was in use. If
@@ -429,7 +436,7 @@ class ExtensionService
}
void FinishInstallationForTest(const extensions::Extension* extension) {
- FinishInstallation(extension);
+ FinishInstallation(extension, false);
}
#endif
@@ -501,8 +508,10 @@ class ExtensionService
const extensions::Extension* extension,
extensions::UnloadedExtensionInfo::Reason reason);
- // Common helper to finish installing the given extension.
- void FinishInstallation(const extensions::Extension* extension);
+ // Common helper to finish installing the given extension. |was_ephemeral|
+ // should be true if the extension was previously installed and ephemeral.
+ void FinishInstallation(const extensions::Extension* extension,
+ bool was_ephemeral);
// Updates the |extension|'s active permission set to include only permissions
// currently requested by the extension and all the permissions required by
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698