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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_window_win.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/removable_device_notifications_window_win.cc
diff --git a/chrome/browser/system_monitor/removable_device_notifications_window_win.cc b/chrome/browser/system_monitor/removable_device_notifications_window_win.cc
index 6cd090ee10bad44abc75bd13b7a9817118e7d6f1..7543371f77613b460177c0536545ab162ab539e0 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_window_win.cc
+++ b/chrome/browser/system_monitor/removable_device_notifications_window_win.cc
@@ -79,10 +79,17 @@ void RemovableDeviceNotificationsWindowWin::Init() {
window_ = CreateWindow(MAKEINTATOM(atom_), 0, 0, 0, 0, 0, 0, 0, 0, instance_,
0);
SetWindowLongPtr(window_, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
+
+ if (SystemMonitor::Get())
+ SystemMonitor::Get()->set_storage_free_space_delegate(this);
}
RemovableDeviceNotificationsWindowWin::~RemovableDeviceNotificationsWindowWin(
) {
+ if (SystemMonitor::Get() &&
+ SystemMonitor::Get()->storage_free_space_delegate())
+ SystemMonitor::Get()->set_storage_free_space_delegate(NULL);
+
if (window_)
DestroyWindow(window_);
@@ -161,6 +168,16 @@ RemovableDeviceNotificationsWindowWin::ProcessRemovableDeviceAttachedOnUIThread(
path.value());
}
+void RemovableDeviceNotificationsWindowWin::StartWatchingStorage(
+ const FilePath& path) {
+ NOTIMPLEMENTED();
+}
+
+void RemovableDeviceNotificationsWindowWin::StopWatchingStorage(
+ const FilePath& path) {
+ NOTIMPLEMENTED();
+}
+
LRESULT CALLBACK RemovableDeviceNotificationsWindowWin::WndProc(
HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) {
switch (message) {

Powered by Google App Engine
This is Rietveld 408576698