chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.cc
// Helper function to get the device storage details such as device id, label
// and location. On success and fills in |id|, |label| and |location|.
Helper function to get the device storage details such as device id, label
and location.
Helper function to get the device storage details such as device id label and location .
void GetStorageInfo(const std::string& storage_name,
                    std::string* id,
                    string16* label,
                    std::string* location) {
  DCHECK(!storage_name.empty());
  MediaTransferProtocolManager* mtp_manager =
      MediaTransferProtocolManager::GetInstance();
  const MtpStorageInfo* storage_info =
      mtp_manager->GetStorageInfo(storage_name);
  if (!storage_info)
    return;
  if (id)
    *id = GetDeviceIdFromStorageInfo(*storage_info);
  if (label)
    *label = GetDeviceLabelFromStorageInfo(*storage_info);
  if (location)
    *location = GetDeviceLocationFromStorageName(storage_name);
}
void GetStorageInfo ( const std :: string & storage_name , std :: string * id , string16 * label , std :: string * location ) { DCHECK ( ! storage_name . empty ( ) ) ; MediaTransferProtocolManager * mtp_manager = MediaTransferProtocolManager :: GetInstance ( ) ; const MtpStorageInfo * storage_info = mtp_manager -> GetStorageInfo ( storage_name ) ; if ( ! storage_info ) return ; if ( id ) * id = GetDeviceIdFromStorageInfo ( * storage_info ) ; if ( label ) * label = GetDeviceLabelFromStorageInfo ( * storage_info ) ; if ( location ) * location = GetDeviceLocationFromStorageName ( storage_name ) ; }
Helper function to get the device storage details such as device id, label
and location.
Helper function to get the device storage details such as device id label and location .