chrome_constants.cc revision 3345a6884c488ff3a535c2c9acdd33d74b37e311
1// Copyright (c) 2006-2008 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 "base/file_path.h" 8 9#define FPL FILE_PATH_LITERAL 10 11#if defined(OS_MACOSX) 12#if defined(GOOGLE_CHROME_BUILD) 13#define PRODUCT_STRING "Google Chrome" 14#define PRODUCT_STRING_W L"Google Chrome" 15#elif defined(CHROMIUM_BUILD) 16#define PRODUCT_STRING "Chromium" 17#define PRODUCT_STRING_W L"Chromium" 18#else 19#error Unknown branding 20#endif 21#endif // OS_MACOSX 22 23namespace chrome { 24 25// The following should not be used for UI strings; they are meant 26// for system strings only. UI changes should be made in the GRD. 27#if defined(OS_WIN) 28const wchar_t kBrowserProcessExecutableName[] = L"chrome.exe"; 29const wchar_t kHelperProcessExecutableName[] = L"chrome.exe"; 30#elif defined(OS_LINUX) 31const wchar_t kBrowserProcessExecutableName[] = L"chrome"; 32// Helper processes end up with a name of "exe" due to execing via 33// /proc/self/exe. See bug 22703. 34const wchar_t kHelperProcessExecutableName[] = L"exe"; 35#elif defined(OS_MACOSX) 36const wchar_t kBrowserProcessExecutableName[] = PRODUCT_STRING_W; 37const wchar_t kHelperProcessExecutableName[] = PRODUCT_STRING_W L" Helper"; 38#endif // OS_* 39#if defined(OS_WIN) 40const wchar_t kBrowserProcessExecutablePath[] = L"chrome.exe"; 41const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome.exe"); 42#elif defined(OS_LINUX) 43const wchar_t kBrowserProcessExecutablePath[] = L"chrome"; 44const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome"); 45#elif defined(OS_MACOSX) 46const wchar_t kBrowserProcessExecutablePath[] = 47 PRODUCT_STRING_W L".app/Contents/MacOS/" PRODUCT_STRING_W; 48const FilePath::CharType kHelperProcessExecutablePath[] = 49 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper"); 50#endif // OS_* 51#if defined(OS_MACOSX) 52const FilePath::CharType kFrameworkName[] = 53 FPL(PRODUCT_STRING " Framework.framework"); 54#endif // OS_MACOSX 55const wchar_t kNaClAppName[] = L"nacl64"; 56#if defined(GOOGLE_CHROME_BUILD) 57const wchar_t kBrowserAppName[] = L"Chrome"; 58const char kStatsFilename[] = "ChromeStats2"; 59#else 60const wchar_t kBrowserAppName[] = L"Chromium"; 61const char kStatsFilename[] = "ChromiumStats2"; 62#endif 63 64#if defined(OS_WIN) 65const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow"; 66#endif // defined(OS_WIN) 67 68const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow"; 69const wchar_t kCrashReportLog[] = L"Reported Crashes.txt"; 70const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll"; 71const wchar_t kNotSignedInProfile[] = L"Default"; 72const wchar_t kNotSignedInID[] = L"not-signed-in"; 73const wchar_t kBrowserResourcesDll[] = L"chrome.dll"; 74const FilePath::CharType kExtensionFileExtension[] = FPL(".crx"); 75const FilePath::CharType kExtensionKeyFileExtension[] = FPL(".pem"); 76 77// filenames 78const FilePath::CharType kArchivedHistoryFilename[] = FPL("Archived History"); 79const FilePath::CharType kCacheDirname[] = FPL("Cache"); 80const FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache"); 81const FilePath::CharType kOffTheRecordMediaCacheDirname[] = 82 FPL("Incognito Media Cache"); 83const FilePath::CharType kAppCacheDirname[] = FPL("Application Cache"); 84const FilePath::CharType kChromePluginDataDirname[] = FPL("Plugin Data"); 85const FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak"); 86const FilePath::CharType kCookieFilename[] = FPL("Cookies"); 87const FilePath::CharType kExtensionsCookieFilename[] = FPL("Extension Cookies"); 88const FilePath::CharType kFaviconsFilename[] = FPL("Favicons"); 89const FilePath::CharType kHistoryFilename[] = FPL("History"); 90const FilePath::CharType kLocalStateFilename[] = FPL("Local State"); 91const FilePath::CharType kPreferencesFilename[] = FPL("Preferences"); 92const FilePath::CharType kSafeBrowsingFilename[] = FPL("Safe Browsing Bloom"); 93const FilePath::CharType kSingletonCookieFilename[] = FPL("SingletonCookie"); 94const FilePath::CharType kSingletonSocketFilename[] = FPL("SingletonSocket"); 95const FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock"); 96const FilePath::CharType kThumbnailsFilename[] = FPL("Thumbnails"); 97const FilePath::CharType kNewTabThumbnailsFilename[] = FPL("Top Thumbnails"); 98const FilePath::CharType kTopSitesFilename[] = FPL("Top Sites"); 99const wchar_t kUserDataDirname[] = L"User Data"; 100const FilePath::CharType kUserScriptsDirname[] = FPL("User Scripts"); 101const FilePath::CharType kWebDataFilename[] = FPL("Web Data"); 102const FilePath::CharType kBookmarksFileName[] = FPL("Bookmarks"); 103const FilePath::CharType kHistoryBookmarksFileName[] = 104 FPL("Bookmarks From History"); 105const FilePath::CharType kCustomDictionaryFileName[] = 106 FPL("Custom Dictionary.txt"); 107const FilePath::CharType kLoginDataFileName[] = FPL("Login Data"); 108const FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons"); 109const FilePath::CharType kWebAppDirname[] = FPL("Web Applications"); 110const FilePath::CharType kServiceStateFileName[] = FPL("Service State"); 111 112// This number used to be limited to 32 in the past (see b/535234). 113const unsigned int kMaxRendererProcessCount = 42; 114const int kStatsMaxThreads = 32; 115const int kStatsMaxCounters = 300; 116 117const size_t kMaxTitleChars = 4 * 1024; 118const size_t kMaxURLChars = 2 * 1024 * 1024; 119const size_t kMaxURLDisplayChars = 32 * 1024; 120 121// We don't enable record mode in the released product because users could 122// potentially be tricked into running a product in record mode without 123// knowing it. Enable in debug builds. Playback mode is allowed always, 124// because it is useful for testing and not hazardous by itself. 125#ifndef NDEBUG 126const bool kRecordModeEnabled = true; 127#else 128const bool kRecordModeEnabled = false; 129#endif 130 131const int kHistogramSynchronizerReservedSequenceNumber = 0; 132 133const int kMaxSessionHistoryEntries = 50; 134 135const wchar_t kChromiumRendererIdProperty[] = L"ChromiumRendererId"; 136 137const char* const kUnknownLanguageCode = "und"; 138 139} // namespace chrome 140 141#undef FPL 142