diff options
author | caitkp <caitkp@chromium.org> | 2015-12-07 14:47:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-07 22:48:06 +0000 |
commit | 2d705603b7e3dca07371844ffa233a55d9c6b631 (patch) | |
tree | fca2e736aa5bb021dbc195120e89082bf1c96a59 /sync/internal_api | |
parent | 9a22c2242c67455492506df3c4191093f2065c82 (diff) | |
download | chromium_src-2d705603b7e3dca07371844ffa233a55d9c6b631.zip chromium_src-2d705603b7e3dca07371844ffa233a55d9c6b631.tar.gz chromium_src-2d705603b7e3dca07371844ffa233a55d9c6b631.tar.bz2 |
Revert of [Sync] Removing SYNC_EXPORT_PRIVATE macro and fixing lint violations on (patchset #3 id:40001 of https://codereview.chromium.org/1509563002/ )
Reason for revert:
Fails to compile for IOS
https://build.chromium.org/p/chromium.mac/builders/iOS_Device/builds/30956/steps/compile/logs/stdio
CompileC /b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/Objects-normal/armv7/attachment_store.pb.o /b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.cc normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /b/build/slave/iOS_Device/build/src/sync
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode7.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode7.0.app/Contents/Developer/usr/bin:/Users/chrome-bot/slavebin:/b/depot_tools:/usr/local/git/bin:/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
/b/build/slave/iOS_Device/build/src/sync/../third_party/llvm-build/Release+Asserts/bin/clang -x c++ -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -stdlib=libc++ -Wno-trigraphs -fno-exceptions -fno-rtti -Os -Werror -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -DDISABLE_NACL -DCHROMIUM_BUILD -DCR_CLANG_REVISION=254049-1 -DUSE_LIBJPEG_TURBO=1 -DDONT_EMBED_BUILD_METADATA -DFIELDTRIAL_TESTING_ENABLED -DDISABLE_FTP_SUPPORT=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DSYNC_IMPLEMENTATION -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DUSE_LIBPCI=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNS_BLOCK_ASSERTIONS=1 -D_FORTIFY_SOURCE=2 -isysroot /Applications/Xcode7.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=7.0 -g -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conversion -I/b/build/slave/iOS_Device/build/src/xcodebuild/Release-iphoneos/include -I/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release -I/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out -I.. -I../third_party/protobuf -I../third_party/protobuf/src -I/b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/DerivedSources/armv7 -I/b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/DerivedSources -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-bitfield-width -Wexit-time-destructors -F/b/build/slave/iOS_Device/build/src/xcodebuild/Release-iphoneos -Xclang -load -Xclang /b/build/slave/iOS_Device/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-overriding-blink -MMD -MT dependencies -MF /b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/Objects-normal/armv7/attachment_store.pb.d --serialize-diagnostics /b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/Objects-normal/armv7/attachment_store.pb.dia -c /b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.cc -o /b/build/slave/iOS_Device/build/src/xcodebuild/sync.build/Release-iphoneos/attachment_store_proto.build/Objects-normal/armv7/attachment_store.pb.o
In file included from /b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.cc:5:
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:34:6: error: variable has incomplete type 'void'
void SYNC_EXPORT_PRIVATE protobuf_AddDesc_attachment_5fstore_2eproto();
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:34:25: error: expected ';' after top level declarator
void SYNC_EXPORT_PRIVATE protobuf_AddDesc_attachment_5fstore_2eproto();
^
;
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:46:1: error: unknown type name 'SYNC_EXPORT_PRIVATE'
SYNC_EXPORT_PRIVATE bool RecordMetadata_Component_IsValid(int value);
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:46:21: error: expected unqualified-id
SYNC_EXPORT_PRIVATE bool RecordMetadata_Component_IsValid(int value);
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:53:27: error: variable has incomplete type 'class SYNC_EXPORT_PRIVATE'
class SYNC_EXPORT_PRIVATE StoreMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:53:7: note: forward declaration of 'attachment_store_pb::SYNC_EXPORT_PRIVATE'
class SYNC_EXPORT_PRIVATE StoreMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:53:41: error: expected ';' after top level declarator
class SYNC_EXPORT_PRIVATE StoreMetadata : public ::google::protobuf::MessageLite {
^
;
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:53:43: error: expected unqualified-id
class SYNC_EXPORT_PRIVATE StoreMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:146:27: error: variable has incomplete type 'class SYNC_EXPORT_PRIVATE'
class SYNC_EXPORT_PRIVATE RecordMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:53:7: note: forward declaration of 'attachment_store_pb::SYNC_EXPORT_PRIVATE'
class SYNC_EXPORT_PRIVATE StoreMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:146:42: error: expected ';' after top level declarator
class SYNC_EXPORT_PRIVATE RecordMetadata : public ::google::protobuf::MessageLite {
^
;
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:146:44: error: expected unqualified-id
class SYNC_EXPORT_PRIVATE RecordMetadata : public ::google::protobuf::MessageLite {
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:280:13: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline bool StoreMetadata::has_schema_version() const {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:283:13: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline void StoreMetadata::set_has_schema_version() {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:286:13: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline void StoreMetadata::clear_has_schema_version() {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:289:13: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline void StoreMetadata::clear_schema_version() {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:293:34: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline ::google::protobuf::int32 StoreMetadata::schema_version() const {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:296:13: error: incomplete type 'attachment_store_pb::StoreMetadata' named in nested name specifier
inline void StoreMetadata::set_schema_version(::google::protobuf::int32 value) {
^~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:38:7: note: forward declaration of 'attachment_store_pb::StoreMetadata'
class StoreMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:306:13: error: incomplete type 'attachment_store_pb::RecordMetadata' named in nested name specifier
inline bool RecordMetadata::has_attachment_size() const {
^~~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:39:7: note: forward declaration of 'attachment_store_pb::RecordMetadata'
class RecordMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:309:13: error: incomplete type 'attachment_store_pb::RecordMetadata' named in nested name specifier
inline void RecordMetadata::set_has_attachment_size() {
^~~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:39:7: note: forward declaration of 'attachment_store_pb::RecordMetadata'
class RecordMetadata;
^
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:312:13: error: incomplete type 'attachment_store_pb::RecordMetadata' named in nested name specifier
inline void RecordMetadata::clear_has_attachment_size() {
^~~~~~~~~~~~~~~~
/b/build/slave/iOS_Device/build/src/xcodebuild/DerivedSources/Release/protoc_out/sync/internal_api/attachments/proto/attachment_store.pb.h:39:7: note: forward declaration of 'attachment_store_pb::RecordMetadata'
class RecordMetadata;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Original issue's description:
> [Sync] Removing SYNC_EXPORT_PRIVATE macro and fixing lint violations on
> all touched files.
>
> BUG=554242,567301
>
> Committed: https://crrev.com/1621aa930169650b0c4c371e743f3be58a70abae
> Cr-Commit-Position: refs/heads/master@{#363603}
TBR=zea@chromium.org,skym@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=554242,567301
Review URL: https://codereview.chromium.org/1503253004
Cr-Commit-Position: refs/heads/master@{#363609}
Diffstat (limited to 'sync/internal_api')
47 files changed, 116 insertions, 134 deletions
diff --git a/sync/internal_api/attachments/proto/BUILD.gn b/sync/internal_api/attachments/proto/BUILD.gn index 2c2fe08..ac1a4b2 100644 --- a/sync/internal_api/attachments/proto/BUILD.gn +++ b/sync/internal_api/attachments/proto/BUILD.gn @@ -11,7 +11,7 @@ proto_library("proto") { sources = [ "attachment_store.proto", ] - cc_generator_options = "dllexport_decl=SYNC_EXPORT:" + cc_generator_options = "dllexport_decl=SYNC_EXPORT_PRIVATE:" cc_include = "sync/base/sync_export.h" defines = [ "SYNC_IMPLEMENTATION" ] diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h index 952eedc..166b6c2 100644 --- a/sync/internal_api/debug_info_event_listener.h +++ b/sync/internal_api/debug_info_event_listener.h @@ -7,7 +7,6 @@ #include <deque> #include <string> -#include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" @@ -32,7 +31,7 @@ const unsigned int kMaxEntries = MODEL_TYPE_COUNT + 10; // Listens to events and records them in a queue. And passes the events to // syncer when requested. // This class is not thread safe and should only be accessed on the sync thread. -class SYNC_EXPORT DebugInfoEventListener +class SYNC_EXPORT_PRIVATE DebugInfoEventListener : public SyncManager::Observer, public SyncEncryptionHandler::Observer, public sessions::DebugInfoGetter, diff --git a/sync/internal_api/js_mutation_event_observer.h b/sync/internal_api/js_mutation_event_observer.h index e274c55..41bd9fab 100644 --- a/sync/internal_api/js_mutation_event_observer.h +++ b/sync/internal_api/js_mutation_event_observer.h @@ -27,7 +27,7 @@ class JsEventHandler; // Observes all change- and transaction-related events and routes a // summarized version to a JsEventHandler. -class SYNC_EXPORT JsMutationEventObserver +class SYNC_EXPORT_PRIVATE JsMutationEventObserver : public SyncManager::ChangeObserver, public syncable::TransactionObserver, public base::NonThreadSafe { diff --git a/sync/internal_api/js_sync_encryption_handler_observer.h b/sync/internal_api/js_sync_encryption_handler_observer.h index 89ff9d0..9211514 100644 --- a/sync/internal_api/js_sync_encryption_handler_observer.h +++ b/sync/internal_api/js_sync_encryption_handler_observer.h @@ -24,7 +24,7 @@ class JsEventDetails; class JsEventHandler; // Routes SyncEncryptionHandler events to a JsEventHandler. -class SYNC_EXPORT JsSyncEncryptionHandlerObserver +class SYNC_EXPORT_PRIVATE JsSyncEncryptionHandlerObserver : public SyncEncryptionHandler::Observer { public: JsSyncEncryptionHandlerObserver(); diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h index 4fa9e10..58df73d 100644 --- a/sync/internal_api/js_sync_manager_observer.h +++ b/sync/internal_api/js_sync_manager_observer.h @@ -24,7 +24,7 @@ class JsEventDetails; class JsEventHandler; // Routes SyncManager events to a JsEventHandler. -class SYNC_EXPORT JsSyncManagerObserver : public SyncManager::Observer { +class SYNC_EXPORT_PRIVATE JsSyncManagerObserver : public SyncManager::Observer { public: JsSyncManagerObserver(); ~JsSyncManagerObserver() override; diff --git a/sync/internal_api/protocol_event_buffer.h b/sync/internal_api/protocol_event_buffer.h index 88efb41..8d82210 100644 --- a/sync/internal_api/protocol_event_buffer.h +++ b/sync/internal_api/protocol_event_buffer.h @@ -17,7 +17,7 @@ class ProtocolEvent; // A container for ProtocolEvents. // // Stores at most kBufferSize events, then starts dropping the oldest events. -class SYNC_EXPORT ProtocolEventBuffer { +class SYNC_EXPORT_PRIVATE ProtocolEventBuffer { public: static const size_t kBufferSize; diff --git a/sync/internal_api/public/activation_context.h b/sync/internal_api/public/activation_context.h index 798d851..3f94e25 100644 --- a/sync/internal_api/public/activation_context.h +++ b/sync/internal_api/public/activation_context.h @@ -16,7 +16,7 @@ namespace syncer_v2 { // The state passed from ModelTypeProcessor to Sync thread during DataType // activation. -struct SYNC_EXPORT ActivationContext { +struct SYNC_EXPORT_PRIVATE ActivationContext { ActivationContext(); ~ActivationContext(); diff --git a/sync/internal_api/public/attachments/attachment_downloader_impl.h b/sync/internal_api/public/attachments/attachment_downloader_impl.h index d13fc5d..1feca7c 100644 --- a/sync/internal_api/public/attachments/attachment_downloader_impl.h +++ b/sync/internal_api/public/attachments/attachment_downloader_impl.h @@ -5,9 +5,6 @@ #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_DOWNLOADER_IMPL_H_ #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_DOWNLOADER_IMPL_H_ -#include <string> -#include <vector> - #include "base/containers/scoped_ptr_hash_map.h" #include "base/gtest_prod_util.h" #include "base/threading/non_thread_safe.h" @@ -100,8 +97,9 @@ class AttachmentDownloaderImpl : public AttachmentDownloader, // Return true if a crc32c was found and useable for checking data integrity. // "Usable" means headers are present, there is "x-goog-hash" header with // "crc32c" hash in it, this hash is correctly base64 encoded 32 bit integer. - SYNC_EXPORT static bool ExtractCrc32c(const net::HttpResponseHeaders* headers, - uint32_t* crc32c); + SYNC_EXPORT_PRIVATE static bool ExtractCrc32c( + const net::HttpResponseHeaders* headers, + uint32_t* crc32c); GURL sync_service_url_; scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; diff --git a/sync/internal_api/public/attachments/attachment_util.h b/sync/internal_api/public/attachments/attachment_util.h index e0def04..c0e503e 100644 --- a/sync/internal_api/public/attachments/attachment_util.h +++ b/sync/internal_api/public/attachments/attachment_util.h @@ -20,7 +20,7 @@ namespace syncer { // Ideally this function should be static function in Attachment class, but // include_rules from sync/api/DEPS don't allow direct dependency on // third_party. -SYNC_EXPORT uint32_t +SYNC_EXPORT_PRIVATE uint32_t ComputeCrc32c(const scoped_refptr<base::RefCountedMemory>& data); } // namespace syncer diff --git a/sync/internal_api/public/base/attachment_id_proto.h b/sync/internal_api/public/base/attachment_id_proto.h index bd2a346..9af3a986 100644 --- a/sync/internal_api/public/base/attachment_id_proto.h +++ b/sync/internal_api/public/base/attachment_id_proto.h @@ -18,15 +18,16 @@ namespace syncer { // |size| is the size in bytes of the attachment identified by this proto. // // |crc32c| is the crc32c of the attachment identified by this proto. -SYNC_EXPORT sync_pb::AttachmentIdProto CreateAttachmentIdProto(size_t size, - uint32_t crc32c); +SYNC_EXPORT_PRIVATE sync_pb::AttachmentIdProto CreateAttachmentIdProto( + size_t size, + uint32_t crc32c); // Creates an AttachmentMetadata object from a repeated field of // AttachmentIdProto objects. // // Note: each record in the AttachmentMetadata will be marked as "on the // server". -SYNC_EXPORT sync_pb::AttachmentMetadata CreateAttachmentMetadata( +SYNC_EXPORT_PRIVATE sync_pb::AttachmentMetadata CreateAttachmentMetadata( const google::protobuf::RepeatedPtrField<sync_pb::AttachmentIdProto>& ids); } // namespace syncer diff --git a/sync/internal_api/public/base/cancelation_signal.h b/sync/internal_api/public/base/cancelation_signal.h index 6a84b7a..a074b62 100644 --- a/sync/internal_api/public/base/cancelation_signal.h +++ b/sync/internal_api/public/base/cancelation_signal.h @@ -31,7 +31,7 @@ class CancelationObserver; // // This class supports only one handler, though it could easily support multiple // observers if we found a use case for such a feature. -class SYNC_EXPORT CancelationSignal { +class SYNC_EXPORT_PRIVATE CancelationSignal { public: CancelationSignal(); ~CancelationSignal(); diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h index 30b15bb..5d353fd 100644 --- a/sync/internal_api/public/base/model_type.h +++ b/sync/internal_api/public/base/model_type.h @@ -181,7 +181,8 @@ SYNC_EXPORT void AddDefaultFieldValue(ModelType datatype, // local concept: the enum is not in the protocol. The SyncEntity's ModelType // is inferred from the presence of particular datatype field in the // entity specifics. -SYNC_EXPORT ModelType GetModelType(const sync_pb::SyncEntity& sync_entity); +SYNC_EXPORT_PRIVATE ModelType GetModelType( + const sync_pb::SyncEntity& sync_entity); // Extract the model type from an EntitySpecifics field. Note that there // are some ModelTypes (like TOP_LEVEL_FOLDER) that can't be inferred this way; @@ -205,7 +206,7 @@ SYNC_EXPORT bool IsUserSelectableType(ModelType model_type); SYNC_EXPORT ModelTypeNameMap GetUserSelectableTypeNameMap(); // This is the subset of UserTypes() that can be encrypted. -SYNC_EXPORT ModelTypeSet EncryptableUserTypes(); +SYNC_EXPORT_PRIVATE ModelTypeSet EncryptableUserTypes(); // This is the subset of UserTypes() that have priority over other types. These // types are synced before other user types and are never encrypted. @@ -261,7 +262,8 @@ SYNC_EXPORT ModelTypeSet PriorityCoreTypes(); // } // model_types.Put(model_type); // } -SYNC_EXPORT ModelType GetModelTypeFromSpecificsFieldNumber(int field_number); +SYNC_EXPORT_PRIVATE ModelType GetModelTypeFromSpecificsFieldNumber( + int field_number); // Return the field number of the EntitySpecifics field associated with // a model type. @@ -284,10 +286,10 @@ SYNC_EXPORT int ModelTypeToHistogramInt(ModelType model_type); // Handles all model types, and not just real ones. // // Caller takes ownership of returned value. -SYNC_EXPORT base::StringValue* ModelTypeToValue(ModelType model_type); +SYNC_EXPORT_PRIVATE base::StringValue* ModelTypeToValue(ModelType model_type); // Converts a Value into a ModelType - complement to ModelTypeToValue(). -SYNC_EXPORT ModelType ModelTypeFromValue(const base::Value& value); +SYNC_EXPORT_PRIVATE ModelType ModelTypeFromValue(const base::Value& value); // Returns the ModelType corresponding to the name |model_type_string|. SYNC_EXPORT ModelType ModelTypeFromString( diff --git a/sync/internal_api/public/base/node_ordinal.h b/sync/internal_api/public/base/node_ordinal.h index e9a70c4..60c32d1 100644 --- a/sync/internal_api/public/base/node_ordinal.h +++ b/sync/internal_api/public/base/node_ordinal.h @@ -44,13 +44,13 @@ static_assert(NodeOrdinal::kRadix == 256, // 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). -SYNC_EXPORT NodeOrdinal Int64ToNodeOrdinal(int64_t x); +SYNC_EXPORT_PRIVATE NodeOrdinal Int64ToNodeOrdinal(int64_t x); // The inverse of Int64ToNodeOrdinal. This conversion is, in general, // 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_PRIVATE int64 NodeOrdinalToInt64(const NodeOrdinal& ordinal); } // namespace syncer diff --git a/sync/internal_api/public/base/progress_marker_map.h b/sync/internal_api/public/base/progress_marker_map.h index 29cc1de..cf022e2 100644 --- a/sync/internal_api/public/base/progress_marker_map.h +++ b/sync/internal_api/public/base/progress_marker_map.h @@ -4,8 +4,8 @@ // // Definition of ProgressMarkerMap and various utility functions. -#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_PROGRESS_MARKER_MAP_H_ -#define SYNC_INTERNAL_API_PUBLIC_BASE_PROGRESS_MARKER_MAP_H_ +#ifndef SYNC_INTERNAL_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ +#define SYNC_INTERNAL_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ #include <map> #include <string> @@ -27,9 +27,9 @@ namespace syncer { // DataTypeProgressMarkers. typedef std::map<ModelType, std::string> ProgressMarkerMap; -SYNC_EXPORT scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( +SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( const ProgressMarkerMap& marker_map); } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_BASE_PROGRESS_MARKER_MAP_H_ +#endif // SYNC_INTERNAL_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ diff --git a/sync/internal_api/public/base/unique_position.h b/sync/internal_api/public/base/unique_position.h index d425f9a..64dd905 100644 --- a/sync/internal_api/public/base/unique_position.h +++ b/sync/internal_api/public/base/unique_position.h @@ -39,7 +39,7 @@ namespace syncer { // // This class currently has several bookmarks-related assumptions built in, // though it could be adapted to be more generally useful. -class SYNC_EXPORT UniquePosition { +class SYNC_EXPORT_PRIVATE UniquePosition { public: static const size_t kSuffixLength; static const size_t kCompressBytesThreshold; @@ -141,6 +141,6 @@ class SYNC_EXPORT UniquePosition { bool is_valid_; }; -} // namespace syncer +} // namespace syncer; #endif // SYNC_INTERNAL_API_PUBLIC_BASE_UNIQUE_POSITION_H_ diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h index 34e1a7d..9f51737 100644 --- a/sync/internal_api/public/change_record.h +++ b/sync/internal_api/public/change_record.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_ -#define SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_ +#ifndef SYNC_INTERNAL_PUBLIC_API_CHANGE_RECORD_H_ +#define SYNC_INTERNAL_PUBLIC_API_CHANGE_RECORD_H_ #include <vector> @@ -41,7 +41,7 @@ class SYNC_EXPORT ExtraPasswordChangeRecordData { // operation. This gives the sync id of the node that changed, and the type // of change. To get the actual property values after an ADD or UPDATE, the // client should get the node with InitByIdLookup(), using the provided id. -struct SYNC_EXPORT ChangeRecord { +struct SYNC_EXPORT_PRIVATE ChangeRecord { enum Action { ACTION_ADD, ACTION_DELETE, diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h index bd78249..e2d04c2 100644 --- a/sync/internal_api/public/engine/model_safe_worker.h +++ b/sync/internal_api/public/engine/model_safe_worker.h @@ -21,7 +21,7 @@ namespace base { class DictionaryValue; -} // namespace base +} // namespace namespace syncer { @@ -149,8 +149,8 @@ class SYNC_EXPORT ModelSafeWorker typedef std::map<ModelType, ModelSafeGroup> ModelSafeRoutingInfo; // Caller takes ownership of return value. -SYNC_EXPORT scoped_ptr<base::DictionaryValue> ModelSafeRoutingInfoToValue( - const ModelSafeRoutingInfo& routing_info); +SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +ModelSafeRoutingInfoToValue(const ModelSafeRoutingInfo& routing_info); SYNC_EXPORT std::string ModelSafeRoutingInfoToString( const ModelSafeRoutingInfo& routing_info); diff --git a/sync/internal_api/public/engine/polling_constants.h b/sync/internal_api/public/engine/polling_constants.h index 4e93f17..8f4f100 100644 --- a/sync/internal_api/public/engine/polling_constants.h +++ b/sync/internal_api/public/engine/polling_constants.h @@ -11,13 +11,14 @@ namespace syncer { -SYNC_EXPORT extern const int64 kDefaultShortPollIntervalSeconds; -SYNC_EXPORT extern const int64 kDefaultLongPollIntervalSeconds; +SYNC_EXPORT_PRIVATE extern const int64 kDefaultShortPollIntervalSeconds; +SYNC_EXPORT_PRIVATE extern const int64 kDefaultLongPollIntervalSeconds; SYNC_EXPORT extern const int64 kMaxBackoffSeconds; SYNC_EXPORT extern const int kBackoffRandomizationFactor; -SYNC_EXPORT extern const int kInitialBackoffRetrySeconds; -SYNC_EXPORT extern const int kInitialBackoffShortRetrySeconds; -SYNC_EXPORT extern const int kInitialBackoffImmediateRetrySeconds; +SYNC_EXPORT_PRIVATE extern const int kInitialBackoffRetrySeconds; +SYNC_EXPORT_PRIVATE extern const int kInitialBackoffShortRetrySeconds; +SYNC_EXPORT_PRIVATE extern const int kInitialBackoffImmediateRetrySeconds; + } // namespace syncer 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..3478b4f 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 @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H +#define SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -17,7 +15,7 @@ namespace syncer { // An event representing a ClearServerData request message sent to the server. -class SYNC_EXPORT ClearServerDataRequestEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE ClearServerDataRequestEvent : public ProtocolEvent { public: ClearServerDataRequestEvent(base::Time timestamp, const sync_pb::ClientToServerMessage& request); @@ -40,4 +38,4 @@ class SYNC_EXPORT ClearServerDataRequestEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_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..db169ea 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 @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ +#define SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -18,7 +16,7 @@ namespace syncer { // An event representing a ClearServerData response event from the server. -class SYNC_EXPORT ClearServerDataResponseEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE ClearServerDataResponseEvent : public ProtocolEvent { public: ClearServerDataResponseEvent(base::Time timestamp, SyncerError result, @@ -43,4 +41,4 @@ class SYNC_EXPORT ClearServerDataResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_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..23f3cd8 100644 --- a/sync/internal_api/public/events/commit_request_event.h +++ b/sync/internal_api/public/events/commit_request_event.h @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_REQUEST_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_REQUEST_EVENT_H_ +#ifndef SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_H +#define SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_H #include <cstddef> -#include <string> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -19,7 +18,7 @@ namespace syncer { // An event representing a commit request message sent to the server. -class SYNC_EXPORT CommitRequestEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE CommitRequestEvent : public ProtocolEvent { public: CommitRequestEvent( base::Time timestamp, @@ -48,4 +47,4 @@ class SYNC_EXPORT CommitRequestEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_REQUEST_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_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..4de8283 100644 --- a/sync/internal_api/public/events/commit_response_event.h +++ b/sync/internal_api/public/events/commit_response_event.h @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_RESPONSE_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#ifndef SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#define SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_H_ #include <cstddef> -#include <string> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -19,7 +18,7 @@ namespace syncer { // An event representing a commit response event from the server. -class SYNC_EXPORT CommitResponseEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE CommitResponseEvent : public ProtocolEvent { public: CommitResponseEvent( base::Time timestamp, @@ -46,4 +45,4 @@ class SYNC_EXPORT CommitResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_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..984f3e8 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 @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_H +#define SYNC_INTERNAL_API_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_H #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -17,7 +15,8 @@ namespace syncer { // An event representing a configure GetUpdates request to the server. -class SYNC_EXPORT ConfigureGetUpdatesRequestEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesRequestEvent + : public ProtocolEvent { public: ConfigureGetUpdatesRequestEvent( base::Time timestamp, @@ -41,4 +40,4 @@ class SYNC_EXPORT ConfigureGetUpdatesRequestEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_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..3c76c9a 100644 --- a/sync/internal_api/public/events/get_updates_response_event.h +++ b/sync/internal_api/public/events/get_updates_response_event.h @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_GET_UPDATES_RESPONSE_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_GET_UPDATES_RESPONSE_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_GET_UPDATES_RESPONSE_EVENT_H +#define SYNC_INTERNAL_API_EVENTS_GET_UPDATES_RESPONSE_EVENT_H #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -21,7 +19,7 @@ namespace syncer { // // Unlike the events for the request message, the response events are generic // and do not vary for each type of GetUpdate cycle. -class SYNC_EXPORT GetUpdatesResponseEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE GetUpdatesResponseEvent : public ProtocolEvent { public: GetUpdatesResponseEvent( base::Time timestamp, @@ -46,4 +44,4 @@ class SYNC_EXPORT GetUpdatesResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_GET_UPDATES_RESPONSE_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_GET_UPDATES_RESPONSE_EVENT_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..5765dec 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 @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_NORMAL_GET_UPDATES_REQUEST_H +#define SYNC_INTERNAL_API_EVENTS_NORMAL_GET_UPDATES_REQUEST_H #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -22,7 +20,7 @@ class NudgeTracker; } // namespace sessions // An event representing a 'normal mode' GetUpdate request to the server. -class SYNC_EXPORT NormalGetUpdatesRequestEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE NormalGetUpdatesRequestEvent : public ProtocolEvent { public: NormalGetUpdatesRequestEvent( base::Time timestamp, @@ -58,6 +56,6 @@ class SYNC_EXPORT NormalGetUpdatesRequestEvent : public ProtocolEvent { DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesRequestEvent); }; -} // namespace syncer +} -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_NORMAL_GET_UPDATES_REQUEST_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..3db5247 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 @@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ -#define SYNC_INTERNAL_API_PUBLIC_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ - -#include <string> +#ifndef SYNC_INTERNAL_API_EVENTS_POLL_GET_UPDATES_REQUEST_H +#define SYNC_INTERNAL_API_EVENTS_POLL_GET_UPDATES_REQUEST_H #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -22,7 +20,7 @@ class NudgeTracker; } // namespace sessions // An event representing a poll request sent to the server. -class SYNC_EXPORT PollGetUpdatesRequestEvent : public ProtocolEvent { +class SYNC_EXPORT_PRIVATE PollGetUpdatesRequestEvent : public ProtocolEvent { public: PollGetUpdatesRequestEvent( base::Time timestamp, @@ -42,6 +40,6 @@ class SYNC_EXPORT PollGetUpdatesRequestEvent : public ProtocolEvent { DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesRequestEvent); }; -} // namespace syncer +} -#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ +#endif // SYNC_INTERNAL_API_EVENTS_POLL_GET_UPDATES_REQUEST_H diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h index 2c25b5b..bf6ab11 100644 --- a/sync/internal_api/public/http_bridge.h +++ b/sync/internal_api/public/http_bridge.h @@ -46,9 +46,10 @@ class CancelationSignal; // This is a one-time use bridge. Create one for each request you want to make. // It is RefCountedThreadSafe because it can PostTask to the io loop, and thus // needs to stick around across context switches, etc. -class SYNC_EXPORT HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, - public HttpPostProviderInterface, - public net::URLFetcherDelegate { +class SYNC_EXPORT_PRIVATE HttpBridge + : public base::RefCountedThreadSafe<HttpBridge>, + public HttpPostProviderInterface, + public net::URLFetcherDelegate { public: HttpBridge(const std::string& user_agent, const scoped_refptr<net::URLRequestContextGetter>& context, diff --git a/sync/internal_api/public/http_post_provider_interface.h b/sync/internal_api/public/http_post_provider_interface.h index f3aefd7..7e7ba3c 100644 --- a/sync/internal_api/public/http_post_provider_interface.h +++ b/sync/internal_api/public/http_post_provider_interface.h @@ -15,7 +15,7 @@ namespace syncer { // required HTTP POST functionality to the syncer backend. This interface is // designed for one-time use. You create one, use it, and create another if you // want to make a subsequent POST. -class SYNC_EXPORT HttpPostProviderInterface { +class SYNC_EXPORT_PRIVATE HttpPostProviderInterface { public: // Add additional headers to the request. virtual void SetExtraRequestHeaders(const char* headers) = 0; diff --git a/sync/internal_api/public/model_type_entity.h b/sync/internal_api/public/model_type_entity.h index 3d0a074..42401da 100644 --- a/sync/internal_api/public/model_type_entity.h +++ b/sync/internal_api/public/model_type_entity.h @@ -24,7 +24,7 @@ struct UpdateResponseData; // present. The data part of ModelTypeEntity is cached temporarily, only for // in-flight entities that are being committed to the server. // -class SYNC_EXPORT ModelTypeEntity { +class SYNC_EXPORT_PRIVATE ModelTypeEntity { public: // Construct an instance representing a new locally-created item. static scoped_ptr<ModelTypeEntity> CreateNew( diff --git a/sync/internal_api/public/model_type_processor.h b/sync/internal_api/public/model_type_processor.h index 121055f..c4ac343 100644 --- a/sync/internal_api/public/model_type_processor.h +++ b/sync/internal_api/public/model_type_processor.h @@ -13,7 +13,7 @@ namespace syncer_v2 { class CommitQueue; // Interface used by sync backend to issue requests to a synced data type. -class SYNC_EXPORT ModelTypeProcessor { +class SYNC_EXPORT_PRIVATE ModelTypeProcessor { public: ModelTypeProcessor(); virtual ~ModelTypeProcessor(); diff --git a/sync/internal_api/public/model_type_store_backend.h b/sync/internal_api/public/model_type_store_backend.h index 6e72839..47ff50d 100644 --- a/sync/internal_api/public/model_type_store_backend.h +++ b/sync/internal_api/public/model_type_store_backend.h @@ -24,7 +24,7 @@ namespace syncer_v2 { // ModelTypeStoreBackend handles operations with leveldb. It is oblivious of the // fact that it is called from separate thread (with the exception of ctor), // meaning it shouldn't deal with callbacks and task_runners. -class SYNC_EXPORT ModelTypeStoreBackend : public base::NonThreadSafe { +class SYNC_EXPORT_PRIVATE ModelTypeStoreBackend : public base::NonThreadSafe { public: ModelTypeStoreBackend(); ~ModelTypeStoreBackend(); diff --git a/sync/internal_api/public/non_blocking_sync_common.h b/sync/internal_api/public/non_blocking_sync_common.h index 5fdcac3..894e6f8 100644 --- a/sync/internal_api/public/non_blocking_sync_common.h +++ b/sync/internal_api/public/non_blocking_sync_common.h @@ -19,7 +19,7 @@ static const int64 kUncommittedVersion = -1; // Data-type global state that must be accessed and updated on the sync thread, // but persisted on or through the model thread. -struct SYNC_EXPORT DataTypeState { +struct SYNC_EXPORT_PRIVATE DataTypeState { DataTypeState(); ~DataTypeState(); @@ -43,7 +43,7 @@ struct SYNC_EXPORT DataTypeState { bool initial_sync_done = false; }; -struct SYNC_EXPORT CommitRequestData { +struct SYNC_EXPORT_PRIVATE CommitRequestData { CommitRequestData(); ~CommitRequestData(); @@ -56,7 +56,7 @@ struct SYNC_EXPORT CommitRequestData { int64 base_version = 0; }; -struct SYNC_EXPORT CommitResponseData { +struct SYNC_EXPORT_PRIVATE CommitResponseData { CommitResponseData(); ~CommitResponseData(); @@ -66,7 +66,7 @@ struct SYNC_EXPORT CommitResponseData { int64 response_version = 0; }; -struct SYNC_EXPORT UpdateResponseData { +struct SYNC_EXPORT_PRIVATE UpdateResponseData { UpdateResponseData(); ~UpdateResponseData(); diff --git a/sync/internal_api/public/sessions/commit_counters.h b/sync/internal_api/public/sessions/commit_counters.h index b8375c2..a069eb1 100644 --- a/sync/internal_api/public/sessions/commit_counters.h +++ b/sync/internal_api/public/sessions/commit_counters.h @@ -5,8 +5,6 @@ #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_COMMIT_COUNTERS_H_ #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_COMMIT_COUNTERS_H_ -#include <string> - #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "sync/base/sync_export.h" @@ -14,7 +12,7 @@ namespace syncer { // A class to maintain counts related to sync commit requests and responses. -struct SYNC_EXPORT CommitCounters { +struct SYNC_EXPORT_PRIVATE CommitCounters { CommitCounters(); ~CommitCounters(); diff --git a/sync/internal_api/public/sessions/status_counters.h b/sync/internal_api/public/sessions/status_counters.h index 7c12133..c74f9a9 100644 --- a/sync/internal_api/public/sessions/status_counters.h +++ b/sync/internal_api/public/sessions/status_counters.h @@ -5,8 +5,6 @@ #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_ #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_ -#include <string> - #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "sync/base/sync_export.h" @@ -14,7 +12,7 @@ namespace syncer { // A class to maintain counts related to the current status of a sync type. -struct SYNC_EXPORT StatusCounters { +struct SYNC_EXPORT_PRIVATE StatusCounters { StatusCounters(); ~StatusCounters(); diff --git a/sync/internal_api/public/sessions/update_counters.h b/sync/internal_api/public/sessions/update_counters.h index 7ce8b5e..506d341 100644 --- a/sync/internal_api/public/sessions/update_counters.h +++ b/sync/internal_api/public/sessions/update_counters.h @@ -5,8 +5,6 @@ #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_UPDATE_COUNTERS_H_ #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_UPDATE_COUNTERS_H_ -#include <string> - #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "sync/base/sync_export.h" @@ -15,7 +13,7 @@ namespace syncer { // A class to maintain counts related to the update requests and responses for // a particular sync type. -struct SYNC_EXPORT UpdateCounters { +struct SYNC_EXPORT_PRIVATE UpdateCounters { UpdateCounters(); ~UpdateCounters(); diff --git a/sync/internal_api/public/shared_model_type_processor.h b/sync/internal_api/public/shared_model_type_processor.h index 88adbcc..00e914a 100644 --- a/sync/internal_api/public/shared_model_type_processor.h +++ b/sync/internal_api/public/shared_model_type_processor.h @@ -27,9 +27,10 @@ class ModelTypeEntity; // A sync component embedded on the synced type's thread that helps to handle // communication between sync and model type threads. -class SYNC_EXPORT SharedModelTypeProcessor : public ModelTypeProcessor, - public ModelTypeChangeProcessor, - base::NonThreadSafe { +class SYNC_EXPORT_PRIVATE SharedModelTypeProcessor + : public ModelTypeProcessor, + public ModelTypeChangeProcessor, + base::NonThreadSafe { public: SharedModelTypeProcessor(syncer::ModelType type, ModelTypeService* service); ~SharedModelTypeProcessor() override; diff --git a/sync/internal_api/public/sync_context.h b/sync/internal_api/public/sync_context.h index 0d522f9..5481460 100644 --- a/sync/internal_api/public/sync_context.h +++ b/sync/internal_api/public/sync_context.h @@ -19,7 +19,7 @@ struct ActivationContext; // functionality to other classes, and most of the interface is exposed not // directly here but instead through a per-ModelType class that this class helps // instantiate. -class SYNC_EXPORT SyncContext { +class SYNC_EXPORT_PRIVATE SyncContext { public: SyncContext(); virtual ~SyncContext(); diff --git a/sync/internal_api/public/sync_context_proxy.h b/sync/internal_api/public/sync_context_proxy.h index f2eff7e..de6de25 100644 --- a/sync/internal_api/public/sync_context_proxy.h +++ b/sync/internal_api/public/sync_context_proxy.h @@ -14,7 +14,7 @@ struct ActivationContext; // Interface for the datatype integration logic from non-sync threads. // // See SyncContextProxyImpl for an actual implementation. -class SYNC_EXPORT SyncContextProxy { +class SYNC_EXPORT_PRIVATE SyncContextProxy { public: SyncContextProxy(); virtual ~SyncContextProxy(); @@ -35,6 +35,6 @@ class SYNC_EXPORT SyncContextProxy { virtual scoped_ptr<SyncContextProxy> Clone() const = 0; }; -} // namespace syncer_v2 +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_CONTEXT_PROXY_H_ diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index 1ae8ba4..fc057b8 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -143,7 +143,7 @@ class SYNC_EXPORT SyncManager { // Like ChangeDelegate, except called only on the sync thread and // not while a transaction is held. For objects that want to know // when changes happen, but don't need to process them. - class SYNC_EXPORT ChangeObserver { + class SYNC_EXPORT_PRIVATE ChangeObserver { public: // Ids referred to in |changes| may or may not be in the write // transaction specified by |write_transaction_id|. If they're diff --git a/sync/internal_api/public/user_share.h b/sync/internal_api/public/user_share.h index eee6182..d5dad53 100644 --- a/sync/internal_api/public/user_share.h +++ b/sync/internal_api/public/user_share.h @@ -21,7 +21,7 @@ class Directory; // user and their data (share). // This encompasses all pieces required to build transaction objects on the // syncable share. -struct SYNC_EXPORT UserShare { +struct SYNC_EXPORT_PRIVATE UserShare { UserShare(); ~UserShare(); diff --git a/sync/internal_api/sync_backup_manager.h b/sync/internal_api/sync_backup_manager.h index 0e0227e..a8f5b8a 100644 --- a/sync/internal_api/sync_backup_manager.h +++ b/sync/internal_api/sync_backup_manager.h @@ -15,7 +15,7 @@ namespace syncer { // SyncBackupManager runs before user signs in to sync to back up user's data // before sync starts. The data that's backed up can be used to restore user's // settings to pre-sync state. -class SYNC_EXPORT SyncBackupManager : public SyncRollbackManagerBase { +class SYNC_EXPORT_PRIVATE SyncBackupManager : public SyncRollbackManagerBase { public: SyncBackupManager(); ~SyncBackupManager() override; diff --git a/sync/internal_api/sync_context_proxy_impl.h b/sync/internal_api/sync_context_proxy_impl.h index bde38e4..2dc9923 100644 --- a/sync/internal_api/sync_context_proxy_impl.h +++ b/sync/internal_api/sync_context_proxy_impl.h @@ -20,7 +20,7 @@ class SyncContext; // // It is expected that this object will be copied to and used on many different // threads. It is small and safe to pass by value. -class SYNC_EXPORT SyncContextProxyImpl : public SyncContextProxy { +class SYNC_EXPORT_PRIVATE SyncContextProxyImpl : public SyncContextProxy { public: SyncContextProxyImpl( const scoped_refptr<base::SequencedTaskRunner>& sync_task_runner, @@ -49,6 +49,6 @@ class SYNC_EXPORT SyncContextProxyImpl : public SyncContextProxy { base::WeakPtr<SyncContext> sync_context_; }; -} // namespace syncer_v2 +} // namespace syncer #endif // SYNC_INTERNAL_API_SYNC_CONTEXT_PROXY_IMPL_H_ diff --git a/sync/internal_api/sync_encryption_handler_impl.h b/sync/internal_api/sync_encryption_handler_impl.h index babc942..1335ed6 100644 --- a/sync/internal_api/sync_encryption_handler_impl.h +++ b/sync/internal_api/sync_encryption_handler_impl.h @@ -6,7 +6,6 @@ #define SYNC_INTERNAL_API_SYNC_ENCRYPTION_HANDLER_IMPL_H_ #include <string> -#include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" @@ -43,8 +42,9 @@ class WriteTransaction; // sync methods. // All methods are non-thread-safe and should only be called from the sync // thread unless explicitly noted otherwise. -class SYNC_EXPORT SyncEncryptionHandlerImpl : public SyncEncryptionHandler, - public syncable::NigoriHandler { +class SYNC_EXPORT_PRIVATE SyncEncryptionHandlerImpl + : public SyncEncryptionHandler, + public syncable::NigoriHandler { public: // |clear_data_option| controls whether this object should update the Nigori // node to indiciate that we are to clear server data as part of the @@ -327,4 +327,4 @@ class SYNC_EXPORT SyncEncryptionHandlerImpl : public SyncEncryptionHandler, } // namespace syncer -#endif // SYNC_INTERNAL_API_SYNC_ENCRYPTION_HANDLER_IMPL_H_ +#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_ENCRYPTION_HANDLER_IMPL_H_ diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index 18c66df..b3da76f 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -5,7 +5,6 @@ #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_ #define SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_ -#include <map> #include <string> #include <vector> @@ -57,7 +56,7 @@ class SyncSessionContext; // // Unless stated otherwise, all methods of SyncManager should be called on the // same thread. -class SYNC_EXPORT SyncManagerImpl +class SYNC_EXPORT_PRIVATE SyncManagerImpl : public SyncManager, public net::NetworkChangeNotifier::IPAddressObserver, public net::NetworkChangeNotifier::ConnectionTypeObserver, diff --git a/sync/internal_api/sync_rollback_manager.h b/sync/internal_api/sync_rollback_manager.h index 86c5085..70580e5 100644 --- a/sync/internal_api/sync_rollback_manager.h +++ b/sync/internal_api/sync_rollback_manager.h @@ -5,7 +5,6 @@ #ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ -#include <map> #include <string> #include <vector> @@ -17,7 +16,7 @@ namespace syncer { // SyncRollbackManager restores user's data to pre-sync state using backup // DB created by SyncBackupManager. -class SYNC_EXPORT SyncRollbackManager : public SyncRollbackManagerBase { +class SYNC_EXPORT_PRIVATE SyncRollbackManager : public SyncRollbackManagerBase { public: SyncRollbackManager(); ~SyncRollbackManager() override; diff --git a/sync/internal_api/sync_rollback_manager_base.h b/sync/internal_api/sync_rollback_manager_base.h index 8518ea5..638b2f0 100644 --- a/sync/internal_api/sync_rollback_manager_base.h +++ b/sync/internal_api/sync_rollback_manager_base.h @@ -27,10 +27,10 @@ class WriteTransaction; // permanent folders) for configured type as needed. // // Most of other functions are no ops. -class SYNC_EXPORT SyncRollbackManagerBase - : public SyncManager, - public syncable::DirectoryChangeDelegate, - public syncable::TransactionObserver { +class SYNC_EXPORT_PRIVATE SyncRollbackManagerBase : + public SyncManager, + public syncable::DirectoryChangeDelegate, + public syncable::TransactionObserver { public: SyncRollbackManagerBase(); ~SyncRollbackManagerBase() override; diff --git a/sync/internal_api/syncapi_server_connection_manager.h b/sync/internal_api/syncapi_server_connection_manager.h index 103fac0..d016aa9 100644 --- a/sync/internal_api/syncapi_server_connection_manager.h +++ b/sync/internal_api/syncapi_server_connection_manager.h @@ -47,7 +47,7 @@ class SyncAPIBridgedConnection : public ServerConnectionManager::Connection { // A ServerConnectionManager subclass used by the syncapi layer. We use a // subclass so that we can override MakePost() to generate a POST object using // an instance of the HttpPostProviderFactory class. -class SYNC_EXPORT SyncAPIServerConnectionManager +class SYNC_EXPORT_PRIVATE SyncAPIServerConnectionManager : public ServerConnectionManager { public: // Takes ownership of factory. |