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

Unified Diff: components/filesystem/file_impl.cc

Issue 1176653002: mandoline filesystem: add a sqlite3 vfs to proxy filesystem usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT and fix the test import. Created 5 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: components/filesystem/file_impl.cc
diff --git a/components/filesystem/file_impl.cc b/components/filesystem/file_impl.cc
index f378432e724b8ca1226c76058ab315640c05fc3a..25394989477ad5a8641706d67f91a7f6724bf06e 100644
--- a/components/filesystem/file_impl.cc
+++ b/components/filesystem/file_impl.cc
@@ -260,6 +260,16 @@ void FileImpl::Dup(mojo::InterfaceRequest<File> file,
callback.Run(FILE_ERROR_OK);
}
+void FileImpl::Flush(const FlushCallback& callback) {
+ if (!file_.IsValid()) {
+ callback.Run(GetError(file_));
+ return;
+ }
+
+ bool ret = file_.Flush();
+ callback.Run(ret ? FILE_ERROR_OK : FILE_ERROR_FAILED);
+}
+
void FileImpl::AsHandle(const AsHandleCallback& callback) {
if (!file_.IsValid()) {
callback.Run(GetError(file_), ScopedHandle());

Powered by Google App Engine
This is Rietveld 408576698