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.
5 #include "extensions/common/constants.h"
9 const char kExtensionScheme
[] = "chrome-extension";
10 const char kExtensionResourceScheme
[] = "chrome-extension-resource";
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");
27 const char kInstallDirectoryName
[] = "Extensions";
29 const char kTempExtensionName
[] = "CRX_INSTALL";
31 const char kDecodedImagesFilename
[] = "DECODED_IMAGES";
33 const char kDecodedMessageCatalogsFilename
[] = "DECODED_MESSAGE_CATALOGS";
35 const char kGeneratedBackgroundPageFilename
[] =
36 "_generated_background_page.html";
38 const char kModulesDir
[] = "_modules";
40 const base::FilePath::CharType kExtensionFileExtension
[] =
41 FILE_PATH_LITERAL(".crx");
42 const base::FilePath::CharType kExtensionKeyFileExtension
[] =
43 FILE_PATH_LITERAL(".pem");
45 // If auto-updates are turned on, default to running every 5 hours.
46 const int kDefaultUpdateFrequencySeconds
= 60 * 60 * 5;
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";
57 const char kMimeTypeJpeg
[] = "image/jpeg";
58 const char kMimeTypePng
[] = "image/png";
60 } // namespace extensions
62 namespace extension_misc
{
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
76 const size_t kNumExtensionIconSizes
= arraysize(kExtensionIconSizes
);
78 const IconRepresentationInfo kExtensionActionIconSizes
[] = {
79 { EXTENSION_ICON_ACTION
, "19", ui::SCALE_FACTOR_100P
},
80 { 2 * EXTENSION_ICON_ACTION
, "38", ui::SCALE_FACTOR_200P
}
83 COMPILE_ASSERT(kNumExtensionActionIconSizes
==
84 arraysize(kExtensionActionIconSizes
),
85 num_action_icon_sizes_must_be_in_sync_with_action_icon_sizes
);
87 } // namespace extension_misc