From 4e22e895869c4c1cf420b4a2fe68c6551e42113d Mon Sep 17 00:00:00 2001 From: "petewil@chromium.org" Date: Wed, 12 Sep 2012 02:47:59 +0000 Subject: 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 --- chrome/browser/background/background_application_list_model.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chrome/browser/background') 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 -- cgit v1.1