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 3 // found in the LICENSE file. 4 5 #include "extensions/common/constants.h" 6 7 namespace extensions { 8 9 const char kExtensionScheme[] = "chrome-extension"; 10 const char kExtensionResourceScheme[] = "chrome-extension-resource"; 11 12 const base::FilePath::CharType kManifestFilename[] = 13 FILE_PATH_LITERAL("manifest.json"); 14 const base::FilePath::CharType kLocaleFolder[] = 15 FILE_PATH_LITERAL("_locales"); 16 const base::FilePath::CharType kMessagesFilename[] = 17 FILE_PATH_LITERAL("messages.json"); 18 const base::FilePath::CharType kPlatformSpecificFolder[] = 19 FILE_PATH_LITERAL("_platform_specific"); 20 const base::FilePath::CharType kMetadataFolder[] = 21 FILE_PATH_LITERAL("_metadata"); 22 const base::FilePath::CharType kVerifiedContentsFilename[] = 23 FILE_PATH_LITERAL("verified_contents.json"); 24 const base::FilePath::CharType kComputedHashesFilename[] = 25 FILE_PATH_LITERAL("computed_hashes.json"); 26 27 const char kInstallDirectoryName[] = "Extensions"; 28 29 const char kTempExtensionName[] = "CRX_INSTALL"; 30 31 const char kDecodedImagesFilename[] = "DECODED_IMAGES"; 32 33 const char kDecodedMessageCatalogsFilename[] = "DECODED_MESSAGE_CATALOGS"; 34 35 const char kGeneratedBackgroundPageFilename[] = 36 "_generated_background_page.html"; 37 38 const char kModulesDir[] = "_modules"; 39 40 const base::FilePath::CharType kExtensionFileExtension[] = 41 FILE_PATH_LITERAL(".crx"); 42 const base::FilePath::CharType kExtensionKeyFileExtension[] = 43 FILE_PATH_LITERAL(".pem"); 44 45 // If auto-updates are turned on, default to running every 5 hours. 46 const int kDefaultUpdateFrequencySeconds = 60 * 60 * 5; 47 48 const char kLocalAppSettingsDirectoryName[] = "Local App Settings"; 49 const char kLocalExtensionSettingsDirectoryName[] = "Local Extension Settings"; 50 const char kSyncAppSettingsDirectoryName[] = "Sync App Settings"; 51 const char kSyncExtensionSettingsDirectoryName[] = "Sync Extension Settings"; 52 const char kManagedSettingsDirectoryName[] = "Managed Extension Settings"; 53 const char kStateStoreName[] = "Extension State"; 54 const char kRulesStoreName[] = "Extension Rules"; 55 const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; 56 57 const char kMimeTypeJpeg[] = "image/jpeg"; 58 const char kMimeTypePng[] = "image/png"; 59 60 } // namespace extensions 61 62 namespace extension_misc { 63 64 const int kExtensionIconSizes[] = {EXTENSION_ICON_GIGANTOR, // 512 65 EXTENSION_ICON_EXTRA_LARGE, // 256 66 EXTENSION_ICON_LARGE, // 128 67 EXTENSION_ICON_MEDIUM, // 48 68 EXTENSION_ICON_SMALL, // 32 69 EXTENSION_ICON_SMALLISH, // 24 70 EXTENSION_ICON_BITTY, // 16 71 // Additional 2x resources to load. 72 2 * EXTENSION_ICON_MEDIUM, // 96 73 2 * EXTENSION_ICON_SMALL // 64 74 }; 75 76 const size_t kNumExtensionIconSizes = arraysize(kExtensionIconSizes); 77 78 const IconRepresentationInfo kExtensionActionIconSizes[] = { 79 { EXTENSION_ICON_ACTION, "19", ui::SCALE_FACTOR_100P }, 80 { 2 * EXTENSION_ICON_ACTION, "38", ui::SCALE_FACTOR_200P } 81 }; 82 83 COMPILE_ASSERT(kNumExtensionActionIconSizes == 84 arraysize(kExtensionActionIconSizes), 85 num_action_icon_sizes_must_be_in_sync_with_action_icon_sizes); 86 87 } // namespace extension_misc 88