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

Side by Side Diff: jingle/notifier/communicator/login_settings.cc

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 #include <string> 5 #include <string>
6 6
7 #include "jingle/notifier/communicator/login_settings.h" 7 #include "jingle/notifier/communicator/login_settings.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "jingle/notifier/base/server_information.h" 10 #include "jingle/notifier/base/server_information.h"
11 #include "jingle/notifier/communicator/connection_options.h" 11 #include "jingle/notifier/communicator/connection_options.h"
12 #include "jingle/notifier/communicator/xmpp_connection_generator.h" 12 #include "jingle/notifier/communicator/xmpp_connection_generator.h"
13 #include "net/base/cert_verifier.h" 13 #include "net/base/cert_verifier.h"
14 #include "talk/base/common.h" 14 #include "talk/base/common.h"
15 #include "talk/base/socketaddress.h" 15 #include "talk/base/socketaddress.h"
16 #include "talk/xmpp/xmppclientsettings.h" 16 #include "talk/xmpp/xmppclientsettings.h"
17 17
18 namespace notifier { 18 namespace notifier {
19 19
20 LoginSettings::LoginSettings(const buzz::XmppClientSettings& user_settings, 20 LoginSettings::LoginSettings(const buzz::XmppClientSettings& user_settings,
21 const ConnectionOptions& options, 21 const ConnectionOptions& options,
22 net::HostResolver* host_resolver, 22 const scoped_refptr<net::URLRequestContextGetter>&
23 net::CertVerifier* cert_verifier, 23 request_context_getter,
24 const ServerList& servers, 24 const ServerList& servers,
25 bool try_ssltcp_first, 25 bool try_ssltcp_first,
26 const std::string& auth_mechanism) 26 const std::string& auth_mechanism)
27 : try_ssltcp_first_(try_ssltcp_first), 27 : try_ssltcp_first_(try_ssltcp_first),
28 host_resolver_(host_resolver), 28 request_context_getter_(request_context_getter),
29 cert_verifier_(cert_verifier),
30 servers_(servers), 29 servers_(servers),
31 user_settings_(new buzz::XmppClientSettings(user_settings)), 30 user_settings_(new buzz::XmppClientSettings(user_settings)),
32 connection_options_(new ConnectionOptions(options)), 31 connection_options_(new ConnectionOptions(options)),
33 auth_mechanism_(auth_mechanism) { 32 auth_mechanism_(auth_mechanism) {
34 DCHECK(host_resolver);
35 DCHECK(cert_verifier);
36 DCHECK_GT(servers_.size(), 0u); 33 DCHECK_GT(servers_.size(), 0u);
37 } 34 }
38 35
39 // Defined so that the destructors are executed here (and the corresponding 36 // Defined so that the destructors are executed here (and the corresponding
40 // classes don't need to be included in the header file). 37 // classes don't need to be included in the header file).
41 LoginSettings::~LoginSettings() { 38 LoginSettings::~LoginSettings() {
42 } 39 }
43 40
44 void LoginSettings::set_server_override( 41 void LoginSettings::set_server_override(
45 const net::HostPortPair& server) { 42 const net::HostPortPair& server) {
46 server_override_.reset( 43 server_override_.reset(
47 new ServerInformation(server, servers_[0].special_port_magic)); 44 new ServerInformation(server, servers_[0].special_port_magic));
48 } 45 }
49 46
50 void LoginSettings::clear_server_override() { 47 void LoginSettings::clear_server_override() {
51 server_override_.reset(); 48 server_override_.reset();
52 } 49 }
53 50
54 } // namespace notifier 51 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698