OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/sync/notifier/communicator/xmpp_connection_generator.h" | 13 #include "chrome/common/net/notifier/communicator/xmpp_connection_generator.h" |
14 | 14 |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/logging.h" | 17 #include "base/logging.h" |
18 #include "chrome/browser/sync/notifier/base/async_dns_lookup.h" | 18 #include "chrome/common/net/notifier/base/async_dns_lookup.h" |
19 #include "chrome/browser/sync/notifier/base/signal_thread_task.h" | 19 #include "chrome/common/net/notifier/base/signal_thread_task.h" |
20 #include "chrome/browser/sync/notifier/communicator/connection_options.h" | 20 #include "chrome/common/net/notifier/communicator/connection_options.h" |
21 #include "chrome/browser/sync/notifier/communicator/connection_settings.h" | 21 #include "chrome/common/net/notifier/communicator/connection_settings.h" |
22 #include "chrome/browser/sync/notifier/communicator/product_info.h" | 22 #include "chrome/common/net/notifier/communicator/product_info.h" |
23 #include "talk/base/autodetectproxy.h" | 23 #include "talk/base/autodetectproxy.h" |
24 #include "talk/base/httpcommon-inl.h" | 24 #include "talk/base/httpcommon-inl.h" |
25 #include "talk/base/task.h" | 25 #include "talk/base/task.h" |
26 #include "talk/base/thread.h" | 26 #include "talk/base/thread.h" |
27 #include "talk/xmpp/prexmppauth.h" | 27 #include "talk/xmpp/prexmppauth.h" |
28 #include "talk/xmpp/xmppclientsettings.h" | 28 #include "talk/xmpp/xmppclientsettings.h" |
29 #include "talk/xmpp/xmppengine.h" | 29 #include "talk/xmpp/xmppengine.h" |
30 | 30 |
31 namespace notifier { | 31 namespace notifier { |
32 | 32 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 SignalNewSettings(*settings); | 201 SignalNewSettings(*settings); |
202 } | 202 } |
203 | 203 |
204 void XmppConnectionGenerator::HandleExhaustedConnections() { | 204 void XmppConnectionGenerator::HandleExhaustedConnections() { |
205 LOG(INFO) << "(" << buzz::XmppEngine::ERROR_SOCKET | 205 LOG(INFO) << "(" << buzz::XmppEngine::ERROR_SOCKET |
206 << ", " << first_dns_error_ << ")"; | 206 << ", " << first_dns_error_ << ")"; |
207 SignalExhaustedSettings(successfully_resolved_dns_, first_dns_error_); | 207 SignalExhaustedSettings(successfully_resolved_dns_, first_dns_error_); |
208 } | 208 } |
209 | 209 |
210 } // namespace notifier | 210 } // namespace notifier |
OLD | NEW |