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

Side by Side Diff: jingle/notifier/communicator/xmpp_connection_generator.cc

Issue 3298021: Removed use of XmppSocketAdapter by sync. (Closed)
Patch Set: Fixed checkdeps problem Created 10 years, 3 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // XmppConnectionGenerator does the following algorithm: 5 // XmppConnectionGenerator does the following algorithm:
6 // proxy = ResolveProxyInformation(connection_options) 6 // proxy = ResolveProxyInformation(connection_options)
7 // for server in server_list 7 // for server in server_list
8 // get dns_addresses for server 8 // get dns_addresses for server
9 // connection_list = (dns_addresses X connection methods X proxy).shuffle() 9 // connection_list = (dns_addresses X connection methods X proxy).shuffle()
10 // for connection in connection_list 10 // for connection in connection_list
11 // yield connection 11 // yield connection
12 12
13 #include "jingle/notifier/communicator/xmpp_connection_generator.h" 13 #include "jingle/notifier/communicator/xmpp_connection_generator.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include <winsock2.h> 16 #include <winsock2.h>
17 #elif defined(OS_POSIX) 17 #elif defined(OS_POSIX)
18 #include <arpa/inet.h> 18 #include <arpa/inet.h>
19 #endif 19 #endif
20 20
21 #include <vector> 21 #include <vector>
22 22
23 #include "base/callback.h" 23 #include "base/callback.h"
24 #include "base/compiler_specific.h" 24 #include "base/compiler_specific.h"
25 #include "base/logging.h" 25 #include "base/logging.h"
26 #include "jingle/notifier/base/signal_thread_task.h"
27 #include "jingle/notifier/communicator/connection_options.h" 26 #include "jingle/notifier/communicator/connection_options.h"
28 #include "jingle/notifier/communicator/connection_settings.h" 27 #include "jingle/notifier/communicator/connection_settings.h"
29 #include "jingle/notifier/communicator/product_info.h"
30 #include "net/base/net_errors.h" 28 #include "net/base/net_errors.h"
31 #include "net/base/sys_addrinfo.h" 29 #include "net/base/sys_addrinfo.h"
32 #include "talk/base/httpcommon-inl.h" 30 #include "talk/base/httpcommon-inl.h"
33 #include "talk/base/task.h" 31 #include "talk/base/task.h"
34 #include "talk/base/thread.h" 32 #include "talk/base/thread.h"
35 #include "talk/xmpp/prexmppauth.h" 33 #include "talk/xmpp/prexmppauth.h"
36 #include "talk/xmpp/xmppclientsettings.h" 34 #include "talk/xmpp/xmppclientsettings.h"
37 #include "talk/xmpp/xmppengine.h" 35 #include "talk/xmpp/xmppengine.h"
38 36
39 namespace notifier { 37 namespace notifier {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 SignalNewSettings(*settings); 206 SignalNewSettings(*settings);
209 } 207 }
210 208
211 void XmppConnectionGenerator::HandleExhaustedConnections() { 209 void XmppConnectionGenerator::HandleExhaustedConnections() {
212 LOG(INFO) << "(" << buzz::XmppEngine::ERROR_SOCKET 210 LOG(INFO) << "(" << buzz::XmppEngine::ERROR_SOCKET
213 << ", " << first_dns_error_ << ")"; 211 << ", " << first_dns_error_ << ")";
214 SignalExhaustedSettings(successfully_resolved_dns_, first_dns_error_); 212 SignalExhaustedSettings(successfully_resolved_dns_, first_dns_error_);
215 } 213 }
216 214
217 } // namespace notifier 215 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698