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

Issue 1161006: Make it clear what last_sync_timestamp actually tracks. Update (Closed)

Created:
10 years, 9 months ago by ncarter (slow)
Modified:
7 years, 3 months ago
CC:
chromium-reviews, ncarter (slow), ben+cc_chromium.org, Paul Godavari, idana, Paweł Hajdan Jr., tim (not reviewing), John Grabowski, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, kuchhal, chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Make it clear what last_sync_timestamp actually tracks. Update last_sync_timestamp from the new_timestamp only, never from per-entry timestamps. Use what the server sends us to know whether or not there are more updates to fetch. Eliminate some unnecessarily complicated logic having to do with the # of updates returned -- that's always a red herring; with server-side filtering, it is indeed possible for 0 updates to be returned along with a new timestamp. BUG=37373 TEST=manual testing of 2 browser sync; unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42413

Patch Set 1 #

Patch Set 2 : Cleanup from self-review. #

Total comments: 3

Patch Set 3 : Comment fix #

Patch Set 4 : Undo accidental patch-juggling mistake. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+222 lines, -140 lines) Patch
M chrome/browser/cocoa/preferences_window_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_message_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/importer/firefox_importer_unittest_utils.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/engine/download_updates_command.cc View 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/engine/process_updates_command.cc View 3 chunks +11 lines, -57 lines 0 comments Download
A chrome/browser/sync/engine/store_timestamps_command.h View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/sync/engine/store_timestamps_command.cc View 1 chunk +49 lines, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncapi.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/syncer.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/sync/engine/syncer.cc View 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/sync/engine/syncer_end_command.cc View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/sync/engine/verify_updates_command.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/notifier/base/linux/async_network_alive_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sessions/session_state.h View 3 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.h View 1 4 chunks +18 lines, -6 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/sync/sessions/status_controller_unittest.cc View 3 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/sync/sessions/sync_session_unittest.cc View 1 2 chunks +46 lines, -19 lines 0 comments Download
M chrome/browser/sync/syncable/directory_backing_store.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.h View 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/sync/syncable/syncable.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/sync/syncable/syncable_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/ipc_test_sink.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/resource_dispatcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/webmessageportchannel_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/live_sync/profile_sync_service_test_harness.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
ncarter (slow)
10 years, 9 months ago (2010-03-23 03:56:46 UTC) #1
tim (not reviewing)
10 years, 9 months ago (2010-03-23 22:50:05 UTC) #2
I don't have any real comments besides the questions I asked offline, and one
suggestion below.

LGTM!

http://codereview.chromium.org/1161006/diff/2001/3005
File chrome/browser/sync/engine/process_updates_command.cc (right):

http://codereview.chromium.org/1161006/diff/2001/3005#newcode68
chrome/browser/sync/engine/process_updates_command.cc:68: // TODO(nick): The
following line makes no sense to me.
I think this was only ever for UI reporting, unlike the per-entry syncing bit
which is actually important. I think it was just so that if you're only doing a
GetUpdates (no commit) the UI would still show some throbber or something
implying that it's doing work... but yeah, doesn't make much sense.

http://codereview.chromium.org/1161006/diff/2001/3008
File chrome/browser/sync/engine/store_timestamps_command.h (right):

http://codereview.chromium.org/1161006/diff/2001/3008#newcode16
chrome/browser/sync/engine/store_timestamps_command.h:16: // ProcessUpdates.
nit - ProcessUpdatesCommand.

http://codereview.chromium.org/1161006/diff/2001/3017
File chrome/browser/sync/sessions/status_controller.h (right):

http://codereview.chromium.org/1161006/diff/2001/3017#newcode169
chrome/browser/sync/sessions/status_controller.h:169: bool
server_says_nothing_more_to_download() const {
it might be less subtle if you negate your has_new_timestamp check and call this
it server_says_more_to_download(), since the server has to actually "say"
something in that case. then the check in syncer.cc becomes
(!server_says_more_to_download()) APPLY_UPDATES

Powered by Google App Engine
This is Rietveld 408576698