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_VOLUME_MOUNT_WATCHER_WIN_H_ | 5 #ifndef CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
6 #define CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 6 #define CHROME_BROWSER_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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/callback.h" | 14 #include "base/callback.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.h" |
19 #include "chrome/browser/storage_monitor/storage_monitor.h" | 19 #include "chrome/browser/storage_monitor/storage_monitor.h" |
20 | 20 |
21 namespace chrome { | 21 namespace chrome { |
22 | 22 |
23 // This class watches the volume mount points and sends notifications to | 23 // This class watches the volume mount points and sends notifications to |
24 // StorageMonitor about the device attach/detach events. | 24 // StorageMonitor about the device attach/detach events. |
25 // This is a singleton class instantiated by | 25 // This is a singleton class instantiated by StorageMonitorWin. |
26 // RemovableDeviceNotificationsWindowWin. | |
27 class VolumeMountWatcherWin { | 26 class VolumeMountWatcherWin { |
28 public: | 27 public: |
29 VolumeMountWatcherWin(); | 28 VolumeMountWatcherWin(); |
30 virtual ~VolumeMountWatcherWin(); | 29 virtual ~VolumeMountWatcherWin(); |
31 | 30 |
32 // Returns the volume file path of the drive specified by the |drive_number|. | 31 // Returns the volume file path of the drive specified by the |drive_number|. |
33 // |drive_number| inputs of 0 - 25 are valid. Returns an empty file path if | 32 // |drive_number| inputs of 0 - 25 are valid. Returns an empty file path if |
34 // the |drive_number| is invalid. | 33 // the |drive_number| is invalid. |
35 static base::FilePath DriveNumberToFilePath(int drive_number); | 34 static base::FilePath DriveNumberToFilePath(int drive_number); |
36 | 35 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // The notifications object to use to signal newly attached volumes. Only | 126 // The notifications object to use to signal newly attached volumes. Only |
128 // removable devices will be notified. | 127 // removable devices will be notified. |
129 StorageMonitor::Receiver* notifications_; | 128 StorageMonitor::Receiver* notifications_; |
130 | 129 |
131 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); | 130 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); |
132 }; | 131 }; |
133 | 132 |
134 } // namespace chrome | 133 } // namespace chrome |
135 | 134 |
136 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 135 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
OLD | NEW |