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

Side by Side Diff: extensions/common/features/permission_feature.h

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out some stuff Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_
6 #define EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_ 6 #define EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "extensions/common/features/simple_feature.h" 10 #include "extensions/common/features/simple_feature.h"
11 11
12 namespace extensions { 12 namespace extensions {
13 13
14 class PermissionFeature : public SimpleFeature { 14 class PermissionFeature : public SimpleFeature {
15 public: 15 public:
16 PermissionFeature(); 16 PermissionFeature();
17 ~PermissionFeature() override; 17 ~PermissionFeature() override;
18 18
19 Feature::Availability IsAvailableToContext( 19 Feature::Availability IsAvailableToContext(
20 const Extension* extension, 20 const Extension* extension,
21 Feature::Context context, 21 Feature::Context context,
22 Feature::SessionType session_type,
22 const GURL& url, 23 const GURL& url,
23 Feature::Platform platform) const override; 24 Feature::Platform platform) const override;
24 bool Validate(std::string* error) override; 25 bool Validate(std::string* error) override;
25 }; 26 };
26 27
27 } // namespace extensions 28 } // namespace extensions
28 29
29 #endif // EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_ 30 #endif // EXTENSIONS_COMMON_FEATURES_PERMISSION_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698