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

Side by Side Diff: webkit/fileapi/syncable/syncable_file_system_operation.cc

Issue 12018017: FileAPI: Split recursive remove into multiple async tasks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + addressed comment #2 Created 7 years, 11 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/remove_operation_delegate.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | 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) 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/fileapi/syncable/syncable_file_system_operation.h" 5 #include "webkit/fileapi/syncable/syncable_file_system_operation.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "webkit/blob/shareable_file_reference.h" 8 #include "webkit/blob/shareable_file_reference.h"
9 #include "webkit/fileapi/file_system_context.h" 9 #include "webkit/fileapi/file_system_context.h"
10 #include "webkit/fileapi/file_system_url.h" 10 #include "webkit/fileapi/file_system_url.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 const StatusCallback& cancel_callback) { 307 const StatusCallback& cancel_callback) {
308 DCHECK(CalledOnValidThread()); 308 DCHECK(CalledOnValidThread());
309 DCHECK(file_system_operation_); 309 DCHECK(file_system_operation_);
310 completion_callback_ = cancel_callback; 310 completion_callback_ = cancel_callback;
311 file_system_operation_->Cancel( 311 file_system_operation_->Cancel(
312 base::Bind(&self::DidFinish, base::Owned(this))); 312 base::Bind(&self::DidFinish, base::Owned(this)));
313 } 313 }
314 314
315 LocalFileSystemOperation* 315 LocalFileSystemOperation*
316 SyncableFileSystemOperation::AsLocalFileSystemOperation() { 316 SyncableFileSystemOperation::AsLocalFileSystemOperation() {
317 NOTREACHED(); 317 return file_system_operation_;
318 return NULL;
319 } 318 }
320 319
321 void SyncableFileSystemOperation::CreateSnapshotFile( 320 void SyncableFileSystemOperation::CreateSnapshotFile(
322 const FileSystemURL& path, 321 const FileSystemURL& path,
323 const SnapshotFileCallback& callback) { 322 const SnapshotFileCallback& callback) {
324 DCHECK(CalledOnValidThread()); 323 DCHECK(CalledOnValidThread());
325 if (!operation_runner_) { 324 if (!operation_runner_) {
326 callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND, 325 callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND,
327 base::PlatformFileInfo(), FilePath(), NULL); 326 base::PlatformFileInfo(), FilePath(), NULL);
328 delete file_system_operation_; 327 delete file_system_operation_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 381
383 void SyncableFileSystemOperation::AbortOperation( 382 void SyncableFileSystemOperation::AbortOperation(
384 const StatusCallback& callback, 383 const StatusCallback& callback,
385 base::PlatformFileError error) { 384 base::PlatformFileError error) {
386 callback.Run(error); 385 callback.Run(error);
387 delete file_system_operation_; 386 delete file_system_operation_;
388 delete this; 387 delete this;
389 } 388 }
390 389
391 } // namespace fileapi 390 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/remove_operation_delegate.cc ('k') | webkit/fileapi/webkit_fileapi.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698