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

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

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

Powered by Google App Engine
This is Rietveld 408576698