Home | History | Annotate | Download | only in common
      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 
     21 namespace chrome {
     22 
     23 const 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)
     28 const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome.exe");
     29 const FilePath::CharType kHelperProcessExecutableName[] = FPL("chrome.exe");
     30 #elif defined(OS_LINUX)
     31 const 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.
     34 const FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");
     35 #elif defined(OS_MACOSX)
     36 const FilePath::CharType kBrowserProcessExecutableName[] = FPL(PRODUCT_STRING);
     37 const FilePath::CharType kHelperProcessExecutableName[] =
     38     FPL(PRODUCT_STRING " Helper");
     39 #endif  // OS_*
     40 #if defined(OS_WIN)
     41 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome.exe");
     42 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome.exe");
     43 #elif defined(OS_LINUX)
     44 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
     45 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
     46 #elif defined(OS_MACOSX)
     47 const FilePath::CharType kBrowserProcessExecutablePath[] =
     48     FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING);
     49 const FilePath::CharType kHelperProcessExecutablePath[] =
     50     FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
     51 #endif  // OS_*
     52 #if defined(OS_MACOSX)
     53 const FilePath::CharType kFrameworkName[] =
     54     FPL(PRODUCT_STRING " Framework.framework");
     55 #endif  // OS_MACOSX
     56 const wchar_t kNaClAppName[] = L"nacl64";
     57 #if defined(GOOGLE_CHROME_BUILD)
     58 const wchar_t kBrowserAppName[] = L"Chrome";
     59 const char    kStatsFilename[] = "ChromeStats2";
     60 #else
     61 const wchar_t kBrowserAppName[] = L"Chromium";
     62 const char    kStatsFilename[] = "ChromiumStats2";
     63 #endif
     64 
     65 #if defined(OS_WIN)
     66 const wchar_t kStatusTrayWindowClass[] = L"Chrome_StatusTrayWindow";
     67 #endif  // defined(OS_WIN)
     68 
     69 const wchar_t kMessageWindowClass[] = L"Chrome_MessageWindow";
     70 const wchar_t kCrashReportLog[] = L"Reported Crashes.txt";
     71 const wchar_t kTestingInterfaceDLL[] = L"testing_interface.dll";
     72 const char    kNotSignedInProfile[] = "Default";
     73 const wchar_t kBrowserResourcesDll[] = L"chrome.dll";
     74 const FilePath::CharType kExtensionFileExtension[] = FPL(".crx");
     75 const FilePath::CharType kExtensionKeyFileExtension[] = FPL(".pem");
     76 
     77 // filenames
     78 const FilePath::CharType kArchivedHistoryFilename[] = FPL("Archived History");
     79 const FilePath::CharType kCacheDirname[] = FPL("Cache");
     80 const FilePath::CharType kMediaCacheDirname[] = FPL("Media Cache");
     81 const FilePath::CharType kOffTheRecordMediaCacheDirname[] =
     82     FPL("Incognito Media Cache");
     83 const FilePath::CharType kAppCacheDirname[] = FPL("Application Cache");
     84 const FilePath::CharType kThemePackFilename[] = FPL("Cached Theme.pak");
     85 const FilePath::CharType kCookieFilename[] = FPL("Cookies");
     86 const FilePath::CharType kExtensionsCookieFilename[] = FPL("Extension Cookies");
     87 const FilePath::CharType kIsolatedAppStateDirname[] = FPL("Isolated Apps");
     88 const FilePath::CharType kFaviconsFilename[] = FPL("Favicons");
     89 const FilePath::CharType kHistoryFilename[] = FPL("History");
     90 const FilePath::CharType kLocalStateFilename[] = FPL("Local State");
     91 const FilePath::CharType kPreferencesFilename[] = FPL("Preferences");
     92 const FilePath::CharType kSafeBrowsingBaseFilename[] = FPL("Safe Browsing");
     93 const FilePath::CharType kSafeBrowsingPhishingModelFilename[] =
     94     FPL("Safe Browsing Phishing Model v1");
     95 const FilePath::CharType kSingletonCookieFilename[] = FPL("SingletonCookie");
     96 const FilePath::CharType kSingletonSocketFilename[] = FPL("SingletonSocket");
     97 const FilePath::CharType kSingletonLockFilename[] = FPL("SingletonLock");
     98 const FilePath::CharType kThumbnailsFilename[] = FPL("Thumbnails");
     99 const FilePath::CharType kNewTabThumbnailsFilename[] = FPL("Top Thumbnails");
    100 const FilePath::CharType kTopSitesFilename[] = FPL("Top Sites");
    101 const wchar_t kUserDataDirname[] = L"User Data";
    102 const FilePath::CharType kUserScriptsDirname[] = FPL("User Scripts");
    103 const FilePath::CharType kWebDataFilename[] = FPL("Web Data");
    104 const FilePath::CharType kBookmarksFileName[] = FPL("Bookmarks");
    105 const FilePath::CharType kHistoryBookmarksFileName[] =
    106     FPL("Bookmarks From History");
    107 const FilePath::CharType kCustomDictionaryFileName[] =
    108     FPL("Custom Dictionary.txt");
    109 const FilePath::CharType kLoginDataFileName[] = FPL("Login Data");
    110 const FilePath::CharType kJumpListIconDirname[] = FPL("JumpListIcons");
    111 const FilePath::CharType kWebAppDirname[] = FPL("Web Applications");
    112 const FilePath::CharType kServiceStateFileName[] = FPL("Service State");
    113 
    114 // This number used to be limited to 32 in the past (see b/535234).
    115 const unsigned int kMaxRendererProcessCount = 42;
    116 const int kStatsMaxThreads = 32;
    117 const 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
    124 const bool kRecordModeEnabled = true;
    125 #else
    126 const bool kRecordModeEnabled = false;
    127 #endif
    128 
    129 const int kHistogramSynchronizerReservedSequenceNumber = 0;
    130 
    131 const char* const kUnknownLanguageCode = "und";
    132 
    133 const int kJavascriptMessageExpectedDelay = 1000;
    134 
    135 }  // namespace chrome
    136 
    137 #undef FPL
    138