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

Unified Diff: webkit/browser/fileapi/file_system_context.cc

Issue 264993002: [FileAPI] Remove Flush() on write completion on SandboxFileSystems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: +comment Created 6 years, 8 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: webkit/browser/fileapi/file_system_context.cc
diff --git a/webkit/browser/fileapi/file_system_context.cc b/webkit/browser/fileapi/file_system_context.cc
index 549293959aac5d891256b30ea686913989e7b98c..2bf6a0f14d1c24059d5151d045dd807710696f26 100644
--- a/webkit/browser/fileapi/file_system_context.cc
+++ b/webkit/browser/fileapi/file_system_context.cc
@@ -479,6 +479,17 @@ bool FileSystemContext::CanServeURLRequest(const FileSystemURL& url) const {
return !is_incognito_ || !FileSystemContext::IsSandboxFileSystem(url.type());
}
+bool FileSystemContext::ShouldFlushOnWriteCompletion(
+ FileSystemType type) const {
+ if (IsSandboxFileSystem(type)) {
+ // Disable Flush() for each write operation on SandboxFileSystems since it
+ // hurts the performance, assuming the FileSystems are stored in a local
+ // disk, we don't need to keep calling fsync() for it.
kinuko 2014/05/02 07:02:48 Maybe... it'd be also better note that some non-sa
tzik 2014/05/02 07:37:24 Wrote some more about non-sandboxed filesystem.
+ return false;
+ }
+ return true;
+}
+
void FileSystemContext::OpenPluginPrivateFileSystem(
const GURL& origin_url,
FileSystemType type,
« no previous file with comments | « webkit/browser/fileapi/file_system_context.h ('k') | webkit/browser/fileapi/file_system_operation_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698