Android Chromoting: Remove exit-fullscreen button.
[chromium-blink-merge.git] / chrome / common / chrome_constants.cc
blob7a92eee0550c45212e5b6be16bad3ea67b2dd09d
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 const char kChromeVersionEnvVar[] = "CHROME_VERSION";
26 // The following should not be used for UI strings; they are meant
27 // for system strings only. UI changes should be made in the GRD.
29 // There are four constants used to locate the executable name and path:
31 // kBrowserProcessExecutableName
32 // kHelperProcessExecutableName
33 // kBrowserProcessExecutablePath
34 // kHelperProcessExecutablePath
36 // In one condition, our tests will be built using the Chrome branding
37 // though we want to actually execute a Chromium branded application.
38 // This happens for the reference build on Mac. To support that case,
39 // we also include a Chromium version of each of the four constants and
40 // in the UITest class we support switching to that version when told to
41 // do so.
43 #if defined(OS_WIN)
44 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
45 FPL("chrome.exe");
46 const base::FilePath::CharType kBrowserProcessExecutableName[] =
47 FPL("chrome.exe");
48 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
49 FPL("chrome.exe");
50 const base::FilePath::CharType kHelperProcessExecutableName[] =
51 FPL("chrome.exe");
52 #elif defined(OS_MACOSX)
53 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
54 FPL(CHROMIUM_PRODUCT_STRING);
55 const base::FilePath::CharType kBrowserProcessExecutableName[] =
56 FPL(PRODUCT_STRING);
57 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
58 FPL(CHROMIUM_PRODUCT_STRING " Helper");
59 const base::FilePath::CharType kHelperProcessExecutableName[] =
60 FPL(PRODUCT_STRING " Helper");
61 #elif defined(OS_ANDROID)
62 // NOTE: Keep it synced with the process names defined in AndroidManifest.xml.
63 const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
64 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
65 FPL("");
66 const base::FilePath::CharType kHelperProcessExecutableName[] =
67 FPL("sandboxed_process");
68 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL("");
69 #elif defined(OS_POSIX)
70 const base::FilePath::CharType kBrowserProcessExecutableNameChromium[] =
71 FPL("chrome");
72 const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
73 // Helper processes end up with a name of "exe" due to execing via
74 // /proc/self/exe. See bug 22703.
75 const base::FilePath::CharType kHelperProcessExecutableNameChromium[] =
76 FPL("exe");
77 const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");
78 #endif // OS_*
80 #if defined(OS_WIN)
81 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
82 FPL("chrome.exe");
83 const base::FilePath::CharType kBrowserProcessExecutablePath[] =
84 FPL("chrome.exe");
85 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
86 FPL("chrome.exe");
87 const base::FilePath::CharType kHelperProcessExecutablePath[] =
88 FPL("chrome.exe");
89 #elif defined(OS_MACOSX)
90 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
91 FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING);
92 const base::FilePath::CharType kBrowserProcessExecutablePath[] =
93 FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING);
94 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
95 FPL(CHROMIUM_PRODUCT_STRING " Helper.app/Contents/MacOS/"
96 CHROMIUM_PRODUCT_STRING " Helper");
97 const base::FilePath::CharType kHelperProcessExecutablePath[] =
98 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
99 #elif defined(OS_ANDROID)
100 const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
101 const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
102 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
103 FPL("chrome");
104 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
105 FPL("chrome");
106 #elif defined(OS_POSIX)
107 const base::FilePath::CharType kBrowserProcessExecutablePathChromium[] =
108 FPL("chrome");
109 const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
110 const base::FilePath::CharType kHelperProcessExecutablePathChromium[] =
111 FPL("chrome");
112 const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
113 #endif // OS_*
115 #if defined(OS_MACOSX)
116 const base::FilePath::CharType kFrameworkName[] =
117 FPL(PRODUCT_STRING " Framework.framework");
119 const char* const kHelperFlavorSuffixes[] = {
120 FPL("EH"), // Executable heap
121 FPL("NP"), // No PIE
122 NULL
124 #endif // OS_MACOSX
126 #if defined(OS_WIN)
127 const base::FilePath::CharType kMetroDriverDll[] = FPL("metro_driver.dll");
128 const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow";
129 #endif // defined(OS_WIN)
131 const wchar_t kCrashReportLog[] = L"Reported Crashes.txt";
132 const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll";
133 const char kInitialProfile[] = "Default";
134 const char kMultiProfileDirPrefix[] = "Profile ";
135 const base::FilePath::CharType kGuestProfileDir[] = FPL("Guest Profile");
136 const base::FilePath::CharType kSystemProfileDir[] = FPL("System Profile");
137 const wchar_t kBrowserResourcesDll[] = L"chrome.dll";
139 // filenames
140 const base::FilePath::CharType kAffiliationDatabaseFileName[] =
141 FPL("Affiliation Database");
142 const base::FilePath::CharType kCacheDirname[] = FPL("Cache");
143 const base::FilePath::CharType kChannelIDFilename[] = FPL("Origin Bound Certs");
144 const base::FilePath::CharType kCookieFilename[] = FPL("Cookies");
145 const base::FilePath::CharType kCRLSetFilename[] =
146 FPL("Certificate Revocation Lists");
147 const base::FilePath::CharType kCustomDictionaryFileName[] =
148 FPL("Custom Dictionary.txt");
149 const base::FilePath::CharType kExtensionActivityLogFilename[] =
150 FPL("Extension Activity");
151 const base::FilePath::CharType kExtensionsCookieFilename[] =
152 FPL("Extension Cookies");
153 const base::FilePath::CharType kFirstRunSentinel[] = FPL("First Run");
154 const base::FilePath::CharType kGCMStoreDirname[] = FPL("GCM Store");
155 const base::FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons");
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 kNewTabThumbnailsFilename[] =
163 FPL("Top Thumbnails");
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 kSyncCredentialsFilename[] =
184 FPL("Sync Credentials");
185 const base::FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak");
186 const base::FilePath::CharType kTopSitesFilename[] = FPL("Top Sites");
187 const base::FilePath::CharType kWebAppDirname[] = FPL("Web Applications");
189 // File name of the Pepper Flash plugin on different platforms.
190 const base::FilePath::CharType kPepperFlashPluginFilename[] =
191 #if defined(OS_MACOSX)
192 FPL("PepperFlashPlayer.plugin");
193 #elif defined(OS_WIN)
194 FPL("pepflashplayer.dll");
195 #else // OS_LINUX, etc.
196 FPL("libpepflashplayer.so");
197 #endif
199 // directory names
200 const wchar_t kUserDataDirname[] = L"User Data";
202 const float kMaxShareOfExtensionProcesses = 0.30f;
204 #if defined(OS_LINUX)
205 const int kLowestRendererOomScore = 300;
206 const int kHighestRendererOomScore = 1000;
207 #endif
209 #if defined(OS_WIN)
210 const wchar_t kMetroNavigationAndSearchMessage[] =
211 L"CHROME_METRO_NAV_SEARCH_REQUEST";
212 const wchar_t kMetroGetCurrentTabInfoMessage[] =
213 L"CHROME_METRO_GET_CURRENT_TAB_INFO";
214 const wchar_t kMetroRegistryPath[] =
215 L"Software\\" PRODUCT_STRING_PATH L"\\Metro";
216 const wchar_t kLaunchModeValue[] = L"launch_mode";
217 // This is used by breakpad and the metrics reporting.
218 const wchar_t kBrowserCrashDumpAttemptsRegistryPath[] =
219 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttempts";
220 const wchar_t kBrowserCrashDumpAttemptsRegistryPathSxS[] =
221 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserCrashDumpAttemptsSxS";
222 // This is used by browser exit code metrics reporting.
223 const wchar_t kBrowserExitCodesRegistryPath[] =
224 L"Software\\" PRODUCT_STRING_PATH L"\\BrowserExitCodes";
225 #endif
227 #if defined(OS_CHROMEOS)
228 const char kProfileDirPrefix[] = "u-";
229 const char kLegacyProfileDir[] = "user";
230 const char kTestUserProfileDir[] = "test-user";
231 #endif
233 // This GUID is associated with any 'don't ask me again' settings that the
234 // user can select for different file types.
235 // {2676A9A2-D919-4FEE-9187-152100393AB2}
236 const char kApplicationClientIDStringForAVScanning[] =
237 "2676A9A2-D919-4FEE-9187-152100393AB2";
239 const size_t kMaxMetaTagAttributeLength = 2000;
241 } // namespace chrome
243 #undef FPL