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"
18 #error Unknown branding
20 #endif // defined(OS_MACOSX)
25 const char kChromeVersionEnvVar
[] = "CHROME_VERSION";
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
46 const base::FilePath::CharType kBrowserProcessExecutableNameChromium
[] =
48 const base::FilePath::CharType kBrowserProcessExecutableName
[] =
50 const base::FilePath::CharType kHelperProcessExecutableNameChromium
[] =
52 const base::FilePath::CharType kHelperProcessExecutableName
[] =
54 #elif defined(OS_MACOSX)
55 const base::FilePath::CharType kBrowserProcessExecutableNameChromium
[] =
56 FPL(CHROMIUM_PRODUCT_STRING
);
57 const base::FilePath::CharType kBrowserProcessExecutableName
[] =
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
[] =
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
[] =
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
[] =
79 const base::FilePath::CharType kHelperProcessExecutableName
[] = FPL("exe");
83 const base::FilePath::CharType kBrowserProcessExecutablePathChromium
[] =
85 const base::FilePath::CharType kBrowserProcessExecutablePath
[] =
87 const base::FilePath::CharType kHelperProcessExecutablePathChromium
[] =
89 const base::FilePath::CharType kHelperProcessExecutablePath
[] =
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
[] =
106 const base::FilePath::CharType kHelperProcessExecutablePathChromium
[] =
108 #elif defined(OS_POSIX)
109 const base::FilePath::CharType kBrowserProcessExecutablePathChromium
[] =
111 const base::FilePath::CharType kBrowserProcessExecutablePath
[] = FPL("chrome");
112 const base::FilePath::CharType kHelperProcessExecutablePathChromium
[] =
114 const base::FilePath::CharType kHelperProcessExecutablePath
[] = FPL("chrome");
117 #if defined(OS_MACOSX)
118 const base::FilePath::CharType kFrameworkName
[] =
119 FPL(PRODUCT_STRING
" Framework.framework");
123 const base::FilePath::CharType kBrowserResourcesDll
[] = FPL("chrome.dll");
124 const base::FilePath::CharType kMetroDriverDll
[] = FPL("metro_driver.dll");
125 const base::FilePath::CharType kStatusTrayWindowClass
[] =
126 FPL("Chrome_StatusTrayWindow");
127 #endif // defined(OS_WIN)
129 const char kInitialProfile
[] = "Default";
130 const char kMultiProfileDirPrefix
[] = "Profile ";
131 const base::FilePath::CharType kGuestProfileDir
[] = FPL("Guest Profile");
132 const base::FilePath::CharType kSystemProfileDir
[] = FPL("System Profile");
135 const base::FilePath::CharType kAffiliationDatabaseFileName
[] =
136 FPL("Affiliation Database");
137 const base::FilePath::CharType kCacheDirname
[] = FPL("Cache");
138 const base::FilePath::CharType kChannelIDFilename
[] = FPL("Origin Bound Certs");
139 const base::FilePath::CharType kCookieFilename
[] = FPL("Cookies");
140 const base::FilePath::CharType kCRLSetFilename
[] =
141 FPL("Certificate Revocation Lists");
142 const base::FilePath::CharType kCustomDictionaryFileName
[] =
143 FPL("Custom Dictionary.txt");
144 const base::FilePath::CharType kExtensionActivityLogFilename
[] =
145 FPL("Extension Activity");
146 const base::FilePath::CharType kExtensionsCookieFilename
[] =
147 FPL("Extension Cookies");
148 const base::FilePath::CharType kFirstRunSentinel
[] = FPL("First Run");
149 const base::FilePath::CharType kGCMStoreDirname
[] = FPL("GCM Store");
150 const base::FilePath::CharType kLocalStateFilename
[] = FPL("Local State");
151 const base::FilePath::CharType kLocalStorePoolName
[] = FPL("LocalStorePool");
152 const base::FilePath::CharType kLoginDataFileName
[] = FPL("Login Data");
153 const base::FilePath::CharType kMediaCacheDirname
[] = FPL("Media Cache");
154 const base::FilePath::CharType kNetworkPersistentStateFilename
[] =
155 FPL("Network Persistent State");
156 const base::FilePath::CharType kOfflinePageMetadataDirname
[] =
157 FPL("Offline Pages");
158 const base::FilePath::CharType kPreferencesFilename
[] = FPL("Preferences");
159 const base::FilePath::CharType kProtectedPreferencesFilenameDeprecated
[] =
160 FPL("Protected Preferences");
161 const base::FilePath::CharType kReadmeFilename
[] = FPL("README");
162 const base::FilePath::CharType kResetPromptMementoFilename
[] =
163 FPL("Reset Prompt Memento");
164 const base::FilePath::CharType kSafeBrowsingBaseFilename
[] =
165 FPL("Safe Browsing");
166 const base::FilePath::CharType kSecurePreferencesFilename
[] =
167 FPL("Secure Preferences");
168 const base::FilePath::CharType kServiceStateFileName
[] = FPL("Service State");
169 const base::FilePath::CharType kSingletonCookieFilename
[] =
170 FPL("SingletonCookie");
171 const base::FilePath::CharType kSingletonLockFilename
[] = FPL("SingletonLock");
172 const base::FilePath::CharType kSingletonSocketFilename
[] =
173 FPL("SingletonSocket");
174 const base::FilePath::CharType kSupervisedUserSettingsFilename
[] =
175 FPL("Managed Mode Settings");
176 const base::FilePath::CharType kThemePackFilename
[] = FPL("Cached Theme.pak");
177 const base::FilePath::CharType kWebAppDirname
[] = FPL("Web Applications");
180 const base::FilePath::CharType kJumpListIconDirname
[] = FPL("JumpListIcons");
183 // File name of the Pepper Flash plugin on different platforms.
184 const base::FilePath::CharType kPepperFlashPluginFilename
[] =
185 #if defined(OS_MACOSX)
186 FPL("PepperFlashPlayer.plugin");
187 #elif defined(OS_WIN)
188 FPL("pepflashplayer.dll");
189 #else // OS_LINUX, etc.
190 FPL("libpepflashplayer.so");
195 const wchar_t kUserDataDirname
[] = L
"User Data";
198 const float kMaxShareOfExtensionProcesses
= 0.30f
;
200 #if defined(OS_LINUX)
201 const int kLowestRendererOomScore
= 300;
202 const int kHighestRendererOomScore
= 1000;
206 const wchar_t kMetroNavigationAndSearchMessage
[] =
207 L
"CHROME_METRO_NAV_SEARCH_REQUEST";
208 const wchar_t kMetroGetCurrentTabInfoMessage
[] =
209 L
"CHROME_METRO_GET_CURRENT_TAB_INFO";
210 const wchar_t kMetroRegistryPath
[] =
211 L
"Software\\" PRODUCT_STRING_PATH L
"\\Metro";
212 const wchar_t kLaunchModeValue
[] = L
"launch_mode";
213 // This is used by breakpad and the metrics reporting.
214 const wchar_t kBrowserCrashDumpAttemptsRegistryPath
[] =
215 L
"Software\\" PRODUCT_STRING_PATH L
"\\BrowserCrashDumpAttempts";
216 const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS
[] =
217 L
"Software\\" PRODUCT_STRING_PATH L
"\\BrowserCrashDumpAttemptsSxS";
218 // This is used by browser exit code metrics reporting.
219 const wchar_t kBrowserExitCodesRegistryPath
[] =
220 L
"Software\\" PRODUCT_STRING_PATH L
"\\BrowserExitCodes";
223 #if defined(OS_CHROMEOS)
224 const char kProfileDirPrefix
[] = "u-";
225 const char kLegacyProfileDir
[] = "user";
226 const char kTestUserProfileDir
[] = "test-user";
229 // This GUID is associated with any 'don't ask me again' settings that the
230 // user can select for different file types.
231 // {2676A9A2-D919-4FEE-9187-152100393AB2}
232 const char kApplicationClientIDStringForAVScanning
[] =
233 "2676A9A2-D919-4FEE-9187-152100393AB2";
235 const size_t kMaxMetaTagAttributeLength
= 2000;
237 } // namespace chrome