OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/chromeos/fileapi/file_system_backend.h" | 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 mount_points_->AddMountPointInfosTo(&mount_points); | 201 mount_points_->AddMountPointInfosTo(&mount_points); |
202 system_mount_points_->AddMountPointInfosTo(&mount_points); | 202 system_mount_points_->AddMountPointInfosTo(&mount_points); |
203 | 203 |
204 std::vector<base::FilePath> root_dirs; | 204 std::vector<base::FilePath> root_dirs; |
205 for (size_t i = 0; i < mount_points.size(); ++i) | 205 for (size_t i = 0; i < mount_points.size(); ++i) |
206 root_dirs.push_back(mount_points[i].path); | 206 root_dirs.push_back(mount_points[i].path); |
207 return root_dirs; | 207 return root_dirs; |
208 } | 208 } |
209 | 209 |
210 fileapi::FileSystemFileUtil* FileSystemBackend::GetFileUtil( | 210 fileapi::FileSystemFileUtil* FileSystemBackend::GetFileUtil( |
211 fileapi::FileSystemType type) { | 211 fileapi::FileSystemType type, |
| 212 const fileapi::FileSystemContext* context) { |
212 DCHECK(type == fileapi::kFileSystemTypeNativeLocal || | 213 DCHECK(type == fileapi::kFileSystemTypeNativeLocal || |
213 type == fileapi::kFileSystemTypeRestrictedNativeLocal); | 214 type == fileapi::kFileSystemTypeRestrictedNativeLocal); |
214 return local_file_util_->sync_file_util(); | 215 return local_file_util_->sync_file_util(); |
215 } | 216 } |
216 | 217 |
217 fileapi::AsyncFileUtil* FileSystemBackend::GetAsyncFileUtil( | 218 fileapi::AsyncFileUtil* FileSystemBackend::GetAsyncFileUtil( |
218 fileapi::FileSystemType type) { | 219 fileapi::FileSystemType type, |
| 220 const fileapi::FileSystemContext* context) { |
219 if (type == fileapi::kFileSystemTypeDrive) | 221 if (type == fileapi::kFileSystemTypeDrive) |
220 return drive_delegate_->GetAsyncFileUtil(type); | 222 return drive_delegate_->GetAsyncFileUtil(type); |
221 | 223 |
222 DCHECK(type == fileapi::kFileSystemTypeNativeLocal || | 224 DCHECK(type == fileapi::kFileSystemTypeNativeLocal || |
223 type == fileapi::kFileSystemTypeRestrictedNativeLocal); | 225 type == fileapi::kFileSystemTypeRestrictedNativeLocal); |
224 return local_file_util_.get(); | 226 return local_file_util_.get(); |
225 } | 227 } |
226 | 228 |
227 fileapi::CopyOrMoveFileValidatorFactory* | 229 fileapi::CopyOrMoveFileValidatorFactory* |
228 FileSystemBackend::GetCopyOrMoveFileValidatorFactory( | 230 FileSystemBackend::GetCopyOrMoveFileValidatorFactory( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 std::string mount_name = url.filesystem_id(); | 317 std::string mount_name = url.filesystem_id(); |
316 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && | 318 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && |
317 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { | 319 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { |
318 return base::FilePath(); | 320 return base::FilePath(); |
319 } | 321 } |
320 | 322 |
321 return root_path.DirName(); | 323 return root_path.DirName(); |
322 } | 324 } |
323 | 325 |
324 } // namespace chromeos | 326 } // namespace chromeos |
OLD | NEW |