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

Side by Side Diff: net/tools/flip_server/string_piece_utils.h

Issue 14223008: net: Update the include paths of base/string_piece.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/flip_server/split.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_FLIP_SERVER_STRING_PIECE_UTILS_H_ 5 #ifndef NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
6 #define NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_ 6 #define NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
7 7
8 #include <ctype.h> 8 #include <ctype.h>
9 9
10 #include "base/port.h" 10 #include "base/port.h"
11 #include "base/string_piece.h" 11 #include "base/strings/string_piece.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 struct StringPieceCaseHash { 15 struct StringPieceCaseHash {
16 size_t operator()(const base::StringPiece& sp) const { 16 size_t operator()(const base::StringPiece& sp) const {
17 // based on __stl_string_hash in http://www.sgi.com/tech/stl/string 17 // based on __stl_string_hash in http://www.sgi.com/tech/stl/string
18 size_t hash_val = 0; 18 size_t hash_val = 0;
19 for (base::StringPiece::const_iterator it = sp.begin(); 19 for (base::StringPiece::const_iterator it = sp.begin();
20 it != sp.end(); ++it) { 20 it != sp.end(); ++it) {
21 hash_val = 5 * hash_val + tolower(*it); 21 hash_val = 5 * hash_val + tolower(*it);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return StringPieceUtils::EqualIgnoreCase(piece1, piece2); 72 return StringPieceUtils::EqualIgnoreCase(piece1, piece2);
73 } 73 }
74 }; 74 };
75 75
76 76
77 77
78 } // namespace net 78 } // namespace net
79 79
80 #endif // NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_ 80 #endif // NET_TOOLS_FLIP_SERVER_STRING_PIECE_UTILS_H_
81 81
OLDNEW
« no previous file with comments | « net/tools/flip_server/split.cc ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698