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

Issue 2413063003: service worker: Add promise boilerplate for NavigationPreload enable/disable (Closed)

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

Description

service worker: Add promise boilerplate for NavigationPreload enable/disable This is still just boilerplate, no test added. BUG=649558 Committed: https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1 Cr-Commit-Position: refs/heads/master@{#424999}

Patch Set 1 #

Total comments: 6

Patch Set 2 : free the memory #

Patch Set 3 : disable #

Patch Set 4 : more boilerplate #

Total comments: 3

Messages

Total messages: 26 (14 generated)
falken
ptal
4 years, 2 months ago (2016-10-13 07:04:35 UTC) #2
horo
https://codereview.chromium.org/2413063003/diff/1/content/child/service_worker/web_service_worker_registration_impl.cc File content/child/service_worker/web_service_worker_registration_impl.cc (right): https://codereview.chromium.org/2413063003/diff/1/content/child/service_worker/web_service_worker_registration_impl.cc#newcode151 content/child/service_worker/web_service_worker_registration_impl.cc:151: // TODO(falken): Implement this. std::unique_ptr<WebEnableNavigationPreloadCallbacks> callback(callbacks); |callbacks| need to ...
4 years, 2 months ago (2016-10-13 07:36:06 UTC) #5
falken
good catch https://codereview.chromium.org/2413063003/diff/1/content/child/service_worker/web_service_worker_registration_impl.cc File content/child/service_worker/web_service_worker_registration_impl.cc (right): https://codereview.chromium.org/2413063003/diff/1/content/child/service_worker/web_service_worker_registration_impl.cc#newcode151 content/child/service_worker/web_service_worker_registration_impl.cc:151: // TODO(falken): Implement this. On 2016/10/13 07:36:06, ...
4 years, 2 months ago (2016-10-13 07:45:56 UTC) #6
horo
lgtm
4 years, 2 months ago (2016-10-13 07:48:04 UTC) #9
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/2413063003/40001
4 years, 2 months ago (2016-10-13 07:48:58 UTC) #12
falken
Oops, didn't actually call disablePreloadNavigation() yet. Done now.
4 years, 2 months ago (2016-10-13 07:54:35 UTC) #14
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/2413063003/60001
4 years, 2 months ago (2016-10-13 07:55:07 UTC) #18
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/2413063003/60001
4 years, 2 months ago (2016-10-13 07:56:08 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-13 10:57:57 UTC) #21
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1 Cr-Commit-Position: refs/heads/master@{#424999}
4 years, 2 months ago (2016-10-13 10:59:44 UTC) #23
nhiroki
https://codereview.chromium.org/2413063003/diff/60001/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h File third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h (right): https://codereview.chromium.org/2413063003/diff/60001/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h#newcode15 third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h:15: class EnableNavigationPreloadCallbacks final Why don't you use PromiseCallbackAdapter<void, ServiceWorkerError>? ...
4 years, 2 months ago (2016-10-13 11:29:13 UTC) #25
falken
4 years, 2 months ago (2016-10-14 04:08:50 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2413063003/diff/60001/third_party/WebKit/Sour...
File
third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
(right):

https://codereview.chromium.org/2413063003/diff/60001/third_party/WebKit/Sour...
third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h:15:
class EnableNavigationPreloadCallbacks final
On 2016/10/13 11:29:13, nhiroki wrote:
> Why don't you use PromiseCallbackAdapter<void, ServiceWorkerError>? (see
> following links)
> 
>
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/bindings/core/...
>
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/servic...

Yea I considered using PromiseCallbackAdapter but I never really understood it
and it seemed simpler to just write things out. Now having written this out I
can see how it'd be useful to avoid a new file and new classes. I'll consider
using it.

Powered by Google App Engine
This is Rietveld 408576698