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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_
6 #define CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_
8 #include "chrome/browser/storage_monitor/storage_monitor.h"
13 class TestStorageMonitor
: public chrome::StorageMonitor
{
16 virtual ~TestStorageMonitor();
18 // Will create a new testing implementation for browser tests,
19 // taking care to deal with the existing singleton correctly.
20 static TestStorageMonitor
* CreateForBrowserTests();
22 virtual bool GetStorageInfoForPath(
23 const base::FilePath
& path
,
24 StorageInfo
* device_info
) const OVERRIDE
;
27 virtual bool GetMTPStorageInfoFromDeviceId(
28 const std::string
& storage_device_id
,
29 string16
* device_location
,
30 string16
* storage_object_id
) const OVERRIDE
;
33 virtual Receiver
* receiver() const OVERRIDE
;
35 virtual void EjectDevice(
36 const std::string
& device_id
,
37 base::Callback
<void(StorageMonitor::EjectStatus
)> callback
)
40 const std::string
& ejected_device() const { return ejected_device_
; }
43 std::string ejected_device_
;
49 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_