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

Side by Side Diff: device/bluetooth/test/bluetooth_test_android.cc

Issue 1572873002: bluetooth: android: Code cleanup fixing comments, typos, simplified names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comma Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "device/bluetooth/test/bluetooth_test_android.h" 5 #include "device/bluetooth/test/bluetooth_test_android.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 Java_FakeBluetoothGattService_addCharacteristic( 161 Java_FakeBluetoothGattService_addCharacteristic(
162 env, service_android->GetJavaObject().obj(), 162 env, service_android->GetJavaObject().obj(),
163 base::android::ConvertUTF8ToJavaString(env, uuid).obj(), properties); 163 base::android::ConvertUTF8ToJavaString(env, uuid).obj(), properties);
164 } 164 }
165 165
166 void BluetoothTestAndroid::RememberCharacteristicForSubsequentAction( 166 void BluetoothTestAndroid::RememberCharacteristicForSubsequentAction(
167 BluetoothGattCharacteristic* characteristic) { 167 BluetoothGattCharacteristic* characteristic) {
168 BluetoothRemoteGattCharacteristicAndroid* characteristic_android = 168 BluetoothRemoteGattCharacteristicAndroid* characteristic_android =
169 static_cast<BluetoothRemoteGattCharacteristicAndroid*>(characteristic); 169 static_cast<BluetoothRemoteGattCharacteristicAndroid*>(characteristic);
170 170
171 Java_FakeBluetoothGattCharacteristic_rememberCharacteristic( 171 Java_FakeBluetoothGattCharacteristic_rememberCharacteristicForSubsequentAction (
172 base::android::AttachCurrentThread(), 172 base::android::AttachCurrentThread(),
173 characteristic_android->GetJavaObject().obj()); 173 characteristic_android->GetJavaObject().obj());
174 } 174 }
175 175
176 void BluetoothTestAndroid::SimulateGattNotifySessionStarted( 176 void BluetoothTestAndroid::SimulateGattNotifySessionStarted(
177 BluetoothGattCharacteristic* characteristic) { 177 BluetoothGattCharacteristic* characteristic) {
178 // Android doesn't provide any sort of callback for when notifications have 178 // Android doesn't provide any sort of callback for when notifications have
179 // been enabled. So, just run the message loop to process the success 179 // been enabled. So, just run the message loop to process the success
180 // callback. 180 // callback.
181 base::RunLoop().RunUntilIdle(); 181 base::RunLoop().RunUntilIdle();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 void BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic( 297 void BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic(
298 JNIEnv* env, 298 JNIEnv* env,
299 const JavaParamRef<jobject>& caller, 299 const JavaParamRef<jobject>& caller,
300 const JavaParamRef<jbyteArray>& value) { 300 const JavaParamRef<jbyteArray>& value) {
301 gatt_write_characteristic_attempts_++; 301 gatt_write_characteristic_attempts_++;
302 base::android::JavaByteArrayToByteVector(env, value, &last_write_value_); 302 base::android::JavaByteArrayToByteVector(env, value, &last_write_value_);
303 } 303 }
304 304
305 } // namespace device 305 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/test/android/java/src/org/chromium/device/bluetooth/Fakes.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698