chrome/browser/system_monitor/portable_device_watcher_win.cc
// Accesses the device and gets the device details (name, storage info, etc).
// On success returns true and fills in |device_details|. On failure, returns
// false. |pnp_device_id| specifies the plug and play device ID string.
Accesses the device and gets the device details (name, storage info, etc).
On success returns true and fills in |device_details|. On failure, returns
false. |pnp_device_id| specifies the plug and play device ID string.
Accesses the device and gets the device details ( name storage info etc ) . On success returns true and fills in |device_details| . On failure returns false . |pnp_device_id| specifies the plug and play device ID string .
bool GetDeviceInfoOnBlockingThread(
    IPortableDeviceManager* portable_device_manager,
    const string16& pnp_device_id,
    PortableDeviceWatcherWin::DeviceDetails* device_details) {
  DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
  DCHECK(portable_device_manager);
  DCHECK(device_details);
  DCHECK(!pnp_device_id.empty());
  device_details->name = GetDeviceNameOnBlockingThread(portable_device_manager,
                                                       pnp_device_id);
  if (IsVolumeMountedPortableDevice(device_details->name))
    return false;
  device_details->location = pnp_device_id;
  PortableDeviceWatcherWin::StorageObjects storage_objects;
  return GetDeviceStorageObjectsOnBlockingThread(
      pnp_device_id, &device_details->storage_objects);
}
bool GetDeviceInfoOnBlockingThread ( IPortableDeviceManager * portable_device_manager , const string16 & pnp_device_id , PortableDeviceWatcherWin :: DeviceDetails * device_details ) { DCHECK ( content :: BrowserThread :: GetBlockingPool ( ) -> RunsTasksOnCurrentThread ( ) ) ; DCHECK ( portable_device_manager ) ; DCHECK ( device_details ) ; DCHECK ( ! pnp_device_id . empty ( ) ) ; device_details -> name = GetDeviceNameOnBlockingThread ( portable_device_manager , pnp_device_id ) ; if ( IsVolumeMountedPortableDevice ( device_details -> name ) ) return false ; device_details -> location = pnp_device_id ; PortableDeviceWatcherWin :: StorageObjects storage_objects ; return GetDeviceStorageObjectsOnBlockingThread ( pnp_device_id , & device_details -> storage_objects ) ; }
Accesses the device and gets the device details (name, storage info, etc).
Accesses the device and gets the device details ( name storage info etc ) .