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

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

Issue 1047943002: Cache --whitelisted-extension-id in SimpleFeature. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_SIMPLE_FEATURE_H_ 5 #ifndef EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_
6 #define EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ 6 #define EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const GURL& url) const; 132 const GURL& url) const;
133 Availability CreateAvailability(AvailabilityResult result, 133 Availability CreateAvailability(AvailabilityResult result,
134 Context context) const; 134 Context context) const;
135 135
136 private: 136 private:
137 bool MatchesManifestLocation(Manifest::Location manifest_location) const; 137 bool MatchesManifestLocation(Manifest::Location manifest_location) const;
138 138
139 Availability CheckDependencies( 139 Availability CheckDependencies(
140 const base::Callback<Availability(const Feature*)>& checker) const; 140 const base::Callback<Availability(const Feature*)>& checker) const;
141 141
142 // A singleton copy of the --whitelisted-extension-id so that we don't need to
143 // copy it from the CommandLine each time.
144 static const std::string& whitelisted_extension_id();
145 static std::string* whitelisted_extension_id_;
tapted 2015/03/31 03:26:49 this isn't needed (see below)
jackhou1 2015/03/31 04:37:45 Done.
146
142 // For clarity and consistency, we handle the default value of each of these 147 // For clarity and consistency, we handle the default value of each of these
143 // members the same way: it matches everything. It is up to the higher level 148 // members the same way: it matches everything. It is up to the higher level
144 // code that reads Features out of static data to validate that data and set 149 // code that reads Features out of static data to validate that data and set
145 // sensible defaults. 150 // sensible defaults.
146 std::set<std::string> blacklist_; 151 std::set<std::string> blacklist_;
147 std::set<std::string> whitelist_; 152 std::set<std::string> whitelist_;
148 std::set<std::string> dependencies_; 153 std::set<std::string> dependencies_;
149 std::set<Manifest::Type> extension_types_; 154 std::set<Manifest::Type> extension_types_;
150 std::set<Context> contexts_; 155 std::set<Context> contexts_;
151 URLPatternSet matches_; 156 URLPatternSet matches_;
152 Location location_; 157 Location location_;
153 std::set<Platform> platforms_; 158 std::set<Platform> platforms_;
154 int min_manifest_version_; 159 int min_manifest_version_;
155 int max_manifest_version_; 160 int max_manifest_version_;
156 bool component_extensions_auto_granted_; 161 bool component_extensions_auto_granted_;
157 std::string command_line_switch_; 162 std::string command_line_switch_;
158 163
159 ScopedVector<SimpleFeatureFilter> filters_;; 164 ScopedVector<SimpleFeatureFilter> filters_;;
160 165
161 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); 166 DISALLOW_COPY_AND_ASSIGN(SimpleFeature);
162 }; 167 };
163 168
164 } // namespace extensions 169 } // namespace extensions
165 170
166 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ 171 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/common/features/simple_feature.cc » ('j') | extensions/common/features/simple_feature.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698