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

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: Address comments. 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
« no previous file with comments | « no previous file | extensions/common/features/simple_feature.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 static bool IsIdInList(const std::string& extension_id, 167 static bool IsIdInList(const std::string& extension_id,
168 const std::vector<std::string>& list); 168 const std::vector<std::string>& list);
169 169
170 bool MatchesManifestLocation(Manifest::Location manifest_location) const; 170 bool MatchesManifestLocation(Manifest::Location manifest_location) const;
171 171
172 Availability CheckDependencies( 172 Availability CheckDependencies(
173 const base::Callback<Availability(const Feature*)>& checker) const; 173 const base::Callback<Availability(const Feature*)>& checker) const;
174 174
175 static bool IsValidExtensionId(const std::string& extension_id); 175 static bool IsValidExtensionId(const std::string& extension_id);
176 176
177 static bool IsWhitelistedByCommandLine(const std::string& extension_id);
tapted 2015/03/31 05:43:30 dunno why I didn't see this before... but I think
jackhou1 2015/03/31 05:56:12 Nah, I should have noticed it too, sorry.
178
177 // For clarity and consistency, we handle the default value of each of these 179 // For clarity and consistency, we handle the default value of each of these
178 // members the same way: it matches everything. It is up to the higher level 180 // members the same way: it matches everything. It is up to the higher level
179 // code that reads Features out of static data to validate that data and set 181 // code that reads Features out of static data to validate that data and set
180 // sensible defaults. 182 // sensible defaults.
181 std::vector<std::string> blacklist_; 183 std::vector<std::string> blacklist_;
182 std::vector<std::string> whitelist_; 184 std::vector<std::string> whitelist_;
183 std::vector<std::string> dependencies_; 185 std::vector<std::string> dependencies_;
184 std::vector<Manifest::Type> extension_types_; 186 std::vector<Manifest::Type> extension_types_;
185 std::vector<Context> contexts_; 187 std::vector<Context> contexts_;
186 std::vector<Platform> platforms_; 188 std::vector<Platform> platforms_;
187 URLPatternSet matches_; 189 URLPatternSet matches_;
188 Location location_; 190 Location location_;
189 int min_manifest_version_; 191 int min_manifest_version_;
190 int max_manifest_version_; 192 int max_manifest_version_;
191 bool component_extensions_auto_granted_; 193 bool component_extensions_auto_granted_;
192 std::string command_line_switch_; 194 std::string command_line_switch_;
193 195
194 ScopedVector<SimpleFeatureFilter> filters_;; 196 ScopedVector<SimpleFeatureFilter> filters_;;
195 197
196 DISALLOW_COPY_AND_ASSIGN(SimpleFeature); 198 DISALLOW_COPY_AND_ASSIGN(SimpleFeature);
197 }; 199 };
198 200
199 } // namespace extensions 201 } // namespace extensions
200 202
201 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_ 203 #endif // EXTENSIONS_COMMON_FEATURES_SIMPLE_FEATURE_H_
OLDNEW
« no previous file with comments | « no previous file | extensions/common/features/simple_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698