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

Issue 14963002: sync: Report GetUpdate triggers to the server (Closed)

Created:
7 years, 7 months ago by rlarocque
Modified:
7 years, 7 months ago
CC:
chromium-reviews, Raghu Simha, haitaol1, akalin, tim (not reviewing), Raz Mathias
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

sync: Report GetUpdate triggers to the server This commit makes use of the protocol buffers added in r198250. This adds code to the nudge tracker so it can keep more detailed information about the reasons for fetching an update. This information is copied into the per-type GetUpdateTriggers when we perform a "triggered" GetUpdate. There was no channel available to pass the nudge_tracker through to the DownloadUpdatesCommand, so it ended up being passed through a (maybe-NULL) member of the SyncSession. That's part of the reason why this change ended up touching so many files. The other reason why this change is so big is testing. Lots of tests had to be updated with some amended for the new SyncScheduler function signatures. This commit also includes quite a few test cases for the NudgeTracker itself. Because this change was delayed longer than expected, I've updated the comments in sync.proto referencing M28 to reference M29 instead. BUG=231693, 138613 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=199136

Patch Set 1 #

Patch Set 2 : Update tests #

Total comments: 21

Patch Set 3 : Review response: lots of renames #

Total comments: 9

Patch Set 4 : Review fixes #

Total comments: 3

Patch Set 5 : Small updates #

Patch Set 6 : Rebase #

Patch Set 7 : Fix release-mode warning #

Patch Set 8 : Fix handling of NEW_CLIENT GU source #

Unified diffs Side-by-side diffs Delta from patch set Stats (+978 lines, -409 lines) Patch
M sync/engine/download_updates_command.cc View 1 2 3 4 5 6 7 5 chunks +49 lines, -0 lines 0 comments Download
M sync/engine/download_updates_command_unittest.cc View 1 2 2 chunks +29 lines, -10 lines 0 comments Download
M sync/engine/sync_scheduler.h View 1 2 3 1 chunk +23 lines, -6 lines 0 comments Download
M sync/engine/sync_scheduler_impl.h View 1 2 3 4 chunks +9 lines, -7 lines 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 2 3 4 5 13 chunks +71 lines, -65 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 3 4 5 30 chunks +79 lines, -137 lines 0 comments Download
M sync/engine/syncer_proto_util.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M sync/engine/syncer_proto_util_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 3 4 5 17 chunks +43 lines, -16 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 3 chunks +7 lines, -14 lines 0 comments Download
M sync/protocol/client_commands.proto View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M sync/protocol/proto_value_conversions.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M sync/protocol/sync.proto View 8 chunks +9 lines, -9 lines 0 comments Download
M sync/sessions/nudge_tracker.h View 1 2 3 2 chunks +96 lines, -16 lines 0 comments Download
M sync/sessions/nudge_tracker.cc View 1 2 3 1 chunk +172 lines, -22 lines 0 comments Download
M sync/sessions/nudge_tracker_unittest.cc View 1 2 3 1 chunk +288 lines, -85 lines 0 comments Download
M sync/sessions/sync_session.h View 1 2 3 4 chunks +28 lines, -3 lines 0 comments Download
M sync/sessions/sync_session.cc View 1 2 3 1 chunk +19 lines, -2 lines 0 comments Download
M sync/sessions/sync_session_unittest.cc View 1 2 3 4 5 2 chunks +8 lines, -1 line 0 comments Download
M sync/test/engine/fake_sync_scheduler.h View 1 2 3 4 5 2 chunks +9 lines, -5 lines 0 comments Download
M sync/test/engine/fake_sync_scheduler.cc View 1 2 3 4 5 2 chunks +17 lines, -9 lines 0 comments Download
M sync/test/engine/syncer_command_test.h View 1 2 3 4 5 2 chunks +12 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
rlarocque
Here's the follow-up to the GUTriggers protobuf change. I've augmented the NudgeTracker to populate most ...
7 years, 7 months ago (2013-05-06 18:21:28 UTC) #1
tim (not reviewing)
Some style nits, have to run to a meeting but will continue review afterwards. https://codereview.chromium.org/14963002/diff/2001/sync/engine/download_updates_command.cc ...
7 years, 7 months ago (2013-05-06 21:29:04 UTC) #2
rlarocque
Thanks for the quick response. New patch uploaded, PTAL. https://codereview.chromium.org/14963002/diff/2001/sync/engine/download_updates_command.cc File sync/engine/download_updates_command.cc (right): https://codereview.chromium.org/14963002/diff/2001/sync/engine/download_updates_command.cc#newcode129 sync/engine/download_updates_command.cc:129: ...
7 years, 7 months ago (2013-05-07 18:45:39 UTC) #3
tim (not reviewing)
https://codereview.chromium.org/14963002/diff/2001/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc (right): https://codereview.chromium.org/14963002/diff/2001/sync/engine/sync_scheduler_impl.cc#newcode685 sync/engine/sync_scheduler_impl.cc:685: } else if (mode_ == NORMAL_MODE && nudge_tracker_.SyncRequired()) { ...
7 years, 7 months ago (2013-05-07 20:34:13 UTC) #4
rlarocque
PTAL. https://codereview.chromium.org/14963002/diff/2001/sync/sessions/nudge_tracker.cc File sync/sessions/nudge_tracker.cc (right): https://codereview.chromium.org/14963002/diff/2001/sync/sessions/nudge_tracker.cc#newcode14 sync/sessions/nudge_tracker.cc:14: size_t NudgeTracker::kMaxPayloadsPerType = 10; On 2013/05/07 20:34:13, timsteele ...
7 years, 7 months ago (2013-05-07 21:50:57 UTC) #5
tim (not reviewing)
LGTM with final two comments addressed. https://codereview.chromium.org/14963002/diff/11001/sync/engine/sync_scheduler_impl.cc File sync/engine/sync_scheduler_impl.cc (right): https://codereview.chromium.org/14963002/diff/11001/sync/engine/sync_scheduler_impl.cc#newcode811 sync/engine/sync_scheduler_impl.cc:811: if (notifications_enabled) { ...
7 years, 7 months ago (2013-05-07 22:40:33 UTC) #6
rlarocque
https://codereview.chromium.org/14963002/diff/20001/sync/sessions/sync_session.h File sync/sessions/sync_session.h (right): https://codereview.chromium.org/14963002/diff/20001/sync/sessions/sync_session.h#newcode93 sync/sessions/sync_session.h:93: virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; On 2013/05/07 22:40:34, ...
7 years, 7 months ago (2013-05-07 22:56:49 UTC) #7
tim (not reviewing)
https://codereview.chromium.org/14963002/diff/20001/sync/sessions/sync_session.h File sync/sessions/sync_session.h (right): https://codereview.chromium.org/14963002/diff/20001/sync/sessions/sync_session.h#newcode93 sync/sessions/sync_session.h:93: virtual void OnReceivedClientInvalidationHintBufferSize(int size) = 0; On 2013/05/07 22:56:49, ...
7 years, 7 months ago (2013-05-07 23:35:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/14963002/35001
7 years, 7 months ago (2013-05-08 22:51:14 UTC) #9
commit-bot: I haz the power
7 years, 7 months ago (2013-05-09 05:51:06 UTC) #10
Message was sent while issue was closed.
Change committed as 199136

Powered by Google App Engine
This is Rietveld 408576698