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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_mac.h

Issue 10917166: Extend the capability of SystemMonitor to support watching storage free space change (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update and add unit test 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/system_monitor/removable_device_notifications_mac.h
diff --git a/chrome/browser/system_monitor/removable_device_notifications_mac.h b/chrome/browser/system_monitor/removable_device_notifications_mac.h
index 70a3e19162ae39f4eda2d63bf0c79ac0b0ee5f57..a5b7fb7ddc36caac03f941c99d3bf5aeccfcb514 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_mac.h
+++ b/chrome/browser/system_monitor/removable_device_notifications_mac.h
@@ -18,7 +18,8 @@ namespace chrome {
// This class posts notifications to base::SystemMonitor when a new disk
// is attached, removed, or changed.
class RemovableDeviceNotificationsMac :
- public base::SupportsWeakPtr<RemovableDeviceNotificationsMac> {
+ public base::SupportsWeakPtr<RemovableDeviceNotificationsMac>,
+ public base::SystemMonitor::StorageFreeSpaceDelegate {
public:
enum UpdateType {
UPDATE_DEVICE_ADDED,
@@ -35,6 +36,10 @@ class RemovableDeviceNotificationsMac :
const FilePath& path,
base::SystemMonitor::RemovableStorageInfo* device_info) const;
+ // Overriden from SystemMonitor::StorageFreeSpaceDelegate.
+ virtual void StartWatchingStorage(const FilePath& path) OVERRIDE;
+ virtual void StopWatchingStorage(const FilePath& path) OVERRIDE;
+
private:
static void DiskAppearedCallback(DADiskRef disk, void* context);
static void DiskDisappearedCallback(DADiskRef disk, void* context);

Powered by Google App Engine
This is Rietveld 408576698