From b8774374a8c7bd69836589060439233e6ce43469 Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Tue, 2 Oct 2018 15:15:56 -0700 Subject: [PATCH] Fixed reporting for iframe ugprade-insecure-requests upgrades https://chromium-review.googlesource.com/c/chromium/src/+/1096360 --- atom/browser/net/asar/url_request_asar_job.cc | 4 +++- atom/browser/net/asar/url_request_asar_job.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/atom/browser/net/asar/url_request_asar_job.cc b/atom/browser/net/asar/url_request_asar_job.cc index a6a323d7c532..62f847d01d4a 100644 --- a/atom/browser/net/asar/url_request_asar_job.cc +++ b/atom/browser/net/asar/url_request_asar_job.cc @@ -142,7 +142,8 @@ int URLRequestAsarJob::ReadRawData(net::IOBuffer* dest, int dest_size) { } bool URLRequestAsarJob::IsRedirectResponse(GURL* location, - int* http_status_code) { + int* http_status_code, + bool* insecure_scheme_was_upgraded) { if (type_ != TYPE_FILE) return false; #if defined(OS_WIN) @@ -161,6 +162,7 @@ bool URLRequestAsarJob::IsRedirectResponse(GURL* location, *location = net::FilePathToFileURL(new_path); *http_status_code = 301; + *insecure_scheme_was_upgraded = false; return true; #else return false; diff --git a/atom/browser/net/asar/url_request_asar_job.h b/atom/browser/net/asar/url_request_asar_job.h index fde6302e031d..55432bd1c403 100644 --- a/atom/browser/net/asar/url_request_asar_job.h +++ b/atom/browser/net/asar/url_request_asar_job.h @@ -55,7 +55,9 @@ class URLRequestAsarJob : public net::URLRequestJob { void Start() override; void Kill() override; int ReadRawData(net::IOBuffer* buf, int buf_size) override; - bool IsRedirectResponse(GURL* location, int* http_status_code) override; + bool IsRedirectResponse(GURL* location, + int* http_status_code, + bool* insecure_scheme_was_upgraded) override; std::unique_ptr SetUpSourceStream() override; bool GetMimeType(std::string* mime_type) const override; void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override;