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

Side by Side Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 12378016: chrome: Update 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
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 // Parse the data returned from the SafeBrowsing v2.1 protocol response. 5 // Parse the data returned from the SafeBrowsing v2.1 protocol response.
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
12 #include "base/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/sys_byteorder.h" 13 #include "base/sys_byteorder.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/browser/safe_browsing/protocol_parser.h" 15 #include "chrome/browser/safe_browsing/protocol_parser.h"
16 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 16 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
17 17
18 namespace { 18 namespace {
19 // Helper function for quick scans of a line oriented protocol. Note that we use 19 // Helper function for quick scans of a line oriented protocol. Note that we use
20 // std::string::assign(const charT* s, size_type n) 20 // std::string::assign(const charT* s, size_type n)
21 // to copy data into 'line'. This form of 'assign' does not call strlen on 21 // to copy data into 'line'. This form of 'assign' does not call strlen on
22 // 'input', which is binary data and is not NULL terminated. 'input' may also 22 // 'input', which is binary data and is not NULL terminated. 'input' may also
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 DCHECK_EQ(hash_len, (int)sizeof(SBFullHash)); 407 DCHECK_EQ(hash_len, (int)sizeof(SBFullHash));
408 entry->SetFullHashAt(i, *reinterpret_cast<const SBFullHash*>(*data)); 408 entry->SetFullHashAt(i, *reinterpret_cast<const SBFullHash*>(*data));
409 } 409 }
410 *data += hash_len; 410 *data += hash_len;
411 *remaining -= hash_len; 411 *remaining -= hash_len;
412 DCHECK_GE(*remaining, 0); 412 DCHECK_GE(*remaining, 0);
413 } 413 }
414 414
415 return true; 415 return true;
416 } 416 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/chunk_range.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698