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

Issue 322333004: sync: Inject sync/'s dependency on invalidations (Closed)

Created:
6 years, 6 months ago by rlarocque
Modified:
6 years, 5 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, dcheng, maniscalco+watch_chromium.org, pavely, maniscalco
Project:
chromium
Visibility:
Public.

Description

sync: Inject sync/'s dependency on invalidations Defines an InvalidationInterface class and uses it to break any direct dependencies from sync code on syncer::Invalidation. Despite its name, syncer::Invalidation should belong solely to the invalidations component, which code in the sync/ directory should not depend on. Changes the interface in the sync engine from copying syncer::Invalidation to managing scoped_ptr<InvalidationInterface>. This change in memory management was required to support the use of an abstract interface. Removes the DroppedInvaldiationTracker. This class was previously only used by sync. The small benefit provided by this class is outweighed by the amount of glue code it would take to maintain it. Changes tests to conform to the new interface. Adds some test-only implementations of InvalidationInterface and some associated classes. BUG=259559 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281884

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add missing files #

Total comments: 8

Patch Set 3 : rebase #

Patch Set 4 : Fixed upload #

Total comments: 1

Patch Set 5 : Switch to some manual memory management #

Patch Set 6 : Ugly hacks to fix sync_client.cc #

Patch Set 7 : Fix license and win build issue #

Patch Set 8 : Explicitly declare Invalidation copy constructor #

Patch Set 9 : Small changes to sync_manager.h #

Patch Set 10 : Rebase #

Patch Set 11 : Rename variable for win compile #

Patch Set 12 : Another rebase #

Patch Set 13 : ScopedVector refactor #

