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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp

Issue 2728813002: bluetooth: Improve error message for retrieving Descriptors when disconnecting (Closed)
Patch Set: Fix conflict error 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/BluetoothError.h" 5 #include "modules/bluetooth/BluetoothError.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/ExceptionCode.h" 8 #include "core/dom/ExceptionCode.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 10 matching lines...) Expand all
21 DOMException* BluetoothError::createNotConnectedException( 21 DOMException* BluetoothError::createNotConnectedException(
22 BluetoothOperation operation) { 22 BluetoothOperation operation) {
23 const char* operationString = nullptr; 23 const char* operationString = nullptr;
24 switch (operation) { 24 switch (operation) {
25 case BluetoothOperation::ServicesRetrieval: 25 case BluetoothOperation::ServicesRetrieval:
26 operationString = "retrieve services"; 26 operationString = "retrieve services";
27 break; 27 break;
28 case BluetoothOperation::CharacteristicsRetrieval: 28 case BluetoothOperation::CharacteristicsRetrieval:
29 operationString = "retrieve characteristics"; 29 operationString = "retrieve characteristics";
30 break; 30 break;
31 case BluetoothOperation::DescriptorsRetrieval:
32 operationString = "retrieve descriptors";
33 break;
31 case BluetoothOperation::GATT: 34 case BluetoothOperation::GATT:
32 operationString = "perform GATT operations"; 35 operationString = "perform GATT operations";
33 break; 36 break;
34 } 37 }
35 38
36 return DOMException::create( 39 return DOMException::create(
37 NetworkError, 40 NetworkError,
38 String::format(kGATTServerNotConnectedBase, operationString)); 41 String::format(kGATTServerNotConnectedBase, operationString));
39 } 42 }
40 43
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 "requestDevice() called from cross-origin iframe."); 194 "requestDevice() called from cross-origin iframe.");
192 195
193 #undef MAP_ERROR 196 #undef MAP_ERROR
194 } 197 }
195 198
196 NOTREACHED(); 199 NOTREACHED();
197 return DOMException::create(UnknownError); 200 return DOMException::create(UnknownError);
198 } 201 }
199 202
200 } // namespace blink 203 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698