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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 const GetFileCallback& get_file_callback, | 104 const GetFileCallback& get_file_callback, |
105 const GetDownloadDataCallback& get_download_data_callback) OVERRIDE; | 105 const GetDownloadDataCallback& get_download_data_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 ReadDirectoryCallback& callback) OVERRIDE; | 114 const ReadDirectoryWithSettingCallback& callback) OVERRIDE; |
115 virtual void RequestDirectoryRefresh( | 115 virtual void RequestDirectoryRefresh( |
116 const FilePath& file_path) OVERRIDE; | 116 const FilePath& file_path) OVERRIDE; |
117 virtual void GetAvailableSpace( | 117 virtual void GetAvailableSpace( |
118 const GetAvailableSpaceCallback& callback) OVERRIDE; | 118 const GetAvailableSpaceCallback& callback) OVERRIDE; |
119 virtual void AddUploadedFile(UploadMode upload_mode, | 119 virtual void AddUploadedFile(UploadMode upload_mode, |
120 const FilePath& virtual_dir_path, | 120 const FilePath& virtual_dir_path, |
121 scoped_ptr<DocumentEntry> entry, | 121 scoped_ptr<DocumentEntry> entry, |
122 const FilePath& file_content_path, | 122 const FilePath& file_content_path, |
123 GDataCache::FileOperationType cache_operation, | 123 GDataCache::FileOperationType cache_operation, |
124 const base::Closure& callback) OVERRIDE; | 124 const base::Closure& callback) OVERRIDE; |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 | 605 |
606 // Initializes preference change observer. | 606 // Initializes preference change observer. |
607 void InitializePreferenceObserver(); | 607 void InitializePreferenceObserver(); |
608 | 608 |
609 // Called when an entry is found for GetEntryInfoByPath(). | 609 // Called when an entry is found for GetEntryInfoByPath(). |
610 void OnGetEntryInfo(const GetEntryInfoCallback& callback, | 610 void OnGetEntryInfo(const GetEntryInfoCallback& callback, |
611 GDataFileError error, | 611 GDataFileError error, |
612 GDataEntry* entry); | 612 GDataEntry* entry); |
613 | 613 |
614 // Called when an entry is found for ReadDirectoryByPath(). | 614 // Called when an entry is found for ReadDirectoryByPath(). |
615 void OnReadDirectory(const ReadDirectoryCallback& callback, | 615 void OnReadDirectory(const ReadDirectoryWithSettingCallback& callback, |
616 GDataFileError error, | 616 GDataFileError error, |
617 GDataEntry* entry); | 617 GDataEntry* entry); |
618 | 618 |
619 // Finds file info by using virtual |file_path|. This call will also | 619 // Finds file info by using virtual |file_path|. This call will also |
620 // retrieve and refresh file system content from server and disk cache. | 620 // retrieve and refresh file system content from server and disk cache. |
621 void FindEntryByPathAsyncOnUIThread(const FilePath& search_file_path, | 621 void FindEntryByPathAsyncOnUIThread(const FilePath& search_file_path, |
622 const FindEntryCallback& callback); | 622 const FindEntryCallback& callback); |
623 | 623 |
624 // Gets |file_path| from the file system after the file info is already | 624 // Gets |file_path| from the file system after the file info is already |
625 // resolved with GetEntryInfoByPath(). This function is called by | 625 // resolved with GetEntryInfoByPath(). This function is called by |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 void UpdateFileByEntryOnUIThread(const FileOperationCallback& callback, | 711 void UpdateFileByEntryOnUIThread(const FileOperationCallback& callback, |
712 GDataEntry* entry); | 712 GDataEntry* entry); |
713 void GetEntryInfoByPathAsyncOnUIThread( | 713 void GetEntryInfoByPathAsyncOnUIThread( |
714 const FilePath& file_path, | 714 const FilePath& file_path, |
715 const GetEntryInfoCallback& callback); | 715 const GetEntryInfoCallback& callback); |
716 void GetEntryInfoByResourceIdOnUIThread( | 716 void GetEntryInfoByResourceIdOnUIThread( |
717 const std::string& resource_id, | 717 const std::string& resource_id, |
718 const GetEntryInfoWithFilePathCallback& callback); | 718 const GetEntryInfoWithFilePathCallback& callback); |
719 void ReadDirectoryByPathAsyncOnUIThread( | 719 void ReadDirectoryByPathAsyncOnUIThread( |
720 const FilePath& file_path, | 720 const FilePath& file_path, |
721 const ReadDirectoryCallback& callback); | 721 const ReadDirectoryWithSettingCallback& callback); |
722 void RequestDirectoryRefreshOnUIThread( | 722 void RequestDirectoryRefreshOnUIThread( |
723 const FilePath& file_path); | 723 const FilePath& file_path); |
724 void OnRequestDirectoryRefresh(GetDocumentsParams* params, | 724 void OnRequestDirectoryRefresh(GetDocumentsParams* params, |
725 GDataFileError error); | 725 GDataFileError error); |
726 void RequestDirectoryRefreshByEntry( | 726 void RequestDirectoryRefreshByEntry( |
727 const FilePath& directory_path, | 727 const FilePath& directory_path, |
728 const std::string& directory_resource_id, | 728 const std::string& directory_resource_id, |
729 const FileResourceIdMap& file_map, | 729 const FileResourceIdMap& file_map, |
730 GDataEntry* directory_entry); | 730 GDataEntry* directory_entry); |
731 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); | 731 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 // invalidate the weak pointers before any other members are destroyed. | 817 // invalidate the weak pointers before any other members are destroyed. |
818 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 818 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
819 // Unlike other classes, we need this as we need this to redirect a task | 819 // Unlike other classes, we need this as we need this to redirect a task |
820 // from IO thread to UI thread. | 820 // from IO thread to UI thread. |
821 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 821 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
822 }; | 822 }; |
823 | 823 |
824 } // namespace gdata | 824 } // namespace gdata |
825 | 825 |
826 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 826 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |