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

Unified Diff: components/storage_monitor/media_transfer_protocol_device_observer_linux.cc

Issue 120303003: [StorageMonitor] Move gallery name generation to StorageInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest build error on mac/linux/chromeos Created 6 years, 9 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: components/storage_monitor/media_transfer_protocol_device_observer_linux.cc
diff --git a/components/storage_monitor/media_transfer_protocol_device_observer_linux.cc b/components/storage_monitor/media_transfer_protocol_device_observer_linux.cc
index 5babbcac591cf8f4973df956b50870d25136872f..6c3e4b00696dcd8b89adf66940abd078979e0c8d 100644
--- a/components/storage_monitor/media_transfer_protocol_device_observer_linux.cc
+++ b/components/storage_monitor/media_transfer_protocol_device_observer_linux.cc
@@ -190,20 +190,21 @@ void MediaTransferProtocolDeviceObserverLinux::StorageChanged(
// New storage is attached.
if (is_attached) {
std::string device_id;
- base::string16 device_name;
+ base::string16 storage_label;
std::string location;
get_storage_info_func_(storage_name, mtp_manager_,
- &device_id, &device_name, &location);
+ &device_id, &storage_label, &location);
// Keep track of device id and device name to see how often we receive
// empty values.
- MediaStorageUtil::RecordDeviceInfoHistogram(false, device_id, device_name);
- if (device_id.empty() || device_name.empty())
+ MediaStorageUtil::RecordDeviceInfoHistogram(false, device_id,
+ storage_label);
+ if (device_id.empty() || storage_label.empty())
return;
DCHECK(!ContainsKey(storage_map_, location));
- StorageInfo storage_info(device_id, device_name, location, device_name,
+ StorageInfo storage_info(device_id, location, storage_label,
base::string16(), base::string16(), 0);
storage_map_[location] = storage_info;
notifications_->ProcessAttach(storage_info);

Powered by Google App Engine
This is Rietveld 408576698