summaryrefslogtreecommitdiffstats
path: root/sync/internal_api
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api')
-rw-r--r--sync/internal_api/attachments/attachment_downloader_impl.cc2
-rw-r--r--sync/internal_api/attachments/attachment_downloader_impl_unittest.cc2
-rw-r--r--sync/internal_api/attachments/attachment_service_impl.cc1
-rw-r--r--sync/internal_api/attachments/attachment_service_impl_unittest.cc1
-rw-r--r--sync/internal_api/attachments/attachment_uploader_impl.cc2
-rw-r--r--sync/internal_api/attachments/attachment_util.cc2
-rw-r--r--sync/internal_api/attachments/on_disk_attachment_store.cc4
-rw-r--r--sync/internal_api/attachments/on_disk_attachment_store_unittest.cc2
-rw-r--r--sync/internal_api/base_node.cc22
-rw-r--r--sync/internal_api/change_reorder_buffer.cc36
-rw-r--r--sync/internal_api/change_reorder_buffer.h19
-rw-r--r--sync/internal_api/debug_info_event_listener.cc2
-rw-r--r--sync/internal_api/debug_info_event_listener.h1
-rw-r--r--sync/internal_api/delete_journal.cc6
-rw-r--r--sync/internal_api/events/commit_request_event.cc2
-rw-r--r--sync/internal_api/http_bridge.cc26
-rw-r--r--sync/internal_api/http_bridge_unittest.cc8
-rw-r--r--sync/internal_api/js_mutation_event_observer.cc5
-rw-r--r--sync/internal_api/js_mutation_event_observer.h6
-rw-r--r--sync/internal_api/js_mutation_event_observer_unittest.cc2
-rw-r--r--sync/internal_api/js_sync_encryption_handler_observer.h2
-rw-r--r--sync/internal_api/js_sync_encryption_handler_observer_unittest.cc1
-rw-r--r--sync/internal_api/js_sync_manager_observer.h2
-rw-r--r--sync/internal_api/js_sync_manager_observer_unittest.cc1
-rw-r--r--sync/internal_api/model_type_entity.cc10
-rw-r--r--sync/internal_api/model_type_entity_unittest.cc8
-rw-r--r--sync/internal_api/protocol_event_buffer.cc2
-rw-r--r--sync/internal_api/protocol_event_buffer.h3
-rw-r--r--sync/internal_api/protocol_event_buffer_unittest.cc16
-rw-r--r--sync/internal_api/public/attachments/attachment_downloader_impl.h3
-rw-r--r--sync/internal_api/public/attachments/attachment_service.h1
-rw-r--r--sync/internal_api/public/attachments/attachment_service_impl.h1
-rw-r--r--sync/internal_api/public/attachments/attachment_service_proxy.h2
-rw-r--r--sync/internal_api/public/attachments/attachment_service_proxy_for_test.h1
-rw-r--r--sync/internal_api/public/attachments/attachment_store_frontend.h1
-rw-r--r--sync/internal_api/public/attachments/attachment_uploader.h1
-rw-r--r--sync/internal_api/public/attachments/attachment_uploader_impl.h3
-rw-r--r--sync/internal_api/public/attachments/attachment_util.h2
-rw-r--r--sync/internal_api/public/attachments/fake_attachment_downloader.h1
-rw-r--r--sync/internal_api/public/attachments/fake_attachment_uploader.h1
-rw-r--r--sync/internal_api/public/attachments/in_memory_attachment_store.h1
-rw-r--r--sync/internal_api/public/attachments/on_disk_attachment_store.h1
-rw-r--r--sync/internal_api/public/attachments/task_queue.h2
-rw-r--r--sync/internal_api/public/base/attachment_id_proto.cc3
-rw-r--r--sync/internal_api/public/base/attachment_id_proto.h4
-rw-r--r--sync/internal_api/public/base/enum_set.h1
-rw-r--r--sync/internal_api/public/base/enum_set_unittest.cc3
-rw-r--r--sync/internal_api/public/base/invalidation_interface.h5
-rw-r--r--sync/internal_api/public/base/model_type_test_util.cc1
-rw-r--r--sync/internal_api/public/base/node_ordinal.cc19
-rw-r--r--sync/internal_api/public/base/node_ordinal.h7
-rw-r--r--sync/internal_api/public/base/node_ordinal_unittest.cc1
-rw-r--r--sync/internal_api/public/base/ordinal.h35
-rw-r--r--sync/internal_api/public/base/unique_position.cc3
-rw-r--r--sync/internal_api/public/base/unique_position.h1
-rw-r--r--sync/internal_api/public/base/unique_position_unittest.cc3
-rw-r--r--sync/internal_api/public/base_node.h25
-rw-r--r--sync/internal_api/public/base_transaction.h1
-rw-r--r--sync/internal_api/public/change_record.h5
-rw-r--r--sync/internal_api/public/change_record_unittest.cc5
-rw-r--r--sync/internal_api/public/data_batch_impl.h2
-rw-r--r--sync/internal_api/public/data_type_association_stats.h6
-rw-r--r--sync/internal_api/public/delete_journal.h8
-rw-r--r--sync/internal_api/public/engine/passive_model_worker.h2
-rw-r--r--sync/internal_api/public/engine/polling_constants.cc9
-rw-r--r--sync/internal_api/public/engine/polling_constants.h8
-rw-r--r--sync/internal_api/public/events/clear_server_data_request_event.h1
-rw-r--r--sync/internal_api/public/events/clear_server_data_response_event.h1
-rw-r--r--sync/internal_api/public/events/commit_request_event.h1
-rw-r--r--sync/internal_api/public/events/commit_response_event.h1
-rw-r--r--sync/internal_api/public/events/configure_get_updates_request_event.h1
-rw-r--r--sync/internal_api/public/events/get_updates_response_event.h1
-rw-r--r--sync/internal_api/public/events/normal_get_updates_request_event.h1
-rw-r--r--sync/internal_api/public/events/poll_get_updates_request_event.h1
-rw-r--r--sync/internal_api/public/http_bridge.h10
-rw-r--r--sync/internal_api/public/internal_components_factory_impl.h1
-rw-r--r--sync/internal_api/public/model_type_entity.h12
-rw-r--r--sync/internal_api/public/non_blocking_sync_common.h14
-rw-r--r--sync/internal_api/public/read_node.h9
-rw-r--r--sync/internal_api/public/read_transaction.h6
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.h1
-rw-r--r--sync/internal_api/public/sessions/status_counters.h2
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc2
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h3
-rw-r--r--sync/internal_api/public/sync_manager.h19
-rw-r--r--sync/internal_api/public/sync_manager_factory.h1
-rw-r--r--sync/internal_api/public/test/fake_sync_manager.h1
-rw-r--r--sync/internal_api/public/test/test_entry_factory.h49
-rw-r--r--sync/internal_api/public/test/test_internal_components_factory.h1
-rw-r--r--sync/internal_api/public/test/test_user_share.h4
-rw-r--r--sync/internal_api/public/util/immutable.h2
-rw-r--r--sync/internal_api/public/util/immutable_unittest.cc2
-rw-r--r--sync/internal_api/public/util/proto_value_ptr_unittest.cc1
-rw-r--r--sync/internal_api/public/util/weak_handle.h2
-rw-r--r--sync/internal_api/public/write_node.h9
-rw-r--r--sync/internal_api/public/write_transaction.h8
-rw-r--r--sync/internal_api/read_node.cc6
-rw-r--r--sync/internal_api/read_transaction.cc4
-rw-r--r--sync/internal_api/shared_model_type_processor_unittest.cc19
-rw-r--r--sync/internal_api/sync_backup_manager.cc12
-rw-r--r--sync/internal_api/sync_backup_manager.h5
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.cc9
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.h1
-rw-r--r--sync/internal_api/sync_encryption_handler_impl_unittest.cc29
-rw-r--r--sync/internal_api/sync_manager_impl.cc21
-rw-r--r--sync/internal_api/sync_manager_impl.h9
-rw-r--r--sync/internal_api/sync_manager_impl_unittest.cc141
-rw-r--r--sync/internal_api/sync_rollback_manager.cc6
-rw-r--r--sync/internal_api/sync_rollback_manager.h6
-rw-r--r--sync/internal_api/sync_rollback_manager_base.cc16
-rw-r--r--sync/internal_api/sync_rollback_manager_base.h7
-rw-r--r--sync/internal_api/sync_rollback_manager_unittest.cc22
-rw-r--r--sync/internal_api/syncapi_internal.cc3
-rw-r--r--sync/internal_api/syncapi_server_connection_manager.cc6
-rw-r--r--sync/internal_api/syncapi_server_connection_manager.h1
-rw-r--r--sync/internal_api/test/test_entry_factory.cc58
-rw-r--r--sync/internal_api/test/test_user_share.cc2
-rw-r--r--sync/internal_api/write_node.cc6
-rw-r--r--sync/internal_api/write_transaction.cc7
119 files changed, 570 insertions, 367 deletions
diff --git a/sync/internal_api/attachments/attachment_downloader_impl.cc b/sync/internal_api/attachments/attachment_downloader_impl.cc
index 2915296..b1e2153 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/attachment_downloader_impl.h"
+#include <stdint.h>
+
#include "base/base64.h"
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
diff --git a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
index 6574cb1..a2cb0b9 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/attachment_downloader_impl.h"
+#include <stdint.h>
+
#include <map>
#include "base/bind.h"
diff --git a/sync/internal_api/attachments/attachment_service_impl.cc b/sync/internal_api/attachments/attachment_service_impl.cc
index be5af27..6b0e606 100644
--- a/sync/internal_api/attachments/attachment_service_impl.cc
+++ b/sync/internal_api/attachments/attachment_service_impl.cc
@@ -7,6 +7,7 @@
#include <iterator>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/thread_task_runner_handle.h"
#include "base/time/time.h"
diff --git a/sync/internal_api/attachments/attachment_service_impl_unittest.cc b/sync/internal_api/attachments/attachment_service_impl_unittest.cc
index f5fbdc8..a044a22 100644
--- a/sync/internal_api/attachments/attachment_service_impl_unittest.cc
+++ b/sync/internal_api/attachments/attachment_service_impl_unittest.cc
@@ -10,6 +10,7 @@
#include <vector>
#include "base/bind.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
diff --git a/sync/internal_api/attachments/attachment_uploader_impl.cc b/sync/internal_api/attachments/attachment_uploader_impl.cc
index d67a977..735af8c 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl.cc
+++ b/sync/internal_api/attachments/attachment_uploader_impl.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/attachment_uploader_impl.h"
+#include <stdint.h>
+
#include <string>
#include <vector>
diff --git a/sync/internal_api/attachments/attachment_util.cc b/sync/internal_api/attachments/attachment_util.cc
index 08d7f99..c2debca 100644
--- a/sync/internal_api/attachments/attachment_util.cc
+++ b/sync/internal_api/attachments/attachment_util.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/attachment_util.h"
+#include <stdint.h>
+
#include "base/memory/ref_counted_memory.h"
#include "third_party/leveldatabase/src/util/crc32c.h"
diff --git a/sync/internal_api/attachments/on_disk_attachment_store.cc b/sync/internal_api/attachments/on_disk_attachment_store.cc
index a9bab47..c579c45 100644
--- a/sync/internal_api/attachments/on_disk_attachment_store.cc
+++ b/sync/internal_api/attachments/on_disk_attachment_store.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/on_disk_attachment_store.h"
+#include <stdint.h>
+
#include <string>
#include "base/bind.h"
@@ -34,7 +36,7 @@ const char kMetadataPrefix[] = "metadata-";
const char kDatabaseMetadataKey[] = "database-metadata";
-const int32 kCurrentSchemaVersion = 1;
+const int32_t kCurrentSchemaVersion = 1;
const base::FilePath::CharType kLeveldbDirectory[] =
FILE_PATH_LITERAL("leveldb");
diff --git a/sync/internal_api/attachments/on_disk_attachment_store_unittest.cc b/sync/internal_api/attachments/on_disk_attachment_store_unittest.cc
index 1f3ede6..09142e5 100644
--- a/sync/internal_api/attachments/on_disk_attachment_store_unittest.cc
+++ b/sync/internal_api/attachments/on_disk_attachment_store_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/attachments/on_disk_attachment_store.h"
+#include <stdint.h>
+
#include <string>
#include "base/files/file_path.h"
diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc
index caaf4ee..bde209f 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();
}
diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc
index c585bd78..72af337 100644
--- a/sync/internal_api/change_reorder_buffer.cc
+++ b/sync/internal_api/change_reorder_buffer.cc
@@ -4,11 +4,14 @@
#include "sync/internal_api/change_reorder_buffer.h"
+#include <stdint.h>
+
#include <limits>
#include <queue>
#include <set>
#include <utility> // for pair<>
+#include "base/macros.h"
#include "sync/internal_api/public/base_node.h"
#include "sync/internal_api/public/base_transaction.h"
#include "sync/syncable/entry.h"
@@ -29,24 +32,23 @@ namespace syncer {
// methods can be used to explore the nodes in root-to-leaf order.
class ChangeReorderBuffer::Traversal {
public:
- typedef pair<int64, int64> ParentChildLink;
+ typedef pair<int64_t, int64_t> ParentChildLink;
typedef set<ParentChildLink> LinkSet;
Traversal() : top_(kInvalidId) { }
// Expand the traversal so that it includes the node indicated by
// |child_handle|.
- void ExpandToInclude(syncable::BaseTransaction* trans,
- int64 child_handle) {
+ void ExpandToInclude(syncable::BaseTransaction* trans, int64_t child_handle) {
// If |top_| is invalid, this is the first insertion -- easy.
if (top_ == kInvalidId) {
top_ = child_handle;
return;
}
- int64 node_to_include = child_handle;
+ int64_t node_to_include = child_handle;
while (node_to_include != kInvalidId && node_to_include != top_) {
- int64 node_parent = 0;
+ int64_t node_parent = 0;
syncable::Entry node(trans, syncable::GET_BY_HANDLE, node_to_include);
CHECK(node.good());
@@ -87,20 +89,20 @@ class ChangeReorderBuffer::Traversal {
// Return the top node of the traversal. Use this as a starting point
// for walking the tree.
- int64 top() const { return top_; }
+ int64_t top() const { return top_; }
// Return an iterator corresponding to the first child (in the traversal)
// of the node specified by |parent_id|. Iterate this return value until
// it is equal to the value returned by end_children(parent_id). The
// enumeration thus provided is unordered.
- LinkSet::const_iterator begin_children(int64 parent_id) const {
+ LinkSet::const_iterator begin_children(int64_t parent_id) const {
return links_.upper_bound(
- ParentChildLink(parent_id, numeric_limits<int64>::min()));
+ ParentChildLink(parent_id, numeric_limits<int64_t>::min()));
}
// Return an iterator corresponding to the last child in the traversal
// of the node specified by |parent_id|.
- LinkSet::const_iterator end_children(int64 parent_id) const {
+ LinkSet::const_iterator end_children(int64_t parent_id) const {
return begin_children(parent_id + 1);
}
@@ -109,7 +111,7 @@ class ChangeReorderBuffer::Traversal {
// and thus the first node to be traversed. If the traversal is empty,
// this is kInvalidId. If the traversal contains exactly one member, |top_|
// will be the solitary member, and |links_| will be empty.
- int64 top_;
+ int64_t top_;
// A set of single-level links that compose the traversal below |top_|. The
// (parent, child) ordering of values enables efficient lookup of children
// given the parent handle, which is used for top-down traversal. |links_|
@@ -127,26 +129,26 @@ ChangeReorderBuffer::ChangeReorderBuffer() {
ChangeReorderBuffer::~ChangeReorderBuffer() {
}
-void ChangeReorderBuffer::PushAddedItem(int64 id) {
+void ChangeReorderBuffer::PushAddedItem(int64_t id) {
operations_[id] = ChangeRecord::ACTION_ADD;
}
-void ChangeReorderBuffer::PushDeletedItem(int64 id) {
+void ChangeReorderBuffer::PushDeletedItem(int64_t id) {
operations_[id] = ChangeRecord::ACTION_DELETE;
}
-void ChangeReorderBuffer::PushUpdatedItem(int64 id) {
+void ChangeReorderBuffer::PushUpdatedItem(int64_t id) {
operations_[id] = ChangeRecord::ACTION_UPDATE;
}
void ChangeReorderBuffer::SetExtraDataForId(
- int64 id,
+ int64_t id,
ExtraPasswordChangeRecordData* extra) {
extra_data_[id] = make_linked_ptr<ExtraPasswordChangeRecordData>(extra);
}
void ChangeReorderBuffer::SetSpecificsForId(
- int64 id,
+ int64_t id,
const sync_pb::EntitySpecifics& specifics) {
specifics_[id] = specifics;
}
@@ -189,10 +191,10 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder(
}
// Step 2: Breadth-first expansion of the traversal.
- queue<int64> to_visit;
+ queue<int64_t> to_visit;
to_visit.push(traversal.top());
while (!to_visit.empty()) {
- int64 next = to_visit.front();
+ int64_t next = to_visit.front();
to_visit.pop();
// If the node has an associated action, output a change record.
diff --git a/sync/internal_api/change_reorder_buffer.h b/sync/internal_api/change_reorder_buffer.h
index c1c577d..a1917f3 100644
--- a/sync/internal_api/change_reorder_buffer.h
+++ b/sync/internal_api/change_reorder_buffer.h
@@ -9,10 +9,13 @@
#ifndef SYNC_INTERNAL_API_CHANGE_REORDER_BUFFER_H_
#define SYNC_INTERNAL_API_CHANGE_REORDER_BUFFER_H_
+#include <stdint.h>
+
#include <map>
#include <vector>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "sync/internal_api/public/change_record.h"
#include "sync/protocol/sync.pb.h"
@@ -38,19 +41,19 @@ class ChangeReorderBuffer {
// Insert an item, identified by the metahandle |id|, into the reorder buffer.
// This item will appear in the output list as an ACTION_ADD ChangeRecord.
- void PushAddedItem(int64 id);
+ void PushAddedItem(int64_t id);
// Insert an item, identified by the metahandle |id|, into the reorder buffer.
// This item will appear in the output list as an ACTION_DELETE ChangeRecord.
- void PushDeletedItem(int64 id);
+ void PushDeletedItem(int64_t id);
// Insert an item, identified by the metahandle |id|, into the reorder buffer.
// This item will appear in the output list as an ACTION_UPDATE ChangeRecord.
- void PushUpdatedItem(int64 id);
+ void PushUpdatedItem(int64_t id);
- void SetExtraDataForId(int64 id, ExtraPasswordChangeRecordData* extra);
+ void SetExtraDataForId(int64_t id, ExtraPasswordChangeRecordData* extra);
- void SetSpecificsForId(int64 id, const sync_pb::EntitySpecifics& specifics);
+ void SetSpecificsForId(int64_t id, const sync_pb::EntitySpecifics& specifics);
// Reset the buffer, forgetting any pushed items, so that it can be used again
// to reorder a new set of changes.
@@ -68,9 +71,9 @@ class ChangeReorderBuffer {
private:
class Traversal;
- typedef std::map<int64, ChangeRecord::Action> OperationMap;
- typedef std::map<int64, sync_pb::EntitySpecifics> SpecificsMap;
- typedef std::map<int64, linked_ptr<ExtraPasswordChangeRecordData> >
+ typedef std::map<int64_t, ChangeRecord::Action> OperationMap;
+ typedef std::map<int64_t, sync_pb::EntitySpecifics> SpecificsMap;
+ typedef std::map<int64_t, linked_ptr<ExtraPasswordChangeRecordData>>
ExtraDataMap;
// Stores the items that have been pushed into the buffer, and the type of
diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc
index 28965d2..8c73f21 100644
--- a/sync/internal_api/debug_info_event_listener.cc
+++ b/sync/internal_api/debug_info_event_listener.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/debug_info_event_listener.h"
+#include <stddef.h>
+
#include "sync/util/cryptographer.h"
namespace syncer {
diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h
index 952eedc..63548f2 100644
--- a/sync/internal_api/debug_info_event_listener.h
+++ b/sync/internal_api/debug_info_event_listener.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/data_type_debug_info_listener.h"
diff --git a/sync/internal_api/delete_journal.cc b/sync/internal_api/delete_journal.cc
index 5db0963..6b8d955 100644
--- a/sync/internal_api/delete_journal.cc
+++ b/sync/internal_api/delete_journal.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/delete_journal.h"
+#include <stdint.h>
+
#include <set>
#include <string>
@@ -19,7 +21,7 @@ void DeleteJournal::GetBookmarkDeleteJournals(
syncer::syncable::EntryKernelSet deleted_entries;
trans->GetDirectory()->delete_journal()->GetDeleteJournals(
trans->GetWrappedTrans(), BOOKMARKS, &deleted_entries);
- std::set<int64> undecryptable_journal;
+ std::set<int64_t> undecryptable_journal;
for (syncer::syncable::EntryKernelSet::const_iterator i =
deleted_entries.begin(); i != deleted_entries.end(); ++i) {
delete_journal_list->push_back(BookmarkDeleteJournal());
@@ -55,7 +57,7 @@ void DeleteJournal::GetBookmarkDeleteJournals(
// static
void DeleteJournal::PurgeDeleteJournals(BaseTransaction* trans,
- const std::set<int64>& ids) {
+ const std::set<int64_t>& ids) {
trans->GetDirectory()->delete_journal()->PurgeDeleteJournals(
trans->GetWrappedTrans(), ids);
}
diff --git a/sync/internal_api/events/commit_request_event.cc b/sync/internal_api/events/commit_request_event.cc
index df55c7b..808181c 100644
--- a/sync/internal_api/events/commit_request_event.cc
+++ b/sync/internal_api/events/commit_request_event.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/events/commit_request_event.h"
+#include <stddef.h>
+
#include "base/format_macros.h"
#include "base/strings/stringprintf.h"
#include "sync/protocol/proto_value_conversions.h"
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 133a509..842adf3 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/public/http_bridge.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <vector>
#include "base/message_loop/message_loop.h"
@@ -47,16 +50,17 @@ bool IsSyncHttpContentCompressionEnabled() {
return StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
}
-void RecordSyncRequestContentLengthHistograms(int64 compressed_content_length,
- int64 original_content_length) {
+void RecordSyncRequestContentLengthHistograms(int64_t compressed_content_length,
+ int64_t original_content_length) {
UMA_HISTOGRAM_COUNTS("Sync.RequestContentLength.Compressed",
compressed_content_length);
UMA_HISTOGRAM_COUNTS("Sync.RequestContentLength.Original",
original_content_length);
}
-void RecordSyncResponseContentLengthHistograms(int64 compressed_content_length,
- int64 original_content_length) {
+void RecordSyncResponseContentLengthHistograms(
+ int64_t compressed_content_length,
+ int64_t original_content_length) {
UMA_HISTOGRAM_COUNTS("Sync.ResponseContentLength.Compressed",
compressed_content_length);
UMA_HISTOGRAM_COUNTS("Sync.ResponseContentLength.Original",
@@ -326,7 +330,7 @@ void HttpBridge::MakeAsynchronousPost() {
fetch_state_.url_poster->SetRequestContext(request_context_getter_.get());
fetch_state_.url_poster->SetExtraRequestHeaders(extra_headers_);
- int64 compressed_content_size = 0;
+ int64_t compressed_content_size = 0;
if (IsSyncHttpContentCompressionEnabled()) {
std::string compressed_request_content;
GzipCompress(request_content_, &compressed_request_content);
@@ -452,8 +456,8 @@ void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
fetch_state_.response_headers = source->GetResponseHeaders();
UpdateNetworkTime();
- int64 compressed_content_length = fetch_state_.response_content.size();
- int64 original_content_length = compressed_content_length;
+ int64_t compressed_content_length = fetch_state_.response_content.size();
+ int64_t original_content_length = compressed_content_length;
if (fetch_state_.response_headers &&
fetch_state_.response_headers->HasHeaderValue("content-encoding",
"gzip")) {
@@ -475,7 +479,8 @@ void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
}
void HttpBridge::OnURLFetchDownloadProgress(const net::URLFetcher* source,
- int64 current, int64 total) {
+ int64_t current,
+ int64_t total) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
// Reset the delay when forward progress is made.
base::AutoLock lock(fetch_state_lock_);
@@ -484,7 +489,8 @@ void HttpBridge::OnURLFetchDownloadProgress(const net::URLFetcher* source,
}
void HttpBridge::OnURLFetchUploadProgress(const net::URLFetcher* source,
- int64 current, int64 total) {
+ int64_t current,
+ int64_t total) {
DCHECK(network_task_runner_->BelongsToCurrentThread());
// Reset the delay when forward progress is made.
base::AutoLock lock(fetch_state_lock_);
@@ -537,7 +543,7 @@ void HttpBridge::UpdateNetworkTime() {
return;
}
- int64 sane_time_ms = 0;
+ int64_t sane_time_ms = 0;
if (base::StringToInt64(sane_time_str, &sane_time_ms)) {
network_time_update_callback_.Run(
base::Time::FromJsTime(sane_time_ms),
diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc
index 13c9142..d61f644 100644
--- a/sync/internal_api/http_bridge_unittest.cc
+++ b/sync/internal_api/http_bridge_unittest.cc
@@ -2,11 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/metrics/field_trial.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/mock_entropy_provider.h"
#include "base/threading/thread.h"
+#include "build/build_config.h"
#include "net/http/http_response_headers.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -79,9 +83,9 @@ int GzipUncompressHelper(Bytef* dest,
}
// Returns the uncompressed size from GZIP-compressed |compressed_data|.
-uint32 GetUncompressedSize(const std::string& compressed_data) {
+uint32_t GetUncompressedSize(const std::string& compressed_data) {
// The uncompressed size is stored in the last 4 bytes of |input| in LE.
- uint32 size;
+ uint32_t size;
if (compressed_data.length() < sizeof(size))
return 0;
memcpy(&size, &compressed_data[compressed_data.length() - sizeof(size)],
diff --git a/sync/internal_api/js_mutation_event_observer.cc b/sync/internal_api/js_mutation_event_observer.cc
index b40693b..857d723 100644
--- a/sync/internal_api/js_mutation_event_observer.cc
+++ b/sync/internal_api/js_mutation_event_observer.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/js_mutation_event_observer.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/location.h"
@@ -45,7 +48,7 @@ const size_t kChangeLimit = 100;
void JsMutationEventObserver::OnChangesApplied(
ModelType model_type,
- int64 write_transaction_id,
+ int64_t write_transaction_id,
const ImmutableChangeRecordList& changes) {
if (!event_handler_.IsInitialized()) {
return;
diff --git a/sync/internal_api/js_mutation_event_observer.h b/sync/internal_api/js_mutation_event_observer.h
index e274c55..da8529d 100644
--- a/sync/internal_api/js_mutation_event_observer.h
+++ b/sync/internal_api/js_mutation_event_observer.h
@@ -5,10 +5,12 @@
#ifndef SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
#define SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "sync/base/sync_export.h"
@@ -44,7 +46,7 @@ class SYNC_EXPORT JsMutationEventObserver
// SyncManager::ChangeObserver implementation.
void OnChangesApplied(ModelType model_type,
- int64 write_transaction_id,
+ int64_t write_transaction_id,
const ImmutableChangeRecordList& changes) override;
void OnChangesComplete(ModelType model_type) override;
diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc
index fb7daf9..2f0ff5d 100644
--- a/sync/internal_api/js_mutation_event_observer_unittest.cc
+++ b/sync/internal_api/js_mutation_event_observer_unittest.cc
@@ -4,7 +4,7 @@
#include "sync/internal_api/js_mutation_event_observer.h"
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/run_loop.h"
#include "base/values.h"
#include "sync/internal_api/public/base/model_type.h"
diff --git a/sync/internal_api/js_sync_encryption_handler_observer.h b/sync/internal_api/js_sync_encryption_handler_observer.h
index 89ff9d0..1c29204 100644
--- a/sync/internal_api/js_sync_encryption_handler_observer.h
+++ b/sync/internal_api/js_sync_encryption_handler_observer.h
@@ -7,8 +7,8 @@
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/sync_encryption_handler.h"
#include "sync/internal_api/public/util/weak_handle.h"
diff --git a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
index 4232279..30d9b00 100644
--- a/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
+++ b/sync/internal_api/js_sync_encryption_handler_observer_unittest.cc
@@ -4,7 +4,6 @@
#include "sync/internal_api/js_sync_encryption_handler_observer.h"
-#include "base/basictypes.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/values.h"
diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h
index 4fa9e10..a8241fe 100644
--- a/sync/internal_api/js_sync_manager_observer.h
+++ b/sync/internal_api/js_sync_manager_observer.h
@@ -7,8 +7,8 @@
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/sync_manager.h"
#include "sync/internal_api/public/util/weak_handle.h"
diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc
index ec5c4a3..4054b9f 100644
--- a/sync/internal_api/js_sync_manager_observer_unittest.cc
+++ b/sync/internal_api/js_sync_manager_observer_unittest.cc
@@ -6,7 +6,6 @@
#include <vector>
-#include "base/basictypes.h"
#include "base/location.h"
#include "base/run_loop.h"
#include "base/values.h"
diff --git a/sync/internal_api/model_type_entity.cc b/sync/internal_api/model_type_entity.cc
index cbfe00c..c489425 100644
--- a/sync/internal_api/model_type_entity.cc
+++ b/sync/internal_api/model_type_entity.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/model_type_entity.h"
+#include <stdint.h>
+
#include "base/base64.h"
#include "base/sha1.h"
#include "base/time/time.h"
@@ -58,11 +60,11 @@ bool ModelTypeEntity::RequiresCommitRequest() const {
return metadata_.sequence_number() > commit_requested_sequence_number_;
}
-bool ModelTypeEntity::UpdateIsReflection(int64 update_version) const {
+bool ModelTypeEntity::UpdateIsReflection(int64_t update_version) const {
return metadata_.server_version() >= update_version;
}
-bool ModelTypeEntity::UpdateIsInConflict(int64 update_version) const {
+bool ModelTypeEntity::UpdateIsInConflict(int64_t update_version) const {
return IsUnsynced() && !UpdateIsReflection(update_version);
}
@@ -154,8 +156,8 @@ void ModelTypeEntity::SetCommitRequestInProgress() {
void ModelTypeEntity::ReceiveCommitResponse(
const std::string& id,
- int64 sequence_number,
- int64 response_version,
+ int64_t sequence_number,
+ int64_t response_version,
const std::string& encryption_key_name) {
// The server can assign us a new ID in a commit response.
metadata_.set_server_id(id);
diff --git a/sync/internal_api/model_type_entity_unittest.cc b/sync/internal_api/model_type_entity_unittest.cc
index 08de2fc..68390434 100644
--- a/sync/internal_api/model_type_entity_unittest.cc
+++ b/sync/internal_api/model_type_entity_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/model_type_entity.h"
+#include <stdint.h>
+
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "sync/internal_api/public/base/model_type.h"
@@ -69,7 +71,7 @@ class ModelTypeEntityTest : public ::testing::Test {
}
scoped_ptr<ModelTypeEntity> NewServerItem(
- int64 version,
+ int64_t version,
const sync_pb::EntitySpecifics& specifics) {
scoped_ptr<ModelTypeEntity> entity(NewServerItem());
ApplyUpdateFromServer(entity.get(), version, specifics);
@@ -77,13 +79,13 @@ class ModelTypeEntityTest : public ::testing::Test {
}
void ApplyUpdateFromServer(ModelTypeEntity* entity,
- int64 version,
+ int64_t version,
const sync_pb::EntitySpecifics& specifics) {
ApplyUpdateFromServer(entity, version, specifics, kMtime);
}
void ApplyUpdateFromServer(ModelTypeEntity* entity,
- int64 version,
+ int64_t version,
const sync_pb::EntitySpecifics& specifics,
base::Time mtime) {
EntityData data;
diff --git a/sync/internal_api/protocol_event_buffer.cc b/sync/internal_api/protocol_event_buffer.cc
index 3d76bd9..962a0bd 100644
--- a/sync/internal_api/protocol_event_buffer.cc
+++ b/sync/internal_api/protocol_event_buffer.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/protocol_event_buffer.h"
+#include <stddef.h>
+
#include "sync/internal_api/public/events/protocol_event.h"
namespace syncer {
diff --git a/sync/internal_api/protocol_event_buffer.h b/sync/internal_api/protocol_event_buffer.h
index 88efb41..71a9c64 100644
--- a/sync/internal_api/protocol_event_buffer.h
+++ b/sync/internal_api/protocol_event_buffer.h
@@ -5,8 +5,11 @@
#ifndef SYNC_INTERNAL_API_PROTOCOL_EVENT_BUFFER_H_
#define SYNC_INTERNAL_API_PROTOCOL_EVENT_BUFFER_H_
+#include <stddef.h>
+
#include <deque>
+#include "base/macros.h"
#include "base/memory/scoped_vector.h"
#include "sync/base/sync_export.h"
diff --git a/sync/internal_api/protocol_event_buffer_unittest.cc b/sync/internal_api/protocol_event_buffer_unittest.cc
index 7aa924a..ced9a25c4 100644
--- a/sync/internal_api/protocol_event_buffer_unittest.cc
+++ b/sync/internal_api/protocol_event_buffer_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/time/time.h"
@@ -18,8 +21,8 @@ class ProtocolEventBufferTest : public ::testing::Test {
ProtocolEventBufferTest();
~ProtocolEventBufferTest() override;
- static scoped_ptr<ProtocolEvent> MakeTestEvent(int64 id);
- static bool HasId(const ProtocolEvent& event, int64 id);
+ static scoped_ptr<ProtocolEvent> MakeTestEvent(int64_t id);
+ static bool HasId(const ProtocolEvent& event, int64_t id);
protected:
ProtocolEventBuffer buffer_;
@@ -29,7 +32,7 @@ ProtocolEventBufferTest::ProtocolEventBufferTest() {}
ProtocolEventBufferTest::~ProtocolEventBufferTest() {}
-scoped_ptr<ProtocolEvent> ProtocolEventBufferTest::MakeTestEvent(int64 id) {
+scoped_ptr<ProtocolEvent> ProtocolEventBufferTest::MakeTestEvent(int64_t id) {
sync_pb::ClientToServerMessage message;
return scoped_ptr<ProtocolEvent>(
new PollGetUpdatesRequestEvent(
@@ -37,7 +40,7 @@ scoped_ptr<ProtocolEvent> ProtocolEventBufferTest::MakeTestEvent(int64 id) {
message));
}
-bool ProtocolEventBufferTest::HasId(const ProtocolEvent& event, int64 id) {
+bool ProtocolEventBufferTest::HasId(const ProtocolEvent& event, int64_t id) {
return event.GetTimestamp() == base::Time::FromInternalValue(id);
}
@@ -58,7 +61,7 @@ TEST_F(ProtocolEventBufferTest, AddThenReturnEvents) {
TEST_F(ProtocolEventBufferTest, AddThenOverflowThenReturnEvents) {
for (size_t i = 0; i < ProtocolEventBuffer::kBufferSize+1; ++i) {
- scoped_ptr<ProtocolEvent> e(MakeTestEvent(static_cast<int64>(i)));
+ scoped_ptr<ProtocolEvent> e(MakeTestEvent(static_cast<int64_t>(i)));
buffer_.RecordProtocolEvent(*e);
}
@@ -67,8 +70,7 @@ TEST_F(ProtocolEventBufferTest, AddThenOverflowThenReturnEvents) {
ASSERT_EQ(ProtocolEventBuffer::kBufferSize, buffered_events.size());
for (size_t i = 1; i < ProtocolEventBuffer::kBufferSize+1; ++i) {
- EXPECT_TRUE(
- HasId(*(buffered_events[i-1]), static_cast<int64>(i)));
+ EXPECT_TRUE(HasId(*(buffered_events[i - 1]), static_cast<int64_t>(i)));
}
}
diff --git a/sync/internal_api/public/attachments/attachment_downloader_impl.h b/sync/internal_api/public/attachments/attachment_downloader_impl.h
index d13fc5d..a78912f 100644
--- a/sync/internal_api/public/attachments/attachment_downloader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_downloader_impl.h
@@ -5,11 +5,14 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_DOWNLOADER_IMPL_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_DOWNLOADER_IMPL_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "google_apis/gaia/oauth2_token_service_request.h"
#include "net/url_request/url_fetcher_delegate.h"
diff --git a/sync/internal_api/public/attachments/attachment_service.h b/sync/internal_api/public/attachments/attachment_service.h
index 6d061b6..e039c3a 100644
--- a/sync/internal_api/public/attachments/attachment_service.h
+++ b/sync/internal_api/public/attachments/attachment_service.h
@@ -5,7 +5,6 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_H_
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
diff --git a/sync/internal_api/public/attachments/attachment_service_impl.h b/sync/internal_api/public/attachments/attachment_service_impl.h
index 04b4121..a00fca5 100644
--- a/sync/internal_api/public/attachments/attachment_service_impl.h
+++ b/sync/internal_api/public/attachments/attachment_service_impl.h
@@ -7,6 +7,7 @@
#include <deque>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
diff --git a/sync/internal_api/public/attachments/attachment_service_proxy.h b/sync/internal_api/public/attachments/attachment_service_proxy.h
index f7d1b3c..107576b 100644
--- a/sync/internal_api/public/attachments/attachment_service_proxy.h
+++ b/sync/internal_api/public/attachments/attachment_service_proxy.h
@@ -5,8 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_H_
-#include "base/basictypes.h"
#include "base/callback.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
diff --git a/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h b/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h
index 47a990b..811c97d 100644
--- a/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h
+++ b/sync/internal_api/public/attachments/attachment_service_proxy_for_test.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_FOR_TEST_H_
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "sync/base/sync_export.h"
diff --git a/sync/internal_api/public/attachments/attachment_store_frontend.h b/sync/internal_api/public/attachments/attachment_store_frontend.h
index 051920d..49a447d 100644
--- a/sync/internal_api/public/attachments/attachment_store_frontend.h
+++ b/sync/internal_api/public/attachments/attachment_store_frontend.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_STORE_FRONTEND_H_
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
diff --git a/sync/internal_api/public/attachments/attachment_uploader.h b/sync/internal_api/public/attachments/attachment_uploader.h
index 0339e67..5362d22 100644
--- a/sync/internal_api/public/attachments/attachment_uploader.h
+++ b/sync/internal_api/public/attachments/attachment_uploader.h
@@ -5,7 +5,6 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_H_
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "sync/api/attachments/attachment.h"
diff --git a/sync/internal_api/public/attachments/attachment_uploader_impl.h b/sync/internal_api/public/attachments/attachment_uploader_impl.h
index bada41e..4f0fa83 100644
--- a/sync/internal_api/public/attachments/attachment_uploader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_uploader_impl.h
@@ -5,9 +5,12 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_
+#include <stdint.h>
+
#include <string>
#include "base/containers/scoped_ptr_hash_map.h"
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "google_apis/gaia/oauth2_token_service_request.h"
#include "net/url_request/url_request_context_getter.h"
diff --git a/sync/internal_api/public/attachments/attachment_util.h b/sync/internal_api/public/attachments/attachment_util.h
index e0def04..4cda236 100644
--- a/sync/internal_api/public/attachments/attachment_util.h
+++ b/sync/internal_api/public/attachments/attachment_util.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UTIL_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_UTIL_H_
+#include <stdint.h>
+
#include "base/memory/ref_counted.h"
#include "sync/base/sync_export.h"
diff --git a/sync/internal_api/public/attachments/fake_attachment_downloader.h b/sync/internal_api/public/attachments/fake_attachment_downloader.h
index 576d06b..f590711 100644
--- a/sync/internal_api/public/attachments/fake_attachment_downloader.h
+++ b/sync/internal_api/public/attachments/fake_attachment_downloader.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_FAKE_ATTACHMENT_DOWNLOADER_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_FAKE_ATTACHMENT_DOWNLOADER_H_
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "sync/internal_api/public/attachments/attachment_downloader.h"
diff --git a/sync/internal_api/public/attachments/fake_attachment_uploader.h b/sync/internal_api/public/attachments/fake_attachment_uploader.h
index 74f2a1f..601f777 100644
--- a/sync/internal_api/public/attachments/fake_attachment_uploader.h
+++ b/sync/internal_api/public/attachments/fake_attachment_uploader.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_FAKE_ATTACHMENT_UPLOADER_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_FAKE_ATTACHMENT_UPLOADER_H_
+#include "base/macros.h"
#include "base/threading/non_thread_safe.h"
#include "sync/internal_api/public/attachments/attachment_uploader.h"
diff --git a/sync/internal_api/public/attachments/in_memory_attachment_store.h b/sync/internal_api/public/attachments/in_memory_attachment_store.h
index 5f74d8c..7ae1f5d 100644
--- a/sync/internal_api/public/attachments/in_memory_attachment_store.h
+++ b/sync/internal_api/public/attachments/in_memory_attachment_store.h
@@ -8,6 +8,7 @@
#include <map>
#include <set>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "sync/api/attachments/attachment.h"
diff --git a/sync/internal_api/public/attachments/on_disk_attachment_store.h b/sync/internal_api/public/attachments/on_disk_attachment_store.h
index 0906f50..4e9fe8d 100644
--- a/sync/internal_api/public/attachments/on_disk_attachment_store.h
+++ b/sync/internal_api/public/attachments/on_disk_attachment_store.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/files/file_path.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/non_thread_safe.h"
#include "sync/api/attachments/attachment.h"
diff --git a/sync/internal_api/public/attachments/task_queue.h b/sync/internal_api/public/attachments/task_queue.h
index c46ce85..0d76b91 100644
--- a/sync/internal_api/public/attachments/task_queue.h
+++ b/sync/internal_api/public/attachments/task_queue.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_
#define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_TASK_QUEUE_H_
+#include <stddef.h>
+
#include <deque>
#include <set>
diff --git a/sync/internal_api/public/base/attachment_id_proto.cc b/sync/internal_api/public/base/attachment_id_proto.cc
index 7d9cc59..3166b10 100644
--- a/sync/internal_api/public/base/attachment_id_proto.cc
+++ b/sync/internal_api/public/base/attachment_id_proto.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/public/base/attachment_id_proto.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/guid.h"
diff --git a/sync/internal_api/public/base/attachment_id_proto.h b/sync/internal_api/public/base/attachment_id_proto.h
index bd2a346..f2b49b5 100644
--- a/sync/internal_api/public/base/attachment_id_proto.h
+++ b/sync/internal_api/public/base/attachment_id_proto.h
@@ -5,7 +5,9 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_ATTACHMENT_ID_PROTO_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_ATTACHMENT_ID_PROTO_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "sync/base/sync_export.h"
#include "sync/protocol/sync.pb.h"
diff --git a/sync/internal_api/public/base/enum_set.h b/sync/internal_api/public/base/enum_set.h
index 4061a03..df5bcd0 100644
--- a/sync/internal_api/public/base/enum_set.h
+++ b/sync/internal_api/public/base/enum_set.h
@@ -9,7 +9,6 @@
#include <cstddef>
#include <string>
-#include "base/basictypes.h"
#include "base/logging.h"
namespace syncer {
diff --git a/sync/internal_api/public/base/enum_set_unittest.cc b/sync/internal_api/public/base/enum_set_unittest.cc
index d4692a60..1719226 100644
--- a/sync/internal_api/public/base/enum_set_unittest.cc
+++ b/sync/internal_api/public/base/enum_set_unittest.cc
@@ -4,7 +4,8 @@
#include "sync/internal_api/public/base/enum_set.h"
-#include "base/basictypes.h"
+#include <stddef.h>
+
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
diff --git a/sync/internal_api/public/base/invalidation_interface.h b/sync/internal_api/public/base/invalidation_interface.h
index 2efddd6..9726797 100644
--- a/sync/internal_api/public/base/invalidation_interface.h
+++ b/sync/internal_api/public/base/invalidation_interface.h
@@ -5,9 +5,10 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_INTERFACE_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_INVALIDATION_INTERFACE_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "sync/base/sync_export.h"
namespace syncer {
@@ -36,7 +37,7 @@ class SYNC_EXPORT InvalidationInterface {
//
// It is preferable to use the LessThan() function, which handles unknown
// versions properly, rather than this function.
- virtual int64 GetVersion() const = 0;
+ virtual int64_t GetVersion() const = 0;
// This function will be called when the invalidation has been handled
// successfully.
diff --git a/sync/internal_api/public/base/model_type_test_util.cc b/sync/internal_api/public/base/model_type_test_util.cc
index 8c1164b..d2924fa 100644
--- a/sync/internal_api/public/base/model_type_test_util.cc
+++ b/sync/internal_api/public/base/model_type_test_util.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/macros.h"
#include "sync/internal_api/public/base/model_type_test_util.h"
namespace syncer {
diff --git a/sync/internal_api/public/base/node_ordinal.cc b/sync/internal_api/public/base/node_ordinal.cc
index 446486f..21ce8f2 100644
--- a/sync/internal_api/public/base/node_ordinal.cc
+++ b/sync/internal_api/public/base/node_ordinal.cc
@@ -4,13 +4,16 @@
#include "sync/internal_api/public/base/node_ordinal.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <string>
namespace syncer {
-NodeOrdinal Int64ToNodeOrdinal(int64 x) {
- uint64 y = static_cast<uint64>(x);
+NodeOrdinal Int64ToNodeOrdinal(int64_t x) {
+ uint64_t y = static_cast<uint64_t>(x);
y ^= 0x8000000000000000ULL;
std::string bytes(NodeOrdinal::kMinLength, '\x00');
if (y == 0) {
@@ -18,7 +21,7 @@ NodeOrdinal Int64ToNodeOrdinal(int64 x) {
bytes.push_back('\x80');
} else {
for (int i = 7; i >= 0; --i) {
- bytes[i] = static_cast<uint8>(y);
+ bytes[i] = static_cast<uint8_t>(y);
y >>= 8;
}
}
@@ -27,8 +30,8 @@ NodeOrdinal Int64ToNodeOrdinal(int64 x) {
return ordinal;
}
-int64 NodeOrdinalToInt64(const NodeOrdinal& ordinal) {
- uint64 y = 0;
+int64_t NodeOrdinalToInt64(const NodeOrdinal& ordinal) {
+ uint64_t y = 0;
const std::string& s = ordinal.ToInternalValue();
size_t l = NodeOrdinal::kMinLength;
if (s.length() < l) {
@@ -36,13 +39,13 @@ int64 NodeOrdinalToInt64(const NodeOrdinal& ordinal) {
l = s.length();
}
for (size_t i = 0; i < l; ++i) {
- const uint8 byte = s[l - i - 1];
- y |= static_cast<uint64>(byte) << (i * 8);
+ const uint8_t byte = s[l - i - 1];
+ y |= static_cast<uint64_t>(byte) << (i * 8);
}
y ^= 0x8000000000000000ULL;
// This is technically implementation-defined if y > INT64_MAX, so
// we're assuming that we're on a twos-complement machine.
- return static_cast<int64>(y);
+ return static_cast<int64_t>(y);
}
} // namespace syncer
diff --git a/sync/internal_api/public/base/node_ordinal.h b/sync/internal_api/public/base/node_ordinal.h
index e9a70c4..ce58daf 100644
--- a/sync/internal_api/public/base/node_ordinal.h
+++ b/sync/internal_api/public/base/node_ordinal.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_NODE_ORDINAL_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_NODE_ORDINAL_H_
+#include <stddef.h>
#include <stdint.h>
#include "sync/base/sync_export.h"
@@ -15,7 +16,7 @@ namespace syncer {
// A NodeOrdinal is an Ordinal whose internal value comes from the
// ordinal_in_parent field of SyncEntity (see sync.proto). It uses
// the entire uint8_t range for backwards compatibility with the old
-// int64-based positioning.
+// int64_t-based positioning.
struct NodeOrdinalTraits {
static const uint8_t kZeroDigit = 0;
@@ -40,7 +41,7 @@ static_assert(NodeOrdinal::kMaxDigitValue == 255,
static_assert(NodeOrdinal::kRadix == 256,
"NodeOrdinal has incorrect radix");
-// Converts an int64 position (usually from the position_in_parent
+// Converts an int64_t position (usually from the position_in_parent
// field of SyncEntity) to a NodeOrdinal. This transformation
// preserves the ordering relation: a < b under integer ordering if
// and only if Int64ToNodeOrdinal(a) < Int64ToNodeOrdinal(b).
@@ -50,7 +51,7 @@ SYNC_EXPORT NodeOrdinal Int64ToNodeOrdinal(int64_t x);
// lossy: NodeOrdinals can have arbitrary fidelity, while numeric
// positions contain only 64 bits of information (in fact, this is the
// reason we've moved away from them).
-SYNC_EXPORT int64 NodeOrdinalToInt64(const NodeOrdinal& ordinal);
+SYNC_EXPORT int64_t NodeOrdinalToInt64(const NodeOrdinal& ordinal);
} // namespace syncer
diff --git a/sync/internal_api/public/base/node_ordinal_unittest.cc b/sync/internal_api/public/base/node_ordinal_unittest.cc
index 05961d3..3ade983 100644
--- a/sync/internal_api/public/base/node_ordinal_unittest.cc
+++ b/sync/internal_api/public/base/node_ordinal_unittest.cc
@@ -12,6 +12,7 @@
#include <limits>
#include <vector>
+#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
diff --git a/sync/internal_api/public/base/ordinal.h b/sync/internal_api/public/base/ordinal.h
index 32d2ff6..6c0f21f 100644
--- a/sync/internal_api/public/base/ordinal.h
+++ b/sync/internal_api/public/base/ordinal.h
@@ -5,11 +5,12 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_ORDINAL_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_ORDINAL_H_
+#include <stdint.h>
+
#include <algorithm>
#include <cstddef>
#include <string>
-#include "base/basictypes.h"
#include "base/json/string_escape.h"
#include "base/logging.h"
@@ -38,8 +39,8 @@ namespace syncer {
// struct MyOrdinalTraits {
// // There must be at least two distinct values greater than kZeroDigit
// // and less than kMaxDigit.
-// static const uint8 kZeroDigit = '0';
-// static const uint8 kMaxDigit = '9';
+// static const uint8_t kZeroDigit = '0';
+// static const uint8_t kMaxDigit = '9';
// // kMinLength must be positive.
// static const size_t kMinLength = 1;
// };
@@ -132,11 +133,11 @@ class Ordinal {
// Use of copy constructor and default assignment for this class is allowed.
// Constants for Ordinal digits.
- static const uint8 kZeroDigit = Traits::kZeroDigit;
- static const uint8 kMaxDigit = Traits::kMaxDigit;
+ static const uint8_t kZeroDigit = Traits::kZeroDigit;
+ static const uint8_t kMaxDigit = Traits::kMaxDigit;
static const size_t kMinLength = Traits::kMinLength;
- static const uint8 kOneDigit = kZeroDigit + 1;
- static const uint8 kMidDigit = kOneDigit + (kMaxDigit - kOneDigit) / 2;
+ static const uint8_t kOneDigit = kZeroDigit + 1;
+ static const uint8_t kMidDigit = kOneDigit + (kMaxDigit - kOneDigit) / 2;
static const unsigned int kMidDigitValue = kMidDigit - kZeroDigit;
static const unsigned int kMaxDigitValue = kMaxDigit - kZeroDigit;
static const unsigned int kRadix = kMaxDigitValue + 1;
@@ -162,7 +163,7 @@ class Ordinal {
// Returns the digit at position i, padding with zero digits if
// required.
- static uint8 GetDigit(const std::string& bytes, size_t i);
+ static uint8_t GetDigit(const std::string& bytes, size_t i);
// Returns the digit value at position i, padding with 0 if required.
static int GetDigitValue(const std::string& bytes, size_t i);
@@ -197,11 +198,15 @@ class Ordinal {
bool is_valid_;
};
-template <typename Traits> const uint8 Ordinal<Traits>::kZeroDigit;
-template <typename Traits> const uint8 Ordinal<Traits>::kMaxDigit;
+template <typename Traits>
+const uint8_t Ordinal<Traits>::kZeroDigit;
+template <typename Traits>
+const uint8_t Ordinal<Traits>::kMaxDigit;
template <typename Traits> const size_t Ordinal<Traits>::kMinLength;
-template <typename Traits> const uint8 Ordinal<Traits>::kOneDigit;
-template <typename Traits> const uint8 Ordinal<Traits>::kMidDigit;
+template <typename Traits>
+const uint8_t Ordinal<Traits>::kOneDigit;
+template <typename Traits>
+const uint8_t Ordinal<Traits>::kMidDigit;
template <typename Traits> const unsigned int Ordinal<Traits>::kMidDigitValue;
template <typename Traits> const unsigned int Ordinal<Traits>::kMaxDigitValue;
template <typename Traits> const unsigned int Ordinal<Traits>::kRadix;
@@ -348,7 +353,7 @@ bool Ordinal<Traits>::IsValidOrdinalBytes(const std::string& bytes) {
bool found_non_zero = false;
for (size_t i = 0; i < length; ++i) {
- const uint8 byte = bytes[i];
+ const uint8_t byte = bytes[i];
if (byte < kZeroDigit || byte > kMaxDigit)
return false;
if (byte > kZeroDigit)
@@ -358,7 +363,7 @@ bool Ordinal<Traits>::IsValidOrdinalBytes(const std::string& bytes) {
return false;
if (length > kMinLength) {
- const uint8 last_byte = bytes[length - 1];
+ const uint8_t last_byte = bytes[length - 1];
if (last_byte == kZeroDigit)
return false;
}
@@ -384,7 +389,7 @@ size_t Ordinal<Traits>::GetLengthWithoutTrailingZeroDigits(
}
template <typename Traits>
-uint8 Ordinal<Traits>::GetDigit(const std::string& bytes, size_t i) {
+uint8_t Ordinal<Traits>::GetDigit(const std::string& bytes, size_t i) {
return (i < bytes.length()) ? bytes[i] : kZeroDigit;
}
diff --git a/sync/internal_api/public/base/unique_position.cc b/sync/internal_api/public/base/unique_position.cc
index 5576215..9924cb4 100644
--- a/sync/internal_api/public/base/unique_position.cc
+++ b/sync/internal_api/public/base/unique_position.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/public/base/unique_position.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <algorithm>
#include <limits>
diff --git a/sync/internal_api/public/base/unique_position.h b/sync/internal_api/public/base/unique_position.h
index d425f9a..70e9b39 100644
--- a/sync/internal_api/public/base/unique_position.h
+++ b/sync/internal_api/public/base/unique_position.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_UNIQUE_POSITION_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_UNIQUE_POSITION_H_
+#include <stddef.h>
#include <stdint.h>
#include <string>
diff --git a/sync/internal_api/public/base/unique_position_unittest.cc b/sync/internal_api/public/base/unique_position_unittest.cc
index 6b3fb8c..a666077 100644
--- a/sync/internal_api/public/base/unique_position_unittest.cc
+++ b/sync/internal_api/public/base/unique_position_unittest.cc
@@ -4,6 +4,7 @@
#include "sync/internal_api/public/base/unique_position.h"
+#include <stddef.h>
#include <stdint.h>
#include <algorithm>
@@ -12,8 +13,8 @@
#include <vector>
#include "base/base64.h"
-#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index fe3ca1b..709f423 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.
diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h
index c75086e..5002c72 100644
--- a/sync/internal_api/public/base_transaction.h
+++ b/sync/internal_api/public/base_transaction.h
@@ -5,6 +5,7 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
#define SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/user_share.h"
diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h
index 34e1a7d..0eb887b 100644
--- a/sync/internal_api/public/change_record.h
+++ b/sync/internal_api/public/change_record.h
@@ -5,9 +5,10 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_
#define SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_
+#include <stdint.h>
+
#include <vector>
-#include "base/basictypes.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/scoped_ptr.h"
#include "sync/base/sync_export.h"
@@ -52,7 +53,7 @@ struct SYNC_EXPORT ChangeRecord {
scoped_ptr<base::DictionaryValue> ToValue() const;
- int64 id;
+ int64_t id;
Action action;
sync_pb::EntitySpecifics specifics;
linked_ptr<ExtraPasswordChangeRecordData> extra;
diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc
index b68831a..a6b7a00 100644
--- a/sync/internal_api/public/change_record_unittest.cc
+++ b/sync/internal_api/public/change_record_unittest.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/public/change_record.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/memory/scoped_ptr.h"
@@ -103,7 +106,7 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) {
sync_pb::EntitySpecifics new_specifics;
old_specifics.mutable_extension()->set_id("new");
- const int64 kTestId = 5;
+ const int64_t kTestId = 5;
// Add
{
diff --git a/sync/internal_api/public/data_batch_impl.h b/sync/internal_api/public/data_batch_impl.h
index 8b369ba..9313310 100644
--- a/sync/internal_api/public/data_batch_impl.h
+++ b/sync/internal_api/public/data_batch_impl.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_DATA_BATCH_IMPL_H_
#define SYNC_INTERNAL_API_PUBLIC_DATA_BATCH_IMPL_H_
+#include <stddef.h>
+
#include <string>
#include <utility>
#include <vector>
diff --git a/sync/internal_api/public/data_type_association_stats.h b/sync/internal_api/public/data_type_association_stats.h
index ba38f65..cd5b226 100644
--- a/sync/internal_api/public/data_type_association_stats.h
+++ b/sync/internal_api/public/data_type_association_stats.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
#define SYNC_INTERNAL_API_PUBLIC_DATA_TYPE_ASSOCIATION_STATS_H_
+#include <stdint.h>
+
#include "base/time/time.h"
#include "sync/base/sync_export.h"
@@ -33,8 +35,8 @@ struct SYNC_EXPORT DataTypeAssociationStats {
int num_sync_items_modified;
// Model versions before association.
- int64 local_version_pre_association;
- int64 sync_version_pre_association;
+ int64_t local_version_pre_association;
+ int64_t sync_version_pre_association;
// Whether a datatype unrecoverable error was encountered during association.
bool had_error;
diff --git a/sync/internal_api/public/delete_journal.h b/sync/internal_api/public/delete_journal.h
index f6d43ca..c6aad553 100644
--- a/sync/internal_api/public/delete_journal.h
+++ b/sync/internal_api/public/delete_journal.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_DELETE_JOURNAL_H_
#define SYNC_INTERNAL_API_PUBLIC_DELETE_JOURNAL_H_
+#include <stdint.h>
+
#include <set>
#include <vector>
@@ -17,8 +19,8 @@ namespace syncer {
class BaseTransaction;
struct BookmarkDeleteJournal {
- int64 id; // Metahandle of delete journal entry.
- int64 external_id; // Bookmark ID in the native model.
+ int64_t id; // Metahandle of delete journal entry.
+ int64_t external_id; // Bookmark ID in the native model.
bool is_folder;
sync_pb::EntitySpecifics specifics;
};
@@ -38,7 +40,7 @@ class SYNC_EXPORT DeleteJournal {
// Purge delete journals of given IDs from |trans|'s directory.
static void PurgeDeleteJournals(BaseTransaction* trans,
- const std::set<int64>& ids);
+ const std::set<int64_t>& ids);
};
} // namespace syncer
diff --git a/sync/internal_api/public/engine/passive_model_worker.h b/sync/internal_api/public/engine/passive_model_worker.h
index c2c1d98..29ad028 100644
--- a/sync/internal_api/public/engine/passive_model_worker.h
+++ b/sync/internal_api/public/engine/passive_model_worker.h
@@ -5,8 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_
#define SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
#include "sync/internal_api/public/util/syncer_error.h"
diff --git a/sync/internal_api/public/engine/polling_constants.cc b/sync/internal_api/public/engine/polling_constants.cc
index edce4d8..0fadfa8 100644
--- a/sync/internal_api/public/engine/polling_constants.cc
+++ b/sync/internal_api/public/engine/polling_constants.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/basictypes.h"
+#include <stdint.h>
+
#include "sync/internal_api/public/engine/polling_constants.h"
namespace syncer {
@@ -12,12 +13,12 @@ namespace syncer {
// We use high values here to ensure that failure to receive poll updates from
// the server doesn't result in rapid-fire polling from the client due to low
// local limits.
-const int64 kDefaultShortPollIntervalSeconds = 3600 * 8;
+const int64_t kDefaultShortPollIntervalSeconds = 3600 * 8;
// Long poll is used when XMPP is on.
-const int64 kDefaultLongPollIntervalSeconds = 3600 * 12;
+const int64_t kDefaultLongPollIntervalSeconds = 3600 * 12;
// Maximum interval for exponential backoff.
-const int64 kMaxBackoffSeconds = 60 * 10; // 10 minutes.
+const int64_t kMaxBackoffSeconds = 60 * 10; // 10 minutes.
// Backoff interval randomization factor.
const int kBackoffRandomizationFactor = 2;
diff --git a/sync/internal_api/public/engine/polling_constants.h b/sync/internal_api/public/engine/polling_constants.h
index 4e93f17..8ef1fbcc 100644
--- a/sync/internal_api/public/engine/polling_constants.h
+++ b/sync/internal_api/public/engine/polling_constants.h
@@ -7,13 +7,15 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_
#define SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_
+#include <stdint.h>
+
#include "sync/base/sync_export.h"
namespace syncer {
-SYNC_EXPORT extern const int64 kDefaultShortPollIntervalSeconds;
-SYNC_EXPORT extern const int64 kDefaultLongPollIntervalSeconds;
-SYNC_EXPORT extern const int64 kMaxBackoffSeconds;
+SYNC_EXPORT extern const int64_t kDefaultShortPollIntervalSeconds;
+SYNC_EXPORT extern const int64_t kDefaultLongPollIntervalSeconds;
+SYNC_EXPORT extern const int64_t kMaxBackoffSeconds;
SYNC_EXPORT extern const int kBackoffRandomizationFactor;
SYNC_EXPORT extern const int kInitialBackoffRetrySeconds;
SYNC_EXPORT extern const int kInitialBackoffShortRetrySeconds;
diff --git a/sync/internal_api/public/events/clear_server_data_request_event.h b/sync/internal_api/public/events/clear_server_data_request_event.h
index 8a1fd77..b70ad5c 100644
--- a/sync/internal_api/public/events/clear_server_data_request_event.h
+++ b/sync/internal_api/public/events/clear_server_data_request_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/clear_server_data_response_event.h b/sync/internal_api/public/events/clear_server_data_response_event.h
index 9882d02..c6770ff 100644
--- a/sync/internal_api/public/events/clear_server_data_response_event.h
+++ b/sync/internal_api/public/events/clear_server_data_response_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/commit_request_event.h b/sync/internal_api/public/events/commit_request_event.h
index 1bf60d3..aed82b7 100644
--- a/sync/internal_api/public/events/commit_request_event.h
+++ b/sync/internal_api/public/events/commit_request_event.h
@@ -8,6 +8,7 @@
#include <cstddef>
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/commit_response_event.h b/sync/internal_api/public/events/commit_response_event.h
index caf18d9..4f28278 100644
--- a/sync/internal_api/public/events/commit_response_event.h
+++ b/sync/internal_api/public/events/commit_response_event.h
@@ -8,6 +8,7 @@
#include <cstddef>
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/configure_get_updates_request_event.h b/sync/internal_api/public/events/configure_get_updates_request_event.h
index 37d9037..42799a9 100644
--- a/sync/internal_api/public/events/configure_get_updates_request_event.h
+++ b/sync/internal_api/public/events/configure_get_updates_request_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/get_updates_response_event.h b/sync/internal_api/public/events/get_updates_response_event.h
index 6ec8674..0dc8c5e 100644
--- a/sync/internal_api/public/events/get_updates_response_event.h
+++ b/sync/internal_api/public/events/get_updates_response_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/normal_get_updates_request_event.h b/sync/internal_api/public/events/normal_get_updates_request_event.h
index 9df2bd4..0a97e10 100644
--- a/sync/internal_api/public/events/normal_get_updates_request_event.h
+++ b/sync/internal_api/public/events/normal_get_updates_request_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/events/poll_get_updates_request_event.h b/sync/internal_api/public/events/poll_get_updates_request_event.h
index 9d71af7..ff4b595 100644
--- a/sync/internal_api/public/events/poll_get_updates_request_event.h
+++ b/sync/internal_api/public/events/poll_get_updates_request_event.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/time.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h
index 85ad32e..79c73e0c 100644
--- a/sync/internal_api/public/http_bridge.h
+++ b/sync/internal_api/public/http_bridge.h
@@ -5,10 +5,12 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
#define SYNC_INTERNAL_API_PUBLIC_HTTP_BRIDGE_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/waitable_event.h"
@@ -76,9 +78,11 @@ class SYNC_EXPORT HttpBridge : public base::RefCountedThreadSafe<HttpBridge>,
// net::URLFetcherDelegate implementation.
void OnURLFetchComplete(const net::URLFetcher* source) override;
void OnURLFetchDownloadProgress(const net::URLFetcher* source,
- int64 current, int64 total) override;
+ int64_t current,
+ int64_t total) override;
void OnURLFetchUploadProgress(const net::URLFetcher* source,
- int64 current, int64 total) override;
+ int64_t current,
+ int64_t total) override;
net::URLRequestContextGetter* GetRequestContextGetterForTest() const;
diff --git a/sync/internal_api/public/internal_components_factory_impl.h b/sync/internal_api/public/internal_components_factory_impl.h
index fec1da6..ea1057d 100644
--- a/sync/internal_api/public/internal_components_factory_impl.h
+++ b/sync/internal_api/public/internal_components_factory_impl.h
@@ -11,6 +11,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/internal_components_factory.h"
diff --git a/sync/internal_api/public/model_type_entity.h b/sync/internal_api/public/model_type_entity.h
index 551f1bd..cabbaeb 100644
--- a/sync/internal_api/public/model_type_entity.h
+++ b/sync/internal_api/public/model_type_entity.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_MODEL_TYPE_ENTITY_H_
#define SYNC_INTERNAL_API_PUBLIC_MODEL_TYPE_ENTITY_H_
+#include <stdint.h>
+
#include <string>
#include "base/memory/scoped_ptr.h"
@@ -53,10 +55,10 @@ class SYNC_EXPORT ModelTypeEntity {
bool RequiresCommitRequest() const;
// Returns true if the specified update version does not contain new data.
- bool UpdateIsReflection(int64 update_version) const;
+ bool UpdateIsReflection(int64_t update_version) const;
// Returns true if the specified update version conflicts with local changes.
- bool UpdateIsInConflict(int64 update_version) const;
+ bool UpdateIsInConflict(int64_t update_version) const;
// Applies an update from the sync server.
//
@@ -92,8 +94,8 @@ class SYNC_EXPORT ModelTypeEntity {
// possible that the committed item was already out of date by the time it
// reached the server.
void ReceiveCommitResponse(const std::string& id,
- int64 sequence_number,
- int64 response_version,
+ int64_t sequence_number,
+ int64_t response_version,
const std::string& encryption_key_name);
// Clears any in-memory sync state associated with outstanding commits.
@@ -133,7 +135,7 @@ class SYNC_EXPORT ModelTypeEntity {
EntityDataPtr commit_data_;
// The sequence number of the last item sent to the sync thread.
- int64 commit_requested_sequence_number_;
+ int64_t commit_requested_sequence_number_;
// TODO(stanisc): this should be removed.
// The name of the encryption key used to encrypt this item on the server.
diff --git a/sync/internal_api/public/non_blocking_sync_common.h b/sync/internal_api/public/non_blocking_sync_common.h
index 5fdcac3..799dfca 100644
--- a/sync/internal_api/public/non_blocking_sync_common.h
+++ b/sync/internal_api/public/non_blocking_sync_common.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_
#define SYNC_INTERNAL_API_PUBLIC_NON_BLOCKING_SYNC_COMMON_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
@@ -15,7 +17,7 @@
namespace syncer_v2 {
-static const int64 kUncommittedVersion = -1;
+static const int64_t kUncommittedVersion = -1;
// Data-type global state that must be accessed and updated on the sync thread,
// but persisted on or through the model thread.
@@ -52,8 +54,8 @@ struct SYNC_EXPORT CommitRequestData {
// Strictly incrementing number for in-progress commits. More information
// about its meaning can be found in comments in the files that make use of
// this struct.
- int64 sequence_number = 0;
- int64 base_version = 0;
+ int64_t sequence_number = 0;
+ int64_t base_version = 0;
};
struct SYNC_EXPORT CommitResponseData {
@@ -62,8 +64,8 @@ struct SYNC_EXPORT CommitResponseData {
std::string id;
std::string client_tag_hash;
- int64 sequence_number = 0;
- int64 response_version = 0;
+ int64_t sequence_number = 0;
+ int64_t response_version = 0;
};
struct SYNC_EXPORT UpdateResponseData {
@@ -72,7 +74,7 @@ struct SYNC_EXPORT UpdateResponseData {
EntityDataPtr entity;
- int64 response_version = 0;
+ int64_t response_version = 0;
std::string encryption_key_name;
};
diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h
index 69c3114..371cd67 100644
--- a/sync/internal_api/public/read_node.h
+++ b/sync/internal_api/public/read_node.h
@@ -5,10 +5,13 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_READ_NODE_H_
#define SYNC_INTERNAL_API_PUBLIC_READ_NODE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base_node.h"
@@ -28,7 +31,7 @@ class SYNC_EXPORT ReadNode : public BaseNode {
// populate the node.
// BaseNode implementation.
- InitByLookupResult InitByIdLookup(int64 id) override;
+ InitByLookupResult InitByIdLookup(int64_t id) override;
InitByLookupResult InitByClientTagLookup(ModelType model_type,
const std::string& tag) override;
@@ -50,7 +53,7 @@ class SYNC_EXPORT ReadNode : public BaseNode {
// Returns transaction version of the last transaction where this node has
// been modified.
- int64 GetTransactionVersion() const;
+ int64_t GetTransactionVersion() const;
// Implementation of BaseNode's abstract virtual accessors.
const syncable::Entry* GetEntry() const override;
diff --git a/sync/internal_api/public/read_transaction.h b/sync/internal_api/public/read_transaction.h
index e79669b..263a047 100644
--- a/sync/internal_api/public/read_transaction.h
+++ b/sync/internal_api/public/read_transaction.h
@@ -5,9 +5,13 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
#define SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/api/attachments/attachment_id.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base_transaction.h"
@@ -42,7 +46,7 @@ class SYNC_EXPORT ReadTransaction : public BaseTransaction {
// Return |transaction_version| of |type| stored in sync directory's
// persisted info.
- int64 GetModelVersion(ModelType type) const;
+ int64_t GetModelVersion(ModelType type) const;
// Fills |context| with the datatype context associated with |type|.
void GetDataTypeContext(ModelType type,
diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h
index 870f79e..a80a10d 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.h
+++ b/sync/internal_api/public/sessions/model_neutral_state.h
@@ -5,7 +5,6 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_MODEL_NEUTRAL_STATE_H_
#define SYNC_INTERNAL_API_PUBLIC_SESSIONS_MODEL_NEUTRAL_STATE_H_
-#include "base/basictypes.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/util/syncer_error.h"
diff --git a/sync/internal_api/public/sessions/status_counters.h b/sync/internal_api/public/sessions/status_counters.h
index 7c12133..83ccd13 100644
--- a/sync/internal_api/public/sessions/status_counters.h
+++ b/sync/internal_api/public/sessions/status_counters.h
@@ -5,6 +5,8 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_
#define SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_
+#include <stddef.h>
+
#include <string>
#include "base/memory/scoped_ptr.h"
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 9614330..8842c17 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/sessions/sync_session_snapshot.h"
+#include <stddef.h>
+
#include "base/json/json_writer.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index 335700b..fbe54eb 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -5,10 +5,11 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_
#define SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_
+#include <stddef.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/time/time.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 1ae8ba4..7e75983 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -5,10 +5,11 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
#define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
@@ -117,11 +118,10 @@ class SYNC_EXPORT SyncManager {
// forward dependencies. But since deletions come before reparent
// operations, a delete may temporarily orphan a node that is
// updated later in the list.
- virtual void OnChangesApplied(
- ModelType model_type,
- int64 model_version,
- const BaseTransaction* trans,
- const ImmutableChangeRecordList& changes) = 0;
+ virtual void OnChangesApplied(ModelType model_type,
+ int64_t model_version,
+ const BaseTransaction* trans,
+ const ImmutableChangeRecordList& changes) = 0;
// OnChangesComplete gets called when the TransactionComplete event is
// posted (after OnChangesApplied finishes), after the transaction lock
@@ -161,10 +161,9 @@ class SYNC_EXPORT SyncManager {
// Even more ideally, we would have sync semantics such that we'd
// be able to apply changes without being under a transaction.
// But that's a ways off...
- virtual void OnChangesApplied(
- ModelType model_type,
- int64 write_transaction_id,
- const ImmutableChangeRecordList& changes) = 0;
+ virtual void OnChangesApplied(ModelType model_type,
+ int64_t write_transaction_id,
+ const ImmutableChangeRecordList& changes) = 0;
virtual void OnChangesComplete(ModelType model_type) = 0;
diff --git a/sync/internal_api/public/sync_manager_factory.h b/sync/internal_api/public/sync_manager_factory.h
index 5a5dc63..ef6ee6b 100644
--- a/sync/internal_api/public/sync_manager_factory.h
+++ b/sync/internal_api/public/sync_manager_factory.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "sync/base/sync_export.h"
diff --git a/sync/internal_api/public/test/fake_sync_manager.h b/sync/internal_api/public/test/fake_sync_manager.h
index 86ad21f..4443a2a 100644
--- a/sync/internal_api/public/test/fake_sync_manager.h
+++ b/sync/internal_api/public/test/fake_sync_manager.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "sync/internal_api/public/sync_manager.h"
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index 138338b..ee99834 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -5,9 +5,11 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_TEST_TEST_ENTRY_FACTORY_H_
#define SYNC_INTERNAL_API_PUBLIC_TEST_TEST_ENTRY_FACTORY_H_
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/protocol/sync.pb.h"
@@ -24,20 +26,20 @@ class TestEntryFactory {
~TestEntryFactory();
// Create a new unapplied folder node with a parent.
- int64 CreateUnappliedNewItemWithParent(
+ int64_t CreateUnappliedNewItemWithParent(
const std::string& item_id,
const sync_pb::EntitySpecifics& specifics,
const std::string& parent_id);
- int64 CreateUnappliedNewBookmarkItemWithParent(
+ int64_t CreateUnappliedNewBookmarkItemWithParent(
const std::string& item_id,
const sync_pb::EntitySpecifics& specifics,
const std::string& parent_id);
// Create a new unapplied update without a parent.
- int64 CreateUnappliedNewItem(const std::string& item_id,
- const sync_pb::EntitySpecifics& specifics,
- bool is_unique);
+ int64_t CreateUnappliedNewItem(const std::string& item_id,
+ const sync_pb::EntitySpecifics& specifics,
+ bool is_unique);
// Create an unsynced unique_client_tag item in the database. If item_id is a
// local ID, it will be treated as a create-new. Otherwise, if it's a server
@@ -49,52 +51,53 @@ class TestEntryFactory {
const std::string& name,
bool is_folder,
ModelType model_type,
- int64* metahandle_out);
+ int64_t* metahandle_out);
// Creates a bookmark that is both unsynced an an unapplied update. Returns
// the metahandle of the created item.
- int64 CreateUnappliedAndUnsyncedBookmarkItem(const std::string& name);
+ int64_t CreateUnappliedAndUnsyncedBookmarkItem(const std::string& name);
// Creates a unique_client_tag item that has neither IS_UNSYNED or
// IS_UNAPPLIED_UPDATE. The item is known to both the server and client.
// Returns the metahandle of the created item.
- int64 CreateSyncedItem(const std::string& name,
- ModelType model_type, bool is_folder);
+ int64_t CreateSyncedItem(const std::string& name,
+ ModelType model_type,
+ bool is_folder);
// Creates a root node that IS_UNAPPLIED. Similar to what one would find in
// the database between the ProcessUpdates of an initial datatype configure
// cycle and the ApplyUpdates step of the same sync cycle.
- int64 CreateUnappliedRootNode(ModelType model_type);
+ int64_t CreateUnappliedRootNode(ModelType model_type);
// Looks up the item referenced by |meta_handle|. If successful, overwrites
// the server specifics with |specifics|, sets
// IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
// Else, return false.
- bool SetServerSpecificsForItem(int64 meta_handle,
+ bool SetServerSpecificsForItem(int64_t meta_handle,
const sync_pb::EntitySpecifics specifics);
// Looks up the item referenced by |meta_handle|. If successful, overwrites
// the local specifics with |specifics|, sets
// IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
// Else, return false.
- bool SetLocalSpecificsForItem(int64 meta_handle,
+ bool SetLocalSpecificsForItem(int64_t meta_handle,
const sync_pb::EntitySpecifics specifics);
// Looks up the item referenced by |meta_handle| and returns its server
// specifics.
const sync_pb::EntitySpecifics& GetServerSpecificsForItem(
- int64 meta_handle) const;
+ int64_t meta_handle) const;
// Looks up the item referenced by |meta_handle| and returns its specifics.
const sync_pb::EntitySpecifics& GetLocalSpecificsForItem(
- int64 meta_handle) const;
+ int64_t meta_handle) const;
// Looks up the item referenced by |meta_handle|. If successful, overwrites
// the server attachment metadata with |metadata|, sets
// IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
// Else, return false.
bool SetServerAttachmentMetadataForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::AttachmentMetadata metadata);
// Looks up the item referenced by |meta_handle|. If successful, overwrites
@@ -102,28 +105,28 @@ class TestEntryFactory {
// IS_UNAPPLIED_UPDATES/IS_UNSYNCED appropriately, and returns true.
// Else, return false.
bool SetLocalAttachmentMetadataForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::AttachmentMetadata metadata);
// Looks up the item referenced by |meta_handle| and returns its server
// attachment metadata.
const sync_pb::AttachmentMetadata& GetServerAttachmentMetadataForItem(
- int64 meta_handle) const;
+ int64_t meta_handle) const;
// Looks up the item referenced by |meta_handle| and returns its attachment
// metadata.
const sync_pb::AttachmentMetadata& GetLocalAttachmentMetadataForItem(
- int64 meta_handle) const;
+ int64_t meta_handle) const;
// Getters for IS_UNSYNCED and IS_UNAPPLIED_UPDATE bit fields.
- bool GetIsUnsyncedForItem(int64 meta_handle) const;
- bool GetIsUnappliedForItem(int64 meta_handle) const;
+ bool GetIsUnsyncedForItem(int64_t meta_handle) const;
+ bool GetIsUnappliedForItem(int64_t meta_handle) const;
- int64 GetNextRevision();
+ int64_t GetNextRevision();
private:
syncable::Directory* directory_;
- int64 next_revision_;
+ int64_t next_revision_;
DISALLOW_COPY_AND_ASSIGN(TestEntryFactory);
};
diff --git a/sync/internal_api/public/test/test_internal_components_factory.h b/sync/internal_api/public/test/test_internal_components_factory.h
index f4de596..9058459 100644
--- a/sync/internal_api/public/test/test_internal_components_factory.h
+++ b/sync/internal_api/public/test/test_internal_components_factory.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/macros.h"
#include "sync/internal_api/public/internal_components_factory.h"
namespace syncer {
diff --git a/sync/internal_api/public/test/test_user_share.h b/sync/internal_api/public/test/test_user_share.h
index 0e6ed2f..d439a0d 100644
--- a/sync/internal_api/public/test/test_user_share.h
+++ b/sync/internal_api/public/test/test_user_share.h
@@ -30,7 +30,9 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_
#define SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_
-#include "base/basictypes.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/user_share.h"
diff --git a/sync/internal_api/public/util/immutable.h b/sync/internal_api/public/util/immutable.h
index e11458c..48d4051 100644
--- a/sync/internal_api/public/util/immutable.h
+++ b/sync/internal_api/public/util/immutable.h
@@ -67,7 +67,7 @@
// For std::swap().
#include <algorithm>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
namespace syncer {
diff --git a/sync/internal_api/public/util/immutable_unittest.cc b/sync/internal_api/public/util/immutable_unittest.cc
index 954a08f..9d7d0f3 100644
--- a/sync/internal_api/public/util/immutable_unittest.cc
+++ b/sync/internal_api/public/util/immutable_unittest.cc
@@ -12,7 +12,7 @@
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/internal_api/public/util/proto_value_ptr_unittest.cc b/sync/internal_api/public/util/proto_value_ptr_unittest.cc
index 7d1c515..b47ffa5 100644
--- a/sync/internal_api/public/util/proto_value_ptr_unittest.cc
+++ b/sync/internal_api/public/util/proto_value_ptr_unittest.cc
@@ -4,6 +4,7 @@
#include "sync/internal_api/public/util/proto_value_ptr.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h
index d5160f2..52f2b4f 100644
--- a/sync/internal_api/public/util/weak_handle.h
+++ b/sync/internal_api/public/util/weak_handle.h
@@ -49,13 +49,13 @@
#include <cstddef>
-#include "base/basictypes.h"
#include "base/bind.h"
#include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h"
diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h
index ee9616d..23e00b8 100644
--- a/sync/internal_api/public/write_node.h
+++ b/sync/internal_api/public/write_node.h
@@ -5,12 +5,15 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_
#define SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/base_node.h"
@@ -56,7 +59,7 @@ class SYNC_EXPORT WriteNode : public BaseNode {
// populate the node.
// BaseNode implementation.
- InitByLookupResult InitByIdLookup(int64 id) override;
+ InitByLookupResult InitByIdLookup(int64_t id) override;
InitByLookupResult InitByClientTagLookup(ModelType model_type,
const std::string& tag) override;
@@ -95,7 +98,7 @@ class SYNC_EXPORT WriteNode : public BaseNode {
// External ID is a client-only field, so setting it doesn't cause the item to
// be synced again.
- void SetExternalId(int64 external_id);
+ void SetExternalId(int64_t external_id);
// Remove this node and its children and sync deletion to server.
void Tombstone();
diff --git a/sync/internal_api/public/write_transaction.h b/sync/internal_api/public/write_transaction.h
index 8a1e35a..1b8c263 100644
--- a/sync/internal_api/public/write_transaction.h
+++ b/sync/internal_api/public/write_transaction.h
@@ -5,10 +5,13 @@
#ifndef SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
#define SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
-#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/macros.h"
#include "sync/api/sync_change_processor.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base_transaction.h"
@@ -39,7 +42,8 @@ class SYNC_EXPORT WriteTransaction : public BaseTransaction {
// if not after transaction is closed. This constructor is used for model
// types that support embassy data.
WriteTransaction(const tracked_objects::Location& from_here,
- UserShare* share, int64* transaction_version);
+ UserShare* share,
+ int64_t* transaction_version);
~WriteTransaction() override;
// Provide access to the syncable transaction from the API WriteNode.
diff --git a/sync/internal_api/read_node.cc b/sync/internal_api/read_node.cc
index 15dffc8..023d30c 100644
--- a/sync/internal_api/read_node.cc
+++ b/sync/internal_api/read_node.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/read_node.h"
+#include <stdint.h>
+
#include "base/logging.h"
#include "sync/internal_api/public/base_transaction.h"
#include "sync/syncable/entry.h"
@@ -36,7 +38,7 @@ void ReadNode::InitByRootLookup() {
DCHECK(false) << "Could not lookup root node for reading.";
}
-BaseNode::InitByLookupResult ReadNode::InitByIdLookup(int64 id) {
+BaseNode::InitByLookupResult ReadNode::InitByIdLookup(int64_t id) {
DCHECK(!entry_) << "Init called twice";
DCHECK_NE(id, kInvalidId);
syncable::BaseTransaction* trans = transaction_->GetWrappedTrans();
@@ -77,7 +79,7 @@ const BaseTransaction* ReadNode::GetTransaction() const {
return transaction_;
}
-int64 ReadNode::GetTransactionVersion() const {
+int64_t ReadNode::GetTransactionVersion() const {
return GetEntry()->GetTransactionVersion();
}
diff --git a/sync/internal_api/read_transaction.cc b/sync/internal_api/read_transaction.cc
index 9d81b0e..55c8d8e 100644
--- a/sync/internal_api/read_transaction.cc
+++ b/sync/internal_api/read_transaction.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/read_transaction.h"
+#include <stdint.h>
+
#include "sync/syncable/directory.h"
#include "sync/syncable/syncable_read_transaction.h"
@@ -36,7 +38,7 @@ syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const {
return transaction_;
}
-int64 ReadTransaction::GetModelVersion(ModelType type) const {
+int64_t ReadTransaction::GetModelVersion(ModelType type) const {
return transaction_->directory()->GetTransactionVersion(type);
}
diff --git a/sync/internal_api/shared_model_type_processor_unittest.cc b/sync/internal_api/shared_model_type_processor_unittest.cc
index 23506a82..411e8b1 100644
--- a/sync/internal_api/shared_model_type_processor_unittest.cc
+++ b/sync/internal_api/shared_model_type_processor_unittest.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/public/shared_model_type_processor.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -76,14 +79,14 @@ class SharedModelTypeProcessorTest : public ::testing::Test,
// Emulate updates from the server.
// This harness has some functionality to help emulate server behavior.
// See the definitions of these methods for more information.
- void UpdateFromServer(int64 version_offset,
+ void UpdateFromServer(int64_t version_offset,
const std::string& tag,
const std::string& value);
- void TombstoneFromServer(int64 version_offset, const std::string& tag);
+ void TombstoneFromServer(int64_t version_offset, const std::string& tag);
// Emulate the receipt of pending updates from the server.
// Pending updates are usually caused by a temporary decryption failure.
- void PendingUpdateFromServer(int64 version_offset,
+ void PendingUpdateFromServer(int64_t version_offset,
const std::string& tag,
const std::string& value,
const std::string& key_name);
@@ -128,8 +131,8 @@ class SharedModelTypeProcessorTest : public ::testing::Test,
const std::string& value,
const std::string& key_name);
- int64 GetServerVersion(const std::string& tag);
- void SetServerVersion(const std::string& tag, int64 version);
+ int64_t GetServerVersion(const std::string& tag);
+ void SetServerVersion(const std::string& tag, int64_t version);
void StartDone(syncer::SyncError error,
scoped_ptr<ActivationContext> context);
@@ -225,7 +228,7 @@ void SharedModelTypeProcessorTest::OnInitialSyncDone() {
empty_update_list);
}
-void SharedModelTypeProcessorTest::UpdateFromServer(int64 version_offset,
+void SharedModelTypeProcessorTest::UpdateFromServer(int64_t version_offset,
const std::string& tag,
const std::string& value) {
const std::string tag_hash = GenerateTagHash(tag);
@@ -239,7 +242,7 @@ void SharedModelTypeProcessorTest::UpdateFromServer(int64 version_offset,
}
void SharedModelTypeProcessorTest::PendingUpdateFromServer(
- int64 version_offset,
+ int64_t version_offset,
const std::string& tag,
const std::string& value,
const std::string& key_name) {
@@ -254,7 +257,7 @@ void SharedModelTypeProcessorTest::PendingUpdateFromServer(
list);
}
-void SharedModelTypeProcessorTest::TombstoneFromServer(int64 version_offset,
+void SharedModelTypeProcessorTest::TombstoneFromServer(int64_t version_offset,
const std::string& tag) {
// Overwrite the existing server version if this is the new highest version.
std::string tag_hash = GenerateTagHash(tag);
diff --git a/sync/internal_api/sync_backup_manager.cc b/sync/internal_api/sync_backup_manager.cc
index 76edd2c..9151e52 100644
--- a/sync/internal_api/sync_backup_manager.cc
+++ b/sync/internal_api/sync_backup_manager.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/sync_backup_manager.h"
+#include <stdint.h>
+
#include <vector>
#include "sync/internal_api/public/read_node.h"
@@ -58,7 +60,7 @@ ModelTypeSet SyncBackupManager::HandleTransactionEndingChangeEvent(
for (syncable::EntryKernelMutationMap::const_iterator it =
write_transaction_info.Get().mutations.Get().begin();
it != write_transaction_info.Get().mutations.Get().end(); ++it) {
- int64 id = it->first;
+ int64_t id = it->first;
if (unsynced_.find(id) == unsynced_.end()) {
unsynced_.insert(id);
@@ -77,8 +79,8 @@ ModelTypeSet SyncBackupManager::HandleTransactionEndingChangeEvent(
void SyncBackupManager::NormalizeEntries() {
WriteTransaction trans(FROM_HERE, GetUserShare());
in_normalization_ = true;
- for (std::set<int64>::const_iterator it = unsynced_.begin();
- it != unsynced_.end(); ++it) {
+ for (std::set<int64_t>::const_iterator it = unsynced_.begin();
+ it != unsynced_.end(); ++it) {
syncable::MutableEntry entry(trans.GetWrappedWriteTrans(),
syncable::GET_BY_HANDLE, *it);
CHECK(entry.good());
@@ -101,9 +103,9 @@ void SyncBackupManager::HideSyncPreference(ModelType type) {
if (BaseNode::INIT_OK != pref_root.InitTypeRoot(type))
return;
- std::vector<int64> pref_ids;
+ std::vector<int64_t> pref_ids;
pref_root.GetChildIds(&pref_ids);
- for (uint32 i = 0; i < pref_ids.size(); ++i) {
+ for (uint32_t i = 0; i < pref_ids.size(); ++i) {
syncable::MutableEntry entry(trans.GetWrappedWriteTrans(),
syncable::GET_BY_HANDLE, pref_ids[i]);
if (entry.good()) {
diff --git a/sync/internal_api/sync_backup_manager.h b/sync/internal_api/sync_backup_manager.h
index 0e0227e..e7e50fa 100644
--- a/sync/internal_api/sync_backup_manager.h
+++ b/sync/internal_api/sync_backup_manager.h
@@ -5,8 +5,11 @@
#ifndef SYNC_INTERNAL_API_SYNC_BACKUP_MANAGER_H_
#define SYNC_INTERNAL_API_SYNC_BACKUP_MANAGER_H_
+#include <stdint.h>
+
#include <set>
+#include "base/macros.h"
#include "sync/internal_api/sync_rollback_manager_base.h"
#include "url/gurl.h"
@@ -52,7 +55,7 @@ class SYNC_EXPORT SyncBackupManager : public SyncRollbackManagerBase {
void HideSyncPreference(ModelType pref_type);
// Handles of unsynced entries caused by local model changes.
- std::set<int64> unsynced_;
+ std::set<int64_t> unsynced_;
// True if NormalizeEntries() is being called.
bool in_normalization_;
diff --git a/sync/internal_api/sync_encryption_handler_impl.cc b/sync/internal_api/sync_encryption_handler_impl.cc
index 3ea242c..7bd10b9 100644
--- a/sync/internal_api/sync_encryption_handler_impl.cc
+++ b/sync/internal_api/sync_encryption_handler_impl.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/sync_encryption_handler_impl.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <queue>
#include <string>
@@ -833,8 +836,8 @@ void SyncEncryptionHandlerImpl::ReEncryptEverything(
continue; // Don't try to reencrypt if the type's data is unavailable.
// Iterate through all children of this datatype.
- std::queue<int64> to_visit;
- int64 child_id = type_root.GetFirstChildId();
+ std::queue<int64_t> to_visit;
+ int64_t child_id = type_root.GetFirstChildId();
to_visit.push(child_id);
while (!to_visit.empty()) {
child_id = to_visit.front();
@@ -861,7 +864,7 @@ void SyncEncryptionHandlerImpl::ReEncryptEverything(
// encrypted so we don't need to check GetEncryptedTypes() here.
ReadNode passwords_root(trans);
if (passwords_root.InitTypeRoot(PASSWORDS) == BaseNode::INIT_OK) {
- int64 child_id = passwords_root.GetFirstChildId();
+ int64_t child_id = passwords_root.GetFirstChildId();
while (child_id != kInvalidId) {
WriteNode child(trans);
if (child.InitByIdLookup(child_id) != BaseNode::INIT_OK)
diff --git a/sync/internal_api/sync_encryption_handler_impl.h b/sync/internal_api/sync_encryption_handler_impl.h
index babc942..aab9c54 100644
--- a/sync/internal_api/sync_encryption_handler_impl.h
+++ b/sync/internal_api/sync_encryption_handler_impl.h
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
diff --git a/sync/internal_api/sync_encryption_handler_impl_unittest.cc b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
index 7fd105b..21ad3d7 100644
--- a/sync/internal_api/sync_encryption_handler_impl_unittest.cc
+++ b/sync/internal_api/sync_encryption_handler_impl_unittest.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/sync_encryption_handler_impl.h"
+#include <stdint.h>
+
#include <string>
#include "base/base64.h"
@@ -146,10 +148,9 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
VerifyMigratedNigoriWithTimestamp(0, passphrase_type, passphrase);
}
- void VerifyMigratedNigoriWithTimestamp(
- int64 migration_time,
- PassphraseType passphrase_type,
- const std::string& passphrase) {
+ void VerifyMigratedNigoriWithTimestamp(int64_t migration_time,
+ PassphraseType passphrase_type,
+ const std::string& passphrase) {
ReadTransaction trans(FROM_HERE, user_share());
ReadNode nigori_node(&trans);
ASSERT_EQ(nigori_node.InitTypeRoot(NIGORI), BaseNode::INIT_OK);
@@ -196,7 +197,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
sync_pb::NigoriSpecifics BuildMigratedNigori(
PassphraseType passphrase_type,
- int64 migration_time,
+ int64_t migration_time,
const std::string& default_passphrase,
const std::string& keystore_key) {
DCHECK_NE(passphrase_type, IMPLICIT_PASSPHRASE);
@@ -239,7 +240,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
// Build a migrated nigori node with the specified default passphrase
// and keystore key and initialize the encryption handler with it.
- void InitKeystoreMigratedNigori(int64 migration_time,
+ void InitKeystoreMigratedNigori(int64_t migration_time,
const std::string& default_passphrase,
const std::string& keystore_key) {
{
@@ -273,7 +274,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
// Build a migrated nigori node with the specified default passphrase
// as a custom passphrase.
- void InitCustomPassMigratedNigori(int64 migration_time,
+ void InitCustomPassMigratedNigori(int64_t migration_time,
const std::string& default_passphrase) {
{
WriteTransaction trans(FROM_HERE, user_share());
@@ -344,7 +345,7 @@ class SyncEncryptionHandlerImplTest : public ::testing::Test {
//
// |passphrase| is the custom passphrase.
void VerifyRestoreAfterCustomPassphrase(
- int64 migration_time,
+ int64_t migration_time,
const std::string& passphrase,
const std::string& bootstrap_token,
const SyncEncryptionHandler::NigoriState& nigori_state,
@@ -1338,7 +1339,7 @@ TEST_F(SyncEncryptionHandlerImplTest, ReceiveUnmigratedNigoriAfterMigration) {
GetCryptographer()->AddKey(cur_key);
// Build a migrated nigori with full encryption.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1476,7 +1477,7 @@ TEST_F(SyncEncryptionHandlerImplTest, ReceiveOldMigratedNigori) {
EXPECT_CALL(*observer(), OnLocalSetPassphraseEncryption(_))
.WillOnce(testing::SaveArg<0>(&captured_nigori_state));
EXPECT_CALL(*observer(), OnEncryptionComplete());
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1616,7 +1617,7 @@ TEST_F(SyncEncryptionHandlerImplTest, SetCustomPassAfterMigration) {
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer should be
// initialized properly to decrypt both kOldKey and kKeystoreKey.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1733,7 +1734,7 @@ TEST_F(SyncEncryptionHandlerImplTest,
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer will have
// pending keys until we provide the decryption passphrase.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -1947,7 +1948,7 @@ TEST_F(SyncEncryptionHandlerImplTest,
// Build a nigori node with the generated keystore decryptor token and
// initialize the encryption handler with it. The cryptographer will have
// pending keys until we provide the decryption passphrase.
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
{
WriteTransaction trans(FROM_HERE, user_share());
WriteNode nigori_node(&trans);
@@ -2414,7 +2415,7 @@ TEST_F(SyncEncryptionHandlerImplTest, RotateKeysMigratedCustomPassphrase) {
KeyParams custom_key = {"localhost", "dummy", kCustomPass};
GetCryptographer()->AddKey(custom_key);
- const int64 migration_time = 1;
+ const int64_t migration_time = 1;
InitCustomPassMigratedNigori(migration_time, kCustomPass);
VerifyMigratedNigoriWithTimestamp(migration_time, CUSTOM_PASSPHRASE,
kCustomPass);
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 95c30de1..046ee3d 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/sync_manager_impl.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include "base/base64.h"
@@ -680,7 +683,7 @@ SyncManagerImpl::HandleTransactionEndingChangeEvent(
void SyncManagerImpl::HandleCalculateChangesChangeEventFromSyncApi(
const ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) {
+ std::vector<int64_t>* entries_changed) {
// We have been notified about a user action changing a sync model.
LOG_IF(WARNING, !change_records_.empty()) <<
"CALCULATE_CHANGES called with unapplied old changes.";
@@ -723,10 +726,14 @@ void SyncManagerImpl::HandleCalculateChangesChangeEventFromSyncApi(
}
}
-void SyncManagerImpl::SetExtraChangeRecordData(int64 id,
- ModelType type, ChangeReorderBuffer* buffer,
- Cryptographer* cryptographer, const syncable::EntryKernel& original,
- bool existed_before, bool exists_now) {
+void SyncManagerImpl::SetExtraChangeRecordData(
+ int64_t id,
+ ModelType type,
+ ChangeReorderBuffer* buffer,
+ Cryptographer* cryptographer,
+ const syncable::EntryKernel& original,
+ bool existed_before,
+ bool exists_now) {
// If this is a deletion and the datatype was encrypted, we need to decrypt it
// and attach it to the buffer.
if (!exists_now && existed_before) {
@@ -756,7 +763,7 @@ void SyncManagerImpl::SetExtraChangeRecordData(int64 id,
void SyncManagerImpl::HandleCalculateChangesChangeEventFromSyncer(
const ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) {
+ std::vector<int64_t>* entries_changed) {
// We only expect one notification per sync step, so change_buffers_ should
// contain no pending entries.
LOG_IF(WARNING, !change_records_.empty()) <<
@@ -778,7 +785,7 @@ void SyncManagerImpl::HandleCalculateChangesChangeEventFromSyncer(
if (type < FIRST_REAL_MODEL_TYPE)
continue;
- int64 handle = it->first;
+ int64_t handle = it->first;
if (exists_now && !existed_before)
change_buffers[type].PushAddedItem(handle);
else if (!exists_now && existed_before)
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h
index 18c66df..5efc905 100644
--- a/sync/internal_api/sync_manager_impl.h
+++ b/sync/internal_api/sync_manager_impl.h
@@ -5,11 +5,14 @@
#ifndef SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_
#define SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "net/base/network_change_notifier.h"
#include "sync/base/sync_export.h"
#include "sync/engine/all_status.h"
@@ -159,11 +162,11 @@ class SYNC_EXPORT SyncManagerImpl
void HandleCalculateChangesChangeEventFromSyncApi(
const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) override;
+ std::vector<int64_t>* entries_changed) override;
void HandleCalculateChangesChangeEventFromSyncer(
const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) override;
+ std::vector<int64_t>* entries_changed) override;
// Handle explicit requests to fetch updates for the given types.
void RefreshTypes(ModelTypeSet types) override;
@@ -243,7 +246,7 @@ class SYNC_EXPORT SyncManagerImpl
// If this is a deletion for a password, sets the legacy
// ExtraPasswordChangeRecordData field of |buffer|. Otherwise sets
// |buffer|'s specifics field to contain the unencrypted data.
- void SetExtraChangeRecordData(int64 id,
+ void SetExtraChangeRecordData(int64_t id,
ModelType type,
ChangeReorderBuffer* buffer,
Cryptographer* cryptographer,
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc
index 67aba25..4f08cb6 100644
--- a/sync/internal_api/sync_manager_impl_unittest.cc
+++ b/sync/internal_api/sync_manager_impl_unittest.cc
@@ -6,10 +6,11 @@
// functionality is provided by the Syncable layer, which has its own
// unit tests. We'll test SyncApi specific things in this harness.
+#include <stdint.h>
+
#include <cstddef>
#include <map>
-#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/files/scoped_temp_dir.h"
@@ -97,9 +98,9 @@ namespace {
// Makes a child node under the type root folder. Returns the id of the
// newly-created node.
-int64 MakeNode(UserShare* share,
- ModelType model_type,
- const std::string& client_tag) {
+int64_t MakeNode(UserShare* share,
+ ModelType model_type,
+ const std::string& client_tag) {
WriteTransaction trans(FROM_HERE, share);
WriteNode node(&trans);
WriteNode::InitUniqueByCreationResult result =
@@ -111,9 +112,9 @@ int64 MakeNode(UserShare* share,
// Makes a non-folder child of the root node. Returns the id of the
// newly-created node.
-int64 MakeNodeWithRoot(UserShare* share,
- ModelType model_type,
- const std::string& client_tag) {
+int64_t MakeNodeWithRoot(UserShare* share,
+ ModelType model_type,
+ const std::string& client_tag) {
WriteTransaction trans(FROM_HERE, share);
ReadNode root_node(&trans);
root_node.InitByRootLookup();
@@ -127,10 +128,10 @@ int64 MakeNodeWithRoot(UserShare* share,
// Makes a folder child of a non-root node. Returns the id of the
// newly-created node.
-int64 MakeFolderWithParent(UserShare* share,
- ModelType model_type,
- int64 parent_id,
- BaseNode* predecessor) {
+int64_t MakeFolderWithParent(UserShare* share,
+ ModelType model_type,
+ int64_t parent_id,
+ BaseNode* predecessor) {
WriteTransaction trans(FROM_HERE, share);
ReadNode parent_node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, parent_node.InitByIdLookup(parent_id));
@@ -140,9 +141,9 @@ int64 MakeFolderWithParent(UserShare* share,
return node.GetId();
}
-int64 MakeBookmarkWithParent(UserShare* share,
- int64 parent_id,
- BaseNode* predecessor) {
+int64_t MakeBookmarkWithParent(UserShare* share,
+ int64_t parent_id,
+ BaseNode* predecessor) {
WriteTransaction trans(FROM_HERE, share);
ReadNode parent_node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, parent_node.InitByIdLookup(parent_id));
@@ -154,7 +155,7 @@ int64 MakeBookmarkWithParent(UserShare* share,
// Creates the "synced" root node for a particular datatype. We use the syncable
// methods here so that the syncer treats these nodes as if they were already
// received from the server.
-int64 MakeTypeRoot(UserShare* share, ModelType model_type) {
+int64_t MakeTypeRoot(UserShare* share, ModelType model_type) {
sync_pb::EntitySpecifics specifics;
AddDefaultFieldValue(model_type, &specifics);
syncable::WriteTransaction trans(
@@ -181,10 +182,11 @@ int64 MakeTypeRoot(UserShare* share, ModelType model_type) {
}
// Simulates creating a "synced" node as a child of the root datatype node.
-int64 MakeServerNode(UserShare* share, ModelType model_type,
- const std::string& client_tag,
- const std::string& hashed_tag,
- const sync_pb::EntitySpecifics& specifics) {
+int64_t MakeServerNode(UserShare* share,
+ ModelType model_type,
+ const std::string& client_tag,
+ const std::string& hashed_tag,
+ const sync_pb::EntitySpecifics& specifics) {
syncable::WriteTransaction trans(
FROM_HERE, syncable::UNITTEST, share->directory.get());
syncable::Entry root_entry(&trans, syncable::GET_TYPE_ROOT, model_type);
@@ -209,7 +211,7 @@ int64 MakeServerNode(UserShare* share, ModelType model_type,
return entry.GetMetahandle();
}
-int GetTotalNodeCount(UserShare* share, int64 root) {
+int GetTotalNodeCount(UserShare* share, int64_t root) {
ReadTransaction trans(FROM_HERE, share);
ReadNode node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(root));
@@ -343,7 +345,7 @@ TEST_F(SyncApiTest, BasicTagWrite) {
}
TEST_F(SyncApiTest, BasicTagWriteWithImplicitParent) {
- int64 type_root = MakeTypeRoot(user_share(), PREFERENCES);
+ int64_t type_root = MakeTypeRoot(user_share(), PREFERENCES);
{
ReadTransaction trans(FROM_HERE, user_share());
@@ -423,8 +425,8 @@ TEST_F(SyncApiTest, ReadMissingTagsFails) {
// TODO(chron): Hook this all up to the server and write full integration tests
// for update->undelete behavior.
TEST_F(SyncApiTest, TestDeleteBehavior) {
- int64 node_id;
- int64 folder_id;
+ int64_t node_id;
+ int64_t folder_id;
std::string test_title("test1");
{
@@ -603,7 +605,7 @@ TEST_F(SyncApiTest, WriteEmptyBookmarkTitle) {
}
TEST_F(SyncApiTest, BaseNodeSetSpecifics) {
- int64 child_id = MakeNodeWithRoot(user_share(), BOOKMARKS, "testtag");
+ int64_t child_id = MakeNodeWithRoot(user_share(), BOOKMARKS, "testtag");
WriteTransaction trans(FROM_HERE, user_share());
WriteNode node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(child_id));
@@ -619,7 +621,7 @@ TEST_F(SyncApiTest, BaseNodeSetSpecifics) {
}
TEST_F(SyncApiTest, BaseNodeSetSpecificsPreservesUnknownFields) {
- int64 child_id = MakeNodeWithRoot(user_share(), BOOKMARKS, "testtag");
+ int64_t child_id = MakeNodeWithRoot(user_share(), BOOKMARKS, "testtag");
WriteTransaction trans(FROM_HERE, user_share());
WriteNode node(&trans);
EXPECT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(child_id));
@@ -651,14 +653,15 @@ TEST_F(SyncApiTest, EmptyTags) {
// Test counting nodes when the type's root node has no children.
TEST_F(SyncApiTest, GetTotalNodeCountEmpty) {
- int64 type_root = MakeTypeRoot(user_share(), BOOKMARKS);
+ int64_t type_root = MakeTypeRoot(user_share(), BOOKMARKS);
EXPECT_EQ(1, GetTotalNodeCount(user_share(), type_root));
}
// Test counting nodes when there is one child beneath the type's root.
TEST_F(SyncApiTest, GetTotalNodeCountOneChild) {
- int64 type_root = MakeTypeRoot(user_share(), BOOKMARKS);
- int64 parent = MakeFolderWithParent(user_share(), BOOKMARKS, type_root, NULL);
+ int64_t type_root = MakeTypeRoot(user_share(), BOOKMARKS);
+ int64_t parent =
+ MakeFolderWithParent(user_share(), BOOKMARKS, type_root, NULL);
EXPECT_EQ(2, GetTotalNodeCount(user_share(), type_root));
EXPECT_EQ(1, GetTotalNodeCount(user_share(), parent));
}
@@ -666,10 +669,11 @@ TEST_F(SyncApiTest, GetTotalNodeCountOneChild) {
// Test counting nodes when there are multiple children beneath the type root,
// and one of those children has children of its own.
TEST_F(SyncApiTest, GetTotalNodeCountMultipleChildren) {
- int64 type_root = MakeTypeRoot(user_share(), BOOKMARKS);
- int64 parent = MakeFolderWithParent(user_share(), BOOKMARKS, type_root, NULL);
+ int64_t type_root = MakeTypeRoot(user_share(), BOOKMARKS);
+ int64_t parent =
+ MakeFolderWithParent(user_share(), BOOKMARKS, type_root, NULL);
ignore_result(MakeFolderWithParent(user_share(), BOOKMARKS, type_root, NULL));
- int64 child1 = MakeFolderWithParent(user_share(), BOOKMARKS, parent, NULL);
+ int64_t child1 = MakeFolderWithParent(user_share(), BOOKMARKS, parent, NULL);
ignore_result(MakeBookmarkWithParent(user_share(), parent, NULL));
ignore_result(MakeBookmarkWithParent(user_share(), child1, NULL));
EXPECT_EQ(6, GetTotalNodeCount(user_share(), type_root));
@@ -731,10 +735,10 @@ TEST_F(SyncApiTest, AttachmentLinking) {
// with client tag matching that of an existing unapplied node with server only
// data. See crbug.com/505761.
TEST_F(SyncApiTest, WriteNode_UniqueByCreation_UndeleteCase) {
- int64 preferences_root = MakeTypeRoot(user_share(), PREFERENCES);
+ int64_t preferences_root = MakeTypeRoot(user_share(), PREFERENCES);
// Create a node with server only data.
- int64 item1 = 0;
+ int64_t item1 = 0;
{
syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST,
user_share()->directory.get());
@@ -757,7 +761,7 @@ TEST_F(SyncApiTest, WriteNode_UniqueByCreation_UndeleteCase) {
EXPECT_EQ(1, GetTotalNodeCount(user_share(), preferences_root));
// Create a client node with the same tag as the node above.
- int64 item2 = MakeNode(user_share(), PREFERENCES, "foo");
+ int64_t item2 = MakeNode(user_share(), PREFERENCES, "foo");
// Expect this to be the same directory entry as |item1|.
EXPECT_EQ(item1, item2);
// Expect it to be visible as a child of |preferences_root|.
@@ -960,11 +964,10 @@ class SyncManagerTest : public testing::Test,
return GetRoutingInfoTypes(routing_info);
}
- void OnChangesApplied(
- ModelType model_type,
- int64 model_version,
- const BaseTransaction* trans,
- const ImmutableChangeRecordList& changes) override {}
+ void OnChangesApplied(ModelType model_type,
+ int64_t model_version,
+ const BaseTransaction* trans,
+ const ImmutableChangeRecordList& changes) override {}
void OnChangesComplete(ModelType model_type) override {}
@@ -974,7 +977,7 @@ class SyncManagerTest : public testing::Test,
UserShare* share = sync_manager_.GetUserShare();
// We need to create the nigori node as if it were an applied server update.
- int64 nigori_id = GetIdForDataType(NIGORI);
+ int64_t nigori_id = GetIdForDataType(NIGORI);
if (nigori_id == kInvalidId)
return false;
@@ -1005,7 +1008,7 @@ class SyncManagerTest : public testing::Test,
return cryptographer->is_ready();
}
- int64 GetIdForDataType(ModelType type) {
+ int64_t GetIdForDataType(ModelType type) {
if (type_roots_.count(type) == 0)
return 0;
return type_roots_[type];
@@ -1118,7 +1121,7 @@ class SyncManagerTest : public testing::Test,
// Needed by |sync_manager_|.
base::ScopedTempDir temp_dir_;
// Sync Id's for the roots of the enabled datatypes.
- std::map<ModelType, int64> type_roots_;
+ std::map<ModelType, int64_t> type_roots_;
scoped_refptr<ExtensionsActivity> extensions_activity_;
protected:
@@ -1237,10 +1240,8 @@ TEST_F(SyncManagerTest, EncryptDataTypesWithData) {
EXPECT_TRUE(SetUpEncryption(WRITE_TO_NIGORI, DEFAULT_ENCRYPTION));
// Create some unencrypted unsynced data.
- int64 folder = MakeFolderWithParent(sync_manager_.GetUserShare(),
- BOOKMARKS,
- GetIdForDataType(BOOKMARKS),
- NULL);
+ int64_t folder = MakeFolderWithParent(sync_manager_.GetUserShare(), BOOKMARKS,
+ GetIdForDataType(BOOKMARKS), NULL);
// First batch_size nodes are children of folder.
size_t i;
for (i = 0; i < batch_size; ++i) {
@@ -1639,7 +1640,7 @@ TEST_F(SyncManagerTest, SupplyPendingGAIAPassUserProvided) {
TEST_F(SyncManagerTest, SetPassphraseWithEmptyPasswordNode) {
EXPECT_TRUE(SetUpEncryption(WRITE_TO_NIGORI, DEFAULT_ENCRYPTION));
- int64 node_id = 0;
+ int64_t node_id = 0;
std::string tag = "foo";
{
WriteTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
@@ -1684,9 +1685,9 @@ TEST_F(SyncManagerTest, EncryptBookmarksWithLegacyData) {
std::string url2 = "http://www.bla.com";
// Create a bookmark using the legacy format.
- int64 node_id1 =
+ int64_t node_id1 =
MakeNodeWithRoot(sync_manager_.GetUserShare(), BOOKMARKS, "testtag");
- int64 node_id2 =
+ int64_t node_id2 =
MakeNodeWithRoot(sync_manager_.GetUserShare(), BOOKMARKS, "testtag2");
{
WriteTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
@@ -1797,7 +1798,7 @@ TEST_F(SyncManagerTest, CreateLocalBookmark) {
ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
ReadNode bookmark_root(&trans);
ASSERT_EQ(BaseNode::INIT_OK, bookmark_root.InitTypeRoot(BOOKMARKS));
- int64 child_id = bookmark_root.GetFirstChildId();
+ int64_t child_id = bookmark_root.GetFirstChildId();
ReadNode node(&trans);
ASSERT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(child_id));
@@ -2840,7 +2841,7 @@ TEST_F(SyncManagerTest, PurgeUnappliedTypes) {
AddDefaultFieldValue(BOOKMARKS, &bm_specifics);
int pref1_meta = MakeServerNode(
share, PREFERENCES, "pref1", "hash1", pref_specifics);
- int64 pref2_meta = MakeNodeWithRoot(share, PREFERENCES, "pref2");
+ int64_t pref2_meta = MakeNodeWithRoot(share, PREFERENCES, "pref2");
int pref3_meta = MakeServerNode(
share, PREFERENCES, "pref3", "hash3", pref_specifics);
int pref4_meta = MakeServerNode(
@@ -2956,7 +2957,7 @@ TEST_F(SyncManagerTest, PurgeUnappliedTypes) {
class SyncManagerChangeProcessingTest : public SyncManagerTest {
public:
void OnChangesApplied(ModelType model_type,
- int64 model_version,
+ int64_t model_version,
const BaseTransaction* trans,
const ImmutableChangeRecordList& changes) override {
last_changes_ = changes;
@@ -2985,7 +2986,7 @@ class SyncManagerChangeProcessingTest : public SyncManagerTest {
// Looks for the given change in the list. Returns the index at which it was
// found. Returns -1 on lookup failure.
- size_t FindChangeInList(int64 id, ChangeRecord::Action action) {
+ size_t FindChangeInList(int64_t id, ChangeRecord::Action action) {
SCOPED_TRACE(id);
for (size_t i = 0; i < last_changes_.Get().size(); ++i) {
if (last_changes_.Get()[i].id == id
@@ -3015,9 +3016,9 @@ class SyncManagerChangeProcessingTest : public SyncManagerTest {
// Test creation of a folder and a bookmark.
TEST_F(SyncManagerChangeProcessingTest, AddBookmarks) {
- int64 type_root = GetIdForDataType(BOOKMARKS);
- int64 folder_id = kInvalidId;
- int64 child_id = kInvalidId;
+ int64_t type_root = GetIdForDataType(BOOKMARKS);
+ int64_t folder_id = kInvalidId;
+ int64_t child_id = kInvalidId;
// Create a folder and a bookmark under it.
{
@@ -3057,8 +3058,8 @@ TEST_F(SyncManagerChangeProcessingTest, AddBookmarks) {
// Test creation of a preferences (with implicit parent Id)
TEST_F(SyncManagerChangeProcessingTest, AddPreferences) {
- int64 item1_id = kInvalidId;
- int64 item2_id = kInvalidId;
+ int64_t item1_id = kInvalidId;
+ int64_t item2_id = kInvalidId;
// Create two preferences.
{
@@ -3090,9 +3091,9 @@ TEST_F(SyncManagerChangeProcessingTest, AddPreferences) {
// Test moving a bookmark into an empty folder.
TEST_F(SyncManagerChangeProcessingTest, MoveBookmarkIntoEmptyFolder) {
- int64 type_root = GetIdForDataType(BOOKMARKS);
- int64 folder_b_id = kInvalidId;
- int64 child_id = kInvalidId;
+ int64_t type_root = GetIdForDataType(BOOKMARKS);
+ int64_t folder_b_id = kInvalidId;
+ int64_t child_id = kInvalidId;
// Create two folders. Place a child under folder A.
{
@@ -3147,9 +3148,9 @@ TEST_F(SyncManagerChangeProcessingTest, MoveBookmarkIntoEmptyFolder) {
// Test moving a bookmark into a non-empty folder.
TEST_F(SyncManagerChangeProcessingTest, MoveIntoPopulatedFolder) {
- int64 type_root = GetIdForDataType(BOOKMARKS);
- int64 child_a_id = kInvalidId;
- int64 child_b_id = kInvalidId;
+ int64_t type_root = GetIdForDataType(BOOKMARKS);
+ int64_t child_a_id = kInvalidId;
+ int64_t child_b_id = kInvalidId;
// Create two folders. Place one child each under folder A and folder B.
{
@@ -3208,10 +3209,10 @@ TEST_F(SyncManagerChangeProcessingTest, MoveIntoPopulatedFolder) {
// Tests the ordering of deletion changes.
TEST_F(SyncManagerChangeProcessingTest, DeletionsAndChanges) {
- int64 type_root = GetIdForDataType(BOOKMARKS);
- int64 folder_a_id = kInvalidId;
- int64 folder_b_id = kInvalidId;
- int64 child_id = kInvalidId;
+ int64_t type_root = GetIdForDataType(BOOKMARKS);
+ int64_t folder_a_id = kInvalidId;
+ int64_t folder_b_id = kInvalidId;
+ int64_t child_id = kInvalidId;
// Create two folders. Place a child under folder A.
{
@@ -3280,11 +3281,11 @@ TEST_F(SyncManagerChangeProcessingTest, DeletionsAndChanges) {
// SyncManagerImpl::VisiblePropertiesDiffer.
TEST_F(SyncManagerChangeProcessingTest, AttachmentMetadataOnlyChanges) {
// Create an article with no attachments. See that a change is generated.
- int64 article_id = kInvalidId;
+ int64_t article_id = kInvalidId;
{
syncable::WriteTransaction trans(
FROM_HERE, syncable::SYNCER, share()->directory.get());
- int64 type_root = GetIdForDataType(ARTICLES);
+ int64_t type_root = GetIdForDataType(ARTICLES);
syncable::Entry root(&trans, syncable::GET_BY_HANDLE, type_root);
ASSERT_TRUE(root.good());
syncable::MutableEntry article(
diff --git a/sync/internal_api/sync_rollback_manager.cc b/sync/internal_api/sync_rollback_manager.cc
index 3ec76ce..e2a5c84 100644
--- a/sync/internal_api/sync_rollback_manager.cc
+++ b/sync/internal_api/sync_rollback_manager.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/sync_rollback_manager.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
@@ -87,7 +90,8 @@ void SyncRollbackManager::StartSyncingNormally(
}
SyncerError SyncRollbackManager::DeleteOnWorkerThread(
- ModelType type, std::vector<int64> handles) {
+ ModelType type,
+ std::vector<int64_t> handles) {
CHECK(change_delegate_);
{
diff --git a/sync/internal_api/sync_rollback_manager.h b/sync/internal_api/sync_rollback_manager.h
index 86c5085..d41086a 100644
--- a/sync/internal_api/sync_rollback_manager.h
+++ b/sync/internal_api/sync_rollback_manager.h
@@ -5,10 +5,13 @@
#ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
#define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_
+#include <stdint.h>
+
#include <map>
#include <string>
#include <vector>
+#include "base/macros.h"
#include "sync/internal_api/sync_rollback_manager_base.h"
class GURL;
@@ -29,7 +32,8 @@ class SYNC_EXPORT SyncRollbackManager : public SyncRollbackManagerBase {
private:
// Deletes specified entries in local model.
- SyncerError DeleteOnWorkerThread(ModelType type, std::vector<int64> handles);
+ SyncerError DeleteOnWorkerThread(ModelType type,
+ std::vector<int64_t> handles);
void NotifyRollbackDone();
diff --git a/sync/internal_api/sync_rollback_manager_base.cc b/sync/internal_api/sync_rollback_manager_base.cc
index 2de9686..3ec3005 100644
--- a/sync/internal_api/sync_rollback_manager_base.cc
+++ b/sync/internal_api/sync_rollback_manager_base.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/sync_rollback_manager_base.h"
+#include <stdint.h>
+
#include "sync/internal_api/public/base/model_type.h"
#include "sync/internal_api/public/read_node.h"
#include "sync/internal_api/public/read_transaction.h"
@@ -178,16 +180,14 @@ ModelTypeSet SyncRollbackManagerBase::HandleTransactionEndingChangeEvent(
}
void SyncRollbackManagerBase::HandleCalculateChangesChangeEventFromSyncApi(
- const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
- syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) {
-}
+ const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
+ syncable::BaseTransaction* trans,
+ std::vector<int64_t>* entries_changed) {}
void SyncRollbackManagerBase::HandleCalculateChangesChangeEventFromSyncer(
- const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
- syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) {
-}
+ const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
+ syncable::BaseTransaction* trans,
+ std::vector<int64_t>* entries_changed) {}
void SyncRollbackManagerBase::OnTransactionWrite(
const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
diff --git a/sync/internal_api/sync_rollback_manager_base.h b/sync/internal_api/sync_rollback_manager_base.h
index 8518ea5..ad3ad62 100644
--- a/sync/internal_api/sync_rollback_manager_base.h
+++ b/sync/internal_api/sync_rollback_manager_base.h
@@ -5,9 +5,12 @@
#ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_
#define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
+#include "base/macros.h"
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/http_post_provider_factory.h"
#include "sync/internal_api/public/internal_components_factory.h"
@@ -81,11 +84,11 @@ class SYNC_EXPORT SyncRollbackManagerBase
void HandleCalculateChangesChangeEventFromSyncApi(
const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) override;
+ std::vector<int64_t>* entries_changed) override;
void HandleCalculateChangesChangeEventFromSyncer(
const syncable::ImmutableWriteTransactionInfo& write_transaction_info,
syncable::BaseTransaction* trans,
- std::vector<int64>* entries_changed) override;
+ std::vector<int64_t>* entries_changed) override;
// syncable::TransactionObserver implementation.
void OnTransactionWrite(
diff --git a/sync/internal_api/sync_rollback_manager_unittest.cc b/sync/internal_api/sync_rollback_manager_unittest.cc
index 94ce3b1..55c5f43 100644
--- a/sync/internal_api/sync_rollback_manager_unittest.cc
+++ b/sync/internal_api/sync_rollback_manager_unittest.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/sync_rollback_manager.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include <set>
#include "base/files/scoped_temp_dir.h"
@@ -41,20 +44,18 @@ class TestChangeDelegate : public SyncManager::ChangeDelegate {
&TestChangeDelegate::VerifyDeletes)));
}
- void add_expected_delete(int64 v) {
- expected_deletes_.insert(v);
- }
+ void add_expected_delete(int64_t v) { expected_deletes_.insert(v); }
MOCK_METHOD4(OnChangesApplied,
void(ModelType model_type,
- int64 model_version,
+ int64_t model_version,
const BaseTransaction* trans,
const ImmutableChangeRecordList& changes));
MOCK_METHOD1(OnChangesComplete, void(ModelType model_type));
private:
void VerifyDeletes(const ImmutableChangeRecordList& changes) {
- std::set<int64> deleted;
+ std::set<int64_t> deleted;
for (size_t i = 0; i < changes.Get().size(); ++i) {
const ChangeRecord& change = (changes.Get())[i];
EXPECT_EQ(ChangeRecord::ACTION_DELETE, change.action);
@@ -64,7 +65,7 @@ class TestChangeDelegate : public SyncManager::ChangeDelegate {
EXPECT_TRUE(expected_deletes_ == deleted);
}
- std::set<int64> expected_deletes_;
+ std::set<int64_t> expected_deletes_;
};
class SyncRollbackManagerTest : public testing::Test,
@@ -91,8 +92,9 @@ class SyncRollbackManagerTest : public testing::Test,
EXPECT_TRUE(success);
}
- int64 CreateEntry(UserShare* user_share, ModelType type,
- const std::string& client_tag) {
+ int64_t CreateEntry(UserShare* user_share,
+ ModelType type,
+ const std::string& client_tag) {
WriteTransaction trans(FROM_HERE, user_share);
WriteNode node(&trans);
EXPECT_EQ(WriteNode::INIT_SUCCESS,
@@ -189,7 +191,7 @@ TEST_F(SyncRollbackManagerTest, RollbackBasic) {
InternalComponentsFactory::STORAGE_ON_DISK);
// Simulate a new entry added during type initialization.
- int64 new_pref_id =
+ int64_t new_pref_id =
CreateEntry(rollback_manager.GetUserShare(), PREFERENCES, "pref2");
delegate.add_expected_delete(new_pref_id);
@@ -213,7 +215,7 @@ TEST_F(SyncRollbackManagerTest, NoRollbackOfTypesNotBackedUp) {
InternalComponentsFactory::STORAGE_ON_DISK);
// Simulate new entry added during type initialization.
- int64 new_pref_id =
+ int64_t new_pref_id =
CreateEntry(rollback_manager.GetUserShare(), PREFERENCES, "pref2");
CreateEntry(rollback_manager.GetUserShare(), APPS, "app1");
diff --git a/sync/internal_api/syncapi_internal.cc b/sync/internal_api/syncapi_internal.cc
index d3ac523..5e715d7 100644
--- a/sync/internal_api/syncapi_internal.cc
+++ b/sync/internal_api/syncapi_internal.cc
@@ -4,6 +4,9 @@
#include "sync/internal_api/syncapi_internal.h"
+#include <stddef.h>
+
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "sync/protocol/attachments.pb.h"
#include "sync/protocol/password_specifics.pb.h"
diff --git a/sync/internal_api/syncapi_server_connection_manager.cc b/sync/internal_api/syncapi_server_connection_manager.cc
index 35ca1e2..16646ec 100644
--- a/sync/internal_api/syncapi_server_connection_manager.cc
+++ b/sync/internal_api/syncapi_server_connection_manager.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/syncapi_server_connection_manager.h"
+#include <stdint.h>
+
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
#include "sync/internal_api/public/http_post_provider_factory.h"
@@ -60,9 +62,9 @@ bool SyncAPIBridgedConnection::Init(const char* path,
// We got a server response, copy over response codes and content.
response->response_code = response_code;
response->content_length =
- static_cast<int64>(http->GetResponseContentLength());
+ static_cast<int64_t>(http->GetResponseContentLength());
response->payload_length =
- static_cast<int64>(http->GetResponseContentLength());
+ static_cast<int64_t>(http->GetResponseContentLength());
if (response->response_code < 400)
response->server_status = HttpResponse::SERVER_CONNECTION_OK;
else if (response->response_code == net::HTTP_UNAUTHORIZED)
diff --git a/sync/internal_api/syncapi_server_connection_manager.h b/sync/internal_api/syncapi_server_connection_manager.h
index 103fac0..aa1fe1e 100644
--- a/sync/internal_api/syncapi_server_connection_manager.h
+++ b/sync/internal_api/syncapi_server_connection_manager.h
@@ -9,6 +9,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "sync/base/sync_export.h"
#include "sync/engine/net/server_connection_manager.h"
diff --git a/sync/internal_api/test/test_entry_factory.cc b/sync/internal_api/test/test_entry_factory.cc
index 3dfb10c..7f5c20f 100644
--- a/sync/internal_api/test/test_entry_factory.cc
+++ b/sync/internal_api/test/test_entry_factory.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/test/test_entry_factory.h"
+#include <stdint.h>
+
#include "sync/syncable/directory.h"
#include "sync/syncable/entry.h"
#include "sync/syncable/mutable_entry.h"
@@ -28,7 +30,7 @@ TestEntryFactory::TestEntryFactory(syncable::Directory *dir)
TestEntryFactory::~TestEntryFactory() { }
-int64 TestEntryFactory::CreateUnappliedNewItemWithParent(
+int64_t TestEntryFactory::CreateUnappliedNewItemWithParent(
const string& item_id,
const sync_pb::EntitySpecifics& specifics,
const string& parent_id) {
@@ -46,7 +48,7 @@ int64 TestEntryFactory::CreateUnappliedNewItemWithParent(
return entry.GetMetahandle();
}
-int64 TestEntryFactory::CreateUnappliedNewBookmarkItemWithParent(
+int64_t TestEntryFactory::CreateUnappliedNewBookmarkItemWithParent(
const string& item_id,
const sync_pb::EntitySpecifics& specifics,
const string& parent_id) {
@@ -65,7 +67,7 @@ int64 TestEntryFactory::CreateUnappliedNewBookmarkItemWithParent(
return entry.GetMetahandle();
}
-int64 TestEntryFactory::CreateUnappliedNewItem(
+int64_t TestEntryFactory::CreateUnappliedNewItem(
const string& item_id,
const sync_pb::EntitySpecifics& specifics,
bool is_unique) {
@@ -86,13 +88,12 @@ int64 TestEntryFactory::CreateUnappliedNewItem(
return entry.GetMetahandle();
}
-void TestEntryFactory::CreateUnsyncedItem(
- const Id& item_id,
- const Id& parent_id,
- const string& name,
- bool is_folder,
- ModelType model_type,
- int64* metahandle_out) {
+void TestEntryFactory::CreateUnsyncedItem(const Id& item_id,
+ const Id& parent_id,
+ const string& name,
+ bool is_folder,
+ ModelType model_type,
+ int64_t* metahandle_out) {
if (is_folder) {
DCHECK_EQ(model_type, BOOKMARKS);
}
@@ -122,9 +123,9 @@ void TestEntryFactory::CreateUnsyncedItem(
*metahandle_out = entry.GetMetahandle();
}
-int64 TestEntryFactory::CreateUnappliedAndUnsyncedBookmarkItem(
+int64_t TestEntryFactory::CreateUnappliedAndUnsyncedBookmarkItem(
const string& name) {
- int64 metahandle = 0;
+ int64_t metahandle = 0;
CreateUnsyncedItem(
TestIdFactory::MakeServer(name), TestIdFactory::root(),
name, false, BOOKMARKS, &metahandle);
@@ -142,13 +143,14 @@ int64 TestEntryFactory::CreateUnappliedAndUnsyncedBookmarkItem(
return metahandle;
}
-int64 TestEntryFactory::CreateSyncedItem(
- const std::string& name, ModelType model_type, bool is_folder) {
+int64_t TestEntryFactory::CreateSyncedItem(const std::string& name,
+ ModelType model_type,
+ bool is_folder) {
WriteTransaction trans(FROM_HERE, UNITTEST, directory_);
syncable::Id parent_id(TestIdFactory::root());
syncable::Id item_id(TestIdFactory::MakeServer(name));
- int64 version = GetNextRevision();
+ int64_t version = GetNextRevision();
MutableEntry entry(&trans, syncable::CREATE, model_type, parent_id, name);
if (!entry.good()) {
@@ -175,8 +177,7 @@ int64 TestEntryFactory::CreateSyncedItem(
return entry.GetMetahandle();
}
-int64 TestEntryFactory::CreateUnappliedRootNode(
- ModelType model_type) {
+int64_t TestEntryFactory::CreateUnappliedRootNode(ModelType model_type) {
syncable::WriteTransaction trans(FROM_HERE, syncable::UNITTEST, directory_);
sync_pb::EntitySpecifics specifics;
AddDefaultFieldValue(model_type, &specifics);
@@ -198,7 +199,7 @@ int64 TestEntryFactory::CreateUnappliedRootNode(
}
bool TestEntryFactory::SetServerSpecificsForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::EntitySpecifics specifics) {
WriteTransaction trans(FROM_HERE, UNITTEST, directory_);
MutableEntry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
@@ -211,7 +212,7 @@ bool TestEntryFactory::SetServerSpecificsForItem(
}
bool TestEntryFactory::SetLocalSpecificsForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::EntitySpecifics specifics) {
WriteTransaction trans(FROM_HERE, UNITTEST, directory_);
MutableEntry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
@@ -224,7 +225,7 @@ bool TestEntryFactory::SetLocalSpecificsForItem(
}
const sync_pb::EntitySpecifics& TestEntryFactory::GetServerSpecificsForItem(
- int64 meta_handle) const {
+ int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
DCHECK(entry.good());
@@ -232,7 +233,7 @@ const sync_pb::EntitySpecifics& TestEntryFactory::GetServerSpecificsForItem(
}
const sync_pb::EntitySpecifics& TestEntryFactory::GetLocalSpecificsForItem(
- int64 meta_handle) const {
+ int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
DCHECK(entry.good());
@@ -240,7 +241,7 @@ const sync_pb::EntitySpecifics& TestEntryFactory::GetLocalSpecificsForItem(
}
bool TestEntryFactory::SetServerAttachmentMetadataForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::AttachmentMetadata metadata) {
WriteTransaction trans(FROM_HERE, UNITTEST, directory_);
MutableEntry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
@@ -253,7 +254,7 @@ bool TestEntryFactory::SetServerAttachmentMetadataForItem(
}
bool TestEntryFactory::SetLocalAttachmentMetadataForItem(
- int64 meta_handle,
+ int64_t meta_handle,
const sync_pb::AttachmentMetadata metadata) {
WriteTransaction trans(FROM_HERE, UNITTEST, directory_);
MutableEntry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
@@ -266,7 +267,8 @@ bool TestEntryFactory::SetLocalAttachmentMetadataForItem(
}
const sync_pb::AttachmentMetadata&
-TestEntryFactory::GetServerAttachmentMetadataForItem(int64 meta_handle) const {
+TestEntryFactory::GetServerAttachmentMetadataForItem(
+ int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
DCHECK(entry.good());
@@ -274,14 +276,14 @@ TestEntryFactory::GetServerAttachmentMetadataForItem(int64 meta_handle) const {
}
const sync_pb::AttachmentMetadata&
-TestEntryFactory::GetLocalAttachmentMetadataForItem(int64 meta_handle) const {
+TestEntryFactory::GetLocalAttachmentMetadataForItem(int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
DCHECK(entry.good());
return entry.GetAttachmentMetadata();
}
-bool TestEntryFactory::GetIsUnsyncedForItem(int64 meta_handle) const {
+bool TestEntryFactory::GetIsUnsyncedForItem(int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
if (!entry.good()) {
@@ -291,7 +293,7 @@ bool TestEntryFactory::GetIsUnsyncedForItem(int64 meta_handle) const {
return entry.GetIsUnsynced();
}
-bool TestEntryFactory::GetIsUnappliedForItem(int64 meta_handle) const {
+bool TestEntryFactory::GetIsUnappliedForItem(int64_t meta_handle) const {
syncable::ReadTransaction trans(FROM_HERE, directory_);
syncable::Entry entry(&trans, syncable::GET_BY_HANDLE, meta_handle);
if (!entry.good()) {
@@ -301,7 +303,7 @@ bool TestEntryFactory::GetIsUnappliedForItem(int64 meta_handle) const {
return entry.GetIsUnappliedUpdate();
}
-int64 TestEntryFactory::GetNextRevision() {
+int64_t TestEntryFactory::GetNextRevision() {
return next_revision_++;
}
diff --git a/sync/internal_api/test/test_user_share.cc b/sync/internal_api/test/test_user_share.cc
index 331807a..7b58d5c 100644
--- a/sync/internal_api/test/test_user_share.cc
+++ b/sync/internal_api/test/test_user_share.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/test/test_user_share.h"
+#include <stddef.h>
+
#include "base/compiler_specific.h"
#include "sync/syncable/directory.h"
#include "sync/syncable/mutable_entry.h"
diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc
index 7a065a2..eb37d11 100644
--- a/sync/internal_api/write_node.cc
+++ b/sync/internal_api/write_node.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/write_node.h"
+#include <stdint.h>
+
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -193,7 +195,7 @@ void WriteNode::SetTypedUrlSpecifics(
SetEntitySpecifics(entity_specifics);
}
-void WriteNode::SetExternalId(int64 id) {
+void WriteNode::SetExternalId(int64_t id) {
if (GetExternalId() != id)
entry_->PutLocalExternalId(id);
}
@@ -209,7 +211,7 @@ WriteNode::~WriteNode() {
// Find an existing node matching the ID |id|, and bind this WriteNode to it.
// Return true on success.
-BaseNode::InitByLookupResult WriteNode::InitByIdLookup(int64 id) {
+BaseNode::InitByLookupResult WriteNode::InitByIdLookup(int64_t id) {
DCHECK(!entry_) << "Init called twice";
DCHECK_NE(id, kInvalidId);
entry_ = new syncable::MutableEntry(transaction_->GetWrappedWriteTrans(),
diff --git a/sync/internal_api/write_transaction.cc b/sync/internal_api/write_transaction.cc
index 5415564..8ae7f9b 100644
--- a/sync/internal_api/write_transaction.cc
+++ b/sync/internal_api/write_transaction.cc
@@ -4,6 +4,8 @@
#include "sync/internal_api/public/write_transaction.h"
+#include <stdint.h>
+
#include "sync/syncable/directory.h"
#include "sync/syncable/mutable_entry.h"
#include "sync/syncable/syncable_write_transaction.h"
@@ -22,9 +24,8 @@ WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
WriteTransaction::WriteTransaction(const tracked_objects::Location& from_here,
UserShare* share,
- int64* new_model_version)
- : BaseTransaction(share),
- transaction_(NULL) {
+ int64_t* new_model_version)
+ : BaseTransaction(share), transaction_(NULL) {
transaction_ = new syncable::WriteTransaction(from_here,
share->directory.get(),
new_model_version);