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

Issue 2776523005: Plumbing devtools agent host id and request id between processes (Closed)

Created:
3 years, 9 months ago by alex clarke (OOO till 29th)
Modified:
3 years, 8 months ago
Reviewers:
dgozman, Sami, pfeldman
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, caseq+blink_chromium.org, creis+watch_chromium.org, blink-reviews-api_chromium.org, nasko+codewatch_chromium.org, jam, tyoshino+watch_chromium.org, lushnikov+blink_chromium.org, loading-reviews+fetch_chromium.org, pfeldman+blink_chromium.org, dglazkov+blink, darin-cc_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, apavlov+blink_chromium.org, kinuko+watch, Nate Chapin, loading-reviews_chromium.org, kozyatinskiy+blink_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Plumbing devtools agent host id and request id between processes required by https://codereview.chromium.org/2739323003/ This data will let us: 1. Emit DevTools Network domain events from the browser with constant RequestIds for both regular renderer initiated fetches and PlzNavigate browser side navigations. 2. Let a net::URLRequestInterceptor introduced by the subsequent patch figure out which requests correspond to an inspected page. 3. Get rid of the X-DevTools-Request-Id and X-DevTools-Emulate-Network-Conditions-Client-Id headers. BUG=702384, 546953 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_iso;master.tryserver.chromium.linux:linux_site_isolation

Patch Set 1 #

Patch Set 2 : Make ProtocolHandlerRequestIdCorrelationTest pass #

Patch Set 3 : Fix test crash #

Patch Set 4 : Don't rely on a response header #

Patch Set 5 : Fix NetworkHandler::NavigationFailed ID #

Patch Set 6 : Add forward declare #

Patch Set 7 : Another forward declare #

Patch Set 8 : Try to fix compile #

Patch Set 9 : Use the nav_entry_id associated with browser side navigations in bkink for the request id #

Patch Set 10 : Can't use negative numbers for browsr side requests because WTF::HashMap exploded. Use even/odd ins… #

Patch Set 11 : Full plumbing #

Total comments: 12

Patch Set 12 : Don't use unsigned #

Patch Set 13 : Fix PlzNavigate issue #

Patch Set 14 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+227 lines, -18 lines) Patch
M content/browser/devtools/render_frame_devtools_agent_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/devtools/render_frame_devtools_agent_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request_info.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/frame_host/navigation_request_info.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
M content/browser/loader/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/loader/navigation_url_loader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -0 lines 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -6 lines 0 comments Download
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M content/common/navigation_params.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -0 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +3 lines, -2 lines 0 comments Download
A content/common/net/url_request_devtools_user_data.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +42 lines, -0 lines 0 comments Download
A content/common/net/url_request_devtools_user_data.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +22 lines, -0 lines 0 comments Download
M content/common/resource_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/resource_request.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/IdentifiersFactory.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebURLRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +14 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +12 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebURLRequest.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 71 (62 generated)
alex clarke (OOO till 29th)
3 years, 9 months ago (2017-03-24 15:48:38 UTC) #14
pfeldman
On 2017/03/24 15:48:38, alex clarke wrote: That's like pure technical debt right here... Can we ...
3 years, 9 months ago (2017-03-24 17:12:50 UTC) #26
dgozman
On 2017/03/24 17:12:50, pfeldman wrote: > On 2017/03/24 15:48:38, alex clarke wrote: > > That's ...
3 years, 9 months ago (2017-03-24 17:28:27 UTC) #27
pfeldman
Discussed it with dgozman@, here is the summary: - mapping ids is not nice - ...
3 years, 9 months ago (2017-03-24 19:11:19 UTC) #28
alex clarke (OOO till 29th)
On 2017/03/24 19:11:19, pfeldman wrote: > Discussed it with dgozman@, here is the summary: > ...
3 years, 8 months ago (2017-03-29 15:06:08 UTC) #51
alex clarke (OOO till 29th)
3 years, 8 months ago (2017-03-29 15:06:25 UTC) #53
alex clarke (OOO till 29th)
PTAL
3 years, 8 months ago (2017-03-29 15:06:47 UTC) #54
Sami
Lg to me but I'll let others approve :) https://codereview.chromium.org/2776523005/diff/210001/content/browser/frame_host/navigation_request_info.h File content/browser/frame_host/navigation_request_info.h (right): https://codereview.chromium.org/2776523005/diff/210001/content/browser/frame_host/navigation_request_info.h#newcode36 content/browser/frame_host/navigation_request_info.h:36: ...
3 years, 8 months ago (2017-03-29 16:41:42 UTC) #56
alex clarke (OOO till 29th)
3 years, 8 months ago (2017-03-30 16:56:55 UTC) #63
https://codereview.chromium.org/2776523005/diff/210001/content/browser/frame_...
File content/browser/frame_host/navigation_request_info.h (right):

https://codereview.chromium.org/2776523005/diff/210001/content/browser/frame_...
content/browser/frame_host/navigation_request_info.h:36: unsigned int
devtools_request_id);
On 2017/03/29 16:41:42, Sami wrote:
> nit: We generally don't use unsigned types (Looks like some of the existing
> types are unsigned but let's not add new ones if we can avoid it.)
>
(https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md...)

Done.

https://codereview.chromium.org/2776523005/diff/210001/content/browser/loader...
File content/browser/loader/resource_dispatcher_host_impl.cc (right):

https://codereview.chromium.org/2776523005/diff/210001/content/browser/loader...
content/browser/loader/resource_dispatcher_host_impl.cc:2063: // know the
browser PID yet so just specify zero.
On 2017/03/29 16:41:42, Sami wrote:
> Do you mean the renderer pid?

Done.

https://codereview.chromium.org/2776523005/diff/210001/content/child/web_url_...
File content/child/web_url_loader_impl.cc (right):

https://codereview.chromium.org/2776523005/diff/210001/content/child/web_url_...
content/child/web_url_loader_impl.cc:606:
request.devToolsAgentHostId().latin1();
On 2017/03/29 16:41:42, Sami wrote:
> utf8() instead of latin1()?

Done.

https://codereview.chromium.org/2776523005/diff/210001/content/child/web_url_...
content/child/web_url_loader_impl.cc:607: resource_request->devtools_request_id
= request.devToolsRequestId().latin1();
On 2017/03/29 16:41:42, Sami wrote:
> Ditto.

Done.

https://codereview.chromium.org/2776523005/diff/210001/content/common/navigat...
File content/common/navigation_params.h (right):

https://codereview.chromium.org/2776523005/diff/210001/content/common/navigat...
content/common/navigation_params.h:322: // navigations this will be zero.
On 2017/03/29 16:41:42, Sami wrote:
> Ditto about unsigned.

Done.

https://codereview.chromium.org/2776523005/diff/210001/content/common/net/url...
File content/common/net/url_request_devtools_user_data.h (right):

https://codereview.chromium.org/2776523005/diff/210001/content/common/net/url...
content/common/net/url_request_devtools_user_data.h:1: // Copyright (c) 2017 The
Chromium Authors. All rights reserved.
On 2017/03/29 16:41:42, Sami wrote:
> nit: Use the new-style license template.

Not 100% sure but is this what you mean?

Powered by Google App Engine
This is Rietveld 408576698