OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_STORAGE_MONITOR_WIN_H_ | 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_WIN_H_ |
6 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_WIN_H_ | 6 #define CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_WIN_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 void Init(); | 35 void Init(); |
36 | 36 |
37 // StorageMonitor: | 37 // StorageMonitor: |
38 virtual bool GetStorageInfoForPath(const base::FilePath& path, | 38 virtual bool GetStorageInfoForPath(const base::FilePath& path, |
39 StorageInfo* device_info) const OVERRIDE; | 39 StorageInfo* device_info) const OVERRIDE; |
40 virtual bool GetMTPStorageInfoFromDeviceId( | 40 virtual bool GetMTPStorageInfoFromDeviceId( |
41 const std::string& storage_device_id, | 41 const std::string& storage_device_id, |
42 string16* device_location, | 42 string16* device_location, |
43 string16* storage_object_id) const OVERRIDE; | 43 string16* storage_object_id) const OVERRIDE; |
44 | 44 |
45 virtual uint64 GetStorageSize( | |
46 const base::FilePath::StringType& location) const OVERRIDE; | |
47 | |
48 private: | 45 private: |
49 class PortableDeviceNotifications; | 46 class PortableDeviceNotifications; |
50 friend class test::TestStorageMonitorWin; | 47 friend class test::TestStorageMonitorWin; |
51 | 48 |
52 // To support unit tests, this constructor takes |volume_mount_watcher| and | 49 // To support unit tests, this constructor takes |volume_mount_watcher| and |
53 // |portable_device_watcher| objects. These params are either constructed in | 50 // |portable_device_watcher| objects. These params are either constructed in |
54 // unit tests or in StorageMonitorWin::Create() function. | 51 // unit tests or in StorageMonitorWin::Create() function. |
55 StorageMonitorWin(VolumeMountWatcherWin* volume_mount_watcher, | 52 StorageMonitorWin(VolumeMountWatcherWin* volume_mount_watcher, |
56 PortableDeviceWatcherWin* portable_device_watcher); | 53 PortableDeviceWatcherWin* portable_device_watcher); |
57 | 54 |
(...skipping 28 matching lines...) Expand all Loading... |
86 // The portable device watcher, used to manage media transfer protocol | 83 // The portable device watcher, used to manage media transfer protocol |
87 // devices. | 84 // devices. |
88 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_; | 85 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_; |
89 | 86 |
90 DISALLOW_COPY_AND_ASSIGN(StorageMonitorWin); | 87 DISALLOW_COPY_AND_ASSIGN(StorageMonitorWin); |
91 }; | 88 }; |
92 | 89 |
93 } // namespace chrome | 90 } // namespace chrome |
94 | 91 |
95 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_WIN_H_ | 92 #endif // CHROME_BROWSER_STORAGE_MONITOR_STORAGE_MONITOR_WIN_H_ |
OLD | NEW |