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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp

Issue 2776523005: Plumbing devtools agent host id and request id between processes (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 8e5e6300b6be015c31da61526d4b5e564f4c9367..08c6696aaa15ea12ea311707513e5be03fd43a17 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -700,11 +700,18 @@ void InspectorNetworkAgent::WillSendRequest(
WillSendRequestInternal(frame, identifier, loader, request, redirect_response,
initiator_info);
- if (!host_id_.IsEmpty())
+ request.SetDevToolsAgentHostId(host_id_);
+ request.SetDevToolsRequestId(IdentifiersFactory::RequestId(identifier));
+
+ if (!host_id_.IsEmpty()) {
+ // TODO(alexclarke): Merge throttling in with request interception so we can
+ // stop setting this header.
request.AddHTTPHeaderField(
HTTPNames::X_DevTools_Emulate_Network_Conditions_Client_Id,
AtomicString(host_id_));
+ }
+ // TODO(alexclarke): Remove this.
request.SetHTTPHeaderField(
HTTPNames::X_DevTools_Request_Id,
AtomicString(IdentifiersFactory::RequestId(identifier)));

Powered by Google App Engine
This is Rietveld 408576698