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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 412 |
413 for (size_t i = 0; i < arraysize(kRestrictedChars); ++i) { | 413 for (size_t i = 0; i < arraysize(kRestrictedChars); ++i) { |
414 if (filename.value().find(kRestrictedChars[i]) != | 414 if (filename.value().find(kRestrictedChars[i]) != |
415 FilePath::StringType::npos) | 415 FilePath::StringType::npos) |
416 return true; | 416 return true; |
417 } | 417 } |
418 | 418 |
419 return false; | 419 return false; |
420 } | 420 } |
421 | 421 |
422 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil() { | 422 FileSystemFileUtil* SandboxMountPointProvider::GetFileUtil( |
| 423 FileSystemType type) { |
423 return sandbox_file_util_.get(); | 424 return sandbox_file_util_.get(); |
424 } | 425 } |
425 | 426 |
426 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( | 427 FilePath SandboxMountPointProvider::GetPathForPermissionsCheck( |
427 const FilePath& virtual_path) const { | 428 const FilePath& virtual_path) const { |
428 // We simply return the very top directory of the sandbox | 429 // We simply return the very top directory of the sandbox |
429 // filesystem regardless of the input path. | 430 // filesystem regardless of the input path. |
430 return new_base_path(); | 431 return new_base_path(); |
431 } | 432 } |
432 | 433 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 break; | 731 break; |
731 case base::PLATFORM_FILE_ERROR_FAILED: | 732 case base::PLATFORM_FILE_ERROR_FAILED: |
732 default: | 733 default: |
733 REPORT(kUnknownError); | 734 REPORT(kUnknownError); |
734 break; | 735 break; |
735 } | 736 } |
736 #undef REPORT | 737 #undef REPORT |
737 } | 738 } |
738 | 739 |
739 } // namespace fileapi | 740 } // namespace fileapi |
OLD | NEW |