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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 874833003: [ServiceWorker] Block all mixed-content requests from a ServiceWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « LayoutTests/http/tests/serviceworker/fetch-mixed-content-to-inscope-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 7cf39743ea2185cfe67f99be57f5f2cedba531aa..04083c122948b97f2e4385a562341954d9692b9e 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -304,9 +304,16 @@ void WebEmbeddedWorkerImpl::prepareShadowPageForLoader()
// with SharedWorker.
ASSERT(!m_webView);
m_webView = WebView::create(0);
+ WebSettings* settings = m_webView->settings();
// FIXME: http://crbug.com/363843. This needs to find a better way to
// not create graphics layers.
- m_webView->settings()->setAcceleratedCompositingEnabled(false);
+ settings->setAcceleratedCompositingEnabled(false);
+ // Currently we block all mixed-content requests from a ServiceWorker.
+ // FIXME: When we support FetchEvent.default(), we should relax this
+ // restriction.
+ settings->setStrictMixedContentChecking(true);
Mike West 2015/01/26 10:04:53 This settings object only takes effect for this wo
horo 2015/01/26 11:17:14 Yes. This WebView is only used for the resource lo
+ settings->setAllowDisplayOfInsecureContent(false);
+ settings->setAllowRunningOfInsecureContent(false);
Mike West 2015/01/26 10:04:53 Setting strict mode will stop notifications up to
horo 2015/01/26 11:17:14 We discussed with rsleevi@ and decided to block al
m_mainFrame = WebLocalFrame::create(this);
m_webView->setMainFrame(m_mainFrame);
m_webView->setDevToolsAgentClient(this);
« no previous file with comments | « LayoutTests/http/tests/serviceworker/fetch-mixed-content-to-inscope-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698