Lines Matching defs:disk
111 DiskMap::const_iterator disk = disks_.find(device_path);
112 if (disk == disks_.end()) {
118 UnmountPath(disk->second->mount_path(),
201 virtual const Disk* FindDiskBySourcePath(const std::string& source_path)
213 virtual bool AddDiskForTest(Disk* disk) OVERRIDE {
214 if (disks_.find(disk->device_path()) != disks_.end()) {
215 LOG(ERROR) << "Attempt to add a duplicate disk";
219 disks_.insert(std::make_pair(disk->device_path(), disk));
224 // Corresponding disk should be added to the manager before this is called.
233 LOG(ERROR) << "Device mount points must have a disk entry.";
330 // disk might have been removed by now?
333 Disk* disk = iter->second;
334 DCHECK(disk);
335 disk->set_mount_path(mount_info.mount_path);
387 DiskMap::const_iterator disk = disks_.find(device_path);
388 DCHECK(disk != disks_.end() && disk->second->mount_path().empty());
418 LOG(WARNING) << "Found disk " << disk_info.device_path();
419 // Delete previous disk info for this path:
427 Disk* disk = new Disk(disk_info.device_path(),
446 disks_.insert(std::make_pair(disk_info.device_path(), disk));
447 NotifyDiskStatusUpdate(is_new ? DISK_ADDED : DISK_CHANGED, disk);
457 // Initiate disk property retrieval for each relevant device path.
468 Disk* disk = iter->second;
469 NotifyDiskStatusUpdate(DISK_REMOVED, disk);
495 Disk* disk = iter->second;
496 NotifyDiskStatusUpdate(DISK_REMOVED, disk);
536 // Notifies all observers about disk status update.
538 const Disk* disk) {
539 FOR_EACH_OBSERVER(Observer, observers_, OnDiskEvent(event, disk));
622 DiskMountManager::Disk::Disk(const std::string& device_path,
662 DiskMountManager::Disk::~Disk() {}
664 bool DiskMountManager::AddDiskForTest(Disk* disk) {