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

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

Issue 2242233002: [DevTools] Fix V8 inspector export (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another version 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/v8_inspector/v8_inspector.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef String16STL_h 5 #ifndef String16STL_h
6 #define String16STL_h 6 #define String16STL_h
7 7
8 #include <cctype> 8 #include <cctype>
9 #include <climits>
9 #include <cstdlib> 10 #include <cstdlib>
10 #include <cstring> 11 #include <cstring>
11 #include <stdint.h> 12 #include <stdint.h>
12 #include <string> 13 #include <string>
13 #include <vector> 14 #include <vector>
14 15
15 using UChar = uint16_t; 16 using UChar = uint16_t;
16 17
17 namespace blink { 18 namespace blink {
18 namespace protocol { 19 namespace protocol {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return hash_code; 62 return hash_code;
62 } 63 }
63 64
64 private: 65 private:
65 std::basic_string<UChar> m_impl; 66 std::basic_string<UChar> m_impl;
66 mutable bool has_hash = false; 67 mutable bool has_hash = false;
67 mutable std::size_t hash_code = 0; 68 mutable std::size_t hash_code = 0;
68 }; 69 };
69 70
70 inline bool operator==(const String16& a, const String16& b) { return a.impl() = = b.impl(); } 71 inline bool operator==(const String16& a, const String16& b) { return a.impl() = = b.impl(); }
72 inline bool operator<(const String16& a, const String16& b) { return a.impl() < b.impl(); }
71 inline bool operator!=(const String16& a, const String16& b) { return a.impl() ! = b.impl(); } 73 inline bool operator!=(const String16& a, const String16& b) { return a.impl() ! = b.impl(); }
72 inline bool operator==(const String16& a, const char* b) { return a.impl() == St ring16(b).impl(); } 74 inline bool operator==(const String16& a, const char* b) { return a.impl() == St ring16(b).impl(); }
73 inline String16 operator+(const String16& a, const char* b) { return String16(a. impl() + String16(b).impl()); } 75 inline String16 operator+(const String16& a, const char* b) { return String16(a. impl() + String16(b).impl()); }
74 inline String16 operator+(const char* a, const String16& b) { return String16(St ring16(a).impl() + b.impl()); } 76 inline String16 operator+(const char* a, const String16& b) { return String16(St ring16(a).impl() + b.impl()); }
75 inline String16 operator+(const String16& a, const String16& b) { return String1 6(a.impl() + b.impl()); } 77 inline String16 operator+(const String16& a, const String16& b) { return String1 6(a.impl() + b.impl()); }
76 78
77 } // namespace protocol 79 } // namespace protocol
78 } // namespace blink 80 } // namespace blink
79 81
80 #if !defined(__APPLE__) || defined(_LIBCPP_VERSION) 82 #if !defined(__APPLE__) || defined(_LIBCPP_VERSION)
(...skipping 12 matching lines...) Expand all
93 95
94 class InspectorProtocolConvenienceStringType { 96 class InspectorProtocolConvenienceStringType {
95 public: 97 public:
96 // This class should not be ever instantiated, so we don't implement constru ctors. 98 // This class should not be ever instantiated, so we don't implement constru ctors.
97 InspectorProtocolConvenienceStringType(); 99 InspectorProtocolConvenienceStringType();
98 InspectorProtocolConvenienceStringType(const blink::protocol::String16& othe r); 100 InspectorProtocolConvenienceStringType(const blink::protocol::String16& othe r);
99 operator blink::protocol::String16() const { return blink::protocol::String1 6(); }; 101 operator blink::protocol::String16() const { return blink::protocol::String1 6(); };
100 }; 102 };
101 103
102 #endif // !defined(String16STL_h) 104 #endif // !defined(String16STL_h)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/v8_inspector/v8_inspector.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698