TabStripModel::GetActiveWebContents() might return NULL, and will cause a crash if...
[chromium-blink-merge.git] / chrome / common / chrome_constants.h
blob4b796f18623cab1982f9cc21b8032f3e39c675e9
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 // A handful of resource-like constants related to the Chrome application.
7 #ifndef CHROME_COMMON_CHROME_CONSTANTS_H_
8 #define CHROME_COMMON_CHROME_CONSTANTS_H_
10 #include "base/files/file_path.h"
12 namespace chrome {
14 extern const char kChromeVersion[];
16 extern const char kChromeVersionEnvVar[];
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[];
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[];
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 kProtectedPreferencesFilename[];
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 kServiceStateFileName[];
84 extern const base::FilePath::CharType kShortcutsDatabaseName[];
85 extern const base::FilePath::CharType kSingletonCookieFilename[];
86 extern const base::FilePath::CharType kSingletonLockFilename[];
87 extern const base::FilePath::CharType kSingletonSocketFilename[];
88 extern const base::FilePath::CharType kSyncCredentialsFilename[];
89 extern const base::FilePath::CharType kThemePackFilename[];
90 extern const base::FilePath::CharType kThumbnailsFilename[];
91 extern const base::FilePath::CharType kTopSitesFilename[];
92 extern const base::FilePath::CharType kWebAppDirname[];
94 // File name of the Pepper Flash plugin on different platforms.
95 extern const base::FilePath::CharType kPepperFlashPluginFilename[];
97 // directory names
98 extern const wchar_t kUserDataDirname[];
100 extern const bool kRecordModeEnabled;
102 // If a WebContents is impolite and displays a second JavaScript alert within
103 // kJavaScriptMessageExpectedDelay of a previous JavaScript alert being
104 // dismissed, display an option to suppress future alerts from this WebContents.
105 extern const int kJavaScriptMessageExpectedDelay;
107 // Are touch icons enabled? False by default.
108 extern const bool kEnableTouchIcon;
110 // Fraction of the total number of processes to be used for hosting
111 // extensions. If we have more extensions than this percentage, we will start
112 // combining extensions in existing processes. This allows web pages to have
113 // enough render processes and not be starved when a lot of extensions are
114 // installed.
115 extern const float kMaxShareOfExtensionProcesses;
117 // This is used by the PreRead experiment.
118 extern const char kPreReadEnvironmentVariable[];
120 #if defined(OS_LINUX)
121 // The highest and lowest assigned OOM score adjustment
122 // (oom_score_adj) used by the OomPriority Manager.
123 extern const int kLowestRendererOomScore;
124 extern const int kHighestRendererOomScore;
125 #endif
127 #if defined(OS_WIN)
128 // Used by Metro Chrome to initiate navigation and search requests.
129 extern const wchar_t kMetroNavigationAndSearchMessage[];
130 // Used by Metro Chrome to get information about the current tab.
131 extern const wchar_t kMetroGetCurrentTabInfoMessage[];
132 // Used by Metro Chrome to store activation state.
133 extern const wchar_t kMetroRegistryPath[];
134 extern const wchar_t kLaunchModeValue[];
135 // Used by the browser as a container in which to track unreported crash dump
136 // attempts. The actual values (each representing one crash dump attempt) are
137 // stored in a subkey named with the version number of the build. Each value
138 // under the subkey represents an additional attempt.
139 extern const wchar_t kBrowserCrashDumpAttemptsRegistryPath[];
140 // Used by chrome.exe to signal that chrome.dll was started via a key sequence
141 // that requires it to start in safe mode. For example, in software rendering.
142 extern const char kSafeModeEnvVar[];
143 #endif
145 #if defined(OS_CHROMEOS)
146 // Chrome OS profile directories have custom prefix.
147 // Profile path format: [user_data_dir]/u-[$hash]
148 // Ex.: /home/chronos/u-0123456789
149 extern const char kProfileDirPrefix[];
151 // Legacy profile dir that was used when only one cryptohome has been mounted.
152 extern const char kLegacyProfileDir[];
154 // This must be kept in sync with TestingProfile::kTestUserProfileDir.
155 extern const char kTestUserProfileDir[];
156 #endif
158 // Used to identify the application to the system AV function in Windows.
159 extern const char kApplicationClientIDStringForAVScanning[];
161 #if defined(OS_ANDROID)
162 // The largest reasonable length we'd assume for a meta tag attribute.
163 extern const size_t kMaxMetaTagAttributeLength;
164 #endif
166 } // namespace chrome
168 #endif // CHROME_COMMON_CHROME_CONSTANTS_H_