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

Side by Side Diff: storage/browser/fileapi/remove_operation_delegate.cc

Issue 1194783002: Add fileManagerPrivate.onCopyError event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove const and rename enum. Created 5 years, 6 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
« no previous file with comments | « storage/browser/fileapi/recursive_operation_delegate.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "storage/browser/fileapi/remove_operation_delegate.h" 5 #include "storage/browser/fileapi/remove_operation_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "storage/browser/fileapi/file_system_context.h" 8 #include "storage/browser/fileapi/file_system_context.h"
9 #include "storage/browser/fileapi/file_system_operation_runner.h" 9 #include "storage/browser/fileapi/file_system_operation_runner.h"
10 10
(...skipping 10 matching lines...) Expand all
21 } 21 }
22 22
23 RemoveOperationDelegate::~RemoveOperationDelegate() {} 23 RemoveOperationDelegate::~RemoveOperationDelegate() {}
24 24
25 void RemoveOperationDelegate::Run() { 25 void RemoveOperationDelegate::Run() {
26 operation_runner()->RemoveFile(url_, base::Bind( 26 operation_runner()->RemoveFile(url_, base::Bind(
27 &RemoveOperationDelegate::DidTryRemoveFile, weak_factory_.GetWeakPtr())); 27 &RemoveOperationDelegate::DidTryRemoveFile, weak_factory_.GetWeakPtr()));
28 } 28 }
29 29
30 void RemoveOperationDelegate::RunRecursively() { 30 void RemoveOperationDelegate::RunRecursively() {
31 StartRecursiveOperation(url_, callback_); 31 StartRecursiveOperation(url_, FileSystemOperation::ERROR_BEHAVIOR_ABORT,
32 callback_);
32 } 33 }
33 34
34 void RemoveOperationDelegate::ProcessFile(const FileSystemURL& url, 35 void RemoveOperationDelegate::ProcessFile(const FileSystemURL& url,
35 const StatusCallback& callback) { 36 const StatusCallback& callback) {
36 operation_runner()->RemoveFile( 37 operation_runner()->RemoveFile(
37 url, 38 url,
38 base::Bind(&RemoveOperationDelegate::DidRemoveFile, 39 base::Bind(&RemoveOperationDelegate::DidRemoveFile,
39 weak_factory_.GetWeakPtr(), callback)); 40 weak_factory_.GetWeakPtr(), callback));
40 } 41 }
41 42
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 void RemoveOperationDelegate::DidRemoveFile(const StatusCallback& callback, 74 void RemoveOperationDelegate::DidRemoveFile(const StatusCallback& callback,
74 base::File::Error error) { 75 base::File::Error error) {
75 if (error == base::File::FILE_ERROR_NOT_FOUND) { 76 if (error == base::File::FILE_ERROR_NOT_FOUND) {
76 callback.Run(base::File::FILE_OK); 77 callback.Run(base::File::FILE_OK);
77 return; 78 return;
78 } 79 }
79 callback.Run(error); 80 callback.Run(error);
80 } 81 }
81 82
82 } // namespace storage 83 } // namespace storage
OLDNEW
« no previous file with comments | « storage/browser/fileapi/recursive_operation_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698