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

Issue 8402014: [Sync] Make GetFirstChildId return a flag indicating success (Closed)

Created:
9 years, 1 month ago by akalin
Modified:
9 years, 1 month ago
Reviewers:
rlarocque, Nicolas Zea
CC:
chromium-reviews, GeorgeY, ncarter (slow), Raghu Simha, dyu1, Paweł Hajdan Jr., Ilya Sherman, tim (not reviewing), dhollowa
Visibility:
Public.

Description

[Sync] Make GetFirstChildId return a flag indicating success Propagate that flag up a few levels and add CHECKs. Since the old code crashed, CHECKing is no worse. Rename some functions to add *ForTest suffixes. BUG=100907 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107686

Patch Set 1 #

Patch Set 2 : diff against right branch #

Patch Set 3 : Cleanup comments #

Total comments: 8

Patch Set 4 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -120 lines) Patch
M chrome/browser/sync/engine/apply_updates_command_unittest.cc View 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/nigori_util.h View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/nigori_util.cc View 3 chunks +18 lines, -8 lines 0 comments Download
M chrome/browser/sync/engine/process_commit_response_command_unittest.cc View 6 chunks +14 lines, -6 lines 0 comments Download
M chrome/browser/sync/internal_api/base_node.cc View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/sync/internal_api/change_reorder_buffer.h View 1 2 3 2 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/sync/internal_api/change_reorder_buffer.cc View 3 chunks +11 lines, -5 lines 0 comments Download
M chrome/browser/sync/internal_api/sync_manager.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/sync/internal_api/syncapi_unittest.cc View 5 chunks +55 lines, -44 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 1 2 3 3 chunks +21 lines, -5 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 3 chunks +59 lines, -35 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_unittest.cc View 1 3 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
akalin
+rlarocque and +zea both for review
9 years, 1 month ago (2011-10-27 01:15:18 UTC) #1
rlarocque
On 2011/10/27 01:15:18, akalin wrote: > +rlarocque and +zea both for review LGTM. You did ...
9 years, 1 month ago (2011-10-27 02:10:52 UTC) #2
rlarocque
And here's the comment I intended to publish with that last message. http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.cc File chrome/browser/sync/syncable/syncable.cc ...
9 years, 1 month ago (2011-10-27 02:11:32 UTC) #3
akalin
> You did add CHECK()s to *all* the current uses of GetFirstChildId, right? No, since ...
9 years, 1 month ago (2011-10-27 02:22:13 UTC) #4
akalin
http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.cc File chrome/browser/sync/syncable/syncable.cc (right): http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.cc#newcode1790 chrome/browser/sync/syncable/syncable.cc:1790: if (!entry) { On 2011/10/27 02:11:33, rlarocque wrote: > ...
9 years, 1 month ago (2011-10-27 02:22:18 UTC) #5
rlarocque
On 2011/10/27 02:22:18, akalin wrote: > http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.cc > File chrome/browser/sync/syncable/syncable.cc (right): > > http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.cc#newcode1790 > ...
9 years, 1 month ago (2011-10-27 04:25:31 UTC) #6
Nicolas Zea
LGTM with nits http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/internal_api/change_reorder_buffer.h File chrome/browser/sync/internal_api/change_reorder_buffer.h (right): http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/internal_api/change_reorder_buffer.h#newcode92 chrome/browser/sync/internal_api/change_reorder_buffer.h:92: ImmutableChangeRecordList* changes); consider WARN_UNUSED_RESULT http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/syncable/syncable.h File ...
9 years, 1 month ago (2011-10-27 18:28:30 UTC) #7
akalin
Addressed all comments, committing after tryjobs http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/internal_api/change_reorder_buffer.h File chrome/browser/sync/internal_api/change_reorder_buffer.h (right): http://codereview.chromium.org/8402014/diff/4001/chrome/browser/sync/internal_api/change_reorder_buffer.h#newcode92 chrome/browser/sync/internal_api/change_reorder_buffer.h:92: ImmutableChangeRecordList* changes); On ...
9 years, 1 month ago (2011-10-27 21:11:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akalin@chromium.org/8402014/7002
9 years, 1 month ago (2011-10-28 00:12:36 UTC) #9
commit-bot: I haz the power
9 years, 1 month ago (2011-10-28 00:12:41 UTC) #10
Presubmit check for 8402014-7002 failed and returned exit status 1.

Running presubmit commit checks ...

** Presubmit Messages **
If this change requires manual test instructions to QA team, add
TEST=[instructions].

** Presubmit Warnings **
You might be calling functions intended only for testing from
production code. Please verify that the following usages are OK,
and email joi@chromium.org if you are seeing false positives:
  chrome/browser/sync/engine/nigori_util.cc:83
    bool VerifyDataTypeEncryptionForTest( \
  chrome/browser/sync/syncable/syncable.cc:1801
    EntryKernel* entry = GetPossibleLastChildForTest(lock, parent_id);

Presubmit checks took 1.8s to calculate.

Powered by Google App Engine
This is Rietveld 408576698