New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 649558 link

Starred by 19 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Feature

Blocked on:
issue 685493
issue 728013
issue 737046

Blocking:
issue 661090



Sign in to add a comment

Implement Service Worker navigation preload

Project Member Reported by horo@chromium.org, Sep 23 2016

Issue description

There is a discussion to introduce a new API which enables the browser to send "preload" network requests for page navigation before executing the fetch event handler in the Service Worker.

Spec discussion: https://github.com/w3c/ServiceWorker/issues/920

The spec discussion is not settled yet, especially how to enable this feature.
 - registration.active.setNavigationPreload()
 - InstallEvent.addNavigationPreload()

But there seems to be a consensus that FetchEvent will have a new property ("preloadResponse"? "navigationPreload"?) which returns a promise that will be resolved with the preloaded network response.

I'd like to start implementing preparation patches for this feature.

OWP launch bug: https://bugs.chromium.org/p/chromium/issues/detail?id=661071
Chrome status: https://www.chromestatus.com/feature/5734842339688448
Intent to implement: https://groups.google.com/a/chromium.org/d/msg/blink-dev/PI3FG54L1ZU/B4jNSzhyCAAJ
 

Comment 1 by horo@chromium.org, Sep 23 2016

Cc: slightlyoff@chromium.org jakearchibald@chromium.org

Comment 2 by horo@chromium.org, Sep 23 2016

Status: Started (was: Assigned)

Comment 3 by n...@fb.com, Sep 23 2016

Labels: DevRel-Facebook
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5

commit 21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5
Author: horo <horo@chromium.org>
Date: Thu Sep 29 01:37:57 2016

Make WebDataConsumerHandleImpl return OK while zero-length reading of closed pipe.

Even if there is unread data available, mojo::ReadDataRaw() returns
FAILED_PRECONDITION when |size| is 0 and the producer handle was closed. But in
this case, WebDataConsumerHandle::Reader::read() must return OK.

