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

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

Issue 15896007: [SystemInfo API] Rewrite storage info provider using storage monitor impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix comments from thestig Created 7 years, 6 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
OLDNEW
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>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // notification if appropriate. 51 // notification if appropriate.
52 void OnWindowMessage(UINT event_type, LPARAM data); 52 void OnWindowMessage(UINT event_type, LPARAM data);
53 53
54 // Set the volume notifications object to be used when new 54 // Set the volume notifications object to be used when new
55 // removable volumes are found. 55 // removable volumes are found.
56 void SetNotifications(StorageMonitor::Receiver* notifications); 56 void SetNotifications(StorageMonitor::Receiver* notifications);
57 57
58 void EjectDevice(const std::string& device_id, 58 void EjectDevice(const std::string& device_id,
59 base::Callback<void(StorageMonitor::EjectStatus)> callback); 59 base::Callback<void(StorageMonitor::EjectStatus)> callback);
60 60
61 std::vector<StorageInfo> GetAllVolumeStorages() const;
62
61 protected: 63 protected:
62 typedef base::Callback<bool(const base::FilePath&, 64 typedef base::Callback<bool(const base::FilePath&,
63 StorageInfo*)> GetDeviceDetailsCallbackType; 65 StorageInfo*)> GetDeviceDetailsCallbackType;
64 66
65 typedef base::Callback<std::vector<base::FilePath>(void)> 67 typedef base::Callback<std::vector<base::FilePath>(void)>
66 GetAttachedDevicesCallbackType; 68 GetAttachedDevicesCallbackType;
67 69
68 // Handles mass storage device attach event on UI thread. 70 // Handles mass storage device attach event on UI thread.
69 void HandleDeviceAttachEventOnUIThread( 71 void HandleDeviceAttachEventOnUIThread(
70 const base::FilePath& device_path, 72 const base::FilePath& device_path,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // The notifications object to use to signal newly attached volumes. Only 118 // The notifications object to use to signal newly attached volumes. Only
117 // removable devices will be notified. 119 // removable devices will be notified.
118 StorageMonitor::Receiver* notifications_; 120 StorageMonitor::Receiver* notifications_;
119 121
120 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); 122 DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin);
121 }; 123 };
122 124
123 } // namespace chrome 125 } // namespace chrome
124 126
125 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_ 127 #endif // CHROME_BROWSER_STORAGE_MONITOR_VOLUME_MOUNT_WATCHER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698