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

Unified Diff: content/browser/frame_host/navigation_request.cc

Issue 1905033002: PlzNavigate: Move navigation-level mixed content checks to the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@console-security-message
Patch Set: Minor changes from nasko@'s comments Created 3 years, 10 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/browser/frame_host/navigation_request.cc
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 4a0c7cec73ffc4825e29fd96547d6e33faaef1c2..78feda7b14b01e63c73835236b173c8a1a6770ac 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -35,6 +35,7 @@
#include "content/public/browser/stream_handle.h"
#include "content/public/common/appcache_info.h"
#include "content/public/common/content_client.h"
+#include "content/public/common/origin_util.h"
#include "content/public/common/request_context_type.h"
#include "content/public/common/resource_response.h"
#include "content/public/common/url_constants.h"
@@ -82,27 +83,6 @@ void UpdateLoadFlagsWithCacheFlags(
}
}
-// This is based on SecurityOrigin::isPotentiallyTrustworthy.
-// TODO(clamy): This should be function in url::Origin.
-bool IsPotentiallyTrustworthyOrigin(const url::Origin& origin) {
- if (origin.unique())
- return false;
-
- if (origin.scheme() == url::kHttpsScheme ||
- origin.scheme() == url::kAboutScheme ||
- origin.scheme() == url::kDataScheme ||
- origin.scheme() == url::kWssScheme ||
- origin.scheme() == url::kFileScheme) {
- return true;
- }
-
- if (net::IsLocalhost(origin.host()))
- return true;
-
- // TODO(clamy): Check for whitelisted origins.
- return false;
-}
-
// TODO(clamy): This should be function in FrameTreeNode.
bool IsSecureFrame(FrameTreeNode* frame) {
while (frame) {
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698