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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 FindMissingDirectoryResult FindFirstMissingParentDirectory( | 531 FindMissingDirectoryResult FindFirstMissingParentDirectory( |
532 const FilePath& directory_path, | 532 const FilePath& directory_path, |
533 GURL* last_dir_content_url, | 533 GURL* last_dir_content_url, |
534 FilePath* first_missing_parent_path); | 534 FilePath* first_missing_parent_path); |
535 | 535 |
536 // Callback for handling results of ReloadFeedFromServerIfNeeded() initiated | 536 // Callback for handling results of ReloadFeedFromServerIfNeeded() initiated |
537 // from CheckForUpdates(). This callback checks whether feed is successfully | 537 // from CheckForUpdates(). This callback checks whether feed is successfully |
538 // reloaded, and in case of failure, restores the content origin of the root | 538 // reloaded, and in case of failure, restores the content origin of the root |
539 // directory. | 539 // directory. |
540 void OnUpdateChecked(ContentOrigin initial_origin, | 540 void OnUpdateChecked(ContentOrigin initial_origin, |
541 GDataFileError error, | 541 GDataFileError error); |
542 GDataEntry* entry); | |
543 | 542 |
544 // Runs the callback and notifies that the initial load is finished. | 543 // Finds the entry for |search_file_path| synchronously and runs the |
| 544 // callback, then notifies that the initial load is finished. |
545 // |callback| must not be null. | 545 // |callback| must not be null. |
546 void RunAndNotifyInitialLoadFinished(const FindEntryCallback& callback, | 546 void FindAndNotifyInitialLoadFinished(const FilePath& search_file_path, |
547 GDataFileError error, | 547 const FindEntryCallback& callback, |
548 GDataEntry* entry); | 548 GDataFileError error); |
549 | 549 |
550 // Helper function that completes bookkeeping tasks related to | 550 // Helper function that completes bookkeeping tasks related to |
551 // completed file transfer. | 551 // completed file transfer. |
552 void OnTransferCompleted(const FileOperationCallback& callback, | 552 void OnTransferCompleted(const FileOperationCallback& callback, |
553 GDataFileError error, | 553 GDataFileError error, |
554 scoped_ptr<UploadFileInfo> upload_file_info); | 554 scoped_ptr<UploadFileInfo> upload_file_info); |
555 | 555 |
556 // Kicks off file upload once it receives |file_size| and |content_type|. | 556 // Kicks off file upload once it receives |file_size| and |content_type|. |
557 void StartFileUploadOnUIThread(const StartFileUploadParams& params, | 557 void StartFileUploadOnUIThread(const StartFileUploadParams& params, |
558 GDataFileError* error, | 558 GDataFileError* error, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 GDataEntry* entry); | 714 GDataEntry* entry); |
715 void GetEntryInfoByPathAsyncOnUIThread(const FilePath& file_path, | 715 void GetEntryInfoByPathAsyncOnUIThread(const FilePath& file_path, |
716 const GetEntryInfoCallback& callback); | 716 const GetEntryInfoCallback& callback); |
717 void GetEntryInfoByResourceIdOnUIThread( | 717 void GetEntryInfoByResourceIdOnUIThread( |
718 const std::string& resource_id, | 718 const std::string& resource_id, |
719 const GetEntryInfoWithFilePathCallback& callback); | 719 const GetEntryInfoWithFilePathCallback& callback); |
720 void ReadDirectoryByPathAsyncOnUIThread( | 720 void ReadDirectoryByPathAsyncOnUIThread( |
721 const FilePath& file_path, | 721 const FilePath& file_path, |
722 const ReadDirectoryWithSettingCallback& callback); | 722 const ReadDirectoryWithSettingCallback& callback); |
723 void RequestDirectoryRefreshOnUIThread(const FilePath& file_path); | 723 void RequestDirectoryRefreshOnUIThread(const FilePath& file_path); |
724 void OnRequestDirectoryRefresh(GetDocumentsParams* params, | 724 void OnRequestDirectoryRefresh(const FilePath& directory_path, |
| 725 GetDocumentsParams* params, |
725 GDataFileError error); | 726 GDataFileError error); |
726 void RequestDirectoryRefreshByEntry(const FilePath& directory_path, | 727 void RequestDirectoryRefreshByEntry(const FilePath& directory_path, |
727 const std::string& directory_resource_id, | 728 const std::string& directory_resource_id, |
728 const FileResourceIdMap& file_map, | 729 const FileResourceIdMap& file_map, |
729 GDataEntry* directory_entry); | 730 GDataEntry* directory_entry); |
730 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); | 731 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); |
731 void AddUploadedFileOnUIThread(UploadMode upload_mode, | 732 void AddUploadedFileOnUIThread(UploadMode upload_mode, |
732 const FilePath& virtual_dir_path, | 733 const FilePath& virtual_dir_path, |
733 scoped_ptr<DocumentEntry> entry, | 734 scoped_ptr<DocumentEntry> entry, |
734 const FilePath& file_content_path, | 735 const FilePath& file_content_path, |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // invalidate the weak pointers before any other members are destroyed. | 832 // invalidate the weak pointers before any other members are destroyed. |
832 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 833 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
833 // Unlike other classes, we need this as we need this to redirect a task | 834 // Unlike other classes, we need this as we need this to redirect a task |
834 // from IO thread to UI thread. | 835 // from IO thread to UI thread. |
835 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 836 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
836 }; | 837 }; |
837 | 838 |
838 } // namespace gdata | 839 } // namespace gdata |
839 | 840 |
840 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 841 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |