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

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

Issue 5850001: Make SocketStreamDispatcherHost a BrowserMessageFilter.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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
« no previous file with comments | « chrome/browser/renderer_host/socket_stream_host.cc ('k') | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/worker_host/worker_process_host.h" 5 #include "chrome/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/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "base/string_util.h" 13 #include "base/string_util.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/appcache/appcache_dispatcher_host.h" 15 #include "chrome/browser/appcache/appcache_dispatcher_host.h"
16 #include "chrome/browser/browser_thread.h" 16 #include "chrome/browser/browser_thread.h"
17 #include "chrome/browser/child_process_security_policy.h" 17 #include "chrome/browser/child_process_security_policy.h"
18 #include "chrome/browser/content_settings/host_content_settings_map.h" 18 #include "chrome/browser/content_settings/host_content_settings_map.h"
19 #include "chrome/browser/file_system/file_system_dispatcher_host.h" 19 #include "chrome/browser/file_system/file_system_dispatcher_host.h"
20 #include "chrome/browser/mime_registry_message_filter.h" 20 #include "chrome/browser/mime_registry_message_filter.h"
21 #include "chrome/browser/net/chrome_url_request_context.h" 21 #include "chrome/browser/net/chrome_url_request_context.h"
22 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/renderer_host/blob_message_filter.h" 23 #include "chrome/browser/renderer_host/blob_message_filter.h"
24 #include "chrome/browser/renderer_host/database_message_filter.h" 24 #include "chrome/browser/renderer_host/database_message_filter.h"
25 #include "chrome/browser/renderer_host/file_utilities_message_filter.h" 25 #include "chrome/browser/renderer_host/file_utilities_message_filter.h"
26 #include "chrome/browser/renderer_host/render_message_filter.h" 26 #include "chrome/browser/renderer_host/render_message_filter.h"
27 #include "chrome/browser/renderer_host/render_view_host.h" 27 #include "chrome/browser/renderer_host/render_view_host.h"
28 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 28 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
29 #include "chrome/browser/renderer_host/render_view_host_notification_task.h" 29 #include "chrome/browser/renderer_host/render_view_host_notification_task.h"
30 #include "chrome/browser/renderer_host/socket_stream_dispatcher_host.h"
30 #include "chrome/browser/worker_host/message_port_dispatcher.h" 31 #include "chrome/browser/worker_host/message_port_dispatcher.h"
31 #include "chrome/browser/worker_host/worker_service.h" 32 #include "chrome/browser/worker_host/worker_service.h"
32 #include "chrome/common/chrome_switches.h" 33 #include "chrome/common/chrome_switches.h"
33 #include "chrome/common/debug_flags.h" 34 #include "chrome/common/debug_flags.h"
34 #include "chrome/common/notification_service.h" 35 #include "chrome/common/notification_service.h"
35 #include "chrome/common/render_messages.h" 36 #include "chrome/common/render_messages.h"
36 #include "chrome/common/render_messages_params.h" 37 #include "chrome/common/render_messages_params.h"
37 #include "chrome/common/result_codes.h" 38 #include "chrome/common/result_codes.h"
38 #include "chrome/common/worker_messages.h" 39 #include "chrome/common/worker_messages.h"
39 #include "net/base/mime_util.h" 40 #include "net/base/mime_util.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 void WorkerProcessHost::CreateMessageFilters() { 199 void WorkerProcessHost::CreateMessageFilters() {
199 filters_.push_back(new AppCacheDispatcherHost(request_context_, id())); 200 filters_.push_back(new AppCacheDispatcherHost(request_context_, id()));
200 filters_.push_back(new FileSystemDispatcherHost(request_context_)); 201 filters_.push_back(new FileSystemDispatcherHost(request_context_));
201 filters_.push_back(new FileUtilitiesMessageFilter(id())); 202 filters_.push_back(new FileUtilitiesMessageFilter(id()));
202 filters_.push_back( 203 filters_.push_back(
203 new BlobMessageFilter(id(), request_context_->blob_storage_context())); 204 new BlobMessageFilter(id(), request_context_->blob_storage_context()));
204 filters_.push_back(new MimeRegistryMessageFilter()); 205 filters_.push_back(new MimeRegistryMessageFilter());
205 filters_.push_back(new DatabaseMessageFilter( 206 filters_.push_back(new DatabaseMessageFilter(
206 request_context_->database_tracker(), 207 request_context_->database_tracker(),
207 request_context_->host_content_settings_map())); 208 request_context_->host_content_settings_map()));
209 filters_.push_back(new SocketStreamDispatcherHost());
208 210
209 for (size_t i = 0; i < filters_.size(); ++i) 211 for (size_t i = 0; i < filters_.size(); ++i)
210 filters_[i]->OnFilterAdded(channel()); 212 filters_[i]->OnFilterAdded(channel());
211 } 213 }
212 214
213 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) { 215 void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) {
214 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL( 216 ChildProcessSecurityPolicy::GetInstance()->GrantRequestURL(
215 id(), instance.url()); 217 id(), instance.url());
216 218
217 instances_.push_back(instance); 219 instances_.push_back(instance);
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 690 }
689 } 691 }
690 return false; 692 return false;
691 } 693 }
692 694
693 WorkerProcessHost::WorkerInstance::SenderInfo 695 WorkerProcessHost::WorkerInstance::SenderInfo
694 WorkerProcessHost::WorkerInstance::GetSender() const { 696 WorkerProcessHost::WorkerInstance::GetSender() const {
695 DCHECK(NumSenders() == 1); 697 DCHECK(NumSenders() == 1);
696 return *senders_.begin(); 698 return *senders_.begin();
697 } 699 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/socket_stream_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698