| 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/sandbox_mount_point_provider.h" | 5 #include "webkit/fileapi/sandbox_mount_point_provider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 return sandbox_file_util_.get(); | 419 return sandbox_file_util_.get(); |
| 420 } | 420 } |
| 421 | 421 |
| 422 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( | 422 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( |
| 423 const FilePath& virtual_path) const { | 423 const FilePath& virtual_path) const { |
| 424 // We simply return the very top directory of the sandbox | 424 // We simply return the very top directory of the sandbox |
| 425 // filesystem regardless of the input path. | 425 // filesystem regardless of the input path. |
| 426 return new_base_path(); | 426 return new_base_path(); |
| 427 } | 427 } |
| 428 | 428 |
| 429 FileSystemOperationInterface* | 429 FileSystemOperation* SandboxMountPointProvider::CreateFileSystemOperation( |
| 430 SandboxMountPointProvider::CreateFileSystemOperation( | |
| 431 const FileSystemURL& url, | 430 const FileSystemURL& url, |
| 432 FileSystemContext* context) const { | 431 FileSystemContext* context) const { |
| 433 scoped_ptr<FileSystemOperationContext> operation_context( | 432 scoped_ptr<FileSystemOperationContext> operation_context( |
| 434 new FileSystemOperationContext(context)); | 433 new FileSystemOperationContext(context)); |
| 435 return new LocalFileSystemOperation(context, operation_context.Pass()); | 434 return new LocalFileSystemOperation(context, operation_context.Pass()); |
| 436 } | 435 } |
| 437 | 436 |
| 438 webkit_blob::FileStreamReader* | 437 webkit_blob::FileStreamReader* |
| 439 SandboxMountPointProvider::CreateFileStreamReader( | 438 SandboxMountPointProvider::CreateFileStreamReader( |
| 440 const FileSystemURL& url, | 439 const FileSystemURL& url, |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 break; | 749 break; |
| 751 case base::PLATFORM_FILE_ERROR_FAILED: | 750 case base::PLATFORM_FILE_ERROR_FAILED: |
| 752 default: | 751 default: |
| 753 REPORT(kUnknownError); | 752 REPORT(kUnknownError); |
| 754 break; | 753 break; |
| 755 } | 754 } |
| 756 #undef REPORT | 755 #undef REPORT |
| 757 } | 756 } |
| 758 | 757 |
| 759 } // namespace fileapi | 758 } // namespace fileapi |
| OLD | NEW |