| 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/gdata/gdata_file_system_proxy.h" | 5 #include "chrome/browser/chromeos/gdata/gdata_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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 | 632 |
| 633 GDataFileSystemProxy::~GDataFileSystemProxy() { | 633 GDataFileSystemProxy::~GDataFileSystemProxy() { |
| 634 // Should be deleted from the CrosMountPointProvider on UI thread. | 634 // Should be deleted from the CrosMountPointProvider on UI thread. |
| 635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 635 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 636 } | 636 } |
| 637 | 637 |
| 638 // static. | 638 // static. |
| 639 bool GDataFileSystemProxy::ValidateUrl( | 639 bool GDataFileSystemProxy::ValidateUrl( |
| 640 const FileSystemURL& url, FilePath* file_path) { | 640 const FileSystemURL& url, FilePath* file_path) { |
| 641 // what platform you're on. | 641 // what platform you're on. |
| 642 if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeExternal) { | 642 if (!url.is_valid() || url.type() != fileapi::kFileSystemTypeDrive) { |
| 643 return false; | 643 return false; |
| 644 } | 644 } |
| 645 *file_path = url.path(); | 645 *file_path = url.virtual_path(); |
| 646 return true; | 646 return true; |
| 647 } | 647 } |
| 648 | 648 |
| 649 void GDataFileSystemProxy::OnStatusCallback( | 649 void GDataFileSystemProxy::OnStatusCallback( |
| 650 const fileapi::FileSystemOperationInterface::StatusCallback& callback, | 650 const fileapi::FileSystemOperationInterface::StatusCallback& callback, |
| 651 GDataFileError error) { | 651 GDataFileError error) { |
| 652 callback.Run(util::GDataFileErrorToPlatformError(error)); | 652 callback.Run(util::GDataFileErrorToPlatformError(error)); |
| 653 } | 653 } |
| 654 | 654 |
| 655 void GDataFileSystemProxy::OnGetMetadata( | 655 void GDataFileSystemProxy::OnGetMetadata( |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 void GDataFileSystemProxy::CloseWritableSnapshotFile( | 733 void GDataFileSystemProxy::CloseWritableSnapshotFile( |
| 734 const FilePath& virtual_path, | 734 const FilePath& virtual_path, |
| 735 const FilePath& local_path) { | 735 const FilePath& local_path) { |
| 736 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 736 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 737 | 737 |
| 738 file_system_->CloseFile(virtual_path, | 738 file_system_->CloseFile(virtual_path, |
| 739 base::Bind(&EmitDebugLogForCloseFile, virtual_path)); | 739 base::Bind(&EmitDebugLogForCloseFile, virtual_path)); |
| 740 } | 740 } |
| 741 | 741 |
| 742 } // namespace gdata | 742 } // namespace gdata |
| OLD | NEW |