Commit e30fab22 authored by Carlos IL's avatar Carlos IL Committed by Commit Bot

Added blink mixed content auto upgrade flag

Starting implementation of go/auto-upgrade-mixed, adds the variations
flag and auto upgrades all mixed content (with no fallback) if it is
set. Further CLs will filter by mixed content type (blockable vs
optionally blockable) depending on variations parameters, and will
add fallback.

Change-Id: Ic14124fe21ba08dc34738fdedebe2a37fb73ac3d
Reviewed-on: https://chromium-review.googlesource.com/1249094
Commit-Queue: Carlos IL <carlosil@chromium.org>
Reviewed-by: default avatarMike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595691}
parent 9b6f96e0
...@@ -82,6 +82,9 @@ const base::Feature kStopNonTimersInBackground { ...@@ -82,6 +82,9 @@ const base::Feature kStopNonTimersInBackground {
const base::Feature kWritableFilesAPI{"WritableFilesAPI", const base::Feature kWritableFilesAPI{"WritableFilesAPI",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kMixedContentAutoupgrade{"AutoupgradeMixedContent",
base::FEATURE_DISABLED_BY_DEFAULT};
const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color"; const char kAutofillPreviewStyleExperimentBgColorParameterName[] = "bg_color";
const char kAutofillPreviewStyleExperimentColorParameterName[] = "color"; const char kAutofillPreviewStyleExperimentColorParameterName[] = "color";
......
...@@ -28,6 +28,7 @@ BLINK_COMMON_EXPORT extern const base::Feature kPortals; ...@@ -28,6 +28,7 @@ BLINK_COMMON_EXPORT extern const base::Feature kPortals;
BLINK_COMMON_EXPORT extern const base::Feature kStopInBackground; BLINK_COMMON_EXPORT extern const base::Feature kStopInBackground;
BLINK_COMMON_EXPORT extern const base::Feature kStopNonTimersInBackground; BLINK_COMMON_EXPORT extern const base::Feature kStopNonTimersInBackground;
BLINK_COMMON_EXPORT extern const base::Feature kWritableFilesAPI; BLINK_COMMON_EXPORT extern const base::Feature kWritableFilesAPI;
BLINK_COMMON_EXPORT extern const base::Feature kMixedContentAutoupgrade;
BLINK_COMMON_EXPORT extern const char BLINK_COMMON_EXPORT extern const char
kAutofillPreviewStyleExperimentBgColorParameterName[]; kAutofillPreviewStyleExperimentBgColorParameterName[];
......
...@@ -38,8 +38,10 @@ ...@@ -38,8 +38,10 @@
#include <memory> #include <memory>
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/feature_list.h"
#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_macros.h"
#include "services/network/public/mojom/request_context_frame_type.mojom-blink.h" #include "services/network/public/mojom/request_context_frame_type.mojom-blink.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h" #include "third_party/blink/public/platform/modules/fetch/fetch_api_request.mojom-shared.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h" #include "third_party/blink/public/platform/modules/service_worker/web_service_worker_network_provider.h"
#include "third_party/blink/public/platform/task_type.h" #include "third_party/blink/public/platform/task_type.h"
...@@ -1659,8 +1661,10 @@ void FrameLoader::UpgradeInsecureRequest(ResourceRequest& resource_request, ...@@ -1659,8 +1661,10 @@ void FrameLoader::UpgradeInsecureRequest(ResourceRequest& resource_request,
return; return;
if (!(origin_context->GetSecurityContext().GetInsecureRequestPolicy() & if (!(origin_context->GetSecurityContext().GetInsecureRequestPolicy() &
kUpgradeInsecureRequests)) kUpgradeInsecureRequests) &&
!base::FeatureList::IsEnabled(features::kMixedContentAutoupgrade)) {
return; return;
}
// Nested frames are always upgraded on the browser process. // Nested frames are always upgraded on the browser process.
if (resource_request.GetFrameType() == if (resource_request.GetFrameType() ==
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment