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

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

Issue 8883043: Chrome version info getter for Chrome OS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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/chrome_common.gypi ('k') | chrome/common/chrome_version_info_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
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 #include "chrome/browser/chromeos/system/statistics_provider.h"
8
9 namespace chrome {
10
11 const char kChromeOSReleaseTrack[] = "CHROMEOS_RELEASE_TRACK";
12
13 // static
14 std::string VersionInfo::GetVersionStringModifier() {
haraken 2011/12/12 06:30:48 In order to make it consistent with other platform
kochi 2011/12/13 09:32:49 Done.
15 std::string channel;
16 if (chromeos::system::StatisticsProvider::GetInstance()->
17 GetMachineStatistic(kChromeOSReleaseTrack, &channel)) {
18 if (channel == "stable-channel") {
19 return "";
20 } else if (channel == "beta-channel") {
21 return "beta";
22 } else if (channel == "dev-channel") {
23 return "dev";
24 } else if (channel == "canary-channel") {
25 return "canary";
26 }
27 }
28 return "unknown";
29 }
30
31 // static
32 VersionInfo::Channel VersionInfo::GetChannel() {
haraken 2011/12/12 06:30:48 Ditto.
kochi 2011/12/13 09:32:49 Done.
33 std::string channel = GetVersionStringModifier();
34 if (channel.empty()) {
35 return CHANNEL_STABLE;
36 } else if (channel == "beta") {
37 return CHANNEL_BETA;
38 } else if (channel == "dev") {
39 return CHANNEL_DEV;
40 } else if (channel == "canary") {
41 return CHANNEL_CANARY;
42 }
43
44 return CHANNEL_UNKNOWN;
45 }
46
47 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/chrome_version_info_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698