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

Unified Diff: chrome/browser/sync/engine/all_status.cc

Issue 9251035: Delete lots of sync ServerConnectionManager code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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/engine/all_status.cc
diff --git a/chrome/browser/sync/engine/all_status.cc b/chrome/browser/sync/engine/all_status.cc
index 7769feca145289e9eede595bce3fae47b9461825..e2cc16e025b6cd52bc8172eb5fe3c75ba630777e 100644
--- a/chrome/browser/sync/engine/all_status.cc
+++ b/chrome/browser/sync/engine/all_status.cc
@@ -102,8 +102,12 @@ sync_api::SyncManager::Status AllStatus::CalcSyncing(
void AllStatus::CalcStatusChanges() {
const bool unsynced_changes = status_.unsynced_count > 0;
- const bool online = status_.authenticated &&
- status_.server_reachable && status_.server_up && !status_.server_broken;
+ // TODO(rlarocque): AllStatus currently has no way to inquire about the
+ // SyncScheduler's backoff state. We should fix that, then use it to update
+ // the 'offline' state here. However, it's important to keep in mind that
+ // there really is no such thing as offline according to our SyncScheduler.
+ // The exponential backoff never gives up.
+ const bool online = true;
if (online) {
if (status_.syncer_stuck)
status_.summary = sync_api::SyncManager::Status::CONFLICT;
@@ -143,19 +147,6 @@ void AllStatus::OnSyncEngineEvent(const SyncEngineEvent& event) {
}
}
-void AllStatus::HandleServerConnectionEvent(
- const ServerConnectionEvent& event) {
- ScopedStatusLock lock(this);
- status_.server_up = IsGoodReplyFromServer(event.connection_code);
- status_.server_reachable = event.server_reachable;
-
- if (event.connection_code == HttpResponse::SERVER_CONNECTION_OK) {
- status_.authenticated = true;
- } else {
- status_.authenticated = false;
- }
-}
-
sync_api::SyncManager::Status AllStatus::status() const {
base::AutoLock lock(mutex_);
return status_;

Powered by Google App Engine
This is Rietveld 408576698