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 |
26 // RemovableDeviceNotificationsWindowWin. | 26 // StorageMonitorWindowWin. |
vandebo (ex-Chrome)
2013/03/01 19:47:39
nit: line wrap.
| |
27 class VolumeMountWatcherWin { | 27 class VolumeMountWatcherWin { |
28 public: | 28 public: |
29 VolumeMountWatcherWin(); | 29 VolumeMountWatcherWin(); |
30 virtual ~VolumeMountWatcherWin(); | 30 virtual ~VolumeMountWatcherWin(); |
31 | 31 |
32 // Returns the volume file path of the drive specified by the |drive_number|. | 32 // 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 | 33 // |drive_number| inputs of 0 - 25 are valid. Returns an empty file path if |
34 // the |drive_number| is invalid. | 34 // the |drive_number| is invalid. |
35 static base::FilePath DriveNumberToFilePath(int drive_number); | 35 static base::FilePath DriveNumberToFilePath(int drive_number); |
36 | 36 |
(...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 | 127 // The notifications object to use to signal newly attached volumes. Only |
128 // removable devices will be notified. | 128 // removable devices will be notified. |
129 StorageMonitor::Receiver* notifications_; | 129 StorageMonitor::Receiver* notifications_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); | 131 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace chrome | 134 } // namespace chrome |
135 | 135 |
136 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ | 136 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ |
OLD | NEW |