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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc

Issue 14671020: FileAPI: Copy base::FileUtilProxy::Entry to fileapi::DirectoryEntry (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build and remove base/ change Created 7 years, 7 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 (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 // MTPDeviceDelegateImplWin implementation. 5 // MTPDeviceDelegateImplWin implementation.
6 6
7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h" 7 #include "chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h"
8 8
9 #include <portabledevice.h> 9 #include <portabledevice.h>
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (error != base::PLATFORM_FILE_OK) 201 if (error != base::PLATFORM_FILE_OK)
202 return error; 202 return error;
203 203
204 if (!file_info.is_directory) 204 if (!file_info.is_directory)
205 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY; 205 return base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
206 206
207 base::FilePath current; 207 base::FilePath current;
208 scoped_ptr<fileapi::FileSystemFileUtil::AbstractFileEnumerator> file_enum = 208 scoped_ptr<fileapi::FileSystemFileUtil::AbstractFileEnumerator> file_enum =
209 CreateFileEnumeratorOnBlockingPoolThread(device_info, root); 209 CreateFileEnumeratorOnBlockingPoolThread(device_info, root);
210 while (!(current = file_enum->Next()).empty()) { 210 while (!(current = file_enum->Next()).empty()) {
211 fileapi::AsyncFileUtil::Entry entry; 211 fileapi::DirectoryEntry entry;
212 entry.is_directory = file_enum->IsDirectory(); 212 entry.is_directory = file_enum->IsDirectory();
213 entry.name = fileapi::VirtualPath::BaseName(current).value(); 213 entry.name = fileapi::VirtualPath::BaseName(current).value();
214 entry.size = file_enum->Size(); 214 entry.size = file_enum->Size();
215 entry.last_modified_time = file_enum->LastModifiedTime(); 215 entry.last_modified_time = file_enum->LastModifiedTime();
216 entries->push_back(entry); 216 entries->push_back(entry);
217 } 217 }
218 return error; 218 return error;
219 } 219 }
220 220
221 // Gets the device file stream object on a blocking pool thread. 221 // Gets the device file stream object on a blocking pool thread.
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } else { 613 } else {
614 current_snapshot_details_->request_info().error_callback.Run( 614 current_snapshot_details_->request_info().error_callback.Run(
615 base::PLATFORM_FILE_ERROR_FAILED); 615 base::PLATFORM_FILE_ERROR_FAILED);
616 } 616 }
617 task_in_progress_ = false; 617 task_in_progress_ = false;
618 current_snapshot_details_.reset(); 618 current_snapshot_details_.reset();
619 ProcessNextPendingRequest(); 619 ProcessNextPendingRequest();
620 } 620 }
621 621
622 } // namespace chrome 622 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.mm ('k') | content/browser/fileapi/fileapi_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698