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

Side by Side Diff: net/base/hash_value.cc

Issue 12473004: src/: Update the remaining include paths of string_split.h to its new location. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/base/data_url.cc ('k') | net/base/host_mapping_rules.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/base/hash_value.h" 5 #include "net/base/hash_value.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/sha1.h" 9 #include "base/sha1.h"
10 #include "base/string_split.h"
11 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/strings/string_split.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 namespace { 15 namespace {
16 16
17 // CompareSHA1Hashes is a helper function for using bsearch() with an array of 17 // CompareSHA1Hashes is a helper function for using bsearch() with an array of
18 // SHA1 hashes. 18 // SHA1 hashes.
19 int CompareSHA1Hashes(const void* a, const void* b) { 19 int CompareSHA1Hashes(const void* a, const void* b) {
20 return memcmp(a, b, base::kSHA1Length); 20 return memcmp(a, b, base::kSHA1Length);
21 } 21 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 bool IsSHA1HashInSortedArray(const SHA1HashValue& hash, 114 bool IsSHA1HashInSortedArray(const SHA1HashValue& hash,
115 const uint8* array, 115 const uint8* array,
116 size_t array_byte_len) { 116 size_t array_byte_len) {
117 DCHECK_EQ(0u, array_byte_len % base::kSHA1Length); 117 DCHECK_EQ(0u, array_byte_len % base::kSHA1Length);
118 const size_t arraylen = array_byte_len / base::kSHA1Length; 118 const size_t arraylen = array_byte_len / base::kSHA1Length;
119 return NULL != bsearch(hash.data, array, arraylen, base::kSHA1Length, 119 return NULL != bsearch(hash.data, array, arraylen, base::kSHA1Length,
120 CompareSHA1Hashes); 120 CompareSHA1Hashes);
121 } 121 }
122 122
123 } // namespace net 123 } // namespace net
OLDNEW
« no previous file with comments | « net/base/data_url.cc ('k') | net/base/host_mapping_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698