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

Unified Diff: extensions/browser/api/usb/usb_apitest.cc

Issue 1097603003: Remove knowledge of USB devices from permission prompt implementations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Initialize delegate_ to nullptr. Created 5 years, 8 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 | « extensions/browser/api/device_permissions_prompt.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d2be33cb8406adc52499706951dcf32a198f1e9b..affc107661860f74a50edb64385d9bb5ae4edbb8 100644
--- a/extensions/browser/api/usb/usb_apitest.cc
+++ b/extensions/browser/api/usb/usb_apitest.cc
@@ -54,15 +54,13 @@ class TestDevicePermissionsPrompt
void ShowDialog() override { prompt()->SetObserver(this); }
void OnDevicesChanged() override {
- std::vector<scoped_refptr<UsbDevice>> devices;
for (size_t i = 0; i < prompt()->GetDeviceCount(); ++i) {
prompt()->GrantDevicePermission(i);
- devices.push_back(prompt()->GetDevice(i));
if (!prompt()->multiple()) {
break;
}
}
- delegate()->OnUsbDevicesChosen(devices);
+ prompt()->Dismissed();
}
};
« no previous file with comments | « extensions/browser/api/device_permissions_prompt.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698