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

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

Issue 9149017: Remove broken variables from sync's AllStatus (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_unit_test failure 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
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/syncer_proto_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1403ae4601643ccb17bbff34ad474ee026cf90cb 100644
--- a/chrome/browser/sync/engine/all_status.cc
+++ b/chrome/browser/sync/engine/all_status.cc
@@ -35,9 +35,7 @@ sync_api::SyncManager::Status AllStatus::CreateBlankStatus() const {
status.unsynced_count = 0;
status.conflicting_count = 0;
status.initial_sync_ended = false;
- status.syncer_stuck = false;
status.max_consecutive_errors = 0;
- status.server_broken = false;
status.updates_available = 0;
return status;
}
@@ -59,18 +57,12 @@ sync_api::SyncManager::Status AllStatus::CalcSyncing(
}
status.initial_sync_ended |= snapshot->is_share_usable;
- status.syncer_stuck |= snapshot->syncer_status.syncer_stuck;
const sessions::ErrorCounters& errors(snapshot->errors);
if (errors.consecutive_errors > status.max_consecutive_errors)
status.max_consecutive_errors = errors.consecutive_errors;
- // 100 is an arbitrary limit.
- if (errors.consecutive_transient_error_commits > 100)
- status.server_broken = true;
-
status.updates_available += snapshot->num_server_changes_remaining;
-
status.sync_protocol_error = snapshot->errors.sync_protocol_error;
// Accumulate update count only once per session to avoid double-counting.
@@ -103,11 +95,9 @@ 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;
+ status_.server_reachable && status_.server_up;
if (online) {
- if (status_.syncer_stuck)
- status_.summary = sync_api::SyncManager::Status::CONFLICT;
- else if (status_.syncing)
+ if (status_.syncing)
status_.summary = sync_api::SyncManager::Status::SYNCING;
else
status_.summary = sync_api::SyncManager::Status::READY;
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/syncer_proto_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698