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

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

Issue 2622363005: Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber (Closed)
Patch Set: remove template, rely on function overload resolution for Vector-specific methods Created 3 years, 10 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 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 "bindings/core/v8/ScriptRegexp.h" 8 #include "bindings/core/v8/ScriptRegexp.h"
9 #include "core/dom/ExceptionCode.h" 9 #include "core/dom/ExceptionCode.h"
10 #include "platform/UUID.h" 10 #include "platform/UUID.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 String BluetoothUUID::getDescriptor(StringOrUnsignedLong name, 359 String BluetoothUUID::getDescriptor(StringOrUnsignedLong name,
360 ExceptionState& exceptionState) { 360 ExceptionState& exceptionState) {
361 return getUUIDForGATTAttribute(GATTAttribute::Descriptor, name, 361 return getUUIDForGATTAttribute(GATTAttribute::Descriptor, name,
362 exceptionState); 362 exceptionState);
363 } 363 }
364 364
365 // static 365 // static
366 String BluetoothUUID::canonicalUUID(unsigned alias) { 366 String BluetoothUUID::canonicalUUID(unsigned alias) {
367 StringBuilder builder; 367 StringBuilder builder;
368 builder.reserveCapacity(36 /* 36 chars or 128 bits, length of a UUID */); 368 builder.reserveCapacity(36 /* 36 chars or 128 bits, length of a UUID */);
369 appendUnsignedAsHexFixedSize( 369 HexNumber::appendUnsignedAsHexFixedSize(
370 alias, builder, 8 /* 8 chars or 32 bits, prefix length */, Lowercase); 370 alias, builder, 8 /* 8 chars or 32 bits, prefix length */,
371 HexNumber::Lowercase);
371 372
372 builder.append("-0000-1000-8000-00805f9b34fb"); 373 builder.append("-0000-1000-8000-00805f9b34fb");
373 return builder.toString(); 374 return builder.toString();
374 } 375 }
375 376
376 } // namespace blink 377 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp ('k') | third_party/WebKit/Source/platform/graphics/Color.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698