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

Unified Diff: chrome/browser/background/background_application_list_model.cc

Issue 383113002: Ephemeral apps should not trigger Chrome background mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Add extra test for the balloon Created 6 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/background/background_application_list_model.cc
diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc
index a7c3a5adff13e54e5c1898415ea9d901c0d06b72..7945c4fb47ba99b807b824143e9c6109a5e41dac 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -25,6 +25,7 @@
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/extension_util.h"
#include "extensions/browser/image_loader.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -310,6 +311,11 @@ bool BackgroundApplicationListModel::IsBackgroundApp(
// 2) It is a hosted app, and has a background contents registered or in the
// manifest.
+ // Ephemeral apps are denied any background activity after their event page
+ // has been destroyed, thus they cannot be background apps.
+ if (extensions::util::IsEphemeralApp(extension.id(), profile))
+ return false;
+
// Not a background app if we don't have the background permission or
// the push messaging permission
if (!extension.permissions_data()->HasAPIPermission(
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698