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 // Will create a new testing implementation for browser tests, | 24 // Create an initialize a new TestStorageMonitor and install it |
vandebo (ex-Chrome)
2013/07/10 16:57:45
an -> and
Greg Billock
2013/07/10 21:11:16
Done.
| |
25 // taking care to deal with the existing singleton correctly. | 25 // in the TestingBrowserProcess. |
26 static TestStorageMonitor* Create(); | |
27 | |
28 // Create an initialize a new TestStorageMonitor, and install it | |
vandebo (ex-Chrome)
2013/07/10 16:57:45
an -> and
Greg Billock
2013/07/10 21:11:16
Done.
| |
29 // in the BrowserProcessImpl. (Browser tests use the production browser | |
30 // process implementation.) | |
26 static TestStorageMonitor* CreateForBrowserTests(); | 31 static TestStorageMonitor* CreateForBrowserTests(); |
27 | 32 |
33 static void RemoveSingleton(); | |
vandebo (ex-Chrome)
2013/07/10 16:57:45
Add comment
Greg Billock
2013/07/10 21:11:16
Done.
| |
34 | |
35 // Synchronously initialize the current storage monitor. | |
36 static void SyncInitialize(); | |
37 | |
28 virtual bool GetStorageInfoForPath( | 38 virtual bool GetStorageInfoForPath( |
29 const base::FilePath& path, | 39 const base::FilePath& path, |
30 StorageInfo* device_info) const OVERRIDE; | 40 StorageInfo* device_info) const OVERRIDE; |
31 | 41 |
32 #if defined(OS_WIN) | 42 #if defined(OS_WIN) |
33 virtual bool GetMTPStorageInfoFromDeviceId( | 43 virtual bool GetMTPStorageInfoFromDeviceId( |
34 const std::string& storage_device_id, | 44 const std::string& storage_device_id, |
35 string16* device_location, | 45 string16* device_location, |
36 string16* storage_object_id) const OVERRIDE; | 46 string16* storage_object_id) const OVERRIDE; |
37 #endif | 47 #endif |
(...skipping 20 matching lines...) Expand all Loading... | |
58 #if defined(OS_LINUX) | 68 #if defined(OS_LINUX) |
59 scoped_ptr<device::MediaTransferProtocolManager> | 69 scoped_ptr<device::MediaTransferProtocolManager> |
60 media_transfer_protocol_manager_; | 70 media_transfer_protocol_manager_; |
61 #endif | 71 #endif |
62 }; | 72 }; |
63 | 73 |
64 } // namespace test | 74 } // namespace test |
65 } // namespace chrome | 75 } // namespace chrome |
66 | 76 |
67 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ | 77 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ |
OLD | NEW |