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

Side by Side Diff: chrome/common/extensions/features/permission_feature.cc

Issue 10675007: Move each permission classes to its own files in extensions/permissions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase again Created 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/features/permission_feature.h" 5 #include "chrome/common/extensions/features/permission_feature.h"
6 6
7 #include "chrome/common/extensions/extension_permission_set.h"
8
9 namespace extensions { 7 namespace extensions {
10 8
11 PermissionFeature::PermissionFeature() { 9 PermissionFeature::PermissionFeature() {
12 } 10 }
13 11
14 PermissionFeature::~PermissionFeature() { 12 PermissionFeature::~PermissionFeature() {
15 } 13 }
16 14
17 Feature::Availability PermissionFeature::IsAvailableToContext( 15 Feature::Availability PermissionFeature::IsAvailableToContext(
18 const Extension* extension, 16 const Extension* extension,
19 Feature::Context context, 17 Feature::Context context,
20 Feature::Platform platform) const { 18 Feature::Platform platform) const {
21 Availability availability = Feature::IsAvailableToContext(extension, 19 Availability availability = Feature::IsAvailableToContext(extension,
22 context, 20 context,
23 platform); 21 platform);
24 if (availability != IS_AVAILABLE) 22 if (availability != IS_AVAILABLE)
25 return availability; 23 return availability;
26 24
27 if (!extension->HasAPIPermission(name())) 25 if (!extension->HasAPIPermission(name()))
28 return NOT_PRESENT; 26 return NOT_PRESENT;
29 27
30 return IS_AVAILABLE; 28 return IS_AVAILABLE;
31 } 29 }
32 30
33 } // namespace 31 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698