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

Unified Diff: chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc

Issue 12382005: Rename RemovableDeviceNotifications=>StorageMonitor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix some includes from recent merge. Created 7 years, 10 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/storage_monitor/storage_monitor_linux_unittest.cc
diff --git a/chrome/browser/storage_monitor/removable_device_notifications_linux_unittest.cc b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
similarity index 96%
rename from chrome/browser/storage_monitor/removable_device_notifications_linux_unittest.cc
rename to chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
index 7fe78f7f662bdb707b636b2b46ee9ae5c93ad470..4aa5c2a0efdc317aa363cd30010ebd0c08443cb4 100644
--- a/chrome/browser/storage_monitor/removable_device_notifications_linux_unittest.cc
+++ b/chrome/browser/storage_monitor/storage_monitor_linux_unittest.cc
@@ -2,9 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// RemovableDeviceNotificationsLinux unit tests.
+// StorageMonitorLinux unit tests.
-#include "chrome/browser/storage_monitor/removable_device_notifications_linux.h"
+#include "chrome/browser/storage_monitor/storage_monitor_linux.h"
#include <mntent.h>
#include <stdio.h>
@@ -134,12 +134,12 @@ string16 GetDeviceName(const std::string& device) {
return string16();
}
-class RemovableDeviceNotificationsLinuxTestWrapper
- : public RemovableDeviceNotificationsLinux {
+class StorageMonitorLinuxTestWrapper
vandebo (ex-Chrome) 2013/03/01 19:47:39 A better name for this would probably be TestStora
+ : public StorageMonitorLinux {
public:
- RemovableDeviceNotificationsLinuxTestWrapper(const base::FilePath& path,
+ StorageMonitorLinuxTestWrapper(const base::FilePath& path,
MessageLoop* message_loop)
- : RemovableDeviceNotificationsLinux(path, &GetDeviceInfo),
+ : StorageMonitorLinux(path, &GetDeviceInfo),
message_loop_(message_loop) {
}
@@ -147,17 +147,17 @@ class RemovableDeviceNotificationsLinuxTestWrapper
// Avoids code deleting the object while there are references to it.
// Aside from the base::RefCountedThreadSafe friend class, any attempts to
// call this dtor will result in a compile-time error.
- virtual ~RemovableDeviceNotificationsLinuxTestWrapper() {}
+ virtual ~StorageMonitorLinuxTestWrapper() {}
virtual void OnFilePathChanged(const base::FilePath& path,
bool error) OVERRIDE {
- RemovableDeviceNotificationsLinux::OnFilePathChanged(path, error);
+ StorageMonitorLinux::OnFilePathChanged(path, error);
message_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
MessageLoop* message_loop_;
- DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsLinuxTestWrapper);
+ DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinuxTestWrapper);
};
class RemovableDeviceNotificationLinuxTest : public testing::Test {
vandebo (ex-Chrome) 2013/03/01 19:47:39 Missed this class.
@@ -197,7 +197,7 @@ class RemovableDeviceNotificationLinuxTest : public testing::Test {
true /* overwrite */);
// Initialize the test subject.
- notifications_ = new RemovableDeviceNotificationsLinuxTestWrapper(
+ notifications_ = new StorageMonitorLinuxTestWrapper(
mtab_file_, &message_loop_);
mock_storage_observer_.reset(new MockRemovableStorageObserver);
notifications_->AddObserver(mock_storage_observer_.get());
@@ -234,14 +234,14 @@ class RemovableDeviceNotificationLinuxTest : public testing::Test {
}
// Create a directory named |dir| relative to the test directory.
- // It has a DCIM directory, so RemovableDeviceNotificationsLinux recognizes it
+ // It has a DCIM directory, so StorageMonitorLinux recognizes it
// as a media directory.
base::FilePath CreateMountPointWithDCIMDir(const std::string& dir) {
return CreateMountPoint(dir, true /* create DCIM dir */);
}
// Create a directory named |dir| relative to the test directory.
- // It does not have a DCIM directory, so RemovableDeviceNotificationsLinux
+ // It does not have a DCIM directory, so StorageMonitorLinux
// does not recognizes it as a media directory.
base::FilePath CreateMountPointWithoutDCIMDir(const std::string& dir) {
return CreateMountPoint(dir, false /* do not create DCIM dir */);
@@ -257,7 +257,7 @@ class RemovableDeviceNotificationLinuxTest : public testing::Test {
return *mock_storage_observer_;
}
- RemovableDeviceNotificationsLinux* notifier() {
+ StorageMonitorLinux* notifier() {
return notifications_.get();
}
@@ -322,7 +322,7 @@ class RemovableDeviceNotificationLinuxTest : public testing::Test {
// Path to the test mtab file.
base::FilePath mtab_file_;
- scoped_refptr<RemovableDeviceNotificationsLinuxTestWrapper> notifications_;
+ scoped_refptr<StorageMonitorLinuxTestWrapper> notifications_;
DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationLinuxTest);
};

Powered by Google App Engine
This is Rietveld 408576698