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

Side by Side Diff: chrome/browser/storage_monitor/test_storage_monitor.h

Issue 16703025: [StorageMonitor] Move StorageMonitor ownership to BrowserProcessImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Catch up to SystemInfoStorage eject test Created 7 years, 5 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 unified diff | Download patch
OLDNEW
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 and initialize a new TestStorageMonitor and install it
25 // taking care to deal with the existing singleton correctly. 25 // in the TestingBrowserProcess.
26 static TestStorageMonitor* CreateAndInstall();
27
28 // Create and initialize a new TestStorageMonitor, and install it
29 // in the BrowserProcessImpl. (Browser tests use the production browser
30 // process implementation.)
26 static TestStorageMonitor* CreateForBrowserTests(); 31 static TestStorageMonitor* CreateForBrowserTests();
27 32
33 // Remove the singleton StorageMonitor from the TestingBrowserProcess.
34 static void RemoveSingleton();
35
36 // Synchronously initialize the current storage monitor.
37 static void SyncInitialize();
38
28 virtual bool GetStorageInfoForPath( 39 virtual bool GetStorageInfoForPath(
29 const base::FilePath& path, 40 const base::FilePath& path,
30 StorageInfo* device_info) const OVERRIDE; 41 StorageInfo* device_info) const OVERRIDE;
31 42
32 #if defined(OS_WIN) 43 #if defined(OS_WIN)
33 virtual bool GetMTPStorageInfoFromDeviceId( 44 virtual bool GetMTPStorageInfoFromDeviceId(
34 const std::string& storage_device_id, 45 const std::string& storage_device_id,
35 string16* device_location, 46 string16* device_location,
36 string16* storage_object_id) const OVERRIDE; 47 string16* storage_object_id) const OVERRIDE;
37 #endif 48 #endif
(...skipping 20 matching lines...) Expand all
58 #if defined(OS_LINUX) 69 #if defined(OS_LINUX)
59 scoped_ptr<device::MediaTransferProtocolManager> 70 scoped_ptr<device::MediaTransferProtocolManager>
60 media_transfer_protocol_manager_; 71 media_transfer_protocol_manager_;
61 #endif 72 #endif
62 }; 73 };
63 74
64 } // namespace test 75 } // namespace test
65 } // namespace chrome 76 } // namespace chrome
66 77
67 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ 78 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/storage_monitor/storage_monitor_win_unittest.cc ('k') | chrome/browser/storage_monitor/test_storage_monitor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698