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

Unified Diff: chrome/browser/media_galleries/media_file_system_registry.cc

Issue 14556015: [Media Galleries] Lazily initialize the storage monitor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix merge Created 7 years, 7 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/media_galleries/media_file_system_registry.cc
diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc
index 324555f12886a631d5580017ec2969dbb2952e12..42ecc918809c726959db87beab5a627d66ddf5ef 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry.cc
@@ -465,6 +465,7 @@ MediaGalleriesPreferences* MediaFileSystemRegistry::GetPreferences(
// TODO(gbillock): Move this stanza to MediaGalleriesPreferences init code.
StorageMonitor* monitor = StorageMonitor::GetInstance();
+ DCHECK(monitor->IsInitialized());
std::vector<StorageInfo> existing_devices = monitor->GetAttachedStorage();
for (size_t i = 0; i < existing_devices.size(); i++) {
if (!StorageInfo::IsMediaDevice(existing_devices[i].device_id()))

Powered by Google App Engine
This is Rietveld 408576698