| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 | 441 |
| 442 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( | 442 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( |
| 443 const FilePath& virtual_path) const { | 443 const FilePath& virtual_path) const { |
| 444 // We simply return the very top directory of the sandbox | 444 // We simply return the very top directory of the sandbox |
| 445 // filesystem regardless of the input path. | 445 // filesystem regardless of the input path. |
| 446 return new_base_path(); | 446 return new_base_path(); |
| 447 } | 447 } |
| 448 | 448 |
| 449 FileSystemOperation* SandboxMountPointProvider::CreateFileSystemOperation( | 449 FileSystemOperation* SandboxMountPointProvider::CreateFileSystemOperation( |
| 450 const FileSystemURL& url, | 450 const FileSystemURL& url, |
| 451 FileSystemContext* context) const { | 451 FileSystemContext* context, |
| 452 base::PlatformFileError* error_code) const { |
| 452 scoped_ptr<FileSystemOperationContext> operation_context( | 453 scoped_ptr<FileSystemOperationContext> operation_context( |
| 453 new FileSystemOperationContext(context)); | 454 new FileSystemOperationContext(context)); |
| 454 | 455 |
| 455 // Copy the observer lists (assuming we only have small number of observers). | 456 // Copy the observer lists (assuming we only have small number of observers). |
| 456 operation_context->set_update_observers(update_observers_); | 457 operation_context->set_update_observers(update_observers_); |
| 457 operation_context->set_access_observers(access_observers_); | 458 operation_context->set_access_observers(access_observers_); |
| 458 | 459 |
| 459 return new LocalFileSystemOperation(context, operation_context.Pass()); | 460 return new LocalFileSystemOperation(context, operation_context.Pass()); |
| 460 } | 461 } |
| 461 | 462 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 i < file_system_options_.additional_allowed_schemes().size(); | 733 i < file_system_options_.additional_allowed_schemes().size(); |
| 733 ++i) { | 734 ++i) { |
| 734 if (url.SchemeIs( | 735 if (url.SchemeIs( |
| 735 file_system_options_.additional_allowed_schemes()[i].c_str())) | 736 file_system_options_.additional_allowed_schemes()[i].c_str())) |
| 736 return true; | 737 return true; |
| 737 } | 738 } |
| 738 return false; | 739 return false; |
| 739 } | 740 } |
| 740 | 741 |
| 741 } // namespace fileapi | 742 } // namespace fileapi |
| OLD | NEW |