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

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

Issue 9348036: Trim code from sync's ServerConnectionManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase after Fred's patch Created 8 years, 9 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/internal_api/all_status.h ('k') | chrome/browser/sync/internal_api/sync_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/internal_api/all_status.cc
diff --git a/chrome/browser/sync/internal_api/all_status.cc b/chrome/browser/sync/internal_api/all_status.cc
index 6276b6ca6711ba7e1ac5e58de4a8d3302ea2401a..6f0edb7ff886cd2a14666bac855f1377cfb56add 100644
--- a/chrome/browser/sync/internal_api/all_status.cc
+++ b/chrome/browser/sync/internal_api/all_status.cc
@@ -98,8 +98,11 @@ 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): Hard-coding online to true is a hack that patches over
+ // crbug.com/112229, and limits the fallout from some ServerConnectionManager
+ // changes. We will be making more drastic changes to the summary value in
+ // the near future. See crbug.com/98346.
+ const bool online = true;
if (online) {
if (status_.syncing)
status_.summary = sync_api::SyncManager::Status::SYNCING;
@@ -137,19 +140,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/internal_api/all_status.h ('k') | chrome/browser/sync/internal_api/sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698