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

Unified Diff: chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h

Issue 284443002: [fsp] Add support for opening files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 7 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/file_system_provider/provided_file_system_interface.h
diff --git a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
index 76be11d7f15f05a86bee57571873c244c9d6c34e..126d532d7a1dff64a8274ac15a8b2c2053168062 100644
--- a/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
+++ b/chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h
@@ -24,6 +24,9 @@ class RequestManager;
// TODO(mtomasz): Add more methods once implemented.
class ProvidedFileSystemInterface {
public:
+ // Mode of opening a file. Used by OpenFile().
+ enum OpenFileMode { OPEN_FILE_MODE_READ, OPEN_FILE_MODE_WRITE };
+
virtual ~ProvidedFileSystemInterface() {}
// Requests unmounting of the file system. The callback is called when the
@@ -43,6 +46,14 @@ class ProvidedFileSystemInterface {
const base::FilePath& directory_path,
const fileapi::AsyncFileUtil::ReadDirectoryCallback& callback) = 0;
+ // Requests opening a file at |file_path|. If |create| is set to true, it will
+ // create a file and return succes in case it didn't exist.
+ virtual void OpenFile(
+ const base::FilePath& file_path,
+ OpenFileMode mode,
+ bool create,
+ const fileapi::AsyncFileUtil::StatusCallback& callback) = 0;
+
// Returns a provided file system info for this file system.
virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const = 0;
« no previous file with comments | « chrome/browser/chromeos/file_system_provider/provided_file_system.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698