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 #include "base/files/file_path.h" |
5 #include "extensions/common/constants.h" | 6 #include "extensions/common/constants.h" |
6 | 7 |
7 namespace extensions { | 8 namespace extensions { |
8 | 9 |
9 const char kExtensionScheme[] = "chrome-extension"; | 10 const char kExtensionScheme[] = "chrome-extension"; |
10 | 11 |
| 12 namespace filenames { |
| 13 |
11 const base::FilePath::CharType kManifestFilename[] = | 14 const base::FilePath::CharType kManifestFilename[] = |
12 FILE_PATH_LITERAL("manifest.json"); | 15 FILE_PATH_LITERAL("manifest.json"); |
13 const base::FilePath::CharType kLocaleFolder[] = | 16 const base::FilePath::CharType kLocaleFolder[] = |
14 FILE_PATH_LITERAL("_locales"); | 17 FILE_PATH_LITERAL("_locales"); |
15 const base::FilePath::CharType kMessagesFilename[] = | 18 const base::FilePath::CharType kMessagesFilename[] = |
16 FILE_PATH_LITERAL("messages.json"); | 19 FILE_PATH_LITERAL("messages.json"); |
17 const base::FilePath::CharType kPlatformSpecificFolder[] = | 20 const base::FilePath::CharType kPlatformSpecificFolder[] = |
18 FILE_PATH_LITERAL("_platform_specific"); | 21 FILE_PATH_LITERAL("_platform_specific"); |
19 | 22 |
20 const char kInstallDirectoryName[] = "Extensions"; | 23 const char kInstallDirectoryName[] = "Extensions"; |
21 | 24 |
22 } // namespace extensions | 25 const char kTempExtensionName[] = "CRX_INSTALL"; |
| 26 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; |
| 27 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; |
| 28 const char kGeneratedBackgroundPageFilename[] = |
| 29 "_generated_background_page.html"; |
| 30 const char kModulesDir[] = "_modules"; |
| 31 |
| 32 const base::FilePath::CharType kExtensionFileExtension[] = |
| 33 FILE_PATH_LITERAL(".crx"); |
| 34 const base::FilePath::CharType kExtensionKeyFileExtension[] = |
| 35 FILE_PATH_LITERAL(".pem"); |
| 36 |
| 37 bool IsExtension(const base::FilePath& file_name) { |
| 38 return file_name.MatchesExtension(kExtensionFileExtension); |
| 39 } |
| 40 |
| 41 } // namespace filenames |
| 42 |
| 43 } // namespace extensions |
OLD | NEW |