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

Side by Side Diff: chrome/browser/system_monitor/removable_device_notifications_linux.h

Issue 10911234: Update Windows System Monitor Removable Device Impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win compile Created 8 years, 3 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 | Annotate | Revision Log
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 // RemovableDeviceNotificationsLinux listens for mount point changes, notifies 5 // RemovableDeviceNotificationsLinux listens for mount point changes, notifies
6 // the SystemMonitor about the addition and deletion of media devices, and 6 // the SystemMonitor about the addition and deletion of media devices, and
7 // answers queries about mounted devices. 7 // answers queries about mounted devices.
8 8
9 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ 9 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_
10 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ 10 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_
(...skipping 29 matching lines...) Expand all
40 content::BrowserThread::DeleteOnFileThread> { 40 content::BrowserThread::DeleteOnFileThread> {
41 public: 41 public:
42 // Should only be called by browser start up code. Use GetInstance() instead. 42 // Should only be called by browser start up code. Use GetInstance() instead.
43 explicit RemovableDeviceNotificationsLinux(const FilePath& path); 43 explicit RemovableDeviceNotificationsLinux(const FilePath& path);
44 44
45 static RemovableDeviceNotificationsLinux* GetInstance(); 45 static RemovableDeviceNotificationsLinux* GetInstance();
46 46
47 // Must be called for RemovableDeviceNotificationsLinux to work. 47 // Must be called for RemovableDeviceNotificationsLinux to work.
48 void Init(); 48 void Init();
49 49
50 // Use |device_id| to find and return where the device is mounted.
51 FilePath GetDeviceMountPoint(const std::string& device_id) const;
52
53 // Finds the device that contains |path| and populates |device_info|. 50 // Finds the device that contains |path| and populates |device_info|.
54 // Returns false if unable to find the device. 51 // Returns false if unable to find the device.
55 bool GetDeviceInfoForPath( 52 bool GetDeviceInfoForPath(
56 const FilePath& path, 53 const FilePath& path,
57 base::SystemMonitor::RemovableStorageInfo* device_info) const; 54 base::SystemMonitor::RemovableStorageInfo* device_info) const;
58 55
59 protected: 56 protected:
60 // Only for use in unit tests. 57 // Only for use in unit tests.
61 RemovableDeviceNotificationsLinux(const FilePath& path, 58 RemovableDeviceNotificationsLinux(const FilePath& path,
62 GetDeviceInfoFunc getDeviceInfo); 59 GetDeviceInfoFunc getDeviceInfo);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // to notify about it's departure and notify about another one of it's mount 131 // to notify about it's departure and notify about another one of it's mount
135 // points. 132 // points.
136 MountPriorityMap mount_priority_map_; 133 MountPriorityMap mount_priority_map_;
137 134
138 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsLinux); 135 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsLinux);
139 }; 136 };
140 137
141 } // namespace chrome 138 } // namespace chrome
142 139
143 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ 140 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698