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

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, 6 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 34036dff7971cd518e7734007a2790901dbc6299..3898a047be8af717201d6a88d2ecc5ca4cef859e 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_proxy.h
@@ -62,6 +62,10 @@ class GDataFileSystemProxy : public fileapi::RemoteFileSystemProxyInterface {
base::ProcessHandle peer_handle,
const fileapi::FileSystemOperationInterface::OpenFileCallback&
callback) OVERRIDE;
+ virtual void NotifyFileClosed(
+ const GURL& path,
+ const fileapi::FileSystemOperationInterface::StatusCallback&
+ callback) OVERRIDE;
// TODO(zelidrag): More methods to follow as we implement other parts of FSO.
protected:
@@ -132,6 +136,25 @@ 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,
+ base::PlatformFileError open_result,
+ const FilePath& local_cache_path);
+
+ // 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