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";
56 } // namespace extensions
58 namespace extension_misc
{
60 const int kExtensionIconSizes
[] = {EXTENSION_ICON_GIGANTOR
, // 512
61 EXTENSION_ICON_EXTRA_LARGE
, // 256
62 EXTENSION_ICON_LARGE
, // 128
63 EXTENSION_ICON_MEDIUM
, // 48
64 EXTENSION_ICON_SMALL
, // 32
65 EXTENSION_ICON_SMALLISH
, // 24
66 EXTENSION_ICON_BITTY
, // 16
67 // Additional 2x resources to load.
68 2 * EXTENSION_ICON_MEDIUM
, // 96
69 2 * EXTENSION_ICON_SMALL
// 64
72 const size_t kNumExtensionIconSizes
= arraysize(kExtensionIconSizes
);
74 const IconRepresentationInfo kExtensionActionIconSizes
[] = {
75 { EXTENSION_ICON_ACTION
, "19", ui::SCALE_FACTOR_100P
},
76 { 2 * EXTENSION_ICON_ACTION
, "38", ui::SCALE_FACTOR_200P
}
79 COMPILE_ASSERT(kNumExtensionActionIconSizes
==
80 arraysize(kExtensionActionIconSizes
),
81 num_action_icon_sizes_must_be_in_sync_with_action_icon_sizes
);
83 } // namespace extension_misc