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

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

Issue 9416106: Add chrome common files to android build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
OLDNEW
(Empty)
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_version_info.h"
6
7 namespace chrome {
8
9 // static
10 std::string VersionInfo::GetVersionStringModifier() {
11 char* env = getenv("CHROME_VERSION_EXTRA");
12 if (!env)
13 return std::string();
14 std::string modifier(env);
15
16 #if defined(GOOGLE_CHROME_BUILD)
17 // Only ever return "", "unknown", "dev" or "beta" in a branded build.
18 if (modifier == "unstable") // linux version of "dev"
19 modifier = "dev";
20 if (modifier == "stable") {
21 modifier = "";
22 } else if ((modifier == "dev") || (modifier == "beta")) {
23 // do nothing.
24 } else {
25 modifier = "unknown";
26 }
27 #endif
28
29 return modifier;
30 }
31
32 // static
33 VersionInfo::Channel VersionInfo::GetChannel() {
34 #if defined(GOOGLE_CHROME_BUILD)
35 std::string channel = GetVersionStringModifier();
36 if (channel.empty()) {
37 return CHANNEL_STABLE;
38 } else if (channel == "beta") {
39 return CHANNEL_BETA;
40 } else if (channel == "dev") {
41 return CHANNEL_DEV;
42 } else if (channel == "canary") {
43 return CHANNEL_CANARY;
44 }
45 #endif
46
47 return CHANNEL_UNKNOWN;
48 }
49
50 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/child_process_logging_posix.cc ('k') | chrome/common/chrome_version_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698