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 CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 #if defined(OS_WIN) | 171 #if defined(OS_WIN) |
172 static const char kExtensionRegistryPath[]; | 172 static const char kExtensionRegistryPath[]; |
173 #endif | 173 #endif |
174 | 174 |
175 // The mimetype used for extensions. | 175 // The mimetype used for extensions. |
176 static const char kMimeType[]; | 176 static const char kMimeType[]; |
177 | 177 |
178 // Checks to see if the extension has a valid ID. | 178 // Checks to see if the extension has a valid ID. |
179 static bool IdIsValid(const std::string& id); | 179 static bool IdIsValid(const std::string& id); |
180 | 180 |
181 // Returns true if the specified file is an extension. | |
182 static bool IsExtension(const base::FilePath& file_name); | |
183 | |
184 // See Type definition in Manifest. | 181 // See Type definition in Manifest. |
185 Manifest::Type GetType() const; | 182 Manifest::Type GetType() const; |
186 | 183 |
187 // Returns an absolute url to a resource inside of an extension. The | 184 // Returns an absolute url to a resource inside of an extension. The |
188 // |extension_url| argument should be the url() from an Extension object. The | 185 // |extension_url| argument should be the url() from an Extension object. The |
189 // |relative_path| can be untrusted user input. The returned URL will either | 186 // |relative_path| can be untrusted user input. The returned URL will either |
190 // be invalid() or a child of |extension_url|. | 187 // be invalid() or a child of |extension_url|. |
191 // NOTE: Static so that it can be used from multiple threads. | 188 // NOTE: Static so that it can be used from multiple threads. |
192 static GURL GetResourceURL(const GURL& extension_url, | 189 static GURL GetResourceURL(const GURL& extension_url, |
193 const std::string& relative_path); | 190 const std::string& relative_path); |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 513 |
517 UpdatedExtensionPermissionsInfo( | 514 UpdatedExtensionPermissionsInfo( |
518 const Extension* extension, | 515 const Extension* extension, |
519 const PermissionSet* permissions, | 516 const PermissionSet* permissions, |
520 Reason reason); | 517 Reason reason); |
521 }; | 518 }; |
522 | 519 |
523 } // namespace extensions | 520 } // namespace extensions |
524 | 521 |
525 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 522 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |