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_DRIVE_CHANGE_LIST_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 // Part of LoadDirectoryFromServer(). Called when | 146 // Part of LoadDirectoryFromServer(). Called when |
147 // DriveScheduler::GetAboutResource() is complete. Calls | 147 // DriveScheduler::GetAboutResource() is complete. Calls |
148 // DoLoadDirectoryFromServer() to initiate the directory contents loading. | 148 // DoLoadDirectoryFromServer() to initiate the directory contents loading. |
149 void LoadDirectoryFromServerAfterGetAbout( | 149 void LoadDirectoryFromServerAfterGetAbout( |
150 const std::string& directory_resource_id, | 150 const std::string& directory_resource_id, |
151 const FileOperationCallback& callback, | 151 const FileOperationCallback& callback, |
152 google_apis::GDataErrorCode status, | 152 google_apis::GDataErrorCode status, |
153 scoped_ptr<google_apis::AboutResource> about_resource); | 153 scoped_ptr<google_apis::AboutResource> about_resource); |
154 | 154 |
155 // Initiates the directory contents loading, based on | 155 // Initiates the directory contents loading, based on |directory_fetch_info|. |
156 // |directory_fetch_info|. | 156 // When it is finished it just runs |callback| but no other callbacks in |
| 157 // |pending_load_callback_|, because it depends on the caller whether to flush |
| 158 // callbacks. Thus, the caller must be responsible for task flushing. |
157 void DoLoadDirectoryFromServer(const DirectoryFetchInfo& directory_fetch_info, | 159 void DoLoadDirectoryFromServer(const DirectoryFetchInfo& directory_fetch_info, |
158 const FileOperationCallback& callback); | 160 const FileOperationCallback& callback); |
159 | 161 |
160 // Part of DoLoadDirectoryFromServer(). Called after | 162 // Part of DoLoadDirectoryFromServer(). Called after |
161 // LoadFromServer() is complete. | 163 // LoadFromServer() is complete. |
162 void DoLoadDirectoryFromServerAfterLoad( | 164 void DoLoadDirectoryFromServerAfterLoad( |
163 const DirectoryFetchInfo& directory_fetch_info, | 165 const DirectoryFetchInfo& directory_fetch_info, |
164 const FileOperationCallback& callback, | 166 const FileOperationCallback& callback, |
165 const ScopedVector<google_apis::ResourceList>& resource_list, | 167 const ScopedVector<google_apis::ResourceList>& resource_list, |
166 DriveFileError error); | 168 DriveFileError error); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 290 |
289 // Note: This should remain the last member so it'll be destroyed and | 291 // Note: This should remain the last member so it'll be destroyed and |
290 // invalidate its weak pointers before any other members are destroyed. | 292 // invalidate its weak pointers before any other members are destroyed. |
291 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_; | 293 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_; |
292 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader); | 294 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader); |
293 }; | 295 }; |
294 | 296 |
295 } // namespace drive | 297 } // namespace drive |
296 | 298 |
297 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ | 299 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ |
OLD | NEW |