Chromium Code Reviews| 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 712a2c147383460b50eb30b39036fcabc627b73c..305a99b1d2afc0b6821fb4f6759ac12d16ec35bc 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" |
| @@ -314,6 +315,12 @@ bool BackgroundApplicationListModel::IsBackgroundApp( |
| !RequiresBackgroundModeForPushMessaging(extension)) |
| return false; |
| + // By design, ephemeral apps cannot have background activity. This point can |
| + // be reached for platforms apps with the push messaging permission, so |
|
Dmitry Titov
2014/07/14 03:26:35
Also this can be reached by apps with "background'
tmdiep
2014/07/14 04:25:36
Thanks for the suggestion. I've moved the check up
|
| + // disallow if the app is ephemeral. |
| + if (extensions::util::IsEphemeralApp(extension.id(), profile)) |
| + return false; |
| + |
| // Extensions and packaged apps with background permission are always treated |
| // as background apps. |
| if (!extension.is_hosted_app()) |