Patch Set 14 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+909 lines, -532 lines) Patch
A chrome/browser/sync/glue/invalidation_adapter.h View 1 2 3 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/browser/sync/glue/invalidation_adapter.cc View 1 2 3 1 chunk +39 lines, -0 lines 0 comments Download
M chrome/browser/sync/glue/sync_backend_host_core.cc View 1 2 3 4 5 6 7 8 9 3 chunks +25 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M components/invalidation/sync_invalidation_listener_unittest.cc View 5 chunks +11 lines, -23 lines 0 comments Download
M sync/engine/get_updates_processor_unittest.cc View 2 chunks +15 lines, -3 lines 0 comments Download
M sync/engine/sync_scheduler.h View 1 2 3 4 5 6 3 chunks +3 lines, -2 lines 0 comments Download
M sync/engine/sync_scheduler_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M sync/engine/sync_scheduler_impl.cc View 1 chunk +4 lines, -5 lines 0 comments Download
M sync/engine/sync_scheduler_unittest.cc View 4 chunks +14 lines, -9 lines 0 comments Download
M sync/internal_api/public/base/invalidation.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -6 lines 0 comments Download
M sync/internal_api/public/base/invalidation.cc View 1 2 3 4 5 6 7 3 chunks +10 lines, -4 lines 0 comments Download
A sync/internal_api/public/base/invalidation_interface.h View 1 2 3 1 chunk +55 lines, -0 lines 0 comments Download
A sync/internal_api/public/base/invalidation_interface.cc View 1 2 3 1 chunk +29 lines, -0 lines 0 comments Download
M sync/internal_api/public/base/model_type_test_util.cc View 1 chunk +0 lines, -1 line 0 comments Download
M sync/internal_api/public/sync_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -2 lines 0 comments Download
M sync/internal_api/public/test/fake_sync_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -4 lines 0 comments Download
M sync/internal_api/sync_manager_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M sync/internal_api/sync_manager_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -20 lines 0 comments Download
M sync/internal_api/sync_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -8 lines 0 comments Download
M sync/internal_api/sync_rollback_manager_base.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M sync/internal_api/sync_rollback_manager_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -5 lines 0 comments Download
M sync/internal_api/test/fake_sync_manager.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -3 lines 0 comments Download
D sync/notifier/dropped_invalidation_tracker.h View 1 chunk +0 lines, -74 lines 0 comments Download
D sync/notifier/dropped_invalidation_tracker.cc View 1 chunk +0 lines, -45 lines 0 comments Download
M sync/sessions/data_type_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +16 lines, -15 lines 0 comments Download
M sync/sessions/data_type_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +66 lines, -75 lines 0 comments Download
M sync/sessions/nudge_tracker.h View 3 chunks +5 lines, -3 lines 0 comments Download
M sync/sessions/nudge_tracker.cc View 17 chunks +29 lines, -51 lines 0 comments Download
M sync/sessions/nudge_tracker_unittest.cc View 15 chunks +109 lines, -162 lines 0 comments Download
M sync/sync_internal_api.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M sync/sync_notifier.gypi View 1 chunk +0 lines, -2 lines 0 comments Download
M sync/sync_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
M sync/test/engine/fake_sync_scheduler.h View 1 chunk +2 lines, -1 line 0 comments Download
M sync/test/engine/fake_sync_scheduler.cc View 1 chunk +2 lines, -1 line 0 comments Download
A sync/test/mock_invalidation.h View 1 chunk +48 lines, -0 lines 0 comments Download
A sync/test/mock_invalidation.cc View 1 chunk +57 lines, -0 lines 0 comments Download
A sync/test/mock_invalidation_tracker.h View 1 chunk +65 lines, -0 lines 0 comments Download
A sync/test/mock_invalidation_tracker.cc View 1 chunk +63 lines, -0 lines 0 comments Download
A sync/test/trackable_mock_invalidation.h View 1 chunk +54 lines, -0 lines 0 comments Download
A sync/test/trackable_mock_invalidation.cc View 1 2 3 4 5 6 1 chunk +41 lines, -0 lines 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 4 5 3 chunks +76 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
rlarocque
Here's the change to wrap sync' use of invalidations. Since sync/ is not allowed to ...
6 years, 6 months ago (2014-06-18 17:54:05 UTC) #1
tim (not reviewing)
https://codereview.chromium.org/322333004/diff/1/chrome/browser/sync/glue/invalidation_wrapper.h File chrome/browser/sync/glue/invalidation_wrapper.h (right): https://codereview.chromium.org/322333004/diff/1/chrome/browser/sync/glue/invalidation_wrapper.h#newcode9 chrome/browser/sync/glue/invalidation_wrapper.h:9: #include "sync/internal_api/public/base/invalidation_interface.h" What is invalidation_interface? I don't see it ...
6 years, 6 months ago (2014-06-18 21:51:35 UTC) #2
tim (not reviewing)
On 2014/06/18 21:51:35, timsteele wrote: > https://codereview.chromium.org/322333004/diff/1/chrome/browser/sync/glue/invalidation_wrapper.h > File chrome/browser/sync/glue/invalidation_wrapper.h (right): > > https://codereview.chromium.org/322333004/diff/1/chrome/browser/sync/glue/invalidation_wrapper.h#newcode9 > ...
6 years, 6 months ago (2014-06-18 21:52:58 UTC) #3
rlarocque
On 2014/06/18 21:52:58, timsteele wrote: > On 2014/06/18 21:51:35, timsteele wrote: > > > https://codereview.chromium.org/322333004/diff/1/chrome/browser/sync/glue/invalidation_wrapper.h ...
6 years, 6 months ago (2014-06-18 21:57:09 UTC) #4
tim (not reviewing)
https://codereview.chromium.org/322333004/diff/20001/chrome/browser/sync/glue/invalidation_wrapper.h File chrome/browser/sync/glue/invalidation_wrapper.h (right): https://codereview.chromium.org/322333004/diff/20001/chrome/browser/sync/glue/invalidation_wrapper.h#newcode14 chrome/browser/sync/glue/invalidation_wrapper.h:14: class InvalidationWrapper : public syncer::InvalidationInterface { s/Wrapper/Adapter. But, could ...
6 years, 6 months ago (2014-06-18 22:41:11 UTC) #5
rlarocque
Here are some responses. I hope to get around to fixing the compile errors and ...
6 years, 6 months ago (2014-06-19 00:50:19 UTC) #6
rlarocque
Patch updated. PTAL. https://codereview.chromium.org/322333004/diff/20001/chrome/browser/sync/glue/invalidation_wrapper.h File chrome/browser/sync/glue/invalidation_wrapper.h (right): https://codereview.chromium.org/322333004/diff/20001/chrome/browser/sync/glue/invalidation_wrapper.h#newcode14 chrome/browser/sync/glue/invalidation_wrapper.h:14: class InvalidationWrapper : public syncer::InvalidationInterface { ...
6 years, 6 months ago (2014-06-20 20:00:13 UTC) #7
tim (not reviewing)
LGTM
6 years, 6 months ago (2014-06-20 20:21:33 UTC) #8
tim (not reviewing)
https://codereview.chromium.org/322333004/diff/60001/chrome/browser/sync/glue/sync_backend_host_core.cc File chrome/browser/sync/glue/sync_backend_host_core.cc (right): https://codereview.chromium.org/322333004/diff/60001/chrome/browser/sync/glue/sync_backend_host_core.cc#newcode384 chrome/browser/sync/glue/sync_backend_host_core.cc:384: } else { This may end up being a ...
6 years, 6 months ago (2014-06-20 20:47:54 UTC) #9
rlarocque
Woo-hoo! Finally got green trybots! Getting this patch to compile on all platforms was more ...
6 years, 6 months ago (2014-06-26 17:42:07 UTC) #10
tim (not reviewing)
Would base/memory/scoped_vector.h simplify your std::list usage? Otherwise LG
6 years, 6 months ago (2014-06-26 17:47:34 UTC) #11
rlarocque
On 2014/06/26 17:47:34, timsteele wrote: > Would base/memory/scoped_vector.h simplify your std::list usage? Otherwise LG It ...
6 years, 6 months ago (2014-06-26 17:54:02 UTC) #12
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 5 months ago (2014-06-27 17:38:13 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/322333004/240001
6 years, 5 months ago (2014-06-27 17:39:23 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-06-27 18:43:47 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-06-27 18:47:38 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/156681) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/201080) chromium_presubmit ...
6 years, 5 months ago (2014-06-27 18:47:40 UTC) #17
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 5 months ago (2014-06-27 23:44:43 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/322333004/240001
6 years, 5 months ago (2014-06-27 23:45:47 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 5 months ago (2014-06-27 23:53:38 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-06-27 23:55:46 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/ios_rel_device_ninja/builds/25501)
6 years, 5 months ago (2014-06-27 23:55:47 UTC) #22
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 5 months ago (2014-07-08 20:07:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/322333004/260001
6 years, 5 months ago (2014-07-08 20:08:37 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-08 21:33:29 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-08 21:57:14 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/168972)
6 years, 5 months ago (2014-07-08 21:57:15 UTC) #27
rlarocque
The CQ bit was checked by rlarocque@chromium.org
6 years, 5 months ago (2014-07-08 21:59:51 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rlarocque@chromium.org/322333004/260001
6 years, 5 months ago (2014-07-08 22:03:24 UTC) #29
commit-bot: I haz the power
6 years, 5 months ago (2014-07-08 23:38:25 UTC) #30
Message was sent while issue was closed.
Change committed as 281884

Powered by Google App Engine
This is Rietveld 408576698