OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ | 5 #ifndef NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ |
6 #define NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ | 6 #define NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
9 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
10 | 12 |
11 namespace net { | 13 namespace net { |
12 | 14 |
13 #if defined(COMPILER_MSVC) | 15 #if defined(COMPILER_MSVC) |
14 struct StringPieceCaseCompare { | 16 struct StringPieceCaseCompare { |
15 static const size_t bucket_size = 4; | 17 static const size_t bucket_size = 4; |
16 | 18 |
17 size_t operator()(const base::StringPiece& sp) const { | 19 size_t operator()(const base::StringPiece& sp) const { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool operator()(const base::StringPiece& piece1, | 71 bool operator()(const base::StringPiece& piece1, |
70 const base::StringPiece& piece2) const { | 72 const base::StringPiece& piece2) const { |
71 return base::EqualsCaseInsensitiveASCII(piece1, piece2); | 73 return base::EqualsCaseInsensitiveASCII(piece1, piece2); |
72 } | 74 } |
73 }; | 75 }; |
74 | 76 |
75 } // namespace net | 77 } // namespace net |
76 | 78 |
77 #endif // NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ | 79 #endif // NET_TOOLS_BALSA_STRING_PIECE_UTILS_H_ |
78 | 80 |
OLD | NEW |