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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InspectorProtocolString.h

Issue 2251343003: [DevTools] Generate separate copies of inspector_protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef InspectorProtocolString_h
6 #define InspectorProtocolString_h
7
8 #include "platform/v8_inspector/String16.h"
9
10 namespace v8_inspector {
11 namespace protocol {
12
13 using String = v8_inspector::String16;
14 using StringBuilder = v8_inspector::String16Builder;
15
16 class PLATFORM_EXPORT StringUtil {
17 public:
18 static String substring(const String& s, unsigned pos, unsigned len = UINT_M AX) { return s.substring(pos, len); }
19 static String fromInteger(int number) { return String::fromInteger(number); }
20 static String fromDouble(double number) { return String::fromDouble(number); }
21 static const size_t kNotFound = String::kNotFound;
22 static void toCharacters(const String& s, const UChar** characters, size_t* length)
23 {
24 *characters = s.characters16();
25 *length = s.length();
26 }
27 static void builderReserve(StringBuilder& builder, unsigned capacity) { buil der.reserveCapacity(capacity); }
28 };
29
30 } // namespace protocol
31 } // namespace v8_inspector
32
33 #endif // !defined(InspectorProtocolString_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698