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

Unified Diff: chrome/browser/sync/internal_api/sync_manager.cc

Issue 9348036: Trim code from sync's ServerConnectionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small updates Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/internal_api/sync_manager.cc
diff --git a/chrome/browser/sync/internal_api/sync_manager.cc b/chrome/browser/sync/internal_api/sync_manager.cc
index ff6ad0778c1b4acd30d0f87c7f9d56b6746a4c02..6bb25437dc666df807f334cab55d57eb5c05c3fe 100644
--- a/chrome/browser/sync/internal_api/sync_manager.cc
+++ b/chrome/browser/sync/internal_api/sync_manager.cc
@@ -681,9 +681,6 @@ SyncManager::SyncManager(const std::string& name)
SyncManager::Status::Status()
: summary(INVALID),
- authenticated(false),
- server_up(false),
- server_reachable(false),
notifications_enabled(false),
notifications_received(0),
unsynced_count(0),
@@ -1154,7 +1151,7 @@ void SyncManager::SyncInternal::UpdateCredentials(
credentials.email, credentials.sync_token);
if (!setup_for_test_mode_ && initialized_) {
if (scheduler())
- scheduler()->OnCredentialsUpdated();
+ scheduler()->OnServerConnectionErrorFixed();
rlarocque 2012/02/08 01:57:29 This bypasses the check of "connection_code_ == SY
}
}
}
@@ -1721,14 +1718,16 @@ void SyncManager::SyncInternal::OnIPAddressChanged() {
void SyncManager::SyncInternal::OnIPAddressChangedImpl() {
DCHECK(thread_checker_.CalledOnValidThread());
- if (scheduler())
- scheduler()->OnConnectionStatusChange();
+
+ if (scheduler() && (connection_manager()->server_status() ==
+ browser_sync::HttpResponse::CONNECTION_UNAVAILABLE)) {
rlarocque 2012/02/08 01:57:29 I've moved the check of the most recent server_sta
+ scheduler()->OnServerConnectionErrorFixed();
+ }
}
void SyncManager::SyncInternal::OnServerConnectionEvent(
const ServerConnectionEvent& event) {
DCHECK(thread_checker_.CalledOnValidThread());
- allstatus_.HandleServerConnectionEvent(event);
if (event.connection_code ==
browser_sync::HttpResponse::SERVER_CONNECTION_OK) {
FOR_EACH_OBSERVER(SyncManager::Observer, observers_,

Powered by Google App Engine
This is Rietveld 408576698