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

Side by Side Diff: chrome/browser/media_gallery/linux/mtp_device_object_enumerator.cc

Issue 11348337: Move MTPDeviceDelegateImplLinux worker classes to its own files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/media_gallery/linux/mtp_device_object_enumerator.h"
6
7 namespace chrome {
8
9 MTPDeviceObjectEnumerator::MTPDeviceObjectEnumerator(
10 const MtpFileEntries& entries)
11 : file_entries_(entries),
12 file_entry_iter_(file_entries_.begin()) {
13 }
14
15 MTPDeviceObjectEnumerator::~MTPDeviceObjectEnumerator() {
16 }
17
18 FilePath MTPDeviceObjectEnumerator::Next() {
19 if (file_entry_iter_ == file_entries_.end())
20 return FilePath();
21
22 current_file_info_ = *file_entry_iter_;
23 ++file_entry_iter_;
24 return FilePath(current_file_info_.file_name());
25 }
26
27 int64 MTPDeviceObjectEnumerator::Size() {
28 return current_file_info_.file_size();
29 }
30
31 bool MTPDeviceObjectEnumerator::IsDirectory() {
32 return current_file_info_.file_type() == MtpFileEntry::FILE_TYPE_FOLDER;
33 }
34
35 base::Time MTPDeviceObjectEnumerator::LastModifiedTime() {
36 return base::Time::FromTimeT(current_file_info_.modification_time());
37 }
38
39 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698