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

Side by Side Diff: sync/sessions/status_controller.h

Issue 256413007: Remove changes remaining counter from about:sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // StatusController handles all counter and status related number crunching and 5 // StatusController handles all counter and status related number crunching and
6 // state tracking on behalf of a SyncSession. 6 // state tracking on behalf of a SyncSession.
7 // 7 //
8 // This object may be accessed from many different threads. It will be accessed 8 // This object may be accessed from many different threads. It will be accessed
9 // most often from the syncer thread. However, when update application is in 9 // most often from the syncer thread. However, when update application is in
10 // progress it may also be accessed from the worker threads. This is safe 10 // progress it may also be accessed from the worker threads. This is safe
(...skipping 25 matching lines...) Expand all
36 ~StatusController(); 36 ~StatusController();
37 37
38 // ClientToServer messages. 38 // ClientToServer messages.
39 const ModelTypeSet commit_request_types() const { 39 const ModelTypeSet commit_request_types() const {
40 return model_neutral_.commit_request_types; 40 return model_neutral_.commit_request_types;
41 } 41 }
42 void set_commit_request_types(ModelTypeSet value) { 42 void set_commit_request_types(ModelTypeSet value) {
43 model_neutral_.commit_request_types = value; 43 model_neutral_.commit_request_types = value;
44 } 44 }
45 45
46 // Changelog related state.
47 int64 num_server_changes_remaining() const {
48 return model_neutral_.num_server_changes_remaining;
49 }
50
51 // Various conflict counters. 46 // Various conflict counters.
52 int num_encryption_conflicts() const; 47 int num_encryption_conflicts() const;
53 int num_hierarchy_conflicts() const; 48 int num_hierarchy_conflicts() const;
54 int num_server_conflicts() const; 49 int num_server_conflicts() const;
55 50
56 // Aggregate sum of all conflicting items over all conflict types. 51 // Aggregate sum of all conflicting items over all conflict types.
57 int TotalNumConflictingItems() const; 52 int TotalNumConflictingItems() const;
58 53
59 // Number of successfully applied updates. 54 // Number of successfully applied updates.
60 int num_updates_applied() const; 55 int num_updates_applied() const;
61 56
62 int num_server_overwrites() const; 57 int num_server_overwrites() const;
63 58
64 base::Time sync_start_time() const { 59 base::Time sync_start_time() const {
65 // The time at which we sent the first GetUpdates command for this sync. 60 // The time at which we sent the first GetUpdates command for this sync.
66 return sync_start_time_; 61 return sync_start_time_;
67 } 62 }
68 63
69 const ModelNeutralState& model_neutral_state() const { 64 const ModelNeutralState& model_neutral_state() const {
70 return model_neutral_; 65 return model_neutral_;
71 } 66 }
72 67
73 SyncerError last_get_key_result() const; 68 SyncerError last_get_key_result() const;
74 69
75 // Download counters. 70 // Download counters.
76 void set_num_server_changes_remaining(int64 changes_remaining);
77 void increment_num_updates_downloaded_by(int value); 71 void increment_num_updates_downloaded_by(int value);
78 void increment_num_tombstone_updates_downloaded_by(int value); 72 void increment_num_tombstone_updates_downloaded_by(int value);
79 void increment_num_reflected_updates_downloaded_by(int value); 73 void increment_num_reflected_updates_downloaded_by(int value);
80 74
81 // Update application and conflict resolution counters. 75 // Update application and conflict resolution counters.
82 void increment_num_updates_applied_by(int value); 76 void increment_num_updates_applied_by(int value);
83 void increment_num_encryption_conflicts_by(int value); 77 void increment_num_encryption_conflicts_by(int value);
84 void increment_num_hierarchy_conflicts_by(int value); 78 void increment_num_hierarchy_conflicts_by(int value);
85 void increment_num_server_conflicts(); 79 void increment_num_server_conflicts();
86 void increment_num_local_overwrites(); 80 void increment_num_local_overwrites();
(...skipping 16 matching lines...) Expand all
103 97
104 base::Time sync_start_time_; 98 base::Time sync_start_time_;
105 99
106 DISALLOW_COPY_AND_ASSIGN(StatusController); 100 DISALLOW_COPY_AND_ASSIGN(StatusController);
107 }; 101 };
108 102
109 } // namespace sessions 103 } // namespace sessions
110 } // namespace syncer 104 } // namespace syncer
111 105
112 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ 106 #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/sessions/sync_session_snapshot_unittest.cc ('k') | sync/sessions/status_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698