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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 10909182: Make FileSystemContext respect StoragePartitions. filesystem:// urls will be properly isolated (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove useless headers. Created 8 years, 3 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
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8ea4adf249ffb32df7ba44692a94b2e1432fdb17..61ab2f4dbe5ac8845332efbb3ecc31ee5b5bd356 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -354,7 +354,7 @@ RenderProcessHostImpl::RenderProcessHostImpl(
// requests them.
// This is for the filesystem sandbox.
ChildProcessSecurityPolicyImpl::GetInstance()->GrantPermissionsForFile(
- GetID(), browser_context->GetPath().Append(
+ GetID(), storage_partition_impl->GetPath().Append(
fileapi::SandboxMountPointProvider::kNewFileSystemDirectory),
base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_CREATE |
@@ -371,14 +371,14 @@ RenderProcessHostImpl::RenderProcessHostImpl(
// This is so that we can read and move stuff out of the old filesystem
// sandbox.
ChildProcessSecurityPolicyImpl::GetInstance()->GrantPermissionsForFile(
- GetID(), browser_context->GetPath().Append(
+ GetID(), storage_partition_impl_->GetPath().Append(
fileapi::SandboxMountPointProvider::kOldFileSystemDirectory),
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(
- GetID(), browser_context->GetPath().Append(
+ GetID(), storage_partition_impl_->GetPath().Append(
fileapi::SandboxMountPointProvider::kRenamedOldFileSystemDirectory),
base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE);
@@ -562,22 +562,24 @@ void RenderProcessHostImpl::CreateMessageFilters() {
#endif
channel_->AddFilter(
GetContentClient()->browser()->AllowPepperPrivateFileAPI() ?
- new PepperUnsafeFileMessageFilter(GetID(), browser_context->GetPath()) :
- new PepperFileMessageFilter(GetID()));
+ new PepperUnsafeFileMessageFilter(
+ GetID(),
+ storage_partition_impl_->GetPath()) :
+ new PepperFileMessageFilter(GetID()));
channel_->AddFilter(new PepperMessageFilter(PepperMessageFilter::RENDERER,
GetID(), browser_context));
#if defined(ENABLE_INPUT_SPEECH)
channel_->AddFilter(new speech::InputTagSpeechDispatcherHost(
- GetID(), browser_context->GetRequestContext(),
+ GetID(), storage_partition_impl_->GetURLRequestContext(),
browser_context->GetSpeechRecognitionPreferences()));
channel_->AddFilter(new speech::SpeechRecognitionDispatcherHost(
- GetID(), browser_context->GetRequestContext(),
+ GetID(), storage_partition_impl_->GetURLRequestContext(),
browser_context->GetSpeechRecognitionPreferences()));
#endif
channel_->AddFilter(new FileAPIMessageFilter(
GetID(),
- browser_context->GetRequestContext(),
- BrowserContext::GetFileSystemContext(browser_context),
+ storage_partition_impl_->GetURLRequestContext(),
+ storage_partition_impl_->GetFileSystemContext(),
ChromeBlobStorageContext::GetFor(browser_context)));
channel_->AddFilter(new OrientationMessageFilter());
channel_->AddFilter(new FileUtilitiesMessageFilter(GetID()));
@@ -601,6 +603,8 @@ void RenderProcessHostImpl::CreateMessageFilters() {
GetID(),
resource_context,
WorkerStoragePartition(
+ storage_partition_impl_->GetURLRequestContext(),
+ storage_partition_impl_->GetMediaURLRequestContext(),
storage_partition_impl_->GetAppCacheService(),
storage_partition_impl_->GetFileSystemContext(),
storage_partition_impl_->GetDatabaseTracker(),
« no previous file with comments | « content/browser/download/download_manager_impl_unittest.cc ('k') | content/browser/resource_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698