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

Issue 1008993004: Sync: Handle empty (implicit) ParentId in GetPredecessorId and GetSuccessorId (Closed)

Created:
5 years, 9 months ago by stanisc
Modified:
5 years, 9 months ago
Reviewers:
pavely
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, zea+watch_chromium.org, maniscalco+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Sync: Handle empty (implicit) ParentId in GetPredecessorId and GetSuccessorId GetSuccessorId and GetPredecessorId access all children of the current node's parent in order to get to the next/previous node. With implicit parent ID these functions can't get to the parent. The reasons we didn't run into this problem before are a) The server feature that will stop setting parent ID isn't enabled yet so there wasn't a chance to expose this yet. b) There wasn't enough test coverage. The fix is to use the ParentChildIndex to resolve the implicit (unset) parent ID. Added a new method called GetSiblings at the Directory level that does just that. Also added some unit test coverage. BUG=438313 Committed: https://crrev.com/12cf7b569a3dc4cbf0f5ee88377bae8e47fc6653 Cr-Commit-Position: refs/heads/master@{#320922}

Patch Set 1 #

Patch Set 2 : Added extra unit test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -18 lines) Patch
M sync/syncable/directory.cc View 3 chunks +9 lines, -13 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 1 1 chunk +45 lines, -0 lines 0 comments Download
M sync/syncable/parent_child_index.h View 1 chunk +8 lines, -1 line 0 comments Download
M sync/syncable/parent_child_index.cc View 2 chunks +15 lines, -2 lines 0 comments Download
M sync/syncable/parent_child_index_unittest.cc View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
stanisc
PTAL
5 years, 9 months ago (2015-03-16 18:47:59 UTC) #2
pavely
lgtm
5 years, 9 months ago (2015-03-16 20:57:43 UTC) #3
stanisc
On 2015/03/16 20:57:43, pavely wrote: > lgtm FYI, added one extra unit test in directory_unittest.cc.
5 years, 9 months ago (2015-03-17 04:48:34 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1008993004/20001
5 years, 9 months ago (2015-03-17 15:38:53 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 9 months ago (2015-03-17 15:42:11 UTC) #8
commit-bot: I haz the power
5 years, 9 months ago (2015-03-17 15:42:58 UTC) #9
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/12cf7b569a3dc4cbf0f5ee88377bae8e47fc6653
Cr-Commit-Position: refs/heads/master@{#320922}

Powered by Google App Engine
This is Rietveld 408576698