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

Side by Side 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: fix 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/browser/fileapi/file_system_context.h" 5 #include "webkit/browser/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 return false; 472 return false;
473 #if defined(OS_CHROMEOS) 473 #if defined(OS_CHROMEOS)
474 if (url.type() == kFileSystemTypeTemporary && 474 if (url.type() == kFileSystemTypeTemporary &&
475 sandbox_backend_->enable_temporary_file_system_in_incognito()) { 475 sandbox_backend_->enable_temporary_file_system_in_incognito()) {
476 return true; 476 return true;
477 } 477 }
478 #endif 478 #endif
479 return !is_incognito_ || !FileSystemContext::IsSandboxFileSystem(url.type()); 479 return !is_incognito_ || !FileSystemContext::IsSandboxFileSystem(url.type());
480 } 480 }
481 481
482 bool FileSystemContext::ShouldFlushOnWriteCompletion(
483 FileSystemType type) const {
484 return !IsSandboxFileSystem(type);
kinuko 2014/05/02 05:26:16 This'd look hacky or cryptic, can you comment some
tzik 2014/05/02 06:55:10 Added some comment.
485 }
486
482 void FileSystemContext::OpenPluginPrivateFileSystem( 487 void FileSystemContext::OpenPluginPrivateFileSystem(
483 const GURL& origin_url, 488 const GURL& origin_url,
484 FileSystemType type, 489 FileSystemType type,
485 const std::string& filesystem_id, 490 const std::string& filesystem_id,
486 const std::string& plugin_id, 491 const std::string& plugin_id,
487 OpenFileSystemMode mode, 492 OpenFileSystemMode mode,
488 const StatusCallback& callback) { 493 const StatusCallback& callback) {
489 DCHECK(plugin_private_backend_); 494 DCHECK(plugin_private_backend_);
490 plugin_private_backend_->OpenPrivateFileSystem( 495 plugin_private_backend_->OpenPrivateFileSystem(
491 origin_url, type, filesystem_id, plugin_id, mode, callback); 496 origin_url, type, filesystem_id, plugin_id, mode, callback);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 } else if (parent != child) { 612 } else if (parent != child) {
608 bool result = parent.AppendRelativePath(child, &path); 613 bool result = parent.AppendRelativePath(child, &path);
609 DCHECK(result); 614 DCHECK(result);
610 } 615 }
611 616
612 operation_runner()->GetMetadata( 617 operation_runner()->GetMetadata(
613 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info)); 618 url, base::Bind(&DidGetMetadataForResolveURL, path, callback, info));
614 } 619 }
615 620
616 } // namespace fileapi 621 } // namespace fileapi
OLDNEW
« 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