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 "chrome/browser/chromeos/drive/file_system_proxy.h" | 5 #include "chrome/browser/chromeos/drive/file_system_proxy.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 return scoped_ptr<webkit_blob::FileStreamReader>( | 376 return scoped_ptr<webkit_blob::FileStreamReader>( |
377 new internal::WebkitFileStreamReaderImpl( | 377 new internal::WebkitFileStreamReaderImpl( |
378 base::Bind(&FileSystemProxy::GetFileSystemOnUIThread, this), | 378 base::Bind(&FileSystemProxy::GetFileSystemOnUIThread, this), |
379 file_task_runner, | 379 file_task_runner, |
380 drive_file_path, | 380 drive_file_path, |
381 offset, | 381 offset, |
382 expected_modification_time)); | 382 expected_modification_time)); |
383 } | 383 } |
384 | 384 |
385 FileSystemProxy::~FileSystemProxy() { | 385 FileSystemProxy::~FileSystemProxy() { |
386 // Should be deleted from the CrosMountPointProvider on UI thread. | 386 // Should be deleted from the FileSystemBackend on UI thread. |
387 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 387 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
388 } | 388 } |
389 | 389 |
390 // static. | 390 // static. |
391 bool FileSystemProxy::ValidateUrl( | 391 bool FileSystemProxy::ValidateUrl( |
392 const FileSystemURL& url, base::FilePath* file_path) { | 392 const FileSystemURL& url, base::FilePath* file_path) { |
393 *file_path = util::ExtractDrivePathFromFileSystemUrl(url); | 393 *file_path = util::ExtractDrivePathFromFileSystemUrl(url); |
394 return !file_path->empty(); | 394 return !file_path->empty(); |
395 } | 395 } |
396 | 396 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 base::Bind(&internal::FileApiWorker::CloseFile, | 446 base::Bind(&internal::FileApiWorker::CloseFile, |
447 base::Unretained(worker_.get()), virtual_path)); | 447 base::Unretained(worker_.get()), virtual_path)); |
448 } | 448 } |
449 | 449 |
450 FileSystemInterface* FileSystemProxy::GetFileSystemOnUIThread() { | 450 FileSystemInterface* FileSystemProxy::GetFileSystemOnUIThread() { |
451 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 451 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
452 return file_system_; | 452 return file_system_; |
453 } | 453 } |
454 | 454 |
455 } // namespace drive | 455 } // namespace drive |
OLD | NEW |