1// Copyright (c) 2011 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#elif defined(CHROMIUM_BUILD) 15#define PRODUCT_STRING "Chromium" 16#else 17#error Unknown branding 18#endif 19#endif // OS_MACOSX 20 21namespace chrome { 22 23const char kChromeVersionEnvVar[] = "CHROME_VERSION"; 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 FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome.exe"); 29const FilePath::CharType kHelperProcessExecutableName[] = FPL("chrome.exe"); 30#elif defined(OS_LINUX) 31const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome"); 32// Helper processes end up with a name of "exe" due to execing via 33// /proc/self/exe. See bug 22703. 34const FilePath::CharType kHelperProcessExecutableName[] = FPL("exe"); 35#elif defined(OS_MACOSX) 36const FilePath::CharType kBrowserProcessExecutableName[] = FPL(PRODUCT_STRING); 37const FilePath::CharType kHelperProcessExecutableName[] = 38 FPL(PRODUCT_STRING " Helper"); 39#endif // OS_* 40#if defined(OS_WIN) 41const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome.exe"); 42const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome.exe"); 43#elif defined(OS_LINUX) 44const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome"); 45const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome"); 46#elif defined(OS_MACOSX) 47const FilePath::CharType kBrowserProcessExecutablePath[] = 48 FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING); 49const FilePath::CharType kHelperProcessExecutablePath[] = 50 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper"); 51#endif // OS_* 52#if defined(OS_MACOSX) 53const FilePath::CharType kFrameworkName[] = 54 FPL(PRODUCT_STRING " Framework.framework"); 55#endif // OS_MACOSX 56const wchar_t kNaClAppName[] = L"nacl64"; 57#if defined(GOOGLE_CHROME_BUILD) 58const wchar_t kBrowserAppName[] = L"Chrome"; 59const char kStatsFilename[] = "ChromeStats2"; 60#else 61const wchar_t kBrowserAppName[] = L"Chromium"; 62const char kStatsFilename[] = "ChromiumStats2"; 63#endif 64 65#if defined(OS_WIN) 66const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow"; 67#endif // defined(OS_WIN) 68 69const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow"; 70const wchar_t kCrashReportLog[] = L"Reported Crashes.txt"; 71const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll"; 72const char kNotSignedInProfile[] = "Default"; 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 kThemePackFilename[] = FPL("Cached Theme.pak"); 85const FilePath::CharType kCookieFilename[] = FPL("Cookies"); 86const FilePath::CharType kExtensionsCookieFilename[] = FPL("Extension Cookies"); 87const FilePath::CharType kIsolatedAppStateDirname[] = FPL("Isolated Apps"); 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 kSafeBrowsingBaseFilename[] = FPL("Safe Browsing"); 93const FilePath::CharType kSafeBrowsingPhishingModelFilename[] = 94 FPL("Safe Browsing Phishing Model v1"); 95const FilePath::CharType kSingletonCookieFilename[] = FPL("SingletonCookie"); 96const FilePath::CharType kSingletonSocketFilename[] = FPL("SingletonSocket"); 97const FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock"); 98const FilePath::CharType kThumbnailsFilename[] = FPL("Thumbnails"); 99const FilePath::CharType kNewTabThumbnailsFilename[] = FPL("Top Thumbnails"); 100const FilePath::CharType kTopSitesFilename[] = FPL("Top Sites"); 101const wchar_t kUserDataDirname[] = L"User Data"; 102const FilePath::CharType kUserScriptsDirname[] = FPL("User Scripts"); 103const FilePath::CharType kWebDataFilename[] = FPL("Web Data"); 104const FilePath::CharType kBookmarksFileName[] = FPL("Bookmarks"); 105const FilePath::CharType kHistoryBookmarksFileName[] = 106 FPL("Bookmarks From History"); 107const FilePath::CharType kCustomDictionaryFileName[] = 108 FPL("Custom Dictionary.txt"); 109const FilePath::CharType kLoginDataFileName[] = FPL("Login Data"); 110const FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons"); 111const FilePath::CharType kWebAppDirname[] = FPL("Web Applications"); 112const FilePath::CharType kServiceStateFileName[] = FPL("Service State"); 113 114// This number used to be limited to 32 in the past (see b/535234). 115const unsigned int kMaxRendererProcessCount = 42; 116const int kStatsMaxThreads = 32; 117const int kStatsMaxCounters = 3000; 118 119// We don't enable record mode in the released product because users could 120// potentially be tricked into running a product in record mode without 121// knowing it. Enable in debug builds. Playback mode is allowed always, 122// because it is useful for testing and not hazardous by itself. 123#ifndef NDEBUG 124const bool kRecordModeEnabled = true; 125#else 126const bool kRecordModeEnabled = false; 127#endif 128 129const int kHistogramSynchronizerReservedSequenceNumber = 0; 130 131const char* const kUnknownLanguageCode = "und"; 132 133const int kJavascriptMessageExpectedDelay = 1000; 134 135} // namespace chrome 136 137#undef FPL 138