| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_process_host.h" | 5 #include "content/browser/worker_host/worker_process_host.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 AddFilter(new BlobMessageFilter( | 263 AddFilter(new BlobMessageFilter( |
| 264 id(), resource_context_->blob_storage_context())); | 264 id(), resource_context_->blob_storage_context())); |
| 265 AddFilter(new MimeRegistryMessageFilter()); | 265 AddFilter(new MimeRegistryMessageFilter()); |
| 266 AddFilter(new DatabaseMessageFilter( | 266 AddFilter(new DatabaseMessageFilter( |
| 267 resource_context_->database_tracker())); | 267 resource_context_->database_tracker())); |
| 268 | 268 |
| 269 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 269 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
| 270 new SocketStreamDispatcherHost( | 270 new SocketStreamDispatcherHost( |
| 271 new URLRequestContextSelector(request_context), resource_context_); | 271 new URLRequestContextSelector(request_context), resource_context_); |
| 272 AddFilter(socket_stream_dispatcher_host); | 272 AddFilter(socket_stream_dispatcher_host); |
| 273 AddFilter(new WorkerDevToolsMessageFilter(id())); | 273 AddFilter(new content::WorkerDevToolsMessageFilter(id())); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { | 276 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { |
| 277 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( | 277 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( |
| 278 id(), instance.url()); | 278 id(), instance.url()); |
| 279 | 279 |
| 280 instances_.push_back(instance); | 280 instances_.push_back(instance); |
| 281 | 281 |
| 282 WorkerProcessMsg_CreateWorker_Params params; | 282 WorkerProcessMsg_CreateWorker_Params params; |
| 283 params.url = instance.url(); | 283 params.url = instance.url(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 } | 634 } |
| 635 } | 635 } |
| 636 return false; | 636 return false; |
| 637 } | 637 } |
| 638 | 638 |
| 639 WorkerProcessHost::WorkerInstance::FilterInfo | 639 WorkerProcessHost::WorkerInstance::FilterInfo |
| 640 WorkerProcessHost::WorkerInstance::GetFilter() const { | 640 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 641 DCHECK(NumFilters() == 1); | 641 DCHECK(NumFilters() == 1); |
| 642 return *filters_.begin(); | 642 return *filters_.begin(); |
| 643 } | 643 } |
| OLD | NEW |