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

Unified Diff: sync/internal_api/public/base_node.h

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/public/base_node.h
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index fe3ca1bb778a39227a28659029038985c9588527..709f423d8b2eab1cfe0adfa07a2ee8ac9feb00aa 100644
--- a/sync/internal_api/public/base_node.h
+++ b/sync/internal_api/public/base_node.h
@@ -5,11 +5,14 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "sync/api/attachments/attachment.h"
@@ -50,13 +53,13 @@ class Id;
}
// A valid BaseNode will never have an ID of zero.
-static const int64 kInvalidId = 0;
+static const int64_t kInvalidId = 0;
// BaseNode wraps syncable::Entry, and corresponds to a single object's state.
// This, like syncable::Entry, is intended for use on the stack. A valid
// transaction is necessary to create a BaseNode or any of its children.
// Unlike syncable::Entry, a sync API BaseNode is identified primarily by its
-// int64 metahandle, which we call an ID here.
+// int64_t metahandle, which we call an ID here.
class SYNC_EXPORT BaseNode {
public:
// Enumerates the possible outcomes of trying to initialize a sync node.
@@ -76,7 +79,7 @@ class SYNC_EXPORT BaseNode {
// All subclasses of BaseNode must provide a way to initialize themselves by
// doing an ID lookup. Returns false on failure. An invalid or deleted
// ID will result in failure.
- virtual InitByLookupResult InitByIdLookup(int64 id) = 0;
+ virtual InitByLookupResult InitByIdLookup(int64_t id) = 0;
// All subclasses of BaseNode must also provide a way to initialize themselves
// by doing a client tag lookup. Returns false on failure. A deleted node
@@ -89,7 +92,7 @@ class SYNC_EXPORT BaseNode {
// metahandle). These ids are strictly local handles. They will persist
// on this client, but the same object on a different client may have a
// different ID value.
- virtual int64 GetId() const;
+ virtual int64_t GetId() const;
// Returns the modification time of the object.
base::Time GetModificationTime() const;
@@ -97,7 +100,7 @@ class SYNC_EXPORT BaseNode {
// Nodes are hierarchically arranged into a single-rooted tree.
// InitByRootLookup on ReadNode allows access to the root. GetParentId is
// how you find a node's parent.
- int64 GetParentId() const;
+ int64_t GetParentId() const;
// Nodes are either folders or not. This corresponds to the IS_DIR property
// of syncable::Entry.
@@ -139,7 +142,7 @@ class SYNC_EXPORT BaseNode {
const sync_pb::EntitySpecifics& GetEntitySpecifics() const;
// Returns the local external ID associated with the node.
- int64 GetExternalId() const;
+ int64_t GetExternalId() const;
// Returns the internal syncable ID associated with the node.
const syncable::Id& GetSyncId() const;
@@ -149,20 +152,20 @@ class SYNC_EXPORT BaseNode {
// Return the ID of the node immediately before this in the sibling order.
// For the first node in the ordering, return 0.
- int64 GetPredecessorId() const;
+ int64_t GetPredecessorId() const;
// Return the ID of the node immediately after this in the sibling order.
// For the last node in the ordering, return 0.
- int64 GetSuccessorId() const;
+ int64_t GetSuccessorId() const;
// Return the ID of the first child of this node. If this node has no
// children, return 0.
- int64 GetFirstChildId() const;
+ int64_t GetFirstChildId() const;
// Returns the IDs of the children of this node.
// If this type supports user-defined positions the returned IDs will be in
// the correct order.
- void GetChildIds(std::vector<int64>* result) const;
+ void GetChildIds(std::vector<int64_t>* result) const;
// Returns the total number of nodes including and beneath this node.
// Recursively iterates through all children.
« no previous file with comments | « sync/internal_api/public/base/unique_position_unittest.cc ('k') | sync/internal_api/public/base_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698