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

Issue 10454105: sync: Refactor per-datatype throttling (Closed)

Created:
8 years, 6 months ago by rlarocque
Modified:
8 years, 6 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

sync: Refactor per-datatype throttling This CL pulls the code to track throttled data types out of the sync session context and into a class meant for that purpose. This new class, ThrottledDataTypeTracker, also implements code to notify the AllStatus object whenever the set of throttled datatypes is changed. The fact that ThrottledDataTypeTracker, which lives in sync/engine, references AllStatus caused some problems with DEPS checks. After a few iterations during code review, this commit now includes the following additional changes: - Move all_status.{cc,h} from sync/internal_api to sync/engine. - Move the SyncManager::Status inner class out of SyncManager and into sync/internal_api/public/engine/sync_status.{cc,h}. The class has been renamed to SyncStatus. This CL does not include code to expose the throttled status on the chrome://sync page, though it does contain functionality we will use to implement it in a future commit. BUG=125065 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=141992

Patch Set 1 #

Patch Set 2 : Cleaned up and rebased #

Total comments: 24

Patch Set 3 : Rebase + review fixes #

Patch Set 4 : Minor fixes #

Total comments: 3

Patch Set 5 : Fix test #

Patch Set 6 : Fix check_deps issues #

Patch Set 7 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+452 lines, -542 lines) Patch
M chrome/browser/sync/glue/sync_backend_host.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_ui_util.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
A + sync/engine/all_status.h View 1 2 3 4 5 6 4 chunks +13 lines, -13 lines 0 comments Download
A + sync/engine/all_status.cc View 1 2 3 4 5 5 chunks +11 lines, -6 lines 0 comments Download
M sync/engine/get_commit_ids_command.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 1 2 3 chunks +4 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_whitebox_unittest.cc View 1 2 4 chunks +6 lines, -2 lines 0 comments Download
M sync/engine/syncer.cc View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M sync/engine/syncer_proto_util.h View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M sync/engine/syncer_proto_util.cc View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M sync/engine/syncer_proto_util_unittest.cc View 1 2 4 chunks +9 lines, -16 lines 0 comments Download
M sync/engine/syncer_unittest.cc View 1 2 5 chunks +8 lines, -4 lines 0 comments Download
A sync/engine/throttled_data_type_tracker.h View 1 2 1 chunk +55 lines, -0 lines 0 comments Download
A sync/engine/throttled_data_type_tracker.cc View 1 2 3 4 5 1 chunk +72 lines, -0 lines 0 comments Download
A sync/engine/throttled_data_type_tracker_unittest.cc View 1 2 3 4 1 chunk +67 lines, -0 lines 0 comments Download
M sync/internal_api/all_status.h View 1 2 3 4 5 1 chunk +0 lines, -82 lines 0 comments Download
M sync/internal_api/all_status.cc View 1 2 3 4 5 1 chunk +0 lines, -166 lines 0 comments Download
A sync/internal_api/public/engine/sync_status.h View 1 2 3 4 5 6 1 chunk +94 lines, -0 lines 0 comments Download
A sync/internal_api/public/engine/sync_status.cc View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
M sync/internal_api/sync_manager.h View 1 2 3 4 5 3 chunks +2 lines, -70 lines 0 comments Download
M sync/internal_api/sync_manager.cc View 1 2 3 4 5 8 chunks +9 lines, -34 lines 0 comments Download
M sync/sessions/sync_session_context.h View 1 2 6 chunks +9 lines, -27 lines 0 comments Download
M sync/sessions/sync_session_context.cc View 1 2 4 chunks +3 lines, -43 lines 0 comments Download
D sync/sessions/sync_session_context_unittest.cc View 1 2 1 chunk +0 lines, -45 lines 0 comments Download
M sync/sessions/sync_session_unittest.cc View 1 2 4 chunks +4 lines, -0 lines 0 comments Download
M sync/sync.gyp View 1 2 3 4 5 8 chunks +24 lines, -20 lines 0 comments Download
M sync/test/engine/syncer_command_test.h View 1 2 3 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
rlarocque
The goal of this CL is to make the list of throttled types (and maybe ...
8 years, 6 months ago (2012-06-01 01:20:23 UTC) #1
tim (not reviewing)
http://codereview.chromium.org/10454105/diff/3001/sync/engine/syncer_proto_util.cc File sync/engine/syncer_proto_util.cc (right): http://codereview.chromium.org/10454105/diff/3001/sync/engine/syncer_proto_util.cc#newcode9 sync/engine/syncer_proto_util.cc:9: #include "sync/engine/throttled_data_type_tracker.h" include order (tools/sort-headers.py is great!) http://codereview.chromium.org/10454105/diff/3001/sync/engine/syncer_proto_util.cc#newcode217 sync/engine/syncer_proto_util.cc:217: ...
8 years, 6 months ago (2012-06-11 18:53:45 UTC) #2
rlarocque
Fixed several issues. PTAL. http://codereview.chromium.org/10454105/diff/3001/sync/engine/syncer_proto_util.cc File sync/engine/syncer_proto_util.cc (right): http://codereview.chromium.org/10454105/diff/3001/sync/engine/syncer_proto_util.cc#newcode9 sync/engine/syncer_proto_util.cc:9: #include "sync/engine/throttled_data_type_tracker.h" On 2012/06/11 18:53:46, ...
8 years, 6 months ago (2012-06-11 23:28:51 UTC) #3
tim (not reviewing)
http://codereview.chromium.org/10454105/diff/3001/sync/engine/throttled_data_type_tracker.h File sync/engine/throttled_data_type_tracker.h (right): http://codereview.chromium.org/10454105/diff/3001/sync/engine/throttled_data_type_tracker.h#newcode20 sync/engine/throttled_data_type_tracker.h:20: ThrottledDataTypeTracker(AllStatus* allstatus); On 2012/06/11 23:28:51, rlarocque wrote: > On ...
8 years, 6 months ago (2012-06-12 00:12:20 UTC) #4
rlarocque
I've resolved the issue with the unit test. PTAL. http://codereview.chromium.org/10454105/diff/12002/sync/engine/throttled_data_type_tracker_unittest.cc File sync/engine/throttled_data_type_tracker_unittest.cc (right): http://codereview.chromium.org/10454105/diff/12002/sync/engine/throttled_data_type_tracker_unittest.cc#newcode48 sync/engine/throttled_data_type_tracker_unittest.cc:48: ...
8 years, 6 months ago (2012-06-12 18:11:43 UTC) #5
tim (not reviewing)
LGTM On Jun 11, 2012 8:12 PM, <tim@chromium.org> wrote: > > http://codereview.chromium.**org/10454105/diff/3001/sync/** > engine/throttled_data_type_**tracker.h<http://codereview.chromium.org/10454105/diff/3001/sync/engine/throttled_data_type_tracker.h> > ...
8 years, 6 months ago (2012-06-12 20:56:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/10454105/5003
8 years, 6 months ago (2012-06-12 21:00:27 UTC) #7
commit-bot: I haz the power
Try job failure for 10454105-5003 (retry) on mac_rel for step "check_deps". It's a second try, ...
8 years, 6 months ago (2012-06-12 21:41:26 UTC) #8
rlarocque
On 2012/06/12 21:41:26, I haz the power (commit-bot) wrote: > Try job failure for 10454105-5003 ...
8 years, 6 months ago (2012-06-12 23:35:54 UTC) #9
tim (not reviewing)
I think what you want here is to move all_status out of internal_api and into ...
8 years, 6 months ago (2012-06-13 01:25:47 UTC) #10
tim (not reviewing)
Note that sync_manager.cc is allowed to include things from sync/engine and friends. Only sync_manager.h will ...
8 years, 6 months ago (2012-06-13 01:27:12 UTC) #11
rlarocque
Here is one possible solution to the checkdeps issues. 1. Move all_status.{cc,h} from internal_api to ...
8 years, 6 months ago (2012-06-13 18:33:21 UTC) #12
tim (not reviewing)
That seems reasonable. This kind of hits an old annoyance of mine in the face, ...
8 years, 6 months ago (2012-06-13 19:06:27 UTC) #13
rlarocque
I don't think SyncStatus is such a bad name for this class. I suppose we ...
8 years, 6 months ago (2012-06-13 19:55:35 UTC) #14
rlarocque
(Also, updated some comments. PTAL)
8 years, 6 months ago (2012-06-13 19:56:16 UTC) #15
tim (not reviewing)
Yeah, enough for now :) Sorry for the back-and-forth. LGTM!
8 years, 6 months ago (2012-06-13 20:05:18 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/10454105/9027
8 years, 6 months ago (2012-06-13 20:20:48 UTC) #17
commit-bot: I haz the power
8 years, 6 months ago (2012-06-13 22:14:06 UTC) #18
Change committed as 141992

Powered by Google App Engine
This is Rietveld 408576698