| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/common/chrome_constants.h" | 5 #include "chrome/common/chrome_constants.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 | 8 |
| 9 #define FPL FILE_PATH_LITERAL | 9 #define FPL FILE_PATH_LITERAL |
| 10 | 10 |
| 11 #if defined(OS_MACOSX) | 11 #if defined(OS_MACOSX) |
| 12 #define CHROMIUM_PRODUCT_STRING "Chromium" | 12 #define CHROMIUM_PRODUCT_STRING "Chromium" |
| 13 #if defined(GOOGLE_CHROME_BUILD) | 13 #if defined(GOOGLE_CHROME_BUILD) |
| 14 #define PRODUCT_STRING "Google Chrome" | 14 #define PRODUCT_STRING "Google Chrome" |
| 15 #elif defined(CHROMIUM_BUILD) | 15 #elif defined(CHROMIUM_BUILD) |
| 16 #define PRODUCT_STRING "Chromium" | 16 #define PRODUCT_STRING "Chromium" |
| 17 #else | 17 #else |
| 18 #error Unknown branding | 18 #error Unknown branding |
| 19 #endif | 19 #endif |
| 20 #endif // defined(OS_MACOSX) | 20 #endif // defined(OS_MACOSX) |
| 21 | 21 |
| 22 namespace chrome { | 22 namespace chrome { |
| 23 | 23 |
| 24 #if defined(OS_WIN) |
| 24 const char kChromeVersionEnvVar[] = "CHROME_VERSION"; | 25 const char kChromeVersionEnvVar[] = "CHROME_VERSION"; |
| 26 #endif |
| 25 | 27 |
| 26 // The following should not be used for UI strings; they are meant | 28 // 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 // for system strings only. UI changes should be made in the GRD. |
| 28 // | 30 // |
| 29 // There are four constants used to locate the executable name and path: | 31 // There are four constants used to locate the executable name and path: |
| 30 // | 32 // |
| 31 // kBrowserProcessExecutableName | 33 // kBrowserProcessExecutableName |
| 32 // kHelperProcessExecutableName | 34 // kHelperProcessExecutableName |
| 33 // kBrowserProcessExecutablePath | 35 // kBrowserProcessExecutablePath |
| 34 // kHelperProcessExecutablePath | 36 // kHelperProcessExecutablePath |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 FPL(PRODUCT_STRING " Framework.framework"); | 119 FPL(PRODUCT_STRING " Framework.framework"); |
| 118 | 120 |
| 119 const char* const kHelperFlavorSuffixes[] = { | 121 const char* const kHelperFlavorSuffixes[] = { |
| 120 FPL("EH"), // Executable heap | 122 FPL("EH"), // Executable heap |
| 121 FPL("NP"), // No PIE | 123 FPL("NP"), // No PIE |
| 122 NULL | 124 NULL |
| 123 }; | 125 }; |
| 124 #endif // OS_MACOSX | 126 #endif // OS_MACOSX |
| 125 | 127 |
| 126 #if defined(OS_WIN) | 128 #if defined(OS_WIN) |
| 129 const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll"); |
| 127 const base::FilePath::CharType kMetroDriverDll[] = FPL("metro_driver.dll"); | 130 const base::FilePath::CharType kMetroDriverDll[] = FPL("metro_driver.dll"); |
| 128 const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow"; | 131 const base::FilePath::CharType kStatusTrayWindowClass[] = |
| 132 FPL("Chrome_StatusTrayWindow"); |
| 129 #endif // defined(OS_WIN) | 133 #endif // defined(OS_WIN) |
| 130 | 134 |
| 131 const wchar_t kCrashReportLog[] = L"Reported Crashes.txt"; | |
| 132 const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll"; | |
| 133 const char kInitialProfile[] = "Default"; | 135 const char kInitialProfile[] = "Default"; |
| 134 const char kMultiProfileDirPrefix[] = "Profile "; | 136 const char kMultiProfileDirPrefix[] = "Profile "; |
| 135 const base::FilePath::CharType kGuestProfileDir[] = FPL("Guest Profile"); | 137 const base::FilePath::CharType kGuestProfileDir[] = FPL("Guest Profile"); |
| 136 const base::FilePath::CharType kSystemProfileDir[] = FPL("System Profile"); | 138 const base::FilePath::CharType kSystemProfileDir[] = FPL("System Profile"); |
| 137 const wchar_t kBrowserResourcesDll[] = L"chrome.dll"; | |
| 138 | 139 |
| 139 // filenames | 140 // filenames |
| 140 const base::FilePath::CharType kAffiliationDatabaseFileName[] = | 141 const base::FilePath::CharType kAffiliationDatabaseFileName[] = |
| 141 FPL("Affiliation Database"); | 142 FPL("Affiliation Database"); |
| 142 const base::FilePath::CharType kCacheDirname[] = FPL("Cache"); | 143 const base::FilePath::CharType kCacheDirname[] = FPL("Cache"); |
| 143 const base::FilePath::CharType kChannelIDFilename[] = FPL("Origin Bound Certs"); | 144 const base::FilePath::CharType kChannelIDFilename[] = FPL("Origin Bound Certs"); |
| 144 const base::FilePath::CharType kCookieFilename[] = FPL("Cookies"); | 145 const base::FilePath::CharType kCookieFilename[] = FPL("Cookies"); |
| 145 const base::FilePath::CharType kCRLSetFilename[] = | 146 const base::FilePath::CharType kCRLSetFilename[] = |
| 146 FPL("Certificate Revocation Lists"); | 147 FPL("Certificate Revocation Lists"); |
| 147 const base::FilePath::CharType kCustomDictionaryFileName[] = | 148 const base::FilePath::CharType kCustomDictionaryFileName[] = |
| 148 FPL("Custom Dictionary.txt"); | 149 FPL("Custom Dictionary.txt"); |
| 149 const base::FilePath::CharType kExtensionActivityLogFilename[] = | 150 const base::FilePath::CharType kExtensionActivityLogFilename[] = |
| 150 FPL("Extension Activity"); | 151 FPL("Extension Activity"); |
| 151 const base::FilePath::CharType kExtensionsCookieFilename[] = | 152 const base::FilePath::CharType kExtensionsCookieFilename[] = |
| 152 FPL("Extension Cookies"); | 153 FPL("Extension Cookies"); |
| 153 const base::FilePath::CharType kFirstRunSentinel[] = FPL("First Run"); | 154 const base::FilePath::CharType kFirstRunSentinel[] = FPL("First Run"); |
| 154 const base::FilePath::CharType kGCMStoreDirname[] = FPL("GCM Store"); | 155 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"); | 156 const base::FilePath::CharType kLocalStateFilename[] = FPL("Local State"); |
| 157 const base::FilePath::CharType kLocalStorePoolName[] = FPL("LocalStorePool"); | 157 const base::FilePath::CharType kLocalStorePoolName[] = FPL("LocalStorePool"); |
| 158 const base::FilePath::CharType kLoginDataFileName[] = FPL("Login Data"); | 158 const base::FilePath::CharType kLoginDataFileName[] = FPL("Login Data"); |
| 159 const base::FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache"); | 159 const base::FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache"); |
| 160 const base::FilePath::CharType kNetworkPersistentStateFilename[] = | 160 const base::FilePath::CharType kNetworkPersistentStateFilename[] = |
| 161 FPL("Network Persistent State"); | 161 FPL("Network Persistent State"); |
| 162 const base::FilePath::CharType kNewTabThumbnailsFilename[] = | |
| 163 FPL("Top Thumbnails"); | |
| 164 const base::FilePath::CharType kPreferencesFilename[] = FPL("Preferences"); | 162 const base::FilePath::CharType kPreferencesFilename[] = FPL("Preferences"); |
| 165 const base::FilePath::CharType kProtectedPreferencesFilenameDeprecated[] = | 163 const base::FilePath::CharType kProtectedPreferencesFilenameDeprecated[] = |
| 166 FPL("Protected Preferences"); | 164 FPL("Protected Preferences"); |
| 167 const base::FilePath::CharType kReadmeFilename[] = FPL("README"); | 165 const base::FilePath::CharType kReadmeFilename[] = FPL("README"); |
| 168 const base::FilePath::CharType kResetPromptMementoFilename[] = | 166 const base::FilePath::CharType kResetPromptMementoFilename[] = |
| 169 FPL("Reset Prompt Memento"); | 167 FPL("Reset Prompt Memento"); |
| 170 const base::FilePath::CharType kSafeBrowsingBaseFilename[] = | 168 const base::FilePath::CharType kSafeBrowsingBaseFilename[] = |
| 171 FPL("Safe Browsing"); | 169 FPL("Safe Browsing"); |
| 172 const base::FilePath::CharType kSecurePreferencesFilename[] = | 170 const base::FilePath::CharType kSecurePreferencesFilename[] = |
| 173 FPL("Secure Preferences"); | 171 FPL("Secure Preferences"); |
| 174 const base::FilePath::CharType kServiceStateFileName[] = FPL("Service State"); | 172 const base::FilePath::CharType kServiceStateFileName[] = FPL("Service State"); |
| 175 const base::FilePath::CharType kShortcutsDatabaseName[] = FPL("Shortcuts"); | 173 const base::FilePath::CharType kShortcutsDatabaseName[] = FPL("Shortcuts"); |
| 176 const base::FilePath::CharType kSingletonCookieFilename[] = | 174 const base::FilePath::CharType kSingletonCookieFilename[] = |
| 177 FPL("SingletonCookie"); | 175 FPL("SingletonCookie"); |
| 178 const base::FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock"); | 176 const base::FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock"); |
| 179 const base::FilePath::CharType kSingletonSocketFilename[] = | 177 const base::FilePath::CharType kSingletonSocketFilename[] = |
| 180 FPL("SingletonSocket"); | 178 FPL("SingletonSocket"); |
| 181 const base::FilePath::CharType kSupervisedUserSettingsFilename[] = | 179 const base::FilePath::CharType kSupervisedUserSettingsFilename[] = |
| 182 FPL("Managed Mode Settings"); | 180 FPL("Managed Mode Settings"); |
| 183 const base::FilePath::CharType kSyncCredentialsFilename[] = | |
| 184 FPL("Sync Credentials"); | |
| 185 const base::FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak"); | 181 const base::FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak"); |
| 186 const base::FilePath::CharType kWebAppDirname[] = FPL("Web Applications"); | 182 const base::FilePath::CharType kWebAppDirname[] = FPL("Web Applications"); |
| 187 | 183 |
| 184 #if defined(OS_WIN) |
| 185 const base::FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons"); |
| 186 #endif |
| 187 |
| 188 // File name of the Pepper Flash plugin on different platforms. | 188 // File name of the Pepper Flash plugin on different platforms. |
| 189 const base::FilePath::CharType kPepperFlashPluginFilename[] = | 189 const base::FilePath::CharType kPepperFlashPluginFilename[] = |
| 190 #if defined(OS_MACOSX) | 190 #if defined(OS_MACOSX) |
| 191 FPL("PepperFlashPlayer.plugin"); | 191 FPL("PepperFlashPlayer.plugin"); |
| 192 #elif defined(OS_WIN) | 192 #elif defined(OS_WIN) |
| 193 FPL("pepflashplayer.dll"); | 193 FPL("pepflashplayer.dll"); |
| 194 #else // OS_LINUX, etc. | 194 #else // OS_LINUX, etc. |
| 195 FPL("libpepflashplayer.so"); | 195 FPL("libpepflashplayer.so"); |
| 196 #endif | 196 #endif |
| 197 | 197 |
| 198 // directory names | 198 // directory names |
| 199 #if defined(OS_WIN) |
| 199 const wchar_t kUserDataDirname[] = L"User Data"; | 200 const wchar_t kUserDataDirname[] = L"User Data"; |
| 201 #endif |
| 200 | 202 |
| 201 const float kMaxShareOfExtensionProcesses = 0.30f; | 203 const float kMaxShareOfExtensionProcesses = 0.30f; |
| 202 | 204 |
| 203 #if defined(OS_LINUX) | 205 #if defined(OS_LINUX) |
| 204 const int kLowestRendererOomScore = 300; | 206 const int kLowestRendererOomScore = 300; |
| 205 const int kHighestRendererOomScore = 1000; | 207 const int kHighestRendererOomScore = 1000; |
| 206 #endif | 208 #endif |
| 207 | 209 |
| 208 #if defined(OS_WIN) | 210 #if defined(OS_WIN) |
| 209 const wchar_t kMetroNavigationAndSearchMessage[] = | 211 const wchar_t kMetroNavigationAndSearchMessage[] = |
| (...skipping 23 matching lines...) Expand all Loading... |
| 233 // user can select for different file types. | 235 // user can select for different file types. |
| 234 // {2676A9A2-D919-4FEE-9187-152100393AB2} | 236 // {2676A9A2-D919-4FEE-9187-152100393AB2} |
| 235 const char kApplicationClientIDStringForAVScanning[] = | 237 const char kApplicationClientIDStringForAVScanning[] = |
| 236 "2676A9A2-D919-4FEE-9187-152100393AB2"; | 238 "2676A9A2-D919-4FEE-9187-152100393AB2"; |
| 237 | 239 |
| 238 const size_t kMaxMetaTagAttributeLength = 2000; | 240 const size_t kMaxMetaTagAttributeLength = 2000; |
| 239 | 241 |
| 240 } // namespace chrome | 242 } // namespace chrome |
| 241 | 243 |
| 242 #undef FPL | 244 #undef FPL |
| OLD | NEW |