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

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

Issue 145643006: Linux: enable SxS (side-by-side) support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 6 years, 10 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/shell_integration_linux.cc ('k') | chrome/installer/linux/debian/build.sh » ('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_version_info.h" 5 #include "chrome/common/chrome_version_info.h"
6 6
7 #include "base/strings/string_util.h"
7 #include "build/build_config.h" 8 #include "build/build_config.h"
8 9
9 namespace chrome { 10 namespace chrome {
10 11
11 // static 12 // static
12 std::string VersionInfo::GetVersionStringModifier() { 13 std::string VersionInfo::GetVersionStringModifier() {
13 char* env = getenv("CHROME_VERSION_EXTRA"); 14 char* env = getenv("CHROME_VERSION_EXTRA");
14 if (!env) { 15 if (!env) {
15 std::string modifier; 16 std::string modifier;
16 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) 17 #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
(...skipping 20 matching lines...) Expand all
37 modifier += " aura"; 38 modifier += " aura";
38 #endif 39 #endif
39 40
40 return modifier; 41 return modifier;
41 } 42 }
42 43
43 // static 44 // static
44 VersionInfo::Channel VersionInfo::GetChannel() { 45 VersionInfo::Channel VersionInfo::GetChannel() {
45 #if defined(GOOGLE_CHROME_BUILD) 46 #if defined(GOOGLE_CHROME_BUILD)
46 std::string channel = GetVersionStringModifier(); 47 std::string channel = GetVersionStringModifier();
48 // There might be suffixes after channel name (e.g. "aura"), so match just
49 // the beginning of version string modifier.
47 if (channel.empty()) { 50 if (channel.empty()) {
48 return CHANNEL_STABLE; 51 return CHANNEL_STABLE;
49 } else if (channel == "beta") { 52 } else if (StartsWithASCII(channel, "beta ", true)) {
50 return CHANNEL_BETA; 53 return CHANNEL_BETA;
51 } else if (channel == "dev") { 54 } else if (StartsWithASCII(channel, "dev ", true)) {
52 return CHANNEL_DEV; 55 return CHANNEL_DEV;
53 } else if (channel == "canary") { 56 } else if (StartsWithASCII(channel, "canary ", true)) {
54 return CHANNEL_CANARY; 57 return CHANNEL_CANARY;
55 } 58 }
56 #endif 59 #endif
57 60
58 return CHANNEL_UNKNOWN; 61 return CHANNEL_UNKNOWN;
59 } 62 }
60 63
61 } // namespace chrome 64 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/installer/linux/debian/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698