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 #ifndef CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
6 #define CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 6 #define CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/storage_monitor/storage_monitor.h" | 10 #include "chrome/browser/storage_monitor/storage_monitor.h" |
11 | 11 |
12 namespace chrome { | 12 namespace chrome { |
13 namespace test { | 13 namespace test { |
14 | 14 |
15 class TestStorageMonitor : public chrome::StorageMonitor { | 15 class TestStorageMonitor : public chrome::StorageMonitor { |
16 public: | 16 public: |
17 TestStorageMonitor(); | 17 TestStorageMonitor(); |
18 virtual ~TestStorageMonitor(); | 18 virtual ~TestStorageMonitor(); |
19 | 19 |
20 virtual void Init() OVERRIDE; | 20 virtual void Init() OVERRIDE; |
21 | 21 |
22 void MarkInitialized(); | 22 void MarkInitialized(); |
23 | 23 |
| 24 static void RemoveSingleton(); |
| 25 |
24 // Will create a new testing implementation for browser tests, | 26 // Will create a new testing implementation for browser tests, |
25 // taking care to deal with the existing singleton correctly. | 27 // taking care to deal with the existing singleton correctly. |
26 static TestStorageMonitor* CreateForBrowserTests(); | 28 static TestStorageMonitor* CreateForBrowserTests(); |
27 | 29 |
28 virtual bool GetStorageInfoForPath( | 30 virtual bool GetStorageInfoForPath( |
29 const base::FilePath& path, | 31 const base::FilePath& path, |
30 StorageInfo* device_info) const OVERRIDE; | 32 StorageInfo* device_info) const OVERRIDE; |
31 | 33 |
32 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
33 virtual bool GetMTPStorageInfoFromDeviceId( | 35 virtual bool GetMTPStorageInfoFromDeviceId( |
(...skipping 24 matching lines...) Expand all Loading... |
58 #if defined(OS_LINUX) | 60 #if defined(OS_LINUX) |
59 scoped_ptr<device::MediaTransferProtocolManager> | 61 scoped_ptr<device::MediaTransferProtocolManager> |
60 media_transfer_protocol_manager_; | 62 media_transfer_protocol_manager_; |
61 #endif | 63 #endif |
62 }; | 64 }; |
63 | 65 |
64 } // namespace test | 66 } // namespace test |
65 } // namespace chrome | 67 } // namespace chrome |
66 | 68 |
67 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 69 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
OLD | NEW |