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

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

Issue 10834295: gdata: Make callback parameters mandatory for CloseFile functions (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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 const FilePath& cache_file_path); 265 const FilePath& cache_file_path);
266 266
267 // Invoked during the process of CloseFile. What is done here is as follows: 267 // Invoked during the process of CloseFile. What is done here is as follows:
268 // 1) Gets resource_id and md5 of the entry at |file_path|. 268 // 1) Gets resource_id and md5 of the entry at |file_path|.
269 // 2) Gets the local path of the cache file from resource_id and md5. 269 // 2) Gets the local path of the cache file from resource_id and md5.
270 // 3) Gets PlatformFileInfo of the modified local cache file. 270 // 3) Gets PlatformFileInfo of the modified local cache file.
271 // 4) Gets GDataEntry for |file_path|. 271 // 4) Gets GDataEntry for |file_path|.
272 // 5) Modifies GDataEntry using the new PlatformFileInfo. 272 // 5) Modifies GDataEntry using the new PlatformFileInfo.
273 // 6) Commits the modification to the cache system. 273 // 6) Commits the modification to the cache system.
274 // 7) Invokes the user-supplied |callback|. 274 // 7) Invokes the user-supplied |callback|.
275 // |callback| must not be null.
275 void OnGetEntryInfoCompleteForCloseFile( 276 void OnGetEntryInfoCompleteForCloseFile(
276 const FilePath& file_path, 277 const FilePath& file_path,
277 const FileOperationCallback& callback, 278 const FileOperationCallback& callback,
278 GDataFileError error, 279 GDataFileError error,
279 scoped_ptr<GDataEntryProto> entry_proto); 280 scoped_ptr<GDataEntryProto> entry_proto);
280 void OnGetCacheFilePathCompleteForCloseFile( 281 void OnGetCacheFilePathCompleteForCloseFile(
281 const FilePath& file_path, 282 const FilePath& file_path,
282 const FileOperationCallback& callback, 283 const FileOperationCallback& callback,
283 GDataFileError error, 284 GDataFileError error,
284 const std::string& resource_id, 285 const std::string& resource_id,
285 const std::string& md5, 286 const std::string& md5,
286 const FilePath& local_cache_path); 287 const FilePath& local_cache_path);
287 void OnGetModifiedFileInfoCompleteForCloseFile( 288 void OnGetModifiedFileInfoCompleteForCloseFile(
288 const FilePath& file_path, 289 const FilePath& file_path,
289 base::PlatformFileInfo* file_info, 290 base::PlatformFileInfo* file_info,
290 bool* get_file_info_result, 291 bool* get_file_info_result,
291 const FileOperationCallback& callback); 292 const FileOperationCallback& callback);
292 void OnGetEntryCompleteForCloseFile( 293 void OnGetEntryCompleteForCloseFile(
293 const FilePath& file_path,
294 const base::PlatformFileInfo& file_info, 294 const base::PlatformFileInfo& file_info,
295 const FileOperationCallback& callback, 295 const FileOperationCallback& callback,
296 GDataFileError error, 296 GDataFileError error,
297 GDataEntry* entry); 297 GDataEntry* entry);
298 void OnCommitDirtyInCacheCompleteForCloseFile( 298 void OnCommitDirtyInCacheCompleteForCloseFile(
299 const FileOperationCallback& callback, 299 const FileOperationCallback& callback,
300 GDataFileError error, 300 GDataFileError error,
301 const std::string& resource_id, 301 const std::string& resource_id,
302 const std::string& md5); 302 const std::string& md5);
303 void OnCloseFileFinished(const FilePath& file_path, 303 void OnCloseFileFinished(const FilePath& file_path,
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // invalidate the weak pointers before any other members are destroyed. 859 // invalidate the weak pointers before any other members are destroyed.
860 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_; 860 base::WeakPtrFactory<GDataFileSystem> ui_weak_ptr_factory_;
861 // Unlike other classes, we need this as we need this to redirect a task 861 // Unlike other classes, we need this as we need this to redirect a task
862 // from IO thread to UI thread. 862 // from IO thread to UI thread.
863 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; 863 base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
864 }; 864 };
865 865
866 } // namespace gdata 866 } // namespace gdata
867 867
868 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 868 #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