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

Side by Side Diff: webkit/fileapi/file_system_operation.cc

Issue 8311012: base::Bind: Convert FileUtilProxy::EnsureFileExistsCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pipelining. Created 9 years, 2 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
« no previous file with comments | « webkit/fileapi/file_system_file_util_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/fileapi/file_system_operation.h" 5 #include "webkit/fileapi/file_system_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 quota_util_helper_.reset(new ScopedQuotaUtilHelper( 133 quota_util_helper_.reset(new ScopedQuotaUtilHelper(
134 file_system_context(), 134 file_system_context(),
135 file_system_operation_context_.src_origin_url(), 135 file_system_operation_context_.src_origin_url(),
136 file_system_operation_context_.src_type())); 136 file_system_operation_context_.src_type()));
137 137
138 FileSystemFileUtilProxy::EnsureFileExists( 138 FileSystemFileUtilProxy::EnsureFileExists(
139 file_system_operation_context_, 139 file_system_operation_context_,
140 proxy_, 140 proxy_,
141 src_virtual_path_, 141 src_virtual_path_,
142 callback_factory_.NewCallback( 142 base::Bind(
143 exclusive_ ? &FileSystemOperation::DidEnsureFileExistsExclusive 143 exclusive_ ? &FileSystemOperation::DidEnsureFileExistsExclusive
144 : &FileSystemOperation::DidEnsureFileExistsNonExclusive)); 144 : &FileSystemOperation::DidEnsureFileExistsNonExclusive,
145 weak_factory_.GetWeakPtr()));
145 } 146 }
146 147
147 void FileSystemOperation::CreateDirectory(const GURL& path, 148 void FileSystemOperation::CreateDirectory(const GURL& path,
148 bool exclusive, 149 bool exclusive,
149 bool recursive) { 150 bool recursive) {
150 #ifndef NDEBUG 151 #ifndef NDEBUG
151 DCHECK(kOperationNone == pending_operation_); 152 DCHECK(kOperationNone == pending_operation_);
152 pending_operation_ = kOperationCreateDirectory; 153 pending_operation_ = kOperationCreateDirectory;
153 #endif 154 #endif
154 GURL origin_url; 155 GURL origin_url;
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 return false; 893 return false;
893 } 894 }
894 DCHECK(file_util); 895 DCHECK(file_util);
895 *file_util = file_system_context()->path_manager()->GetFileUtil(*type); 896 *file_util = file_system_context()->path_manager()->GetFileUtil(*type);
896 DCHECK(*file_util); 897 DCHECK(*file_util);
897 898
898 return true; 899 return true;
899 } 900 }
900 901
901 } // namespace fileapi 902 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_file_util_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698