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

Unified Diff: chrome/browser/extensions/api/usb/usb_api.cc

Issue 10694106: Added support for multiple parameters to Extension API callbacks. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation fixes and comment. Created 8 years, 5 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/extensions/api/usb/usb_api.cc
diff --git a/chrome/browser/extensions/api/usb/usb_api.cc b/chrome/browser/extensions/api/usb/usb_api.cc
index 8975c729388fad94e761ff14a2b15c5e668ae280..4f17534cb91bcf2a8c8aed26f9449aa9cd11c968 100644
--- a/chrome/browser/extensions/api/usb/usb_api.cc
+++ b/chrome/browser/extensions/api/usb/usb_api.cc
@@ -46,7 +46,7 @@ void UsbFindDeviceFunction::Work() {
UsbDevice* const device = service->FindDevice(parameters_->vendor_id,
parameters_->product_id);
if (!device) {
- result_.reset(base::Value::CreateNullValue());
+ SetSingleResult(base::Value::CreateNullValue());
return;
}
@@ -57,7 +57,7 @@ void UsbFindDeviceFunction::Work() {
result.handle = controller()->AddAPIResource(resource);
result.vendor_id = parameters_->vendor_id;
result.product_id = parameters_->product_id;
- result_ = result.ToValue();
+ SetSingleResult(FindDevice::Result::Create(result));
}
bool UsbFindDeviceFunction::Respond() {

Powered by Google App Engine
This is Rietveld 408576698