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

Unified Diff: chrome/browser/system_monitor/removable_storage_notifications.h

Issue 12211084: [Media Galleries] Populate volume metadata in ChromeOS/Linux (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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/system_monitor/removable_storage_notifications.h
diff --git a/chrome/browser/system_monitor/removable_storage_notifications.h b/chrome/browser/system_monitor/removable_storage_notifications.h
index e916dea83fdc0ed3f1fadb65729e269f983a5234..d6df0f4e885192f2ecde3739912116970bdf55ae 100644
--- a/chrome/browser/system_monitor/removable_storage_notifications.h
+++ b/chrome/browser/system_monitor/removable_storage_notifications.h
@@ -9,6 +9,7 @@
#include "base/observer_list_threadsafe.h"
#include "base/string16.h"
#include "base/synchronization/lock.h"
+#include "chrome/browser/system_monitor/media_storage_util.h"
class ChromeBrowserMainPartsLinux;
class ChromeBrowserMainPartsMac;
@@ -30,13 +31,37 @@ class RemovableStorageNotifications {
const base::FilePath::StringType& device_location);
// Unique device id - persists between device attachments.
+ // This is the string that should be used as the label for a particular
+ // storage device when interacting with the API. Clients should treat
+ // this as an opaque string.
std::string device_id;
// Human readable removable storage device name.
string16 name;
vandebo (ex-Chrome) 2013/02/08 02:03:31 Do you want to remove this and instead have a func
Greg Billock 2013/02/08 16:42:02 Yes. I left it alone for now -- my idea was to str
vandebo (ex-Chrome) 2013/02/08 23:20:36 I think that's a sufficiently focused CL: Push nam
// Current attached removable storage device location.
+ // TODO(gbillock): Just use a FilePath here?
vandebo (ex-Chrome) 2013/02/08 02:03:31 For MTP devices it is not a real file path.
Greg Billock 2013/02/08 16:42:02 Right. They'd leave the FilePath as empty(). Curre
vandebo (ex-Chrome) 2013/02/08 23:20:36 But we need a location string to be able to connec
base::FilePath::StringType location;
+
+ // Label given to this storage device by the user.
+ // May be empty if not found or the device is unlabeled.
+ string16 storage_label;
+
+ // Vendor name for the removable device. (Human readable)
+ // May be empty if not collected.
+ string16 vendor_name;
+
+ // Model name for the removable device. (Human readable)
+ // May be empty if not collected.
+ string16 model_name;
+
+ // Size of the removable device in bytes.
+ // Zero if not collected or unknown.
+ uint64 total_size_in_bytes;
+
+ // Type of device.
+ // TODO(gbillock): Move this enum to this class.
+ MediaStorageUtil::Type device_type;
vandebo (ex-Chrome) 2013/02/08 02:03:31 This is already in device_id, there's no reason to
Greg Billock 2013/02/08 16:42:02 The existence of CrackDeviceId and MakeDeviceId me
vandebo (ex-Chrome) 2013/02/08 23:20:36 Prefs only stores a device id. To make them store
};
// This interface is provided to generators of storage notifications.
@@ -44,9 +69,7 @@ class RemovableStorageNotifications {
public:
virtual ~Receiver();
- virtual void ProcessAttach(const std::string& id,
- const string16& name,
- const base::FilePath::StringType& location) = 0;
+ virtual void ProcessAttach(const StorageInfo& info) = 0;
virtual void ProcessDetach(const std::string& id) = 0;
};

Powered by Google App Engine
This is Rietveld 408576698