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

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

Issue 156153005: [Hotword, Extensions] Removing EXTERNAL_COMPONENT from IsPolicyLocation, adding a function to check… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: responding to comments Created 6 years, 10 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 | Annotate | Revision Log
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 <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 static inline bool IsAutoUpdateableLocation(Location location) { 89 static inline bool IsAutoUpdateableLocation(Location location) {
90 // Only internal and external extensions can be autoupdated. 90 // Only internal and external extensions can be autoupdated.
91 return location == INTERNAL || 91 return location == INTERNAL ||
92 IsExternalLocation(location); 92 IsExternalLocation(location);
93 } 93 }
94 94
95 // Whether the |location| is a source of extensions force-installed through 95 // Whether the |location| is a source of extensions force-installed through
96 // policy. 96 // policy.
97 static inline bool IsPolicyLocation(Location location) { 97 static inline bool IsPolicyLocation(Location location) {
98 return location == EXTERNAL_POLICY || 98 return location == EXTERNAL_POLICY ||
99 location == EXTERNAL_POLICY_DOWNLOAD || 99 location == EXTERNAL_POLICY_DOWNLOAD;
100 location == EXTERNAL_COMPONENT; 100 }
101
102 // Whether the |location| is an extension intended to be an internal part of
103 // Chrome.
104 static inline bool IsComponentLocation(Location location) {
105 return location == COMPONENT || location == EXTERNAL_COMPONENT;
101 } 106 }
102 107
103 // Unpacked extensions start off with file access since they are a developer 108 // Unpacked extensions start off with file access since they are a developer
104 // feature. 109 // feature.
105 static inline bool ShouldAlwaysAllowFileAccess(Location location) { 110 static inline bool ShouldAlwaysAllowFileAccess(Location location) {
106 return IsUnpackedLocation(location); 111 return IsUnpackedLocation(location);
107 } 112 }
108 113
109 Manifest(Location location, scoped_ptr<base::DictionaryValue> value); 114 Manifest(Location location, scoped_ptr<base::DictionaryValue> value);
110 virtual ~Manifest(); 115 virtual ~Manifest();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 scoped_ptr<base::DictionaryValue> value_; 189 scoped_ptr<base::DictionaryValue> value_;
185 190
186 Type type_; 191 Type type_;
187 192
188 DISALLOW_COPY_AND_ASSIGN(Manifest); 193 DISALLOW_COPY_AND_ASSIGN(Manifest);
189 }; 194 };
190 195
191 } // namespace extensions 196 } // namespace extensions
192 197
193 #endif // EXTENSIONS_COMMON_MANIFEST_H_ 198 #endif // EXTENSIONS_COMMON_MANIFEST_H_
OLDNEW
« chrome/browser/extensions/extension_service.cc ('K') | « extensions/common/extension.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698