OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gcm_desktop_util.h" | 5 #include "chrome/common/gcm_desktop_util.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/sequenced_task_runner.h" | 9 #include "base/sequenced_task_runner.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 return GCMClient::PLATFORM_CROS; | 35 return GCMClient::PLATFORM_CROS; |
36 #elif defined(OS_LINUX) | 36 #elif defined(OS_LINUX) |
37 return GCMClient::PLATFORM_LINUX; | 37 return GCMClient::PLATFORM_LINUX; |
38 #else | 38 #else |
39 // For all other platforms, return as LINUX. | 39 // For all other platforms, return as LINUX. |
40 return GCMClient::PLATFORM_LINUX; | 40 return GCMClient::PLATFORM_LINUX; |
41 #endif | 41 #endif |
42 } | 42 } |
43 | 43 |
44 GCMClient::ChromeChannel GetChannel() { | 44 GCMClient::ChromeChannel GetChannel() { |
45 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 45 version_info::Channel channel = chrome::VersionInfo::GetChannel(); |
46 switch (channel) { | 46 switch (channel) { |
47 case chrome::VersionInfo::CHANNEL_UNKNOWN: | 47 case version_info::Channel::UNKNOWN: |
48 return GCMClient::CHANNEL_UNKNOWN; | 48 return GCMClient::CHANNEL_UNKNOWN; |
49 case chrome::VersionInfo::CHANNEL_CANARY: | 49 case version_info::Channel::CANARY: |
50 return GCMClient::CHANNEL_CANARY; | 50 return GCMClient::CHANNEL_CANARY; |
51 case chrome::VersionInfo::CHANNEL_DEV: | 51 case version_info::Channel::DEV: |
52 return GCMClient::CHANNEL_DEV; | 52 return GCMClient::CHANNEL_DEV; |
53 case chrome::VersionInfo::CHANNEL_BETA: | 53 case version_info::Channel::BETA: |
54 return GCMClient::CHANNEL_BETA; | 54 return GCMClient::CHANNEL_BETA; |
55 case chrome::VersionInfo::CHANNEL_STABLE: | 55 case version_info::Channel::STABLE: |
56 return GCMClient::CHANNEL_STABLE; | 56 return GCMClient::CHANNEL_STABLE; |
57 default: | 57 default: |
58 NOTREACHED(); | 58 NOTREACHED(); |
59 return GCMClient::CHANNEL_UNKNOWN; | 59 return GCMClient::CHANNEL_UNKNOWN; |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 std::string GetVersion() { | 63 std::string GetVersion() { |
64 chrome::VersionInfo version_info; | 64 chrome::VersionInfo version_info; |
65 return version_info.Version(); | 65 return version_info.Version(); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 GetUserAgent(), | 100 GetUserAgent(), |
101 prefs, | 101 prefs, |
102 store_path, | 102 store_path, |
103 request_context, | 103 request_context, |
104 ui_thread, | 104 ui_thread, |
105 io_thread, | 105 io_thread, |
106 blocking_task_runner)); | 106 blocking_task_runner)); |
107 } | 107 } |
108 | 108 |
109 } // namespace gcm | 109 } // namespace gcm |
OLD | NEW |