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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/String16WTF.h

Issue 2087953004: Switch v8 inspector to stl collections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 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 String16WTF_h 5 #ifndef String16WTF_h
6 #define String16WTF_h 6 #define String16WTF_h
7 7
8 #include "platform/Decimal.h" 8 #include "platform/Decimal.h"
9 #include "public/platform/WebString.h" 9 #include "public/platform/WebString.h"
10 #include "wtf/text/StringBuilder.h" 10 #include "wtf/text/StringBuilder.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 }; 131 };
132 132
133 template<> 133 template<>
134 struct HashTraits<String16> : SimpleClassHashTraits<String16> { 134 struct HashTraits<String16> : SimpleClassHashTraits<String16> {
135 static const bool hasIsEmptyValueFunction = true; 135 static const bool hasIsEmptyValueFunction = true;
136 static bool isEmptyValue(const String16& a) { return a.impl().isNull(); } 136 static bool isEmptyValue(const String16& a) { return a.impl().isNull(); }
137 }; 137 };
138 138
139 } // namespace WTF 139 } // namespace WTF
140 140
141 namespace std {
142 template<> struct hash<String16> {
143 std::size_t operator()(const String16& string) const
144 {
145 return StringHash::hash(string.impl());
146 }
147 };
148
149 } // namespace std
150
141 #endif // !defined(String16WTF_h) 151 #endif // !defined(String16WTF_h)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698