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

Issue 1393633003: Sync: fix for the code that checks whether the initial download has completed (Closed)

Created:
5 years, 2 months ago by stanisc
Modified:
5 years, 2 months ago
Reviewers:
Nicolas Zea
CC:
chromium-reviews, tim+watch_chromium.org, pvalenzuela+watch_chromium.org, maxbogue+watch_chromium.org, plaree+watch_chromium.org, zea+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: fix for the code that checks whether the initial download has completed The code that detects whether the initial download has completed for a type had been inadvertently broken by https://codereview.chromium.org/1142423006/ This fix changes Directory::InitialSyncEndedForType back to the original implementation and adds special handling for implicitly created root folders (i.e. root folders auto-created locally by the update handling code). Since the locally created root folders don't get applied with the rest of downloaded nodes, their base version has to be explicitly changed from CHANGES_VERSION to some other value at the end of update application process. That would to indicate that at least one update has been applied for the type and be consistent with how the server generated root folders are handled. BUG=540814 Committed: https://crrev.com/b691b7a0f29e7ebafad5fadb8a6d59cce8cff279 Cr-Commit-Position: refs/heads/master@{#353913}

Patch Set 1 #

Patch Set 2 : Fixed control data types and added unit tests #

Total comments: 4

Patch Set 3 : Added more tests #

Total comments: 6

Patch Set 4 : Addressed CR feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -43 lines) Patch
M sync/engine/apply_control_data_updates.cc View 1 1 chunk +15 lines, -3 lines 0 comments Download
M sync/engine/apply_control_data_updates_unittest.cc View 1 2 3 1 chunk +63 lines, -0 lines 0 comments Download
M sync/engine/directory_update_handler.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M sync/engine/directory_update_handler.cc View 1 3 chunks +35 lines, -20 lines 0 comments Download
M sync/engine/directory_update_handler_unittest.cc View 1 chunk +1 line, -3 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 3 7 chunks +41 lines, -9 lines 0 comments Download
M sync/syncable/directory.h View 1 2 chunks +8 lines, -3 lines 0 comments Download
M sync/syncable/directory.cc View 1 2 chunks +24 lines, -3 lines 0 comments Download
M sync/syncable/directory_unittest.cc View 1 1 chunk +22 lines, -0 lines 0 comments Download
M sync/test/engine/mock_connection_manager.h View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M sync/test/engine/mock_connection_manager.cc View 1 2 1 chunk +6 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (4 generated)
stanisc
PTAL!
5 years, 2 months ago (2015-10-07 18:55:19 UTC) #2
Nicolas Zea
Do we have any tests that check the case where the application step has not ...
5 years, 2 months ago (2015-10-07 23:42:56 UTC) #3
stanisc
Fixed control datatypes, added some new unit tests, PTAL! I am not aware of any ...
5 years, 2 months ago (2015-10-09 15:37:32 UTC) #5
Nicolas Zea
I do think we need e2e test coverage of this using the fake server. https://codereview.chromium.org/1393633003/diff/40001/sync/engine/apply_control_data_updates.cc ...
5 years, 2 months ago (2015-10-09 22:23:34 UTC) #6
stanisc
https://codereview.chromium.org/1393633003/diff/40001/sync/engine/apply_control_data_updates.cc File sync/engine/apply_control_data_updates.cc (right): https://codereview.chromium.org/1393633003/diff/40001/sync/engine/apply_control_data_updates.cc#newcode40 sync/engine/apply_control_data_updates.cc:40: if (!entry.GetIsUnappliedUpdate()) { On 2015/10/09 22:23:33, Nicolas Zea wrote: ...
5 years, 2 months ago (2015-10-10 00:44:18 UTC) #7
stanisc
PTAL! Added/modified 3 more unit tests to cover the following cases: - Initial update of ...
5 years, 2 months ago (2015-10-13 16:33:02 UTC) #8
Nicolas Zea
LGTM with some nits. https://codereview.chromium.org/1393633003/diff/60001/sync/engine/apply_control_data_updates_unittest.cc File sync/engine/apply_control_data_updates_unittest.cc (right): https://codereview.chromium.org/1393633003/diff/60001/sync/engine/apply_control_data_updates_unittest.cc#newcode942 sync/engine/apply_control_data_updates_unittest.cc:942: EXPECT_FALSE(directory()->InitialSyncEndedForType(NIGORI)); Did you mean to ...
5 years, 2 months ago (2015-10-13 17:51:37 UTC) #9
stanisc
https://codereview.chromium.org/1393633003/diff/60001/sync/engine/apply_control_data_updates_unittest.cc File sync/engine/apply_control_data_updates_unittest.cc (right): https://codereview.chromium.org/1393633003/diff/60001/sync/engine/apply_control_data_updates_unittest.cc#newcode942 sync/engine/apply_control_data_updates_unittest.cc:942: EXPECT_FALSE(directory()->InitialSyncEndedForType(NIGORI)); On 2015/10/13 17:51:37, Nicolas Zea wrote: > Did ...
5 years, 2 months ago (2015-10-13 21:23:12 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1393633003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1393633003/80001
5 years, 2 months ago (2015-10-13 23:10:17 UTC) #13
commit-bot: I haz the power
Committed patchset #4 (id:80001)
5 years, 2 months ago (2015-10-13 23:57:27 UTC) #14
commit-bot: I haz the power
5 years, 2 months ago (2015-10-13 23:58:32 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b691b7a0f29e7ebafad5fadb8a6d59cce8cff279
Cr-Commit-Position: refs/heads/master@{#353913}

Powered by Google App Engine
This is Rietveld 408576698