OLD | NEW |
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 namespace chrome { | 7 namespace chrome { |
8 | 8 |
9 static VersionInfo::Channel chromeos_channel = VersionInfo::CHANNEL_UNKNOWN; | 9 static version_info::Channel chromeos_channel = version_info::Channel::UNKNOWN; |
10 | 10 |
11 // static | 11 // static |
12 std::string VersionInfo::GetVersionStringModifier() { | 12 std::string VersionInfo::GetVersionStringModifier() { |
13 #if defined(GOOGLE_CHROME_BUILD) | 13 #if defined(GOOGLE_CHROME_BUILD) |
14 switch (chromeos_channel) { | 14 switch (chromeos_channel) { |
15 case CHANNEL_STABLE: | 15 case version_info::Channel::STABLE: |
16 return ""; | 16 return ""; |
17 case CHANNEL_BETA: | 17 case version_info::Channel::BETA: |
18 return "beta"; | 18 return "beta"; |
19 case CHANNEL_DEV: | 19 case version_info::Channel::DEV: |
20 return "dev"; | 20 return "dev"; |
21 case CHANNEL_CANARY: | 21 case version_info::Channel::CANARY: |
22 return "canary"; | 22 return "canary"; |
23 default: | 23 default: |
24 return "unknown"; | 24 return "unknown"; |
25 } | 25 } |
26 #endif | 26 #endif |
27 return std::string(); | 27 return std::string(); |
28 } | 28 } |
29 | 29 |
30 // static | 30 // static |
31 VersionInfo::Channel VersionInfo::GetChannel() { | 31 version_info::Channel VersionInfo::GetChannel() { |
32 return chromeos_channel; | 32 return chromeos_channel; |
33 } | 33 } |
34 | 34 |
35 // static | 35 // static |
36 void VersionInfo::SetChannel(const std::string& channel) { | 36 void VersionInfo::SetChannel(const std::string& channel) { |
37 #if defined(GOOGLE_CHROME_BUILD) | 37 #if defined(GOOGLE_CHROME_BUILD) |
38 if (channel == "stable-channel") { | 38 if (channel == "stable-channel") { |
39 chromeos_channel = CHANNEL_STABLE; | 39 chromeos_channel = version_info::Channel::STABLE; |
40 } else if (channel == "beta-channel") { | 40 } else if (channel == "beta-channel") { |
41 chromeos_channel = CHANNEL_BETA; | 41 chromeos_channel = version_info::Channel::BETA; |
42 } else if (channel == "dev-channel") { | 42 } else if (channel == "dev-channel") { |
43 chromeos_channel = CHANNEL_DEV; | 43 chromeos_channel = version_info::Channel::DEV; |
44 } else if (channel == "canary-channel") { | 44 } else if (channel == "canary-channel") { |
45 chromeos_channel = CHANNEL_CANARY; | 45 chromeos_channel = version_info::Channel::CANARY; |
46 } | 46 } |
47 #endif | 47 #endif |
48 } | 48 } |
49 | 49 |
50 } // namespace chrome | 50 } // namespace chrome |
OLD | NEW |