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

Unified Diff: chrome/browser/apps/ephemeral_app_launcher.cc

Issue 344543006: Disable ephemeral apps after they stop running (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Prevent demotion of installed app due to race condition Created 6 years, 6 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/apps/ephemeral_app_launcher.cc
diff --git a/chrome/browser/apps/ephemeral_app_launcher.cc b/chrome/browser/apps/ephemeral_app_launcher.cc
index 92f7bd81ae5f87b73c53a8d4a7a21b2850661a49..78e2ec55be10a3e889db30fc80fc90a2beb1684e 100644
--- a/chrome/browser/apps/ephemeral_app_launcher.cc
+++ b/chrome/browser/apps/ephemeral_app_launcher.cc
@@ -224,17 +224,17 @@ bool EphemeralAppLauncher::CanLaunchInstalledApp(
}
void EphemeralAppLauncher::EnableInstalledApp(const Extension* extension) {
+ // Keep this object alive until the enable flow is complete. Either
+ // ExtensionEnableFlowFinished() or ExtensionEnableFlowAborted() will be
+ // called.
+ AddRef();
+
extension_enable_flow_.reset(
new ExtensionEnableFlow(profile(), extension->id(), this));
if (web_contents())
extension_enable_flow_->StartForWebContents(web_contents());
else
extension_enable_flow_->StartForNativeWindow(parent_window_);
-
- // Keep this object alive until the enable flow is complete. Either
- // ExtensionEnableFlowFinished() or ExtensionEnableFlowAborted() will be
- // called.
- AddRef();
}
void EphemeralAppLauncher::MaybeLaunchApp() {

Powered by Google App Engine
This is Rietveld 408576698