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"
7 #include "base/files/file_path.h"
11 const char kExtensionScheme
[] = "chrome-extension";
12 const char kExtensionResourceScheme
[] = "chrome-extension-resource";
14 const base::FilePath::CharType kManifestFilename
[] =
15 FILE_PATH_LITERAL("manifest.json");
16 const base::FilePath::CharType kLocaleFolder
[] =
17 FILE_PATH_LITERAL("_locales");
18 const base::FilePath::CharType kMessagesFilename
[] =
19 FILE_PATH_LITERAL("messages.json");
20 const base::FilePath::CharType kPlatformSpecificFolder
[] =
21 FILE_PATH_LITERAL("_platform_specific");
22 const base::FilePath::CharType kMetadataFolder
[] =
23 FILE_PATH_LITERAL("_metadata");
24 const base::FilePath::CharType kVerifiedContentsFilename
[] =
25 FILE_PATH_LITERAL("verified_contents.json");
26 const base::FilePath::CharType kComputedHashesFilename
[] =
27 FILE_PATH_LITERAL("computed_hashes.json");
29 const char kInstallDirectoryName
[] = "Extensions";
31 const char kTempExtensionName
[] = "CRX_INSTALL";
33 const char kDecodedImagesFilename
[] = "DECODED_IMAGES";
35 const char kDecodedMessageCatalogsFilename
[] = "DECODED_MESSAGE_CATALOGS";
37 const char kGeneratedBackgroundPageFilename
[] =
38 "_generated_background_page.html";
40 const char kModulesDir
[] = "_modules";
42 const base::FilePath::CharType kExtensionFileExtension
[] =
43 FILE_PATH_LITERAL(".crx");
44 const base::FilePath::CharType kExtensionKeyFileExtension
[] =
45 FILE_PATH_LITERAL(".pem");
47 // If auto-updates are turned on, default to running every 5 hours.
48 const int kDefaultUpdateFrequencySeconds
= 60 * 60 * 5;
50 const char kLocalAppSettingsDirectoryName
[] = "Local App Settings";
51 const char kLocalExtensionSettingsDirectoryName
[] = "Local Extension Settings";
52 const char kSyncAppSettingsDirectoryName
[] = "Sync App Settings";
53 const char kSyncExtensionSettingsDirectoryName
[] = "Sync Extension Settings";
54 const char kManagedSettingsDirectoryName
[] = "Managed Extension Settings";
55 const char kStateStoreName
[] = "Extension State";
56 const char kRulesStoreName
[] = "Extension Rules";
58 } // namespace extensions
60 namespace extension_misc
{
62 const int kExtensionIconSizes
[] = {EXTENSION_ICON_GIGANTOR
, // 512
63 EXTENSION_ICON_EXTRA_LARGE
, // 256
64 EXTENSION_ICON_LARGE
, // 128
65 EXTENSION_ICON_MEDIUM
, // 48
66 EXTENSION_ICON_SMALL
, // 32
67 EXTENSION_ICON_SMALLISH
, // 24
68 EXTENSION_ICON_BITTY
, // 16
69 // Additional 2x resources to load.
70 2 * EXTENSION_ICON_MEDIUM
, // 96
71 2 * EXTENSION_ICON_SMALL
// 64
74 const size_t kNumExtensionIconSizes
= arraysize(kExtensionIconSizes
);
76 const int kExtensionActionIconSizes
[] = {EXTENSION_ICON_ACTION
, // 19,
77 2 * EXTENSION_ICON_ACTION
// 38
80 const size_t kNumExtensionActionIconSizes
=
81 arraysize(kExtensionActionIconSizes
);
83 } // namespace extension_misc