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

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

Issue 14016002: Storage Monitor: Make StorageMonitorLinux own the MediaTransferProtocolManager. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Rebase to ToT, still need to fix CrOS Created 7 years, 8 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/test_storage_monitor.cc
===================================================================
--- chrome/browser/storage_monitor/test_storage_monitor.cc (revision 193326)
+++ chrome/browser/storage_monitor/test_storage_monitor.cc (working copy)
@@ -5,12 +5,22 @@
#include "chrome/browser/storage_monitor/test_storage_monitor.h"
#include "chrome/browser/storage_monitor/media_storage_util.h"
+#include "content/public/browser/browser_thread.h"
+#include "device/media_transfer_protocol/media_transfer_protocol_manager.h"
namespace chrome {
namespace test {
TestStorageMonitor::TestStorageMonitor()
- : StorageMonitor() {}
+ : StorageMonitor() {
+#if defined(OS_LINUX)
+ scoped_refptr<base::MessageLoopProxy> loop_proxy =
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::FILE);
+ media_transfer_protocol_manager_.reset(
+ device::MediaTransferProtocolManager::Initialize(loop_proxy, true));
+#endif
+}
TestStorageMonitor::~TestStorageMonitor() {}
@@ -45,6 +55,13 @@
}
#endif
+#if defined(OS_LINUX)
+device::MediaTransferProtocolManager*
+TestStorageMonitor::media_transfer_protocol_manager() {
+ return media_transfer_protocol_manager_.get();
+}
+#endif
+
StorageMonitor::Receiver* TestStorageMonitor::receiver() const {
return StorageMonitor::receiver();
}

Powered by Google App Engine
This is Rietveld 408576698