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

Unified Diff: content/browser/worker_host/worker_process_host.cc

Issue 9425026: Remove getters for HTML5 related objects from the ResourceContext interface. Half of them weren't u… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/worker_host/worker_process_host.cc
===================================================================
--- content/browser/worker_host/worker_process_host.cc (revision 122771)
+++ content/browser/worker_host/worker_process_host.cc (working copy)
@@ -16,6 +16,7 @@
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "content/browser/appcache/appcache_dispatcher_host.h"
+#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/browser_child_process_host_impl.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/debugger/worker_devtools_manager.h"
@@ -28,6 +29,7 @@
#include "content/browser/renderer_host/file_utilities_message_filter.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
+#include "content/browser/resource_context_impl.h"
#include "content/browser/worker_host/message_port_service.h"
#include "content/browser/worker_host/worker_message_filter.h"
#include "content/browser/worker_host/worker_service_impl.h"
@@ -38,7 +40,6 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_view_host_delegate.h"
-#include "content/public/browser/resource_context.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -53,6 +54,7 @@
using content::BrowserThread;
using content::ChildProcessData;
using content::ChildProcessHost;
+using content::ResourceContext;
using content::UserMetricsAction;
using content::WorkerDevToolsManager;
using content::WorkerServiceImpl;
@@ -194,6 +196,8 @@
#endif
cmd_line);
+ fileapi::FileSystemContext* file_system_context =
+ ResourceContext::GetFileSystemContext(resource_context_);
ChildProcessSecurityPolicyImpl::GetInstance()->AddWorker(
process_->GetData().id, render_process_id);
if (!CommandLine::ForCurrentProcess()->HasSwitch(
@@ -204,8 +208,8 @@
// requests them.
// This is for the filesystem sandbox.
ChildProcessSecurityPolicyImpl::GetInstance()->GrantPermissionsForFile(
- process_->GetData().id, resource_context_->GetFileSystemContext()->
- sandbox_provider()->new_base_path(),
+ process_->GetData().id,
+ file_system_context->sandbox_provider()->new_base_path(),
base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_CREATE |
base::PLATFORM_FILE_OPEN_ALWAYS |
@@ -221,16 +225,16 @@
// This is so that we can read and move stuff out of the old filesystem
// sandbox.
ChildProcessSecurityPolicyImpl::GetInstance()->GrantPermissionsForFile(
- process_->GetData().id, resource_context_->GetFileSystemContext()->
- sandbox_provider()->old_base_path(),
+ process_->GetData().id,
+ file_system_context->sandbox_provider()->old_base_path(),
base::PLATFORM_FILE_READ | base::PLATFORM_FILE_WRITE |
base::PLATFORM_FILE_WRITE_ATTRIBUTES |
base::PLATFORM_FILE_ENUMERATE);
// This is so that we can rename the old sandbox out of the way so that
// we know we've taken care of it.
ChildProcessSecurityPolicyImpl::GetInstance()->GrantPermissionsForFile(
- process_->GetData().id, resource_context_->GetFileSystemContext()->
- sandbox_provider()->renamed_old_base_path(),
+ process_->GetData().id,
+ file_system_context->sandbox_provider()->renamed_old_base_path(),
base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE);
}
@@ -255,16 +259,21 @@
base::Unretained(WorkerServiceImpl::GetInstance())));
process_->GetHost()->AddFilter(worker_message_filter_);
process_->GetHost()->AddFilter(new AppCacheDispatcherHost(
- resource_context_->GetAppCacheService(), process_->GetData().id));
+ static_cast<ChromeAppCacheService*>(
+ ResourceContext::GetAppCacheService(resource_context_)),
+ process_->GetData().id));
process_->GetHost()->AddFilter(new FileSystemDispatcherHost(
- request_context, resource_context_->GetFileSystemContext()));
+ request_context,
+ ResourceContext::GetFileSystemContext(resource_context_)));
process_->GetHost()->AddFilter(new FileUtilitiesMessageFilter(
process_->GetData().id));
process_->GetHost()->AddFilter(new BlobMessageFilter(
- process_->GetData().id, resource_context_->GetBlobStorageContext()));
+ process_->GetData().id,
+ content::GetChromeBlobStorageContextForResourceContext(
+ resource_context_)));
process_->GetHost()->AddFilter(new MimeRegistryMessageFilter());
process_->GetHost()->AddFilter(new DatabaseMessageFilter(
- resource_context_->GetDatabaseTracker()));
+ content::GetDatabaseTrackerForResourceContext(resource_context_)));
SocketStreamDispatcherHost* socket_stream_dispatcher_host =
new SocketStreamDispatcherHost(
@@ -273,7 +282,8 @@
process_->GetHost()->AddFilter(
new content::WorkerDevToolsMessageFilter(process_->GetData().id));
process_->GetHost()->AddFilter(new IndexedDBDispatcherHost(
- process_->GetData().id, resource_context_->GetWebKitContext()));
+ process_->GetData().id,
+ content::GetWebKitContextForResourceContext(resource_context_)));
}
void WorkerProcessHost::CreateWorker(const WorkerInstance& instance) {
« no previous file with comments | « content/browser/resource_context_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698