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

Issue 2000063005: [WIP] Speculatively launch Service Workers on mouse/touch events. (Closed)

Created:
4 years, 7 months ago by horo
Modified:
4 years, 6 months ago
Reviewers:
CC:
chromium-reviews, blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[WIP] Speculatively launch Service Workers on mouse/touch events. Splitted into two CLs. [1/2]: https://codereview.chromium.org/2043863003/ [2/2]: https://codereview.chromium.org/2043083002/ BUG=616502

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+517 lines, -15 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.h View 4 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 5 chunks +25 lines, -4 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M components/network_hints/common/network_hints_messages.h View 3 chunks +10 lines, -0 lines 0 comments Download
M components/network_hints/renderer/prescient_networking_dispatcher.h View 2 chunks +6 lines, -0 lines 0 comments Download
M components/network_hints/renderer/prescient_networking_dispatcher.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M components/network_hints/renderer/renderer_preconnect.h View 2 chunks +8 lines, -0 lines 0 comments Download
M components/network_hints/renderer/renderer_preconnect.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M content/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.h View 3 chunks +27 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_context_wrapper.cc View 4 chunks +107 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.h View 3 chunks +13 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.cc View 5 chunks +46 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 2 chunks +8 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 10 chunks +22 lines, -9 lines 0 comments Download
M content/child/runtime_features.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/public/browser/service_worker_context.h View 2 chunks +18 lines, -0 lines 0 comments Download
M content/public/common/content_features.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_features.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.h View 3 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLAnchorElement.cpp View 4 chunks +99 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkHints.h View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkHints.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebRuntimeFeatures.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebNavigationHintType.h View 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebPrescientNetworking.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebRuntimeFeatures.h View 1 chunk +1 line, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 4 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 39 (39 generated)
horo
Description was changed from ========== [not for review]preconnect on touchstart BUG= ========== to ========== [not ...
4 years, 6 months ago (2016-05-27 05:56:34 UTC) #1
horo
Description was changed from ========== [not for review] Speculative launch of service workers on touchstart ...
4 years, 6 months ago (2016-06-01 16:57:24 UTC) #2
horo
Patchset #16 (id:300001) has been deleted
4 years, 6 months ago (2016-06-01 16:57:50 UTC) #3
horo
Patchset #15 (id:280001) has been deleted
4 years, 6 months ago (2016-06-01 16:57:54 UTC) #4
horo
Patchset #14 (id:260001) has been deleted
4 years, 6 months ago (2016-06-01 16:57:58 UTC) #5
horo
Patchset #13 (id:240001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:01 UTC) #6
horo
Patchset #12 (id:220001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:05 UTC) #7
horo
Patchset #11 (id:200001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:15 UTC) #8
horo
Patchset #10 (id:180001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:20 UTC) #9
horo
Patchset #9 (id:160001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:24 UTC) #10
horo
Patchset #8 (id:140001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:28 UTC) #11
horo
Patchset #7 (id:120001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:32 UTC) #12
horo
Patchset #6 (id:100001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:35 UTC) #13
horo
Patchset #5 (id:80001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:38 UTC) #14
horo
Patchset #4 (id:60001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:43 UTC) #15
horo
Patchset #3 (id:40001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:46 UTC) #16
horo
Patchset #2 (id:20001) has been deleted
4 years, 6 months ago (2016-06-01 16:58:49 UTC) #17
horo
Patchset #1 (id:1) has been deleted
4 years, 6 months ago (2016-06-01 16:58:55 UTC) #18
horo
Description was changed from ========== [not for review] Speculative launch of service workers on UI-event ...
4 years, 6 months ago (2016-06-02 14:52:56 UTC) #19
horo
Patchset #17 (id:640001) has been deleted
4 years, 6 months ago (2016-06-07 14:52:43 UTC) #20
horo
Patchset #16 (id:620001) has been deleted
4 years, 6 months ago (2016-06-07 14:52:46 UTC) #21
horo
Patchset #15 (id:600001) has been deleted
4 years, 6 months ago (2016-06-07 14:52:50 UTC) #22
horo
Patchset #14 (id:580001) has been deleted
4 years, 6 months ago (2016-06-07 14:52:54 UTC) #23
horo
Patchset #13 (id:560001) has been deleted
4 years, 6 months ago (2016-06-07 14:52:57 UTC) #24
horo
Patchset #12 (id:540001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:01 UTC) #25
horo
Patchset #11 (id:520001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:04 UTC) #26
horo
Patchset #10 (id:500001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:07 UTC) #27
horo
Patchset #9 (id:480001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:11 UTC) #28
horo
Patchset #8 (id:460001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:14 UTC) #29
horo
Patchset #7 (id:440001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:18 UTC) #30
horo
Patchset #6 (id:420001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:22 UTC) #31
horo
Patchset #5 (id:400001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:25 UTC) #32
horo
Patchset #4 (id:380001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:29 UTC) #33
horo
Patchset #3 (id:360001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:32 UTC) #34
horo
Patchset #2 (id:340001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:36 UTC) #35
horo
Patchset #1 (id:320001) has been deleted
4 years, 6 months ago (2016-06-07 14:53:40 UTC) #36
horo
Description was changed from ========== [not for review] Speculative launch of service workers on UI-event ...
4 years, 6 months ago (2016-06-07 16:04:30 UTC) #37
horo
Description was changed from ========== Speculatively launch Service Workers on mouse/touch events. This CL introduces ...
4 years, 6 months ago (2016-06-07 16:18:40 UTC) #38
horo
4 years, 6 months ago (2016-06-07 16:49:16 UTC) #39
Description was changed from

==========
[WIP] Speculatively launch Service Workers on mouse/touch events.

This CL introduces a new feature named "SpeculativeLaunchServiceWorker".
When the feature is enabled, HTMLAnchorElement will have NavigationHintSender.
It is similar to PrefetchEventHandler which was removed by
https://codereview.chromium.org/344133002.

When HTMLAnchorElement receives mousedown events for the left button or
gesturetapunconfirmed or gestureshowpress events, a NavigationHint IPC message
will be sent to the browser process.

NavigationHintSender::maybeSendNavigationHint()
 -> sendNavigationHint()
  -> WebPrescientNetworking::sendNavigationHint()
   -> PrescientNetworkingDispatcher::sendNavigationHint()
    -> RendererPreconnect::NavigationHint()
     -> IPC (NetworkHintsMsg_NavigationHint)

In the browser process, ChromeRenderMessageFilter receives the IPC message and
calls ServiceWorkerContextWrapper::StartServiceWorkerForNavigationHint().
ServiceWorkerContextWrapper will try to start a Service Worker for the document
which is linked from the anchor element.
If the Service Worker is successfully started, ServiceWorkerVersion::Metrics
will measure the precision of the navigation hint.
This UMA will be recorded as "ServiceWorker.NavigationHintPrecision" when the
worker is stopped.

Demo movie:
https://drive.google.com/file/d/0B6skYAFVnosEMWdzRm4yMEtIMkk/view?usp=sharing

BUG=616502
==========

to

==========
[WIP] Speculatively launch Service Workers on mouse/touch events.

Splitted into two CLs.
[1/2]: https://codereview.chromium.org/2043863003/
[2/2]: https://codereview.chromium.org/2043083002/


BUG=616502
==========

Powered by Google App Engine
This is Rietveld 408576698