| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/recursive_operation_delegate.h" | 5 #include "storage/browser/fileapi/recursive_operation_delegate.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void ProcessFile(const FileSystemURL& url, | 66 void ProcessFile(const FileSystemURL& url, |
| 67 const StatusCallback& callback) override { | 67 const StatusCallback& callback) override { |
| 68 RecordLogEntry(LogEntry::PROCESS_FILE, url); | 68 RecordLogEntry(LogEntry::PROCESS_FILE, url); |
| 69 | 69 |
| 70 if (error_url_.is_valid() && error_url_ == url) { | 70 if (error_url_.is_valid() && error_url_ == url) { |
| 71 callback.Run(base::File::FILE_ERROR_FAILED); | 71 callback.Run(base::File::FILE_ERROR_FAILED); |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 | 74 |
| 75 operation_runner()->GetMetadata( | 75 operation_runner()->GetMetadata( |
| 76 url, | 76 url, storage::FileSystemOperation::GET_METADATA_FIELD_IS_DIRECTORY, |
| 77 base::Bind(&LoggingRecursiveOperation::DidGetMetadata, | 77 base::Bind(&LoggingRecursiveOperation::DidGetMetadata, |
| 78 weak_factory_.GetWeakPtr(), callback)); | 78 weak_factory_.GetWeakPtr(), callback)); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ProcessDirectory(const FileSystemURL& url, | 81 void ProcessDirectory(const FileSystemURL& url, |
| 82 const StatusCallback& callback) override { | 82 const StatusCallback& callback) override { |
| 83 RecordLogEntry(LogEntry::PROCESS_DIRECTORY, url); | 83 RecordLogEntry(LogEntry::PROCESS_DIRECTORY, url); |
| 84 callback.Run(base::File::FILE_OK); | 84 callback.Run(base::File::FILE_OK); |
| 85 } | 85 } |
| 86 | 86 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 EXPECT_EQ(LoggingRecursiveOperation::LogEntry::POST_PROCESS_DIRECTORY, | 380 EXPECT_EQ(LoggingRecursiveOperation::LogEntry::POST_PROCESS_DIRECTORY, |
| 381 log_entries[6].type); | 381 log_entries[6].type); |
| 382 EXPECT_EQ(src_dir1, log_entries[6].url); | 382 EXPECT_EQ(src_dir1, log_entries[6].url); |
| 383 | 383 |
| 384 EXPECT_EQ(LoggingRecursiveOperation::LogEntry::POST_PROCESS_DIRECTORY, | 384 EXPECT_EQ(LoggingRecursiveOperation::LogEntry::POST_PROCESS_DIRECTORY, |
| 385 log_entries[7].type); | 385 log_entries[7].type); |
| 386 EXPECT_EQ(src_root, log_entries[7].url); | 386 EXPECT_EQ(src_root, log_entries[7].url); |
| 387 } | 387 } |
| 388 | 388 |
| 389 } // namespace content | 389 } // namespace content |
| OLD | NEW |