OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_EXTENSION_H_ | 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_ |
6 #define EXTENSIONS_COMMON_EXTENSION_H_ | 6 #define EXTENSIONS_COMMON_EXTENSION_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Valid schemes for web extent URLPatterns. | 196 // Valid schemes for web extent URLPatterns. |
197 static const int kValidWebExtentSchemes; | 197 static const int kValidWebExtentSchemes; |
198 | 198 |
199 // Valid schemes for host permission URLPatterns. | 199 // Valid schemes for host permission URLPatterns. |
200 static const int kValidHostPermissionSchemes; | 200 static const int kValidHostPermissionSchemes; |
201 | 201 |
202 // The mimetype used for extensions. | 202 // The mimetype used for extensions. |
203 static const char kMimeType[]; | 203 static const char kMimeType[]; |
204 | 204 |
205 // Checks to see if the extension has a valid ID. | |
206 static bool IdIsValid(const std::string& id); | |
207 | |
208 // See Type definition in Manifest. | 205 // See Type definition in Manifest. |
209 Manifest::Type GetType() const; | 206 Manifest::Type GetType() const; |
210 | 207 |
211 // Returns an absolute url to a resource inside of an extension. The | 208 // Returns an absolute url to a resource inside of an extension. The |
212 // |extension_url| argument should be the url() from an Extension object. The | 209 // |extension_url| argument should be the url() from an Extension object. The |
213 // |relative_path| can be untrusted user input. The returned URL will either | 210 // |relative_path| can be untrusted user input. The returned URL will either |
214 // be invalid() or a child of |extension_url|. | 211 // be invalid() or a child of |extension_url|. |
215 // NOTE: Static so that it can be used from multiple threads. | 212 // NOTE: Static so that it can be used from multiple threads. |
216 static GURL GetResourceURL(const GURL& extension_url, | 213 static GURL GetResourceURL(const GURL& extension_url, |
217 const std::string& relative_path); | 214 const std::string& relative_path); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
567 | 564 |
568 UpdatedExtensionPermissionsInfo( | 565 UpdatedExtensionPermissionsInfo( |
569 const Extension* extension, | 566 const Extension* extension, |
570 const PermissionSet* permissions, | 567 const PermissionSet* permissions, |
571 Reason reason); | 568 Reason reason); |
572 }; | 569 }; |
573 | 570 |
574 } // namespace extensions | 571 } // namespace extensions |
575 | 572 |
576 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 573 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
OLD | NEW |