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 2e19a96985c0f1f76e5d9bf5782c8ffa0d3f4b02..053130cf54544e5b845c97c05533782a5edb3f74 100644 |
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp |
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp |
@@ -1334,24 +1334,13 @@ void InspectorNetworkAgent::getResponseBody( |
Response::Error("No data found for resource with given identifier")); |
} |
-Response InspectorNetworkAgent::addBlockedURL(const String& url) { |
- protocol::DictionaryValue* blockedURLs = |
- m_state->getObject(NetworkAgentState::blockedURLs); |
- if (!blockedURLs) { |
- std::unique_ptr<protocol::DictionaryValue> newList = |
- protocol::DictionaryValue::create(); |
- blockedURLs = newList.get(); |
- m_state->setObject(NetworkAgentState::blockedURLs, std::move(newList)); |
- } |
- blockedURLs->setBoolean(url, true); |
- return Response::OK(); |
-} |
- |
-Response InspectorNetworkAgent::removeBlockedURL(const String& url) { |
- protocol::DictionaryValue* blockedURLs = |
- m_state->getObject(NetworkAgentState::blockedURLs); |
- if (blockedURLs) |
- blockedURLs->remove(url); |
+Response InspectorNetworkAgent::setBlockedURLs( |
+ std::unique_ptr<protocol::Array<String>> urls) { |
+ std::unique_ptr<protocol::DictionaryValue> newList = |
+ protocol::DictionaryValue::create(); |
+ for (size_t i = 0; i < urls->length(); i++) |
+ newList->setBoolean(urls->get(i), true); |
+ m_state->setObject(NetworkAgentState::blockedURLs, std::move(newList)); |
return Response::OK(); |
} |