OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/worker_host/worker_service_impl.h" | 5 #include "content/browser/worker_host/worker_service_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 ResourceContext* resource_context, | 290 ResourceContext* resource_context, |
291 const WorkerStoragePartition& partition) { | 291 const WorkerStoragePartition& partition) { |
292 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 292 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
293 // Generate a unique route id for the browser-worker communication that's | 293 // Generate a unique route id for the browser-worker communication that's |
294 // unique among all worker processes. That way when the worker process sends | 294 // unique among all worker processes. That way when the worker process sends |
295 // a wrapped IPC message through us, we know which WorkerProcessHost to give | 295 // a wrapped IPC message through us, we know which WorkerProcessHost to give |
296 // it to. | 296 // it to. |
297 WorkerProcessHost::WorkerInstance instance( | 297 WorkerProcessHost::WorkerInstance instance( |
298 params.url, | 298 params.url, |
299 params.name, | 299 params.name, |
| 300 params.content_security_policy, |
| 301 params.security_policy_type, |
300 next_worker_route_id(), | 302 next_worker_route_id(), |
301 0, | 303 0, |
302 params.script_resource_appcache_id, | 304 params.script_resource_appcache_id, |
303 resource_context, | 305 resource_context, |
304 partition); | 306 partition); |
305 instance.AddFilter(filter, route_id); | 307 instance.AddFilter(filter, route_id); |
306 instance.worker_document_set()->Add( | 308 instance.worker_document_set()->Add( |
307 filter, params.document_id, filter->render_process_id(), | 309 filter, params.document_id, filter->render_process_id(), |
308 params.render_view_route_id); | 310 params.render_view_route_id); |
309 | 311 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 return instance; | 713 return instance; |
712 | 714 |
713 // No existing pending worker - create a new one. | 715 // No existing pending worker - create a new one. |
714 WorkerProcessHost::WorkerInstance pending( | 716 WorkerProcessHost::WorkerInstance pending( |
715 url, true, name, resource_context, partition); | 717 url, true, name, resource_context, partition); |
716 pending_shared_workers_.push_back(pending); | 718 pending_shared_workers_.push_back(pending); |
717 return &pending_shared_workers_.back(); | 719 return &pending_shared_workers_.back(); |
718 } | 720 } |
719 | 721 |
720 } // namespace content | 722 } // namespace content |
OLD | NEW |