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

Unified Diff: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc

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/fake_provided_file_system.cc
diff --git a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
index f27aeb01fb4ad1f32c00f6802c0a272a72cf68fd..aab2a8310d14f352024dcf890f1122d6e21c9dc5 100644
--- a/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
+++ b/chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc
@@ -118,6 +118,20 @@ void FakeProvidedFileSystem::ReadDirectory(
}
}
+void FakeProvidedFileSystem::OpenFile(
+ const base::FilePath& file_path,
+ OpenFileMode mode,
+ bool create,
+ const fileapi::AsyncFileUtil::StatusCallback& callback) {
+ if (file_path.AsUTF8Unsafe() != "/hello.txt" ||
+ mode == OPEN_FILE_MODE_WRITE || create) {
+ callback.Run(base::File::FILE_ERROR_SECURITY);
+ return;
+ }
+
+ callback.Run(base::File::FILE_OK);
+}
+
const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo()
const {
return file_system_info_;

Powered by Google App Engine
This is Rietveld 408576698