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