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

Unified Diff: chrome/browser/safe_browsing/protocol_parser.cc

Issue 2890: Include chrome/browser/SConscript in Linux build.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/safe_browsing/chunk_range.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/protocol_parser.cc
===================================================================
--- chrome/browser/safe_browsing/protocol_parser.cc (revision 2262)
+++ chrome/browser/safe_browsing/protocol_parser.cc (working copy)
@@ -4,8 +4,14 @@
//
// Parse the data returned from the SafeBrowsing v2.1 protocol response.
-#include <Winsock2.h> // for htonl
+#include "build/build_config.h"
+#if defined(OS_WIN)
+#include <Winsock2.h>
+#elif defined(OS_POSIX)
+#include <arpa/inet.h>
+#endif
+
#include "chrome/browser/safe_browsing/protocol_parser.h"
#include "base/logging.h"
@@ -85,7 +91,7 @@
int full_hash_len = atoi(cmd_parts[2].c_str());
while (full_hash_len > 0) {
- DCHECK(full_hash_len >= sizeof(SBFullHash));
+ DCHECK(static_cast<size_t>(full_hash_len) >= sizeof(SBFullHash));
memcpy(&full_hash.hash, data, sizeof(SBFullHash));
full_hashes->push_back(full_hash);
data += sizeof(SBFullHash);
@@ -449,7 +455,7 @@
if (cmd_parts.size() != 3)
return false;
- if (cmd_parts[2].size() != atoi(cmd_parts[1].c_str()))
+ if (static_cast<int>(cmd_parts[2].size()) != atoi(cmd_parts[1].c_str()))
return false;
if (cmd_parts[0] == "clientkey") {
« no previous file with comments | « chrome/browser/safe_browsing/chunk_range.cc ('k') | chrome/browser/safe_browsing/safe_browsing_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698