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

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

Issue 8189003: Send important client side event information to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review Created 9 years, 2 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/protocol/sync_protocol_error.h" 10 #include "chrome/browser/sync/protocol/sync_protocol_error.h"
11 #include "chrome/browser/sync/syncable/model_type.h" 11 #include "chrome/browser/sync/syncable/model_type.h"
12 12
13 namespace browser_sync { 13 namespace browser_sync {
14 namespace sessions { 14 namespace sessions {
15 15
16 using syncable::FIRST_REAL_MODEL_TYPE; 16 using syncable::FIRST_REAL_MODEL_TYPE;
17 using syncable::MODEL_TYPE_COUNT; 17 using syncable::MODEL_TYPE_COUNT;
18 18
19 StatusController::StatusController(const ModelSafeRoutingInfo& routes) 19 StatusController::StatusController(const ModelSafeRoutingInfo& routes)
20 : shared_(&is_dirty_), 20 : shared_(&is_dirty_),
21 per_model_group_deleter_(&per_model_group_), 21 per_model_group_deleter_(&per_model_group_),
22 is_dirty_(false), 22 is_dirty_(false),
23 group_restriction_in_effect_(false), 23 group_restriction_in_effect_(false),
24 group_restriction_(GROUP_PASSIVE), 24 group_restriction_(GROUP_PASSIVE),
25 routing_info_(routes) { 25 routing_info_(routes),
26 debug_info_sent_(false) {
26 } 27 }
27 28
28 StatusController::~StatusController() {} 29 StatusController::~StatusController() {}
29 30
30 bool StatusController::TestAndClearIsDirty() { 31 bool StatusController::TestAndClearIsDirty() {
31 bool is_dirty = is_dirty_; 32 bool is_dirty = is_dirty_;
32 is_dirty_ = false; 33 is_dirty_ = false;
33 return is_dirty; 34 return is_dirty;
34 } 35 }
35 36
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 236
236 if (!updates_response().get_updates().has_changes_remaining()) { 237 if (!updates_response().get_updates().has_changes_remaining()) {
237 NOTREACHED(); // Server should always send changes remaining. 238 NOTREACHED(); // Server should always send changes remaining.
238 return false; // Avoid looping forever. 239 return false; // Avoid looping forever.
239 } 240 }
240 // Changes remaining is an estimate, but if it's estimated to be 241 // Changes remaining is an estimate, but if it's estimated to be
241 // zero, that's firm and we don't have to ask again. 242 // zero, that's firm and we don't have to ask again.
242 return updates_response().get_updates().changes_remaining() == 0; 243 return updates_response().get_updates().changes_remaining() == 0;
243 } 244 }
244 245
246 void StatusController::set_debug_info_sent(bool value) {
247 debug_info_sent_ = value;
248 }
249
250 bool StatusController::debug_info_sent() {
251 return debug_info_sent_;
252 }
253
245 } // namespace sessions 254 } // namespace sessions
246 } // namespace browser_sync 255 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698