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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2910573002: Implement upgrade-insecure-requests in browser for frame requests (Closed)
Patch Set: rebase Created 3 years, 6 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 | « third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp ('k') | 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/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 23b058dc70155aed38401d5d15f0860ebd8d6adb..2cfa2e2f89c4d707496d828a1e36627f7b9dafc7 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -66,7 +66,6 @@
#include "core/loader/FormSubmission.h"
#include "core/loader/FrameLoadRequest.h"
#include "core/loader/LinkLoader.h"
-#include "core/loader/MixedContentChecker.h"
#include "core/loader/NavigationScheduler.h"
#include "core/loader/NetworkHintsInterface.h"
#include "core/loader/ProgressTracker.h"
@@ -1352,11 +1351,6 @@ NavigationPolicy FrameLoader::CheckLoadCanStart(
RecordLatestRequiredCSP();
// Before modifying the request, check report-only CSP headers to give the
// site owner a chance to learn about requests that need to be modified.
- //
- // TODO(estark): this doesn't work with --enable-browser-side-navigation,
- // wherein 'frame-src' is checked in the browser process. Figure out what to
- // do; maybe with browser-side navigation the upgrade should be happening in
- // the browser process too. See also https://crbug.com/692595
Settings* settings = frame_->GetSettings();
MaybeCheckCSP(
resource_request, navigation_type, frame_, navigation_policy,
@@ -1596,6 +1590,12 @@ void FrameLoader::ModifyRequestForCSP(ResourceRequest& resource_request,
"1");
}
+ // PlzNavigate: Upgrading subframe requests is handled by the browser process.
+ Settings* settings = frame_->GetSettings();
+ if (resource_request.GetFrameType() == WebURLRequest::kFrameTypeNested &&
+ settings && settings->GetBrowserSideNavigationEnabled()) {
+ return;
+ }
UpgradeInsecureRequest(resource_request, document);
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698