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

Unified Diff: content/renderer/websharedworker_proxy.cc

Issue 9154003: Pass Content-security-policy and header type from WebSharedWorkerProxy to WebSharedWorkerStub. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 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 | « content/renderer/websharedworker_proxy.h ('k') | content/worker/websharedworker_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/websharedworker_proxy.cc
===================================================================
--- content/renderer/websharedworker_proxy.cc (revision 118326)
+++ content/renderer/websharedworker_proxy.cc (working copy)
@@ -45,13 +45,16 @@
route_id_ = MSG_ROUTING_NONE;
}
-void WebSharedWorkerProxy::CreateWorkerContext(const GURL& script_url,
- bool is_shared,
- const string16& name,
- const string16& user_agent,
- const string16& source_code,
- int pending_route_id,
- int64 script_resource_appcache_id) {
+void WebSharedWorkerProxy::CreateWorkerContext(
+ const GURL& script_url,
+ bool is_shared,
+ const string16& name,
+ const string16& user_agent,
+ const string16& source_code,
+ const string16& content_security_policy,
+ WebKit::WebContentSecurityPolicyType policy_type,
+ int pending_route_id,
+ int64 script_resource_appcache_id) {
DCHECK(route_id_ == MSG_ROUTING_NONE);
ViewHostMsg_CreateWorker_Params params;
params.url = script_url;
@@ -72,7 +75,8 @@
// connect might have already been called.
queued_messages_.insert(queued_messages_.begin(),
new WorkerMsg_StartWorkerContext(
- route_id_, script_url, user_agent, source_code));
+ route_id_, script_url, user_agent, source_code,
+ content_security_policy, policy_type));
}
bool WebSharedWorkerProxy::IsStarted() {
@@ -119,9 +123,24 @@
const WebKit::WebString& user_agent,
const WebKit::WebString& source_code,
long long script_resource_appcache_id) {
+ CreateWorkerContext(
+ script_url, true, name, user_agent, source_code, string16(),
+ WebKit::WebContentSecurityPolicyTypeReportOnly, pending_route_id_,
+ script_resource_appcache_id);
+}
+
+void WebSharedWorkerProxy::startWorkerContext(
+ const WebKit::WebURL& script_url,
+ const WebKit::WebString& name,
+ const WebKit::WebString& user_agent,
+ const WebKit::WebString& source_code,
+ const WebKit::WebString& content_security_policy,
+ WebKit::WebContentSecurityPolicyType policy_type,
+ long long script_resource_appcache_id) {
DCHECK(!isStarted());
- CreateWorkerContext(script_url, true, name, user_agent, source_code,
- pending_route_id_, script_resource_appcache_id);
+ CreateWorkerContext(
+ script_url, true, name, user_agent, source_code, content_security_policy,
+ policy_type, pending_route_id_, script_resource_appcache_id);
}
void WebSharedWorkerProxy::terminateWorkerContext() {
« no previous file with comments | « content/renderer/websharedworker_proxy.h ('k') | content/worker/websharedworker_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698