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

Unified Diff: chrome/browser/chromeos/disks/mock_disk_mount_manager.cc

Issue 10830165: Retry: [CrOS] Enumerate existing mount points and check for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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: chrome/browser/chromeos/disks/mock_disk_mount_manager.cc
diff --git a/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc b/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc
index 5ebbf4f008e4155fcc3f44c877600cb736a62f1d..38909657826ee68caf25758e787c844d03f82fc9 100644
--- a/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc
+++ b/chrome/browser/chromeos/disks/mock_disk_mount_manager.cc
@@ -51,6 +51,8 @@ MockDiskMountManager::MockDiskMountManager() {
&MockDiskMountManager::RemoveObserverInternal));
ON_CALL(*this, disks())
.WillByDefault(Invoke(this, &MockDiskMountManager::disksInternal));
+ ON_CALL(*this, mount_points())
+ .WillByDefault(Invoke(this, &MockDiskMountManager::mountPointsInternal));
}
MockDiskMountManager::~MockDiskMountManager() {
@@ -143,6 +145,8 @@ void MockDiskMountManager::SetupDefaultReplies() {
.Times(AnyNumber());
EXPECT_CALL(*this, disks())
.WillRepeatedly(ReturnRef(disks_));
+ EXPECT_CALL(*this, mount_points())
+ .WillRepeatedly(ReturnRef(mount_points_));
EXPECT_CALL(*this, RequestMountInfoRefresh())
.Times(AnyNumber());
EXPECT_CALL(*this, MountPath(_, _, _, _))
@@ -193,6 +197,11 @@ void MockDiskMountManager::RemoveDiskEntryForMountDevice(
}
}
+const DiskMountManager::MountPointMap&
+MockDiskMountManager::mountPointsInternal() const {
+ return mount_points_;
+}
+
void MockDiskMountManager::NotifyDiskChanged(
DiskMountManagerEventType event,
const DiskMountManager::Disk* disk) {

Powered by Google App Engine
This is Rietveld 408576698