| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "modules/bluetooth/BluetoothRemoteGATTUtils.h" | 5 #include "modules/bluetooth/BluetoothRemoteGATTUtils.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 // static | 9 // static |
| 10 DOMDataView* BluetoothRemoteGATTUtils::ConvertWTFVectorToDataView( | 10 DOMDataView* BluetoothRemoteGATTUtils::ConvertWTFVectorToDataView( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 return DOMException::create( | 28 return DOMException::create( |
| 29 NetworkError, | 29 NetworkError, |
| 30 "GATT Server is disconnected. Cannot perform GATT operations."); | 30 "GATT Server is disconnected. Cannot perform GATT operations."); |
| 31 | 31 |
| 32 case ExceptionType::kInvalidCharacteristic: | 32 case ExceptionType::kInvalidCharacteristic: |
| 33 return DOMException::create( | 33 return DOMException::create( |
| 34 InvalidStateError, | 34 InvalidStateError, |
| 35 "Characteristic is no longer valid. Remember to retrieve the " | 35 "Characteristic is no longer valid. Remember to retrieve the " |
| 36 "characteristic again after reconnecting."); | 36 "characteristic again after reconnecting."); |
| 37 | 37 |
| 38 case ExceptionType::kInvalidDescriptor: |
| 39 return DOMException::create( |
| 40 InvalidStateError, |
| 41 "Descriptor is no longer valid. Remember to retrieve the " |
| 42 "Descriptor again after reconnecting."); |
| 43 |
| 38 default: | 44 default: |
| 39 NOTREACHED(); | 45 NOTREACHED(); |
| 40 return nullptr; | 46 return nullptr; |
| 41 } | 47 } |
| 42 } | 48 } |
| 43 | 49 |
| 44 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |