| Index: Source/core/inspector/InspectorResourceAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
|
| index 12e2baa770a919e5af5510a3ed5b08b2f1e070ff..c5768606cfbef857cd1b2d13e6bbeee4e38d072d 100644
|
| --- a/Source/core/inspector/InspectorResourceAgent.cpp
|
| +++ b/Source/core/inspector/InspectorResourceAgent.cpp
|
| @@ -82,6 +82,7 @@ namespace {
|
|
|
| // Keep in sync with kDevToolsRequestInitiator defined in devtools_network_controller.cc
|
| const char kDevToolsRequestInitiator[] = "X-DevTools-Request-Initiator";
|
| +const char kDevToolsEmulateNetworkConditionsClientId[] = "X-DevTools-Emulate-Network-Conditions-Client-Id";
|
|
|
| static PassRefPtr<JSONObject> buildObjectForHeaders(const HTTPHeaderMap& headers)
|
| {
|
| @@ -298,6 +299,10 @@ void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
|
| // Ignore the request initiated internally.
|
| if (initiatorInfo.name == FetchInitiatorTypeNames::internal)
|
| return;
|
| +
|
| + if (!m_hostId.isEmpty())
|
| + request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, AtomicString(m_hostId));
|
| +
|
| String requestId = IdentifiersFactory::requestId(identifier);
|
| m_resourcesData->resourceCreated(requestId, m_pageAgent->loaderId(loader));
|
|
|
|
|