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

Unified Diff: content/public/test/async_file_test_helper.cc

Issue 181063031: Fix AsyncFileTestHelper::ReadDirectory to handle has_more correctly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/async_file_test_helper.cc
diff --git a/content/public/test/async_file_test_helper.cc b/content/public/test/async_file_test_helper.cc
index 2da0bf8d1153c8f480cd6a4302c925534eb39628..26a25736f69bf3ea32099d5de1701d3f7a4ec168 100644
--- a/content/public/test/async_file_test_helper.cc
+++ b/content/public/test/async_file_test_helper.cc
@@ -19,6 +19,8 @@ namespace content {
typedef fileapi::FileSystemOperation::FileEntryList FileEntryList;
+namespace {
+
void AssignAndQuit(base::RunLoop* run_loop,
base::File::Error* result_out,
base::File::Error result) {
@@ -65,7 +67,7 @@ void ReadDirectoryCallback(base::RunLoop* run_loop,
const FileEntryList& entries,
bool has_more) {
*result_out = result;
- *entries_out = entries;
+ entries_out->insert(entries_out->end(), entries.begin(), entries.end());
if (result != base::File::FILE_OK || !has_more)
run_loop->Quit();
}
@@ -84,6 +86,8 @@ void DidGetUsageAndQuota(quota::QuotaStatusCode* status_out,
*quota_out = quota;
}
+} // namespace
+
const int64 AsyncFileTestHelper::kDontCheckSize = -1;
base::File::Error AsyncFileTestHelper::Copy(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698