| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 AddFilter(new BlobMessageFilter( | 252 AddFilter(new BlobMessageFilter( |
| 253 id(), resource_context_->blob_storage_context())); | 253 id(), resource_context_->blob_storage_context())); |
| 254 AddFilter(new MimeRegistryMessageFilter()); | 254 AddFilter(new MimeRegistryMessageFilter()); |
| 255 AddFilter(new DatabaseMessageFilter( | 255 AddFilter(new DatabaseMessageFilter( |
| 256 resource_context_->database_tracker())); | 256 resource_context_->database_tracker())); |
| 257 | 257 |
| 258 SocketStreamDispatcherHost* socket_stream_dispatcher_host = | 258 SocketStreamDispatcherHost* socket_stream_dispatcher_host = |
| 259 new SocketStreamDispatcherHost( | 259 new SocketStreamDispatcherHost( |
| 260 new URLRequestContextSelector(request_context), resource_context_); | 260 new URLRequestContextSelector(request_context), resource_context_); |
| 261 AddFilter(socket_stream_dispatcher_host); | 261 AddFilter(socket_stream_dispatcher_host); |
| 262 AddFilter(new WorkerDevToolsMessageFilter(id())); | 262 AddFilter(new content::WorkerDevToolsMessageFilter(id())); |
| 263 } | 263 } |
| 264 | 264 |
| 265 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { | 265 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { |
| 266 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( | 266 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( |
| 267 id(), instance.url()); | 267 id(), instance.url()); |
| 268 | 268 |
| 269 instances_.push_back(instance); | 269 instances_.push_back(instance); |
| 270 | 270 |
| 271 WorkerProcessMsg_CreateWorker_Params params; | 271 WorkerProcessMsg_CreateWorker_Params params; |
| 272 params.url = instance.url(); | 272 params.url = instance.url(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 } | 623 } |
| 624 } | 624 } |
| 625 return false; | 625 return false; |
| 626 } | 626 } |
| 627 | 627 |
| 628 WorkerProcessHost::WorkerInstance::FilterInfo | 628 WorkerProcessHost::WorkerInstance::FilterInfo |
| 629 WorkerProcessHost::WorkerInstance::GetFilter() const { | 629 WorkerProcessHost::WorkerInstance::GetFilter() const { |
| 630 DCHECK(NumFilters() == 1); | 630 DCHECK(NumFilters() == 1); |
| 631 return *filters_.begin(); | 631 return *filters_.begin(); |
| 632 } | 632 } |
| OLD | NEW |