| 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 "components/gcm_driver/gcm_desktop_utils.h" | 5 #include "components/gcm_driver/gcm_desktop_utils.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 case version_info::Channel::UNKNOWN: | 46 case version_info::Channel::UNKNOWN: |
| 47 return GCMClient::CHANNEL_UNKNOWN; | 47 return GCMClient::CHANNEL_UNKNOWN; |
| 48 case version_info::Channel::CANARY: | 48 case version_info::Channel::CANARY: |
| 49 return GCMClient::CHANNEL_CANARY; | 49 return GCMClient::CHANNEL_CANARY; |
| 50 case version_info::Channel::DEV: | 50 case version_info::Channel::DEV: |
| 51 return GCMClient::CHANNEL_DEV; | 51 return GCMClient::CHANNEL_DEV; |
| 52 case version_info::Channel::BETA: | 52 case version_info::Channel::BETA: |
| 53 return GCMClient::CHANNEL_BETA; | 53 return GCMClient::CHANNEL_BETA; |
| 54 case version_info::Channel::STABLE: | 54 case version_info::Channel::STABLE: |
| 55 return GCMClient::CHANNEL_STABLE; | 55 return GCMClient::CHANNEL_STABLE; |
| 56 default: | |
| 57 NOTREACHED(); | |
| 58 return GCMClient::CHANNEL_UNKNOWN; | |
| 59 } | 56 } |
| 57 NOTREACHED(); |
| 58 return GCMClient::CHANNEL_UNKNOWN; |
| 60 } | 59 } |
| 61 | 60 |
| 62 std::string GetVersion() { | 61 std::string GetVersion() { |
| 63 return version_info::GetVersionNumber(); | 62 return version_info::GetVersionNumber(); |
| 64 } | 63 } |
| 65 | 64 |
| 66 GCMClient::ChromeBuildInfo GetChromeBuildInfo( | 65 GCMClient::ChromeBuildInfo GetChromeBuildInfo( |
| 67 version_info::Channel channel, | 66 version_info::Channel channel, |
| 68 const std::string& product_category_for_subtypes) { | 67 const std::string& product_category_for_subtypes) { |
| 69 GCMClient::ChromeBuildInfo chrome_build_info; | 68 GCMClient::ChromeBuildInfo chrome_build_info; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) { | 101 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner) { |
| 103 return std::unique_ptr<GCMDriver>(new GCMDriverDesktop( | 102 return std::unique_ptr<GCMDriver>(new GCMDriverDesktop( |
| 104 std::move(gcm_client_factory), | 103 std::move(gcm_client_factory), |
| 105 GetChromeBuildInfo(channel, product_category_for_subtypes), | 104 GetChromeBuildInfo(channel, product_category_for_subtypes), |
| 106 GetChannelStatusRequestUrl(channel), GetUserAgent(channel), prefs, | 105 GetChannelStatusRequestUrl(channel), GetUserAgent(channel), prefs, |
| 107 store_path, request_context, ui_task_runner, io_task_runner, | 106 store_path, request_context, ui_task_runner, io_task_runner, |
| 108 blocking_task_runner)); | 107 blocking_task_runner)); |
| 109 } | 108 } |
| 110 | 109 |
| 111 } // namespace gcm | 110 } // namespace gcm |
| OLD | NEW |