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

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

Issue 237963002: linux_aura: Remove the 'a' badge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix official build. Created 6 years, 8 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 | « chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc ('k') | no next file » | 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_version_info.h" 5 #include "chrome/common/chrome_version_info.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 namespace chrome { 10 namespace chrome {
11 11
12 // static 12 // static
13 std::string VersionInfo::GetVersionStringModifier() { 13 std::string VersionInfo::GetVersionStringModifier() {
14 char* env = getenv("CHROME_VERSION_EXTRA"); 14 char* env = getenv("CHROME_VERSION_EXTRA");
15 if (!env) { 15 if (!env)
16 std::string modifier; 16 return std::string();
17 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
18 modifier = "aura";
19 #endif
20 return modifier;
21 }
22 std::string modifier(env); 17 std::string modifier(env);
23 18
24 #if defined(GOOGLE_CHROME_BUILD) 19 #if defined(GOOGLE_CHROME_BUILD)
25 // Only ever return "", "unknown", "dev" or "beta" in a branded build. 20 // Only ever return "", "unknown", "dev" or "beta" in a branded build.
26 if (modifier == "unstable") // linux version of "dev" 21 if (modifier == "unstable") // linux version of "dev"
27 modifier = "dev"; 22 modifier = "dev";
28 if (modifier == "stable") { 23 if (modifier == "stable") {
29 modifier = ""; 24 modifier = "";
30 } else if ((modifier == "dev") || (modifier == "beta")) { 25 } else if ((modifier == "dev") || (modifier == "beta")) {
31 // do nothing. 26 // do nothing.
32 } else { 27 } else {
33 modifier = "unknown"; 28 modifier = "unknown";
34 } 29 }
35 #endif 30 #endif
36 31
37 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
38 modifier += " aura";
39 #endif
40
41 return modifier; 32 return modifier;
42 } 33 }
43 34
44 // static 35 // static
45 VersionInfo::Channel VersionInfo::GetChannel() { 36 VersionInfo::Channel VersionInfo::GetChannel() {
46 #if defined(GOOGLE_CHROME_BUILD) 37 #if defined(GOOGLE_CHROME_BUILD)
47 std::string channel = GetVersionStringModifier(); 38 std::string channel = GetVersionStringModifier();
48 // There might be suffixes after channel name (e.g. "aura"), so match just 39 // There might be suffixes after channel name (e.g. "aura"), so match just
49 // the beginning of version string modifier. 40 // the beginning of version string modifier.
50 if (channel.empty()) { 41 if (channel.empty()) {
51 return CHANNEL_STABLE; 42 return CHANNEL_STABLE;
52 } else if (StartsWithASCII(channel, "beta ", true)) { 43 } else if (StartsWithASCII(channel, "beta ", true)) {
53 return CHANNEL_BETA; 44 return CHANNEL_BETA;
54 } else if (StartsWithASCII(channel, "dev ", true)) { 45 } else if (StartsWithASCII(channel, "dev ", true)) {
55 return CHANNEL_DEV; 46 return CHANNEL_DEV;
56 } else if (StartsWithASCII(channel, "canary ", true)) { 47 } else if (StartsWithASCII(channel, "canary ", true)) {
57 return CHANNEL_CANARY; 48 return CHANNEL_CANARY;
58 } 49 }
59 #endif 50 #endif
60 51
61 return CHANNEL_UNKNOWN; 52 return CHANNEL_UNKNOWN;
62 } 53 }
63 54
64 } // namespace chrome 55 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698