| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 channel = @"unknown"; | 36 channel = @"unknown"; |
| 37 } | 37 } |
| 38 | 38 |
| 39 return base::SysNSStringToUTF8(channel); | 39 return base::SysNSStringToUTF8(channel); |
| 40 #else | 40 #else |
| 41 return std::string(); | 41 return std::string(); |
| 42 #endif | 42 #endif |
| 43 } | 43 } |
| 44 | 44 |
| 45 // static | 45 // static |
| 46 VersionInfo::Channel VersionInfo::GetChannel() { | 46 version_info::Channel VersionInfo::GetChannel() { |
| 47 #if defined(GOOGLE_CHROME_BUILD) | 47 #if defined(GOOGLE_CHROME_BUILD) |
| 48 std::string channel = GetVersionStringModifier(); | 48 std::string channel = GetVersionStringModifier(); |
| 49 if (channel.empty()) { | 49 if (channel.empty()) { |
| 50 return CHANNEL_STABLE; | 50 return version_info::Channel::STABLE; |
| 51 } else if (channel == "beta") { | 51 } else if (channel == "beta") { |
| 52 return CHANNEL_BETA; | 52 return version_info::Channel::BETA; |
| 53 } else if (channel == "dev") { | 53 } else if (channel == "dev") { |
| 54 return CHANNEL_DEV; | 54 return version_info::Channel::DEV; |
| 55 } else if (channel == "canary") { | 55 } else if (channel == "canary") { |
| 56 return CHANNEL_CANARY; | 56 return version_info::Channel::CANARY; |
| 57 } | 57 } |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 return CHANNEL_UNKNOWN; | 60 return version_info::Channel::UNKNOWN; |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace chrome | 63 } // namespace chrome |
| OLD | NEW |