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

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

Issue 2800853002: [instrumentation] Turn inspector override "probes" return values into output parameters. (Closed)
Patch Set: update BUILD.gn 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 1474b15528a3f1c9657f46426e4497ff1fe27f00..8a530c15fdc46d0dc797a2436d0b8655b7905526 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -555,19 +555,22 @@ DEFINE_TRACE(InspectorNetworkAgent) {
InspectorBaseAgent::trace(visitor);
}
-bool InspectorNetworkAgent::shouldBlockRequest(const ResourceRequest& request) {
+void InspectorNetworkAgent::shouldBlockRequest(const ResourceRequest& request,
+ bool* result) {
protocol::DictionaryValue* blockedURLs =
m_state->getObject(NetworkAgentState::blockedURLs);
if (!blockedURLs)
- return false;
+ return;
String url = request.url().getString();
for (size_t i = 0; i < blockedURLs->size(); ++i) {
auto entry = blockedURLs->at(i);
- if (matches(url, entry.first))
- return true;
+ if (matches(url, entry.first)) {
+ *result = true;
+ return;
+ }
}
- return false;
+ return;
}
void InspectorNetworkAgent::didBlockRequest(
@@ -1549,8 +1552,9 @@ InspectorNetworkAgent::InspectorNetworkAgent(InspectedFrames* inspectedFrames)
this,
&InspectorNetworkAgent::removeFinishedReplayXHRFired) {}
-bool InspectorNetworkAgent::shouldForceCORSPreflight() {
- return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false);
+void InspectorNetworkAgent::shouldForceCORSPreflight(bool* result) {
+ if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false))
+ *result = true;
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698