| OLD | NEW |
| 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 "modules/bluetooth/BluetoothUUID.h" | 5 #include "modules/bluetooth/BluetoothUUID.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/dom/ExceptionCode.h" | 8 #include "core/dom/ExceptionCode.h" |
| 9 #include "platform/UUID.h" | 9 #include "platform/UUID.h" |
| 10 #include "wtf/HashMap.h" | 10 #include "platform/wtf/HashMap.h" |
| 11 #include "wtf/HexNumber.h" | 11 #include "platform/wtf/HexNumber.h" |
| 12 #include "wtf/text/StringBuilder.h" | 12 #include "platform/wtf/text/StringBuilder.h" |
| 13 #include "wtf/text/WTFString.h" | 13 #include "platform/wtf/text/WTFString.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 typedef WTF::HashMap<String, unsigned> NameToAssignedNumberMap; | 19 typedef WTF::HashMap<String, unsigned> NameToAssignedNumberMap; |
| 20 | 20 |
| 21 enum class GATTAttribute { kService, kCharacteristic, kDescriptor }; | 21 enum class GATTAttribute { kService, kCharacteristic, kDescriptor }; |
| 22 | 22 |
| 23 NameToAssignedNumberMap* GetAssignedNumberToServiceNameMap() { | 23 NameToAssignedNumberMap* GetAssignedNumberToServiceNameMap() { |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 builder.ReserveCapacity(36 /* 36 chars or 128 bits, length of a UUID */); | 407 builder.ReserveCapacity(36 /* 36 chars or 128 bits, length of a UUID */); |
| 408 HexNumber::AppendUnsignedAsHexFixedSize( | 408 HexNumber::AppendUnsignedAsHexFixedSize( |
| 409 alias, builder, 8 /* 8 chars or 32 bits, prefix length */, | 409 alias, builder, 8 /* 8 chars or 32 bits, prefix length */, |
| 410 HexNumber::kLowercase); | 410 HexNumber::kLowercase); |
| 411 | 411 |
| 412 builder.Append("-0000-1000-8000-00805f9b34fb"); | 412 builder.Append("-0000-1000-8000-00805f9b34fb"); |
| 413 return builder.ToString(); | 413 return builder.ToString(); |
| 414 } | 414 } |
| 415 | 415 |
| 416 } // namespace blink | 416 } // namespace blink |
| OLD | NEW |