Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: remoting/signaling/xmpp_signal_strategy.cc

Issue 719983002: Reporting of policy errors via host-offline-reason: part 3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hor-nohoststatussender
Patch Set: Addressed most feedback from Wez. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« remoting/host/host_signaling_manager.h ('K') | « remoting/signaling/xmpp_signal_strategy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698