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

Unified Diff: chrome/browser/media_gallery/win/mtp_device_object_entry.h

Issue 11297002: [Media Gallery] Added code to support mtp device media file system on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comment and disabled MediaFileSystemRegistryTest.GalleryNameMTP Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/media_gallery/win/mtp_device_object_entry.h
diff --git a/chrome/browser/media_gallery/win/mtp_device_object_entry.h b/chrome/browser/media_gallery/win/mtp_device_object_entry.h
new file mode 100644
index 0000000000000000000000000000000000000000..5f67270413a6c355dbfc56d3fd44774b53f8e6ba
--- /dev/null
+++ b/chrome/browser/media_gallery/win/mtp_device_object_entry.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_
+#define CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_
+
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/string16.h"
+#include "base/time.h"
+
+namespace chrome {
+
+// MTPDeviceObjectEntry contains information about the media transfer protocol
Lei Zhang 2013/01/14 20:49:02 This comment is not helpful. It just says foo cont
kmadhusu 2013/01/15 19:08:17 Rephrased the comment to include details about the
+// device (MTP) object entry.
+struct MTPDeviceObjectEntry {
+ MTPDeviceObjectEntry(); // Necessary for STL.
+ MTPDeviceObjectEntry(const string16& object_id,
+ const string16& object_name,
+ bool is_directory,
+ int64 size,
+ const base::Time& last_modified_time);
+
+ // The object identifier, e.g. "o299".
Lei Zhang 2013/01/14 20:49:02 Where does this ID come from?
kmadhusu 2013/01/15 19:08:17 ID is obtained from IEnumPortableDeviceObjectIDs i
+ string16 object_id;
+
+ // Friendly name of the object, e.g. "IMG_9911.jpeg".
Lei Zhang 2013/01/14 20:49:02 Is this always just the file name or the full path
kmadhusu 2013/01/15 19:08:17 This field always store the file name.
+ string16 name;
+
+ // True if the current object is a directory/folder/album content type.
+ bool is_directory;
+
+ // The object file size in bytes, e.g. "882992".
+ int64 size;
+
+ // Last modified time of the object.
+ base::Time last_modified_time;
+};
+
+typedef std::vector<MTPDeviceObjectEntry> MTPDeviceObjectEntries;
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_MEDIA_GALLERY_WIN_MTP_DEVICE_OBJECT_ENTRY_H_

Powered by Google App Engine
This is Rietveld 408576698