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

Unified Diff: chrome/browser/usb/usb_service.h

Issue 12226137: Fix missing callback chaining in UsbService. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 10 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 | « chrome/browser/extensions/api/usb/usb_api.cc ('k') | chrome/browser/usb/usb_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/usb/usb_service.h
diff --git a/chrome/browser/usb/usb_service.h b/chrome/browser/usb/usb_service.h
index b18c71db7a95056bddcd394b6fc032a04cfca1d1..3987786d3112c596722ac21da6af8c45251b03ce 100644
--- a/chrome/browser/usb/usb_service.h
+++ b/chrome/browser/usb/usb_service.h
@@ -33,10 +33,11 @@ class UsbService : public ProfileKeyedService {
// Find all of the devices attached to the system that are identified by
// |vendor_id| and |product_id|, inserting them into |devices|. Clears
- // |devices| before use.
+ // |devices| before use. Calls |callback| once |devices| is populated.
void FindDevices(const uint16 vendor_id,
const uint16 product_id,
- std::vector<scoped_refptr<UsbDevice> >* devices);
+ std::vector<scoped_refptr<UsbDevice> >* devices,
+ const base::Callback<void()>& callback);
// This function should not be called by normal code. It is invoked by a
// UsbDevice's Close function and disposes of the associated platform handle.
@@ -73,6 +74,7 @@ class UsbService : public ProfileKeyedService {
void FindDevicesImpl(const uint16 vendor_id,
const uint16 product_id,
std::vector<scoped_refptr<UsbDevice> >* devices,
+ const base::Callback<void()>& callback,
bool success);
// Populates |output| with the result of enumerating all attached USB devices.
« no previous file with comments | « chrome/browser/extensions/api/usb/usb_api.cc ('k') | chrome/browser/usb/usb_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698