BytesConsumerForDataConsumerHandle::didGetReadable() calls zero-length read to
check the handle's status. If ReaderImpl::read() returns Done, the consumer
handle will be closed even if there is unread data available.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2363963002
Cr-Commit-Position: refs/heads/master@{#421706}

[modify] https://crrev.com/21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5/content/child/web_data_consumer_handle_impl.cc
[modify] https://crrev.com/21cb200fb6ef1ea455ac5a2e820a1ed4fcdea5e5/content/child/web_data_consumer_handle_impl_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bdc8e1e4477f7dcd911528720a50d639be6d39b5

commit bdc8e1e4477f7dcd911528720a50d639be6d39b5
Author: horo <horo@chromium.org>
Date: Tue Oct 04 23:23:49 2016

Mojoify FetchEvent of Service Worker.

I'd like to use Mojo to send navigation preload response ( crbug.com/649558 ) from
the browser process to the service worker. But currently we are using the legacy
IPC when the browser process sends the FetchEvent to the service worker. There
will be an ordering issue if we use both the legacy IPC and Mojo IPC.

To avoid the ordering issue, this CL changes the FetchEvent IPC to use Mojo.

BUG= 629701 , 649558 

Review-Url: https://codereview.chromium.org/2352173004
Cr-Commit-Position: refs/heads/master@{#422996}

[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/BUILD.gn
[add] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/service_worker/fetch_event_dispatcher.mojom
[add] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/service_worker/fetch_event_dispatcher.typemap
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/service_worker/service_worker_messages.h
[add] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/service_worker/service_worker_status_code_traits.cc
[add] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/service_worker/service_worker_status_code_traits.h
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/common/typemaps.gni
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5/content/renderer/service_worker/service_worker_context_client.h

Labels: -Type-Bug -Pri-2 M-56 Pri-1 Type-Feature
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9a2b454a609338388dec903980267f3c7141a97f

commit 9a2b454a609338388dec903980267f3c7141a97f
Author: falken <falken@chromium.org>
Date: Tue Oct 11 07:03:36 2016

service worker: Add NavigationPreload runtime flag and skeleton interface

This just adds the runtime flag and a dummy implementation. Actual code and
tests are to come in future patches.

This patch is based on the WIP spec change here:
https://github.com/w3c/ServiceWorker/pull/983/files

BUG= 649558 

Review-Url: https://codereview.chromium.org/2389693002
Cr-Commit-Position: refs/heads/master@{#424382}

[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/BUILD.gn
[add] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[add] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.h
[add] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
[add] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadState.idl
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl
[modify] https://crrev.com/9a2b454a609338388dec903980267f3c7141a97f/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member

Comment 8 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/197a4f896f0434376b82895e7e72aacce16ec3ef

commit 197a4f896f0434376b82895e7e72aacce16ec3ef
Author: horo <horo@chromium.org>
Date: Tue Oct 11 08:15:42 2016

Remove WaitUntilObserver::decrementPendingActivity() from RespondWithObserver::contextDestroyed()

We don't need to (and should not) call this while the ServiceWorker context is being destroyed.

And also this caused crashes in ServiceWorkerContextClient after mojofying FetchEvent.
(crbug.com/653403) This crash only happens when LifecycleNotifier::notifyContextDestroyed() calls
RespondWithObserver::contextDestroyed() before WaitUntilObserver::contextDestroyed().

BUG=653403, 649558 , 629701 

Review-Url: https://codereview.chromium.org/2396293002
Cr-Commit-Position: refs/heads/master@{#424390}

[modify] https://crrev.com/197a4f896f0434376b82895e7e72aacce16ec3ef/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
[modify] https://crrev.com/197a4f896f0434376b82895e7e72aacce16ec3ef/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h

Project Member

Comment 9 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/011e3a5aa9acefa9794e74bc1facc50c2eeedea9

commit 011e3a5aa9acefa9794e74bc1facc50c2eeedea9
Author: horo <horo@chromium.org>
Date: Tue Oct 11 11:59:11 2016

Revert of Revert "Mojoify FetchEvent of Service Worker." (patchset #1 id:1 of https://codereview.chromium.org/2399903003/ )

Reason for revert:
The crash reported in https://crbug.com/653403 was fixed by https://crrev.com/2396293002/.

BUG=653403,  649558 ,  629701 

Original issue's description:
> Revert "Mojoify FetchEvent of Service Worker."
>
> This reverts commit bdc8e1e4477f7dcd911528720a50d639be6d39b5.
> This is a top crasher that's blocking release.
>
> BUG=653403
> TBR=horo@chromium.org
>
> Committed: https://crrev.com/9a64a996a29e3fcdc07f8d7927fdebeb66faa44a
> Cr-Commit-Position: refs/heads/master@{#423663}

TBR=dcheng@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=653403

Review-Url: https://codereview.chromium.org/2406183002
Cr-Commit-Position: refs/heads/master@{#424407}

[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/BUILD.gn
[add] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/service_worker/fetch_event_dispatcher.mojom
[add] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/service_worker/fetch_event_dispatcher.typemap
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/service_worker/service_worker_messages.h
[add] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/service_worker/service_worker_status_code_traits.cc
[add] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/service_worker/service_worker_status_code_traits.h
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/common/typemaps.gni
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/011e3a5aa9acefa9794e74bc1facc50c2eeedea9/content/renderer/service_worker/service_worker_context_client.h

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 12 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2b805ae42103749c9d92785b10528bde83a4bd4b

commit 2b805ae42103749c9d92785b10528bde83a4bd4b
Author: horo <horo@chromium.org>
Date: Wed Oct 12 05:33:09 2016

Store Origin-Trial tokens to ServiceWorkerDataBase

Currently the Origin-Trial tokens for ServiceWorkers are stored in the HTTP
header in ServiceWorkerStorage. These are loaded when the ServiceWorker is
started.

We are thinking about using Origin-Trial for Navigation Preload feature. If we
will do so, we have to check the token before starting the ServiceWorker. So we
need to store the token in the ServiceWorkerDataBase.

And also if we have the tokens in ServiceWorkerDataBase, we can check the tokens
and stop starting ServiceWorkers for ForeignFetch when the tokens have expired.
See comments in ServiceWorkerGlobalScopeProxy::dispatchForeignFetchEvent().

BUG= 649558 

Review-Url: https://codereview.chromium.org/2376403004
Cr-Commit-Position: refs/heads/master@{#424677}

[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_database.proto
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/common/origin_trials/trial_token_validator.cc
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/content/common/origin_trials/trial_token_validator.h
[modify] https://crrev.com/2b805ae42103749c9d92785b10528bde83a4bd4b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/908845d683ec7a597592e32c05e077b8dc95a9a9

commit 908845d683ec7a597592e32c05e077b8dc95a9a9
Author: horo <horo@chromium.org>
Date: Thu Oct 13 03:37:46 2016

Revert the comment change in ServiceWorkerGlobalScopeProxy.cpp of https://crrev.com/2376403004

We still start the service worker for ForeignFetch even if its Origin-Trial tokens have expired.
So this comment change is unsuitable.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2412513004
Cr-Commit-Position: refs/heads/master@{#424948}

[modify] https://crrev.com/908845d683ec7a597592e32c05e077b8dc95a9a9/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1

commit ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1
Author: falken <falken@chromium.org>
Date: Thu Oct 13 10:57:34 2016

service worker: Add promise boilerplate for NavigationPreload enable/disable

This is still just boilerplate, no test added.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2413063003
Cr-Commit-Position: refs/heads/master@{#424999}

[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/BUILD.gn
[add] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.cpp
[add] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.h
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
[modify] https://crrev.com/ac291a0d10c9c31ca5ad54f6dd0df98cae19a1b1/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h

Project Member

Comment 14 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/160d7098f1c9f293990f0a1ee6644442ad945fc9

commit 160d7098f1c9f293990f0a1ee6644442ad945fc9
Author: horo <horo@chromium.org>
Date: Fri Oct 14 04:57:21 2016

Use fetch_event_id (fetchEventID in blink) for FetchEvent

Currently we have |event_finish_id| in both browser and renderer code, but they
aren't the same thing. To avoid this confusion, this CL will use |fetch_event_id|
(fetchEventID in blink) for FetchEvent handling. And will stop using
|event_finish_id| in renderer code by using AddWithID() in
ServiceWorkerContextClient::DispatchFetchEvent().

BUG= 649558 

Review-Url: https://codereview.chromium.org/2416863002
Cr-Commit-Position: refs/heads/master@{#425255}

[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/common/service_worker/fetch_event_dispatcher.mojom
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h
[modify] https://crrev.com/160d7098f1c9f293990f0a1ee6644442ad945fc9/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 15 by bugdroid1@chromium.org, Oct 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f

commit fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f
Author: horo <horo@chromium.org>
Date: Tue Oct 18 09:08:19 2016

Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent.

FetchEvent.navigationPreload will be implemented in the following steps.
[1/4] Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent.
      https://codereview.chromium.org/2417793002/ This CL.
[2/4] Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload().
      https://codereview.chromium.org/2410333006/
[3/4] Implement FetchEvent.navigationPreload.
      https://codereview.chromium.org/2416843002/
[4/4] Add browser tests for NavigationPreload.
      https://codereview.chromium.org/2413643005/

This CL introduces FetchEventPreloadHandle in fetch_event_dispatcher.mojom.
If the NavigationPreload feature is enabled:
 - ServiceWorkerURLRequestJob calls ServiceWorkerFetchDispatcher::
   MaybeStartNavigationPreload() even if the worker is not started yet.
 - ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload() will start the
   navigation preload request and create a FetchEventPreloadHandle.
   https://codereview.chromium.org/2410333006/ implements this method.
 - The FetchEventPreloadHandle will be passed to the service worker when
   DispatchFetchEvent() dispatches the FetchEvent.
 - ServiceWorkerContextClient::FetchEventDispatcherImpl receives the
   FetchEventPreloadHandle and will pass it to FetchEvent.
   https://codereview.chromium.org/2416843002/ implements this logic.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2417793002
Cr-Commit-Position: refs/heads/master@{#425927}

[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/embedded_worker_test_helper.cc
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/embedded_worker_test_helper.h
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/service_worker_fetch_dispatcher.h
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/common/service_worker/fetch_event_dispatcher.mojom
[modify] https://crrev.com/fc9f9dc28b5291e0582dc1fcb2fb35aa0409f34f/content/renderer/service_worker/service_worker_context_client.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/77e1af6093d3634a5367cfc090e531e5a72cd0f4

commit 77e1af6093d3634a5367cfc090e531e5a72cd0f4
Author: horo <horo@chromium.org>
Date: Tue Oct 18 16:48:07 2016

Add DISALLOW_COPY_AND_ASSIGN in web_data_consumer_handle_impl.h.

When I tried to include web_data_consumer_handle_impl.h from
service_worker_context_client.cc in https://codereview.chromium.org/2416843002/,
I saw the following compile error on windows.
To avoid this problem, this CL adds DISALLOW_COPY_AND_ASSIGN in web_data_consumer_handle_impl.h.

----
e:\b\c\b\win\src\base\memory\ref_counted.h(402):
 error C2027: use of undefined type 'content::WebDataConsumerHandleImpl::Context'
e:\b\c\b\win\src\content\child\web_data_consumer_handle_impl.h(22):
 note: see declaration of 'content::WebDataConsumerHandleImpl::Context'
e:\b\c\b\win\src\base\memory\ref_counted.h(401):
 note: while compiling class template member function
 'void scoped_refptr<content::WebDataConsumerHandleImpl::Context>::AddRef(T *)'
  with
  [
   T=content::WebDataConsumerHandleImpl::Context
  ]
e:\b\c\b\win\src\base\memory\ref_counted.h(285):
 note: see reference to function template instantiation
 'void scoped_refptr<content::WebDataConsumerHandleImpl::Context>::AddRef(T *)'
 being compiled
  with
  [
   T=content::WebDataConsumerHandleImpl::Context
  ]
e:\b\c\b\win\src\content\child\web_data_consumer_handle_impl.h(43):
 note: see reference to class template instantiation
 'scoped_refptr<content::WebDataConsumerHandleImpl::Context>' being compiled
e:\b\c\b\win\src\base\memory\ref_counted.h(402):
 error C2227: left of '->AddRef' must point to class/struct/union/generic type
---
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/277294/steps/compile%20%28with%20patch%29/logs/stdio

BUG= 649558 

Review-Url: https://codereview.chromium.org/2426483002
Cr-Commit-Position: refs/heads/master@{#425989}

[modify] https://crrev.com/77e1af6093d3634a5367cfc090e531e5a72cd0f4/content/child/web_data_consumer_handle_impl.h

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/752388328b9fa105ce1eb822e0a58e33f1a892ef

commit 752388328b9fa105ce1eb822e0a58e33f1a892ef
Author: horo <horo@chromium.org>
Date: Thu Oct 20 03:55:34 2016

Introduce ServiceWorkerNavigationPreload feature name

https://crrev.com/2389693002 added NavigationPreload runtime flag as
experimental status. This feature is enabled when
"--enable-experimental-web-platform-features" flag is set. But according to the
comment https://crrev.com/2410333006/#msg42 we should introduce a new flag
instead. So this CL introduces ServiceWorkerNavigationPreload feature which is
enabled when "--enable-features=ServiceWorkerNavigationPreload" flag is set.

BUG= 649558 

Review-Url: https://chromiumcodereview.appspot.com/2431003003
Cr-Commit-Position: refs/heads/master@{#426395}

[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/content/child/runtime_features.cc
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/content/public/common/content_features.cc
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/content/public/common/content_features.h
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/LeakExpectations
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/VirtualTestSuites
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[add] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/README.txt
[add] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/Source/web/WebRuntimeFeatures.cpp
[modify] https://crrev.com/752388328b9fa105ce1eb822e0a58e33f1a892ef/third_party/WebKit/public/web/WebRuntimeFeatures.h

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/36762af751e2100946cff85db993910e8a402423

commit 36762af751e2100946cff85db993910e8a402423
Author: horo <horo@chromium.org>
Date: Thu Oct 20 06:51:46 2016

Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload().

This CL depends on https://codereview.chromium.org/2417793002.

FetchEvent.navigationPreload will be implemented in the following steps.
[1/4] Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent.
      https://codereview.chromium.org/2417793002/
[2/4] Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload().
      https://codereview.chromium.org/2410333006/ This CL.
[3/4] Implement FetchEvent.navigationPreload.
      https://codereview.chromium.org/2416843002/
[4/4] Add browser tests for NavigationPreload.
      https://codereview.chromium.org/2413643005/

BUG= 649558 

Review-Url: https://chromiumcodereview.appspot.com/2410333006
Cr-Commit-Position: refs/heads/master@{#426423}

[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/foreign_fetch_request_handler.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_controllee_request_handler.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_controllee_request_handler.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_fetch_dispatcher.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_handle_unittest.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_url_request_job.h
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/36762af751e2100946cff85db993910e8a402423/content/common/service_worker/service_worker_types.h

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 20 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/27debe64865c9d43d8b68b4a04176aac4542cfcf

commit 27debe64865c9d43d8b68b4a04176aac4542cfcf
Author: horo <horo@chromium.org>
Date: Thu Oct 20 09:03:48 2016

Use kEnableServiceWorkerNavigationPreload feature name in service_worker_fetch_dispatcher.cc

BUG= 649558 

Review-Url: https://chromiumcodereview.appspot.com/2434173002
Cr-Commit-Position: refs/heads/master@{#426433}

[modify] https://crrev.com/27debe64865c9d43d8b68b4a04176aac4542cfcf/content/browser/service_worker/service_worker_fetch_dispatcher.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 24 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/963669d666016ef3abf0102614d99779546e9e3b

commit 963669d666016ef3abf0102614d99779546e9e3b
Author: falken <falken@chromium.org>
Date: Mon Oct 24 23:05:29 2016

service worker: Plumb NavigationPreloadManager.enable/disable to browser-side

Now enable/disable are propagated to browser-side ServiceWorkerRegistration
and the promises are resolved renderer-side. But it doesn't yet
* write to disk
* propagate to ServiceWorkerVersion
* implement NavigationPreloadManager.getState

Tests will be added when getState is implemented.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2433273003
Cr-Commit-Position: refs/heads/master@{#427175}

[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/browser/bad_message.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.cpp
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/963669d666016ef3abf0102614d99779546e9e3b/tools/metrics/histograms/histograms.xml

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/111601216214188fc2ace390da5b2af0095564fd

commit 111601216214188fc2ace390da5b2af0095564fd
Author: horo <horo@chromium.org>
Date: Tue Oct 25 09:41:56 2016

Implement FetchEvent.navigationPreload

This CL depends on https://codereview.chromium.org/2410333006/

FetchEvent.navigationPreload will be implemented in the following steps.
[1/4] Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent.
      https://codereview.chromium.org/2417793002/
[2/4] Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload().
      https://codereview.chromium.org/2410333006/
[3/4] Implement FetchEvent.navigationPreload.
      https://codereview.chromium.org/2416843002/ This CL.
[4/4] Add browser tests for NavigationPreload.
      https://codereview.chromium.org/2413643005/

If ServiceWorkerContextClient::FetchEventDispatcherImpl receives preload_handle,
it creates a PreloadRequest. This PreloadRequest is a mojom::URLLoaderClient
owning mojom::URLLoader.

ServiceWorkerContextClient::DispatchFetchEvent() stores the PreloadRequest to
|context_| and calls ServiceWorkerGlobalScopeProxy::dispatchFetchEvent() with
|navigationPreloadSent| flag set.

If the flag is set, ServiceWorkerGlobalScopeProxy::dispatchFetchEvent() calls
FetchEvent::createPreloadResponseCallback() to create
WebServiceWorkerPreloadResponseCallbacks and calls registerPreloadResponseCallback
to pass the callback to ServiceWorkerContextClient.

ServiceWorkerContextClient::registerPreloadResponseCallback() calls
PreloadRequest::RegisterCallback() and the callback will be called when
OnStartLoadingResponseBody() is called or OnComplete() is called with an error.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2416843002
Cr-Commit-Position: refs/heads/master@{#427303}

[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/bindings/core/v8/ScriptPromiseProperties.h
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/111601216214188fc2ace390da5b2af0095564fd/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 22 by bugdroid1@chromium.org, Oct 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/193ab9f14c15355404ec9bbfe002dd48980a465a

commit 193ab9f14c15355404ec9bbfe002dd48980a465a
Author: horo <horo@chromium.org>
Date: Tue Oct 25 09:51:44 2016

Add check for PlzNavigate in ServiceWorkerFetchDispatcher.

ServiceWorkerProviderHost::PreCreateNavigationHost() creates a ServiceWorkerProviderHost
without ServiceWorkerDispatcherHost. So MaybeStartNavigationPreload() is called with null
MojoURLLoaderFactoryGetter. This will cause crashes when PlzNavigate is enabled.

I want to disable NavigationPreload for PlzNavigate in this CL.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2451663002
Cr-Commit-Position: refs/heads/master@{#427310}

[modify] https://crrev.com/193ab9f14c15355404ec9bbfe002dd48980a465a/content/browser/service_worker/service_worker_fetch_dispatcher.cc

Project Member

Comment 23 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b49387a112b13eb4ed99810b4c2c094299d4a4fd

commit b49387a112b13eb4ed99810b4c2c094299d4a4fd
Author: falken <falken@chromium.org>
Date: Wed Oct 26 05:28:47 2016

service worker: Implement NavigationPreloadManager.getState

BUG= 649558 

Review-Url: https://codereview.chromium.org/2443103002
Cr-Commit-Position: refs/heads/master@{#427596}

[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/browser/bad_message.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/get-state.html
[add] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/get-state-worker.js
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.cpp
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/public/platform/modules/serviceworker/WebNavigationPreloadState.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/b49387a112b13eb4ed99810b4c2c094299d4a4fd/tools/metrics/histograms/histograms.xml

Project Member

Comment 24 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4aa66f50558f4c5761f5cec0f0c47ee90079ae12

commit 4aa66f50558f4c5761f5cec0f0c47ee90079ae12
Author: falken <falken@chromium.org>
Date: Wed Oct 26 08:53:27 2016

service worker: Propagate navigation preload flag to SWVersion.

The source of truth of navigation preload state is
SWRegistration. But we must look up the state quickly
given a SWVersion, and there is not necessarily a live
registration when there is a live version. So this patch
sets and maintains the flag on the active version of
the registration.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2455493002
Cr-Commit-Position: refs/heads/master@{#427641}

[modify] https://crrev.com/4aa66f50558f4c5761f5cec0f0c47ee90079ae12/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/4aa66f50558f4c5761f5cec0f0c47ee90079ae12/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/4aa66f50558f4c5761f5cec0f0c47ee90079ae12/content/browser/service_worker/service_worker_version.h

Project Member

Comment 25 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84814befc09874e372a5aec52c1553c9dd519797

commit 84814befc09874e372a5aec52c1553c9dd519797
Author: Tsuyoshi Horo <horo@chromium.org>
Date: Wed Oct 26 16:13:50 2016

Add browser tests for NavigationPreload.

This CL depends on https://codereview.chromium.org/2416843002/

FetchEvent.navigationPreload will be implemented in the following steps.
[1/4] Introduce FetchEventPreloadHandle to pass the preload response to FetchEvent.
      https://codereview.chromium.org/2417793002/
[2/4] Implement ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload().
      https://codereview.chromium.org/2410333006/
[3/4] Implement FetchEvent.navigationPreload.
      https://codereview.chromium.org/2416843002/
[4/4] Add browser tests for NavigationPreload.
      https://codereview.chromium.org/2413643005/ This CL.

Currently NavigationPreloadManager.enable() API is not implemented yet.
So in those tests, we sets this flag by directly calling ServiceWorkerVersion.
set_navigation_preload_enabled()

BUG= 649558 
R=falken@chromium.org

Review URL: https://codereview.chromium.org/2413643005 .

Cr-Commit-Position: refs/heads/master@{#427705}

[modify] https://crrev.com/84814befc09874e372a5aec52c1553c9dd519797/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/84814befc09874e372a5aec52c1553c9dd519797/testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter

Project Member

Comment 26 by bugdroid1@chromium.org, Oct 26 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1514cecaef424f0eea432275857b6e2031642da0

commit 1514cecaef424f0eea432275857b6e2031642da0
Author: horo <horo@chromium.org>
Date: Wed Oct 26 18:13:24 2016

Add ServiceWorkerNavigationPreloadTest for resolving navigationPreload with null.

At the discussion in https://crrev.com/2416843002/#msg62, I decided not to use
the nullable promise type. So when navigation preload is not enabled,
FetchEvent.navigationPreload must return a promise which will be resolved with
null.

This CL adds a test for this behavior.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2446083002
Cr-Commit-Position: refs/heads/master@{#427745}

[modify] https://crrev.com/1514cecaef424f0eea432275857b6e2031642da0/content/browser/service_worker/service_worker_browsertest.cc

Cc: jungkee....@samsung.com
FYI, one failure in ServiceWorkerBrowserTest/ServiceWorkerNavigationPreloadTest.NetworkError observed on the Win7 Tests (dbg) bot

https://uberchromegw.corp.google.com/i/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/54182

Comment 29 by horo@chromium.org, Oct 31 2016

Ah, WeakPtr is not thread safe.
So we should not pass the MojoURLLoaderFactoryGetter to the IO thread.
http://www.chromium.org/developers/design-documents/threading#base_WeakPtr_and_Cancellation
I'll create a cl to fix this problem.
Description: Show this description
Project Member

Comment 32 by bugdroid1@chromium.org, Nov 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5ad8ffbfd99372e02bde808b264313cf69fa7e4b

commit 5ad8ffbfd99372e02bde808b264313cf69fa7e4b
Author: horo <horo@chromium.org>
Date: Wed Nov 02 01:05:38 2016

Stop using MojoURLLoaderFactoryGetter.

https://crrev.com/2410333006/ introduced MojoURLLoaderFactoryGetter which is
passed from RenderProcessHostImpl to ServiceWorkerFetchDispatcher.
The MojoURLLoaderFactoryGette is created on the UI thread and holds a WeakPtr
of the RenderProcessHostImpl. And it is passed to IO thread.

But WeakPtr is not thread safe.
http://www.chromium.org/developers/design-documents/threading#base_WeakPtr_and_Cancellation

So this CL stops using MojoURLLoaderFactoryGette and changes
ServiceWorkerFetchDispatcher::MaybeStartNavigationPreload() to get the
ResourceMessageFilter from ResourceeRequestInfoImpl.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2465813003
Cr-Commit-Position: refs/heads/master@{#429169}

[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/renderer_host/render_process_host_impl.h
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/foreign_fetch_request_handler.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_controllee_request_handler.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_controllee_request_handler.h
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_fetch_dispatcher.h
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_handle_unittest.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_provider_host.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_url_request_job.h
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/5ad8ffbfd99372e02bde808b264313cf69fa7e4b/content/common/service_worker/service_worker_types.h

Blocking: 661090
Project Member

Comment 34 by bugdroid1@chromium.org, Nov 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1d15ea07fc2554facd01404b28b35c137a7b24b8

commit 1d15ea07fc2554facd01404b28b35c137a7b24b8
Author: falken <falken@chromium.org>
Date: Wed Nov 02 22:58:16 2016

service worker: Implement NavigationPreloadManager.setHeaderValue

BUG= 649558 

Review-Url: https://codereview.chromium.org/2451373003
Cr-Commit-Position: refs/heads/master@{#429439}

[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/bad_message.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/child/service_worker/service_worker_dispatcher.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/child/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/child/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/common/service_worker/service_worker_types.cc
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/content/common/service_worker/service_worker_types.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/get-state.html
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/get-state-worker.js
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.cpp
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadCallbacks.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.cpp
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/1d15ea07fc2554facd01404b28b35c137a7b24b8/tools/metrics/histograms/histograms.xml

Project Member

Comment 36 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/37a57072dc4dfee461cf988d67726f6c1711d282

commit 37a57072dc4dfee461cf988d67726f6c1711d282
Author: horo <horo@chromium.org>
Date: Fri Nov 04 10:13:50 2016

Add RedirectAndRespondWithNavigationPreload browser test.

This CL is splitted from https://codereview.chromium.org/2460223003/

BUG= 649558 

Review-Url: https://codereview.chromium.org/2478103002
Cr-Commit-Position: refs/heads/master@{#429844}

[modify] https://crrev.com/37a57072dc4dfee461cf988d67726f6c1711d282/content/browser/service_worker/service_worker_browsertest.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Nov 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/caeeed9a533b2695fd3b0be36e79862a10101812

commit caeeed9a533b2695fd3b0be36e79862a10101812
Author: horo <horo@chromium.org>
Date: Fri Nov 04 11:40:29 2016

Race OnStartLoadingResponseBody and OnReceiveResponse of NavigationPreloadRequest.

When the content type of the page is not correctly set,
OnStartLoadingResponseBody() of mojom::URLLoaderClient is called befor
OnReceiveResponse(). This behavior is caused by MimeSniffingResourceHandler.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2472343002
Cr-Commit-Position: refs/heads/master@{#429860}

[modify] https://crrev.com/caeeed9a533b2695fd3b0be36e79862a10101812/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/caeeed9a533b2695fd3b0be36e79862a10101812/content/renderer/service_worker/service_worker_context_client.cc

Project Member

Comment 39 by bugdroid1@chromium.org, Nov 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/43f1473aef1be26452946a69fb1446bea4cf28a6

commit 43f1473aef1be26452946a69fb1446bea4cf28a6
Author: horo <horo@chromium.org>
Date: Wed Nov 09 08:13:21 2016

Fix a possible flaky ServiceWorkerNavigationPreloadTest.

The navigation preload request of NetworkFallback test case may be canceled
before reaching the server.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2482263004
Cr-Commit-Position: refs/heads/master@{#430889}

[modify] https://crrev.com/43f1473aef1be26452946a69fb1446bea4cf28a6/content/browser/service_worker/service_worker_browsertest.cc

Comment 40 by horo@chromium.org, Nov 14 2016

I wrote a brief document about the implementation of navigation preload.

https://docs.google.com/document/d/1wGiHuIALCC-56aGC3TKmjK44qqolT85ckwQT2tUnfsk/edit?usp=sharing
Project Member

Comment 41 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/92636463938f6dafce67b97a884d2cb11f27a2cb

commit 92636463938f6dafce67b97a884d2cb11f27a2cb
Author: falken <falken@chromium.org>
Date: Fri Nov 25 00:05:19 2016

service worker: Persist NavigationPreloadState

This writes NPS to storage. NPS is included as a field in
ServiceWorkerRegistration. I was previously considering how to handle writing
to storage before an active worker exists (and hence before a SWRegistration
exists in storage), but the spec discussion is converging on requiring an
active worker so this should be sufficient.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2521793004
Cr-Commit-Position: refs/heads/master@{#434411}

[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_database.proto
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_info.h
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_storage.h
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/get-state.html
[add] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js
[add] https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/wait-for-activate-worker.js

Project Member

Comment 42 by bugdroid1@chromium.org, Nov 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/227286f7cd60cb0ed8756cd1efefb2d694c9734f

commit 227286f7cd60cb0ed8756cd1efefb2d694c9734f
Author: horo <horo@chromium.org>
Date: Tue Nov 29 11:10:33 2016

Introduce ResourceRequesterInfo to abstract the requester of resource requests.

Currently there are three types of resource request.
- Normal resource request from renderer process.
- Resource request for browser side navigation. (PlzNavigate).
- Download request or Page Save request.

In ResourceRequestInfoImpl, these type are distinguished by process_type and
the existence of ResourceMessageFilter. But it is a bit confusing.
For example:
- AsyncRevalidationManager is checking only the existence of the filter to
  check that "the renderer is gone" or "the request is for PlzNavigate".
- service_worker_context field is added for PlzNavigate support. And the field
  is used only when the filter is not available in HandleServiceWorkerLink().

This CL introduces ResourceRequesterInfo to make it easy to distinguish those
requester types.

BUG=468227, 649558 
TBR=michaeln@chromium.org

Review-Url: https://codereview.chromium.org/2481093003
Cr-Commit-Position: refs/heads/master@{#434957}

[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/BUILD.gn
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/appcache/appcache_interceptor.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/appcache/appcache_interceptor.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/DEPS
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/async_resource_handler.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/async_resource_handler_unittest.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/async_revalidation_manager.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/async_revalidation_manager.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/async_revalidation_manager_unittest.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_dispatcher_host_impl.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_dispatcher_host_unittest.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_handler.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_loader.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_message_filter.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_message_filter.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_request_info_impl.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_request_info_impl.h
[add] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_requester_info.cc
[add] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/resource_requester_info.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/sync_resource_handler.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/url_loader_factory_impl.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/url_loader_factory_impl.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/loader/url_loader_factory_impl_unittest.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/service_worker/link_header_support.cc
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/service_worker/link_header_support.h
[modify] https://crrev.com/227286f7cd60cb0ed8756cd1efefb2d694c9734f/content/browser/service_worker/service_worker_fetch_dispatcher.cc

Project Member

Comment 43 by bugdroid1@chromium.org, Dec 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7aac46c0e9451b8214b21205638697f704cc0180

commit 7aac46c0e9451b8214b21205638697f704cc0180
Author: horo <horo@chromium.org>
Date: Wed Dec 07 05:55:08 2016

Introduce a new ResourceRequesterInfo type for NavigationPreload.

Currently we use the ResourceRequesterInfo of the original navigation request in
ServiceWorkerFetchDispatcher to send service worker navigation preload
requests. But when BrowserSideNavigation (PlzNavigate) is enabled, the
ResourceRequesterInfo of the original navigation request is not renderer type,
but browser side navigation type. And we can't send the navigation preload
request.

To solve this problem, this CL introduces a new ResourceRequesterInfo type for
service worker navigation preload requests.
ResourceRequesterInfo::CreateForNavigationPreload() creates the new type info
from the original navigation request info.

This CL depends on https://codereview.chromium.org/2481093003/ which introduced
ResourceRequesterInfo.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2497223002
Cr-Commit-Position: refs/heads/master@{#436876}

[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/loader/DEPS
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/loader/resource_requester_info.cc
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/loader/resource_requester_info.h
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/loader/url_loader_factory_impl.cc
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/7aac46c0e9451b8214b21205638697f704cc0180/testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter

Comment 44 by pasko@chromium.org, Dec 30 2016

Cc: pasko@chromium.org
Project Member

Comment 46 by bugdroid1@chromium.org, Jan 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3

commit b9937a428eaf8d98b0ad9e05707ab2d0559a62b3
Author: horo <horo@chromium.org>
Date: Wed Jan 11 05:33:38 2017

Use WebURLResponse to pass the navigation preload response from SWContextClient to FetchEvent.

Currently we use WebServiceWorkerResponse to pass the navigation preload
response from ServiceWorkerContextClient::NavigationPreloadRequest to FetchEvent.

But to show the network timing information in DevTool's network tab, we need
the timing information in ResourceResponseInfo in blnik side. So this cl change
the code to use WebURLResponse which contains the timing information.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2618313003
Cr-Commit-Position: refs/heads/master@{#442813}

[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.h
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/b9937a428eaf8d98b0ad9e05707ab2d0559a62b3/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 48 by bugdroid1@chromium.org, Jan 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/519589379f0aa766e7fe2357515b0f506f001d12

commit 519589379f0aa766e7fe2357515b0f506f001d12
Author: horo <horo@chromium.org>
Date: Sat Jan 14 00:34:29 2017

Introduce Origin-Trial for Service Worker Navigation Preload.

There are three possible states:
  - A: Navigation Preload related methods and attributes are available in JS
       and work correctly.
  - B: Navigation Preload related methods and attributes are available in
       JS. But NavigationPreloadManager's enable, disable and setHeaderValue
       methods always return a rejected promise. And FetchEvent's
       preloadResponse attribute returns a promise which always resolve with
       undefined.
  - C: Navigation Preload related methods and attributes are not available
       in JS.
The state B is very weird state. But we can't avoid this, because the generated
code OriginTrials.cpp always return true when the Origin Trial is enabled.
https://cs.chromium.org/chromium/src/out/Debug/gen/blink/core/origin_trials/OriginTrials.cpp
And according to the discussion, this is the expected behavior.
https://groups.google.com/a/chromium.org/forum/#!topic/experimentation-dev/k6ZdmFp84QE

  * Origin Trial: Have an effective header.
                                 Command line
                             Default  Enable  Disabled
                   Default      B       A        B
      Field trial  Enabled      A       A        B
                   Disabled     B       A        B

  * Origin Trial: No header.
                                 Command line
                             Default  Enable  Disabled
                   Default      C       A        C
      Field trial  Enabled      C       A        C
                   Disabled     C       A        C

There is no way to test the field trial Enabled/Disabled cases in LayoutTest.
So the LayoutTests in this CL test the following combinations.
  (Field trial=Default) * (Command line=Default/Enable/Disabled) * (OriginTrial=On/Off)

BUG= 649558 

Review-Url: https://codereview.chromium.org/2627023002
Cr-Commit-Position: refs/heads/master@{#443742}

[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/content/browser/service_worker/service_worker_version.cc
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/content/child/runtime_features.cc
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces.html
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods.html
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/get-interface-names.js
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/navigation-preload-origin-trial-interfaces-worker.php
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/navigation-preload-origin-trial-methods-scope.php
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/navigation-preload-origin-trial-methods-worker.php
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/chromium/README.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[add] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/Source/bindings/modules/v8/ConditionalFeaturesForModules.cpp
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.idl
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/Source/modules/serviceworkers/NavigationPreloadManager.idl
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl
[modify] https://crrev.com/519589379f0aa766e7fe2357515b0f506f001d12/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in

Project Member

Comment 49 by bugdroid1@chromium.org, Jan 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ad964459156c4bd27fa68a0bec4155409ec492d

commit 9ad964459156c4bd27fa68a0bec4155409ec492d
Author: horo <horo@chromium.org>
Date: Mon Jan 16 06:54:48 2017

Enable ServiceWorkerNavigationPreload by default for Origin-Trial.

The CL https://codereview.chromium.org/2627023002/ introduced the mechanism for
Origin-Trial experiment of Service Worker Navigation Preload. But base::Feature
of the feature was disabled by default. So when we start the Origin-Trial
experiment, we had to enable the feature by the field trial mechanism. But it
is possible that the feature is not correctly enabled by the field trial
mechanism (Ex: in the first boot of Chrome). In order to avoid the confusion,
this CL enables the base::Feature of the feature by default.

If something goes wrong and we will want to stop the origin-trial, we can stop
the experiment by disabling this feature using the field trial mechanism.

  * Origin Trial: Have an effective token.
                               Command line
                           Default  Enable  Disabled
                 Default     *A*      A        B
    Field trial  Enabled      A       A        B
                 Disabled     B       A        B

  * Origin Trial: No token.
                               Command line
                           Default  Enable  Disabled
                 Default      C       A        C
    Field trial  Enabled      C       A        C
                 Disabled     C       A        C

  - A: Navigation Preload related methods and attributes are available in JS
      and work correctly.
  - B: Navigation Preload related methods and attributes are available in
      JS. But NavigationPreloadManager's enable, disable and setHeaderValue
      methods always return a rejected promise. And FetchEvent's
      preloadResponse attribute returns a promise which always resolve with
      undefined.
  - C: Navigation Preload related methods and attributes are not available
      in JS.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2637763002
Cr-Commit-Position: refs/heads/master@{#443851}

[modify] https://crrev.com/9ad964459156c4bd27fa68a0bec4155409ec492d/content/browser/service_worker/service_worker_version.h
[modify] https://crrev.com/9ad964459156c4bd27fa68a0bec4155409ec492d/content/child/runtime_features.cc
[modify] https://crrev.com/9ad964459156c4bd27fa68a0bec4155409ec492d/content/public/common/content_features.cc
[modify] https://crrev.com/9ad964459156c4bd27fa68a0bec4155409ec492d/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt

Project Member

Comment 50 by bugdroid1@chromium.org, Jan 17 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5e608bb301fdf93e000771648059026832f1d3d1

commit 5e608bb301fdf93e000771648059026832f1d3d1
Author: horo <horo@chromium.org>
Date: Tue Jan 17 16:16:57 2017

Add leaking service-worker-navigation-preload-disabled tests to LeakExpectations.

TBR=pkalinnikov@chromium.org

BUG= 649558 

Review-Url: https://codereview.chromium.org/2630403004
Cr-Commit-Position: refs/heads/master@{#444065}

[modify] https://crrev.com/5e608bb301fdf93e000771648059026832f1d3d1/third_party/WebKit/LayoutTests/LeakExpectations

Project Member

Comment 51 by bugdroid1@chromium.org, Jan 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b8ea98da1ed38f6508a0b0c9928bc747e20c1731

commit b8ea98da1ed38f6508a0b0c9928bc747e20c1731
Author: horo <horo@chromium.org>
Date: Thu Jan 19 04:44:18 2017

Handle correctly "ShouldWait" result of mojo::Wait() in WebDataConsumerHandleImpl.

This patch https://codereview.chromium.org/2363963002 changed
WebDataConsumerHandleImpl::ReaderImpl::read() to use mojo::Wait() when |size| is
zero.
But the patch didn't correctly handle MOJO_RESULT_DEADLINE_EXCEEDED result.
This method reutrns "UnexpectedError" but it should return "ShouldWait".

BUG= 649558 

Review-Url: https://codereview.chromium.org/2639873002
Cr-Commit-Position: refs/heads/master@{#444644}

[modify] https://crrev.com/b8ea98da1ed38f6508a0b0c9928bc747e20c1731/content/child/web_data_consumer_handle_impl.cc
[modify] https://crrev.com/b8ea98da1ed38f6508a0b0c9928bc747e20c1731/content/child/web_data_consumer_handle_impl_unittest.cc

Project Member

Comment 52 by bugdroid1@chromium.org, Jan 19 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d38a91f37e0a80f708320ca7fb47aabc0288b16

commit 6d38a91f37e0a80f708320ca7fb47aabc0288b16
Author: horo <horo@chromium.org>
Date: Thu Jan 19 09:41:33 2017

Increase the lifetime of Navigation Preload related objects.

In the current implementation, the navigation preload requests are canceled
when the FetchEvent finished. But in this behavior,
"event.respondWith(event.preloadResponse);" doesn't work well if the response is
bigger than the buffer size or the response stream was flushed.

To fix this, this cl changes the lifetime of the
the ServiceWorkerContextClient::NavigationPreloadRequest in the Service Worker
thread and the mojom::URLLoader related objects in the browser process.

ServiceWorkerContextClient::NavigationPreloadRequest will be deleted when
it's OnReceiveRedirect() or OnComplete() are called.
The mojom::URLLoader related objects in the browser process will be deleted when
both the ServiceWorkerURLRequestJob and the FetchEvent finished.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2645493002
Cr-Commit-Position: refs/heads/master@{#444690}

[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/browser/service_worker/service_worker_fetch_dispatcher.h
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/content/renderer/service_worker/service_worker_context_client.h
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/broken-chunked-encoding.html
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chunked-encoding.html
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/broken-chunked-encoding-scope.php
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/broken-chunked-encoding-worker.js
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-scope.php
[add] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/chunked-encoding-worker.js
[modify] https://crrev.com/6d38a91f37e0a80f708320ca7fb47aabc0288b16/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp

Project Member

Comment 53 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622

commit 4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622
Author: horo <horo@chromium.org>
Date: Tue Jan 24 03:37:15 2017

Show service worker navigation preload requests in DevTools Network tab.

Demo: https://youtu.be/I-Qe_Y-xYxE

Navigation Preload requests are initiated from the browser process.
This is different from the normal network requests which are initiated from the
renderer process.

When the DevTools show the normal requests in the Network tab, DevTool's
Network events (requestWillBeSent, responseReceived, loadingFinished etc) are
dispatched via InspectorInstrumentation and InspectorNetworkAgent.

This CL introduces new DevTool's Network events (navigationPreloadSent,
navigationPreloadResponseReceived, navigationPreloadFailed,
navigationPreloadFinished) which are dispatched via InspectorInstrumentation and
InspectorNetworkAgent from ServiceWorkerContextClient.

In the normal requests case, we record the request sending timestamp when the
renderer process will send the request in InspectorNetworkAgent::
willSendRequestInternal(). But in the navigation preload case, we record the
timestamp in the browser process, and send it to the service worker's renderer
process using FetchEventPreloadHandle.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2620463002
Cr-Commit-Position: refs/heads/master@{#445630}

[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
[add] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php
[add] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php
[add] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt
[add] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/WorkerInspectorController.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/loader/PingLoader.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 55 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0d113c2a563169ac97086771a3ea3a24bebd73d

commit f0d113c2a563169ac97086771a3ea3a24bebd73d
Author: horo <horo@chromium.org>
Date: Tue Jan 24 08:48:25 2017

Revert of Show service worker navigation preload requests in DevTools Network tab (patchset #9 id:460001 of https://codereview.chromium.org/2620463002/ )

Reason for revert:
Caused layout test failures.

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=http%2Ftests%2Finspector%2Fservice-workers%2Flazy-addeventlisteners.html

Original issue's description:
> Show service worker navigation preload requests in DevTools Network tab.
>
> Demo: https://youtu.be/I-Qe_Y-xYxE
>
> Navigation Preload requests are initiated from the browser process.
> This is different from the normal network requests which are initiated from the
> renderer process.
>
> When the DevTools show the normal requests in the Network tab, DevTool's
> Network events (requestWillBeSent, responseReceived, loadingFinished etc) are
> dispatched via InspectorInstrumentation and InspectorNetworkAgent.
>
> This CL introduces new DevTool's Network events (navigationPreloadSent,
> navigationPreloadResponseReceived, navigationPreloadFailed,
> navigationPreloadFinished) which are dispatched via InspectorInstrumentation and
> InspectorNetworkAgent from ServiceWorkerContextClient.
>
> In the normal requests case, we record the request sending timestamp when the
> renderer process will send the request in InspectorNetworkAgent::
> willSendRequestInternal(). But in the navigation preload case, we record the
> timestamp in the browser process, and send it to the service worker's renderer
> process using FetchEventPreloadHandle.
>
>
> BUG= 649558 
>
> Review-Url: https://codereview.chromium.org/2620463002
> Cr-Commit-Position: refs/heads/master@{#445630}
> Committed: https://chromium.googlesource.com/chromium/src/+/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622

TBR=falken@chromium.org,pfeldman@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 649558 

Review-Url: https://codereview.chromium.org/2649923007
Cr-Commit-Position: refs/heads/master@{#445684}

[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
[delete] https://crrev.com/4b273e243bf047778e36cbc948f72ae13f7934cc/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php
[delete] https://crrev.com/4b273e243bf047778e36cbc948f72ae13f7934cc/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php
[delete] https://crrev.com/4b273e243bf047778e36cbc948f72ae13f7934cc/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt
[delete] https://crrev.com/4b273e243bf047778e36cbc948f72ae13f7934cc/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/WorkerInspectorController.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/loader/PingLoader.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/f0d113c2a563169ac97086771a3ea3a24bebd73d/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 56 by bugdroid1@chromium.org, Jan 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/23276c71698583a0142e8213bada22e3ae8d0a0e

commit 23276c71698583a0142e8213bada22e3ae8d0a0e
Author: horo <horo@chromium.org>
Date: Tue Jan 24 11:24:20 2017

Show service worker navigation preload requests in DevTools Network tab.

Demo: https://youtu.be/I-Qe_Y-xYxE

Navigation Preload requests are initiated from the browser process.
This is different from the normal network requests which are initiated from the
renderer process.

When the DevTools show the normal requests in the Network tab, DevTool's
Network events (requestWillBeSent, responseReceived, loadingFinished etc) are
dispatched via InspectorInstrumentation and InspectorNetworkAgent.

This CL introduces new DevTool's Network events (navigationPreloadSent,
navigationPreloadResponseReceived, navigationPreloadFailed,
navigationPreloadFinished) which are dispatched via InspectorInstrumentation and
InspectorNetworkAgent from ServiceWorkerContextClient.

In the normal requests case, we record the request sending timestamp when the
renderer process will send the request in InspectorNetworkAgent::
willSendRequestInternal(). But in the navigation preload case, we record the
timestamp in the browser process, and send it to the service worker's renderer
process using FetchEventPreloadHandle.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2620463002
Cr-Original-Commit-Position: refs/heads/master@{#445630}
Committed: https://chromium.googlesource.com/chromium/src/+/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622
Review-Url: https://codereview.chromium.org/2620463002
Cr-Commit-Position: refs/heads/master@{#445699}

[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
[add] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php
[add] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php
[add] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt
[add] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/WorkerInspectorController.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/loader/PingLoader.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/23276c71698583a0142e8213bada22e3ae8d0a0e/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Comment 57 by horo@chromium.org, Jan 25 2017

Status: Fixed (was: Started)
The bug fix patch (6d38a91f37e0a80f708320ca7fb47aabc0288b16) landed in 57.0.2987.0.
So the Navigation Preload feature works in M57.

But the DevTools support patch (23276c71698583a0142e8213bada22e3ae8d0a0e) landed in 58.0.2992.0.
So web developers should use M58.
Labels: -M-56 M-58

Comment 59 by horo@chromium.org, Jan 26 2017

Blockedon: 685493
Project Member

Comment 60 by bugdroid1@chromium.org, Jan 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/16de2c25e724f07d46b68f5758e49fae6f136073

commit 16de2c25e724f07d46b68f5758e49fae6f136073
Author: horo <horo@chromium.org>
Date: Thu Jan 26 07:49:51 2017

Revert of Show service worker navigation preload requests in DevTools Network tab (patchset #10 id:480001 of https://codereview.chromium.org/2620463002/ )

Reason for revert:
Introduced DCHECK crash.

BUG= 685493 

Original issue's description:
> Show service worker navigation preload requests in DevTools Network tab.
>
> Demo: https://youtu.be/I-Qe_Y-xYxE
>
> Navigation Preload requests are initiated from the browser process.
> This is different from the normal network requests which are initiated from the
> renderer process.
>
> When the DevTools show the normal requests in the Network tab, DevTool's
> Network events (requestWillBeSent, responseReceived, loadingFinished etc) are
> dispatched via InspectorInstrumentation and InspectorNetworkAgent.
>
> This CL introduces new DevTool's Network events (navigationPreloadSent,
> navigationPreloadResponseReceived, navigationPreloadFailed,
> navigationPreloadFinished) which are dispatched via InspectorInstrumentation and
> InspectorNetworkAgent from ServiceWorkerContextClient.
>
> In the normal requests case, we record the request sending timestamp when the
> renderer process will send the request in InspectorNetworkAgent::
> willSendRequestInternal(). But in the navigation preload case, we record the
> timestamp in the browser process, and send it to the service worker's renderer
> process using FetchEventPreloadHandle.
>
>
> BUG= 649558 
>
> Review-Url: https://codereview.chromium.org/2620463002
> Cr-Original-Commit-Position: refs/heads/master@{#445630}
> Committed: https://chromium.googlesource.com/chromium/src/+/4c6b3b0f11b62e069d9d84ba99dbe94a45a5c622
> Review-Url: https://codereview.chromium.org/2620463002
> Cr-Commit-Position: refs/heads/master@{#445699}
> Committed: https://chromium.googlesource.com/chromium/src/+/23276c71698583a0142e8213bada22e3ae8d0a0e

TBR=falken@chromium.org,pfeldman@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 649558 

Review-Url: https://codereview.chromium.org/2654433012
Cr-Commit-Position: refs/heads/master@{#446270}

[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/content/renderer/service_worker/service_worker_context_client.cc
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/LayoutTests/http/tests/inspector/inspector-test.js
[delete] https://crrev.com/1ae83a08f3b0b6831e5dbdaae12635010367b246/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php
[delete] https://crrev.com/1ae83a08f3b0b6831e5dbdaae12635010367b246/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php
[delete] https://crrev.com/1ae83a08f3b0b6831e5dbdaae12635010367b246/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt
[delete] https://crrev.com/1ae83a08f3b0b6831e5dbdaae12635010367b246/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/InspectorInstrumentation.idl
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/WorkerInspectorController.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/WorkerInspectorController.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/loader/PingLoader.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/InProcessWorkerMessagingProxy.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/WorkerThread.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/WorkerThreadStartupData.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/core/workers/WorkerThreadTestHelper.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/devtools/front_end/sdk/SubTargetsManager.js
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
[modify] https://crrev.com/16de2c25e724f07d46b68f5758e49fae6f136073/third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h

Project Member

Comment 61 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f9e15e126016658be28422100f9c4d1d4da6804

commit 6f9e15e126016658be28422100f9c4d1d4da6804
Author: horo <horo@chromium.org>
Date: Fri Jan 27 03:07:40 2017

Show service worker navigation preload requests in DevTools Network tab.

Demo: https://youtu.be/I-Qe_Y-xYxE

Previously I tried to implement this feature by adding InspectorNetworkAgent in
the WorkerInspectorController of Service Worker.
https://codereview.chromium.org/2620463002/
But InspectorNetworkAgent is not designed to be used at worker threads. It
has introduced several DCHECK crashes. So I reverted it.

This CL sends the notifications to the DevTools from the browser process. This
design was proposed by pfeldman@.
https://codereview.chromium.org/2620463002/#msg115

BUG= 649558 

Review-Url: https://codereview.chromium.org/2654993006
Cr-Commit-Position: refs/heads/master@{#446560}

[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/BUILD.gn
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/BUILD.gn
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/protocol/network_handler.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/protocol/network_handler.h
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/protocol_config.json
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/service_worker_devtools_agent_host.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/service_worker_devtools_agent_host.h
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/service_worker_devtools_manager.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/devtools/service_worker_devtools_manager.h
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/service_worker/service_worker_fetch_dispatcher.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/browser/service_worker/service_worker_internals_ui.cc
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/content/renderer/service_worker/service_worker_context_client.cc
[add] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php
[add] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php
[add] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt
[add] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/Source/core/inspector/browser_protocol.json
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js
[modify] https://crrev.com/6f9e15e126016658be28422100f9c4d1d4da6804/third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js

Project Member

Comment 62 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be58f69be3a0d8f714293bd03e6a57f1f88ca720

commit be58f69be3a0d8f714293bd03e6a57f1f88ca720
Author: horo <horo@chromium.org>
Date: Fri Jan 27 05:10:49 2017

Check the existence of each properties of ResourceDevToolsInfo for NavigationPreload

According to buildObjectForResourceRequest() in InspectorNetworkAgent.cpp, those properties could be empty, even if devtools_info exists.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2661583002
Cr-Commit-Position: refs/heads/master@{#446600}

[modify] https://crrev.com/be58f69be3a0d8f714293bd03e6a57f1f88ca720/content/browser/devtools/protocol/network_handler.cc

Project Member

Comment 63 by bugdroid1@chromium.org, Jan 27 2017

Project Member

Comment 64 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d688b918acfbbf4572db430fefeea3374286baf1

commit d688b918acfbbf4572db430fefeea3374286baf1
Author: falken <falken@chromium.org>
Date: Tue Feb 07 02:58:35 2017

Add UseCounter for ServiceWorkerNavigationPreload.

We have a UMA already (ServiceWorker.NavigationPreload.HeaderSize) which gives
the total count, but it's hard to compute the % of page views without a
UseCounter.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2659043002
Cr-Commit-Position: refs/heads/master@{#448529}

[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/browser/service_worker/service_worker_response_info.cc
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/browser/service_worker/service_worker_response_info.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/browser/service_worker/service_worker_url_request_job.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/child/web_url_loader_impl.cc
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/common/resource_messages.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/public/common/resource_response.cc
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/public/common/resource_response_info.cc
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/content/public/common/resource_response_info.h
[add] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/worker.js
[add] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/use-counter.html
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/Source/platform/network/ResourceResponse.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/third_party/WebKit/public/platform/WebURLResponse.h
[modify] https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1/tools/metrics/histograms/histograms.xml

Labels: Merge-Request-57
Requesting merge for comment 64 https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1

This just adds a UseCounter to measure usage of the feature. It's cycled through canary with no issues.
Project Member

Comment 66 by sheriffbot@chromium.org, Feb 10 2017

Labels: -Merge-Request-57 Hotlist-Merge-Review Merge-Review-57
This bug requires manual review: Reverts referenced in bugdroid comments after merge request.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), ketakid@(cros), govind@(desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Thank you falken@ for comment #65.
This is reported as "Type=Feature" not a bug. M57 feature freeze was on Jan 6th,2017. Can this wait until M58?
I prefer to merge into M57. This feature is already live in M57 as an origin trial. But we need a UseCounter to track usage for the origin trial. We thought UMA would be sufficient (comment 47) but we since discovered we can't track the % of page views that use this feature without a UseCounter.
Labels: -Merge-Review-57 Merge-Approved-57
Approving merge for comment 64 https://crrev.com/d688b918acfbbf4572db430fefeea3374286baf1 to M57 branch 2987 based on comment #65 and #68. Please merge ASAP. Thank you.
Project Member

Comment 70 by bugdroid1@chromium.org, Feb 10 2017

Labels: -merge-approved-57 merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9

commit c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9
Author: Matt Falkenhagen <falken@chromium.org>
Date: Fri Feb 10 05:31:57 2017

M57: Add UseCounter for ServiceWorkerNavigationPreload.

We have a UMA already (ServiceWorker.NavigationPreload.HeaderSize) which gives
the total count, but it's hard to compute the % of page views without a
UseCounter.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2659043002
Cr-Commit-Position: refs/heads/master@{#448529}
(cherry picked from commit d688b918acfbbf4572db430fefeea3374286baf1)

Review-Url: https://codereview.chromium.org/2684933011 .
Cr-Commit-Position: refs/branch-heads/2987@{#429}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/browser/service_worker/service_worker_response_info.cc
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/browser/service_worker/service_worker_response_info.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/browser/service_worker/service_worker_url_request_job.cc
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/browser/service_worker/service_worker_url_request_job.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/child/web_url_loader_impl.cc
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/common/resource_messages.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/public/common/resource_response.cc
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/public/common/resource_response_info.cc
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/content/public/common/resource_response_info.h
[add] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/resources/worker.js
[add] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/chromium/use-counter.html
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/Source/core/frame/UseCounter.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/Source/core/loader/DocumentLoader.cpp
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/Source/platform/network/ResourceResponse.cpp
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/Source/platform/network/ResourceResponse.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/third_party/WebKit/public/platform/WebURLResponse.h
[modify] https://crrev.com/c3c0fd9fbf6ae5659395b941b80dc142e5ff83b9/tools/metrics/histograms/histograms.xml

Project Member

Comment 71 by bugdroid1@chromium.org, Feb 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a994e58847b6e37d0e1a3067509653ec314d137a

commit a994e58847b6e37d0e1a3067509653ec314d137a
Author: falken <falken@chromium.org>
Date: Wed Feb 22 06:18:34 2017

service worker: Add console.warn output to enable -expected.txt files

These tests dump output via console.log in order to have different
-expected.txt files for different virtual tests, but the presubmit wants
to remove -expected.txt files with no assertions. According to the
thread "[blink-dev] PSA/Proposal: Changing the definition of "passing"
for layout tests that use testharness.js"[1] we can add console.warn to get
around this. Long-term we should migrate the tests to use assertions or
not use testharness.js.

[1] https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/3Ob2lq14KEs

BUG= 649558 

Review-Url: https://codereview.chromium.org/2713523004
Cr-Commit-Position: refs/heads/master@{#451897}

[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces.html
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods.html
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/chromium/navigation-preload-origin-trial-interfaces-expected.txt
[modify] https://crrev.com/a994e58847b6e37d0e1a3067509653ec314d137a/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/chromium/navigation-preload-origin-trial-methods-expected.txt

Project Member

Comment 72 by bugdroid1@chromium.org, Feb 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d44c8d6fe9966f4ab98e41592fe66ee4fe6f94d

commit 2d44c8d6fe9966f4ab98e41592fe66ee4fe6f94d
Author: falken <falken@chromium.org>
Date: Thu Feb 23 15:31:32 2017

service worker: Remove extraneous FetchEventPreloadHandle::New() call

I'm guessing this is redundant the New() call further down the function.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2712713004
Cr-Commit-Position: refs/heads/master@{#452492}

[modify] https://crrev.com/2d44c8d6fe9966f4ab98e41592fe66ee4fe6f94d/content/browser/service_worker/service_worker_fetch_dispatcher.cc

Project Member

Comment 74 by bugdroid1@chromium.org, Apr 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d348e46e81ea3d4996ee304ac47bc6b47495a7c4

commit d348e46e81ea3d4996ee304ac47bc6b47495a7c4
Author: falken <falken@chromium.org>
Date: Thu Apr 13 16:05:43 2017

service worker: Add a netlog event for navigation preload

This will aid debuggability and investigation. I expect we'll get a lot
of ERR_ABORT from sites that enable navigation preload but don't use it
on every navigation.

BUG= 649558 

Review-Url: https://codereview.chromium.org/2818543005
Cr-Commit-Position: refs/heads/master@{#464426}

[modify] https://crrev.com/d348e46e81ea3d4996ee304ac47bc6b47495a7c4/content/browser/loader/resource_dispatcher_host_impl.cc
[modify] https://crrev.com/d348e46e81ea3d4996ee304ac47bc6b47495a7c4/net/log/net_log_event_type_list.h

Labels: -M-58 M-59
Blockedon: 737046
Blockedon: 728013

Sign in to add a comment