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

Issue 221963003: Reduce dependency of TiclInvalidationService on Profile (Closed)

Created:
6 years, 8 months ago by bartfab (slow)
Modified:
6 years, 8 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

Reduce dependency of TiclInvalidationService on Profile With this CL, a URLRequestContext and an InvalidationStateTracker are passed to TiclInvalidationService as explicit dependencies. This reduces the dependency of TiclInvalidationService on Profile, taking a step toward eventually removing the dependency altogether. BUG=358696 TEST=Updated unit tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264226 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=264311

Patch Set 1 #

Patch Set 2 : Pass scoped_refptr as const reference. #

Total comments: 10

Patch Set 3 : Comments addressed. #

Total comments: 2

Patch Set 4 : Ensure that weak pointers cannot be used to access partially destructed objects. #

Patch Set 5 : Made InvalidationStateTracker not vend WeakPtrs. #

Total comments: 4

Patch Set 6 : Removed need to have WeakPtrFactories for other classes in production. #

Patch Set 7 : Removed need to have WeakPtrFactories for other classes in tests. #

Total comments: 3

Patch Set 8 : Pass invalidation_state_tracker to Init(). This is unnecessary for a KeyedService but may be handy … #

Patch Set 9 : Compilation fixes. #

Patch Set 10 : Experimenting with EXPORT macros to try and fix multiply-defined symbols on Windows. #

Patch Set 11 : Fix sync_client compilation. #

