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

Issue 2654993006: Show service worker navigation preload requests in DevTools Network tab. (Closed)

Created:
3 years, 11 months ago by horo
Modified:
3 years, 10 months ago
Reviewers:
pfeldman
CC:
chromium-reviews, tzik, apavlov+blink_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, caseq+blink_chromium.org, jam, darin-cc_chromium.org, devtools-reviews_chromium.org, blink-reviews, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, Randy Smith (Not in Mondays), nhiroki, loading-reviews_chromium.org, lushnikov+blink_chromium.org, michaeln, shimazu+serviceworker_chromium.org, serviceworker-reviews, pfeldman+blink_chromium.org, kinuko+serviceworker, mmenke, horo+watch_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/6f9e15e126016658be28422100f9c4d1d4da6804

Patch Set 1 #

Total comments: 14

Patch Set 2 : incorporated pfeldman's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+644 lines, -32 lines) Patch
M content/browser/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/devtools/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/devtools/protocol/network_handler.h View 1 3 chunks +17 lines, -0 lines 0 comments Download
M content/browser/devtools/protocol/network_handler.cc View 1 8 chunks +243 lines, -13 lines 0 comments Download
M content/browser/devtools/protocol_config.json View 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/devtools/service_worker_devtools_agent_host.h View 2 chunks +13 lines, -0 lines 0 comments Download
M content/browser/devtools/service_worker_devtools_agent_host.cc View 1 2 chunks +37 lines, -0 lines 0 comments Download
M content/browser/devtools/service_worker_devtools_manager.h View 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/devtools/service_worker_devtools_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 chunk +6 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_fetch_dispatcher.cc View 1 11 chunks +94 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_internals_ui.cc View 2 chunks +2 lines, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 2 chunks +1 line, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-scope.php View 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/resources/navigation-preload-worker.php View 1 chunk +29 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload.html View 1 chunk +130 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/service-workers/service-workers-navigation-preload-expected.txt View 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/browser_protocol.json View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/NetworkLog.js View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/NetworkRequest.js View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 29 (23 generated)
horo
pfeldman@ Could you please review this?
3 years, 11 months ago (2017-01-26 16:38:11 UTC) #14
pfeldman
https://codereview.chromium.org/2654993006/diff/40001/content/browser/devtools/protocol/network_handler.cc File content/browser/devtools/protocol/network_handler.cc (right): https://codereview.chromium.org/2654993006/diff/40001/content/browser/devtools/protocol/network_handler.cc#newcode553 content/browser/devtools/protocol/network_handler.cc:553: std::unique_ptr<DictionaryValue> headers_dict(DictionaryValue::create()); Check for enabled_ first, you might be ...
3 years, 11 months ago (2017-01-26 18:10:20 UTC) #16
horo
Thank you. https://codereview.chromium.org/2654993006/diff/40001/content/browser/devtools/protocol/network_handler.cc File content/browser/devtools/protocol/network_handler.cc (right): https://codereview.chromium.org/2654993006/diff/40001/content/browser/devtools/protocol/network_handler.cc#newcode553 content/browser/devtools/protocol/network_handler.cc:553: std::unique_ptr<DictionaryValue> headers_dict(DictionaryValue::create()); On 2017/01/26 18:10:20, pfeldman wrote: ...
3 years, 10 months ago (2017-01-26 22:53:20 UTC) #20
pfeldman
lgtm
3 years, 10 months ago (2017-01-27 00:06:40 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2654993006/60001
3 years, 10 months ago (2017-01-27 01:55:03 UTC) #26
commit-bot: I haz the power
3 years, 10 months ago (2017-01-27 03:08:24 UTC) #29
Message was sent while issue was closed.
Committed patchset #2 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/6f9e15e126016658be28422100f9...

Powered by Google App Engine
This is Rietveld 408576698