Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/fileapi/file_system_context.h" | 5 #include "webkit/fileapi/file_system_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, | 39 void DidOpenFileSystem(FileSystemContext::OpenFileSystemCallback callback, |
| 40 const GURL& filesystem_root, | 40 const GURL& filesystem_root, |
| 41 const std::string& filesystem_name, | 41 const std::string& filesystem_name, |
| 42 base::PlatformFileError error) { | 42 base::PlatformFileError error) { |
| 43 callback.Run(error, filesystem_name, filesystem_root); | 43 callback.Run(error, filesystem_name, filesystem_root); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // anonymous namespace | 46 } // anonymous namespace |
| 47 | 47 |
| 48 FileSystemContext::FileSystemContext( | 48 FileSystemContext::FileSystemContext( |
| 49 base::SequencedTaskRunner* media_task_runner, | |
| 49 base::SequencedTaskRunner* file_task_runner, | 50 base::SequencedTaskRunner* file_task_runner, |
| 50 base::SingleThreadTaskRunner* io_task_runner, | 51 base::SingleThreadTaskRunner* io_task_runner, |
| 51 quota::SpecialStoragePolicy* special_storage_policy, | 52 quota::SpecialStoragePolicy* special_storage_policy, |
| 52 quota::QuotaManagerProxy* quota_manager_proxy, | 53 quota::QuotaManagerProxy* quota_manager_proxy, |
| 53 const FilePath& profile_path, | 54 const FilePath& profile_path, |
| 54 const FileSystemOptions& options) | 55 const FileSystemOptions& options) |
| 55 : file_task_runner_(file_task_runner), | 56 : file_task_runner_(file_task_runner), |
| 56 io_task_runner_(io_task_runner), | 57 io_task_runner_(io_task_runner), |
| 57 quota_manager_proxy_(quota_manager_proxy), | 58 quota_manager_proxy_(quota_manager_proxy), |
| 58 sandbox_provider_( | 59 sandbox_provider_( |
| 59 new SandboxMountPointProvider( | 60 new SandboxMountPointProvider( |
| 60 file_task_runner, | 61 file_task_runner, |
| 61 profile_path, | 62 profile_path, |
| 62 options)), | 63 options)), |
| 63 isolated_provider_(new IsolatedMountPointProvider) { | 64 isolated_provider_(new IsolatedMountPointProvider(media_task_runner)) { |
|
kinuko
2012/08/02 21:12:46
I may prefer keeping this task_runner as a field o
tzik
2012/08/03 22:29:19
Done. Moved to FileSystemTaskRunners.
| |
| 64 if (quota_manager_proxy) { | 65 if (quota_manager_proxy) { |
| 65 quota_manager_proxy->RegisterClient(CreateQuotaClient( | 66 quota_manager_proxy->RegisterClient(CreateQuotaClient( |
| 66 this, options.is_incognito())); | 67 this, options.is_incognito())); |
| 67 } | 68 } |
| 68 #if defined(OS_CHROMEOS) | 69 #if defined(OS_CHROMEOS) |
| 69 external_provider_.reset( | 70 external_provider_.reset( |
| 70 new chromeos::CrosMountPointProvider(special_storage_policy)); | 71 new chromeos::CrosMountPointProvider(special_storage_policy)); |
| 71 #endif | 72 #endif |
| 72 } | 73 } |
| 73 | 74 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 if (!io_task_runner_->RunsTasksOnCurrentThread() && | 207 if (!io_task_runner_->RunsTasksOnCurrentThread() && |
| 207 io_task_runner_->DeleteSoon(FROM_HERE, this)) { | 208 io_task_runner_->DeleteSoon(FROM_HERE, this)) { |
| 208 return; | 209 return; |
| 209 } | 210 } |
| 210 STLDeleteContainerPairSecondPointers(provider_map_.begin(), | 211 STLDeleteContainerPairSecondPointers(provider_map_.begin(), |
| 211 provider_map_.end()); | 212 provider_map_.end()); |
| 212 delete this; | 213 delete this; |
| 213 } | 214 } |
| 214 | 215 |
| 215 } // namespace fileapi | 216 } // namespace fileapi |
| OLD | NEW |