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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2611183007: PlzNavigate: Fix for the http/tests/inspector/resource-har-conversion.html layout test failure. (Closed)
Patch Set: Created 3 years, 11 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: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f315311a35500819d4a2ecaf3db6f98d3c0393cd..13806c069b81b38fb1a44c57914cbf69dd6560ca 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -157,6 +157,7 @@
#include "mojo/edk/js/core.h"
#include "mojo/edk/js/support.h"
#include "net/base/data_url.h"
+#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/http/http_util.h"
@@ -182,6 +183,7 @@
#include "third_party/WebKit/public/platform/scheduler/renderer/renderer_scheduler.h"
#include "third_party/WebKit/public/web/WebColorSuggestion.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
+#include "third_party/WebKit/public/web/WebDevToolsAgent.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFindOptions.h"
#include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
@@ -6200,9 +6202,16 @@ void RenderFrameImpl::BeginNavigation(const NavigationPolicyInfo& info) {
info.urlRequest.requestorOrigin().isNull()
? base::Optional<url::Origin>()
: base::Optional<url::Origin>(info.urlRequest.requestorOrigin());
+
+ int load_flags = GetLoadFlagsForWebURLRequest(info.urlRequest);
+
+ // Requests initiated via devtools can have caching disabled.
+ if (devtools_agent_ && devtools_agent_->GetWebAgent() &&
+ devtools_agent_->GetWebAgent()->cacheDisabled()) {
+ load_flags = net::LOAD_BYPASS_CACHE;
pfeldman 2017/01/09 16:40:41 You just overrode non-cache-related bits set in Ge
jam 2017/01/09 16:46:24 whops, thanks for catching that. Given that this
ananta 2017/01/10 01:20:09 Thanks for catching this. Fixed
+ }
BeginNavigationParams begin_navigation_params(
- GetWebURLRequestHeaders(info.urlRequest),
- GetLoadFlagsForWebURLRequest(info.urlRequest),
+ GetWebURLRequestHeaders(info.urlRequest), load_flags,
info.urlRequest.hasUserGesture(),
info.urlRequest.skipServiceWorker() !=
blink::WebURLRequest::SkipServiceWorker::None,

Powered by Google App Engine
This is Rietveld 408576698