| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/common/channel_info.h" | 5 #include "ios/chrome/common/channel_info.h" |
| 6 | 6 |
| 7 #include <dispatch/dispatch.h> | 7 #include <dispatch/dispatch.h> |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #import "base/mac/bundle_locations.h" | 10 #import "base/mac/bundle_locations.h" |
| 11 #include "base/profiler/scoped_tracker.h" | 11 #include "base/profiler/scoped_tracker.h" |
| 12 #import "base/strings/sys_string_conversions.h" | 12 #import "base/strings/sys_string_conversions.h" |
| 13 #include "components/version_info/version_info.h" | 13 #include "components/version_info/version_info.h" |
| 14 #include "components/version_info/version_string.h" |
| 14 | 15 |
| 15 #if !defined(__has_feature) || !__has_feature(objc_arc) | 16 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 16 #error "This file requires ARC support." | 17 #error "This file requires ARC support." |
| 17 #endif | 18 #endif |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 | 21 |
| 21 #if defined(GOOGLE_CHROME_BUILD) | 22 #if defined(GOOGLE_CHROME_BUILD) |
| 22 // Channel of the running application, initialized by the first call to | 23 // Channel of the running application, initialized by the first call to |
| 23 // GetChannel() and cached for the whole application lifetime. | 24 // GetChannel() and cached for the whole application lifetime. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } else if ([channel isEqualToString:@"canary"]) { | 84 } else if ([channel isEqualToString:@"canary"]) { |
| 84 g_channel = version_info::Channel::CANARY; | 85 g_channel = version_info::Channel::CANARY; |
| 85 } | 86 } |
| 86 }); | 87 }); |
| 87 | 88 |
| 88 return g_channel; | 89 return g_channel; |
| 89 #else | 90 #else |
| 90 return version_info::Channel::UNKNOWN; | 91 return version_info::Channel::UNKNOWN; |
| 91 #endif | 92 #endif |
| 92 } | 93 } |
| OLD | NEW |