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

Unified Diff: webkit/fileapi/local_file_system_operation.cc

Issue 10834167: Create ShareableFileReference on IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding unknown policy for DCHECK Created 8 years, 4 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
« no previous file with comments | « webkit/fileapi/local_file_system_operation.h ('k') | webkit/fileapi/local_file_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/local_file_system_operation.cc
diff --git a/webkit/fileapi/local_file_system_operation.cc b/webkit/fileapi/local_file_system_operation.cc
index d197dfd4cb1fec30ddb9294fd49d7ee93a182702..bbae406692db1add95a27a128df7c1a6cbc86a24 100644
--- a/webkit/fileapi/local_file_system_operation.cc
+++ b/webkit/fileapi/local_file_system_operation.cc
@@ -24,6 +24,8 @@
#include "webkit/quota/quota_manager.h"
#include "webkit/quota/quota_types.h"
+using webkit_blob::ShareableFileReference;
+
namespace fileapi {
class LocalFileSystemOperation::ScopedQuotaNotifier {
@@ -676,7 +678,14 @@ void LocalFileSystemOperation::DidCreateSnapshotFile(
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
const FilePath& platform_path,
- const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
+ FileSystemFileUtil::SnapshotFilePolicy snapshot_policy) {
+ scoped_refptr<ShareableFileReference> file_ref;
+ if (result == base::PLATFORM_FILE_OK &&
+ snapshot_policy == FileSystemFileUtil::kSnapshotFileTemporary) {
+ file_ref = ShareableFileReference::GetOrCreate(
+ platform_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
+ file_system_context()->file_task_runner());
+ }
callback.Run(result, file_info, platform_path, file_ref);
}
« no previous file with comments | « webkit/fileapi/local_file_system_operation.h ('k') | webkit/fileapi/local_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698