Index: content/browser/renderer_host/media/media_stream_manager.cc |
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc |
index af543fc26d562756c7c3a4a2aa2e42cfd572ab9f..ea0d546b193f3d7f0eb3cb86db3a4fd03c449a05 100644 |
--- a/content/browser/renderer_host/media/media_stream_manager.cc |
+++ b/content/browser/renderer_host/media/media_stream_manager.cc |
@@ -361,11 +361,7 @@ MediaStreamManager::MediaStreamManager(media::AudioManager* audio_manager) |
base::Unretained(this))); |
} |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- // BrowserMainLoop always creates the PowerMonitor instance before creating |
- // MediaStreamManager, but power_monitor may be NULL in unit tests. |
- if (power_monitor) |
- power_monitor->AddObserver(this); |
+ base::PowerMonitor::AddObserver(this); |
} |
MediaStreamManager::~MediaStreamManager() { |
@@ -373,11 +369,7 @@ MediaStreamManager::~MediaStreamManager() { |
DCHECK(requests_.empty()); |
DCHECK(!device_task_runner_); |
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get(); |
- // The PowerMonitor instance owned by BrowserMainLoops always outlives the |
- // MediaStreamManager, but it may be NULL in unit tests. |
- if (power_monitor) |
- power_monitor->RemoveObserver(this); |
+ base::PowerMonitor::RemoveObserver(this); |
} |
VideoCaptureManager* MediaStreamManager::video_capture_manager() { |