Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10832276: gdata: Remove use of FindEntryByPathAsyncOnUI from CreateFileOnUIThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698