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

Unified Diff: chromeos/disks/mock_disk_mount_manager.cc

Issue 379743004: Add a method in DiskMountManager to refresh mount entries in addition to devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments + Fix up MockDiskMountManager. Created 6 years, 5 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
« no previous file with comments | « chromeos/disks/mock_disk_mount_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/disks/mock_disk_mount_manager.cc
diff --git a/chromeos/disks/mock_disk_mount_manager.cc b/chromeos/disks/mock_disk_mount_manager.cc
index c1665b71f1a5e943634b05662375fb3f388b7cac..a023b1a9fdcaabc104e216c01010f4ffdf0a5188 100644
--- a/chromeos/disks/mock_disk_mount_manager.cc
+++ b/chromeos/disks/mock_disk_mount_manager.cc
@@ -58,6 +58,9 @@ MockDiskMountManager::MockDiskMountManager() {
ON_CALL(*this, FindDiskBySourcePath(_))
.WillByDefault(Invoke(
this, &MockDiskMountManager::FindDiskBySourcePathInternal));
+ ON_CALL(*this, EnsureMountInfoRefreshed(_))
+ .WillByDefault(Invoke(
+ this, &MockDiskMountManager::EnsureMountInfoRefreshedInternal));
}
MockDiskMountManager::~MockDiskMountManager() {
@@ -162,7 +165,7 @@ void MockDiskMountManager::SetupDefaultReplies() {
.WillRepeatedly(ReturnRef(mount_points_));
EXPECT_CALL(*this, FindDiskBySourcePath(_))
.Times(AnyNumber());
- EXPECT_CALL(*this, RequestMountInfoRefresh())
+ EXPECT_CALL(*this, EnsureMountInfoRefreshed(_))
.Times(AnyNumber());
EXPECT_CALL(*this, MountPath(_, _, _, _))
.Times(AnyNumber());
@@ -234,6 +237,11 @@ MockDiskMountManager::FindDiskBySourcePathInternal(
return disk_it == disks_.end() ? NULL : disk_it->second;
}
+void MockDiskMountManager::EnsureMountInfoRefreshedInternal(
+ const EnsureMountInfoRefreshedCallback& callback) {
+ callback.Run(true);
+}
+
void MockDiskMountManager::NotifyDiskChanged(
DiskEvent event,
const DiskMountManager::Disk* disk) {
« no previous file with comments | « chromeos/disks/mock_disk_mount_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698