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

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

Issue 9348036: Trim code from sync's ServerConnectionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Delete some more code 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
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/net/server_connection_manager.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 455679a6ca8995482cb6a4959d1aee19aab90a5f..84a251e59ec658d580eb381f5b2ea27d6a0f777f 100644
--- a/chrome/browser/sync/engine/all_status.cc
+++ b/chrome/browser/sync/engine/all_status.cc
@@ -96,8 +96,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;
+ // 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;
lipalani1 2012/02/22 18:28:50 This does not look right? Basically only the firs
if (online) {
if (status_.syncing)
status_.summary = sync_api::SyncManager::Status::SYNCING;
@@ -135,19 +139,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_;
« no previous file with comments | « chrome/browser/sync/engine/all_status.h ('k') | chrome/browser/sync/engine/net/server_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698