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

Side by Side Diff: chrome/browser/media_galleries/fileapi/iphoto_file_util_unittest.cc

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
OLDNEW
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 <map> 5 #include <map>
6 #include <set> 6 #include <set>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 23 matching lines...) Expand all
34 using fileapi::FileSystemURL; 34 using fileapi::FileSystemURL;
35 35
36 namespace iphoto { 36 namespace iphoto {
37 37
38 namespace { 38 namespace {
39 39
40 void ReadDirectoryTestHelperCallback( 40 void ReadDirectoryTestHelperCallback(
41 base::RunLoop* run_loop, 41 base::RunLoop* run_loop,
42 FileSystemOperation::FileEntryList* contents, 42 FileSystemOperation::FileEntryList* contents,
43 bool* completed, 43 bool* completed,
44 base::PlatformFileError error, 44 base::File::Error error,
45 const FileSystemOperation::FileEntryList& file_list, 45 const FileSystemOperation::FileEntryList& file_list,
46 bool has_more) { 46 bool has_more) {
47 DCHECK(!*completed); 47 DCHECK(!*completed);
48 *completed = !has_more && error == base::PLATFORM_FILE_OK; 48 *completed = !has_more && error == base::File::FILE_OK;
49 *contents = file_list; 49 *contents = file_list;
50 run_loop->Quit(); 50 run_loop->Quit();
51 } 51 }
52 52
53 void ReadDirectoryTestHelper(fileapi::FileSystemOperationRunner* runner, 53 void ReadDirectoryTestHelper(fileapi::FileSystemOperationRunner* runner,
54 const FileSystemURL& url, 54 const FileSystemURL& url,
55 FileSystemOperation::FileEntryList* contents, 55 FileSystemOperation::FileEntryList* contents,
56 bool* completed) { 56 bool* completed) {
57 DCHECK(contents); 57 DCHECK(contents);
58 DCHECK(completed); 58 DCHECK(completed);
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 completed = false; 337 completed = false;
338 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed); 338 ReadDirectoryTestHelper(operation_runner(), url, &contents, &completed);
339 ASSERT_TRUE(completed); 339 ASSERT_TRUE(completed);
340 ASSERT_EQ(1u, contents.size()); 340 ASSERT_EQ(1u, contents.size());
341 341
342 EXPECT_FALSE(contents.front().is_directory); 342 EXPECT_FALSE(contents.front().is_directory);
343 EXPECT_EQ("a.jpg", contents.front().name); 343 EXPECT_EQ("a.jpg", contents.front().name);
344 } 344 }
345 345
346 } // namespace iphoto 346 } // namespace iphoto
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/fileapi/iphoto_file_util.cc ('k') | chrome/browser/media_galleries/fileapi/itunes_file_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698