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

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: updated patch 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..0717cc8079b32b7828a7d968429c2d7cd4e9856d 100644
--- a/chrome/browser/system_monitor/media_device_notifications_chromeos.cc
+++ b/chrome/browser/system_monitor/media_device_notifications_chromeos.cc
@@ -46,9 +46,15 @@ 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);
}
MediaDeviceNotifications::~MediaDeviceNotifications() {
+ if (base::SystemMonitor::Get() &&
+ base::SystemMonitor::Get()->storage_free_space_delegate())
+ base::SystemMonitor::Get()->set_storage_free_space_delegate(NULL);
+
disks::DiskMountManager* manager = disks::DiskMountManager::GetInstance();
if (manager) {
manager->RemoveObserver(this);
@@ -160,4 +166,12 @@ void MediaDeviceNotifications::AddMountedPathOnUIThread(
mount_info.mount_path);
}
+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