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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 void TransferRegularFile(const FilePath& local_file_path, | 216 void TransferRegularFile(const FilePath& local_file_path, |
217 const FilePath& remote_dest_file_path, | 217 const FilePath& remote_dest_file_path, |
218 const FileOperationCallback& callback); | 218 const FileOperationCallback& callback); |
219 | 219 |
220 // Invoked during the process of CreateFile. | 220 // Invoked during the process of CreateFile. |
221 // First, FindEntryByPathAsyncOnUIThread is called and the result is returned | 221 // First, FindEntryByPathAsyncOnUIThread is called and the result is returned |
222 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals | 222 // to OnGetEntryInfoForCreateFile. By using the information, CreateFile deals |
223 // with the cases when an entry already existed at the path. If there was no | 223 // with the cases when an entry already existed at the path. If there was no |
224 // entry, a new empty file is uploaded, and when it finishes | 224 // entry, a new empty file is uploaded, and when it finishes |
225 // DidUploadForCreateBrandNewFile does the final clean up. | 225 // DidUploadForCreateBrandNewFile does the final clean up. |
| 226 // |callback| must not be null. |
226 void OnGetEntryInfoForCreateFile( | 227 void OnGetEntryInfoForCreateFile( |
227 const FilePath& file_path, | 228 const FilePath& file_path, |
228 bool is_exclusive, | 229 bool is_exclusive, |
229 const FileOperationCallback& callback, | 230 const FileOperationCallback& callback, |
230 GDataFileError result, | 231 GDataFileError result, |
231 GDataEntry* entry); | 232 scoped_ptr<GDataEntryProto> entry_proto); |
232 void DoUploadForCreateBrandNewFile( | 233 void DoUploadForCreateBrandNewFile( |
233 const FilePath& remote_path, | 234 const FilePath& remote_path, |
234 FilePath* local_path, | 235 FilePath* local_path, |
235 const FileOperationCallback& callback); | 236 const FileOperationCallback& callback); |
236 void DidUploadForCreateBrandNewFile( | 237 void DidUploadForCreateBrandNewFile( |
237 const FilePath& local_path, | 238 const FilePath& local_path, |
238 const FileOperationCallback& callback, | 239 const FileOperationCallback& callback, |
239 GDataFileError result); | 240 GDataFileError result); |
240 | 241 |
241 // Invoked upon completion of GetEntryInfoByPath initiated by | 242 // Invoked upon completion of GetEntryInfoByPath initiated by |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 // invalidate the weak pointers before any other members are destroyed. | 860 // invalidate the weak pointers before any other members are destroyed. |
860 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; | 861 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; |
861 // Unlike other classes, we need this as we need this to redirect a task | 862 // Unlike other classes, we need this as we need this to redirect a task |
862 // from IO thread to UI thread. | 863 // from IO thread to UI thread. |
863 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; | 864 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; |
864 }; | 865 }; |
865 | 866 |
866 } // namespace gdata | 867 } // namespace gdata |
867 | 868 |
868 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 869 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |