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

Unified Diff: jingle/notifier/listener/mediator_thread_impl.cc

Issue 2809056: Rewrote handing of auto-reconnection and network changes for sync notifier. (Closed)
Patch Set: Fixed bug Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/listener/mediator_thread_impl.cc
diff --git a/jingle/notifier/listener/mediator_thread_impl.cc b/jingle/notifier/listener/mediator_thread_impl.cc
index 402346efb6ddf8727e76c649d8ecbc88df1d1ce9..bdbbf5bf862ada6c80a85d6f23b543130d63831d 100644
--- a/jingle/notifier/listener/mediator_thread_impl.cc
+++ b/jingle/notifier/listener/mediator_thread_impl.cc
@@ -206,12 +206,7 @@ void MediatorThreadImpl::DoLogin(
NULL,
// Both the proxy and a non-proxy route
// will be attempted.
- false,
- // |previous_login_successful| is true
- // because we have already done a
- // successful gaia login at this point
- // through another mechanism.
- true));
+ false));
login_->SignalClientStateChange.connect(
this, &MediatorThreadImpl::OnClientStateChangeMessage);
@@ -332,21 +327,16 @@ void MediatorThreadImpl::OnClientStateChangeMessageOnParentThread(
LoginConnectionState state) {
DCHECK_EQ(MessageLoop::current(), parent_message_loop_);
switch (state) {
- case STATE_CLOSED:
- if (delegate_) {
- delegate_->OnConnectionStateChange(false);
- }
- break;
- case STATE_RETRYING:
- case STATE_OPENING:
+ case STATE_DISCONNECTED:
LOG(INFO) << "P2P: Thread trying to connect.";
// Maybe first time logon, maybe intermediate network disruption. Assume
// the server went down, and lost our subscription for updates.
if (delegate_) {
+ delegate_->OnConnectionStateChange(false);
delegate_->OnSubscriptionStateChange(false);
}
break;
- case STATE_OPENED:
+ case STATE_CONNECTED:
if (delegate_) {
delegate_->OnConnectionStateChange(true);
}
« no previous file with comments | « jingle/notifier/communicator/single_login_attempt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698