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

Unified Diff: sync/sessions/status_controller.cc

Issue 11190013: sync: Remove UpdateProgress and related code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting improvements Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/status_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/status_controller.cc
diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc
index 93a37f1278de70854d7eb1725a5e907ae8ed6a80..f47b085b324f9f0387bc7bdc6ca31fef0913f170 100644
--- a/sync/sessions/status_controller.cc
+++ b/sync/sessions/status_controller.cc
@@ -22,17 +22,6 @@ StatusController::StatusController(const ModelSafeRoutingInfo& routes)
StatusController::~StatusController() {}
-const UpdateProgress* StatusController::update_progress() const {
- const PerModelSafeGroupState* state =
- GetModelSafeGroupState(true, group_restriction_);
- return state ? &state->update_progress : NULL;
-}
-
-UpdateProgress* StatusController::mutable_update_progress() {
- return &GetOrCreateModelSafeGroupState(
- true, group_restriction_)->update_progress;
-}
-
const std::set<syncable::Id>* StatusController::simple_conflict_ids() const {
const PerModelSafeGroupState* state =
GetModelSafeGroupState(true, group_restriction_);
@@ -51,18 +40,6 @@ const std::set<syncable::Id>*
return state ? &state->simple_conflict_ids : NULL;
}
-const UpdateProgress* StatusController::GetUnrestrictedUpdateProgress(
- ModelSafeGroup group) const {
- const PerModelSafeGroupState* state = GetModelSafeGroupState(false, group);
- return state ? &state->update_progress : NULL;
-}
-
-UpdateProgress*
- StatusController::GetUnrestrictedMutableUpdateProgressForTest(
- ModelSafeGroup group) {
- return &GetOrCreateModelSafeGroupState(false, group)->update_progress;
-}
-
const PerModelSafeGroupState* StatusController::GetModelSafeGroupState(
bool restrict, ModelSafeGroup group) const {
DCHECK_EQ(restrict, group_restriction_in_effect_);
@@ -187,15 +164,11 @@ int64 StatusController::CountUpdates() const {
}
bool StatusController::HasConflictingUpdates() const {
- DCHECK(!group_restriction_in_effect_)
- << "HasConflictingUpdates applies to all ModelSafeGroups";
- std::map<ModelSafeGroup, PerModelSafeGroupState*>::const_iterator it =
- per_model_group_.begin();
- for (; it != per_model_group_.end(); ++it) {
- if (it->second->update_progress.HasConflictingUpdates())
- return true;
- }
- return false;
+ return TotalNumConflictingItems() > 0;
+}
+
+int StatusController::num_updates_applied() const {
+ return model_neutral_.num_updates_applied;
}
int StatusController::num_encryption_conflicts() const {
« no previous file with comments | « sync/sessions/status_controller.h ('k') | sync/sessions/status_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698