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

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

Issue 6317016: Change UTF8ToUTF16 to accept const StringPiece&. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 11 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) 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 // 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>
8
7 #include "chrome/browser/safe_browsing/protocol_parser.h" 9 #include "chrome/browser/safe_browsing/protocol_parser.h"
8 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 10 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
9 11
10 #include "build/build_config.h" 12 #include "build/build_config.h"
11 13
12 #if defined(OS_WIN) 14 #if defined(OS_WIN)
13 #include <Winsock2.h> 15 #include <Winsock2.h>
14 #elif defined(OS_POSIX) 16 #elif defined(OS_POSIX)
15 #include <arpa/inet.h> 17 #include <arpa/inet.h>
16 #endif 18 #endif
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 488
487 data += line.size() + 1; 489 data += line.size() + 1;
488 remaining -= static_cast<int>(line.size()) + 1; 490 remaining -= static_cast<int>(line.size()) + 1;
489 } 491 }
490 492
491 if (client_key->empty() || wrapped_key->empty()) 493 if (client_key->empty() || wrapped_key->empty())
492 return false; 494 return false;
493 495
494 return true; 496 return true;
495 } 497 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/filter_false_positive_perftest.cc ('k') | chrome/common/service_process_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698