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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 const GDataEntryProto* entry_proto); | 780 const GDataEntryProto* entry_proto); |
781 | 781 |
782 // Called when GDataCache::GetFileOnUIThread() is completed for | 782 // Called when GDataCache::GetFileOnUIThread() is completed for |
783 // UpdateFileByResourceId(). | 783 // UpdateFileByResourceId(). |
784 void OnGetFileCompleteForUpdateFile( | 784 void OnGetFileCompleteForUpdateFile( |
785 const FileOperationCallback& callback, | 785 const FileOperationCallback& callback, |
786 GDataFileError error, | 786 GDataFileError error, |
787 const std::string& resource_id, | 787 const std::string& resource_id, |
788 const std::string& md5, | 788 const std::string& md5, |
789 const FilePath& cache_file_path); | 789 const FilePath& cache_file_path); |
| 790 |
790 // Callback for getting the size of the cache file in the blocking pool. | 791 // Callback for getting the size of the cache file in the blocking pool. |
791 void OnGetFileSizeCompleteForUpdateFile( | 792 void OnGetFileSizeCompleteForUpdateFile( |
792 const FileOperationCallback& callback, | 793 const FileOperationCallback& callback, |
793 const std::string& resource_id, | 794 const std::string& resource_id, |
794 const std::string& md5, | 795 const std::string& md5, |
795 const FilePath& cache_file_path, | 796 const FilePath& cache_file_path, |
796 GDataFileError* error, | 797 GDataFileError* error, |
797 int64* file_size); | 798 int64* file_size); |
| 799 |
798 // Callback for GDataRootDirectory::GetEntryByResourceIdAsync. | 800 // Callback for GDataRootDirectory::GetEntryByResourceIdAsync. |
799 void OnGetFileCompleteForUpdateFileByEntry( | 801 void OnGetFileCompleteForUpdateFileByEntry( |
800 const FileOperationCallback& callback, | 802 const FileOperationCallback& callback, |
801 const std::string& md5, | 803 const std::string& md5, |
802 int64 file_size, | 804 int64 file_size, |
803 const FilePath& cache_file_path, | 805 const FilePath& cache_file_path, |
804 GDataEntry* entry); | 806 GDataEntry* entry); |
805 | 807 |
806 | |
807 // Called when GDataUploader::UploadUpdatedFile() is completed for | 808 // Called when GDataUploader::UploadUpdatedFile() is completed for |
808 // UpdateFileByResourceId(). | 809 // UpdateFileByResourceId(). |
809 void OnUpdatedFileUploaded( | 810 void OnUpdatedFileUploaded( |
810 const FileOperationCallback& callback, | 811 const FileOperationCallback& callback, |
811 GDataFileError error, | 812 GDataFileError error, |
812 scoped_ptr<UploadFileInfo> upload_file_info); | 813 scoped_ptr<UploadFileInfo> upload_file_info); |
813 | 814 |
814 // The following functions are used to forward calls to asynchronous public | 815 // The following functions are used to forward calls to asynchronous public |
815 // member functions to UI thread. | 816 // member functions to UI thread. |
816 void SearchAsyncOnUIThread(const std::string& search_query, | 817 void SearchAsyncOnUIThread(const std::string& search_query, |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
962 // invalidate the weak pointers before any other members are destroyed. | 963 // invalidate the weak pointers before any other members are destroyed. |
963 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 964 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
964 // Unlike other classes, we need this as we need this to redirect a task | 965 // Unlike other classes, we need this as we need this to redirect a task |
965 // from IO thread to UI thread. | 966 // from IO thread to UI thread. |
966 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 967 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
967 }; | 968 }; |
968 | 969 |
969 } // namespace gdata | 970 } // namespace gdata |
970 | 971 |
971 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 972 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |