diff options
author | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-21 22:49:27 +0000 |
---|---|---|
committer | rlarocque@chromium.org <rlarocque@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-21 22:49:27 +0000 |
commit | bc7749375b09bca03ddbb23bf26ddca59e1c79c7 (patch) | |
tree | 9aeb05c847c2b1acf0cf30b2b90a3f5e0083de0a /chrome/browser/sync/sessions/status_controller.h | |
parent | dd5196dbe4c10c43afcfa40ed85ee4aa2a22b7ed (diff) | |
download | chromium_src-bc7749375b09bca03ddbb23bf26ddca59e1c79c7.zip chromium_src-bc7749375b09bca03ddbb23bf26ddca59e1c79c7.tar.gz chromium_src-bc7749375b09bca03ddbb23bf26ddca59e1c79c7.tar.bz2 |
sync: Remove the remaining conflict sets code
Conflict sets were intended to help us deal with updates that could
corrupt the directory tree if applied. This could happen, for example,
when the server sends us a new item in a directory that has been deleted
locally.
Due to a bug, the code to deal with conflict sets was never run. It
seems that the consequences of this weren't as bad as one would expect.
By this point, it's not worth fixing, since we are a few weeks away from
adding code to handle conflict sets entirely on the server side.
Over a series of commits, we have removed lots of dead code related to
conflict set handling. The only remaining function of conflict sets
code was to prevent items that were in both a "conflict set" and a
"simple conflict" state from being processed as simple conflicts. If
those items had been processed as simple conflicts, there is a small
chance we could accidentally apply them, or do other bad things.
The code that detects conflict sets is overkill for our current needs,
because it was built with the idea that we had to gather information
about these conflict sets in order to resolve them. Now that this
requirement has been removed, I have been able to greatly simplify the
implementation of conflict set detection by moving it to the update
application code. Since this was the last remaining purpose of the
conflict set processing code, it is now safe to entirely remove the
concept of conflict sets.
Other changes:
- Removed ConflictProgress::EraseNonBlockingConflictingItemById(); the
function was never used.
- Added some unit tests for the new functionality.
BUG=107816
TEST=sync_unit_tests
Review URL: http://codereview.chromium.org/9305001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122894 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/sessions/status_controller.h')
-rw-r--r-- | chrome/browser/sync/sessions/status_controller.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/sync/sessions/status_controller.h b/chrome/browser/sync/sessions/status_controller.h index 651e90c6..a1287fd 100644 --- a/chrome/browser/sync/sessions/status_controller.h +++ b/chrome/browser/sync/sessions/status_controller.h @@ -147,17 +147,17 @@ class StatusController { // If a GetUpdates for any data type resulted in downloading an update that // is in conflict, this method returns true. - // Note: this includes non-blocking conflicts. + // Note: this includes unresolvable conflicts. bool HasConflictingUpdates() const; - // Aggregate sum of ConflictingItemSize() over all ConflictProgress objects - // (one for each ModelSafeGroup currently in-use). - // Note: this does not include non-blocking conflicts. - int TotalNumBlockingConflictingItems() const; + // Aggregate sum of SimpleConflictingItemSize() over all ConflictProgress + // objects (one for each ModelSafeGroup currently in-use). + // Note: this does not include unresolvable conflicts. + int TotalNumSimpleConflictingItems() const; - // Aggregate sum of ConflictingItemSize() and NonblockingConflictingItemsSize - // over all ConflictProgress objects (one for each ModelSafeGroup currently - // in-use). + // Aggregate sum of SimpleConflictingItemSize() and other + // ${Type}ConflictingItemSize() methods over all ConflictProgress objects (one + // for each ModelSafeGroup currently in-use). int TotalNumConflictingItems() const; // Returns the number of updates received from the sync server. |