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

Unified Diff: chrome/browser/system_monitor/media_device_notifications_chromeos.cc

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: Rebase and add available_capacity into the observer callback 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/media_device_notifications_chromeos.cc
diff --git a/chrome/browser/system_monitor/media_device_notifications_chromeos.cc b/chrome/browser/system_monitor/media_device_notifications_chromeos.cc
index 9855874169a07623bd5fbcf21c3a3ad59674132c..505b3820cdfc78edc3f552a59100df38059f38be 100644
--- a/chrome/browser/system_monitor/media_device_notifications_chromeos.cc
+++ b/chrome/browser/system_monitor/media_device_notifications_chromeos.cc
@@ -46,9 +46,13 @@ MediaDeviceNotifications::MediaDeviceNotifications() {
DCHECK(disks::DiskMountManager::GetInstance());
disks::DiskMountManager::GetInstance()->AddObserver(this);
CheckExistingMountPointsOnUIThread();
+ if (base::SystemMonitor::Get())
+ base::SystemMonitor::Get()->set_storage_free_space_delegate(this);
vandebo (ex-Chrome) 2012/09/12 17:54:47 Since free space observer isn't really implemented
Hongbo Min 2012/09/13 13:40:53 Done.
}
MediaDeviceNotifications::~MediaDeviceNotifications() {
+ if (base::SystemMonitor::Get())
vandebo (ex-Chrome) 2012/09/12 17:54:47 Since we're removing the delegate here, we'll need
Hongbo Min 2012/09/13 13:40:53 Done.
+ base::SystemMonitor::Get()->set_storage_free_space_delegate(NULL);
disks::DiskMountManager* manager = disks::DiskMountManager::GetInstance();
if (manager) {
manager->RemoveObserver(this);
@@ -160,4 +164,17 @@ void MediaDeviceNotifications::AddMountedPathOnUIThread(
mount_info.mount_path);
}
+bool MediaDeviceNotifications::IsWatchingStorage(const FilePath& path) {
+ NOTIMPLEMENTED();
+ return false;
+}
+
+void MediaDeviceNotifications::StartWatchingStorage(const FilePath& path) {
+ NOTIMPLEMENTED();
+}
+
+void MediaDeviceNotifications::StopWatchingStorage(const FilePath& path) {
+ NOTIMPLEMENTED();
+}
+
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698