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// A handful of resource-like constants related to the Chrome application. 6 7#ifndef CHROME_COMMON_CHROME_CONSTANTS_H_ 8#define CHROME_COMMON_CHROME_CONSTANTS_H_ 9 10#include "base/files/file_path.h" 11 12#if defined(OS_WIN) 13#if defined(GOOGLE_CHROME_BUILD) 14#define PRODUCT_STRING_PATH L"Google\\Chrome" 15#elif defined(CHROMIUM_BUILD) 16#define PRODUCT_STRING_PATH L"Chromium" 17#else 18#error Unknown branding 19#endif 20#endif // defined(OS_WIN) 21 22namespace chrome { 23 24extern const char kChromeVersion[]; 25 26extern const char kChromeVersionEnvVar[]; 27 28extern const base::FilePath::CharType kBrowserProcessExecutableName[]; 29extern const base::FilePath::CharType kHelperProcessExecutableName[]; 30extern const base::FilePath::CharType kBrowserProcessExecutablePath[]; 31extern const base::FilePath::CharType kHelperProcessExecutablePath[]; 32extern const base::FilePath::CharType kBrowserProcessExecutableNameChromium[]; 33extern const base::FilePath::CharType kHelperProcessExecutableNameChromium[]; 34extern const base::FilePath::CharType kBrowserProcessExecutablePathChromium[]; 35extern const base::FilePath::CharType kHelperProcessExecutablePathChromium[]; 36#if defined(OS_MACOSX) 37// NOTE: if you change the value of kFrameworkName, please don't forget to 38// update components/test/run_all_unittests.cc as well. 39// TODO(tfarina): Remove the comment above, when you fix components to use plist 40// on Mac. 41extern const base::FilePath::CharType kFrameworkName[]; 42 43// The helper .app bundle name and executable name may have one of these 44// suffixes to identify specific features, or it may have no suffix at all. 45// This is a NULL-terminated array of strings. If kHelperFlavorSuffixes 46// contains "EN", "MF", and NULL, it indicates that if the normal helper is 47// named Chromium Helper.app, helper executables could show up at any of 48// Chromium Helper.app/Contents/MacOS/Chromium Helper, 49// Chromium Helper EN.app/Contents/MacOS/Chromium Helper EN, and 50// Chromium Helper MF.app/Contents/MacOS/Chromium Helper MF. 51extern const base::FilePath::CharType* const kHelperFlavorSuffixes[]; 52#endif // OS_MACOSX 53#if defined(OS_WIN) 54extern const base::FilePath::CharType kMetroDriverDll[]; 55extern const wchar_t kStatusTrayWindowClass[]; 56#endif // defined(OS_WIN) 57extern const wchar_t kCrashReportLog[]; 58extern const wchar_t kTestingInterfaceDLL[]; 59extern const char kInitialProfile[]; 60extern const char kMultiProfileDirPrefix[]; 61extern const base::FilePath::CharType kGuestProfileDir[]; 62extern const wchar_t kBrowserResourcesDll[]; 63 64// filenames 65#if defined(OS_ANDROID) 66extern const base::FilePath::CharType kAndroidCacheFilename[]; 67#endif 68extern const base::FilePath::CharType kArchivedHistoryFilename[]; 69extern const base::FilePath::CharType kCacheDirname[]; 70extern const base::FilePath::CharType kChannelIDFilename[]; 71extern const base::FilePath::CharType kCookieFilename[]; 72extern const base::FilePath::CharType kCRLSetFilename[]; 73extern const base::FilePath::CharType kCustomDictionaryFileName[]; 74extern const base::FilePath::CharType kExtensionActivityLogFilename[]; 75extern const base::FilePath::CharType kExtensionsCookieFilename[]; 76extern const base::FilePath::CharType kFaviconsFilename[]; 77extern const base::FilePath::CharType kFirstRunSentinel[]; 78extern const base::FilePath::CharType kGCMStoreDirname[]; 79extern const base::FilePath::CharType kHistoryFilename[]; 80extern const base::FilePath::CharType kJumpListIconDirname[]; 81extern const base::FilePath::CharType kLocalStateFilename[]; 82extern const base::FilePath::CharType kLocalStorePoolName[]; 83extern const base::FilePath::CharType kLoginDataFileName[]; 84extern const base::FilePath::CharType kMediaCacheDirname[]; 85extern const base::FilePath::CharType kNewTabThumbnailsFilename[]; 86extern const base::FilePath::CharType kPreferencesFilename[]; 87extern const base::FilePath::CharType kProtectedPreferencesFilenameDeprecated[]; 88extern const base::FilePath::CharType kReadmeFilename[]; 89extern const base::FilePath::CharType kResetPromptMementoFilename[]; 90extern const base::FilePath::CharType kSafeBrowsingBaseFilename[]; 91extern const base::FilePath::CharType kSecurePreferencesFilename[]; 92extern const base::FilePath::CharType kServiceStateFileName[]; 93extern const base::FilePath::CharType kShortcutsDatabaseName[]; 94extern const base::FilePath::CharType kSingletonCookieFilename[]; 95extern const base::FilePath::CharType kSingletonLockFilename[]; 96extern const base::FilePath::CharType kSingletonSocketFilename[]; 97extern const base::FilePath::CharType kSupervisedUserSettingsFilename[]; 98extern const base::FilePath::CharType kSyncCredentialsFilename[]; 99extern const base::FilePath::CharType kThemePackFilename[]; 100extern const base::FilePath::CharType kThumbnailsFilename[]; 101extern const base::FilePath::CharType kTopSitesFilename[]; 102extern const base::FilePath::CharType kWebAppDirname[]; 103 104// File name of the Pepper Flash plugin on different platforms. 105extern const base::FilePath::CharType kPepperFlashPluginFilename[]; 106 107// directory names 108extern const wchar_t kUserDataDirname[]; 109 110extern const bool kRecordModeEnabled; 111 112// If a WebContents is impolite and displays a second JavaScript alert within 113// kJavaScriptMessageExpectedDelay of a previous JavaScript alert being 114// dismissed, display an option to suppress future alerts from this WebContents. 115extern const int kJavaScriptMessageExpectedDelay; 116 117// Are touch icons enabled? False by default. 118extern const bool kEnableTouchIcon; 119 120// Fraction of the total number of processes to be used for hosting 121// extensions. If we have more extensions than this percentage, we will start 122// combining extensions in existing processes. This allows web pages to have 123// enough render processes and not be starved when a lot of extensions are 124// installed. 125extern const float kMaxShareOfExtensionProcesses; 126 127// This is used by the PreRead experiment. 128extern const char kPreReadEnvironmentVariable[]; 129 130#if defined(OS_LINUX) 131// The highest and lowest assigned OOM score adjustment 132// (oom_score_adj) used by the OomPriority Manager. 133extern const int kLowestRendererOomScore; 134extern const int kHighestRendererOomScore; 135#endif 136 137#if defined(OS_WIN) 138// Used by Metro Chrome to initiate navigation and search requests. 139extern const wchar_t kMetroNavigationAndSearchMessage[]; 140// Used by Metro Chrome to get information about the current tab. 141extern const wchar_t kMetroGetCurrentTabInfoMessage[]; 142// Used by Metro Chrome to store activation state. 143extern const wchar_t kMetroRegistryPath[]; 144extern const wchar_t kLaunchModeValue[]; 145// Used by the browser as a container in which to track unreported crash dump 146// attempts. The actual values (each representing one crash dump attempt) are 147// stored in a subkey named with the version number of the build. Each value 148// under the subkey represents an additional attempt. 149extern const wchar_t kBrowserCrashDumpAttemptsRegistryPath[]; 150// Used by chrome.exe to signal that chrome.dll was started via a key sequence 151// that requires it to start in safe mode. For example, in software rendering. 152extern const char kSafeModeEnvVar[]; 153#endif 154 155#if defined(OS_CHROMEOS) 156// Chrome OS profile directories have custom prefix. 157// Profile path format: [user_data_dir]/u-[$hash] 158// Ex.: /home/chronos/u-0123456789 159extern const char kProfileDirPrefix[]; 160 161// Legacy profile dir that was used when only one cryptohome has been mounted. 162extern const char kLegacyProfileDir[]; 163 164// This must be kept in sync with TestingProfile::kTestUserProfileDir. 165extern const char kTestUserProfileDir[]; 166#endif 167 168// Used to identify the application to the system AV function in Windows. 169extern const char kApplicationClientIDStringForAVScanning[]; 170 171// The largest reasonable length we'd assume for a meta tag attribute. 172extern const size_t kMaxMetaTagAttributeLength; 173 174} // namespace chrome 175 176#endif // CHROME_COMMON_CHROME_CONSTANTS_H_ 177