| 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 27 matching lines...) Expand all Loading... |
| 38 const size_t kReadBufferSize = 64 * 1024; | 38 const size_t kReadBufferSize = 64 * 1024; |
| 39 const size_t kWriteBufferSize = 64 * 1024; | 39 const size_t kWriteBufferSize = 64 * 1024; |
| 40 | 40 |
| 41 namespace remoting { | 41 namespace remoting { |
| 42 | 42 |
| 43 XmppSignalStrategy::XmppServerConfig::XmppServerConfig() {} | 43 XmppSignalStrategy::XmppServerConfig::XmppServerConfig() {} |
| 44 XmppSignalStrategy::XmppServerConfig::~XmppServerConfig() {} | 44 XmppSignalStrategy::XmppServerConfig::~XmppServerConfig() {} |
| 45 | 45 |
| 46 XmppSignalStrategy::XmppSignalStrategy( | 46 XmppSignalStrategy::XmppSignalStrategy( |
| 47 net::ClientSocketFactory* socket_factory, | 47 net::ClientSocketFactory* socket_factory, |
| 48 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 48 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter, |
| 49 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config) | 49 const XmppSignalStrategy::XmppServerConfig& xmpp_server_config) |
| 50 : socket_factory_(socket_factory), | 50 : socket_factory_(socket_factory), |
| 51 request_context_getter_(request_context_getter), | 51 request_context_getter_(request_context_getter), |
| 52 resource_name_(kDefaultResourceName), | 52 resource_name_(kDefaultResourceName), |
| 53 xmpp_client_(NULL), | 53 xmpp_client_(NULL), |
| 54 xmpp_server_config_(xmpp_server_config), | 54 xmpp_server_config_(xmpp_server_config), |
| 55 state_(DISCONNECTED), | 55 state_(DISCONNECTED), |
| 56 error_(OK) { | 56 error_(OK) { |
| 57 #if defined(NDEBUG) | 57 #if defined(NDEBUG) |
| 58 CHECK(xmpp_server_config_.use_tls); | 58 CHECK(xmpp_server_config_.use_tls); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 std::string mechanism = notifier::kDefaultGaiaAuthMechanism; | 248 std::string mechanism = notifier::kDefaultGaiaAuthMechanism; |
| 249 if (settings.token_service() == "oauth2") { | 249 if (settings.token_service() == "oauth2") { |
| 250 mechanism = "X-OAUTH2"; | 250 mechanism = "X-OAUTH2"; |
| 251 } | 251 } |
| 252 | 252 |
| 253 return new notifier::GaiaTokenPreXmppAuth( | 253 return new notifier::GaiaTokenPreXmppAuth( |
| 254 jid.Str(), settings.auth_token(), settings.token_service(), mechanism); | 254 jid.Str(), settings.auth_token(), settings.token_service(), mechanism); |
| 255 } | 255 } |
| 256 | 256 |
| 257 } // namespace remoting | 257 } // namespace remoting |
| OLD | NEW |