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

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

Issue 12334096: Regularize ownerships and lifecycle for storage monitor platform classes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comment name Created 7 years, 9 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/media_transfer_protocol_device_observer_linux.cc
diff --git a/chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.cc b/chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.cc
index beae98262f04dd028ee10ed2e7f2c105f0b61500..6f841c9227f1f6633fe2a3fe3e6791e8343d7ed3 100644
--- a/chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.cc
+++ b/chrome/browser/storage_monitor/media_transfer_protocol_device_observer_linux.cc
@@ -127,6 +127,7 @@ MediaTransferProtocolDeviceObserverLinux()
device::MediaTransferProtocolManager* mtp_manager =
device::MediaTransferProtocolManager::GetInstance();
+ DCHECK(mtp_manager);
mtp_manager->AddObserver(this);
EnumerateStorages();
}
@@ -137,8 +138,6 @@ MediaTransferProtocolDeviceObserverLinux(
GetStorageInfoFunc get_storage_info_func)
: get_storage_info_func_(get_storage_info_func),
notifications_(NULL) {
- // In unit tests, we don't have a media transfer protocol manager.
- DCHECK(!device::MediaTransferProtocolManager::GetInstance());
DCHECK(!g_mtp_device_observer);
g_mtp_device_observer = this;
}
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/storage_monitor/storage_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698