Chromium Code Reviews| Index: content/renderer/render_thread_impl.cc |
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
| index acda8a70f33dea4c697f4dadd93a8e3e830c7042..56f69160d3350a2ca68cb68669870dd97115fbd6 100644 |
| --- a/content/renderer/render_thread_impl.cc |
| +++ b/content/renderer/render_thread_impl.cc |
| @@ -135,6 +135,7 @@ |
| #include "third_party/WebKit/public/web/WebPopupMenu.h" |
| #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| #include "third_party/WebKit/public/web/WebScriptController.h" |
| +#include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| #include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
| #include "third_party/WebKit/public/web/WebView.h" |
| #include "third_party/skia/include/core/SkGraphics.h" |
| @@ -186,6 +187,7 @@ using blink::WebFrame; |
| using blink::WebNetworkStateNotifier; |
| using blink::WebRuntimeFeatures; |
| using blink::WebScriptController; |
| +using blink::WebSecurityOrigin; |
| using blink::WebSecurityPolicy; |
| using blink::WebString; |
| using blink::WebView; |
| @@ -386,6 +388,15 @@ blink::WebGraphicsContext3D::Attributes GetOffscreenAttribs() { |
| return attributes; |
| } |
| +void RegisterSecureOriginsWhitelist() { |
|
jochen (gone - plz use gerrit)
2015/04/30 07:15:32
this can be moved to chrome now, no? somewhere in
kinuko
2015/04/30 08:16:25
Oops, yes actually I already had the code in chrom
|
| + std::set<std::string> schemes; |
| + std::set<GURL> origins; |
| + GetContentClient()->AddSecureSchemesAndOrigins(&schemes, &origins); |
| + for (const auto& origin : origins) |
| + WebSecurityPolicy::addOriginTrustworthyWhiteList( |
| + WebSecurityOrigin::create(origin)); |
| +} |
| + |
| } // namespace |
| // For measuring memory usage after each task. Behind a command line flag. |
| @@ -566,6 +577,8 @@ void RenderThreadImpl::Init() { |
| InitSkiaEventTracer(); |
| + RegisterSecureOriginsWhitelist(); |
| + |
| const base::CommandLine& command_line = |
| *base::CommandLine::ForCurrentProcess(); |