| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 virtual void Initialize() OVERRIDE; | 54 virtual void Initialize() OVERRIDE; |
| 55 virtual void AddObserver(Observer* observer) OVERRIDE; | 55 virtual void AddObserver(Observer* observer) OVERRIDE; |
| 56 virtual void RemoveObserver(Observer* observer) OVERRIDE; | 56 virtual void RemoveObserver(Observer* observer) OVERRIDE; |
| 57 virtual void StartUpdates() OVERRIDE; | 57 virtual void StartUpdates() OVERRIDE; |
| 58 virtual void StopUpdates() OVERRIDE; | 58 virtual void StopUpdates() OVERRIDE; |
| 59 virtual void CheckForUpdates() OVERRIDE; | 59 virtual void CheckForUpdates() OVERRIDE; |
| 60 virtual void GetEntryInfoByResourceId( | 60 virtual void GetEntryInfoByResourceId( |
| 61 const std::string& resource_id, | 61 const std::string& resource_id, |
| 62 const GetEntryInfoWithFilePathCallback& callback) OVERRIDE; | 62 const GetEntryInfoWithFilePathCallback& callback) OVERRIDE; |
| 63 virtual void Search(const std::string& search_query, | 63 virtual void Search(const std::string& search_query, |
| 64 const GURL& next_feed, |
| 64 const SearchCallback& callback) OVERRIDE; | 65 const SearchCallback& callback) OVERRIDE; |
| 65 virtual void TransferFileFromRemoteToLocal( | 66 virtual void TransferFileFromRemoteToLocal( |
| 66 const FilePath& remote_src_file_path, | 67 const FilePath& remote_src_file_path, |
| 67 const FilePath& local_dest_file_path, | 68 const FilePath& local_dest_file_path, |
| 68 const FileOperationCallback& callback) OVERRIDE; | 69 const FileOperationCallback& callback) OVERRIDE; |
| 69 virtual void TransferFileFromLocalToRemote( | 70 virtual void TransferFileFromLocalToRemote( |
| 70 const FilePath& local_src_file_path, | 71 const FilePath& local_src_file_path, |
| 71 const FilePath& remote_dest_file_path, | 72 const FilePath& remote_dest_file_path, |
| 72 const FileOperationCallback& callback) OVERRIDE; | 73 const FileOperationCallback& callback) OVERRIDE; |
| 73 virtual void OpenFile(const FilePath& file_path, | 74 virtual void OpenFile(const FilePath& file_path, |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // In the case of loading the root feed we use |root_feed_changestamp| as its | 592 // In the case of loading the root feed we use |root_feed_changestamp| as its |
| 592 // initial changestamp value since it does not come with that info. | 593 // initial changestamp value since it does not come with that info. |
| 593 // When done |load_feed_callback| is invoked. | 594 // When done |load_feed_callback| is invoked. |
| 594 // |entry_found_callback| is used only when this is invoked while searching | 595 // |entry_found_callback| is used only when this is invoked while searching |
| 595 // for file info, and is used in |load_feed_callback|. If successful, it will | 596 // for file info, and is used in |load_feed_callback|. If successful, it will |
| 596 // try to find the file upon retrieval completion. | 597 // try to find the file upon retrieval completion. |
| 597 // |should_fetch_multiple_feeds| is true iff don't want to stop feed loading | 598 // |should_fetch_multiple_feeds| is true iff don't want to stop feed loading |
| 598 // after we retrieve first feed chunk. | 599 // after we retrieve first feed chunk. |
| 599 // If invoked as a part of content search, query will be set in | 600 // If invoked as a part of content search, query will be set in |
| 600 // |search_query|. | 601 // |search_query|. |
| 602 // If |feed_to_load| is set, this is feed url that will be used to load feed. |
| 601 void LoadFeedFromServer(ContentOrigin initial_origin, | 603 void LoadFeedFromServer(ContentOrigin initial_origin, |
| 602 int start_changestamp, | 604 int start_changestamp, |
| 603 int root_feed_changestamp, | 605 int root_feed_changestamp, |
| 604 bool should_fetch_multiple_feeds, | 606 bool should_fetch_multiple_feeds, |
| 605 const FilePath& search_file_path, | 607 const FilePath& search_file_path, |
| 606 const std::string& search_query, | 608 const std::string& search_query, |
| 609 const GURL& feed_to_load, |
| 607 const std::string& directory_resource_id, | 610 const std::string& directory_resource_id, |
| 608 const FindEntryCallback& entry_found_callback, | 611 const FindEntryCallback& entry_found_callback, |
| 609 const LoadDocumentFeedCallback& load_feed_callback); | 612 const LoadDocumentFeedCallback& load_feed_callback); |
| 610 | 613 |
| 611 // Callback for handling feed content fetching while searching for file info. | 614 // Callback for handling feed content fetching while searching for file info. |
| 612 // This callback is invoked after async feed fetch operation that was | 615 // This callback is invoked after async feed fetch operation that was |
| 613 // invoked by StartDirectoryRefresh() completes. This callback will update | 616 // invoked by StartDirectoryRefresh() completes. This callback will update |
| 614 // the content of the refreshed directory object and continue initially | 617 // the content of the refreshed directory object and continue initially |
| 615 // started FindEntryByPath() request. | 618 // started FindEntryByPath() request. |
| 616 void OnFeedFromServerLoaded(GetDocumentsParams* params, | 619 void OnFeedFromServerLoaded(GetDocumentsParams* params, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 // Called when GDataUploader::UploadUpdatedFile() is completed for | 769 // Called when GDataUploader::UploadUpdatedFile() is completed for |
| 767 // UpdateFileByResourceId(). | 770 // UpdateFileByResourceId(). |
| 768 void OnUpdatedFileUploaded( | 771 void OnUpdatedFileUploaded( |
| 769 const FileOperationCallback& callback, | 772 const FileOperationCallback& callback, |
| 770 GDataFileError error, | 773 GDataFileError error, |
| 771 scoped_ptr<UploadFileInfo> upload_file_info); | 774 scoped_ptr<UploadFileInfo> upload_file_info); |
| 772 | 775 |
| 773 // The following functions are used to forward calls to asynchronous public | 776 // The following functions are used to forward calls to asynchronous public |
| 774 // member functions to UI thread. | 777 // member functions to UI thread. |
| 775 void SearchAsyncOnUIThread(const std::string& search_query, | 778 void SearchAsyncOnUIThread(const std::string& search_query, |
| 779 const GURL& next_feed, |
| 776 const SearchCallback& callback); | 780 const SearchCallback& callback); |
| 777 void OpenFileOnUIThread(const FilePath& file_path, | 781 void OpenFileOnUIThread(const FilePath& file_path, |
| 778 const OpenFileCallback& callback); | 782 const OpenFileCallback& callback); |
| 779 void CloseFileOnUIThread(const FilePath& file_path, | 783 void CloseFileOnUIThread(const FilePath& file_path, |
| 780 const FileOperationCallback& callback); | 784 const FileOperationCallback& callback); |
| 781 void CopyOnUIThread(const FilePath& src_file_path, | 785 void CopyOnUIThread(const FilePath& src_file_path, |
| 782 const FilePath& dest_file_path, | 786 const FilePath& dest_file_path, |
| 783 const FileOperationCallback& callback); | 787 const FileOperationCallback& callback); |
| 784 void MoveOnUIThread(const FilePath& src_file_path, | 788 void MoveOnUIThread(const FilePath& src_file_path, |
| 785 const FilePath& dest_file_path, | 789 const FilePath& dest_file_path, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 917 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 914 | 918 |
| 915 ObserverList<Observer> observers_; | 919 ObserverList<Observer> observers_; |
| 916 | 920 |
| 917 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 921 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 918 }; | 922 }; |
| 919 | 923 |
| 920 } // namespace gdata | 924 } // namespace gdata |
| 921 | 925 |
| 922 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 926 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |