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

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.cc

Issue 2752663002: Remove RemoteServerDisconnect() from web_bluetooth.mojom (Closed)
Patch Set: rebase Created 3 years, 9 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: content/browser/bluetooth/web_bluetooth_service_impl.cc
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index 9c6b89958aba9da4647a53297600c6036a12b4f1..ed90f7d09873d9ce277c80327f865fa600e77e76 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -355,7 +355,7 @@ void WebBluetoothServiceImpl::RemoteServerConnect(
weak_ptr_factory_.GetWeakPtr(), start_time, callback));
}
-void WebBluetoothServiceImpl::RemoteServerDisconnect(
+void WebBluetoothServiceImpl::HandleServerClientError(
scheib 2017/03/20 21:39:13 Keep .h and .cc file methods in same order please.
juncai 2017/03/21 00:52:35 Done.
const WebBluetoothDeviceId& device_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
RecordWebBluetoothFunctionCall(
@@ -959,6 +959,9 @@ void WebBluetoothServiceImpl::OnCreateGATTConnectionSuccess(
return;
}
+ client.set_connection_error_handler(
+ base::Bind(&WebBluetoothServiceImpl::HandleServerClientError,
+ weak_ptr_factory_.GetWeakPtr(), device_id));
callback.Run(blink::mojom::WebBluetoothResult::SUCCESS);
connected_devices_->Insert(device_id, std::move(connection),
std::move(client));

Powered by Google App Engine
This is Rietveld 408576698