mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add support for --unsafely-treat-insecure-origin-as-secure flag (issue #2574)
This commit is contained in:
committed by
Marshall Greenblatt
parent
1a86240c93
commit
7ecc5d31ea
@@ -705,6 +705,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
|||||||
switches::kPpapiFlashPath,
|
switches::kPpapiFlashPath,
|
||||||
switches::kPpapiFlashVersion,
|
switches::kPpapiFlashVersion,
|
||||||
switches::kUncaughtExceptionStackSize,
|
switches::kUncaughtExceptionStackSize,
|
||||||
|
switches::kUnsafelyTreatInsecureOriginAsSecure,
|
||||||
};
|
};
|
||||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||||
arraysize(kSwitchNames));
|
arraysize(kSwitchNames));
|
||||||
|
@@ -51,6 +51,7 @@
|
|||||||
#include "build/build_config.h"
|
#include "build/build_config.h"
|
||||||
#include "chrome/common/chrome_switches.h"
|
#include "chrome/common/chrome_switches.h"
|
||||||
#include "chrome/common/constants.mojom.h"
|
#include "chrome/common/constants.mojom.h"
|
||||||
|
#include "chrome/common/secure_origin_whitelist.h"
|
||||||
#include "chrome/common/url_constants.h"
|
#include "chrome/common/url_constants.h"
|
||||||
#include "chrome/renderer/chrome_content_renderer_client.h"
|
#include "chrome/renderer/chrome_content_renderer_client.h"
|
||||||
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
#include "chrome/renderer/loadtimes_extension_bindings.h"
|
||||||
@@ -409,6 +410,12 @@ void CefContentRendererClient::RenderThreadStarted() {
|
|||||||
pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get());
|
pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto& origin_or_hostname_pattern :
|
||||||
|
secure_origin_whitelist::GetWhitelist()) {
|
||||||
|
blink::WebSecurityPolicy::AddOriginTrustworthyWhiteList(
|
||||||
|
blink::WebString::FromUTF8(origin_or_hostname_pattern));
|
||||||
|
}
|
||||||
|
|
||||||
if (extensions::ExtensionsEnabled())
|
if (extensions::ExtensionsEnabled())
|
||||||
extensions_renderer_client_->RenderThreadStarted();
|
extensions_renderer_client_->RenderThreadStarted();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user