Chromium Code Reviews| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 virtual void Initialize() OVERRIDE; | 55 virtual void Initialize() OVERRIDE; |
| 56 virtual void AddObserver(Observer* observer) OVERRIDE; | 56 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 57 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 57 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 58 virtual void StartUpdates() OVERRIDE; | 58 virtual void StartUpdates() OVERRIDE; |
| 59 virtual void StopUpdates() OVERRIDE; | 59 virtual void StopUpdates() OVERRIDE; |
| 60 virtual void CheckForUpdates() OVERRIDE; | 60 virtual void CheckForUpdates() OVERRIDE; |
| 61 virtual void GetFileInfoByResourceId( | 61 virtual void GetFileInfoByResourceId( |
| 62 const std::string& resource_id, | 62 const std::string& resource_id, |
| 63 const GetFileInfoWithFilePathCallback& callback) OVERRIDE; | 63 const GetFileInfoWithFilePathCallback& callback) OVERRIDE; |
| 64 virtual void Search(const std::string& search_query, | 64 virtual void Search(const std::string& search_query, |
| 65 const GURL& next_feed, | |
| 65 const SearchCallback& callback) OVERRIDE; | 66 const SearchCallback& callback) OVERRIDE; |
| 66 virtual void TransferFileFromRemoteToLocal( | 67 virtual void TransferFileFromRemoteToLocal( |
| 67 const FilePath& remote_src_file_path, | 68 const FilePath& remote_src_file_path, |
| 68 const FilePath& local_dest_file_path, | 69 const FilePath& local_dest_file_path, |
| 69 const FileOperationCallback& callback) OVERRIDE; | 70 const FileOperationCallback& callback) OVERRIDE; |
| 70 virtual void TransferFileFromLocalToRemote( | 71 virtual void TransferFileFromLocalToRemote( |
| 71 const FilePath& local_src_file_path, | 72 const FilePath& local_src_file_path, |
| 72 const FilePath& remote_dest_file_path, | 73 const FilePath& remote_dest_file_path, |
| 73 const FileOperationCallback& callback) OVERRIDE; | 74 const FileOperationCallback& callback) OVERRIDE; |
| 74 virtual void OpenFile(const FilePath& file_path, | 75 virtual void OpenFile(const FilePath& file_path, |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 586 // When done |load_feed_callback| is invoked. | 587 // When done |load_feed_callback| is invoked. |
| 587 // |entry_found_callback| is used only when this is invoked while searching | 588 // |entry_found_callback| is used only when this is invoked while searching |
| 588 // for file info, and is used in |load_feed_callback|. If successful, it will | 589 // for file info, and is used in |load_feed_callback|. If successful, it will |
| 589 // try to find the file upon retrieval completion. | 590 // try to find the file upon retrieval completion. |
| 590 // |should_fetch_multiple_feeds| is true iff don't want to stop feed loading | 591 // |should_fetch_multiple_feeds| is true iff don't want to stop feed loading |
| 591 // after we retrieve first feed chunk. | 592 // after we retrieve first feed chunk. |
| 592 // If invoked as a part of content search, query will be set in | 593 // If invoked as a part of content search, query will be set in |
| 593 // |search_query|. | 594 // |search_query|. |
| 594 void LoadFeedFromServer(ContentOrigin initial_origin, | 595 void LoadFeedFromServer(ContentOrigin initial_origin, |
| 595 int start_changestamp, | 596 int start_changestamp, |
| 596 int root_feed_changestamp, | 597 int root_feed_changestamp, |
|
tbarzic
2012/07/20 16:51:54
we should really refactor this one :/
satorux1
2012/07/20 17:13:04
I'll file a bug and assign it to you. :)
tbarzic
2012/07/20 17:51:43
yeey
| |
| 597 bool should_fetch_multiple_feeds, | 598 bool should_fetch_multiple_feeds, |
| 598 const FilePath& search_file_path, | 599 const FilePath& search_file_path, |
| 599 const std::string& search_query, | 600 const std::string& search_query, |
| 601 const GURL& feed_to_load, | |
|
satorux1
2012/07/20 17:13:04
please document |feed_to_load| in the function com
tbarzic
2012/07/20 17:51:43
Done.
| |
| 600 const std::string& directory_resource_id, | 602 const std::string& directory_resource_id, |
| 601 const FindEntryCallback& entry_found_callback, | 603 const FindEntryCallback& entry_found_callback, |
| 602 const LoadDocumentFeedCallback& load_feed_callback); | 604 const LoadDocumentFeedCallback& load_feed_callback); |
| 603 | 605 |
| 604 // Callback for handling feed content fetching while searching for file info. | 606 // Callback for handling feed content fetching while searching for file info. |
| 605 // This callback is invoked after async feed fetch operation that was | 607 // This callback is invoked after async feed fetch operation that was |
| 606 // invoked by StartDirectoryRefresh() completes. This callback will update | 608 // invoked by StartDirectoryRefresh() completes. This callback will update |
| 607 // the content of the refreshed directory object and continue initially | 609 // the content of the refreshed directory object and continue initially |
| 608 // started FindEntryByPath() request. | 610 // started FindEntryByPath() request. |
| 609 void OnFeedFromServerLoaded(GetDocumentsParams* params, | 611 void OnFeedFromServerLoaded(GetDocumentsParams* params, |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 747 // Called when GDataUploader::UploadUpdatedFile() is completed for | 749 // Called when GDataUploader::UploadUpdatedFile() is completed for |
| 748 // UpdateFileByResourceId(). | 750 // UpdateFileByResourceId(). |
| 749 void OnUpdatedFileUploaded( | 751 void OnUpdatedFileUploaded( |
| 750 const FileOperationCallback& callback, | 752 const FileOperationCallback& callback, |
| 751 GDataFileError error, | 753 GDataFileError error, |
| 752 scoped_ptr<UploadFileInfo> upload_file_info); | 754 scoped_ptr<UploadFileInfo> upload_file_info); |
| 753 | 755 |
| 754 // The following functions are used to forward calls to asynchronous public | 756 // The following functions are used to forward calls to asynchronous public |
| 755 // member functions to UI thread. | 757 // member functions to UI thread. |
| 756 void SearchAsyncOnUIThread(const std::string& search_query, | 758 void SearchAsyncOnUIThread(const std::string& search_query, |
| 759 const GURL& next_feed, | |
| 757 const SearchCallback& callback); | 760 const SearchCallback& callback); |
| 758 void OpenFileOnUIThread(const FilePath& file_path, | 761 void OpenFileOnUIThread(const FilePath& file_path, |
| 759 const OpenFileCallback& callback); | 762 const OpenFileCallback& callback); |
| 760 void CloseFileOnUIThread(const FilePath& file_path, | 763 void CloseFileOnUIThread(const FilePath& file_path, |
| 761 const FileOperationCallback& callback); | 764 const FileOperationCallback& callback); |
| 762 void CopyOnUIThread(const FilePath& src_file_path, | 765 void CopyOnUIThread(const FilePath& src_file_path, |
| 763 const FilePath& dest_file_path, | 766 const FilePath& dest_file_path, |
| 764 const FileOperationCallback& callback); | 767 const FileOperationCallback& callback); |
| 765 void MoveOnUIThread(const FilePath& src_file_path, | 768 void MoveOnUIThread(const FilePath& src_file_path, |
| 766 const FilePath& dest_file_path, | 769 const FilePath& dest_file_path, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 877 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 875 | 878 |
| 876 ObserverList<Observer> observers_; | 879 ObserverList<Observer> observers_; |
| 877 | 880 |
| 878 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 881 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 879 }; | 882 }; |
| 880 | 883 |
| 881 } // namespace gdata | 884 } // namespace gdata |
| 882 | 885 |
| 883 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 886 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |