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

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

Issue 10600013: Wired support for file truncating with RemoteFileSystemOperation::OpenFile() method (case when base… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_proxy.h
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
index 3156de61c0470a1c2c94155f254e287b4ae554d7..7ee494cdaee8fcd859ba77af8b2c56157ae4825e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
@@ -155,6 +155,33 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
const fileapi::FileSystemOperationInterface::StatusCallback& callback,
base::PlatformFileError* truncate_result);
+ // Invoked during OpenFile() operation when truncate or write flags are set.
+ // This is called when a local modifiable cached file is ready for such
+ // operation.
+ void OnOpenFileForWriting(
+ int file_flags,
+ base::ProcessHandle peer_handle,
+ const fileapi::FileSystemOperationInterface::OpenFileCallback& callback,
+ GDataFileError gdata_error,
+ const FilePath& local_cache_path);
+
+ // Invoked during OpenFile() operation when file create flags are set.
+ void OnCreateFileForOpen(
+ const FilePath& file_path,
+ int file_flags,
+ base::ProcessHandle peer_handle,
+ const fileapi::FileSystemOperationInterface::OpenFileCallback& callback,
+ GDataFileError gdata_error);
+
+ // Invoked during OpenFile() operation when base::PLATFORM_FILE_OPEN_TRUNCATED
+ // flag is set. This is called when the truncation of a local cache file is
+ // finished on FILE thread.
+ void OnOpenAndTruncate(
+ base::ProcessHandle peer_handle,
+ const fileapi::FileSystemOperationInterface::OpenFileCallback& callback,
+ base::PlatformFile* platform_file,
+ base::PlatformFileError* truncate_result);
+
// GDataFileSystemProxy is owned by Profile, which outlives
// GDataFileSystemProxy, which is owned by CrosMountPointProvider (i.e. by
// the time Profile is removed, the file manager is already gone). Hence

Powered by Google App Engine
This is Rietveld 408576698