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

Unified Diff: sync/internal_api/base_node.cc

Issue 1545553003: Switch to standard integer types in sync/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: sync/internal_api/base_node.cc
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
index caaf4eedae98872a03895c00e95459a5080c758d..bde209f365a9d8d7e86e197d1635248799d218cb 100644
--- a/sync/internal_api/base_node.cc
+++ b/sync/internal_api/base_node.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/base_node.h"
+#include <stdint.h>
+
#include <stack>
#include "base/strings/string_number_conversions.h"
@@ -31,10 +33,10 @@ namespace syncer {
using syncable::SPECIFICS;
-// Helper function to look up the int64 metahandle of an object given the ID
+// Helper function to look up the int64_t metahandle of an object given the ID
// string.
-static int64 IdToMetahandle(syncable::BaseTransaction* trans,
- const syncable::Id& id) {
+static int64_t IdToMetahandle(syncable::BaseTransaction* trans,
+ const syncable::Id& id) {
if (id.IsNull())
return kInvalidId;
syncable::Entry entry(trans, syncable::GET_BY_ID, id);
@@ -140,12 +142,12 @@ const sync_pb::EntitySpecifics& BaseNode::GetUnencryptedSpecifics(
}
}
-int64 BaseNode::GetParentId() const {
+int64_t BaseNode::GetParentId() const {
return IdToMetahandle(GetTransaction()->GetWrappedTrans(),
GetEntry()->GetParentId());
}
-int64 BaseNode::GetId() const {
+int64_t BaseNode::GetId() const {
return GetEntry()->GetMetahandle();
}
@@ -186,28 +188,28 @@ bool BaseNode::HasChildren() const {
return dir->HasChildren(trans, GetEntry()->GetId());
}
-int64 BaseNode::GetPredecessorId() const {
+int64_t BaseNode::GetPredecessorId() const {
syncable::Id id_string = GetEntry()->GetPredecessorId();
if (id_string.IsNull())
return kInvalidId;
return IdToMetahandle(GetTransaction()->GetWrappedTrans(), id_string);
}
-int64 BaseNode::GetSuccessorId() const {
+int64_t BaseNode::GetSuccessorId() const {
syncable::Id id_string = GetEntry()->GetSuccessorId();
if (id_string.IsNull())
return kInvalidId;
return IdToMetahandle(GetTransaction()->GetWrappedTrans(), id_string);
}
-int64 BaseNode::GetFirstChildId() const {
+int64_t BaseNode::GetFirstChildId() const {
syncable::Id id_string = GetEntry()->GetFirstChildId();
if (id_string.IsNull())
return kInvalidId;
return IdToMetahandle(GetTransaction()->GetWrappedTrans(), id_string);
}
-void BaseNode::GetChildIds(std::vector<int64>* result) const {
+void BaseNode::GetChildIds(std::vector<int64_t>* result) const {
GetEntry()->GetChildHandles(result);
}
@@ -223,7 +225,7 @@ base::DictionaryValue* BaseNode::ToValue() const {
return GetEntry()->ToValue(GetTransaction()->GetCryptographer());
}
-int64 BaseNode::GetExternalId() const {
+int64_t BaseNode::GetExternalId() const {
return GetEntry()->GetLocalExternalId();
}
« no previous file with comments | « sync/internal_api/attachments/on_disk_attachment_store_unittest.cc ('k') | sync/internal_api/change_reorder_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698