| 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 "remoting/signaling/xmpp_signal_strategy.h" | 5 #include "remoting/signaling/xmpp_signal_strategy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 const int kDefaultXmppPort = 5222; | 41 const int kDefaultXmppPort = 5222; |
| 42 const int kDefaultHttpsPort = 443; | 42 const int kDefaultHttpsPort = 443; |
| 43 | 43 |
| 44 namespace remoting { | 44 namespace remoting { |
| 45 | 45 |
| 46 XmppSignalStrategy::XmppServerConfig::XmppServerConfig() {} | 46 XmppSignalStrategy::XmppServerConfig::XmppServerConfig() {} |
| 47 XmppSignalStrategy::XmppServerConfig::~XmppServerConfig() {} | 47 XmppSignalStrategy::XmppServerConfig::~XmppServerConfig() {} |
| 48 | 48 |
| 49 XmppSignalStrategy::XmppSignalStrategy( | 49 XmppSignalStrategy::XmppSignalStrategy( |
| 50 net::ClientSocketFactory* socket_factory, | 50 net::ClientSocketFactory* socket_factory, |
| 51 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 51 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, |
| 52 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config) | 52 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config) |
| 53 : socket_factory_(socket_factory), | 53 : socket_factory_(socket_factory), |
| 54 request_context_getter_(request_context_getter), | 54 request_context_getter_(request_context_getter), |
| 55 resource_name_(kDefaultResourceName), | 55 resource_name_(kDefaultResourceName), |
| 56 xmpp_client_(nullptr), | 56 xmpp_client_(nullptr), |
| 57 xmpp_server_config_(xmpp_server_config), | 57 xmpp_server_config_(xmpp_server_config), |
| 58 state_(DISCONNECTED), | 58 state_(DISCONNECTED), |
| 59 error_(OK) { | 59 error_(OK) { |
| 60 #if defined(NDEBUG) | 60 #if defined(NDEBUG) |
| 61 CHECK(xmpp_server_config_.use_tls); | 61 CHECK(xmpp_server_config_.use_tls); |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 std::string mechanism = notifier::kDefaultGaiaAuthMechanism; | 272 std::string mechanism = notifier::kDefaultGaiaAuthMechanism; |
| 273 if (settings.token_service() == "oauth2") { | 273 if (settings.token_service() == "oauth2") { |
| 274 mechanism = "X-OAUTH2"; | 274 mechanism = "X-OAUTH2"; |
| 275 } | 275 } |
| 276 | 276 |
| 277 return new notifier::GaiaTokenPreXmppAuth( | 277 return new notifier::GaiaTokenPreXmppAuth( |
| 278 jid.Str(), settings.auth_token(), settings.token_service(), mechanism); | 278 jid.Str(), settings.auth_token(), settings.token_service(), mechanism); |
| 279 } | 279 } |
| 280 | 280 |
| 281 } // namespace remoting | 281 } // namespace remoting |
| OLD | NEW |