| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 FindMissingDirectoryResult FindFirstMissingParentDirectory( | 549 FindMissingDirectoryResult FindFirstMissingParentDirectory( |
| 550 const FilePath& directory_path, | 550 const FilePath& directory_path, |
| 551 GURL* last_dir_content_url, | 551 GURL* last_dir_content_url, |
| 552 FilePath* first_missing_parent_path); | 552 FilePath* first_missing_parent_path); |
| 553 | 553 |
| 554 // Callback for handling results of ReloadFeedFromServerIfNeeded() initiated | 554 // Callback for handling results of ReloadFeedFromServerIfNeeded() initiated |
| 555 // from CheckForUpdates(). This callback checks whether feed is successfully | 555 // from CheckForUpdates(). This callback checks whether feed is successfully |
| 556 // reloaded, and in case of failure, restores the content origin of the root | 556 // reloaded, and in case of failure, restores the content origin of the root |
| 557 // directory. | 557 // directory. |
| 558 void OnUpdateChecked(ContentOrigin initial_origin, | 558 void OnUpdateChecked(ContentOrigin initial_origin, |
| 559 GDataFileError error, | 559 GDataFileError error); |
| 560 GDataEntry* entry); | |
| 561 | 560 |
| 562 // Runs the callback and notifies that the initial load is finished. | 561 // Finds the entry for |search_file_path| synchronously and runs the |
| 562 // callback, then notifies that the initial load is finished. |
| 563 // |callback| must not be null. | 563 // |callback| must not be null. |
| 564 void RunAndNotifyInitialLoadFinished(const FindEntryCallback& callback, | 564 void FindAndNotifyInitialLoadFinished(const FilePath& search_file_path, |
| 565 GDataFileError error, | 565 const FindEntryCallback& callback, |
| 566 GDataEntry* entry); | 566 GDataFileError error); |
| 567 | 567 |
| 568 // Helper function that completes bookkeeping tasks related to | 568 // Helper function that completes bookkeeping tasks related to |
| 569 // completed file transfer. | 569 // completed file transfer. |
| 570 void OnTransferCompleted(const FileOperationCallback& callback, | 570 void OnTransferCompleted(const FileOperationCallback& callback, |
| 571 GDataFileError error, | 571 GDataFileError error, |
| 572 scoped_ptr<UploadFileInfo> upload_file_info); | 572 scoped_ptr<UploadFileInfo> upload_file_info); |
| 573 | 573 |
| 574 // Kicks off file upload once it receives |file_size| and |content_type|. | 574 // Kicks off file upload once it receives |file_size| and |content_type|. |
| 575 void StartFileUploadOnUIThread(const StartFileUploadParams& params, | 575 void StartFileUploadOnUIThread(const StartFileUploadParams& params, |
| 576 GDataFileError* error, | 576 GDataFileError* error, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 GDataEntry* entry); | 732 GDataEntry* entry); |
| 733 void GetEntryInfoByPathAsyncOnUIThread(const FilePath& file_path, | 733 void GetEntryInfoByPathAsyncOnUIThread(const FilePath& file_path, |
| 734 const GetEntryInfoCallback& callback); | 734 const GetEntryInfoCallback& callback); |
| 735 void GetEntryInfoByResourceIdOnUIThread( | 735 void GetEntryInfoByResourceIdOnUIThread( |
| 736 const std::string& resource_id, | 736 const std::string& resource_id, |
| 737 const GetEntryInfoWithFilePathCallback& callback); | 737 const GetEntryInfoWithFilePathCallback& callback); |
| 738 void ReadDirectoryByPathAsyncOnUIThread( | 738 void ReadDirectoryByPathAsyncOnUIThread( |
| 739 const FilePath& file_path, | 739 const FilePath& file_path, |
| 740 const ReadDirectoryWithSettingCallback& callback); | 740 const ReadDirectoryWithSettingCallback& callback); |
| 741 void RequestDirectoryRefreshOnUIThread(const FilePath& file_path); | 741 void RequestDirectoryRefreshOnUIThread(const FilePath& file_path); |
| 742 void OnRequestDirectoryRefresh(GetDocumentsParams* params, | 742 void OnRequestDirectoryRefresh(const FilePath& directory_path, |
| 743 GetDocumentsParams* params, |
| 743 GDataFileError error); | 744 GDataFileError error); |
| 744 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); | 745 void GetAvailableSpaceOnUIThread(const GetAvailableSpaceCallback& callback); |
| 745 void AddUploadedFileOnUIThread(UploadMode upload_mode, | 746 void AddUploadedFileOnUIThread(UploadMode upload_mode, |
| 746 const FilePath& virtual_dir_path, | 747 const FilePath& virtual_dir_path, |
| 747 scoped_ptr<DocumentEntry> entry, | 748 scoped_ptr<DocumentEntry> entry, |
| 748 const FilePath& file_content_path, | 749 const FilePath& file_content_path, |
| 749 GDataCache::FileOperationType cache_operation, | 750 GDataCache::FileOperationType cache_operation, |
| 750 const base::Closure& callback); | 751 const base::Closure& callback); |
| 751 | 752 |
| 752 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is | 753 // Part of CopyOnUIThread(). Called after GetEntryInfoPairByPaths() is |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 // invalidate the weak pointers before any other members are destroyed. | 846 // invalidate the weak pointers before any other members are destroyed. |
| 846 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 847 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
| 847 // Unlike other classes, we need this as we need this to redirect a task | 848 // Unlike other classes, we need this as we need this to redirect a task |
| 848 // from IO thread to UI thread. | 849 // from IO thread to UI thread. |
| 849 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 850 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 850 }; | 851 }; |
| 851 | 852 |
| 852 } // namespace gdata | 853 } // namespace gdata |
| 853 | 854 |
| 854 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 855 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |