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

Side by Side Diff: extensions/common/features/complex_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_COMPLEX_FEATURE_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
6 #define EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_ 6 #define EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 18 matching lines...) Expand all
29 29
30 // extensions::Feature: 30 // extensions::Feature:
31 Availability IsAvailableToManifest(const std::string& extension_id, 31 Availability IsAvailableToManifest(const std::string& extension_id,
32 Manifest::Type type, 32 Manifest::Type type,
33 Manifest::Location location, 33 Manifest::Location location,
34 int manifest_version, 34 int manifest_version,
35 Platform platform) const override; 35 Platform platform) const override;
36 36
37 Availability IsAvailableToContext(const Extension* extension, 37 Availability IsAvailableToContext(const Extension* extension,
38 Context context, 38 Context context,
39 SessionType session_type,
39 const GURL& url, 40 const GURL& url,
40 Platform platform) const override; 41 Platform platform) const override;
41 42
42 bool IsIdInBlacklist(const std::string& extension_id) const override; 43 bool IsIdInBlacklist(const std::string& extension_id) const override;
43 bool IsIdInWhitelist(const std::string& extension_id) const override; 44 bool IsIdInWhitelist(const std::string& extension_id) const override;
44 45
45 protected: 46 protected:
46 // Feature: 47 // Feature:
47 bool IsInternal() const override; 48 bool IsInternal() const override;
48 49
49 private: 50 private:
50 FRIEND_TEST_ALL_PREFIXES(FeaturesGenerationTest, FeaturesTest); 51 FRIEND_TEST_ALL_PREFIXES(FeaturesGenerationTest, FeaturesTest);
51 52
52 using FeatureList = std::vector<std::unique_ptr<Feature>>; 53 using FeatureList = std::vector<std::unique_ptr<Feature>>;
53 FeatureList features_; 54 FeatureList features_;
54 55
55 DISALLOW_COPY_AND_ASSIGN(ComplexFeature); 56 DISALLOW_COPY_AND_ASSIGN(ComplexFeature);
56 }; 57 };
57 58
58 } // namespace extensions 59 } // namespace extensions
59 60
60 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_ 61 #endif // EXTENSIONS_COMMON_FEATURES_COMPLEX_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698