OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 5 #ifndef COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
6 #define COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 6 #define COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Maintain a set of device attribute check calls in-flight. Only accessed | 106 // Maintain a set of device attribute check calls in-flight. Only accessed |
107 // on the UI thread. This is to try and prevent the same device from | 107 // on the UI thread. This is to try and prevent the same device from |
108 // occupying our worker pool in case of windows API call hangs. | 108 // occupying our worker pool in case of windows API call hangs. |
109 std::set<base::FilePath> pending_device_checks_; | 109 std::set<base::FilePath> pending_device_checks_; |
110 | 110 |
111 // A map from device mount point to device metadata. Only accessed on the UI | 111 // A map from device mount point to device metadata. Only accessed on the UI |
112 // thread. | 112 // thread. |
113 MountPointDeviceMetadataMap device_metadata_; | 113 MountPointDeviceMetadataMap device_metadata_; |
114 | 114 |
115 base::WeakPtrFactory<VolumeMountWatcherWin> weak_factory_; | |
116 | |
117 // The notifications object to use to signal newly attached volumes. Only | 115 // The notifications object to use to signal newly attached volumes. Only |
118 // removable devices will be notified. | 116 // removable devices will be notified. |
119 StorageMonitor::Receiver* notifications_; | 117 StorageMonitor::Receiver* notifications_; |
120 | 118 |
| 119 base::WeakPtrFactory<VolumeMountWatcherWin> weak_factory_; |
| 120 |
121 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); | 121 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace storage_monitor | 124 } // namespace storage_monitor |
125 | 125 |
126 #endif // COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 126 #endif // COMPONENTS_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
OLD | NEW |