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

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: 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..99f0eb3e8207c54d0ad02f486051dd018777595e 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -291,7 +291,15 @@ 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 being installed permanently. Ephemeral apps
+ // are already installed in extension system (albiet transiently) and only
+ // need to be exposed in the UI. Set |user_acknowledged| to true if the
+ // install was confirmed via a dialog, otherwise set to false (for example,
+ // if the install was initiated via sync).
+ void InstallEphemeralApp(
+ const extensions::Extension* extension, bool user_acknowledged);
benwells 2014/05/27 01:42:56 Can this be InstallEphemeralAppPermanently? The na
tmdiep 2014/05/27 01:58:54 Yeah, I originally had "InstallEphemeralAppPermane
tmdiep 2014/05/27 07:46:05 Changed to PromoteEphemeralApp, and user_acknowled
// 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 +437,7 @@ class ExtensionService
}
void FinishInstallationForTest(const extensions::Extension* extension) {
- FinishInstallation(extension);
+ FinishInstallation(extension, false);
}
#endif
@@ -502,7 +510,8 @@ class ExtensionService
extensions::UnloadedExtensionInfo::Reason reason);
// Common helper to finish installing the given extension.
- void FinishInstallation(const extensions::Extension* extension);
+ void FinishInstallation(const extensions::Extension* extension,
+ bool was_ephemeral);
benwells 2014/05/27 01:42:56 What is |was_ephemeral| if it wasn't installed at
tmdiep 2014/05/27 01:58:54 It should be false. I'll add a comment.
// Updates the |extension|'s active permission set to include only permissions
// currently requested by the extension and all the permissions required by

Powered by Google App Engine
This is Rietveld 408576698