| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 FOUND_INVALID, | 137 FOUND_INVALID, |
| 138 // Found missing directory segment while searching for given directory. | 138 // Found missing directory segment while searching for given directory. |
| 139 FOUND_MISSING, | 139 FOUND_MISSING, |
| 140 // Found target directory, it already exists. | 140 // Found target directory, it already exists. |
| 141 DIRECTORY_ALREADY_PRESENT, | 141 DIRECTORY_ALREADY_PRESENT, |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 // Defines set of parameters sent to callback OnGetDocuments(). | 144 // Defines set of parameters sent to callback OnGetDocuments(). |
| 145 struct GetDocumentsParams; | 145 struct GetDocumentsParams; |
| 146 | 146 |
| 147 // Defines set of parameters sent to callback OnNotifyDocumentFeedFetched(). |
| 148 struct GetDocumentsUIState; |
| 149 |
| 147 // Defines set of parameters passes to intermediate callbacks during | 150 // Defines set of parameters passes to intermediate callbacks during |
| 148 // execution of CreateDirectory() method. | 151 // execution of CreateDirectory() method. |
| 149 struct CreateDirectoryParams; | 152 struct CreateDirectoryParams; |
| 150 | 153 |
| 151 // Defines set of parameters passed to an intermediate callback | 154 // Defines set of parameters passed to an intermediate callback |
| 152 // OnGetFileCompleteForOpen, during execution of OpenFile() method. | 155 // OnGetFileCompleteForOpen, during execution of OpenFile() method. |
| 153 struct GetFileCompleteForOpenParams; | 156 struct GetFileCompleteForOpenParams; |
| 154 | 157 |
| 155 // Defines set of parameters passed to intermediate callbacks during | 158 // Defines set of parameters passed to intermediate callbacks during |
| 156 // execution of GetFileByPath() method. | 159 // execution of GetFileByPath() method. |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 // Callback for handling root directory refresh from the cache. | 635 // Callback for handling root directory refresh from the cache. |
| 633 void OnProtoLoaded(LoadRootFeedParams* params); | 636 void OnProtoLoaded(LoadRootFeedParams* params); |
| 634 | 637 |
| 635 // Save filesystem as proto file. | 638 // Save filesystem as proto file. |
| 636 void SaveFileSystemAsProto(); | 639 void SaveFileSystemAsProto(); |
| 637 | 640 |
| 638 // Notifies events to observers on UI thread. | 641 // Notifies events to observers on UI thread. |
| 639 void NotifyDirectoryChanged(const FilePath& directory_path); | 642 void NotifyDirectoryChanged(const FilePath& directory_path); |
| 640 void NotifyDocumentFeedFetched(int num_accumulated_entries); | 643 void NotifyDocumentFeedFetched(int num_accumulated_entries); |
| 641 | 644 |
| 645 // Callback for handling UI updates caused by document fetching. |
| 646 void OnNotifyDocumentFeedFetched(GetDocumentsUIState* ui_state); |
| 647 |
| 642 // Runs the callback and notifies that the initial load is finished. | 648 // Runs the callback and notifies that the initial load is finished. |
| 643 void RunAndNotifyInitialLoadFinished( | 649 void RunAndNotifyInitialLoadFinished( |
| 644 const FindEntryCallback& callback, | 650 const FindEntryCallback& callback, |
| 645 GDataFileError error, | 651 GDataFileError error, |
| 646 GDataEntry* entry); | 652 GDataEntry* entry); |
| 647 | 653 |
| 648 // Helper function that completes bookkeeping tasks related to | 654 // Helper function that completes bookkeeping tasks related to |
| 649 // completed file transfer. | 655 // completed file transfer. |
| 650 void OnTransferCompleted( | 656 void OnTransferCompleted( |
| 651 const FileOperationCallback& callback, | 657 const FileOperationCallback& callback, |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 915 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
| 910 | 916 |
| 911 ObserverList<Observer> observers_; | 917 ObserverList<Observer> observers_; |
| 912 | 918 |
| 913 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; | 919 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; |
| 914 }; | 920 }; |
| 915 | 921 |
| 916 } // namespace gdata | 922 } // namespace gdata |
| 917 | 923 |
| 918 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 924 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
| OLD | NEW |