Index: chrome/browser/chromeos/gdata/gdata_file_system.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system.h b/chrome/browser/chromeos/gdata/gdata_file_system.h |
index 0ae0f20b5ff82a5ed49060b00b107ccd098dd771..8de1981b95b1f30ea224157c7fb25f5a247f3f2d 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_file_system.h |
+++ b/chrome/browser/chromeos/gdata/gdata_file_system.h |
@@ -74,6 +74,9 @@ class GDataFileSystem : public GDataFileSystemInterface, |
const OpenFileCallback& callback) OVERRIDE; |
virtual void CloseFile(const FilePath& file_path, |
const FileOperationCallback& callback) OVERRIDE; |
+ virtual void PrepareWritableFileAndRun( |
+ const FilePath& file_path, |
+ const OpenFileCallback& callback) OVERRIDE; |
virtual void Copy(const FilePath& src_file_path, |
const FilePath& dest_file_path, |
const FileOperationCallback& callback) OVERRIDE; |
@@ -855,6 +858,24 @@ class GDataFileSystem : public GDataFileSystemInterface, |
GDataFileError error, |
scoped_ptr<GDataEntryProto> entry_proto); |
+ // Part of PrepareWritableFilePathAndRun(). It forwards the task to the UI |
+ // thread, tries CreateFile for the case file does not exist yet, does |
+ // OpenFile to download and mark the file as dirty, runs |callback|, and |
+ // finally calls CloseFile. |
+ void PrepareWritableFileAndRunOnUIThread( |
+ const FilePath& file_path, |
+ const OpenFileCallback& callback); |
+ void PrepareWritableFileAndRunAfterCreateFile( |
+ const FilePath& file_path, |
+ const OpenFileCallback& callback, |
+ GDataFileError result); |
+ void PrepareWritableFileAndRunAfterOpenFile( |
+ const FilePath& file_path, |
+ const OpenFileCallback& callback, |
+ GDataFileError result, |
+ const FilePath& local_cache_path); |
+ void PrepareWritableFileAndRunAfterCallback(const FilePath& file_path); |
+ |
// All members should be accessed only on UI thread. Do not post tasks to |
// other threads with base::Unretained(this). |
scoped_ptr<GDataDirectoryService> directory_service_; |