summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/protocol_parser.cc7
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc13
2 files changed, 10 insertions, 10 deletions
diff --git a/chrome/browser/safe_browsing/protocol_parser.cc b/chrome/browser/safe_browsing/protocol_parser.cc
index ce8474c..c2aa793 100644
--- a/chrome/browser/safe_browsing/protocol_parser.cc
+++ b/chrome/browser/safe_browsing/protocol_parser.cc
@@ -4,6 +4,8 @@
//
// Parse the data returned from the SafeBrowsing v2.1 protocol response.
+#include "chrome/browser/safe_browsing/protocol_parser.h"
+
#include "build/build_config.h"
#if defined(OS_WIN)
@@ -12,8 +14,7 @@
#include <arpa/inet.h>
#endif
-#include "chrome/browser/safe_browsing/protocol_parser.h"
-
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/string_util.h"
@@ -115,7 +116,7 @@ void SafeBrowsingProtocolParser::FormatGetHash(
DCHECK(request);
// Format the request for GetHash.
- request->append(StringPrintf("%d:%d\n",
+ request->append(StringPrintf("%" PRIuS ":%" PRIuS "\n",
sizeof(SBPrefix),
sizeof(SBPrefix) * prefixes.size()));
for (size_t i = 0; i < prefixes.size(); ++i) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 0e41133..c8efc3d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -5,6 +5,7 @@
// Unit tests for the SafeBrowsing storage system.
#include "base/file_util.h"
+#include "base/format_macros.h"
#include "base/logging.h"
#include "base/path_service.h"
#include "base/process_util.h"
@@ -1058,8 +1059,6 @@ struct ChunksInfo {
void PeformUpdate(const std::wstring& initial_db,
const std::vector<ChunksInfo>& chunks,
std::vector<SBChunkDelete>* deletes) {
-// TODO(pinkerton): I don't think posix has any concept of IO counters, but
-// we can uncomment this when we implement ProcessMetrics::GetIOCounters
IoCounters before, after;
FilePath path;
@@ -1096,15 +1095,15 @@ void PeformUpdate(const std::wstring& initial_db,
CHECK(metric->GetIOCounters(&after));
- LOG(INFO) << StringPrintf("I/O Read Bytes: %d",
+ LOG(INFO) << StringPrintf("I/O Read Bytes: %" PRIu64,
after.ReadTransferCount - before.ReadTransferCount);
- LOG(INFO) << StringPrintf("I/O Write Bytes: %d",
+ LOG(INFO) << StringPrintf("I/O Write Bytes: %" PRIu64,
after.WriteTransferCount - before.WriteTransferCount);
- LOG(INFO) << StringPrintf("I/O Reads: %d",
+ LOG(INFO) << StringPrintf("I/O Reads: %" PRIu64,
after.ReadOperationCount - before.ReadOperationCount);
- LOG(INFO) << StringPrintf("I/O Writes: %d",
+ LOG(INFO) << StringPrintf("I/O Writes: %" PRIu64,
after.WriteOperationCount - before.WriteOperationCount);
- LOG(INFO) << StringPrintf("Finished in %d ms",
+ LOG(INFO) << StringPrintf("Finished in %" PRId64 " ms",
(Time::Now() - before_time).InMilliseconds());
PrintStat("c:SB.HostSelect");