summaryrefslogtreecommitdiffstats
path: root/chrome/browser/background
diff options
context:
space:
mode:
authorpetewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 02:47:59 +0000
committerpetewil@chromium.org <petewil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 02:47:59 +0000
commit4e22e895869c4c1cf420b4a2fe68c6551e42113d (patch)
treeb267ba027865d2cd15a0b6eea99b713a8c1a892d /chrome/browser/background
parent6b828ce1a7a9c58441184f67b82b6500123bbe54 (diff)
downloadchromium_src-4e22e895869c4c1cf420b4a2fe68c6551e42113d.zip
chromium_src-4e22e895869c4c1cf420b4a2fe68c6551e42113d.tar.gz
chromium_src-4e22e895869c4c1cf420b4a2fe68c6551e42113d.tar.bz2
We're building a new push messaging system to send messages to chrome apps which may or may not be running. If they are not running, we will start them and then deliver the message. However, that only works if Chrome is already running.
If any installed app has push messaging permission, then this change will background launch Chrome when we boot the OS so that Chrome is available to deliver the push messages, the same way we do today with background apps. Also, note that just like background apps, if the user exits Chrome intentionally that we don't keep it running Andrew, please let me know if there is a better reviewer BUG=144690 Review URL: https://chromiumcodereview.appspot.com/10887032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156215 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/background')
-rw-r--r--chrome/browser/background/background_application_list_model.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/background/background_application_list_model.cc b/chrome/browser/background/background_application_list_model.cc
index 08b6d1c..e0c6010 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -277,8 +277,10 @@ bool BackgroundApplicationListModel::IsBackgroundApp(
// 2) It is a hosted app, and has a background contents registered or in the
// manifest.
- // Not a background app if we don't have the background permission.
- if (!extension.HasAPIPermission(APIPermission::kBackground))
+ // Not a background app if we don't have the background permission or
+ // the push messaging permission
+ if (!extension.HasAPIPermission(APIPermission::kBackground) &&
+ !extension.HasAPIPermission(APIPermission::kPushMessaging) )
return false;
// Extensions and packaged apps with background permission are always treated