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/browser/fileapi/sandbox_file_system_backend.h" | 5 #include "webkit/browser/fileapi/sandbox_file_system_backend.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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // TODO(kinuko): return an isolated temporary directory. | 79 // TODO(kinuko): return an isolated temporary directory. |
80 callback.Run(GURL(), std::string(), base::PLATFORM_FILE_ERROR_SECURITY); | 80 callback.Run(GURL(), std::string(), base::PLATFORM_FILE_ERROR_SECURITY); |
81 return; | 81 return; |
82 } | 82 } |
83 | 83 |
84 delegate_->OpenFileSystem( | 84 delegate_->OpenFileSystem( |
85 origin_url, type, mode, callback, | 85 origin_url, type, mode, callback, |
86 GetFileSystemRootURI(origin_url, type)); | 86 GetFileSystemRootURI(origin_url, type)); |
87 } | 87 } |
88 | 88 |
89 FileSystemFileUtil* SandboxFileSystemBackend::GetFileUtil( | |
90 FileSystemType type) { | |
91 return delegate_->sync_file_util(); | |
92 } | |
93 | |
94 AsyncFileUtil* SandboxFileSystemBackend::GetAsyncFileUtil( | 89 AsyncFileUtil* SandboxFileSystemBackend::GetAsyncFileUtil( |
95 FileSystemType type) { | 90 FileSystemType type) { |
96 DCHECK(delegate_); | 91 DCHECK(delegate_); |
97 return delegate_->file_util(); | 92 return delegate_->file_util(); |
98 } | 93 } |
99 | 94 |
100 CopyOrMoveFileValidatorFactory* | 95 CopyOrMoveFileValidatorFactory* |
101 SandboxFileSystemBackend::GetCopyOrMoveFileValidatorFactory( | 96 SandboxFileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
102 FileSystemType type, | 97 FileSystemType type, |
103 base::PlatformFileError* error_code) { | 98 base::PlatformFileError* error_code) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 return delegate_; | 149 return delegate_; |
155 } | 150 } |
156 | 151 |
157 SandboxFileSystemBackendDelegate::OriginEnumerator* | 152 SandboxFileSystemBackendDelegate::OriginEnumerator* |
158 SandboxFileSystemBackend::CreateOriginEnumerator() { | 153 SandboxFileSystemBackend::CreateOriginEnumerator() { |
159 DCHECK(delegate_); | 154 DCHECK(delegate_); |
160 return delegate_->CreateOriginEnumerator(); | 155 return delegate_->CreateOriginEnumerator(); |
161 } | 156 } |
162 | 157 |
163 } // namespace fileapi | 158 } // namespace fileapi |
OLD | NEW |