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

Issue 1893813002: [Sync] Adjust new entity version before commit. (Closed)

Created:
4 years, 8 months ago by pavely
Modified:
4 years, 8 months ago
Reviewers:
maxbogue
CC:
chromium-reviews, sync-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@DeviceInfoFixes
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Sync] Adjust new entity version before commit. Version of newly created entity on the client is set to -1. Server doesn't accept entity with version -1, it responds with MIGRATION_DONE error. commit_util.cc:BuildCommitItem() performs translation of version -1 to 0 and in addition verifies that id is consistent with version. In this change: - Set version to 0 in ModelTypeWorker for newly created entities - Rename couple of functions R=maxbogue@chromium.org BUG= Committed: https://crrev.com/4c454e24700b8216969459011619c66bf1a66de0 Cr-Commit-Position: refs/heads/master@{#387972}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Move comment. #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -17 lines) Patch
M sync/engine/model_type_worker.h View 1 chunk +4 lines, -5 lines 0 comments Download
M sync/engine/model_type_worker.cc View 1 3 chunks +8 lines, -6 lines 0 comments Download
M sync/engine/model_type_worker_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M sync/engine/worker_entity_tracker.h View 1 chunk +2 lines, -2 lines 0 comments Download
M sync/engine/worker_entity_tracker.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M sync/engine/worker_entity_tracker_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (3 generated)
pavely
4 years, 8 months ago (2016-04-16 00:04:24 UTC) #1
maxbogue
lgtm w/ nit https://codereview.chromium.org/1893813002/diff/1/sync/engine/model_type_worker.cc File sync/engine/model_type_worker.cc (right): https://codereview.chromium.org/1893813002/diff/1/sync/engine/model_type_worker.cc#newcode312 sync/engine/model_type_worker.cc:312: // TODO(stanisc): This is incorrect for ...
4 years, 8 months ago (2016-04-16 00:31:48 UTC) #2
pavely
https://codereview.chromium.org/1893813002/diff/1/sync/engine/model_type_worker.cc File sync/engine/model_type_worker.cc (right): https://codereview.chromium.org/1893813002/diff/1/sync/engine/model_type_worker.cc#newcode312 sync/engine/model_type_worker.cc:312: // TODO(stanisc): This is incorrect for bookmarks for two ...
4 years, 8 months ago (2016-04-18 17:32:04 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1893813002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1893813002/40001
4 years, 8 months ago (2016-04-18 17:41:57 UTC) #6
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-18 18:58:50 UTC) #7
commit-bot: I haz the power
4 years, 8 months ago (2016-04-18 19:02:01 UTC) #9
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4c454e24700b8216969459011619c66bf1a66de0
Cr-Commit-Position: refs/heads/master@{#387972}

Powered by Google App Engine
This is Rietveld 408576698