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

Side by Side Diff: chrome/browser/system_monitor/removable_device_notifications_mac.mm

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 unified diff | Download patch
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 #include "chrome/browser/system_monitor/removable_device_notifications_mac.h" 5 #include "chrome/browser/system_monitor/removable_device_notifications_mac.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 8
9 namespace chrome { 9 namespace chrome {
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 device_info->name = info.display_name(); 118 device_info->name = info.display_name();
119 device_info->location = info.mount_point().value(); 119 device_info->location = info.mount_point().value();
120 return true; 120 return true;
121 } 121 }
122 current = current.DirName(); 122 current = current.DirName();
123 } 123 }
124 124
125 return false; 125 return false;
126 } 126 }
127 127
128 void RemovableDeviceNotificationsMac::StartWatchingStorage(
129 const FilePath& path) {
130 NOTIMPLEMENTED();
131 }
132
133 void RemovableDeviceNotificationsMac::StopWatchingStorage(
134 const FilePath& path) {
135 NOTIMPLEMENTED();
136 }
137
128 // static 138 // static
129 void RemovableDeviceNotificationsMac::DiskAppearedCallback( 139 void RemovableDeviceNotificationsMac::DiskAppearedCallback(
130 DADiskRef disk, 140 DADiskRef disk,
131 void* context) { 141 void* context) {
132 RemovableDeviceNotificationsMac* notifications = 142 RemovableDeviceNotificationsMac* notifications =
133 static_cast<RemovableDeviceNotificationsMac*>(context); 143 static_cast<RemovableDeviceNotificationsMac*>(context);
134 GetDiskInfoAndUpdate(notifications->AsWeakPtr(), 144 GetDiskInfoAndUpdate(notifications->AsWeakPtr(),
135 disk, 145 disk,
136 UPDATE_DEVICE_ADDED); 146 UPDATE_DEVICE_ADDED);
137 } 147 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) { 188 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) {
179 if (it->second.mount_point() == mount_point) { 189 if (it->second.mount_point() == mount_point) {
180 *info = it->second; 190 *info = it->second;
181 return true; 191 return true;
182 } 192 }
183 } 193 }
184 return false; 194 return false;
185 } 195 }
186 196
187 } // namespace chrome 197 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698