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

Unified Diff: content/child/bluetooth/bluetooth_dispatcher.cc

Issue 787953004: bluetooth: Use BluetoothAdapter in BluetoothDispatcherHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years 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: content/child/bluetooth/bluetooth_dispatcher.cc
diff --git a/content/child/bluetooth/bluetooth_dispatcher.cc b/content/child/bluetooth/bluetooth_dispatcher.cc
index 882453f281d088118d75f007809a6148f6914383..41a28a9ee2738d1b042b7b4a1618df7bdc6e297a 100644
--- a/content/child/bluetooth/bluetooth_dispatcher.cc
+++ b/content/child/bluetooth/bluetooth_dispatcher.cc
@@ -105,6 +105,7 @@ void BluetoothDispatcher::OnRequestDeviceSuccess(
int thread_id,
int request_id,
const std::string& device_instance_id) {
+ DCHECK(pending_requests_.Lookup(request_id)) << request_id;
pending_requests_.Lookup(request_id)
->onSuccess(
new WebBluetoothDevice(WebString::fromUTF8(device_instance_id)));
@@ -114,6 +115,7 @@ void BluetoothDispatcher::OnRequestDeviceSuccess(
void BluetoothDispatcher::OnRequestDeviceError(int thread_id,
int request_id,
BluetoothError error_type) {
+ DCHECK(pending_requests_.Lookup(request_id)) << request_id;
pending_requests_.Lookup(request_id)
->onError(new WebBluetoothError(
WebBluetoothErrorFromBluetoothError(error_type), ""));

Powered by Google App Engine
This is Rietveld 408576698