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

Unified Diff: components/history/core/browser/visitsegment_database.cc

Issue 1548113002: Switch to standard integer types in components/, part 2 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gn Created 5 years 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
Index: components/history/core/browser/visitsegment_database.cc
diff --git a/components/history/core/browser/visitsegment_database.cc b/components/history/core/browser/visitsegment_database.cc
index 232e044258d68e678daea8ed9eb96ca8ef3c0a0d..66998e5e6e14e3ac3aadb647d5cf7c8a8a388840 100644
--- a/components/history/core/browser/visitsegment_database.cc
+++ b/components/history/core/browser/visitsegment_database.cc
@@ -5,12 +5,15 @@
#include "components/history/core/browser/visitsegment_database.h"
#include <math.h>
+#include <stddef.h>
+#include <stdint.h>
#include <algorithm>
#include <string>
#include <vector>
#include "base/logging.h"
+#include "base/macros.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -182,7 +185,7 @@ bool VisitSegmentDatabase::IncreaseSegmentVisitCount(SegmentID segment_id,
if (select.Step()) {
sql::Statement update(GetDB().GetCachedStatement(SQL_FROM_HERE,
"UPDATE segment_usage SET visit_count = ? WHERE id = ?"));
- update.BindInt64(0, select.ColumnInt64(1) + static_cast<int64>(amount));
+ update.BindInt64(0, select.ColumnInt64(1) + static_cast<int64_t>(amount));
update.BindInt64(1, select.ColumnInt64(0));
return update.Run();
@@ -192,7 +195,7 @@ bool VisitSegmentDatabase::IncreaseSegmentVisitCount(SegmentID segment_id,
"(segment_id, time_slot, visit_count) VALUES (?, ?, ?)"));
insert.BindInt64(0, segment_id);
insert.BindInt64(1, t.ToInternalValue());
- insert.BindInt64(2, static_cast<int64>(amount));
+ insert.BindInt64(2, static_cast<int64_t>(amount));
return insert.Run();
}
« no previous file with comments | « components/history/core/browser/visitsegment_database.h ('k') | components/history/core/browser/web_history_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698