| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 virtual void CreateDirectory(const FilePath& directory_path, | 91 virtual void CreateDirectory(const FilePath& directory_path, |
| 92 bool is_exclusive, | 92 bool is_exclusive, |
| 93 bool is_recursive, | 93 bool is_recursive, |
| 94 const FileOperationCallback& callback) OVERRIDE; | 94 const FileOperationCallback& callback) OVERRIDE; |
| 95 virtual void CreateFile(const FilePath& file_path, | 95 virtual void CreateFile(const FilePath& file_path, |
| 96 bool is_exclusive, | 96 bool is_exclusive, |
| 97 const FileOperationCallback& callback) OVERRIDE; | 97 const FileOperationCallback& callback) OVERRIDE; |
| 98 virtual void GetFileByPath( | 98 virtual void GetFileByPath( |
| 99 const FilePath& file_path, | 99 const FilePath& file_path, |
| 100 const GetFileCallback& get_file_callback, | 100 const GetFileCallback& get_file_callback, |
| 101 const GetDownloadDataCallback& get_download_data_callback) OVERRIDE; | 101 const GetContentCallback& get_content_callback) OVERRIDE; |
| 102 virtual void GetFileByResourceId( | 102 virtual void GetFileByResourceId( |
| 103 const std::string& resource_id, | 103 const std::string& resource_id, |
| 104 const GetFileCallback& get_file_callback, | 104 const GetFileCallback& get_file_callback, |
| 105 const GetDownloadDataCallback& get_download_data_callback) OVERRIDE; | 105 const GetContentCallback& get_content_callback) OVERRIDE; |
| 106 virtual void UpdateFileByResourceId( | 106 virtual void UpdateFileByResourceId( |
| 107 const std::string& resource_id, | 107 const std::string& resource_id, |
| 108 const FileOperationCallback& callback) OVERRIDE; | 108 const FileOperationCallback& callback) OVERRIDE; |
| 109 virtual void GetEntryInfoByPath( | 109 virtual void GetEntryInfoByPath( |
| 110 const FilePath& file_path, | 110 const FilePath& file_path, |
| 111 const GetEntryInfoCallback& callback) OVERRIDE; | 111 const GetEntryInfoCallback& callback) OVERRIDE; |
| 112 virtual void ReadDirectoryByPath( | 112 virtual void ReadDirectoryByPath( |
| 113 const FilePath& file_path, | 113 const FilePath& file_path, |
| 114 const ReadDirectoryWithSettingCallback& callback) OVERRIDE; | 114 const ReadDirectoryWithSettingCallback& callback) OVERRIDE; |
| 115 virtual void RequestDirectoryRefresh( | 115 virtual void RequestDirectoryRefresh( |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void DidUploadForCreateBrandNewFile( | 235 void DidUploadForCreateBrandNewFile( |
| 236 const FilePath& local_path, | 236 const FilePath& local_path, |
| 237 const FileOperationCallback& callback, | 237 const FileOperationCallback& callback, |
| 238 GDataFileError result); | 238 GDataFileError result); |
| 239 | 239 |
| 240 // Invoked upon completion of GetEntryInfoByPath initiated by | 240 // Invoked upon completion of GetEntryInfoByPath initiated by |
| 241 // GetFileByPath. It then continues to invoke GetResolvedFileByPath. | 241 // GetFileByPath. It then continues to invoke GetResolvedFileByPath. |
| 242 void OnGetEntryInfoCompleteForGetFileByPath( | 242 void OnGetEntryInfoCompleteForGetFileByPath( |
| 243 const FilePath& file_path, | 243 const FilePath& file_path, |
| 244 const GetFileCallback& get_file_callback, | 244 const GetFileCallback& get_file_callback, |
| 245 const GetDownloadDataCallback& get_download_data_callback, | 245 const GetContentCallback& get_content_callback, |
| 246 GDataFileError error, | 246 GDataFileError error, |
| 247 scoped_ptr<GDataEntryProto> file_info); | 247 scoped_ptr<GDataEntryProto> file_info); |
| 248 | 248 |
| 249 // Invoked upon completion of GetEntryInfoByPath initiated by OpenFile. | 249 // Invoked upon completion of GetEntryInfoByPath initiated by OpenFile. |
| 250 // It then continues to invoke GetResolvedFileByPath and proceeds to | 250 // It then continues to invoke GetResolvedFileByPath and proceeds to |
| 251 // OnGetFileCompleteForOpenFile. | 251 // OnGetFileCompleteForOpenFile. |
| 252 void OnGetEntryInfoCompleteForOpenFile( | 252 void OnGetEntryInfoCompleteForOpenFile( |
| 253 const FilePath& file_path, | 253 const FilePath& file_path, |
| 254 const OpenFileCallback& callback, | 254 const OpenFileCallback& callback, |
| 255 GDataFileError error, | 255 GDataFileError error, |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 void FindEntryByPathAsyncOnUIThread(const FilePath& search_file_path, | 625 void FindEntryByPathAsyncOnUIThread(const FilePath& search_file_path, |
| 626 const FindEntryCallback& callback); | 626 const FindEntryCallback& callback); |
| 627 | 627 |
| 628 // Gets |file_path| from the file system after the file info is already | 628 // Gets |file_path| from the file system after the file info is already |
| 629 // resolved with GetEntryInfoByPath(). This function is called by | 629 // resolved with GetEntryInfoByPath(). This function is called by |
| 630 // OnGetEntryInfoCompleteForGetFileByPath and | 630 // OnGetEntryInfoCompleteForGetFileByPath and |
| 631 // OnGetEntryInfoCompleteForOpenFile. | 631 // OnGetEntryInfoCompleteForOpenFile. |
| 632 void GetResolvedFileByPath( | 632 void GetResolvedFileByPath( |
| 633 const FilePath& file_path, | 633 const FilePath& file_path, |
| 634 const GetFileCallback& get_file_callback, | 634 const GetFileCallback& get_file_callback, |
| 635 const GetDownloadDataCallback& get_download_data_callback, | 635 const GetContentCallback& get_content_callback, |
| 636 GDataFileError error, | 636 GDataFileError error, |
| 637 const GDataEntryProto* entry_proto); | 637 const GDataEntryProto* entry_proto); |
| 638 | 638 |
| 639 // Called when GDataCache::GetFileOnUIThread() is completed for | 639 // Called when GDataCache::GetFileOnUIThread() is completed for |
| 640 // UpdateFileByResourceId(). | 640 // UpdateFileByResourceId(). |
| 641 void OnGetFileCompleteForUpdateFile( | 641 void OnGetFileCompleteForUpdateFile( |
| 642 const FileOperationCallback& callback, | 642 const FileOperationCallback& callback, |
| 643 GDataFileError error, | 643 GDataFileError error, |
| 644 const std::string& resource_id, | 644 const std::string& resource_id, |
| 645 const std::string& md5, | 645 const std::string& md5, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 void CreateDirectoryOnUIThread(const FilePath& directory_path, | 690 void CreateDirectoryOnUIThread(const FilePath& directory_path, |
| 691 bool is_exclusive, | 691 bool is_exclusive, |
| 692 bool is_recursive, | 692 bool is_recursive, |
| 693 const FileOperationCallback& callback); | 693 const FileOperationCallback& callback); |
| 694 void CreateFileOnUIThread(const FilePath& file_path, | 694 void CreateFileOnUIThread(const FilePath& file_path, |
| 695 bool is_exclusive, | 695 bool is_exclusive, |
| 696 const FileOperationCallback& callback); | 696 const FileOperationCallback& callback); |
| 697 void GetFileByPathOnUIThread( | 697 void GetFileByPathOnUIThread( |
| 698 const FilePath& file_path, | 698 const FilePath& file_path, |
| 699 const GetFileCallback& get_file_callback, | 699 const GetFileCallback& get_file_callback, |
| 700 const GetDownloadDataCallback& get_download_data_callback); | 700 const GetContentCallback& get_content_callback); |
| 701 void GetFileByResourceIdOnUIThread( | 701 void GetFileByResourceIdOnUIThread( |
| 702 const std::string& resource_id, | 702 const std::string& resource_id, |
| 703 const GetFileCallback& get_file_callback, | 703 const GetFileCallback& get_file_callback, |
| 704 const GetDownloadDataCallback& get_download_data_callback); | 704 const GetContentCallback& get_content_callback); |
| 705 void GetFileByEntryOnUIThread( | 705 void GetFileByEntryOnUIThread( |
| 706 const GetFileCallback& get_file_callback, | 706 const GetFileCallback& get_file_callback, |
| 707 const GetDownloadDataCallback& get_download_data_callback, | 707 const GetContentCallback& get_content_callback, |
| 708 GDataEntry* entry); | 708 GDataEntry* entry); |
| 709 void GetEntryInfoByEntryOnUIThread( | 709 void GetEntryInfoByEntryOnUIThread( |
| 710 const GetEntryInfoWithFilePathCallback& callback, | 710 const GetEntryInfoWithFilePathCallback& callback, |
| 711 GDataEntry* entry); | 711 GDataEntry* entry); |
| 712 void UpdateFileByResourceIdOnUIThread( | 712 void UpdateFileByResourceIdOnUIThread( |
| 713 const std::string& resource_id, | 713 const std::string& resource_id, |
| 714 const FileOperationCallback& callback); | 714 const FileOperationCallback& callback); |
| 715 void UpdateFileByEntryOnUIThread(const FileOperationCallback& callback, | 715 void UpdateFileByEntryOnUIThread(const FileOperationCallback& callback, |
| 716 GDataEntry* entry); | 716 GDataEntry* entry); |
| 717 void GetEntryInfoByPathAsyncOnUIThread( | 717 void GetEntryInfoByPathAsyncOnUIThread( |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 // invalidate the weak pointers before any other members are destroyed. | 821 // invalidate the weak pointers before any other members are destroyed. |
| 822 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 822 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
| 823 // Unlike other classes, we need this as we need this to redirect a task | 823 // Unlike other classes, we need this as we need this to redirect a task |
| 824 // from IO thread to UI thread. | 824 // from IO thread to UI thread. |
| 825 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 825 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 826 }; | 826 }; |
| 827 | 827 |
| 828 } // namespace gdata | 828 } // namespace gdata |
| 829 | 829 |
| 830 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 830 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |