| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/local_file_util.h" | 5 #include "webkit/fileapi/local_file_util.h" |
| 6 | 6 |
| 7 #include "base/file_util_proxy.h" | 7 #include "base/file_util_proxy.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "webkit/fileapi/file_system_context.h" | 9 #include "webkit/fileapi/file_system_context.h" |
| 10 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 10 #include "webkit/fileapi/file_system_operation_context.h" | 11 #include "webkit/fileapi/file_system_operation_context.h" |
| 11 #include "webkit/fileapi/file_system_path_manager.h" | |
| 12 #include "webkit/fileapi/file_system_types.h" | 12 #include "webkit/fileapi/file_system_types.h" |
| 13 #include "webkit/fileapi/file_system_util.h" | 13 #include "webkit/fileapi/file_system_util.h" |
| 14 | 14 |
| 15 namespace fileapi { | 15 namespace fileapi { |
| 16 | 16 |
| 17 class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { | 17 class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator { |
| 18 public: | 18 public: |
| 19 LocalFileEnumerator(const FilePath& platform_root_path, | 19 LocalFileEnumerator(const FilePath& platform_root_path, |
| 20 const FilePath& virtual_root_path, | 20 const FilePath& virtual_root_path, |
| 21 bool recursive, | 21 bool recursive, |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION; | 282 return base::PLATFORM_FILE_ERROR_INVALID_OPERATION; |
| 283 return underlying_file_util()->DeleteSingleDirectory( | 283 return underlying_file_util()->DeleteSingleDirectory( |
| 284 context, local_path); | 284 context, local_path); |
| 285 } | 285 } |
| 286 | 286 |
| 287 FilePath LocalFileUtil::GetLocalPath( | 287 FilePath LocalFileUtil::GetLocalPath( |
| 288 FileSystemOperationContext* context, | 288 FileSystemOperationContext* context, |
| 289 const GURL& origin_url, | 289 const GURL& origin_url, |
| 290 FileSystemType type, | 290 FileSystemType type, |
| 291 const FilePath& virtual_path) { | 291 const FilePath& virtual_path) { |
| 292 FilePath root = context->file_system_context()->path_manager()-> | 292 FilePath root = context->file_system_context()->GetMountPointProvider(type)-> |
| 293 ValidateFileSystemRootAndGetPathOnFileThread(origin_url, type, | 293 ValidateFileSystemRootAndGetPathOnFileThread(origin_url, type, |
| 294 virtual_path, false); | 294 virtual_path, false); |
| 295 if (root.empty()) | 295 if (root.empty()) |
| 296 return FilePath(); | 296 return FilePath(); |
| 297 return root.Append(virtual_path); | 297 return root.Append(virtual_path); |
| 298 } | 298 } |
| 299 | 299 |
| 300 } // namespace fileapi | 300 } // namespace fileapi |
| OLD | NEW |