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

Side by Side Diff: jingle/notifier/communicator/login.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 fixes 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 "jingle/notifier/communicator/login.h" 5 #include "jingle/notifier/communicator/login.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 15 matching lines...) Expand all
26 #include "talk/xmpp/xmppengine.h" 26 #include "talk/xmpp/xmppengine.h"
27 27
28 namespace notifier { 28 namespace notifier {
29 29
30 // Redirect valid for 5 minutes. 30 // Redirect valid for 5 minutes.
31 static const int kRedirectTimeoutMinutes = 5; 31 static const int kRedirectTimeoutMinutes = 5;
32 32
33 Login::Login(Delegate* delegate, 33 Login::Login(Delegate* delegate,
34 const buzz::XmppClientSettings& user_settings, 34 const buzz::XmppClientSettings& user_settings,
35 const ConnectionOptions& options, 35 const ConnectionOptions& options,
36 net::HostResolver* host_resolver, 36 const scoped_refptr<net::URLRequestContextGetter>&
37 net::CertVerifier* cert_verifier, 37 request_context_getter,
38 const ServerList& servers, 38 const ServerList& servers,
39 bool try_ssltcp_first, 39 bool try_ssltcp_first,
40 const std::string& auth_mechanism) 40 const std::string& auth_mechanism)
41 : delegate_(delegate), 41 : delegate_(delegate),
42 login_settings_(new LoginSettings(user_settings, 42 login_settings_(new LoginSettings(user_settings,
43 options, 43 options,
44 host_resolver, 44 request_context_getter,
45 cert_verifier,
46 servers, 45 servers,
47 try_ssltcp_first, 46 try_ssltcp_first,
48 auth_mechanism)), 47 auth_mechanism)),
49 redirect_port_(0) { 48 redirect_port_(0) {
50 net::NetworkChangeNotifier::AddIPAddressObserver(this); 49 net::NetworkChangeNotifier::AddIPAddressObserver(this);
51 ResetReconnectState(); 50 ResetReconnectState();
52 } 51 }
53 52
54 Login::~Login() { 53 Login::~Login() {
55 net::NetworkChangeNotifier::RemoveIPAddressObserver(this); 54 net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const base::TimeDelta kMaxReconnectInterval = 126 const base::TimeDelta kMaxReconnectInterval =
128 base::TimeDelta::FromMinutes(30); 127 base::TimeDelta::FromMinutes(30);
129 reconnect_interval_ *= 2; 128 reconnect_interval_ *= 2;
130 if (reconnect_interval_ > kMaxReconnectInterval) 129 if (reconnect_interval_ > kMaxReconnectInterval)
131 reconnect_interval_ = kMaxReconnectInterval; 130 reconnect_interval_ = kMaxReconnectInterval;
132 VLOG(1) << "Reconnecting..."; 131 VLOG(1) << "Reconnecting...";
133 StartConnection(); 132 StartConnection();
134 } 133 }
135 134
136 } // namespace notifier 135 } // namespace notifier
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698