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

Unified Diff: base/system_monitor/system_monitor.h

Issue 10873072: Rename SystemMonitor's MediaDevice calls to RemovableStorage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor.h
===================================================================
--- base/system_monitor/system_monitor.h (revision 153336)
+++ base/system_monitor/system_monitor.h (working copy)
@@ -58,18 +58,18 @@
DEVTYPE_UNKNOWN, // Other devices.
};
- struct BASE_EXPORT MediaDeviceInfo {
- MediaDeviceInfo(const std::string& id,
- const string16& device_name,
- const FilePath::StringType& device_location);
+ struct BASE_EXPORT RemovableStorageInfo {
+ RemovableStorageInfo(const std::string& id,
+ const string16& device_name,
+ const FilePath::StringType& device_location);
- // Unique media device id - persists between device attachments.
+ // Unique device id - persists between device attachments.
std::string unique_id;
vandebo (ex-Chrome) 2012/08/25 00:58:10 nit: while you're here, can you make this device_i
Lei Zhang 2012/08/25 01:12:26 Done.
- // Human readable media device name.
+ // Human readable removable storage device name.
string16 name;
- // Current attached media device location.
+ // Current attached removable storage device location.
FilePath::StringType location;
};
@@ -93,8 +93,8 @@
#endif // OS_IOS
#endif // OS_MACOSX
- // Returns information for attached media devices.
- std::vector<MediaDeviceInfo> GetAttachedMediaDevices() const;
+ // Returns information for attached removable storages.
vandebo (ex-Chrome) 2012/08/25 00:58:10 nit: storages? Storage is generally both plural an
Lei Zhang 2012/08/25 01:12:26 Done.
+ std::vector<RemovableStorageInfo> GetAttachedRemovableStorages() const;
//
// Power-related APIs
@@ -134,14 +134,14 @@
// This is only implemented on Windows currently.
virtual void OnDevicesChanged(DeviceType device_type) {}
- // When a media device is attached or detached, one of these two events
- // is triggered.
- virtual void OnMediaDeviceAttached(const std::string& id,
- const string16& name,
- const FilePath::StringType& location) {}
+ // When a removable storage device is attached or detached, one of these
+ // two events is triggered.
+ virtual void OnRemovableStorageAttached(
+ const std::string& id,
+ const string16& name,
+ const FilePath::StringType& location) {}
+ virtual void OnRemovableStorageDetached(const std::string& id) {}
- virtual void OnMediaDeviceDetached(const std::string& id) {}
-
protected:
virtual ~DevicesChangedObserver() {}
};
@@ -170,14 +170,14 @@
// Cross-platform handling of a device change event.
void ProcessDevicesChanged(DeviceType device_type);
- void ProcessMediaDeviceAttached(const std::string& id,
- const string16& name,
- const FilePath::StringType& location);
- void ProcessMediaDeviceDetached(const std::string& id);
+ void ProcessRemovableStorageAttached(const std::string& id,
+ const string16& name,
+ const FilePath::StringType& location);
+ void ProcessRemovableStorageDetached(const std::string& id);
private:
// Mapping of unique device id to device info tuple.
- typedef std::map<std::string, MediaDeviceInfo> MediaDeviceMap;
+ typedef std::map<std::string, RemovableStorageInfo> RemovableStorageMap;
#if defined(OS_MACOSX)
void PlatformInit();
@@ -195,10 +195,10 @@
// Functions to trigger notifications.
void NotifyDevicesChanged(DeviceType device_type);
- void NotifyMediaDeviceAttached(const std::string& id,
- const string16& name,
- const FilePath::StringType& data);
- void NotifyMediaDeviceDetached(const std::string& id);
+ void NotifyRemovableStorageAttached(const std::string& id,
+ const string16& name,
+ const FilePath::StringType& location);
+ void NotifyRemovableStorageDetached(const std::string& id);
void NotifyPowerStateChange();
void NotifySuspend();
void NotifyResume();
@@ -218,8 +218,8 @@
std::vector<id> notification_observers_;
#endif
- // Map of all the attached media devices.
- MediaDeviceMap media_device_map_;
+ // Map of all the attached removable storage devices.
+ RemovableStorageMap removable_storage_map_;
DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
};
« no previous file with comments | « no previous file | base/system_monitor/system_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698