| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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) | |
| 16 #include <winsock2.h> | |
| 17 #elif defined(OS_POSIX) | |
| 18 #include <arpa/inet.h> | |
| 19 #endif | |
| 20 | |
| 21 #include <vector> | 15 #include <vector> |
| 22 | 16 |
| 23 #include "base/bind.h" | 17 #include "base/bind.h" |
| 24 #include "base/callback.h" | 18 #include "base/callback.h" |
| 25 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
| 26 #include "base/logging.h" | 20 #include "base/logging.h" |
| 21 #include "base/sys_byteorder.h" |
| 27 #include "jingle/notifier/base/server_information.h" | 22 #include "jingle/notifier/base/server_information.h" |
| 28 #include "jingle/notifier/communicator/connection_options.h" | 23 #include "jingle/notifier/communicator/connection_options.h" |
| 29 #include "jingle/notifier/communicator/connection_settings.h" | 24 #include "jingle/notifier/communicator/connection_settings.h" |
| 30 #include "net/base/net_errors.h" | 25 #include "net/base/net_errors.h" |
| 31 #include "net/base/sys_addrinfo.h" | 26 #include "net/base/sys_addrinfo.h" |
| 32 #include "talk/base/httpcommon-inl.h" | 27 #include "talk/base/httpcommon-inl.h" |
| 33 #include "talk/base/task.h" | 28 #include "talk/base/task.h" |
| 34 #include "talk/base/thread.h" | 29 #include "talk/base/thread.h" |
| 35 #include "talk/xmpp/prexmppauth.h" | 30 #include "talk/xmpp/prexmppauth.h" |
| 36 #include "talk/xmpp/xmppclientsettings.h" | 31 #include "talk/xmpp/xmppclientsettings.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 settings_list_->ClearPermutations(); | 182 settings_list_->ClearPermutations(); |
| 188 settings_list_->AddPermutations( | 183 settings_list_->AddPermutations( |
| 189 current_server_->server.host(), | 184 current_server_->server.host(), |
| 190 ip_list, | 185 ip_list, |
| 191 current_server_->server.port(), | 186 current_server_->server.port(), |
| 192 current_server_->special_port_magic, | 187 current_server_->special_port_magic, |
| 193 try_ssltcp_first_); | 188 try_ssltcp_first_); |
| 194 } | 189 } |
| 195 | 190 |
| 196 } // namespace notifier | 191 } // namespace notifier |
| OLD | NEW |