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

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

Issue 314113010: Remove deprecated permissions functions from Extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/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 9969a8f4749ff0708567e0fda7af3ad148cec1df..1c65a31392a068723501ff1dd0096586f68cce7c 100644
--- a/chrome/browser/background/background_application_list_model.cc
+++ b/chrome/browser/background/background_application_list_model.cc
@@ -33,6 +33,7 @@
#include "extensions/common/manifest_handlers/background_info.h"
#include "extensions/common/manifest_handlers/icons_handler.h"
#include "extensions/common/permissions/permission_set.h"
+#include "extensions/common/permissions/permissions_data.h"
#include "ui/base/l10n/l10n_util_collator.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia.h"
@@ -277,8 +278,10 @@ int BackgroundApplicationListModel::GetPosition(
bool BackgroundApplicationListModel::RequiresBackgroundModeForPushMessaging(
const Extension& extension) {
// No PushMessaging permission - does not require the background mode.
- if (!extension.HasAPIPermission(APIPermission::kPushMessaging))
+ if (!extension.permissions_data()->HasAPIPermission(
+ APIPermission::kPushMessaging)) {
return false;
+ }
// If in the whitelist, then does not require background mode even if
// uses push messaging.
@@ -306,7 +309,8 @@ bool BackgroundApplicationListModel::IsBackgroundApp(
// Not a background app if we don't have the background permission or
// the push messaging permission
- if (!extension.HasAPIPermission(APIPermission::kBackground) &&
+ if (!extension.permissions_data()->HasAPIPermission(
+ APIPermission::kBackground) &&
!RequiresBackgroundModeForPushMessaging(extension))
return false;
« no previous file with comments | « apps/saved_files_service.cc ('k') | chrome/browser/background/background_application_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698