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

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: Fix line endings 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 619f50976cd8c710f045151140c15787d1dc953d..e8d42d17b79c1b2d673df94360896096a618bd20 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"
@@ -6212,9 +6213,18 @@ 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 (info.isCacheDisabled) {
+ // Turn off all caching related flags and set LOAD_BYPASS_CACHE.
+ load_flags &= ~(net::LOAD_VALIDATE_CACHE | net::LOAD_SKIP_CACHE_VALIDATION |
+ net::LOAD_ONLY_FROM_CACHE | net::LOAD_DISABLE_CACHE);
+ load_flags |= net::LOAD_BYPASS_CACHE;
+ }
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,
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/FlagExpectations/enable-browser-side-navigation » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698