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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10827068: gdata: Fix "save as pdf" to work on Google Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add mock method. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
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_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('j') | chrome/browser/chromeos/gdata/gdata_file_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698