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_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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 google_apis::GDataErrorCode status, | 148 google_apis::GDataErrorCode status, |
| 149 scoped_ptr<google_apis::AboutResource> about_resource); | 149 scoped_ptr<google_apis::AboutResource> about_resource); |
| 150 | 150 |
| 151 // Initiates the directory contents loading, based on |directory_fetch_info|. | 151 // Initiates the directory contents loading, based on |directory_fetch_info|. |
| 152 // When it is finished it just runs |callback| but no other callbacks in | 152 // When it is finished it just runs |callback| but no other callbacks in |
| 153 // |pending_load_callback_|, because it depends on the caller whether to flush | 153 // |pending_load_callback_|, because it depends on the caller whether to flush |
| 154 // callbacks. Thus, the caller must be responsible for task flushing. | 154 // callbacks. Thus, the caller must be responsible for task flushing. |
| 155 void DoLoadDirectoryFromServer(const DirectoryFetchInfo& directory_fetch_info, | 155 void DoLoadDirectoryFromServer(const DirectoryFetchInfo& directory_fetch_info, |
| 156 const FileOperationCallback& callback); | 156 const FileOperationCallback& callback); |
| 157 | 157 |
| 158 // Part of DoLoadDirectoryFromServer. Called when GetEntryInfoByPath for | |
| 159 // mydrive creation is completed. | |
| 160 // |callback| must not be null. | |
| 161 void DoLoadDirectoryFromServerAfterGetEntryInfoByPath( | |
|
kinaba
2013/04/10 04:34:44
How about naming these methods in a way that it ex
| |
| 162 const DirectoryFetchInfo& directory_fetch_info, | |
| 163 const FileOperationCallback& callback, | |
| 164 DriveFileError error, | |
| 165 scoped_ptr<DriveEntryProto> entry_proto); | |
| 166 | |
| 167 // Part of DoLoadDIrectoryFromServer. Called when GetAboutResource for mydrive | |
|
kinaba
2013/04/10 04:34:44
nit: DoLoadD<i>rectory
hidehiko
2013/04/10 06:11:19
Done.
| |
| 168 // root creation is completed. | |
| 169 // |callback must not be null. | |
|
Haruki Sato
2013/04/10 03:44:35
|callback| ? missing "|".
hidehiko
2013/04/10 06:11:19
Done.
hidehiko
2013/04/10 06:11:19
Done.
| |
| 170 void DoLoadDirectoryFromServerAfterGetAboutResource( | |
| 171 const DirectoryFetchInfo& directory_fetch_info, | |
| 172 const FileOperationCallback& callback, | |
| 173 google_apis::GDataErrorCode status, | |
| 174 scoped_ptr<google_apis::AboutResource> about_resource); | |
| 175 | |
| 158 // Part of DoLoadDirectoryFromServer(). Called after | 176 // Part of DoLoadDirectoryFromServer(). Called after |
| 159 // LoadFromServer() is complete. | 177 // LoadFromServer() is complete. |
| 160 void DoLoadDirectoryFromServerAfterLoad( | 178 void DoLoadDirectoryFromServerAfterLoad( |
| 161 const DirectoryFetchInfo& directory_fetch_info, | 179 const DirectoryFetchInfo& directory_fetch_info, |
| 162 const FileOperationCallback& callback, | 180 const FileOperationCallback& callback, |
| 163 ScopedVector<ChangeList> change_lists, | 181 ScopedVector<ChangeList> change_lists, |
| 164 DriveFileError error); | 182 DriveFileError error); |
| 165 | 183 |
| 166 // Part of DoLoadDirectoryFromServer(). Called after | 184 // Part of DoLoadDirectoryFromServer(). Called after |
| 167 // DriveResourceMetadata::RefreshDirectory() is complete. | 185 // DriveResourceMetadata::RefreshDirectory() is complete. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 286 | 304 |
| 287 // Note: This should remain the last member so it'll be destroyed and | 305 // Note: This should remain the last member so it'll be destroyed and |
| 288 // invalidate its weak pointers before any other members are destroyed. | 306 // invalidate its weak pointers before any other members are destroyed. |
| 289 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_; | 307 base::WeakPtrFactory<ChangeListLoader> weak_ptr_factory_; |
| 290 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader); | 308 DISALLOW_COPY_AND_ASSIGN(ChangeListLoader); |
| 291 }; | 309 }; |
| 292 | 310 |
| 293 } // namespace drive | 311 } // namespace drive |
| 294 | 312 |
| 295 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ | 313 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_LOADER_H_ |
| OLD | NEW |