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/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 | 812 |
813 void FileSystem::OnCacheFileUploadNeededByOperation( | 813 void FileSystem::OnCacheFileUploadNeededByOperation( |
814 const std::string& local_id) { | 814 const std::string& local_id) { |
815 sync_client_->AddUploadTask(ClientContext(USER_INITIATED), local_id); | 815 sync_client_->AddUploadTask(ClientContext(USER_INITIATED), local_id); |
816 } | 816 } |
817 | 817 |
818 void FileSystem::OnEntryUpdatedByOperation(const std::string& local_id) { | 818 void FileSystem::OnEntryUpdatedByOperation(const std::string& local_id) { |
819 sync_client_->AddUpdateTask(local_id); | 819 sync_client_->AddUpdateTask(local_id); |
820 } | 820 } |
821 | 821 |
| 822 void FileSystem::OnDriveSyncError(file_system::DriveSyncErrorType type) { |
| 823 FOR_EACH_OBSERVER(FileSystemObserver, |
| 824 observers_, |
| 825 OnDriveSyncError(type)); |
| 826 } |
| 827 |
822 void FileSystem::OnDirectoryChanged(const base::FilePath& directory_path) { | 828 void FileSystem::OnDirectoryChanged(const base::FilePath& directory_path) { |
823 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 829 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
824 | 830 |
825 FOR_EACH_OBSERVER(FileSystemObserver, observers_, | 831 FOR_EACH_OBSERVER(FileSystemObserver, observers_, |
826 OnDirectoryChanged(directory_path)); | 832 OnDirectoryChanged(directory_path)); |
827 } | 833 } |
828 | 834 |
829 void FileSystem::OnLoadFromServerComplete() { | 835 void FileSystem::OnLoadFromServerComplete() { |
830 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 836 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
831 | 837 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 OpenMode open_mode, | 932 OpenMode open_mode, |
927 const std::string& mime_type, | 933 const std::string& mime_type, |
928 const OpenFileCallback& callback) { | 934 const OpenFileCallback& callback) { |
929 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 935 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
930 DCHECK(!callback.is_null()); | 936 DCHECK(!callback.is_null()); |
931 | 937 |
932 open_file_operation_->OpenFile(file_path, open_mode, mime_type, callback); | 938 open_file_operation_->OpenFile(file_path, open_mode, mime_type, callback); |
933 } | 939 } |
934 | 940 |
935 } // namespace drive | 941 } // namespace drive |
OLD | NEW |