summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/public')
-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
67 files changed, 221 insertions, 124 deletions
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.