diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:20:23 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-06 00:20:23 +0000 |
commit | ff390b8451249f70326d38fe12ed1166f26164d2 (patch) | |
tree | ae0854550e3e0e6bdc12c49f28530082c97aa1b0 /sync/internal_api/public/sessions | |
parent | 574eedcdeb1f43a7f26f647f2f4c87cb9cc73c35 (diff) | |
download | chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.zip chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.tar.gz chromium_src-ff390b8451249f70326d38fe12ed1166f26164d2.tar.bz2 |
sync: Remove ConflictProgress
This change removes the ConflictProgress struct from the
PerModelSafeGroupState. The struct was intended to pass state between
the update application and conflict resolution commands. This part of
its functionality has been replaced with a vector of simple conflict
item IDs.
The ConflictProgress struct also had an important role to play in stats
gathering and unit tests. To replace it, the update applicator has been
updated to store its counts directly in the StatusController. Unlike
ConflictProgress, this state is not thread-local. That's acceptable
because we can guarantee it will only be read or written by one thread
at a time and those threads use appropriate thread-safety mechanisms to
transfer control to each other.
This change is another step towards merging update application and
conflict resolution.
BUG=147681
Review URL: https://chromiumcodereview.appspot.com/11049002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160530 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/public/sessions')
-rw-r--r-- | sync/internal_api/public/sessions/model_neutral_state.cc | 4 | ||||
-rw-r--r-- | sync/internal_api/public/sessions/model_neutral_state.h | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc index 9ae8436..c9caa75 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.cc +++ b/sync/internal_api/public/sessions/model_neutral_state.cc @@ -13,6 +13,10 @@ ModelNeutralState::ModelNeutralState() num_updates_downloaded_total(0), num_tombstone_updates_downloaded_total(0), num_reflected_updates_downloaded_total(0), + num_updates_applied(0), + num_encryption_conflicts(0), + num_server_conflicts(0), + num_hierarchy_conflicts(0), num_local_overwrites(0), num_server_overwrites(0), last_get_key_result(UNSET), diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h index c1d8862..e291a25 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.h +++ b/sync/internal_api/public/sessions/model_neutral_state.h @@ -41,6 +41,12 @@ struct ModelNeutralState { // the client must now "migrate", by purging and re-downloading all updates. ModelTypeSet types_needing_local_migration; + // Update application and conflicts. + int num_updates_applied; + int num_encryption_conflicts; + int num_server_conflicts; + int num_hierarchy_conflicts; + // Overwrites due to conflict resolution counters. int num_local_overwrites; int num_server_overwrites; |