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

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: Full plumbing Created 3 years, 9 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 1474b15528a3f1c9657f46426e4497ff1fe27f00..0f94ca866c75b38e83969c6039cde6ff6d7c6624 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -693,11 +693,18 @@ void InspectorNetworkAgent::willSendRequest(
willSendRequestInternal(frame, identifier, loader, request, redirectResponse,
initiatorInfo);
- if (!m_hostId.isEmpty())
+ request.setDevToolsAgentHostId(m_hostId);
+ request.setDevToolsRequestId(IdentifiersFactory::requestId(identifier));
+
+ if (!m_hostId.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(m_hostId));
+ }
+ // TODO(alexclarke): Remove this.
request.setHTTPHeaderField(
HTTPNames::X_DevTools_Request_Id,
AtomicString(IdentifiersFactory::requestId(identifier)));

Powered by Google App Engine
This is Rietveld 408576698