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

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

Issue 2479713003: [Devtools] Fixed bug with devtools blocking requests incorrectly (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | 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/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index 4e2dcee0e183fb4a3b8d043ec0e3cafd0971e4ac..2d80fab69afc0a07922729aaa464a2b2440403ae 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -509,12 +509,6 @@ DEFINE_TRACE(InspectorNetworkAgent) {
}
bool InspectorNetworkAgent::shouldBlockRequest(const ResourceRequest& request) {
- if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false) &&
- (request.getCachePolicy() == WebCachePolicy::ReturnCacheDataDontLoad ||
- request.getCachePolicy() == WebCachePolicy::ReturnCacheDataIfValid)) {
- return true;
- }
-
protocol::DictionaryValue* blockedURLs =
m_state->getObject(NetworkAgentState::blockedURLs);
if (!blockedURLs)
@@ -633,7 +627,9 @@ void InspectorNetworkAgent::willSendRequest(
request.setReportRawHeaders(true);
- if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false)) {
+ if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false) &&
+ request.getCachePolicy() != WebCachePolicy::ReturnCacheDataDontLoad &&
jkarlin 2016/11/04 12:27:25 If the cache is disabled in devtools and the polic
dgozman 2016/11/04 18:31:43 Thanks for explanation. I guess we at least need b
+ request.getCachePolicy() != WebCachePolicy::ReturnCacheDataIfValid) {
// It shouldn't be a ReturnCacheDataDontLoad request as those are blocked
// in shouldBlockRequest.
DCHECK_NE(WebCachePolicy::ReturnCacheDataDontLoad,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698