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

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

Issue 14016002: Storage Monitor: Make StorageMonitorLinux own the MediaTransferProtocolManager. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser_tests Created 7 years, 8 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 | Annotate | Revision Log
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>
9
8 #include "chrome/browser/storage_monitor/storage_monitor.h" 10 #include "chrome/browser/storage_monitor/storage_monitor.h"
9 11
10 namespace chrome { 12 namespace chrome {
11 namespace test { 13 namespace test {
12 14
13 class TestStorageMonitor : public chrome::StorageMonitor { 15 class TestStorageMonitor : public chrome::StorageMonitor {
14 public: 16 public:
15 TestStorageMonitor(); 17 TestStorageMonitor();
16 virtual ~TestStorageMonitor(); 18 virtual ~TestStorageMonitor();
17 19
18 // Will create a new testing implementation for browser tests, 20 // Will create a new testing implementation for browser tests,
19 // taking care to deal with the existing singleton correctly. 21 // taking care to deal with the existing singleton correctly.
20 static TestStorageMonitor* CreateForBrowserTests(); 22 static TestStorageMonitor* CreateForBrowserTests();
21 23
22 virtual bool GetStorageInfoForPath( 24 virtual bool GetStorageInfoForPath(
23 const base::FilePath& path, 25 const base::FilePath& path,
24 StorageInfo* device_info) const OVERRIDE; 26 StorageInfo* device_info) const OVERRIDE;
25 27
26 #if defined(OS_WIN) 28 #if defined(OS_WIN)
27 virtual bool GetMTPStorageInfoFromDeviceId( 29 virtual bool GetMTPStorageInfoFromDeviceId(
28 const std::string& storage_device_id, 30 const std::string& storage_device_id,
29 string16* device_location, 31 string16* device_location,
30 string16* storage_object_id) const OVERRIDE; 32 string16* storage_object_id) const OVERRIDE;
31 #endif 33 #endif
32 34
35 #if defined(OS_LINUX)
36 virtual device::MediaTransferProtocolManager*
37 media_transfer_protocol_manager() OVERRIDE;
38 #endif
39
33 virtual Receiver* receiver() const OVERRIDE; 40 virtual Receiver* receiver() const OVERRIDE;
34 41
35 virtual void EjectDevice( 42 virtual void EjectDevice(
36 const std::string& device_id, 43 const std::string& device_id,
37 base::Callback<void(StorageMonitor::EjectStatus)> callback) 44 base::Callback<void(StorageMonitor::EjectStatus)> callback)
38 OVERRIDE; 45 OVERRIDE;
39 46
40 const std::string& ejected_device() const { return ejected_device_; } 47 const std::string& ejected_device() const { return ejected_device_; }
41 48
42 private: 49 private:
43 std::string ejected_device_; 50 std::string ejected_device_;
51
52 #if defined(OS_LINUX)
53 scoped_ptr<device::MediaTransferProtocolManager>
54 media_transfer_protocol_manager_;
55 #endif
44 }; 56 };
45 57
46 } // namespace test 58 } // namespace test
47 } // namespace chrome 59 } // namespace chrome
48 60
49 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_ 61 #endif // CHROME_BROWSER_STORAGE_MONITOR_TEST_STORAGE_MONITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698