Description[Sync] Implement encryption-aware conflict resolution.
There are two primary changes in this patch.
1. Added a new syncable column PREV_SERVER_SPECIFICS. This field stores the
most recent set of decryptable SERVER_SPECIFICS iff the current
SERVER_SPECIFICS is not decryptable and only the specific have been modified.
The field gets set in process_update_command and reset in conflict_resolver
and process_update_command.
2. Due to the use of PREV_SERVER_SPECFICS, we now take into account whether
a server change actually modified anything when we perform conflict resolution.
If the current SERVER_SPECIFICS matches PREV_SERVER_SPECIFICS, irregardless of
encryption, then we can overwrite the server data with the local data. This
is possible because PREV_SERVER_SPECIFICS is only set when an update modifies
specifics only (ignoring non_unique_name and mtime), and reset if a subsequent
change modifies non-specifics data. As a result, we know that if
PREV_SERVER_SPECIFICS are set, then we can determine whether a change is
encryption only by inspecting SERVER_SPECIFICS alone.
BUG=76596, 105615
TEST=sync_unit_tests. Manually getting into a state where a passphrase is
needed but local changes are made, and then verifying that the local changes
persist after the passphrase is supplied.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115650
Patch Set 1 #Patch Set 2 : diff against crypto patch #Patch Set 3 : Fix unnecessary commits and ordering changes #Patch Set 4 : Rebase #Patch Set 5 : Some cleanup #Patch Set 6 : Rebase and fix a nigori conflict case #Patch Set 7 : Rebase + fix integration test #Patch Set 8 : Split out nigori conflict code and rebase #
Total comments: 11
Patch Set 9 : Rebase and final cleanup #Patch Set 10 : Fix test #Messages
Total messages: 11 (0 generated)
|