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

Issue 1079923002: ServiceWorker: Stop exposing ServiceWorkerContextCore (Closed)

Created:
5 years, 8 months ago by nhiroki
Modified:
5 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, johnme+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, michaeln, nhiroki, peter+watch_chromium.org, serviceworker-reviews, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Stop exposing ServiceWorkerContextCore External components (eg. Push) can directly access SWContextCore, but the context core is designed for internal use and should be accessed via SWContextWrapper because it can be null in some cases (eg, failing to restart the system. See [1,2] for details of the wrapper-core layering). To enforce the rule, this CL stops exposing the context core and makes the wrapper to provide interfaces for that instead. [1] https://code.google.com/p/chromium/issues/detail?id=371675#c18 [2] https://docs.google.com/document/d/1eXdgnAOZC4dDDybmRpXT0t0lOYGhFf7xajOSanEb91Y/edit?usp=sharing BUG=472019 TEST=compile Committed: https://crrev.com/d389a96ff7963b90a7a80bc3cd3318fdf48c0e70 Cr-Commit-Position: refs/heads/master@{#326464}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : rebase #

Patch Set 3 : clean up #

Total comments: 2

Patch Set 4 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -136 lines) Patch
M content/browser/background_sync/background_sync_manager.cc View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M content/browser/devtools/protocol/service_worker_handler.cc View 1 2 3 3 chunks +2 lines, -9 lines 0 comments Download
M content/browser/geofencing/geofencing_manager.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M content/browser/navigator_connect/navigator_connect_service_worker_service_factory.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/notifications/notification_event_dispatcher_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/push_messaging/push_messaging_message_filter.cc View 1 11 chunks +12 lines, -12 lines 0 comments Download
M content/browser/push_messaging/push_messaging_router.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 2 3 4 chunks +5 lines, -9 lines 0 comments Download
M content/browser/service_worker/service_worker_context_watcher.cc View 1 2 2 chunks +3 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 1 2 3 5 chunks +45 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 2 3 3 chunks +124 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_internals_ui.h View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_internals_ui.cc View 5 chunks +28 lines, -75 lines 0 comments Download
M content/public/browser/push_messaging_service.cc View 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 21 (8 generated)
nhiroki
PTAL
5 years, 8 months ago (2015-04-15 07:10:42 UTC) #6
falken
lgtm, looks like a good idea to made the system more encapsulated. https://codereview.chromium.org/1079923002/diff/80001/content/browser/service_worker/service_worker_context_watcher.cc File content/browser/service_worker/service_worker_context_watcher.cc ...
5 years, 8 months ago (2015-04-15 08:03:20 UTC) #7
Peter Beverloo
push and notifications LGTM.
5 years, 8 months ago (2015-04-15 12:21:38 UTC) #8
nhiroki
Thank you! https://codereview.chromium.org/1079923002/diff/80001/content/browser/service_worker/service_worker_context_watcher.cc File content/browser/service_worker/service_worker_context_watcher.cc (right): https://codereview.chromium.org/1079923002/diff/80001/content/browser/service_worker/service_worker_context_watcher.cc#newcode72 content/browser/service_worker/service_worker_context_watcher.cc:72: } On 2015/04/15 08:03:20, falken wrote: > ...
5 years, 8 months ago (2015-04-15 23:38:16 UTC) #9
nhiroki
Added owners: jkarlin@ for c/b/background_sync/ pfeldman@ for c/b/devtools/ mek@ for c/b/{geofencing,navigator_connect} jochen@ for content/public/ PTAL, ...
5 years, 8 months ago (2015-04-15 23:46:12 UTC) #11
Marijn Kruisselbrink
> mek@ for c/b/{geofencing,navigator_connect} lgtm
5 years, 8 months ago (2015-04-15 23:53:35 UTC) #12
Marijn Kruisselbrink
https://codereview.chromium.org/1079923002/diff/120001/content/browser/service_worker/service_worker_context_wrapper.h File content/browser/service_worker/service_worker_context_wrapper.h (right): https://codereview.chromium.org/1079923002/diff/120001/content/browser/service_worker/service_worker_context_wrapper.h#newcode103 content/browser/service_worker/service_worker_context_wrapper.h:103: const FindRegistrationCallback& callback); If you're trying to mirror ServiceWorkerStorage ...
5 years, 8 months ago (2015-04-15 23:57:02 UTC) #13
jkarlin
background_sync/ lgtm
5 years, 8 months ago (2015-04-16 11:20:53 UTC) #14
jochen (gone - plz use gerrit)
lgtm
5 years, 8 months ago (2015-04-17 09:29:50 UTC) #15
nhiroki
Thank you for reviewing. https://codereview.chromium.org/1079923002/diff/120001/content/browser/service_worker/service_worker_context_wrapper.h File content/browser/service_worker/service_worker_context_wrapper.h (right): https://codereview.chromium.org/1079923002/diff/120001/content/browser/service_worker/service_worker_context_wrapper.h#newcode103 content/browser/service_worker/service_worker_context_wrapper.h:103: const FindRegistrationCallback& callback); On 2015/04/15 ...
5 years, 8 months ago (2015-04-23 05:01:04 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1079923002/140001
5 years, 8 months ago (2015-04-23 05:01:32 UTC) #19
commit-bot: I haz the power
Committed patchset #4 (id:140001)
5 years, 8 months ago (2015-04-23 06:12:37 UTC) #20
commit-bot: I haz the power
5 years, 8 months ago (2015-04-23 06:13:33 UTC) #21
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d389a96ff7963b90a7a80bc3cd3318fdf48c0e70
Cr-Commit-Position: refs/heads/master@{#326464}

Powered by Google App Engine
This is Rietveld 408576698