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

Unified Diff: device/usb/usb_service.cc

Issue 891853002: Add a UsbService::Observer function for cleanup actions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « device/usb/usb_service.h ('k') | extensions/browser/api/device_permissions_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_service.cc
diff --git a/device/usb/usb_service.cc b/device/usb/usb_service.cc
index 70f054d0b228e2736f5131a171e05f1170951b53..3faa3e56413a24335ca1fde440b41ae4657f410b 100644
--- a/device/usb/usb_service.cc
+++ b/device/usb/usb_service.cc
@@ -44,6 +44,10 @@ void UsbService::Observer::OnDeviceAdded(scoped_refptr<UsbDevice> device) {
void UsbService::Observer::OnDeviceRemoved(scoped_refptr<UsbDevice> device) {
}
+void UsbService::Observer::OnDeviceRemovedCleanup(
+ scoped_refptr<UsbDevice> device) {
+}
+
// static
UsbService* UsbService::GetInstance(
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
@@ -85,6 +89,7 @@ void UsbService::NotifyDeviceAdded(scoped_refptr<UsbDevice> device) {
void UsbService::NotifyDeviceRemoved(scoped_refptr<UsbDevice> device) {
DCHECK(CalledOnValidThread());
FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemoved(device));
+ FOR_EACH_OBSERVER(Observer, observer_list_, OnDeviceRemovedCleanup(device));
}
} // namespace device
« no previous file with comments | « device/usb/usb_service.h ('k') | extensions/browser/api/device_permissions_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698