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

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: Rebase 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 an initialize a new TestStorageMonitor, and install it
25 // taking care to deal with the existing singleton correctly. 25 // in the browser process.
26 static TestStorageMonitor* Create();
Lei Zhang 2013/07/02 23:16:57 I have trouble telling the difference between Crea
Greg Billock 2013/07/03 17:49:17 Yes. Create() puts it in the TestingBrowserProcess
26 static TestStorageMonitor* CreateForBrowserTests(); 27 static TestStorageMonitor* CreateForBrowserTests();
27 28
29 static void RemoveSingleton();
30
31 // Synchronously initialize the current storage monitor.
32 static void SyncInitialize();
33
28 virtual bool GetStorageInfoForPath( 34 virtual bool GetStorageInfoForPath(
29 const base::FilePath& path, 35 const base::FilePath& path,
30 StorageInfo* device_info) const OVERRIDE; 36 StorageInfo* device_info) const OVERRIDE;
31 37
32 #if defined(OS_WIN) 38 #if defined(OS_WIN)
33 virtual bool GetMTPStorageInfoFromDeviceId( 39 virtual bool GetMTPStorageInfoFromDeviceId(
34 const std::string& storage_device_id, 40 const std::string& storage_device_id,
35 string16* device_location, 41 string16* device_location,
36 string16* storage_object_id) const OVERRIDE; 42 string16* storage_object_id) const OVERRIDE;
37 #endif 43 #endif
(...skipping 20 matching lines...) Expand all
58 #if defined(OS_LINUX) 64 #if defined(OS_LINUX)
59 scoped_ptr<device::MediaTransferProtocolManager> 65 scoped_ptr<device::MediaTransferProtocolManager>
60 media_transfer_protocol_manager_; 66 media_transfer_protocol_manager_;
61 #endif 67 #endif
62 }; 68 };
63 69
64 } // namespace test 70 } // namespace test
65 } // namespace chrome 71 } // namespace chrome
66 72
67 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ 73 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698