|
| 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 | +#include "chrome/common/chrome_constants.h" |
| 6 | + |
| 7 | +#include "build/build_config.h" |
| 8 | +#include "chrome/common/chrome_version.h" |
| 9 | + |
| 10 | +#define FPL FILE_PATH_LITERAL |
| 11 | + |
| 12 | +#if defined(OS_MAC) |
| 13 | +#define PRODUCT_STRING BEACON_PRODUCT_STRING |
| 14 | +#endif // defined(OS_MAC) |
| 15 | + |
| 16 | + |
| 17 | +namespace chrome { |
| 18 | + |
| 19 | +const char kChromeVersion[] = CHROME_VERSION_STRING; |
| 20 | + |
| 21 | +// The following should not be used for UI strings; they are meant |
| 22 | +// for system strings only. UI changes should be made in the GRD. |
| 23 | +// |
| 24 | +// There are four constants used to locate the executable name and path: |
| 25 | +// |
| 26 | +// kBrowserProcessExecutableName |
| 27 | +// kHelperProcessExecutableName |
| 28 | +// kBrowserProcessExecutablePath |
| 29 | +// kHelperProcessExecutablePath |
| 30 | +// |
| 31 | +// In one condition, our tests will be built using the Chrome branding |
| 32 | +// though we want to actually execute a Chromium branded application. |
| 33 | +// This happens for the reference build on Mac. To support that case, |
| 34 | +// we also include a Chromium version of each of the four constants and |
| 35 | +// in the UITest class we support switching to that version when told to |
| 36 | +// do so. |
| 37 | + |
| 38 | +#if defined(OS_WIN) |
| 39 | +const base::FilePath::CharType kBrowserProcessExecutableName[] = |
| 40 | + FPL("beacon.exe"); |
| 41 | +const base::FilePath::CharType kHelperProcessExecutableName[] = |
| 42 | + FPL("beacon.exe"); |
| 43 | +#elif defined(OS_MAC) |
| 44 | +const base::FilePath::CharType kBrowserProcessExecutableName[] = |
| 45 | + FPL(PRODUCT_STRING); |
| 46 | +const base::FilePath::CharType kHelperProcessExecutableName[] = |
| 47 | + FPL(PRODUCT_STRING " Helper"); |
| 48 | +#elif defined(OS_ANDROID) |
| 49 | +// NOTE: Keep it synced with the process names defined in AndroidManifest.xml. |
| 50 | +const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("beacon"); |
| 51 | +const base::FilePath::CharType kHelperProcessExecutableName[] = |
| 52 | + FPL("sandboxed_process"); |
| 53 | +#elif defined(OS_POSIX) |
| 54 | +const base::FilePath::CharType kBrowserProcessExecutableName[] = FPL("beacon"); |
| 55 | +// Helper processes end up with a name of "exe" due to execing via |
| 56 | +// /proc/self/exe. See bug 22703. |
| 57 | +const base::FilePath::CharType kHelperProcessExecutableName[] = FPL("exe"); |
| 58 | +#endif // OS_* |
| 59 | + |
| 60 | +#if defined(OS_WIN) |
| 61 | +const base::FilePath::CharType kBrowserProcessExecutablePath[] = |
| 62 | + FPL("beacon.exe"); |
| 63 | +const base::FilePath::CharType kHelperProcessExecutablePath[] = |
| 64 | + FPL("beacon.exe"); |
| 65 | +#elif defined(OS_MAC) |
| 66 | +const base::FilePath::CharType kBrowserProcessExecutablePath[] = |
| 67 | + FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING); |
| 68 | +const base::FilePath::CharType kHelperProcessExecutablePath[] = |
| 69 | + FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper"); |
| 70 | +#elif defined(OS_ANDROID) |
| 71 | +const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("beacon"); |
| 72 | +const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("beacon"); |
| 73 | +#elif defined(OS_POSIX) |
| 74 | +const base::FilePath::CharType kBrowserProcessExecutablePath[] = FPL("beacon"); |
| 75 | +const base::FilePath::CharType kHelperProcessExecutablePath[] = FPL("beacon"); |
| 76 | +#endif // OS_* |
| 77 | + |
| 78 | +#if defined(OS_MAC) |
| 79 | +const base::FilePath::CharType kFrameworkName[] = |
| 80 | + FPL(PRODUCT_STRING " Framework.framework"); |
| 81 | +const base::FilePath::CharType kFrameworkExecutableName[] = |
| 82 | + FPL(PRODUCT_STRING " Framework"); |
| 83 | +const char kMacHelperSuffixAlerts[] = " (Alerts)"; |
| 84 | +#endif // OS_MAC |
| 85 | + |
| 86 | +#if defined(OS_WIN) |
| 87 | +const base::FilePath::CharType kBrowserResourcesDll[] = FPL("chrome.dll"); |
| 88 | +const base::FilePath::CharType kElfDll[] = FPL("chrome_elf.dll"); |
| 89 | +const base::FilePath::CharType kStatusTrayWindowClass[] = |
| 90 | + FPL("Chrome_StatusTrayWindow"); |
| 91 | +#endif // defined(OS_WIN) |
| 92 | + |
| 93 | +const char kInitialProfile[] = "Default"; |
| 94 | +const char kMultiProfileDirPrefix[] = "Profile "; |
| 95 | +const base::FilePath::CharType kGuestProfileDir[] = FPL("Guest Profile"); |
| 96 | +const base::FilePath::CharType kSystemProfileDir[] = FPL("System Profile"); |
| 97 | + |
| 98 | +// filenames |
| 99 | +const base::FilePath::CharType kCacheDirname[] = FPL("Cache"); |
| 100 | +const base::FilePath::CharType kCookieFilename[] = FPL("Cookies"); |
| 101 | +const base::FilePath::CharType kCRLSetFilename[] = |
| 102 | + FPL("Certificate Revocation Lists"); |
| 103 | +const base::FilePath::CharType kCustomDictionaryFileName[] = |
| 104 | + FPL("Custom Dictionary.txt"); |
| 105 | +const base::FilePath::CharType kDownloadServiceStorageDirname[] = |
| 106 | + FPL("Download Service"); |
| 107 | +const base::FilePath::CharType kExtensionActivityLogFilename[] = |
| 108 | + FPL("Extension Activity"); |
| 109 | +const base::FilePath::CharType kExtensionsCookieFilename[] = |
| 110 | + FPL("Extension Cookies"); |
| 111 | +const base::FilePath::CharType kFeatureEngagementTrackerStorageDirname[] = |
| 112 | + FPL("Feature Engagement Tracker"); |
| 113 | +const base::FilePath::CharType kFirstRunSentinel[] = FPL("First Run"); |
| 114 | +const base::FilePath::CharType kGCMStoreDirname[] = FPL("GCM Store"); |
| 115 | +const base::FilePath::CharType kLocalStateFilename[] = FPL("Local State"); |
| 116 | +const base::FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache"); |
| 117 | +const base::FilePath::CharType kNetworkPersistentStateFilename[] = |
| 118 | + FPL("Network Persistent State"); |
| 119 | +const base::FilePath::CharType kNetworkDataDirname[] = FPL("Network"); |
| 120 | +const base::FilePath::CharType kNotificationSchedulerStorageDirname[] = |
| 121 | + FPL("Notification Scheduler"); |
| 122 | +const base::FilePath::CharType kOfflinePageArchivesDirname[] = |
| 123 | + FPL("Offline Pages/archives"); |
| 124 | +const base::FilePath::CharType kOfflinePageMetadataDirname[] = |
| 125 | + FPL("Offline Pages/metadata"); |
| 126 | +const base::FilePath::CharType kOfflinePagePrefetchStoreDirname[] = |
| 127 | + FPL("Offline Pages/prefech_store"); |
| 128 | +const base::FilePath::CharType kOfflinePageRequestQueueDirname[] = |
| 129 | + FPL("Offline Pages/request_queue"); |
| 130 | +const base::FilePath::CharType kPreferencesFilename[] = FPL("Preferences"); |
| 131 | +const base::FilePath::CharType kPreviewsOptOutDBFilename[] = |
| 132 | + FPL("previews_opt_out.db"); |
| 133 | +const base::FilePath::CharType kQueryTileStorageDirname[] = FPL("Query Tiles"); |
| 134 | +const base::FilePath::CharType kReadmeFilename[] = FPL("README"); |
| 135 | +const base::FilePath::CharType kSCTAuditingPendingReportsFileName[] = |
| 136 | + FPL("SCT Auditing Pending Reports"); |
| 137 | +const base::FilePath::CharType kSecurePreferencesFilename[] = |
| 138 | + FPL("Secure Preferences"); |
| 139 | +const base::FilePath::CharType kServiceStateFileName[] = FPL("Service State"); |
| 140 | +const base::FilePath::CharType kSegmentationPlatformStorageDirName[] = |
| 141 | + FPL("Segmentation Platform"); |
| 142 | +const base::FilePath::CharType kSingletonCookieFilename[] = |
| 143 | + FPL("SingletonCookie"); |
| 144 | +const base::FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock"); |
| 145 | +const base::FilePath::CharType kSingletonSocketFilename[] = |
| 146 | + FPL("SingletonSocket"); |
| 147 | +const base::FilePath::CharType kSupervisedUserSettingsFilename[] = |
| 148 | + FPL("Managed Mode Settings"); |
| 149 | +const base::FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak"); |
| 150 | +const base::FilePath::CharType kTransportSecurityPersisterFilename[] = |
| 151 | + FPL("TransportSecurity"); |
| 152 | +const base::FilePath::CharType kTrustTokenFilename[] = FPL("Trust Tokens"); |
| 153 | +const base::FilePath::CharType kVideoTutorialsStorageDirname[] = |
| 154 | + FPL("Video Tutorials"); |
| 155 | +const base::FilePath::CharType kWebAppDirname[] = FPL("Web Applications"); |
| 156 | +// Only use if the ENABLE_REPORTING build flag is true |
| 157 | +const base::FilePath::CharType kReportingAndNelStoreFilename[] = |
| 158 | + FPL("Reporting and NEL"); |
| 159 | + |
| 160 | +#if defined(OS_WIN) |
| 161 | +const base::FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons"); |
| 162 | +#endif |
| 163 | + |
| 164 | +// directory names |
| 165 | +#if defined(OS_WIN) |
| 166 | +const wchar_t kUserDataDirname[] = L"User Data"; |
| 167 | +#endif |
| 168 | + |
| 169 | +const float kMaxShareOfExtensionProcesses = 0.30f; |
| 170 | + |
| 171 | +// This GUID is associated with any 'don't ask me again' settings that the |
| 172 | +// user can select for different file types. |
| 173 | +// {2676A9A2-D919-4FEE-9187-152100393AB2} |
| 174 | +const char kApplicationClientIDStringForAVScanning[] = |
| 175 | + "2676A9A2-D919-4FEE-9187-152100393AB2"; |
| 176 | + |
| 177 | +} // namespace chrome |
| 178 | + |
| 179 | +#undef FPL |
0 commit comments