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

Side by Side Diff: extensions/common/manifest.h

Issue 2738553002: [Extensions] Log instances of invalid extensions being added (Closed)
Patch Set: . Created 3 years, 9 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 | « chrome/test/data/extensions/api_test/developer/generated_output/hpiknbiabeeppbpihjehijgoemciehgk.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_MANIFEST_H_ 5 #ifndef EXTENSIONS_COMMON_MANIFEST_H_
6 #define EXTENSIONS_COMMON_MANIFEST_H_ 6 #define EXTENSIONS_COMMON_MANIFEST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return location == EXTERNAL_POLICY || 103 return location == EXTERNAL_POLICY ||
104 location == EXTERNAL_POLICY_DOWNLOAD; 104 location == EXTERNAL_POLICY_DOWNLOAD;
105 } 105 }
106 106
107 // Whether the |location| is an extension intended to be an internal part of 107 // Whether the |location| is an extension intended to be an internal part of
108 // Chrome. 108 // Chrome.
109 static inline bool IsComponentLocation(Location location) { 109 static inline bool IsComponentLocation(Location location) {
110 return location == COMPONENT || location == EXTERNAL_COMPONENT; 110 return location == COMPONENT || location == EXTERNAL_COMPONENT;
111 } 111 }
112 112
113 static inline bool IsValidLocation(Location location) {
114 return location > INVALID_LOCATION && location < NUM_LOCATIONS;
115 }
116
113 // Unpacked extensions start off with file access since they are a developer 117 // Unpacked extensions start off with file access since they are a developer
114 // feature. 118 // feature.
115 static inline bool ShouldAlwaysAllowFileAccess(Location location) { 119 static inline bool ShouldAlwaysAllowFileAccess(Location location) {
116 return IsUnpackedLocation(location); 120 return IsUnpackedLocation(location);
117 } 121 }
118 122
119 Manifest(Location location, std::unique_ptr<base::DictionaryValue> value); 123 Manifest(Location location, std::unique_ptr<base::DictionaryValue> value);
120 virtual ~Manifest(); 124 virtual ~Manifest();
121 125
122 const std::string& extension_id() const { return extension_id_; } 126 const std::string& extension_id() const { return extension_id_; }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 std::unique_ptr<base::DictionaryValue> value_; 198 std::unique_ptr<base::DictionaryValue> value_;
195 199
196 Type type_; 200 Type type_;
197 201
198 DISALLOW_COPY_AND_ASSIGN(Manifest); 202 DISALLOW_COPY_AND_ASSIGN(Manifest);
199 }; 203 };
200 204
201 } // namespace extensions 205 } // namespace extensions
202 206
203 #endif // EXTENSIONS_COMMON_MANIFEST_H_ 207 #endif // EXTENSIONS_COMMON_MANIFEST_H_
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/developer/generated_output/hpiknbiabeeppbpihjehijgoemciehgk.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698