OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/storage_monitor/test_storage_monitor.h" | 5 #include "chrome/browser/storage_monitor/test_storage_monitor.h" |
6 | 6 |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/synchronization/waitable_event.h" | 8 #include "base/synchronization/waitable_event.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/browser_process_impl.h" | 10 #include "chrome/browser/browser_process_impl.h" |
11 #include "chrome/browser/storage_monitor/storage_info.h" | 11 #include "chrome/browser/storage_monitor/storage_info.h" |
12 #include "chrome/test/base/testing_browser_process.h" | 12 #include "chrome/test/base/testing_browser_process.h" |
13 | 13 |
14 #if defined(OS_LINUX) | 14 #if defined(OS_LINUX) |
15 #include "chrome/browser/storage_monitor/test_media_transfer_protocol_manager_li
nux.h" | 15 #include "chrome/browser/storage_monitor/test_media_transfer_protocol_manager_li
nux.h" |
16 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" | 16 #include "device/media_transfer_protocol/media_transfer_protocol_manager.h" |
17 #endif | 17 #endif |
18 | 18 |
19 namespace chrome { | |
20 namespace test { | |
21 | |
22 TestStorageMonitor::TestStorageMonitor() | 19 TestStorageMonitor::TestStorageMonitor() |
23 : StorageMonitor(), | 20 : StorageMonitor(), |
24 init_called_(false) { | 21 init_called_(false) { |
25 #if defined(OS_LINUX) | 22 #if defined(OS_LINUX) |
26 media_transfer_protocol_manager_.reset( | 23 media_transfer_protocol_manager_.reset( |
27 new TestMediaTransferProtocolManagerLinux()); | 24 new TestMediaTransferProtocolManagerLinux()); |
28 #endif | 25 #endif |
29 } | 26 } |
30 | 27 |
31 TestStorageMonitor::~TestStorageMonitor() {} | 28 TestStorageMonitor::~TestStorageMonitor() {} |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 StorageMonitor::Receiver* TestStorageMonitor::receiver() const { | 121 StorageMonitor::Receiver* TestStorageMonitor::receiver() const { |
125 return StorageMonitor::receiver(); | 122 return StorageMonitor::receiver(); |
126 } | 123 } |
127 | 124 |
128 void TestStorageMonitor::EjectDevice( | 125 void TestStorageMonitor::EjectDevice( |
129 const std::string& device_id, | 126 const std::string& device_id, |
130 base::Callback<void(EjectStatus)> callback) { | 127 base::Callback<void(EjectStatus)> callback) { |
131 ejected_device_ = device_id; | 128 ejected_device_ = device_id; |
132 callback.Run(EJECT_OK); | 129 callback.Run(EJECT_OK); |
133 } | 130 } |
134 | |
135 } // namespace test | |
136 } // namespace chrome | |
OLD | NEW |