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

Unified Diff: chrome/browser/chromeos/drive/file_system_interface.h

Issue 22335004: Add drive::FileSystem::GetFileByPathForSaving(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/drive/file_system_interface.h
diff --git a/chrome/browser/chromeos/drive/file_system_interface.h b/chrome/browser/chromeos/drive/file_system_interface.h
index 1c5865e230f5a3a98a6d1ba6ee240cbd075773c1..4df3c8f4d91cc5961d9fa7ea0b49e5d2a2dc86cd 100644
--- a/chrome/browser/chromeos/drive/file_system_interface.h
+++ b/chrome/browser/chromeos/drive/file_system_interface.h
@@ -318,15 +318,23 @@ class FileSystemInterface {
virtual void Unpin(const base::FilePath& file_path,
const FileOperationCallback& callback) = 0;
- // Gets |file_path| from the file system. The file entry represented by
- // |file_path| needs to be present in in-memory representation of the file
- // system in order to be retrieved. If the file is not cached, the file
- // will be downloaded through GData API or Drive V2 API.
+ // Makes sure that |file_path| in the file system is available in the local
+ // cache. If the file is not cached, the file will be downloaded. The entry
+ // needs to be present in the file system.
//
- // |callback| must not be null.
+ // Returns the cache path and entry info to |callback|. It must not be null.
virtual void GetFileByPath(const base::FilePath& file_path,
const GetFileCallback& callback) = 0;
+ // Makes sure that |file_path| in the file system is available in the local
+ // cache, and mark it as dirty. The next modification to the cache file is
+ // watched and is automatically uploaded to the server. If the entry is not
+ // present in the file system, it is created.
+ //
+ // Returns the cache path and entry info to |callback|. It must not be null.
+ virtual void GetFileByPathForSaving(const base::FilePath& file_path,
+ const GetFileCallback& callback) = 0;
+
// Gets a file by the given |file_path|.
// Calls |initialized_callback| when either:
// 1) The cached file (or JSON file for hosted file) is found, or
« no previous file with comments | « chrome/browser/chromeos/drive/file_system/operation_test_base.cc ('k') | chrome/browser/chromeos/drive/file_write_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698