Index: chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
diff --git a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
index 0e48aa25c64ef9b23d5efb3c9c96394d11db3d51..7ec816c106075f86d927bdb8d1764710ba0a8093 100644 |
--- a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
+++ b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js |
@@ -36,7 +36,18 @@ AdapterClient.prototype = { |
var adapter, adapterClient; |
/** |
- * TODO: Move to shared location. See crbug.com/652361. |
+ * Logs basic information retrieved from the adapter. |
+ */ |
+ function logAdapterInfo() { |
+ console.log('Getting adapter info'); |
dcheng
2016/10/06 18:46:28
I'm not sure what our policy on logging code is in
mbrunson
2016/10/06 21:00:22
Eventually, this JS file will turn into a setup fi
|
+ |
+ return adapter.getInfo().then(function(response) { |
+ console.log(response.info); |
+ }); |
+ } |
+ |
+ /** |
+ * TODO: Move to shared location. See http://crbug.com/652361. |
* Helper to convert callback-based define() API to a promise-based API. |
* @param {!Array<string>} moduleNames |
* @return {!Promise} |
@@ -89,6 +100,7 @@ AdapterClient.prototype = { |
document.addEventListener('DOMContentLoaded', function() { |
initializeProxies() |
+ .then(logAdapterInfo) |
dpapad
2016/10/06 22:25:21
Let's be consistent within this file. Either
init
mbrunson
2016/10/07 00:48:11
Alright. Thanks for the link. Latter looks better
|
.then(function() { return adapter.getDevices(); }) |
.then(function(response) { console.log(response.devices); }) |
.catch(function(error) { console.error(error); }); |