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

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

Issue 6833031: Changed the jingle network code in ChromeAsyncSocket to use the client socket pool. This also all... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
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"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 bool try_ssltcp_first, 50 bool try_ssltcp_first,
51 const ServerList& servers); 51 const ServerList& servers);
52 ~XmppConnectionGenerator(); 52 ~XmppConnectionGenerator();
53 53
54 // Only call this once. Create a new XmppConnectionGenerator and delete the 54 // Only call this once. Create a new XmppConnectionGenerator and delete the
55 // current one if the process needs to start again. 55 // current one if the process needs to start again.
56 void StartGenerating(); 56 void StartGenerating();
57 57
58 void UseNextConnection(); 58 void UseNextConnection();
59 59
60 // TODO(sanjeevr): Rip out the DNS resolution code eventually.
61 void SetShouldResolveDNS(bool should_resolve_dns) {
62 should_resolve_dns_ = should_resolve_dns;
63 }
64
60 private: 65 private:
61 void OnServerDNSResolved(int status); 66 void OnServerDNSResolved(int status);
62 void HandleServerDNSResolved(int status); 67 void HandleServerDNSResolved(int status);
68 void GenerateSettingsForIPList(const std::vector<uint32>& ip_list);
63 69
64 Delegate* delegate_; 70 Delegate* delegate_;
65 net::SingleRequestHostResolver host_resolver_; 71 net::SingleRequestHostResolver host_resolver_;
66 scoped_ptr<net::CompletionCallback> resolve_callback_; 72 scoped_ptr<net::CompletionCallback> resolve_callback_;
67 net::AddressList address_list_; 73 net::AddressList address_list_;
68 net::BoundNetLog bound_net_log_; 74 net::BoundNetLog bound_net_log_;
69 scoped_ptr<ConnectionSettingsList> settings_list_; 75 scoped_ptr<ConnectionSettingsList> settings_list_;
70 int settings_index_; // The setting that is currently being used. 76 int settings_index_; // The setting that is currently being used.
71 const ServerList servers_; 77 const ServerList servers_;
72 ServerList::const_iterator current_server_; 78 ServerList::const_iterator current_server_;
73 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders. 79 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders.
74 bool successfully_resolved_dns_; 80 bool successfully_resolved_dns_;
75 int first_dns_error_; 81 int first_dns_error_;
82 bool should_resolve_dns_;
76 const ConnectionOptions* options_; 83 const ConnectionOptions* options_;
77 84
78 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator); 85 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator);
79 }; 86 };
80 87
81 } // namespace notifier 88 } // namespace notifier
82 89
83 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ 90 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_
OLDNEW
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.cc ('k') | jingle/notifier/communicator/xmpp_connection_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698