OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CONSTANTS_H_ | 5 #ifndef EXTENSIONS_COMMON_CONSTANTS_H_ |
6 #define EXTENSIONS_COMMON_CONSTANTS_H_ | 6 #define EXTENSIONS_COMMON_CONSTANTS_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/strings/string16.h" | |
9 | 10 |
10 namespace extensions { | 11 namespace extensions { |
11 | 12 |
12 // Scheme we serve extension content from. | 13 // Scheme we serve extension content from. |
13 extern const char kExtensionScheme[]; | 14 extern const char kExtensionScheme[]; |
14 | 15 |
15 // The name of the manifest inside an extension. | 16 // The name of the manifest inside an extension. |
16 extern const base::FilePath::CharType kManifestFilename[]; | 17 extern const base::FilePath::CharType kManifestFilename[]; |
17 | 18 |
18 // The name of locale folder inside an extension. | 19 // The name of locale folder inside an extension. |
(...skipping 26 matching lines...) Expand all Loading... | |
45 | 46 |
46 // Path to imported modules. | 47 // Path to imported modules. |
47 extern const char kModulesDir[]; | 48 extern const char kModulesDir[]; |
48 | 49 |
49 // The file extension (.crx) for extensions. | 50 // The file extension (.crx) for extensions. |
50 extern const base::FilePath::CharType kExtensionFileExtension[]; | 51 extern const base::FilePath::CharType kExtensionFileExtension[]; |
51 | 52 |
52 // The file extension (.pem) for private key files. | 53 // The file extension (.pem) for private key files. |
53 extern const base::FilePath::CharType kExtensionKeyFileExtension[]; | 54 extern const base::FilePath::CharType kExtensionKeyFileExtension[]; |
54 | 55 |
56 // Determine whether or not a source came from an extension. |source| can link | |
57 // to a page or a script, and can be external (e.g., "http://www.google.com"), | |
58 // extension-related (e.g., "chrome-extension://<extension_id>/background.js"), | |
59 // or internal (e.g., "event_bindings" or "schemaUtils"). | |
60 bool IsSourceFromAnExtension(const base::string16& source); | |
Devlin
2013/08/23 19:47:07
Is there a better place for this?
Yoyo Zhou
2013/08/23 22:54:54
I'd start a new file, extension_urls.h.
Devlin
2013/08/23 23:44:30
Done. I'll try to move some stuff that makes sense
| |
61 | |
55 } // namespace extensions | 62 } // namespace extensions |
56 | 63 |
57 #endif // EXTENSIONS_COMMON_CONSTANTS_H_ | 64 #endif // EXTENSIONS_COMMON_CONSTANTS_H_ |
OLD | NEW |