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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 if (url.type() == fileapi::kFileSystemTypeDrive) | 304 if (url.type() == fileapi::kFileSystemTypeDrive) |
305 return drive_delegate_->CreateFileStreamWriter(url, offset, context); | 305 return drive_delegate_->CreateFileStreamWriter(url, offset, context); |
306 | 306 |
307 if (url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal) | 307 if (url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal) |
308 return scoped_ptr<fileapi::FileStreamWriter>(); | 308 return scoped_ptr<fileapi::FileStreamWriter>(); |
309 | 309 |
310 DCHECK(url.type() == fileapi::kFileSystemTypeNativeLocal); | 310 DCHECK(url.type() == fileapi::kFileSystemTypeNativeLocal); |
311 return scoped_ptr<fileapi::FileStreamWriter>( | 311 return scoped_ptr<fileapi::FileStreamWriter>( |
312 fileapi::FileStreamWriter::CreateForLocalFile( | 312 fileapi::FileStreamWriter::CreateForLocalFile( |
313 context->default_file_task_runner(), url.path(), offset, | 313 context->default_file_task_runner(), url.path(), offset)); |
314 fileapi::FileStreamWriter::OPEN_EXISTING_FILE)); | |
315 } | 314 } |
316 | 315 |
317 bool FileSystemBackend::GetVirtualPath( | 316 bool FileSystemBackend::GetVirtualPath( |
318 const base::FilePath& filesystem_path, | 317 const base::FilePath& filesystem_path, |
319 base::FilePath* virtual_path) { | 318 base::FilePath* virtual_path) { |
320 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || | 319 return mount_points_->GetVirtualPath(filesystem_path, virtual_path) || |
321 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); | 320 system_mount_points_->GetVirtualPath(filesystem_path, virtual_path); |
322 } | 321 } |
323 | 322 |
324 } // namespace chromeos | 323 } // namespace chromeos |
OLD | NEW |