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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc

Issue 11573048: [Media Galleries] Move RemovableStorageInfo notifications to chrome namespace (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to head Created 7 years, 12 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/system_monitor/removable_device_notifications_chromeos_unittest.cc
diff --git a/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc b/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc
index 89e5bc779deb44f1a0c6d853d0439b057f0597cf..807627f01af1e685269c13b67adaece41a57aff5 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc
+++ b/chrome/browser/system_monitor/removable_device_notifications_chromeos_unittest.cc
@@ -11,8 +11,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "base/system_monitor/system_monitor.h"
-#include "base/test/mock_devices_changed_observer.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/system_monitor/media_storage_util.h"
#include "chrome/browser/system_monitor/removable_device_constants.h"
@@ -92,8 +90,8 @@ class RemovableDeviceNotificationsCrosTest : public testing::Test {
static void PostQuitToUIThread();
static void WaitForFileThread();
- base::MockDevicesChangedObserver& observer() {
- return *mock_devices_changed_observer_;
+ MockStorageObserver& observer() {
+ return *mock_storage_observer_;
}
private:
@@ -106,8 +104,7 @@ class RemovableDeviceNotificationsCrosTest : public testing::Test {
base::ScopedTempDir scoped_temp_dir_;
// Objects that talks with RemovableDeviceNotificationsCros.
- base::SystemMonitor system_monitor_;
- scoped_ptr<base::MockDevicesChangedObserver> mock_devices_changed_observer_;
+ scoped_ptr<MockStorageObserver> mock_storage_observer_;
// Owned by DiskMountManager.
disks::MockDiskMountManager* disk_mount_manager_mock_;
@@ -128,9 +125,9 @@ void RemovableDeviceNotificationsCrosTest::SetUp() {
ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
file_thread_.Start();
- mock_devices_changed_observer_.reset(new base::MockDevicesChangedObserver);
- system_monitor_.AddDevicesChangedObserver(
- mock_devices_changed_observer_.get());
+ mock_storage_observer_.reset(new MockStorageObserver);
+ notifications_->AddRemovableStorageObserver(
+ mock_storage_observer_.get());
disk_mount_manager_mock_ = new disks::MockDiskMountManager();
DiskMountManager::InitializeForTesting(disk_mount_manager_mock_);
@@ -144,8 +141,8 @@ void RemovableDeviceNotificationsCrosTest::TearDown() {
notifications_ = NULL;
disk_mount_manager_mock_ = NULL;
DiskMountManager::Shutdown();
- system_monitor_.RemoveDevicesChangedObserver(
- mock_devices_changed_observer_.get());
+ notifications_->RemoveRemovableStorageObserver(
+ mock_storage_observer_.get());
WaitForFileThread();
}

Powered by Google App Engine
This is Rietveld 408576698