| Index: chrome/browser/worker_host/worker_process_host.cc
|
| diff --git a/chrome/browser/worker_host/worker_process_host.cc b/chrome/browser/worker_host/worker_process_host.cc
|
| index 1a9d167c4e7b43f4ee5a0360f5165b30911334f0..8e9f193d2971fdfcc9316d05885d7d54ceb1abc0 100644
|
| --- a/chrome/browser/worker_host/worker_process_host.cc
|
| +++ b/chrome/browser/worker_host/worker_process_host.cc
|
| @@ -16,6 +16,7 @@
|
| #include "chrome/browser/appcache/appcache_dispatcher_host.h"
|
| #include "chrome/browser/chrome_thread.h"
|
| #include "chrome/browser/child_process_security_policy.h"
|
| +#include "chrome/browser/file_system/file_system_dispatcher_host.h"
|
| #include "chrome/browser/net/chrome_url_request_context.h"
|
| #include "chrome/browser/profile.h"
|
| #include "chrome/browser/renderer_host/database_dispatcher_host.h"
|
| @@ -63,7 +64,11 @@ WorkerProcessHost::WorkerProcessHost(
|
| : BrowserChildProcessHost(WORKER_PROCESS, resource_dispatcher_host),
|
| request_context_(request_context),
|
| appcache_dispatcher_host_(
|
| - new AppCacheDispatcherHost(request_context)) {
|
| + new AppCacheDispatcherHost(request_context)),
|
| + ALLOW_THIS_IN_INITIALIZER_LIST(file_system_dispatcher_host_(
|
| + new FileSystemDispatcherHost(this,
|
| + request_context->file_system_host_context(),
|
| + request_context->host_content_settings_map()))) {
|
| next_route_id_callback_.reset(NewCallbackWithReturnValue(
|
| WorkerService::GetInstance(), &WorkerService::next_worker_route_id));
|
| db_dispatcher_host_ = new DatabaseDispatcherHost(
|
| @@ -76,6 +81,9 @@ WorkerProcessHost::~WorkerProcessHost() {
|
| // Shut down the database dispatcher host.
|
| db_dispatcher_host_->Shutdown();
|
|
|
| + // Shut down the file system dispatcher host.
|
| + file_system_dispatcher_host_->Shutdown();
|
| +
|
| // Let interested observers know we are being deleted.
|
| NotificationService::current()->Notify(
|
| NotificationType::WORKER_PROCESS_HOST_SHUTDOWN,
|
| @@ -122,6 +130,7 @@ bool WorkerProcessHost::Init() {
|
| #if defined(OS_WIN)
|
| switches::kDisableDesktopNotifications,
|
| #endif
|
| + switches::kEnableFileSystem,
|
| };
|
| cmd_line->CopySwitchesFrom(*CommandLine::ForCurrentProcess(), kSwitchNames,
|
| arraysize(kSwitchNames));
|
| @@ -233,6 +242,7 @@ void WorkerProcessHost::OnMessageReceived(const IPC::Message& message) {
|
| bool handled =
|
| appcache_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) ||
|
| db_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) ||
|
| + file_system_dispatcher_host_->OnMessageReceived(message, &msg_is_ok) ||
|
| MessagePortDispatcher::GetInstance()->OnMessageReceived(
|
| message, this, next_route_id_callback_.get(), &msg_is_ok);
|
|
|
| @@ -281,6 +291,7 @@ void WorkerProcessHost::OnMessageReceived(const IPC::Message& message) {
|
|
|
| void WorkerProcessHost::OnProcessLaunched() {
|
| db_dispatcher_host_->Init(handle());
|
| + file_system_dispatcher_host_->Init(handle());
|
| }
|
|
|
| CallbackWithReturnValue<int>::Type* WorkerProcessHost::GetNextRouteIdCallback(
|
|
|