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

Unified Diff: chrome/browser/sync/notifier/server_notifier_thread.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 | « no previous file | jingle/jingle.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/notifier/server_notifier_thread.cc
diff --git a/chrome/browser/sync/notifier/server_notifier_thread.cc b/chrome/browser/sync/notifier/server_notifier_thread.cc
index 0e5be0c983338d35dcb9b2f03b403de28b974160..d9975cb7e48058631d960e89aefbe95c4829d78e 100644
--- a/chrome/browser/sync/notifier/server_notifier_thread.cc
+++ b/chrome/browser/sync/notifier/server_notifier_thread.cc
@@ -15,7 +15,7 @@ namespace sync_notifier {
ServerNotifierThread::ServerNotifierThread(bool use_chrome_async_socket)
: notifier::MediatorThreadImpl(use_chrome_async_socket),
- state_(notifier::STATE_CLOSED) {}
+ state_(notifier::STATE_DISCONNECTED) {}
ServerNotifierThread::~ServerNotifierThread() {}
@@ -77,8 +77,7 @@ void ServerNotifierThread::OnClientStateChangeMessage(
notifier::LoginConnectionState state) {
DCHECK_EQ(MessageLoop::current(), worker_message_loop());
state_ = state;
- if (state_ != notifier::STATE_OPENED) {
- // Assume anything but an opened state invalidates xmpp_client().
+ if (state_ != notifier::STATE_CONNECTED) {
StopInvalidationListener();
}
MediatorThreadImpl::OnClientStateChangeMessage(state);
@@ -86,7 +85,7 @@ void ServerNotifierThread::OnClientStateChangeMessage(
void ServerNotifierThread::StartInvalidationListener() {
DCHECK_EQ(MessageLoop::current(), worker_message_loop());
- if (state_ != notifier::STATE_OPENED) {
+ if (state_ != notifier::STATE_CONNECTED) {
return;
}
buzz::XmppClient* client = xmpp_client();
@@ -108,7 +107,7 @@ void ServerNotifierThread::StartInvalidationListener() {
void ServerNotifierThread::RegisterTypesAndSignalSubscribed() {
DCHECK_EQ(MessageLoop::current(), worker_message_loop());
- if (state_ != notifier::STATE_OPENED) {
+ if (state_ != notifier::STATE_CONNECTED) {
return;
}
« no previous file with comments | « no previous file | jingle/jingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698