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

Unified Diff: device/bluetooth/bluetooth_adapter_android.cc

Issue 2313413002: Pass JavaRef to Java methods in device/bluetooth. (Closed)
Patch Set: Switch comments to a different form that clang-format will fit in 80 chars Created 4 years, 3 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 | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_android.cc
diff --git a/device/bluetooth/bluetooth_adapter_android.cc b/device/bluetooth/bluetooth_adapter_android.cc
index 958f3655b8929e04066dc0f31bc87b8555f8abbb..aa92604c50afa04cfa7de001ac933e9e94d222a4 100644
--- a/device/bluetooth/bluetooth_adapter_android.cc
+++ b/device/bluetooth/bluetooth_adapter_android.cc
@@ -24,6 +24,7 @@ using base::android::AttachCurrentThread;
using base::android::ConvertJavaStringToUTF8;
using base::android::AppendJavaStringArrayToStringVector;
using base::android::JavaParamRef;
+using base::android::JavaRef;
namespace {
// The poll interval in ms when there is no active discovery. This
@@ -42,12 +43,13 @@ namespace device {
base::WeakPtr<BluetoothAdapter> BluetoothAdapter::CreateAdapter(
const InitCallback& init_callback) {
return BluetoothAdapterAndroid::Create(
- BluetoothAdapterWrapper_CreateWithDefaultAdapter().obj());
+ BluetoothAdapterWrapper_CreateWithDefaultAdapter());
}
// static
base::WeakPtr<BluetoothAdapterAndroid> BluetoothAdapterAndroid::Create(
- jobject bluetooth_adapter_wrapper) { // Java Type: bluetoothAdapterWrapper
+ const JavaRef<jobject>&
+ bluetooth_adapter_wrapper) { // Java Type: bluetoothAdapterWrapper
BluetoothAdapterAndroid* adapter = new BluetoothAdapterAndroid();
adapter->j_adapter_.Reset(Java_ChromeBluetoothAdapter_create(
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.h ('k') | device/bluetooth/bluetooth_device_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698