OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "jingle/notifier/base/xmpp_connection.h" | 5 #include "jingle/notifier/base/xmpp_connection.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "jingle/glue/chrome_async_socket.h" | 13 #include "jingle/glue/chrome_async_socket.h" |
14 #include "jingle/glue/task_pump.h" | 14 #include "jingle/glue/task_pump.h" |
15 #include "jingle/glue/xmpp_client_socket_factory.h" | 15 #include "jingle/glue/xmpp_client_socket_factory.h" |
16 #include "jingle/notifier/base/weak_xmpp_client.h" | 16 #include "jingle/notifier/base/weak_xmpp_client.h" |
17 #include "net/socket/client_socket_factory.h" | 17 #include "net/socket/client_socket_factory.h" |
18 #include "net/ssl/ssl_config_service.h" | 18 #include "net/ssl/ssl_config_service.h" |
19 #include "net/url_request/url_request_context.h" | 19 #include "net/url_request/url_request_context.h" |
20 #include "webrtc/libjingle/xmpp/xmppclientsettings.h" | 20 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h" |
21 | 21 |
22 namespace notifier { | 22 namespace notifier { |
23 | 23 |
24 XmppConnection::Delegate::~Delegate() {} | 24 XmppConnection::Delegate::~Delegate() {} |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 buzz::AsyncSocket* CreateSocket( | 28 buzz::AsyncSocket* CreateSocket( |
29 const buzz::XmppClientSettings& xmpp_client_settings, | 29 const buzz::XmppClientSettings& xmpp_client_settings, |
30 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter) { | 30 const scoped_refptr<net::URLRequestContextGetter>& request_context_getter) { |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 139 } |
140 | 140 |
141 void XmppConnection::ClearClient() { | 141 void XmppConnection::ClearClient() { |
142 if (weak_xmpp_client_.get()) { | 142 if (weak_xmpp_client_.get()) { |
143 weak_xmpp_client_->Invalidate(); | 143 weak_xmpp_client_->Invalidate(); |
144 DCHECK(!weak_xmpp_client_.get()); | 144 DCHECK(!weak_xmpp_client_.get()); |
145 } | 145 } |
146 } | 146 } |
147 | 147 |
148 } // namespace notifier | 148 } // namespace notifier |
OLD | NEW |