Chromium Code Reviews| 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, |