Index: extensions/browser/api/usb/usb_apitest.cc |
diff --git a/extensions/browser/api/usb/usb_apitest.cc b/extensions/browser/api/usb/usb_apitest.cc |
index cfad67d1deedc413d6dd4e829fe08b4d46bbdfae..9057178f646da6c8bd096b54abd76301f8b53db8 100644 |
--- a/extensions/browser/api/usb/usb_apitest.cc |
+++ b/extensions/browser/api/usb/usb_apitest.cc |
@@ -107,7 +107,17 @@ class TestDevicePermissionsPrompt |
void ShowDialog() override { prompt()->SetObserver(this); } |
- void OnDevicesChanged() override { |
+ void OnDeviceAdded(size_t index, const base::string16& device_name) override { |
+ OnDevicesChanged(); |
+ } |
+ |
+ void OnDeviceRemoved(size_t index, |
+ const base::string16& device_name) override { |
+ OnDevicesChanged(); |
+ } |
+ |
+ private: |
+ void OnDevicesChanged() { |
for (size_t i = 0; i < prompt()->GetDeviceCount(); ++i) { |
prompt()->GrantDevicePermission(i); |
if (!prompt()->multiple()) { |