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

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: patch unittest fix from michael 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 89a6a8525c7600938c5fa098c40d4c708b6cc9cc..fcdfc5abcd05010dd9e162707bad5d5f46c5e249 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);
@@ -561,22 +561,23 @@ 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()) :
michaeln 2012/09/15 01:48:33 line length
awong 2012/09/15 02:05:02 Done.
+ 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()));
@@ -600,6 +601,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(),

Powered by Google App Engine
This is Rietveld 408576698