| 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" |
| 11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 #include "webkit/fileapi/file_system_file_util.h" | 12 #include "webkit/fileapi/file_system_file_util.h" |
| 13 #include "webkit/fileapi/file_system_operation_interface.h" | 13 #include "webkit/fileapi/file_system_operation.h" |
| 14 #include "webkit/fileapi/file_system_options.h" | 14 #include "webkit/fileapi/file_system_options.h" |
| 15 #include "webkit/fileapi/file_system_quota_client.h" | 15 #include "webkit/fileapi/file_system_quota_client.h" |
| 16 #include "webkit/fileapi/file_system_task_runners.h" | 16 #include "webkit/fileapi/file_system_task_runners.h" |
| 17 #include "webkit/fileapi/file_system_url.h" | 17 #include "webkit/fileapi/file_system_url.h" |
| 18 #include "webkit/fileapi/file_system_util.h" | 18 #include "webkit/fileapi/file_system_util.h" |
| 19 #include "webkit/fileapi/isolated_mount_point_provider.h" | 19 #include "webkit/fileapi/isolated_mount_point_provider.h" |
| 20 #include "webkit/fileapi/sandbox_mount_point_provider.h" | 20 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 21 #include "webkit/quota/quota_manager.h" | 21 #include "webkit/quota/quota_manager.h" |
| 22 #include "webkit/quota/special_storage_policy.h" | 22 #include "webkit/quota/special_storage_policy.h" |
| 23 | 23 |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 FileSystemMountPointProvider* mount_point_provider = | 175 FileSystemMountPointProvider* mount_point_provider = |
| 176 GetMountPointProvider(type); | 176 GetMountPointProvider(type); |
| 177 if (!mount_point_provider) { | 177 if (!mount_point_provider) { |
| 178 callback.Run(base::PLATFORM_FILE_ERROR_SECURITY); | 178 callback.Run(base::PLATFORM_FILE_ERROR_SECURITY); |
| 179 return; | 179 return; |
| 180 } | 180 } |
| 181 | 181 |
| 182 mount_point_provider->DeleteFileSystem(origin_url, type, this, callback); | 182 mount_point_provider->DeleteFileSystem(origin_url, type, this, callback); |
| 183 } | 183 } |
| 184 | 184 |
| 185 FileSystemOperationInterface* FileSystemContext::CreateFileSystemOperation( | 185 FileSystemOperation* FileSystemContext::CreateFileSystemOperation( |
| 186 const FileSystemURL& url) { | 186 const FileSystemURL& url) { |
| 187 if (!url.is_valid()) | 187 if (!url.is_valid()) |
| 188 return NULL; | 188 return NULL; |
| 189 FileSystemMountPointProvider* mount_point_provider = | 189 FileSystemMountPointProvider* mount_point_provider = |
| 190 GetMountPointProvider(url.type()); | 190 GetMountPointProvider(url.type()); |
| 191 if (!mount_point_provider) | 191 if (!mount_point_provider) |
| 192 return NULL; | 192 return NULL; |
| 193 return mount_point_provider->CreateFileSystemOperation(url, this); | 193 return mount_point_provider->CreateFileSystemOperation(url, this); |
| 194 } | 194 } |
| 195 | 195 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 219 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() && | 219 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() && |
| 220 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) { | 220 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) { |
| 221 return; | 221 return; |
| 222 } | 222 } |
| 223 STLDeleteContainerPairSecondPointers(provider_map_.begin(), | 223 STLDeleteContainerPairSecondPointers(provider_map_.begin(), |
| 224 provider_map_.end()); | 224 provider_map_.end()); |
| 225 delete this; | 225 delete this; |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace fileapi | 228 } // namespace fileapi |
| OLD | NEW |