| 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.h" | 5 #include "chrome/browser/chromeos/drive/file_system.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/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 10 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 file_system::DriveSyncErrorType type, | 820 file_system::DriveSyncErrorType type, |
| 821 const base::FilePath* file_path, | 821 const base::FilePath* file_path, |
| 822 FileError error) { | 822 FileError error) { |
| 823 if (error != FILE_ERROR_OK) | 823 if (error != FILE_ERROR_OK) |
| 824 return; | 824 return; |
| 825 FOR_EACH_OBSERVER(FileSystemObserver, | 825 FOR_EACH_OBSERVER(FileSystemObserver, |
| 826 observers_, | 826 observers_, |
| 827 OnDriveSyncError(type, *file_path)); | 827 OnDriveSyncError(type, *file_path)); |
| 828 } | 828 } |
| 829 | 829 |
| 830 bool FileSystem::WaitForSyncComplete(const std::string& local_id, |
| 831 const FileOperationCallback& callback) { |
| 832 return sync_client_->WaitForUpdateTaskToComplete(local_id, callback); |
| 833 } |
| 834 |
| 830 void FileSystem::OnDirectoryReloaded(const base::FilePath& directory_path) { | 835 void FileSystem::OnDirectoryReloaded(const base::FilePath& directory_path) { |
| 831 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 836 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 832 | 837 |
| 833 FOR_EACH_OBSERVER( | 838 FOR_EACH_OBSERVER( |
| 834 FileSystemObserver, observers_, OnDirectoryChanged(directory_path)); | 839 FileSystemObserver, observers_, OnDirectoryChanged(directory_path)); |
| 835 } | 840 } |
| 836 | 841 |
| 837 void FileSystem::OnFileChanged(const FileChange& changed_files) { | 842 void FileSystem::OnFileChanged(const FileChange& changed_files) { |
| 838 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 843 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 839 | 844 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 FROM_HERE, | 989 FROM_HERE, |
| 985 base::Bind(&GetPathFromResourceIdOnBlockingPool, | 990 base::Bind(&GetPathFromResourceIdOnBlockingPool, |
| 986 resource_metadata_, | 991 resource_metadata_, |
| 987 resource_id, | 992 resource_id, |
| 988 file_path), | 993 file_path), |
| 989 base::Bind(&GetPathFromResourceIdAfterGetPath, | 994 base::Bind(&GetPathFromResourceIdAfterGetPath, |
| 990 base::Owned(file_path), | 995 base::Owned(file_path), |
| 991 callback)); | 996 callback)); |
| 992 } | 997 } |
| 993 } // namespace drive | 998 } // namespace drive |
| OLD | NEW |