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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_object_enumerator.h

Issue 27094003: Remove fileapi::FileSystemFileUtil dependency in media gallery code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This class enumerates the media transfer protocol (MTP) device objects from 5 // This class enumerates the media transfer protocol (MTP) device objects from
6 // a given object entry list. 6 // a given object entry list.
7 7
8 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_ 8 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_
9 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_ 9 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/threading/thread_checker.h" 12 #include "base/threading/thread_checker.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "chrome/browser/media_galleries/win/mtp_device_object_entry.h" 14 #include "chrome/browser/media_galleries/win/mtp_device_object_entry.h"
15 #include "webkit/browser/fileapi/file_system_file_util.h"
16 15
17 // MTPDeviceObjectEnumerator is used to enumerate the media transfer protocol 16 // MTPDeviceObjectEnumerator is used to enumerate the media transfer protocol
18 // (MTP) device objects from a given object entry list. 17 // (MTP) device objects from a given object entry list.
19 // MTPDeviceObjectEnumerator supports MTP device file operations. 18 // MTPDeviceObjectEnumerator supports MTP device file operations.
20 // MTPDeviceObjectEnumerator may only be used on a single thread. 19 // MTPDeviceObjectEnumerator may only be used on a single thread.
21 class MTPDeviceObjectEnumerator 20 class MTPDeviceObjectEnumerator {
22 : public fileapi::FileSystemFileUtil::AbstractFileEnumerator {
23 public: 21 public:
24 explicit MTPDeviceObjectEnumerator(const MTPDeviceObjectEntries& entries); 22 explicit MTPDeviceObjectEnumerator(const MTPDeviceObjectEntries& entries);
25 virtual ~MTPDeviceObjectEnumerator(); 23 ~MTPDeviceObjectEnumerator();
26 24
27 // AbstractFileEnumerator: 25 base::FilePath Next();
28 virtual base::FilePath Next() OVERRIDE; 26 int64 Size();
29 virtual int64 Size() OVERRIDE; 27 bool IsDirectory();
30 virtual bool IsDirectory() OVERRIDE; 28 base::Time LastModifiedTime();
31 virtual base::Time LastModifiedTime() OVERRIDE;
32 29
33 // If the current file object entry is valid, returns an non-empty object id. 30 // If the current file object entry is valid, returns an non-empty object id.
34 // Returns an empty string otherwise. 31 // Returns an empty string otherwise.
35 string16 GetObjectId() const; 32 string16 GetObjectId() const;
36 33
37 private: 34 private:
38 // Returns true if the enumerator has more entries to traverse, false 35 // Returns true if the enumerator has more entries to traverse, false
39 // otherwise. 36 // otherwise.
40 bool HasMoreEntries() const; 37 bool HasMoreEntries() const;
41 38
(...skipping 10 matching lines...) Expand all
52 49
53 // Initially false. Set to true after Next() has been called. 50 // Initially false. Set to true after Next() has been called.
54 bool is_index_ready_; 51 bool is_index_ready_;
55 52
56 base::ThreadChecker thread_checker_; 53 base::ThreadChecker thread_checker_;
57 54
58 DISALLOW_COPY_AND_ASSIGN(MTPDeviceObjectEnumerator); 55 DISALLOW_COPY_AND_ASSIGN(MTPDeviceObjectEnumerator);
59 }; 56 };
60 57
61 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_ 58 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_OBJECT_ENUMERATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698