Remove obsolete DEPS override in c/b/history.
[chromium-blink-merge.git] / chrome / common / chrome_constants.cc
blobf8cf204056f9d15c452a137b22e23ae21f38b082
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 "chrome/common/chrome_constants.h"
7 #include "base/files/file_path.h"
9 #define FPL FILE_PATH_LITERAL
11 #if defined(OS_MACOSX)
12 #define CHROMIUM_PRODUCT_STRING "Chromium"
13 #if defined(GOOGLE_CHROME_BUILD)
14 #define PRODUCT_STRING "Google Chrome"
15 #elif defined(CHROMIUM_BUILD)
16 #define PRODUCT_STRING "Chromium"
17 #else
18 #error Unknown branding
19 #endif
20 #endif // defined(OS_MACOSX)
22 namespace chrome {
24 #if defined(OS_WIN)
25 const char kChromeVersionEnvVar[] = "CHROME_VERSION";
26 #endif
28 // The following should not be used for UI strings; they are meant
29 // for system strings only. UI changes should be made in the GRD.
31 // There are four constants used to locate the executable name and path:
33 // kBrowserProcessExecutableName
34 // kHelperProcessExecutableName
35 // kBrowserProcessExecutablePath
36 // kHelperProcessExecutablePath
38 // In one condition, our tests will be built using the Chrome branding
39 // though we want to actually execute a Chromium branded application.
40 // This happens for the reference build on Mac. To support that case,
41 // we also include a Chromium version of each of the four constants and
42 // in the UITest class we support switching to that version when told to
43 // do so.
45 #if defined(OS_WIN)
46 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
47 FPL("chrome.exe");
48 const base::FilePath::CharType kBrowserProcessExecutableName[] =
49 FPL("chrome.exe");
50 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
51 FPL("chrome.exe");
52 const base::FilePath::CharType kHelperProcessExecutableName[] =
53 FPL("chrome.exe");
54 #elif defined(OS_MACOSX)
55 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
56 FPL(CHROMIUM_PRODUCT_STRING);
57 const base::FilePath::CharType kBrowserProcessExecutableName[] =
58 FPL(PRODUCT_STRING);
59 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
60 FPL(CHROMIUM_PRODUCT_STRING " Helper");
61 const base::FilePath::CharType kHelperProcessExecutableName[] =
62 FPL(PRODUCT_STRING " Helper");
63 #elif defined(OS_ANDROID)
64 // NOTE: Keep it synced with the process names defined in AndroidManifest.xml.
65 const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
66 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
67 FPL("");
68 const base::FilePath::CharType kHelperProcessExecutableName[] =
69 FPL("sandboxed_process");
70 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL("");
71 #elif defined(OS_POSIX)
72 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
73 FPL("chrome");
74 const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
75 // Helper processes end up with a name of "exe" due to execing via
76 // /proc/self/exe. See bug 22703.
77 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
78 FPL("exe");
79 const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");
80 #endif // OS_*
82 #if defined(OS_WIN)
83 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
84 FPL("chrome.exe");
85 const base::FilePath::CharType kBrowserProcessExecutablePath[] =
86 FPL("chrome.exe");
87 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
88 FPL("chrome.exe");
89 const base::FilePath::CharType kHelperProcessExecutablePath[] =
90 FPL("chrome.exe");
91 #elif defined(OS_MACOSX)
92 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
93 FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING);
94 const base::FilePath::CharType kBrowserProcessExecutablePath[] =
95 FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING);
96 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
97 FPL(CHROMIUM_PRODUCT_STRING " Helper.app/Contents/MacOS/"
98 CHROMIUM_PRODUCT_STRING " Helper");
99 const base::FilePath::CharType kHelperProcessExecutablePath[] =
100 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
101 #elif defined(OS_ANDROID)
102 const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
103 const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
104 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
105 FPL("chrome");
106 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
107 FPL("chrome");
108 #elif defined(OS_POSIX)
109 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
110 FPL("chrome");
111 const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
112 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
113 FPL("chrome");
114 const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
115 #endif // OS_*
117 #if defined(OS_MACOSX)
118 const base::FilePath::CharType kFrameworkName[] =
119 FPL(PRODUCT_STRING " Framework.framework");
121 const char* const kHelperFlavorSuffixes[] = {
122 FPL("EH"), // Executable heap
123 FPL("NP"), // No PIE
124 NULL
126 #endif // OS_MACOSX
128 #if defined(OS_WIN)
129 const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll");
130 const base::FilePath::CharType kMetroDriverDll[] = FPL("metro_driver.dll");
131 const base::FilePath::CharType kStatusTrayWindowClass[] =
132 FPL("Chrome_StatusTrayWindow");
133 #endif // defined(OS_WIN)
135 const char kInitialProfile[] = "Default";
136 const char kMultiProfileDirPrefix[] = "Profile ";
137 const base::FilePath::CharType kGuestProfileDir[] = FPL("Guest Profile");
138 const base::FilePath::CharType kSystemProfileDir[] = FPL("System Profile");
140 // filenames
141 const base::FilePath::CharType kAffiliationDatabaseFileName[] =
142 FPL("Affiliation Database");
143 const base::FilePath::CharType kCacheDirname[] = FPL("Cache");
144 const base::FilePath::CharType kChannelIDFilename[] = FPL("Origin Bound Certs");
145 const base::FilePath::CharType kCookieFilename[] = FPL("Cookies");
146 const base::FilePath::CharType kCRLSetFilename[] =
147 FPL("Certificate Revocation Lists");
148 const base::FilePath::CharType kCustomDictionaryFileName[] =
149 FPL("Custom Dictionary.txt");
150 const base::FilePath::CharType kExtensionActivityLogFilename[] =
151 FPL("Extension Activity");
152 const base::FilePath::CharType kExtensionsCookieFilename[] =
153 FPL("Extension Cookies");
154 const base::FilePath::CharType kFirstRunSentinel[] = FPL("First Run");
155 const base::FilePath::CharType kGCMStoreDirname[] = FPL("GCM Store");
156 const base::FilePath::CharType kLocalStateFilename[] = FPL("Local State");
157 const base::FilePath::CharType kLocalStorePoolName[] = FPL("LocalStorePool");
158 const base::FilePath::CharType kLoginDataFileName[] = FPL("Login Data");
159 const base::FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache");
160 const base::FilePath::CharType kNetworkPersistentStateFilename[] =
161 FPL("Network Persistent State");
162 const base::FilePath::CharType kOfflinePageMetadataDirname[] =
163 FPL("Offline Pages");
164 const base::FilePath::CharType kPreferencesFilename[] = FPL("Preferences");
165 const base::FilePath::CharType kProtectedPreferencesFilenameDeprecated[] =
166 FPL("Protected Preferences");
167 const base::FilePath::CharType kReadmeFilename[] = FPL("README");
168 const base::FilePath::CharType kResetPromptMementoFilename[] =
169 FPL("Reset Prompt Memento");
170 const base::FilePath::CharType kSafeBrowsingBaseFilename[] =
171 FPL("Safe Browsing");
172 const base::FilePath::CharType kSecurePreferencesFilename[] =
173 FPL("Secure Preferences");
174 const base::FilePath::CharType kServiceStateFileName[] = FPL("Service State");
175 const base::FilePath::CharType kShortcutsDatabaseName[] = FPL("Shortcuts");
176 const base::FilePath::CharType kSingletonCookieFilename[] =
177 FPL("SingletonCookie");
178 const base::FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock");
179 const base::FilePath::CharType kSingletonSocketFilename[] =
180 FPL("SingletonSocket");
181 const base::FilePath::CharType kSupervisedUserSettingsFilename[] =
182 FPL("Managed Mode Settings");
183 const base::FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak");
184 const base::FilePath::CharType kWebAppDirname[] = FPL("Web Applications");
186 #if defined(OS_WIN)
187 const base::FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons");
188 #endif
190 // File name of the Pepper Flash plugin on different platforms.
191 const base::FilePath::CharType kPepperFlashPluginFilename[] =
192 #if defined(OS_MACOSX)
193 FPL("PepperFlashPlayer.plugin");
194 #elif defined(OS_WIN)
195 FPL("pepflashplayer.dll");
196 #else // OS_LINUX, etc.
197 FPL("libpepflashplayer.so");
198 #endif
200 // directory names
201 #if defined(OS_WIN)
202 const wchar_t kUserDataDirname[] = L"User Data";
203 #endif
205 const float kMaxShareOfExtensionProcesses = 0.30f;
207 #if defined(OS_LINUX)
208 const int kLowestRendererOomScore = 300;
209 const int kHighestRendererOomScore = 1000;
210 #endif
212 #if defined(OS_WIN)
213 const wchar_t kMetroNavigationAndSearchMessage[] =
214 L"CHROME_METRO_NAV_SEARCH_REQUEST";
215 const wchar_t kMetroGetCurrentTabInfoMessage[] =
216 L"CHROME_METRO_GET_CURRENT_TAB_INFO";
217 const wchar_t kMetroRegistryPath[] =
218 L"Software\\" PRODUCT_STRING_PATH L"\\Metro";
219 const wchar_t kLaunchModeValue[] = L"launch_mode";
220 // This is used by breakpad and the metrics reporting.
221 const wchar_t kBrowserCrashDumpAttemptsRegistryPath[] =
222 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttempts";
223 const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[] =
224 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttemptsSxS";
225 // This is used by browser exit code metrics reporting.
226 const wchar_t kBrowserExitCodesRegistryPath[] =
227 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserExitCodes";
228 #endif
230 #if defined(OS_CHROMEOS)
231 const char kProfileDirPrefix[] = "u-";
232 const char kLegacyProfileDir[] = "user";
233 const char kTestUserProfileDir[] = "test-user";
234 #endif
236 // This GUID is associated with any 'don't ask me again' settings that the
237 // user can select for different file types.
238 // {2676A9A2-D919-4FEE-9187-152100393AB2}
239 const char kApplicationClientIDStringForAVScanning[] =
240 "2676A9A2-D919-4FEE-9187-152100393AB2";
242 const size_t kMaxMetaTagAttributeLength = 2000;
244 } // namespace chrome
246 #undef FPL