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

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

Issue 15817013: Add Stream support to WebBlobRegistry and FileAPIMessageFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 months 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
« no previous file with comments | « content/browser/streams/stream_context.h ('k') | content/child/webblobregistry_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 ChildProcessSecurityPolicyImpl::GetInstance()->AddWorker( 222 ChildProcessSecurityPolicyImpl::GetInstance()->AddWorker(
223 process_->GetData().id, render_process_id); 223 process_->GetData().id, render_process_id);
224 CreateMessageFilters(render_process_id); 224 CreateMessageFilters(render_process_id);
225 225
226 return true; 226 return true;
227 } 227 }
228 228
229 void WorkerProcessHost::CreateMessageFilters(int render_process_id) { 229 void WorkerProcessHost::CreateMessageFilters(int render_process_id) {
230 ChromeBlobStorageContext* blob_storage_context = 230 ChromeBlobStorageContext* blob_storage_context =
231 GetChromeBlobStorageContextForResourceContext(resource_context_); 231 GetChromeBlobStorageContextForResourceContext(resource_context_);
232 StreamContext* stream_context =
233 GetStreamContextForResourceContext(resource_context_);
232 234
233 net::URLRequestContextGetter* url_request_context = 235 net::URLRequestContextGetter* url_request_context =
234 partition_.url_request_context(); 236 partition_.url_request_context();
235 net::URLRequestContextGetter* media_url_request_context = 237 net::URLRequestContextGetter* media_url_request_context =
236 partition_.url_request_context(); 238 partition_.url_request_context();
237 239
238 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter( 240 ResourceMessageFilter* resource_message_filter = new ResourceMessageFilter(
239 process_->GetData().id, PROCESS_TYPE_WORKER, resource_context_, 241 process_->GetData().id, PROCESS_TYPE_WORKER, resource_context_,
240 partition_.appcache_service(), 242 partition_.appcache_service(),
241 blob_storage_context, 243 blob_storage_context,
242 partition_.filesystem_context(), 244 partition_.filesystem_context(),
243 new URLRequestContextSelector(url_request_context, 245 new URLRequestContextSelector(url_request_context,
244 media_url_request_context)); 246 media_url_request_context));
245 process_->GetHost()->AddFilter(resource_message_filter); 247 process_->GetHost()->AddFilter(resource_message_filter);
246 248
247 worker_message_filter_ = new WorkerMessageFilter( 249 worker_message_filter_ = new WorkerMessageFilter(
248 render_process_id, resource_context_, partition_, 250 render_process_id, resource_context_, partition_,
249 base::Bind(&WorkerServiceImpl::next_worker_route_id, 251 base::Bind(&WorkerServiceImpl::next_worker_route_id,
250 base::Unretained(WorkerServiceImpl::GetInstance()))); 252 base::Unretained(WorkerServiceImpl::GetInstance())));
251 process_->GetHost()->AddFilter(worker_message_filter_.get()); 253 process_->GetHost()->AddFilter(worker_message_filter_.get());
252 process_->GetHost()->AddFilter(new AppCacheDispatcherHost( 254 process_->GetHost()->AddFilter(new AppCacheDispatcherHost(
253 partition_.appcache_service(), process_->GetData().id)); 255 partition_.appcache_service(), process_->GetData().id));
254 process_->GetHost()->AddFilter(new FileAPIMessageFilter( 256 process_->GetHost()->AddFilter(new FileAPIMessageFilter(
255 process_->GetData().id, 257 process_->GetData().id,
256 url_request_context, 258 url_request_context,
257 partition_.filesystem_context(), 259 partition_.filesystem_context(),
258 blob_storage_context)); 260 blob_storage_context,
261 stream_context));
259 process_->GetHost()->AddFilter(new FileUtilitiesMessageFilter( 262 process_->GetHost()->AddFilter(new FileUtilitiesMessageFilter(
260 process_->GetData().id)); 263 process_->GetData().id));
261 process_->GetHost()->AddFilter(new MimeRegistryMessageFilter()); 264 process_->GetHost()->AddFilter(new MimeRegistryMessageFilter());
262 process_->GetHost()->AddFilter( 265 process_->GetHost()->AddFilter(
263 new DatabaseMessageFilter(partition_.database_tracker())); 266 new DatabaseMessageFilter(partition_.database_tracker()));
264 process_->GetHost()->AddFilter(new QuotaDispatcherHost( 267 process_->GetHost()->AddFilter(new QuotaDispatcherHost(
265 process_->GetData().id, 268 process_->GetData().id,
266 partition_.quota_manager(), 269 partition_.quota_manager(),
267 GetContentClient()->browser()->CreateQuotaPermissionContext())); 270 GetContentClient()->browser()->CreateQuotaPermissionContext()));
268 271
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 return false; 718 return false;
716 } 719 }
717 720
718 WorkerProcessHost::WorkerInstance::FilterInfo 721 WorkerProcessHost::WorkerInstance::FilterInfo
719 WorkerProcessHost::WorkerInstance::GetFilter() const { 722 WorkerProcessHost::WorkerInstance::GetFilter() const {
720 DCHECK(NumFilters() == 1); 723 DCHECK(NumFilters() == 1);
721 return *filters_.begin(); 724 return *filters_.begin();
722 } 725 }
723 726
724 } // namespace content 727 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/streams/stream_context.h ('k') | content/child/webblobregistry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698