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

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

Issue 1860693004: Allow custom inspector header for CORS preflight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
index 3540de2c00431707d7ab913f88d974a7bca488b8..aead12f75a92aa0b15e83ed261329d7fcd6947b0 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorResourceAgent.cpp
@@ -50,6 +50,7 @@
#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectedFrames.h"
+#include "core/inspector/InspectorInstrumentation.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/NetworkResourcesData.h"
#include "core/loader/DocumentLoader.h"
@@ -100,9 +101,6 @@ static size_t maximumResourceBufferSize = 10 * 1000 * 1000;
namespace {
-// Keep in sync with kDevToolsRequestInitiator defined in devtools_network_controller.cc
-const char kDevToolsEmulateNetworkConditionsClientId[] = "X-DevTools-Emulate-Network-Conditions-Client-Id";
-
// Pattern may contain stars ('*') which match to any (possibly empty) string.
// Stars implicitly assumed at the begin/end of pattern.
bool matches(const String& url, const String& pattern)
@@ -536,7 +534,7 @@ void InspectorResourceAgent::willSendRequest(LocalFrame* frame, unsigned long id
willSendRequestInternal(frame, identifier, loader, request, redirectResponse, initiatorInfo);
if (!m_hostId.isEmpty())
- request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, AtomicString(m_hostId));
+ request.addHTTPHeaderField(InspectorInstrumentation::kInspectorEmulateNetworkConditionsClientId, AtomicString(m_hostId));
}
void InspectorResourceAgent::markResourceAsCached(unsigned long identifier)
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorInstrumentation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698