Patch Set 12 : Fix sync_listen_notifications. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+179 lines, -103 lines) Patch
M chrome/browser/invalidation/invalidation_service_factory.cc View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/invalidation/invalidation_service_test_template.h View 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/invalidation/invalidator_storage.h View 1 2 3 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/invalidation/invalidator_storage.cc View 1 2 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/invalidation/invalidator_storage_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/invalidation/ticl_invalidation_service.h View 1 2 3 4 5 6 7 6 chunks +18 lines, -6 lines 0 comments Download
M chrome/browser/invalidation/ticl_invalidation_service.cc View 1 2 3 4 5 6 7 11 chunks +29 lines, -24 lines 0 comments Download
M chrome/browser/invalidation/ticl_invalidation_service_unittest.cc View 1 2 3 4 5 6 7 6 chunks +18 lines, -4 lines 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.h View 1 2 5 6 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/fake_invalidation_state_tracker.cc View 1 2 4 1 chunk +1 line, -1 line 0 comments Download
M sync/notifier/invalidation_state_tracker.h View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -6 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.h View 1 2 3 4 5 4 chunks +23 lines, -13 lines 0 comments Download
M sync/notifier/non_blocking_invalidator.cc View 1 2 3 4 5 9 chunks +63 lines, -25 lines 0 comments Download
M sync/notifier/non_blocking_invalidator_unittest.cc View 1 2 3 4 5 6 4 chunks +1 line, -6 lines 0 comments Download
M sync/tools/null_invalidation_state_tracker.h View 1 2 5 6 1 chunk +1 line, -1 line 0 comments Download
M sync/tools/null_invalidation_state_tracker.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M sync/tools/sync_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +1 line, -3 lines 0 comments Download
M sync/tools/sync_listen_notifications.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
bartfab (slow)
Hi Daniel, Could you review chrome/browser/invalidation/*? Hi Drew, Could you review sync/notifier/invalidation_state_tracker.h?
6 years, 8 months ago (2014-04-02 16:33:27 UTC) #1
bartfab (slow)
Daniel, Drew - Friendly review ping.
6 years, 8 months ago (2014-04-10 14:59:14 UTC) #2
bartfab (slow)
Richard, since Drew is out next week, could you review sync/notifier/invalidation_state_tracker.h? Daniel, do you have ...
6 years, 8 months ago (2014-04-11 18:58:59 UTC) #3
dcheng
https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc File chrome/browser/invalidation/invalidation_service_factory.cc (right): https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc#newcode26 chrome/browser/invalidation/invalidation_service_factory.cc:26: #include "net/url_request/url_request_context_getter.h" Do we actually need this include? It ...
6 years, 8 months ago (2014-04-11 19:54:00 UTC) #4
rlarocque
On 2014/04/11 19:54:00, dcheng wrote: > https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc > File chrome/browser/invalidation/invalidation_service_factory.cc (right): > > https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc#newcode26 > ...
6 years, 8 months ago (2014-04-11 20:03:37 UTC) #5
bartfab (slow)
https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc File chrome/browser/invalidation/invalidation_service_factory.cc (right): https://codereview.chromium.org/221963003/diff/20001/chrome/browser/invalidation/invalidation_service_factory.cc#newcode26 chrome/browser/invalidation/invalidation_service_factory.cc:26: #include "net/url_request/url_request_context_getter.h" On 2014/04/11 19:54:00, dcheng wrote: > Do ...
6 years, 8 months ago (2014-04-14 09:20:08 UTC) #6
dcheng
https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h File sync/notifier/invalidation_state_tracker.h (right): https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h#newcode40 sync/notifier/invalidation_state_tracker.h:40: return weak_factory_.GetWeakPtr(); I don't think we should be publicly ...
6 years, 8 months ago (2014-04-14 21:39:59 UTC) #7
bartfab (slow)
https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h File sync/notifier/invalidation_state_tracker.h (right): https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h#newcode40 sync/notifier/invalidation_state_tracker.h:40: return weak_factory_.GetWeakPtr(); On 2014/04/14 21:39:59, dcheng wrote: > I ...
6 years, 8 months ago (2014-04-14 22:06:00 UTC) #8
dcheng
On 2014/04/14 22:06:00, bartfab wrote: > https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h > File sync/notifier/invalidation_state_tracker.h (right): > > https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h#newcode40 > ...
6 years, 8 months ago (2014-04-14 22:11:08 UTC) #9
bartfab (slow)
On 2014/04/14 22:11:08, dcheng wrote: > On 2014/04/14 22:06:00, bartfab wrote: > > > https://codereview.chromium.org/221963003/diff/40001/sync/notifier/invalidation_state_tracker.h ...
6 years, 8 months ago (2014-04-14 22:23:27 UTC) #10
Nicolas Zea
On 2014/04/14 22:23:27, bartfab wrote: > On 2014/04/14 22:11:08, dcheng wrote: > > On 2014/04/14 ...
6 years, 8 months ago (2014-04-14 22:51:27 UTC) #11
bartfab (slow)
On 2014/04/14 22:51:27, Nicolas Zea wrote: > On 2014/04/14 22:23:27, bartfab wrote: > > On ...
6 years, 8 months ago (2014-04-15 12:39:02 UTC) #12
Nicolas Zea
https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc File sync/notifier/non_blocking_invalidator.cc (right): https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc#newcode189 sync/notifier/non_blocking_invalidator.cc:189: delegate_observer_.Call( these calls here would no longer interact directly ...
6 years, 8 months ago (2014-04-15 16:30:41 UTC) #13
bartfab (slow)
https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc File sync/notifier/non_blocking_invalidator.cc (right): https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc#newcode189 sync/notifier/non_blocking_invalidator.cc:189: delegate_observer_.Call( On 2014/04/15 16:30:42, Nicolas Zea wrote: > these ...
6 years, 8 months ago (2014-04-15 16:48:43 UTC) #14
Nicolas Zea
https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc File sync/notifier/non_blocking_invalidator.cc (right): https://codereview.chromium.org/221963003/diff/70001/sync/notifier/non_blocking_invalidator.cc#newcode189 sync/notifier/non_blocking_invalidator.cc:189: delegate_observer_.Call( On 2014/04/15 16:48:44, bartfab wrote: > On 2014/04/15 ...
6 years, 8 months ago (2014-04-15 17:50:54 UTC) #15
bartfab (slow)
Please take another look. The WeakPtr is contained to NonBlockingInvalidator only now.
6 years, 8 months ago (2014-04-15 20:01:11 UTC) #16
dcheng
https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc File chrome/browser/invalidation/ticl_invalidation_service.cc (right): https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc#newcode331 chrome/browser/invalidation/ticl_invalidation_service.cc:331: invalidation_state_tracker_.reset(); Hm. This means that if we shutdown sync ...
6 years, 8 months ago (2014-04-15 20:12:41 UTC) #17
bartfab (slow)
https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc File chrome/browser/invalidation/ticl_invalidation_service.cc (right): https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc#newcode331 chrome/browser/invalidation/ticl_invalidation_service.cc:331: invalidation_state_tracker_.reset(); On 2014/04/15 20:12:41, dcheng wrote: > Hm. This ...
6 years, 8 months ago (2014-04-15 20:16:05 UTC) #18
bartfab (slow)
https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc File chrome/browser/invalidation/ticl_invalidation_service.cc (right): https://codereview.chromium.org/221963003/diff/110001/chrome/browser/invalidation/ticl_invalidation_service.cc#newcode331 chrome/browser/invalidation/ticl_invalidation_service.cc:331: invalidation_state_tracker_.reset(); On 2014/04/15 20:16:06, bartfab wrote: > On 2014/04/15 ...
6 years, 8 months ago (2014-04-15 20:19:39 UTC) #19
Nicolas Zea
sync/ LGTM
6 years, 8 months ago (2014-04-15 21:56:00 UTC) #20
dcheng
On 2014/04/15 21:56:00, Nicolas Zea wrote: > sync/ LGTM c/b/invalidations/ LGTM.
6 years, 8 months ago (2014-04-15 22:29:05 UTC) #21
dcheng
The CQ bit was checked by dcheng@chromium.org
6 years, 8 months ago (2014-04-15 22:29:11 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/221963003/130001
6 years, 8 months ago (2014-04-15 22:31:06 UTC) #23
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-15 23:29:39 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_rel
6 years, 8 months ago (2014-04-15 23:29:40 UTC) #25
bartfab (slow)
The CQ bit was checked by bartfab@chromium.org
6 years, 8 months ago (2014-04-16 09:11:10 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/221963003/50002
6 years, 8 months ago (2014-04-16 09:11:49 UTC) #27
bartfab (slow)
The CQ bit was checked by bartfab@chromium.org
6 years, 8 months ago (2014-04-16 11:58:13 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/221963003/160001
6 years, 8 months ago (2014-04-16 11:58:20 UTC) #29
commit-bot: I haz the power
Change committed as 264226
6 years, 8 months ago (2014-04-16 17:08:53 UTC) #30
bartfab (slow)
The CQ bit was checked by bartfab@chromium.org
6 years, 8 months ago (2014-04-16 17:44:16 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/221963003/180001
6 years, 8 months ago (2014-04-16 17:44:59 UTC) #32
eae
On 2014/04/16 17:44:59, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 8 months ago (2014-04-16 17:47:06 UTC) #33
bartfab (slow)
On 2014/04/16 17:47:06, eae wrote: > On 2014/04/16 17:44:59, I haz the power (commit-bot) wrote: ...
6 years, 8 months ago (2014-04-16 17:48:16 UTC) #34
eae
On 2014/04/16 17:48:16, bartfab wrote: > On 2014/04/16 17:47:06, eae wrote: > > On 2014/04/16 ...
6 years, 8 months ago (2014-04-16 17:50:00 UTC) #35
bartfab (slow)
The CQ bit was unchecked by bartfab@chromium.org
6 years, 8 months ago (2014-04-16 17:50:27 UTC) #36
bartfab (slow)
The CQ bit was checked by bartfab@chromium.org
6 years, 8 months ago (2014-04-16 17:52:10 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bartfab@chromium.org/221963003/200001
6 years, 8 months ago (2014-04-16 17:52:30 UTC) #38
commit-bot: I haz the power
6 years, 8 months ago (2014-04-16 21:38:52 UTC) #39
Message was sent while issue was closed.
Change committed as 264311

Powered by Google App Engine
This is Rietveld 408576698