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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 ResourceContext* resource_context, | 305 ResourceContext* resource_context, |
306 const WorkerStoragePartition& partition) { | 306 const WorkerStoragePartition& partition) { |
307 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 307 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
308 // Generate a unique route id for the browser-worker communication that's | 308 // Generate a unique route id for the browser-worker communication that's |
309 // unique among all worker processes. That way when the worker process sends | 309 // unique among all worker processes. That way when the worker process sends |
310 // a wrapped IPC message through us, we know which WorkerProcessHost to give | 310 // a wrapped IPC message through us, we know which WorkerProcessHost to give |
311 // it to. | 311 // it to. |
312 WorkerProcessHost::WorkerInstance instance( | 312 WorkerProcessHost::WorkerInstance instance( |
313 params.url, | 313 params.url, |
314 params.name, | 314 params.name, |
| 315 params.content_security_policy, |
| 316 params.security_policy_type, |
315 next_worker_route_id(), | 317 next_worker_route_id(), |
316 0, | 318 0, |
317 params.script_resource_appcache_id, | 319 params.script_resource_appcache_id, |
318 resource_context, | 320 resource_context, |
319 partition); | 321 partition); |
320 instance.AddFilter(filter, route_id); | 322 instance.AddFilter(filter, route_id); |
321 instance.worker_document_set()->Add( | 323 instance.worker_document_set()->Add( |
322 filter, params.document_id, filter->render_process_id(), | 324 filter, params.document_id, filter->render_process_id(), |
323 params.render_frame_route_id); | 325 params.render_frame_route_id); |
324 | 326 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 return instance; | 728 return instance; |
727 | 729 |
728 // No existing pending worker - create a new one. | 730 // No existing pending worker - create a new one. |
729 WorkerProcessHost::WorkerInstance pending( | 731 WorkerProcessHost::WorkerInstance pending( |
730 url, true, name, resource_context, partition); | 732 url, true, name, resource_context, partition); |
731 pending_shared_workers_.push_back(pending); | 733 pending_shared_workers_.push_back(pending); |
732 return &pending_shared_workers_.back(); | 734 return &pending_shared_workers_.back(); |
733 } | 735 } |
734 | 736 |
735 } // namespace content | 737 } // namespace content |
OLD | NEW |