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

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: Lint fix 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 void SetShouldResolveDNS(bool should_resolve_dns) {
61 should_resolve_dns_ = should_resolve_dns;
62 }
63
60 private: 64 private:
61 void OnServerDNSResolved(int status); 65 void OnServerDNSResolved(int status);
62 void HandleServerDNSResolved(int status); 66 void HandleServerDNSResolved(int status);
67 void GenerateSettingsForIPList(const std::vector<uint32>& ip_list);
63 68
64 Delegate* delegate_; 69 Delegate* delegate_;
65 net::SingleRequestHostResolver host_resolver_; 70 net::SingleRequestHostResolver host_resolver_;
66 scoped_ptr<net::CompletionCallback> resolve_callback_; 71 scoped_ptr<net::CompletionCallback> resolve_callback_;
67 net::AddressList address_list_; 72 net::AddressList address_list_;
68 net::BoundNetLog bound_net_log_; 73 net::BoundNetLog bound_net_log_;
69 scoped_ptr<ConnectionSettingsList> settings_list_; 74 scoped_ptr<ConnectionSettingsList> settings_list_;
70 int settings_index_; // The setting that is currently being used. 75 int settings_index_; // The setting that is currently being used.
71 const ServerList servers_; 76 const ServerList servers_;
72 ServerList::const_iterator current_server_; 77 ServerList::const_iterator current_server_;
73 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders. 78 bool try_ssltcp_first_; // Used when sync tests are run on chromium builders.
74 bool successfully_resolved_dns_; 79 bool successfully_resolved_dns_;
75 int first_dns_error_; 80 int first_dns_error_;
81 bool should_resolve_dns_;
76 const ConnectionOptions* options_; 82 const ConnectionOptions* options_;
77 83
78 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator); 84 DISALLOW_COPY_AND_ASSIGN(XmppConnectionGenerator);
79 }; 85 };
80 86
81 } // namespace notifier 87 } // namespace notifier
82 88
83 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_ 89 #endif // JINGLE_NOTIFIER_COMMUNICATOR_XMPP_CONNECTION_GENERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698