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

Unified Diff: chrome/browser/storage_monitor/storage_info.h

Issue 19489006: Media Galleries: Move gallery name generation back to StorageMonitor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 7 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
Index: chrome/browser/storage_monitor/storage_info.h
===================================================================
--- chrome/browser/storage_monitor/storage_info.h (revision 218837)
+++ chrome/browser/storage_monitor/storage_info.h (working copy)
@@ -10,7 +10,7 @@
namespace chrome {
-struct StorageInfo {
+class StorageInfo {
public:
enum Type {
// A removable mass storage device with a DCIM directory.
@@ -32,7 +32,6 @@
StorageInfo();
// Note: |device_id_in| should be constructed with MakeDeviceId.
StorageInfo(const std::string& device_id_in,
- const string16& device_name,
const base::FilePath::StringType& device_location,
const string16& label,
const string16& vendor,
@@ -66,8 +65,15 @@
static bool IsPicasaDevice(const std::string& device_id);
+ // Get the display name for the removable device represented by this
+ // StorageInfo. Include the size for removable devices if |with_size| is true.
+ base::string16 GetDisplayName(bool with_size) const;
+
+ // Same as GetDisplayName(), but may be overridden by |override_display_name|.
+ base::string16 GetDisplayNameWithOverride(
+ const base::string16& override_display_name, bool with_size) const;
+
const std::string& device_id() const { return device_id_; }
- const string16& name() const { return name_; }
const base::FilePath::StringType& location() const { return location_; }
const string16& storage_label() const { return storage_label_; }
const string16& vendor_name() const { return vendor_name_; }
@@ -75,7 +81,6 @@
uint64 total_size_in_bytes() const { return total_size_in_bytes_; }
void set_device_id(const std::string& device_id) { device_id_ = device_id; }
- void set_name(const string16& name) { name_ = name; }
void set_location(const base::FilePath::StringType& location) {
location_ = location;
}
@@ -87,9 +92,6 @@
// this as an opaque string.
std::string device_id_;
- // Human readable removable storage device name.
- string16 name_;
-
// Current attached removable storage device location.
base::FilePath::StringType location_;
« no previous file with comments | « chrome/browser/storage_monitor/portable_device_watcher_win.cc ('k') | chrome/browser/storage_monitor/storage_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698