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

Issue 2934163003: Add a ServiceWorkerContextObserver to content's public API. (Closed)

Created:
3 years, 6 months ago by dominickn
Modified:
3 years, 6 months ago
Reviewers:
kinuko
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a ServiceWorkerContextObserver to content's public API. This CL introduces a ServiceWorkerContextObserver which may be used by classes outside of content. The observer is implemented by proxying the internal ServiceWorkerContextCoreObserver method calls via ServiceWorkerContextWrapper. This CL also exposes ServiceWorkerUtils::ScopeMatches on the public ServiceWorkerContext interface in preparation for crrev.com/2942513002, where the method is used to check if a manifest URL lies within the scope of a service worker. BUG=625051 Review-Url: https://codereview.chromium.org/2934163003 Cr-Commit-Position: refs/heads/master@{#479568} Committed: https://chromium.googlesource.com/chromium/src/+/5bce7f41747fd8e3918ae354977e655487237e4c

Patch Set 1 #

Patch Set 2 : RemoveObserver on destruct #

Total comments: 2

Patch Set 3 : Clarifying comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -5 lines) Patch
M content/browser/service_worker/service_worker_context_wrapper.h View 5 chunks +18 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 1 2 4 chunks +29 lines, -2 lines 0 comments Download
M content/public/browser/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/service_worker_context.h View 2 chunks +9 lines, -0 lines 0 comments Download
A content/public/browser/service_worker_context_observer.h View 1 chunk +23 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 23 (17 generated)
dominickn
PTAL, thanks! The follow up CL that uses the public observer is https://codereview.chromium.org/2942513002/
3 years, 6 months ago (2017-06-14 03:25:36 UTC) #8
kinuko
lgtm https://codereview.chromium.org/2934163003/diff/20001/content/browser/service_worker/service_worker_context_wrapper.cc File content/browser/service_worker/service_worker_context_wrapper.cc (right): https://codereview.chromium.org/2934163003/diff/20001/content/browser/service_worker/service_worker_context_wrapper.cc#newcode140 content/browser/service_worker/service_worker_context_wrapper.cc:140: core_observer_list_->RemoveObserver(this); I think this wrapper almost always live ...
3 years, 6 months ago (2017-06-14 07:33:45 UTC) #11
dominickn
Thanks! https://codereview.chromium.org/2934163003/diff/20001/content/browser/service_worker/service_worker_context_wrapper.cc File content/browser/service_worker/service_worker_context_wrapper.cc (right): https://codereview.chromium.org/2934163003/diff/20001/content/browser/service_worker/service_worker_context_wrapper.cc#newcode140 content/browser/service_worker/service_worker_context_wrapper.cc:140: core_observer_list_->RemoveObserver(this); On 2017/06/14 07:33:45, kinuko wrote: > I ...
3 years, 6 months ago (2017-06-14 09:10:58 UTC) #12
kinuko
On 2017/06/14 09:10:58, dominickn wrote: > Thanks! > > https://codereview.chromium.org/2934163003/diff/20001/content/browser/service_worker/service_worker_context_wrapper.cc > File content/browser/service_worker/service_worker_context_wrapper.cc (right): > ...
3 years, 6 months ago (2017-06-14 09:30:02 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2934163003/40001
3 years, 6 months ago (2017-06-15 00:16:20 UTC) #20
commit-bot: I haz the power
3 years, 6 months ago (2017-06-15 01:27:29 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/5bce7f41747fd8e3918ae354977e...

Powered by Google App Engine
This is Rietveld 408576698