Index: content/browser/fileapi/recursive_operation_delegate_unittest.cc |
diff --git a/content/browser/fileapi/recursive_operation_delegate_unittest.cc b/content/browser/fileapi/recursive_operation_delegate_unittest.cc |
index ba712bba10955346d2d8cd4ba7a61c612ffdba1c..a99a5575a2d88d50d89a3c8c419935a1aed37b7d 100644 |
--- a/content/browser/fileapi/recursive_operation_delegate_unittest.cc |
+++ b/content/browser/fileapi/recursive_operation_delegate_unittest.cc |
@@ -53,10 +53,14 @@ class LoggingRecursiveOperation : public storage::RecursiveOperationDelegate { |
// RecursiveOperationDelegate overrides. |
void Run() override { NOTREACHED(); } |
- void RunRecursively() override { StartRecursiveOperation(root_, callback_); } |
+ void RunRecursively() override { |
+ StartRecursiveOperation( |
+ root_, storage::FileSystemOperation::ERROR_BEHAVIOR_ABORT, callback_); |
+ } |
- void RunRecursivelyWithIgnoringError(const ErrorCallback& error_callback) { |
- StartRecursiveOperationWithIgnoringError(root_, error_callback, callback_); |
+ void RunRecursivelyWithIgnoringError() { |
+ StartRecursiveOperation( |
+ root_, storage::FileSystemOperation::ERROR_BEHAVIOR_SKIP, callback_); |
} |
void ProcessFile(const FileSystemURL& url, |
@@ -124,15 +128,6 @@ void ReportStatus(base::File::Error* out_error, |
*out_error = error; |
} |
-typedef std::pair<FileSystemURL, base::File::Error> ErrorEntry; |
- |
-void ReportError(std::vector<ErrorEntry>* out_errors, |
- const FileSystemURL& url, |
- base::File::Error error) { |
- DCHECK(out_errors); |
- out_errors->push_back(std::make_pair(url, error)); |
-} |
- |
// To test the Cancel() during operation, calls Cancel() of |operation| |
// after |counter| times message posting. |
void CallCancelLater(storage::RecursiveOperationDelegate* operation, |
@@ -342,23 +337,17 @@ TEST_F(RecursiveOperationDelegateTest, ContinueWithError) { |
FileSystemURL src_file3(CreateFile("src/dir1/file3")); |
base::File::Error error = base::File::FILE_ERROR_FAILED; |
- std::vector<ErrorEntry> errors; |
scoped_ptr<FileSystemOperationContext> context = NewContext(); |
scoped_ptr<LoggingRecursiveOperation> operation( |
new LoggingRecursiveOperation(context->file_system_context(), src_root, |
base::Bind(&ReportStatus, &error))); |
operation->SetEntryToFail(src_file1); |
- operation->RunRecursivelyWithIgnoringError(base::Bind(&ReportError, &errors)); |
+ operation->RunRecursivelyWithIgnoringError(); |
base::RunLoop().RunUntilIdle(); |
// Error code should be base::File::FILE_ERROR_FAILED. |
ASSERT_EQ(base::File::FILE_ERROR_FAILED, error); |
- // Error callback should be called. |
- ASSERT_EQ(1U, errors.size()); |
- ASSERT_EQ(src_file1, errors[0].first); |
- ASSERT_EQ(base::File::FILE_ERROR_FAILED, errors[0].second); |
- |
// Confirm that operation continues after the error. |
const std::vector<LoggingRecursiveOperation::LogEntry>& log_entries = |
operation->log_entries(); |