Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: chrome/common/chrome_constants.cc

Issue 7171005: Always support locating Chromium-branded builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable chrome switching in UIPerfTest and PageCyclerReferenceTest Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/test/page_cycler/page_cycler_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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/file_path.h" 7 #include "base/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 #if defined(GOOGLE_CHROME_BUILD) 13 #if defined(GOOGLE_CHROME_BUILD)
13 #define PRODUCT_STRING "Google Chrome" 14 #define PRODUCT_STRING "Google Chrome"
14 #elif defined(CHROMIUM_BUILD) 15 #elif defined(CHROMIUM_BUILD)
15 #define PRODUCT_STRING "Chromium" 16 #define PRODUCT_STRING "Chromium"
16 #else 17 #else
17 #error Unknown branding 18 #error Unknown branding
18 #endif 19 #endif
19 #endif // OS_MACOSX 20 #endif // OS_MACOSX
20 21
21 namespace chrome { 22 namespace chrome {
22 23
23 const char kChromeVersionEnvVar[] = "CHROME_VERSION"; 24 const char kChromeVersionEnvVar[] = "CHROME_VERSION";
24 25
25 // The following should not be used for UI strings; they are meant 26 // 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 // for system strings only. UI changes should be made in the GRD.
28 //
29 // There are four constants used to locate the executable name and path:
30 //
31 // kBrowserProcessExecutableName
32 // kHelperProcessExecutableName
33 // kBrowserProcessExecutablePath
34 // kHelperProcessExecutablePath
35 //
36 // In one condition, our tests will be built using the Chrome branding
37 // though we want to actually execute a Chromium branded application.
38 // This happens for the reference build on Mac. To support that case,
39 // we also include a Chromium version of each of the four constants and
40 // in the UITest class we support switching to that version when told to
41 // do so.
42
27 #if defined(OS_WIN) 43 #if defined(OS_WIN)
44 const FilePath::CharType kBrowserProcessExecutableNameChromium[] =
45 FPL("chrome.exe");
28 const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome.exe"); 46 const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome.exe");
47 const FilePath::CharType kHelperProcessExecutableNameChromium[] =
48 FPL("chrome.exe");
29 const FilePath::CharType kHelperProcessExecutableName[] = FPL("chrome.exe"); 49 const FilePath::CharType kHelperProcessExecutableName[] = FPL("chrome.exe");
30 #elif defined(OS_MACOSX) 50 #elif defined(OS_MACOSX)
51 const FilePath::CharType kBrowserProcessExecutableNameChromium[] =
52 FPL(CHROMIUM_PRODUCT_STRING);
31 const FilePath::CharType kBrowserProcessExecutableName[] = FPL(PRODUCT_STRING); 53 const FilePath::CharType kBrowserProcessExecutableName[] = FPL(PRODUCT_STRING);
54 const FilePath::CharType kHelperProcessExecutableNameChromium[] =
55 FPL(CHROMIUM_PRODUCT_STRING " Helper");
32 const FilePath::CharType kHelperProcessExecutableName[] = 56 const FilePath::CharType kHelperProcessExecutableName[] =
33 FPL(PRODUCT_STRING " Helper"); 57 FPL(PRODUCT_STRING " Helper");
34 #elif defined(OS_POSIX) 58 #elif defined(OS_POSIX)
59 const FilePath::CharType kBrowserProcessExecutableNameChromium[] =
60 FPL("chrome");
35 const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome"); 61 const FilePath::CharType kBrowserProcessExecutableName[] = FPL("chrome");
36 // Helper processes end up with a name of "exe" due to execing via 62 // Helper processes end up with a name of "exe" due to execing via
37 // /proc/self/exe. See bug 22703. 63 // /proc/self/exe. See bug 22703.
64 const FilePath::CharType kHelperProcessExecutableNameChromium[] = FPL("exe");
38 const FilePath::CharType kHelperProcessExecutableName[] = FPL("exe"); 65 const FilePath::CharType kHelperProcessExecutableName[] = FPL("exe");
39 #endif // OS_* 66 #endif // OS_*
67
40 #if defined(OS_WIN) 68 #if defined(OS_WIN)
69 const FilePath::CharType kBrowserProcessExecutablePathChromium[] =
70 FPL("chrome.exe");
41 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome.exe"); 71 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome.exe");
72 const FilePath::CharType kHelperProcessExecutablePathChromium[] =
73 FPL("chrome.exe");
42 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome.exe"); 74 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome.exe");
43 #elif defined(OS_MACOSX) 75 #elif defined(OS_MACOSX)
76 const FilePath::CharType kBrowserProcessExecutablePathChromium[] =
77 FPL(CHROMIUM_PRODUCT_STRING ".app/Contents/MacOS/" CHROMIUM_PRODUCT_STRING);
44 const FilePath::CharType kBrowserProcessExecutablePath[] = 78 const FilePath::CharType kBrowserProcessExecutablePath[] =
45 FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING); 79 FPL(PRODUCT_STRING ".app/Contents/MacOS/" PRODUCT_STRING);
80 const FilePath::CharType kHelperProcessExecutablePathChromium[] =
81 FPL(CHROMIUM_PRODUCT_STRING " Helper.app/Contents/MacOS/"
82 CHROMIUM_PRODUCT_STRING " Helper");
46 const FilePath::CharType kHelperProcessExecutablePath[] = 83 const FilePath::CharType kHelperProcessExecutablePath[] =
47 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper"); 84 FPL(PRODUCT_STRING " Helper.app/Contents/MacOS/" PRODUCT_STRING " Helper");
48 #elif defined(OS_POSIX) 85 #elif defined(OS_POSIX)
86 const FilePath::CharType kBrowserProcessExecutablePathChromium[] =
87 FPL("chrome");
49 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome"); 88 const FilePath::CharType kBrowserProcessExecutablePath[] = FPL("chrome");
89 const FilePath::CharType kHelperProcessExecutablePathChromium[] = FPL("chrome");
50 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome"); 90 const FilePath::CharType kHelperProcessExecutablePath[] = FPL("chrome");
51 #endif // OS_* 91 #endif // OS_*
92
52 #if defined(OS_MACOSX) 93 #if defined(OS_MACOSX)
53 const FilePath::CharType kFrameworkName[] = 94 const FilePath::CharType kFrameworkName[] =
54 FPL(PRODUCT_STRING " Framework.framework"); 95 FPL(PRODUCT_STRING " Framework.framework");
55 #endif // OS_MACOSX 96 #endif // OS_MACOSX
97
56 const wchar_t kNaClAppName[] = L"nacl64"; 98 const wchar_t kNaClAppName[] = L"nacl64";
57 #if defined(GOOGLE_CHROME_BUILD) 99 #if defined(GOOGLE_CHROME_BUILD)
58 const wchar_t kBrowserAppName[] = L"Chrome"; 100 const wchar_t kBrowserAppName[] = L"Chrome";
59 const char kStatsFilename[] = "ChromeStats2"; 101 const char kStatsFilename[] = "ChromeStats2";
60 #else 102 #else
61 const wchar_t kBrowserAppName[] = L"Chromium"; 103 const wchar_t kBrowserAppName[] = L"Chromium";
62 const char kStatsFilename[] = "ChromiumStats2"; 104 const char kStatsFilename[] = "ChromiumStats2";
63 #endif 105 #endif
64 106
65 #if defined(OS_WIN) 107 #if defined(OS_WIN)
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 171
130 const char* const kUnknownLanguageCode = "und"; 172 const char* const kUnknownLanguageCode = "und";
131 173
132 const int kJavascriptMessageExpectedDelay = 1000; 174 const int kJavascriptMessageExpectedDelay = 1000;
133 175
134 const bool kEnableTouchIcon = false; 176 const bool kEnableTouchIcon = false;
135 177
136 } // namespace chrome 178 } // namespace chrome
137 179
138 #undef FPL 180 #undef FPL
OLDNEW
« no previous file with comments | « no previous file | chrome/test/page_cycler/page_cycler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698