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

Side by Side Diff: content/browser/worker_host/worker_process_host.cc

Issue 18023022: Blob support for IDB [Chromium] (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ScopedVector and stl_utils for BlobDataHandles. Created 7 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_process_host.h" 5 #include "content/browser/worker_host/worker_process_host.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 base::Bind(&WorkerServiceImpl::next_worker_route_id, 231 base::Bind(&WorkerServiceImpl::next_worker_route_id,
232 base::Unretained(WorkerServiceImpl::GetInstance()))); 232 base::Unretained(WorkerServiceImpl::GetInstance())));
233 process_->AddFilter(message_port_message_filter); 233 process_->AddFilter(message_port_message_filter);
234 worker_message_filter_ = new WorkerMessageFilter(render_process_id, 234 worker_message_filter_ = new WorkerMessageFilter(render_process_id,
235 resource_context_, 235 resource_context_,
236 partition_, 236 partition_,
237 message_port_message_filter); 237 message_port_message_filter);
238 process_->AddFilter(worker_message_filter_.get()); 238 process_->AddFilter(worker_message_filter_.get());
239 process_->AddFilter(new AppCacheDispatcherHost( 239 process_->AddFilter(new AppCacheDispatcherHost(
240 partition_.appcache_service(), process_->GetData().id)); 240 partition_.appcache_service(), process_->GetData().id));
241 process_->AddFilter(new FileAPIMessageFilter(
242 process_->GetData().id,
243 url_request_context,
244 partition_.filesystem_context(),
245 blob_storage_context,
246 stream_context));
247 process_->AddFilter(new FileUtilitiesMessageFilter( 241 process_->AddFilter(new FileUtilitiesMessageFilter(
248 process_->GetData().id)); 242 process_->GetData().id));
249 process_->AddFilter(new MimeRegistryMessageFilter()); 243 process_->AddFilter(new MimeRegistryMessageFilter());
250 process_->AddFilter(new DatabaseMessageFilter(partition_.database_tracker())); 244 process_->AddFilter(new DatabaseMessageFilter(partition_.database_tracker()));
251 process_->AddFilter(new QuotaDispatcherHost( 245 process_->AddFilter(new QuotaDispatcherHost(
252 process_->GetData().id, 246 process_->GetData().id,
253 partition_.quota_manager(), 247 partition_.quota_manager(),
254 GetContentClient()->browser()->CreateQuotaPermissionContext())); 248 GetContentClient()->browser()->CreateQuotaPermissionContext()));
255 249
256 SocketStreamDispatcherHost::GetRequestContextCallback 250 SocketStreamDispatcherHost::GetRequestContextCallback
257 request_context_callback( 251 request_context_callback(
258 base::Bind(&WorkerProcessHost::GetRequestContext, 252 base::Bind(&WorkerProcessHost::GetRequestContext,
259 base::Unretained(this))); 253 base::Unretained(this)));
260 254
261 SocketStreamDispatcherHost* socket_stream_dispatcher_host = 255 SocketStreamDispatcherHost* socket_stream_dispatcher_host =
262 new SocketStreamDispatcherHost( 256 new SocketStreamDispatcherHost(
263 render_process_id, 257 render_process_id,
264 request_context_callback, 258 request_context_callback,
265 resource_context_); 259 resource_context_);
266 socket_stream_dispatcher_host_ = socket_stream_dispatcher_host; 260 socket_stream_dispatcher_host_ = socket_stream_dispatcher_host;
261 process_->AddFilter(new FileAPIMessageFilter(
262 process_->GetData().id,
263 url_request_context,
264 partition_.filesystem_context(),
265 blob_storage_context,
266 stream_context));
267 process_->AddFilter(new IndexedDBDispatcherHost(
268 process_->GetData().id, url_request_context,
269 partition_.indexed_db_context(),
270 blob_storage_context));
267 process_->AddFilter(socket_stream_dispatcher_host); 271 process_->AddFilter(socket_stream_dispatcher_host);
268 process_->AddFilter(new WorkerDevToolsMessageFilter(process_->GetData().id)); 272 process_->AddFilter(new WorkerDevToolsMessageFilter(process_->GetData().id));
269 process_->AddFilter(
270 new IndexedDBDispatcherHost(partition_.indexed_db_context()));
271 } 273 }
272 274
273 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { 275 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) {
274 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL( 276 ChildProcessSecurityPolicyImpl::GetInstance()->GrantRequestURL(
275 process_->GetData().id, instance.url()); 277 process_->GetData().id, instance.url());
276 278
277 instances_.push_back(instance); 279 instances_.push_back(instance);
278 280
279 WorkerProcessMsg_CreateWorker_Params params; 281 WorkerProcessMsg_CreateWorker_Params params;
280 params.url = instance.url(); 282 params.url = instance.url();
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 return false; 702 return false;
701 } 703 }
702 704
703 WorkerProcessHost::WorkerInstance::FilterInfo 705 WorkerProcessHost::WorkerInstance::FilterInfo
704 WorkerProcessHost::WorkerInstance::GetFilter() const { 706 WorkerProcessHost::WorkerInstance::GetFilter() const {
705 DCHECK(NumFilters() == 1); 707 DCHECK(NumFilters() == 1);
706 return *filters_.begin(); 708 return *filters_.begin();
707 } 709 }
708 710
709 } // namespace content 711 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698