| 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 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ | 5 #ifndef JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ |
| 6 #define JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ | 6 #define JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "net/base/address_list.h" | 11 #include "net/base/address_list.h" |
| 12 #include "net/base/completion_callback.h" | |
| 13 #include "net/base/host_resolver.h" | 12 #include "net/base/host_resolver.h" |
| 14 #include "net/base/net_log.h" | 13 #include "net/base/net_log.h" |
| 15 #include "net/base/single_request_host_resolver.h" | 14 #include "net/base/single_request_host_resolver.h" |
| 16 #include "jingle/notifier/base/server_information.h" | 15 #include "jingle/notifier/base/server_information.h" |
| 17 | 16 |
| 18 namespace notifier { | 17 namespace notifier { |
| 19 | 18 |
| 20 class ConnectionOptions; | 19 class ConnectionOptions; |
| 21 class ConnectionSettings; | 20 class ConnectionSettings; |
| 22 class ConnectionSettingsList; | 21 class ConnectionSettingsList; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 should_resolve_dns_ = should_resolve_dns; | 57 should_resolve_dns_ = should_resolve_dns; |
| 59 } | 58 } |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 void OnServerDNSResolved(int status); | 61 void OnServerDNSResolved(int status); |
| 63 void HandleServerDNSResolved(int status); | 62 void HandleServerDNSResolved(int status); |
| 64 void GenerateSettingsForIPList(const std::vector<uint32>& ip_list); | 63 void GenerateSettingsForIPList(const std::vector<uint32>& ip_list); |
| 65 | 64 |
| 66 Delegate* delegate_; | 65 Delegate* delegate_; |
| 67 net::SingleRequestHostResolver host_resolver_; | 66 net::SingleRequestHostResolver host_resolver_; |
| 68 scoped_ptr<net::OldCompletionCallback> resolve_callback_; | |
| 69 net::AddressList address_list_; | 67 net::AddressList address_list_; |
| 70 net::BoundNetLog bound_net_log_; | 68 net::BoundNetLog bound_net_log_; |
| 71 scoped_ptr<ConnectionSettingsList> settings_list_; | 69 scoped_ptr<ConnectionSettingsList> settings_list_; |
| 72 int settings_index_; // The setting that is currently being used. | 70 int settings_index_; // The setting that is currently being used. |
| 73 const ServerList servers_; | 71 const ServerList servers_; |
| 74 ServerList::const_iterator current_server_; | 72 ServerList::const_iterator current_server_; |
| 75 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders. | 73 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders. |
| 76 bool successfully_resolved_dns_; | 74 bool successfully_resolved_dns_; |
| 77 int first_dns_error_; | 75 int first_dns_error_; |
| 78 bool should_resolve_dns_; | 76 bool should_resolve_dns_; |
| 79 const ConnectionOptions* options_; | 77 const ConnectionOptions* options_; |
| 80 | 78 |
| 81 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator); | 79 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator); |
| 82 }; | 80 }; |
| 83 | 81 |
| 84 } // namespace notifier | 82 } // namespace notifier |
| 85 | 83 |
| 86 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ | 84 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ |
| OLD | NEW |