Home | History | Annotate | Download | only in imageburner

Lines Matching defs:disk

37   // Emulates to add new disk physically (e.g., connecting a
39 void EmulateAddDisk(scoped_ptr<Disk> in_disk) {
44 Disk* disk = in_disk.get();
45 bool new_disk = InsertDisk(disk->device_path(), in_disk.Pass());
48 OnDiskEvent(new_disk ? DISK_ADDED : DISK_CHANGED, disk));
51 // Emulates to remove a disk phyically (e.g., removing a USB flash from
54 scoped_ptr<Disk> disk(RemoveDisk(source_path));
55 if (disk.get()) {
57 Observer, observers_, OnDiskEvent(DISK_REMOVED, disk.get()));
75 virtual const Disk* FindDiskBySourcePath(
95 virtual bool AddDiskForTest(Disk* disk) OVERRIDE { return false; }
102 bool InsertDisk(const std::string& path, scoped_ptr<Disk> disk) {
104 disks_.insert(std::pair<std::string, Disk*>(path, NULL));
109 insert_result.first->second = disk.release(); // Moves ownership.
113 scoped_ptr<Disk> RemoveDisk(const std::string& path) {
117 return scoped_ptr<Disk>();
119 scoped_ptr<Disk> result(iter->second);
132 std::string* out_path, const disks::DiskMountManager::Disk& disk) {
133 *out_path = disk.device_path();
148 static scoped_ptr<disks::DiskMountManager::Disk> CreateMockDisk(
154 return scoped_ptr<disks::DiskMountManager::Disk>(
155 new disks::DiskMountManager::Disk(
215 const std::vector<disks::DiskMountManager::Disk>& burnable_devices =