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

Side by Side Diff: chrome/browser/sync/sessions/status_controller.cc

Issue 7013040: Add information about sync session and other useful data to about:sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing a bug. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/sessions/status_controller.h" 5 #include "chrome/browser/sync/sessions/status_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/sync/syncable/model_type.h" 10 #include "chrome/browser/sync/syncable/model_type.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void StatusController::set_syncer_stuck(bool syncer_stuck) { 103 void StatusController::set_syncer_stuck(bool syncer_stuck) {
104 if (shared_.syncer_status.value().syncer_stuck != syncer_stuck) 104 if (shared_.syncer_status.value().syncer_stuck != syncer_stuck)
105 shared_.syncer_status.mutate()->syncer_stuck = syncer_stuck; 105 shared_.syncer_status.mutate()->syncer_stuck = syncer_stuck;
106 } 106 }
107 107
108 void StatusController::set_syncing(bool syncing) { 108 void StatusController::set_syncing(bool syncing) {
109 if (shared_.syncer_status.value().syncing != syncing) 109 if (shared_.syncer_status.value().syncing != syncing)
110 shared_.syncer_status.mutate()->syncing = syncing; 110 shared_.syncer_status.mutate()->syncing = syncing;
111 } 111 }
112 112
113 void StatusController::set_throttled() {
114 if (shared_.syncer_status.value().throttled != true)
115 shared_.syncer_status.mutate()->throttled = true;
116 }
117
113 void StatusController::set_num_successful_bookmark_commits(int value) { 118 void StatusController::set_num_successful_bookmark_commits(int value) {
114 if (shared_.syncer_status.value().num_successful_bookmark_commits != value) 119 if (shared_.syncer_status.value().num_successful_bookmark_commits != value)
115 shared_.syncer_status.mutate()->num_successful_bookmark_commits = value; 120 shared_.syncer_status.mutate()->num_successful_bookmark_commits = value;
116 } 121 }
117 122
118 void StatusController::set_unsynced_handles( 123 void StatusController::set_unsynced_handles(
119 const std::vector<int64>& unsynced_handles) { 124 const std::vector<int64>& unsynced_handles) {
120 if (!operator==(unsynced_handles, shared_.unsynced_handles.value())) { 125 if (!operator==(unsynced_handles, shared_.unsynced_handles.value())) {
121 *(shared_.unsynced_handles.mutate()) = unsynced_handles; 126 *(shared_.unsynced_handles.mutate()) = unsynced_handles;
122 } 127 }
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 NOTREACHED(); // Server should always send changes remaining. 233 NOTREACHED(); // Server should always send changes remaining.
229 return false; // Avoid looping forever. 234 return false; // Avoid looping forever.
230 } 235 }
231 // Changes remaining is an estimate, but if it's estimated to be 236 // Changes remaining is an estimate, but if it's estimated to be
232 // zero, that's firm and we don't have to ask again. 237 // zero, that's firm and we don't have to ask again.
233 return updates_response().get_updates().changes_remaining() == 0; 238 return updates_response().get_updates().changes_remaining() == 0;
234 } 239 }
235 240
236 } // namespace sessions 241 } // namespace sessions
237 } // namespace browser_sync 242 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698