| Index: content/browser/fileapi/browser_file_system_helper.cc
|
| diff --git a/content/browser/fileapi/browser_file_system_helper.cc b/content/browser/fileapi/browser_file_system_helper.cc
|
| index 485d96afcba2679de90537a0c45e218ab5f5f2d9..db78062c53c53faa36eb779a7674ba2b5ff4f8a7 100644
|
| --- a/content/browser/fileapi/browser_file_system_helper.cc
|
| +++ b/content/browser/fileapi/browser_file_system_helper.cc
|
| @@ -20,10 +20,16 @@
|
| #include "webkit/fileapi/file_permission_policy.h"
|
| #include "webkit/fileapi/file_system_options.h"
|
| #include "webkit/fileapi/file_system_task_runners.h"
|
| +#include "webkit/fileapi/isolated_context.h"
|
| #include "webkit/fileapi/local_file_system_operation.h"
|
| +#include "webkit/fileapi/mount_points.h"
|
| #include "webkit/fileapi/sandbox_mount_point_provider.h"
|
| #include "webkit/quota/quota_manager.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "webkit/chromeos/fileapi/cros_mount_point_provider.h"
|
| +#endif
|
| +
|
| namespace content {
|
|
|
| namespace {
|
| @@ -47,10 +53,11 @@ FileSystemOptions CreateBrowserFileSystemOptions(bool is_incognito) {
|
| } // namespace
|
|
|
| scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
|
| - const base::FilePath& profile_path, bool is_incognito,
|
| - fileapi::ExternalMountPoints* external_mount_points,
|
| - quota::SpecialStoragePolicy* special_storage_policy,
|
| - quota::QuotaManagerProxy* quota_manager_proxy) {
|
| + const base::FilePath& partition_path,
|
| + bool is_incognito,
|
| + fileapi::ExternalMountPoints* external_mount_points,
|
| + quota::SpecialStoragePolicy* special_storage_policy,
|
| + quota::QuotaManagerProxy* quota_manager_proxy) {
|
| base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool();
|
| base::SequencedWorkerPool::SequenceToken media_sequence_token =
|
| pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName);
|
| @@ -61,13 +68,32 @@ scoped_refptr<fileapi::FileSystemContext> CreateFileSystemContext(
|
| BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
|
| pool->GetSequencedTaskRunner(media_sequence_token)));
|
|
|
| + fileapi::FileSystemOptions options(
|
| + CreateBrowserFileSystemOptions(is_incognito));
|
| +
|
| + // Setting up mount points.
|
| + std::vector<fileapi::MountPoints*> additional_mount_points;
|
| + if (external_mount_points)
|
| + additional_mount_points.push_back(external_mount_points);
|
| +
|
| + // Setting up additional mount point providers.
|
| + ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers;
|
| +#if defined(OS_CHROMEOS)
|
| + // TODO(kinuko): Move this to chrome/.
|
| + additional_providers.push_back(
|
| + new chromeos::CrosMountPointProvider(
|
| + special_storage_policy,
|
| + external_mount_points,
|
| + fileapi::ExternalMountPoints::GetSystemInstance()));
|
| +#endif
|
| +
|
| return new fileapi::FileSystemContext(
|
| task_runners.Pass(),
|
| - external_mount_points,
|
| - special_storage_policy,
|
| quota_manager_proxy,
|
| - profile_path,
|
| - CreateBrowserFileSystemOptions(is_incognito));
|
| + additional_providers.Pass(),
|
| + additional_mount_points,
|
| + partition_path,
|
| + options);
|
| }
|
|
|
| bool CheckFileSystemPermissionsForProcess(
|
|
|