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

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

Issue 2694903005: Add a copy of webrtc's TaskRunner abstraction, which is going to be deleted in webrtc. (Closed)
Patch Set: Delete dependencies on webrtc's rtc_task_runner. Created 3 years, 10 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
« no previous file with comments | « jingle/glue/task_pump.h ('k') | jingle/notifier/listener/push_notifications_listen_task.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "net/base/host_port_pair.h" 12 #include "net/base/host_port_pair.h"
13 #include "third_party/libjingle_xmpp/task_runner/taskrunner.h"
13 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" 14 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h"
14 #include "third_party/libjingle_xmpp/xmpp/asyncsocket.h" 15 #include "third_party/libjingle_xmpp/xmpp/asyncsocket.h"
15 #include "third_party/libjingle_xmpp/xmpp/prexmppauth.h" 16 #include "third_party/libjingle_xmpp/xmpp/prexmppauth.h"
16 #include "third_party/libjingle_xmpp/xmpp/xmppclient.h" 17 #include "third_party/libjingle_xmpp/xmpp/xmppclient.h"
17 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h" 18 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h"
18 #include "third_party/libjingle_xmpp/xmpp/xmppengine.h" 19 #include "third_party/libjingle_xmpp/xmpp/xmppengine.h"
19 #include "webrtc/base/firewallsocketserver.h" 20 #include "webrtc/base/firewallsocketserver.h"
20 #include "webrtc/base/logging.h" 21 #include "webrtc/base/logging.h"
21 #include "webrtc/base/physicalsocketserver.h" 22 #include "webrtc/base/physicalsocketserver.h"
22 #include "webrtc/base/taskrunner.h"
23 23
24 namespace notifier { 24 namespace notifier {
25 25
26 Login::Delegate::~Delegate() {} 26 Login::Delegate::~Delegate() {}
27 27
28 Login::Login(Delegate* delegate, 28 Login::Login(Delegate* delegate,
29 const buzz::XmppClientSettings& user_settings, 29 const buzz::XmppClientSettings& user_settings,
30 const scoped_refptr<net::URLRequestContextGetter>& 30 const scoped_refptr<net::URLRequestContextGetter>&
31 request_context_getter, 31 request_context_getter,
32 const ServerList& servers, 32 const ServerList& servers,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const base::TimeDelta kMaxReconnectInterval = 135 const base::TimeDelta kMaxReconnectInterval =
136 base::TimeDelta::FromMinutes(30); 136 base::TimeDelta::FromMinutes(30);
137 reconnect_interval_ *= 2; 137 reconnect_interval_ *= 2;
138 if (reconnect_interval_ > kMaxReconnectInterval) 138 if (reconnect_interval_ > kMaxReconnectInterval)
139 reconnect_interval_ = kMaxReconnectInterval; 139 reconnect_interval_ = kMaxReconnectInterval;
140 DVLOG(1) << "Reconnecting..."; 140 DVLOG(1) << "Reconnecting...";
141 StartConnection(); 141 StartConnection();
142 } 142 }
143 143
144 } // namespace notifier 144 } // namespace notifier
OLDNEW
« no previous file with comments | « jingle/glue/task_pump.h ('k') | jingle/notifier/listener/push_notifications_listen_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698