summaryrefslogtreecommitdiffstats
path: root/sync
diff options
context:
space:
mode:
authorcaitkp <caitkp@chromium.org>2015-12-07 14:47:01 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-07 22:48:06 +0000
commit2d705603b7e3dca07371844ffa233a55d9c6b631 (patch)
treefca2e736aa5bb021dbc195120e89082bf1c96a59 /sync
parent9a22c2242c67455492506df3c4191093f2065c82 (diff)
downloadchromium_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')
-rw-r--r--sync/api/attachments/attachment_store.h2
-rw-r--r--sync/base/sync_export.h26
-rw-r--r--sync/engine/apply_control_data_updates.h2
-rw-r--r--sync/engine/backoff_delay_provider.h2
-rw-r--r--sync/engine/clear_server_data.h4
-rw-r--r--sync/engine/commit.h3
-rw-r--r--sync/engine/commit_contribution.h2
-rw-r--r--sync/engine/commit_contributor.h4
-rw-r--r--sync/engine/commit_processor.h2
-rw-r--r--sync/engine/commit_queue.h4
-rw-r--r--sync/engine/commit_util.h19
-rw-r--r--sync/engine/directory_commit_contribution.h3
-rw-r--r--sync/engine/directory_update_handler.h2
-rw-r--r--sync/engine/get_commit_ids.h9
-rw-r--r--sync/engine/get_updates_delegate.h21
-rw-r--r--sync/engine/get_updates_processor.h6
-rw-r--r--sync/engine/net/server_connection_manager.h9
-rw-r--r--sync/engine/nudge_handler.h2
-rw-r--r--sync/engine/sync_cycle_event.h2
-rw-r--r--sync/engine/sync_engine_event_listener.h2
-rw-r--r--sync/engine/sync_scheduler.h9
-rw-r--r--sync/engine/sync_scheduler_impl.h7
-rw-r--r--sync/engine/syncer.h4
-rw-r--r--sync/engine/syncer_proto_util.h8
-rw-r--r--sync/engine/syncer_util.h9
-rw-r--r--sync/engine/update_handler.h2
-rw-r--r--sync/internal_api/attachments/proto/BUILD.gn2
-rw-r--r--sync/internal_api/debug_info_event_listener.h3
-rw-r--r--sync/internal_api/js_mutation_event_observer.h2
-rw-r--r--sync/internal_api/js_sync_encryption_handler_observer.h2
-rw-r--r--sync/internal_api/js_sync_manager_observer.h2
-rw-r--r--sync/internal_api/protocol_event_buffer.h2
-rw-r--r--sync/internal_api/public/activation_context.h2
-rw-r--r--sync/internal_api/public/attachments/attachment_downloader_impl.h8
-rw-r--r--sync/internal_api/public/attachments/attachment_util.h2
-rw-r--r--sync/internal_api/public/base/attachment_id_proto.h7
-rw-r--r--sync/internal_api/public/base/cancelation_signal.h2
-rw-r--r--sync/internal_api/public/base/model_type.h12
-rw-r--r--sync/internal_api/public/base/node_ordinal.h4
-rw-r--r--sync/internal_api/public/base/progress_marker_map.h8
-rw-r--r--sync/internal_api/public/base/unique_position.h4
-rw-r--r--sync/internal_api/public/change_record.h6
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.h6
-rw-r--r--sync/internal_api/public/engine/polling_constants.h11
-rw-r--r--sync/internal_api/public/events/clear_server_data_request_event.h10
-rw-r--r--sync/internal_api/public/events/clear_server_data_response_event.h10
-rw-r--r--sync/internal_api/public/events/commit_request_event.h9
-rw-r--r--sync/internal_api/public/events/commit_response_event.h9
-rw-r--r--sync/internal_api/public/events/configure_get_updates_request_event.h11
-rw-r--r--sync/internal_api/public/events/get_updates_response_event.h10
-rw-r--r--sync/internal_api/public/events/normal_get_updates_request_event.h12
-rw-r--r--sync/internal_api/public/events/poll_get_updates_request_event.h12
-rw-r--r--sync/internal_api/public/http_bridge.h7
-rw-r--r--sync/internal_api/public/http_post_provider_interface.h2
-rw-r--r--sync/internal_api/public/model_type_entity.h2
-rw-r--r--sync/internal_api/public/model_type_processor.h2
-rw-r--r--sync/internal_api/public/model_type_store_backend.h2
-rw-r--r--sync/internal_api/public/non_blocking_sync_common.h8
-rw-r--r--sync/internal_api/public/sessions/commit_counters.h4
-rw-r--r--sync/internal_api/public/sessions/status_counters.h4
-rw-r--r--sync/internal_api/public/sessions/update_counters.h4
-rw-r--r--sync/internal_api/public/shared_model_type_processor.h7
-rw-r--r--sync/internal_api/public/sync_context.h2
-rw-r--r--sync/internal_api/public/sync_context_proxy.h4
-rw-r--r--sync/internal_api/public/sync_manager.h2
-rw-r--r--sync/internal_api/public/user_share.h2
-rw-r--r--sync/internal_api/sync_backup_manager.h2
-rw-r--r--sync/internal_api/sync_context_proxy_impl.h4
-rw-r--r--sync/internal_api/sync_encryption_handler_impl.h8
-rw-r--r--sync/internal_api/sync_manager_impl.h3
-rw-r--r--sync/internal_api/sync_rollback_manager.h3
-rw-r--r--sync/internal_api/sync_rollback_manager_base.h8
-rw-r--r--sync/internal_api/syncapi_server_connection_manager.h2
-rw-r--r--sync/js/js_backend.h2
-rw-r--r--sync/protocol/proto_enum_conversions.h30
-rw-r--r--sync/protocol/proto_value_conversions.h121
-rw-r--r--sync/sessions/debug_info_getter.h2
-rw-r--r--sync/sessions/directory_type_debug_info_emitter.h2
-rw-r--r--sync/sessions/model_type_registry.h13
-rw-r--r--sync/sessions/nudge_tracker.h2
-rw-r--r--sync/sessions/status_controller.h4
-rw-r--r--sync/sessions/sync_session.h4
-rw-r--r--sync/sessions/sync_session_context.h3
-rw-r--r--sync/sync.gyp2
-rw-r--r--sync/syncable/deferred_on_disk_directory_backing_store.h4
-rw-r--r--sync/syncable/directory.h18
-rw-r--r--sync/syncable/directory_backing_store.h4
-rw-r--r--sync/syncable/directory_backing_store_unittest.cc38
-rw-r--r--sync/syncable/directory_change_delegate.h4
-rw-r--r--sync/syncable/entry_kernel.h7
-rw-r--r--sync/syncable/in_memory_directory_backing_store.h5
-rw-r--r--sync/syncable/invalid_directory_backing_store.h3
-rw-r--r--sync/syncable/model_neutral_mutable_entry.h4
-rw-r--r--sync/syncable/mutable_entry.h4
-rw-r--r--sync/syncable/nigori_handler.h8
-rw-r--r--sync/syncable/nigori_util.h14
-rw-r--r--sync/syncable/on_disk_directory_backing_store.h5
-rw-r--r--sync/syncable/parent_child_index.h11
-rw-r--r--sync/syncable/syncable_delete_journal.h2
-rw-r--r--sync/syncable/syncable_enum_conversions.h26
-rw-r--r--sync/syncable/syncable_id.h5
-rw-r--r--sync/syncable/syncable_model_neutral_write_transaction.h3
-rw-r--r--sync/syncable/syncable_proto_util.h9
-rw-r--r--sync/syncable/syncable_util.h23
-rw-r--r--sync/syncable/transaction_observer.h2
-rw-r--r--sync/util/cryptographer.h2
-rw-r--r--sync/util/get_session_name.h2
-rw-r--r--sync/util/time.h2
108 files changed, 404 insertions, 401 deletions
diff --git a/sync/api/attachments/attachment_store.h b/sync/api/attachments/attachment_store.h
index 5ddac1e..14fd0fc 100644
--- a/sync/api/attachments/attachment_store.h
+++ b/sync/api/attachments/attachment_store.h
@@ -168,7 +168,7 @@ class SYNC_EXPORT AttachmentStore {
// AttachmentService writes attachment on behalf of model type after download
// and takes reference on attachment for the duration of upload.
// Model type implementation shouldn't use this interface.
-class SYNC_EXPORT AttachmentStoreForSync : public AttachmentStore {
+class SYNC_EXPORT_PRIVATE AttachmentStoreForSync : public AttachmentStore {
public:
~AttachmentStoreForSync();
diff --git a/sync/base/sync_export.h b/sync/base/sync_export.h
index 6d86b54..83c65a6 100644
--- a/sync/base/sync_export.h
+++ b/sync/base/sync_export.h
@@ -2,29 +2,39 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_BASE_SYNC_EXPORT_H_
-#define SYNC_BASE_SYNC_EXPORT_H_
+#ifndef SYNC_SYNC_EXPORT_H_
+#define SYNC_SYNC_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(SYNC_IMPLEMENTATION)
#define SYNC_EXPORT __declspec(dllexport)
-#else // defined(SYNC_IMPLEMENTATION)
+#define SYNC_EXPORT_PRIVATE __declspec(dllexport)
+#elif defined(SYNC_TEST)
#define SYNC_EXPORT __declspec(dllimport)
+#define SYNC_EXPORT_PRIVATE __declspec(dllimport)
+#else
+#define SYNC_EXPORT __declspec(dllimport)
+#define SYNC_EXPORT_PRIVATE
#endif // defined(SYNC_IMPLEMENTATION)
#else // defined(WIN32)
-
#if defined(SYNC_IMPLEMENTATION)
#define SYNC_EXPORT __attribute__((visibility("default")))
-#else // defined(SYNC_IMPLEMENTATION)
+#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default")))
+#elif defined(SYNC_TEST)
+#define SYNC_EXPORT
+#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default")))
+#else
#define SYNC_EXPORT
+#define SYNC_EXPORT_PRIVATE
#endif // defined(SYNC_IMPLEMENTATION)
+#endif
-#endif // defined(WIN32)
#else // defined(COMPONENT_BUILD)
#define SYNC_EXPORT
-#endif // defined(COMPONENT_BUILD)
+#define SYNC_EXPORT_PRIVATE
+#endif
-#endif // SYNC_BASE_SYNC_EXPORT_H_
+#endif // SYNC_SYNC_EXPORT_H_
diff --git a/sync/engine/apply_control_data_updates.h b/sync/engine/apply_control_data_updates.h
index a6b589d5..b825665e 100644
--- a/sync/engine/apply_control_data_updates.h
+++ b/sync/engine/apply_control_data_updates.h
@@ -17,7 +17,7 @@ class MutableEntry;
class WriteTransaction;
}
-SYNC_EXPORT void ApplyControlDataUpdates(syncable::Directory* dir);
+SYNC_EXPORT_PRIVATE void ApplyControlDataUpdates(syncable::Directory* dir);
void ApplyNigoriUpdate(syncable::WriteTransaction* trans,
syncable::MutableEntry* const entry,
Cryptographer* cryptographer);
diff --git a/sync/engine/backoff_delay_provider.h b/sync/engine/backoff_delay_provider.h
index 7863e2b..892e6e8 100644
--- a/sync/engine/backoff_delay_provider.h
+++ b/sync/engine/backoff_delay_provider.h
@@ -15,7 +15,7 @@ struct ModelNeutralState;
}
// A component used to get time delays associated with exponential backoff.
-class SYNC_EXPORT BackoffDelayProvider {
+class SYNC_EXPORT_PRIVATE BackoffDelayProvider {
public:
// Factory function to create a standard BackoffDelayProvider.
static BackoffDelayProvider* FromDefaults();
diff --git a/sync/engine/clear_server_data.h b/sync/engine/clear_server_data.h
index 0ac1fa8..20b6784 100644
--- a/sync/engine/clear_server_data.h
+++ b/sync/engine/clear_server_data.h
@@ -5,8 +5,6 @@
#ifndef SYNC_ENGINE_CLEAR_SERVER_DATA_H_
#define SYNC_ENGINE_CLEAR_SERVER_DATA_H_
-#include <string>
-
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/util/syncer_error.h"
#include "sync/protocol/sync.pb.h"
@@ -22,7 +20,7 @@ class SyncSession;
// An instance of this class corresponds to a single operation and is
// responsible for building a request, sending it, and interpreting the
// response.
-class SYNC_EXPORT ClearServerData {
+class SYNC_EXPORT_PRIVATE ClearServerData {
public:
explicit ClearServerData(const std::string& account_name);
~ClearServerData();
diff --git a/sync/engine/commit.h b/sync/engine/commit.h
index 3baee67..871229f6 100644
--- a/sync/engine/commit.h
+++ b/sync/engine/commit.h
@@ -6,7 +6,6 @@
#define SYNC_ENGINE_COMMIT_H_
#include <map>
-#include <string>
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
@@ -37,7 +36,7 @@ class Syncer;
// been acceptable to let this class be a dumb container object, it turns out
// that there was no other convenient place to put the Init() and
// PostAndProcessCommitResponse() functions. So they ended up here.
-class SYNC_EXPORT Commit {
+class SYNC_EXPORT_PRIVATE Commit {
public:
typedef std::map<ModelType, scoped_ptr<CommitContribution>> ContributionMap;
diff --git a/sync/engine/commit_contribution.h b/sync/engine/commit_contribution.h
index fa440f8..e2e9108 100644
--- a/sync/engine/commit_contribution.h
+++ b/sync/engine/commit_contribution.h
@@ -20,7 +20,7 @@ class StatusController;
// have been selected from a CommitContributor and prepared for commit.
//
// This class handles the bookkeeping related to the commit of these items.
-class SYNC_EXPORT CommitContribution {
+class SYNC_EXPORT_PRIVATE CommitContribution {
public:
CommitContribution();
virtual ~CommitContribution() = 0;
diff --git a/sync/engine/commit_contributor.h b/sync/engine/commit_contributor.h
index 8b89a12..5e9d156 100644
--- a/sync/engine/commit_contributor.h
+++ b/sync/engine/commit_contributor.h
@@ -22,7 +22,7 @@ class Directory;
//
// When asked, it can return CommitContribution objects that contain a set of
// items to be committed from this source.
-class SYNC_EXPORT CommitContributor {
+class SYNC_EXPORT_PRIVATE CommitContributor {
public:
CommitContributor();
virtual ~CommitContributor() = 0;
@@ -34,6 +34,6 @@ class SYNC_EXPORT CommitContributor {
size_t max_entries) = 0;
};
-} // namespace syncer
+} // namespace
#endif // SYNC_ENGINE_COMMIT_CONTRIBUTOR_H_
diff --git a/sync/engine/commit_processor.h b/sync/engine/commit_processor.h
index 67ebe56..70e0e99 100644
--- a/sync/engine/commit_processor.h
+++ b/sync/engine/commit_processor.h
@@ -30,7 +30,7 @@ class CommitContribution;
// Many methods allow the caller to specify a subset of types on which the
// operation is to be applied. It is a logic error if the supplied set of types
// contains a type which was not previously registered.
-class SYNC_EXPORT CommitProcessor {
+class SYNC_EXPORT_PRIVATE CommitProcessor {
public:
// Contructs a CommitProcessor from a map of CommitContributors.
// The CommitProcessor does not own this map.
diff --git a/sync/engine/commit_queue.h b/sync/engine/commit_queue.h
index a535506..59219d4 100644
--- a/sync/engine/commit_queue.h
+++ b/sync/engine/commit_queue.h
@@ -10,7 +10,7 @@
namespace syncer_v2 {
// Interface used by a synced data type to issue requests to the sync backend.
-class SYNC_EXPORT CommitQueue {
+class SYNC_EXPORT_PRIVATE CommitQueue {
public:
CommitQueue();
virtual ~CommitQueue();
@@ -19,6 +19,6 @@ class SYNC_EXPORT CommitQueue {
virtual void EnqueueForCommit(const CommitRequestDataList& list) = 0;
};
-} // namespace syncer_v2
+} // namespace syncer
#endif // SYNC_ENGINE_COMMIT_QUEUE_H_
diff --git a/sync/engine/commit_util.h b/sync/engine/commit_util.h
index d6a1b49..387bdcf 100644
--- a/sync/engine/commit_util.h
+++ b/sync/engine/commit_util.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_ENGINE_COMMIT_UTIL_H_
-#define SYNC_ENGINE_COMMIT_UTIL_H_
-
-#include <set>
+#ifndef SYNC_ENGINE_BUILD_COMMIT_UTIL_H_
+#define SYNC_ENGINE_BUILD_COMMIT_UTIL_H_
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
@@ -29,20 +27,21 @@ class BaseWriteTransaction;
namespace commit_util {
// Adds bookmark extensions activity report to |message|.
-SYNC_EXPORT void AddExtensionsActivityToMessage(
+SYNC_EXPORT_PRIVATE void AddExtensionsActivityToMessage(
ExtensionsActivity* activity,
ExtensionsActivity::Records* extensions_activity_buffer,
sync_pb::CommitMessage* message);
// Fills the config_params field of |message|.
-SYNC_EXPORT void AddClientConfigParamsToMessage(
+SYNC_EXPORT_PRIVATE void AddClientConfigParamsToMessage(
ModelTypeSet enabled_types,
sync_pb::CommitMessage* message);
// Takes a snapshot of |meta_entry| and puts it into a protobuf suitable for use
// in a commit request message.
-SYNC_EXPORT void BuildCommitItem(const syncable::Entry& meta_entry,
- sync_pb::SyncEntity* sync_entry);
+SYNC_EXPORT_PRIVATE void BuildCommitItem(
+ const syncable::Entry& meta_entry,
+ sync_pb::SyncEntity* sync_entry);
// Process a single commit response. Updates the entry's SERVER fields using
// |pb_commit_response| and |pb_committed_entry|.
@@ -50,7 +49,7 @@ SYNC_EXPORT void BuildCommitItem(const syncable::Entry& meta_entry,
// The |deleted_folders| parameter is a set of IDs that represent deleted
// folders. This function will add its entry's ID to this set if it finds
// itself processing a folder deletion.
-SYNC_EXPORT
+SYNC_EXPORT_PRIVATE
sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse(
syncable::BaseWriteTransaction* trans,
const sync_pb::CommitResponse_EntryResponse& server_entry,
@@ -62,4 +61,4 @@ sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse(
} // namespace syncer
-#endif // SYNC_ENGINE_COMMIT_UTIL_H_
+#endif // SYNC_ENGINE_BUILD_COMMIT_UTIL_H_
diff --git a/sync/engine/directory_commit_contribution.h b/sync/engine/directory_commit_contribution.h
index dabb7d9..d8d6aa9 100644
--- a/sync/engine/directory_commit_contribution.h
+++ b/sync/engine/directory_commit_contribution.h
@@ -33,7 +33,8 @@ class Directory;
// This class handles the bookkeeping related to the commit of these items,
// including processing the commit response message and setting and unsetting
// the SYNCING bits.
-class SYNC_EXPORT DirectoryCommitContribution : public CommitContribution {
+class SYNC_EXPORT_PRIVATE DirectoryCommitContribution
+ : public CommitContribution {
public:
// This destructor will DCHECK if UnsetSyncingBits() has not been called yet.
~DirectoryCommitContribution() override;
diff --git a/sync/engine/directory_update_handler.h b/sync/engine/directory_update_handler.h
index 442ac54..df94f34 100644
--- a/sync/engine/directory_update_handler.h
+++ b/sync/engine/directory_update_handler.h
@@ -41,7 +41,7 @@ class ModelSafeWorker;
// Each instance of this class represents a particular type in the
// syncable::Directory. It can store and retreive that type's progress markers.
// It can also process a set of received SyncEntities and store their data.
-class SYNC_EXPORT DirectoryUpdateHandler : public UpdateHandler {
+class SYNC_EXPORT_PRIVATE DirectoryUpdateHandler : public UpdateHandler {
public:
DirectoryUpdateHandler(syncable::Directory* dir,
ModelType type,
diff --git a/sync/engine/get_commit_ids.h b/sync/engine/get_commit_ids.h
index 4258ca7..ddbdb89 100644
--- a/sync/engine/get_commit_ids.h
+++ b/sync/engine/get_commit_ids.h
@@ -28,10 +28,11 @@ class BaseTransaction;
//
// This function also enforces some position ordering constraints that are no
// longer necessary. We should relax those constraints. See crbug.com/287938.
-SYNC_EXPORT void GetCommitIdsForType(syncable::BaseTransaction* trans,
- ModelType type,
- size_t max_entries,
- std::vector<int64>* out);
+SYNC_EXPORT_PRIVATE void GetCommitIdsForType(
+ syncable::BaseTransaction* trans,
+ ModelType type,
+ size_t max_entries,
+ std::vector<int64>* out);
} // namespace syncer
diff --git a/sync/engine/get_updates_delegate.h b/sync/engine/get_updates_delegate.h
index 9b8e09d..32d7432 100644
--- a/sync/engine/get_updates_delegate.h
+++ b/sync/engine/get_updates_delegate.h
@@ -5,7 +5,6 @@
#ifndef SYNC_ENGINE_GET_UPDATES_DELEGATE_H_
#define SYNC_ENGINE_GET_UPDATES_DELEGATE_H_
-#include "base/macros.h"
#include "sync/internal_api/public/events/protocol_event.h"
#include "sync/protocol/sync.pb.h"
#include "sync/sessions/model_type_registry.h"
@@ -20,7 +19,7 @@ class GetUpdatesProcessor;
// GetUpdate type (normal, configuration, poll). The GetUpdatesProcessor is
// given an appropriate GetUpdatesDelegate to handle type specific functionality
// on construction.
-class SYNC_EXPORT GetUpdatesDelegate {
+class SYNC_EXPORT_PRIVATE GetUpdatesDelegate {
public:
GetUpdatesDelegate();
virtual ~GetUpdatesDelegate() = 0;
@@ -41,10 +40,9 @@ class SYNC_EXPORT GetUpdatesDelegate {
};
// Functionality specific to the normal GetUpdate request.
-class SYNC_EXPORT NormalGetUpdatesDelegate : public GetUpdatesDelegate {
+class SYNC_EXPORT_PRIVATE NormalGetUpdatesDelegate : public GetUpdatesDelegate {
public:
- explicit NormalGetUpdatesDelegate(
- const sessions::NudgeTracker& nudge_tracker);
+ NormalGetUpdatesDelegate(const sessions::NudgeTracker& nudge_tracker);
~NormalGetUpdatesDelegate() override;
// Uses the member NudgeTracker to populate some fields of this GU message.
@@ -61,13 +59,14 @@ class SYNC_EXPORT NormalGetUpdatesDelegate : public GetUpdatesDelegate {
const sync_pb::ClientToServerMessage& request) const override;
private:
- const sessions::NudgeTracker& nudge_tracker_;
-
DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesDelegate);
+
+ const sessions::NudgeTracker& nudge_tracker_;
};
// Functionality specific to the configure GetUpdate request.
-class SYNC_EXPORT ConfigureGetUpdatesDelegate : public GetUpdatesDelegate {
+class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesDelegate
+ : public GetUpdatesDelegate {
public:
ConfigureGetUpdatesDelegate(
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source);
@@ -90,16 +89,16 @@ class SYNC_EXPORT ConfigureGetUpdatesDelegate : public GetUpdatesDelegate {
const sync_pb::ClientToServerMessage& request) const override;
private:
+ DISALLOW_COPY_AND_ASSIGN(ConfigureGetUpdatesDelegate);
+
static sync_pb::SyncEnums::GetUpdatesOrigin ConvertConfigureSourceToOrigin(
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source);
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source_;
-
- DISALLOW_COPY_AND_ASSIGN(ConfigureGetUpdatesDelegate);
};
// Functionality specific to the poll GetUpdate request.
-class SYNC_EXPORT PollGetUpdatesDelegate : public GetUpdatesDelegate {
+class SYNC_EXPORT_PRIVATE PollGetUpdatesDelegate : public GetUpdatesDelegate {
public:
PollGetUpdatesDelegate();
~PollGetUpdatesDelegate() override;
diff --git a/sync/engine/get_updates_processor.h b/sync/engine/get_updates_processor.h
index 02e4482..934c3f1 100644
--- a/sync/engine/get_updates_processor.h
+++ b/sync/engine/get_updates_processor.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_ENGINE_GET_UPDATES_PROCESSOR_H_
-#define SYNC_ENGINE_GET_UPDATES_PROCESSOR_H_
+#ifndef SYNC_ENGINE_GET_UPDATES_PROCESSOR_H
+#define SYNC_ENGINE_GET_UPDATES_PROCESSOR_H
#include <map>
#include <vector>
@@ -42,7 +42,7 @@ class GetUpdatesDelegate;
// Most methods allow the caller to specify a subset of types on which the
// operation is to be applied. It is a logic error if the supplied set of types
// contains a type which was not previously registered with the manager.
-class SYNC_EXPORT GetUpdatesProcessor {
+class SYNC_EXPORT_PRIVATE GetUpdatesProcessor {
public:
explicit GetUpdatesProcessor(UpdateHandlerMap* update_handler_map,
const GetUpdatesDelegate& delegate);
diff --git a/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h
index ed0f00e..6514290 100644
--- a/sync/engine/net/server_connection_manager.h
+++ b/sync/engine/net/server_connection_manager.h
@@ -38,7 +38,7 @@ static const int32 kUnsetPayloadLength = -1;
// HttpResponse gathers the relevant output properties of an HTTP request.
// Depending on the value of the server_status code, response_code, and
// content_length may not be valid.
-struct SYNC_EXPORT HttpResponse {
+struct SYNC_EXPORT_PRIVATE HttpResponse {
enum ServerConnectionCode {
// For uninitialized state.
NONE,
@@ -99,7 +99,7 @@ struct ServerConnectionEvent {
connection_code(code) {}
};
-class SYNC_EXPORT ServerConnectionEventListener {
+class SYNC_EXPORT_PRIVATE ServerConnectionEventListener {
public:
virtual void OnServerConnectionEvent(const ServerConnectionEvent& event) = 0;
protected:
@@ -110,7 +110,8 @@ class ServerConnectionManager;
// A helper class that automatically notifies when the status changes.
// TODO(tim): This class shouldn't be exposed outside of the implementation,
// bug 35060.
-class SYNC_EXPORT ScopedServerStatusWatcher : public base::NonThreadSafe {
+class SYNC_EXPORT_PRIVATE ScopedServerStatusWatcher
+ : public base::NonThreadSafe {
public:
ScopedServerStatusWatcher(ServerConnectionManager* conn_mgr,
HttpResponse* response);
@@ -124,7 +125,7 @@ class SYNC_EXPORT ScopedServerStatusWatcher : public base::NonThreadSafe {
// Use this class to interact with the sync server.
// The ServerConnectionManager currently supports POSTing protocol buffers.
//
-class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
+class SYNC_EXPORT_PRIVATE ServerConnectionManager : public CancelationObserver {
public:
// buffer_in - will be POSTed
// buffer_out - string will be overwritten with response
diff --git a/sync/engine/nudge_handler.h b/sync/engine/nudge_handler.h
index 405accb..f5d18ea 100644
--- a/sync/engine/nudge_handler.h
+++ b/sync/engine/nudge_handler.h
@@ -11,7 +11,7 @@
namespace syncer {
-class SYNC_EXPORT NudgeHandler {
+class SYNC_EXPORT_PRIVATE NudgeHandler {
public:
NudgeHandler();
virtual ~NudgeHandler();
diff --git a/sync/engine/sync_cycle_event.h b/sync/engine/sync_cycle_event.h
index 4fd549a..0f1a04d 100644
--- a/sync/engine/sync_cycle_event.h
+++ b/sync/engine/sync_cycle_event.h
@@ -12,7 +12,7 @@ namespace syncer {
struct SyncProtocolError;
-struct SYNC_EXPORT SyncCycleEvent {
+struct SYNC_EXPORT_PRIVATE SyncCycleEvent {
enum EventCause {
////////////////////////////////////////////////////////////////
// Sent on entry of Syncer state machine
diff --git a/sync/engine/sync_engine_event_listener.h b/sync/engine/sync_engine_event_listener.h
index 01a614a..d5678a9 100644
--- a/sync/engine/sync_engine_event_listener.h
+++ b/sync/engine/sync_engine_event_listener.h
@@ -15,7 +15,7 @@ struct SyncProtocolError;
struct SyncCycleEvent;
class ProtocolEvent;
-class SYNC_EXPORT SyncEngineEventListener {
+class SYNC_EXPORT_PRIVATE SyncEngineEventListener {
public:
SyncEngineEventListener();
diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h
index 0aa9133..4e5e694 100644
--- a/sync/engine/sync_scheduler.h
+++ b/sync/engine/sync_scheduler.h
@@ -24,7 +24,7 @@ namespace syncer {
struct ServerConnectionEvent;
-struct SYNC_EXPORT ConfigurationParams {
+struct SYNC_EXPORT_PRIVATE ConfigurationParams {
ConfigurationParams();
ConfigurationParams(
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source,
@@ -46,15 +46,16 @@ struct SYNC_EXPORT ConfigurationParams {
base::Closure retry_task;
};
-struct SYNC_EXPORT ClearParams {
- explicit ClearParams(const base::Closure& report_success_task);
+struct SYNC_EXPORT_PRIVATE ClearParams {
+ ClearParams(const base::Closure& report_success_task);
~ClearParams();
// Callback to invoke on successful completion.
base::Closure report_success_task;
};
-class SYNC_EXPORT SyncScheduler : public sessions::SyncSession::Delegate {
+class SYNC_EXPORT_PRIVATE SyncScheduler
+ : public sessions::SyncSession::Delegate {
public:
enum Mode {
// In this mode, the thread only performs configuration tasks. This is
diff --git a/sync/engine/sync_scheduler_impl.h b/sync/engine/sync_scheduler_impl.h
index acfad93..4e5fb17 100644
--- a/sync/engine/sync_scheduler_impl.h
+++ b/sync/engine/sync_scheduler_impl.h
@@ -37,8 +37,9 @@ namespace sessions {
struct ModelNeutralState;
}
-class SYNC_EXPORT SyncSchedulerImpl : public SyncScheduler,
- public base::NonThreadSafe {
+class SYNC_EXPORT_PRIVATE SyncSchedulerImpl
+ : public SyncScheduler,
+ public base::NonThreadSafe {
public:
// |name| is a display string to identify the syncer thread. Takes
// |ownership of |syncer| and |delay_provider|.
@@ -120,7 +121,7 @@ class SYNC_EXPORT SyncSchedulerImpl : public SyncScheduler,
FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, FailedRetry);
FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, ReceiveNewRetryDelay);
- struct SYNC_EXPORT WaitInterval {
+ struct SYNC_EXPORT_PRIVATE WaitInterval {
enum Mode {
// Uninitialized state, should not be set in practice.
UNKNOWN = -1,
diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h
index 9285967..7b77d07 100644
--- a/sync/engine/syncer.h
+++ b/sync/engine/syncer.h
@@ -34,11 +34,11 @@ class GetUpdatesProcessor;
// A Syncer instance expects to run on a dedicated thread. Calls to SyncShare()
// may take an unbounded amount of time because it may block on network I/O, on
// lock contention, or on tasks posted to other threads.
-class SYNC_EXPORT Syncer {
+class SYNC_EXPORT_PRIVATE Syncer {
public:
typedef std::vector<int64> UnsyncedMetaHandles;
- explicit Syncer(CancelationSignal* cancelation_signal);
+ Syncer(CancelationSignal* cancelation_signal);
virtual ~Syncer();
// Whether an early exist was requested due to a cancelation signal.
diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h
index 76082c7..ae59cdf 100644
--- a/sync/engine/syncer_proto_util.h
+++ b/sync/engine/syncer_proto_util.h
@@ -38,14 +38,14 @@ class Entry;
}
// Returns the types to migrate from the data in |response|.
-SYNC_EXPORT ModelTypeSet
-GetTypesToMigrate(const sync_pb::ClientToServerResponse& response);
+SYNC_EXPORT_PRIVATE ModelTypeSet GetTypesToMigrate(
+ const sync_pb::ClientToServerResponse& response);
// Builds a SyncProtocolError from the data in |error|.
-SYNC_EXPORT SyncProtocolError ConvertErrorPBToSyncProtocolError(
+SYNC_EXPORT_PRIVATE SyncProtocolError ConvertErrorPBToSyncProtocolError(
const sync_pb::ClientToServerResponse_Error& error);
-class SYNC_EXPORT SyncerProtoUtil {
+class SYNC_EXPORT_PRIVATE SyncerProtoUtil {
public:
// Posts the given message and fills the buffer with the returned value.
// Returns true on success. Also handles store birthday verification: will
diff --git a/sync/engine/syncer_util.h b/sync/engine/syncer_util.h
index 9b84bae..9148398 100644
--- a/sync/engine/syncer_util.h
+++ b/sync/engine/syncer_util.h
@@ -59,16 +59,17 @@ UpdateAttemptResponse AttemptToUpdateEntry(
//
// Will return an invalid position if no valid position can be constructed, or
// if this type does not support positioning.
-SYNC_EXPORT UniquePosition GetUpdatePosition(const sync_pb::SyncEntity& update,
- const std::string& suffix);
+SYNC_EXPORT_PRIVATE UniquePosition GetUpdatePosition(
+ const sync_pb::SyncEntity& update,
+ const std::string& suffix);
// Fetch the cache_guid and item_id-based unique bookmark tag from an update.
// Will return an empty string if someting unexpected happens.
-SYNC_EXPORT std::string GetUniqueBookmarkTagFromUpdate(
+SYNC_EXPORT_PRIVATE std::string GetUniqueBookmarkTagFromUpdate(
const sync_pb::SyncEntity& update);
// Pass in name to avoid redundant UTF8 conversion.
-SYNC_EXPORT void UpdateServerFieldsFromUpdate(
+SYNC_EXPORT_PRIVATE void UpdateServerFieldsFromUpdate(
syncable::ModelNeutralMutableEntry* local_entry,
const sync_pb::SyncEntity& server_entry,
const std::string& name);
diff --git a/sync/engine/update_handler.h b/sync/engine/update_handler.h
index 4ed4cb1..e4c9abc 100644
--- a/sync/engine/update_handler.h
+++ b/sync/engine/update_handler.h
@@ -28,7 +28,7 @@ class ModelSafeWorker;
// This class represents an entity that can request, receive, and apply updates
// from the sync server.
-class SYNC_EXPORT UpdateHandler {
+class SYNC_EXPORT_PRIVATE UpdateHandler {
public:
UpdateHandler();
virtual ~UpdateHandler() = 0;
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.
diff --git a/sync/js/js_backend.h b/sync/js/js_backend.h
index 8bb11e0..a0ef317 100644
--- a/sync/js/js_backend.h
+++ b/sync/js/js_backend.h
@@ -19,7 +19,7 @@ template <typename T> class WeakHandle;
// Interface representing the backend of chrome://sync-internals. A
// JsBackend can handle messages and can emit events to a
// JsEventHandler.
-class SYNC_EXPORT JsBackend {
+class SYNC_EXPORT_PRIVATE JsBackend {
public:
// Starts emitting events to the given handler, if initialized.
virtual void SetJsEventHandler(
diff --git a/sync/protocol/proto_enum_conversions.h b/sync/protocol/proto_enum_conversions.h
index c379d01..e19fe6b 100644
--- a/sync/protocol/proto_enum_conversions.h
+++ b/sync/protocol/proto_enum_conversions.h
@@ -22,19 +22,20 @@ namespace syncer {
// The returned strings (which don't have to be freed) are in ASCII.
// The result of passing in an invalid enum value is undefined.
-SYNC_EXPORT const char* GetAppListItemTypeString(
+SYNC_EXPORT_PRIVATE const char* GetAppListItemTypeString(
sync_pb::AppListSpecifics::AppListItemType item_type);
-SYNC_EXPORT const char* GetBrowserTypeString(
+SYNC_EXPORT_PRIVATE const char* GetBrowserTypeString(
sync_pb::SessionWindow::BrowserType browser_type);
-SYNC_EXPORT const char* GetPageTransitionString(
+SYNC_EXPORT_PRIVATE const char* GetPageTransitionString(
sync_pb::SyncEnums::PageTransition page_transition);
-SYNC_EXPORT const char* GetPageTransitionRedirectTypeString(
- sync_pb::SyncEnums::PageTransitionRedirectType redirect_type);
+SYNC_EXPORT_PRIVATE const char* GetPageTransitionRedirectTypeString(
+ sync_pb::SyncEnums::PageTransitionRedirectType
+ redirect_type);
-SYNC_EXPORT const char* GetWifiCredentialSecurityClassString(
+SYNC_EXPORT_PRIVATE const char* GetWifiCredentialSecurityClassString(
sync_pb::WifiCredentialSpecifics::SecurityClass security_class);
SYNC_EXPORT const char* GetUpdatesSourceString(
@@ -43,27 +44,28 @@ SYNC_EXPORT const char* GetUpdatesSourceString(
SYNC_EXPORT const char* GetUpdatesOriginString(
sync_pb::SyncEnums::GetUpdatesOrigin origin);
-SYNC_EXPORT const char* GetResponseTypeString(
+SYNC_EXPORT_PRIVATE const char* GetResponseTypeString(
sync_pb::CommitResponse::ResponseType response_type);
-SYNC_EXPORT const char* GetErrorTypeString(
+SYNC_EXPORT_PRIVATE const char* GetErrorTypeString(
sync_pb::SyncEnums::ErrorType error_type);
-SYNC_EXPORT const char* GetActionString(sync_pb::SyncEnums::Action action);
+SYNC_EXPORT_PRIVATE const char* GetActionString(
+ sync_pb::SyncEnums::Action action);
-SYNC_EXPORT const char* GetLaunchTypeString(
+SYNC_EXPORT_PRIVATE const char* GetLaunchTypeString(
sync_pb::AppSpecifics::LaunchType launch_type);
-SYNC_EXPORT const char* GetWalletInfoTypeString(
+SYNC_EXPORT_PRIVATE const char* GetWalletInfoTypeString(
sync_pb::AutofillWalletSpecifics::WalletInfoType wallet_info_type);
-SYNC_EXPORT const char* GetWalletMetadataTypeString(
+SYNC_EXPORT_PRIVATE const char* GetWalletMetadataTypeString(
sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type);
-SYNC_EXPORT const char* GetWalletCardStatusString(
+SYNC_EXPORT_PRIVATE const char* GetWalletCardStatusString(
sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status);
-SYNC_EXPORT const char* GetWalletCardTypeString(
+SYNC_EXPORT_PRIVATE const char* GetWalletCardTypeString(
sync_pb::WalletMaskedCreditCard::WalletCardType wallet_card_type);
const char* GetDeviceTypeString(sync_pb::SyncEnums::DeviceType device_type);
diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h
index 7a831bd..9ba4563 100644
--- a/sync/protocol/proto_value_conversions.h
+++ b/sync/protocol/proto_value_conversions.h
@@ -95,40 +95,41 @@ namespace syncer {
// caller.
// TODO(akalin): Perhaps extend this to decrypt?
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> EncryptedDataToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> EncryptedDataToValue(
const sync_pb::EncryptedData& encrypted_data);
// Sub-protocol of AppListSpecifics.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppListSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppListSpecificsToValue(
const sync_pb::AppListSpecifics& proto);
// Sub-protocols of AppSpecifics.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppSettingsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppSettingsToValue(
const sync_pb::AppNotificationSettings& app_notification_settings);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> LinkedAppIconInfoToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> LinkedAppIconInfoToValue(
const sync_pb::LinkedAppIconInfo& linked_app_icon_info);
// Sub-protocols of SessionSpecifics.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionHeaderToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionHeaderToValue(
const sync_pb::SessionHeader& session_header);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionTabToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionTabToValue(
const sync_pb::SessionTab& session_tab);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionWindowToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionWindowToValue(
const sync_pb::SessionWindow& session_window);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> TabNavigationToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> TabNavigationToValue(
const sync_pb::TabNavigation& tab_navigation);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> NavigationRedirectToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> NavigationRedirectToValue(
const sync_pb::NavigationRedirect& navigation_redirect);
// Sub-protocol of PasswordSpecifics.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> PasswordSpecificsDataToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+PasswordSpecificsDataToValue(
const sync_pb::PasswordSpecificsData& password_specifics_data);
// Sub-protocol of NigoriSpecifics.
@@ -149,61 +150,69 @@ scoped_ptr<base::DictionaryValue> TimeRangeDirectiveToValue(
scoped_ptr<base::DictionaryValue> KeystoreEncryptionToValue(
const sync_pb::KeystoreEncryptionFlagsSpecifics& proto);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionSpecificsToValue(
const sync_pb::SessionSpecifics& session_specifics);
// Main *SpecificsToValue functions.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppNotificationToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppNotificationToValue(
const sync_pb::AppNotification& app_notification_specifics);
scoped_ptr<base::DictionaryValue> AppSettingSpecificsToValue(
const sync_pb::AppSettingSpecifics& app_setting_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppSpecificsToValue(
const sync_pb::AppSpecifics& app_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ArticleSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ArticleSpecificsToValue(
const sync_pb::ArticleSpecifics& article_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AutofillSpecificsToValue(
const sync_pb::AutofillSpecifics& autofill_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillProfileSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+AutofillProfileSpecificsToValue(
const sync_pb::AutofillProfileSpecifics& autofill_profile_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletMetadataSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+WalletMetadataSpecificsToValue(
const sync_pb::WalletMetadataSpecifics& wallet_metadata_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+AutofillWalletSpecificsToValue(
const sync_pb::AutofillWalletSpecifics& autofill_wallet_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> BookmarkSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> BookmarkSpecificsToValue(
const sync_pb::BookmarkSpecifics& bookmark_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> DeviceInfoSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+DeviceInfoSpecificsToValue(
const sync_pb::DeviceInfoSpecifics& device_info_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> DictionarySpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+DictionarySpecificsToValue(
const sync_pb::DictionarySpecifics& dictionary_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExperimentsSpecificsToValue(
- const sync_pb::ExperimentsSpecifics& proto);
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+ExperimentsSpecificsToValue(const sync_pb::ExperimentsSpecifics& proto);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
PriorityPreferenceSpecificsToValue(
const sync_pb::PriorityPreferenceSpecifics& proto);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExtensionSettingSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+ExtensionSettingSpecificsToValue(
const sync_pb::ExtensionSettingSpecifics& extension_setting_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExtensionSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ExtensionSpecificsToValue(
const sync_pb::ExtensionSpecifics& extension_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> FaviconImageSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+FaviconImageSpecificsToValue(
const sync_pb::FaviconImageSpecifics& favicon_image_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> FaviconTrackingSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+FaviconTrackingSpecificsToValue(
const sync_pb::FaviconTrackingSpecifics& favicon_tracking_specifics);
SYNC_EXPORT scoped_ptr<base::DictionaryValue>
@@ -211,78 +220,84 @@ HistoryDeleteDirectiveSpecificsToValue(
const sync_pb::HistoryDeleteDirectiveSpecifics&
history_delete_directive_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
ManagedUserSettingSpecificsToValue(
const sync_pb::ManagedUserSettingSpecifics& managed_user_setting_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ManagedUserSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+ManagedUserSpecificsToValue(
const sync_pb::ManagedUserSpecifics& managed_user_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
ManagedUserSharedSettingSpecificsToValue(
const sync_pb::ManagedUserSharedSettingSpecifics&
managed_user_shared_setting_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
ManagedUserWhitelistSpecificsToValue(
const sync_pb::ManagedUserWhitelistSpecifics&
managed_user_whitelist_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> MediaToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> MediaToValue(
const sync_pb::Media& media);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> NigoriSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> NigoriSpecificsToValue(
const sync_pb::NigoriSpecifics& nigori_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> PasswordSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> PasswordSpecificsToValue(
const sync_pb::PasswordSpecifics& password_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> PreferenceSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+PreferenceSpecificsToValue(
const sync_pb::PreferenceSpecifics& password_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
SyncedNotificationAppInfoSpecificsToValue(
const sync_pb::SyncedNotificationAppInfoSpecifics&
synced_notification_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue>
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
SyncedNotificationSpecificsToValue(
const sync_pb::SyncedNotificationSpecifics& synced_notification_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SearchEngineSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+SearchEngineSpecificsToValue(
const sync_pb::SearchEngineSpecifics& search_engine_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ThemeSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ThemeSpecificsToValue(
const sync_pb::ThemeSpecifics& theme_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> TypedUrlSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> TypedUrlSpecificsToValue(
const sync_pb::TypedUrlSpecifics& typed_url_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletMaskedCreditCardToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+WalletMaskedCreditCardToValue(
const sync_pb::WalletMaskedCreditCard& wallet_masked_card);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletPostalAddressToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+WalletPostalAddressToValue(
const sync_pb::WalletPostalAddress& wallet_postal_address);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> WifiCredentialSpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+WifiCredentialSpecificsToValue(
const sync_pb::WifiCredentialSpecifics& wifi_credential_specifics);
// Any present extensions are mapped to sub-dictionary values with the
// key equal to the extension name.
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> EntitySpecificsToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> EntitySpecificsToValue(
const sync_pb::EntitySpecifics& specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> SyncEntityToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SyncEntityToValue(
const sync_pb::SyncEntity& entity,
bool include_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ClientToServerMessageToValue(
- const sync_pb::ClientToServerMessage& proto,
- bool include_specifics);
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+ClientToServerMessageToValue(const sync_pb::ClientToServerMessage& proto,
+ bool include_specifics);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> ClientToServerResponseToValue(
- const sync_pb::ClientToServerResponse& proto,
- bool include_specifics);
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue>
+ClientToServerResponseToValue(const sync_pb::ClientToServerResponse& proto,
+ bool include_specifics);
scoped_ptr<base::DictionaryValue> DatatypeAssociationStatsToValue(
const sync_pb::DatatypeAssociationStats& proto);
@@ -299,7 +314,7 @@ scoped_ptr<base::DictionaryValue> SyncCycleCompletedEventInfoToValue(
scoped_ptr<base::DictionaryValue> ClientConfigParamsToValue(
const sync_pb::ClientConfigParams& proto);
-SYNC_EXPORT scoped_ptr<base::DictionaryValue> AttachmentIdProtoToValue(
+SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AttachmentIdProtoToValue(
const sync_pb::AttachmentIdProto& proto);
} // namespace syncer
diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h
index 43c9349..7efe0cb 100644
--- a/sync/sessions/debug_info_getter.h
+++ b/sync/sessions/debug_info_getter.h
@@ -13,7 +13,7 @@ namespace sessions {
// This is the interface that needs to be implemented by the event listener
// to communicate the debug info data to the syncer.
-class SYNC_EXPORT DebugInfoGetter {
+class SYNC_EXPORT_PRIVATE DebugInfoGetter {
public:
// Gets the client debug info. Be sure to clear the info to ensure the data
// isn't sent multiple times.
diff --git a/sync/sessions/directory_type_debug_info_emitter.h b/sync/sessions/directory_type_debug_info_emitter.h
index aa55e3b..254e3f9 100644
--- a/sync/sessions/directory_type_debug_info_emitter.h
+++ b/sync/sessions/directory_type_debug_info_emitter.h
@@ -33,7 +33,7 @@ class TypeDebugInfoObserver;
// is delegated to the UpdateHandler and CommitContributors. For the Stats
// counters, the emitter will use its type_ and directory_ members to fetch all
// the required information on demand.
-class SYNC_EXPORT DirectoryTypeDebugInfoEmitter {
+class SYNC_EXPORT_PRIVATE DirectoryTypeDebugInfoEmitter {
public:
// Standard constructor for non-tests.
//
diff --git a/sync/sessions/model_type_registry.h b/sync/sessions/model_type_registry.h
index c79173e..6ac0c7c 100644
--- a/sync/sessions/model_type_registry.h
+++ b/sync/sessions/model_type_registry.h
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_
-#define SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_
+#ifndef SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_
+#define SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_
#include <map>
-#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
@@ -46,8 +44,9 @@ typedef std::map<ModelType, DirectoryTypeDebugInfoEmitter*>
DirectoryTypeDebugInfoEmitterMap;
// Keeps track of the sets of active update handlers and commit contributors.
-class SYNC_EXPORT ModelTypeRegistry : public syncer_v2::SyncContext,
- public SyncEncryptionHandler::Observer {
+class SYNC_EXPORT_PRIVATE ModelTypeRegistry
+ : public syncer_v2::SyncContext,
+ public SyncEncryptionHandler::Observer {
public:
// Constructs a ModelTypeRegistry that supports directory types.
ModelTypeRegistry(const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
@@ -163,4 +162,4 @@ class SYNC_EXPORT ModelTypeRegistry : public syncer_v2::SyncContext,
} // namespace syncer
-#endif // SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_
+#endif // SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_
diff --git a/sync/sessions/nudge_tracker.h b/sync/sessions/nudge_tracker.h
index eb74d06..f4c1e42 100644
--- a/sync/sessions/nudge_tracker.h
+++ b/sync/sessions/nudge_tracker.h
@@ -25,7 +25,7 @@ class ObjectIdInvalidationMap;
namespace sessions {
-class SYNC_EXPORT NudgeTracker {
+class SYNC_EXPORT_PRIVATE NudgeTracker {
public:
static size_t kDefaultMaxPayloadsPerType;
diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h
index 144228b..b6f1003 100644
--- a/sync/sessions/status_controller.h
+++ b/sync/sessions/status_controller.h
@@ -30,9 +30,9 @@
namespace syncer {
namespace sessions {
-class SYNC_EXPORT StatusController {
+class SYNC_EXPORT_PRIVATE StatusController {
public:
- StatusController();
+ explicit StatusController();
~StatusController();
// ClientToServer messages.
diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h
index e96b640..fd20132 100644
--- a/sync/sessions/sync_session.h
+++ b/sync/sessions/sync_session.h
@@ -36,12 +36,12 @@ namespace sessions {
class NudgeTracker;
-class SYNC_EXPORT SyncSession {
+class SYNC_EXPORT_PRIVATE SyncSession {
public:
// The Delegate services events that occur during the session requiring an
// explicit (and session-global) action, as opposed to events that are simply
// recorded in per-session state.
- class SYNC_EXPORT Delegate {
+ class SYNC_EXPORT_PRIVATE Delegate {
public:
// The client was throttled and should cease-and-desist syncing activity
// until the specified time.
diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h
index 058244c..afce0a8 100644
--- a/sync/sessions/sync_session_context.h
+++ b/sync/sessions/sync_session_context.h
@@ -16,7 +16,6 @@
#define SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_
#include <string>
-#include <vector>
#include "sync/base/sync_export.h"
#include "sync/engine/sync_engine_event_listener.h"
@@ -39,7 +38,7 @@ static const int kDefaultMaxCommitBatchSize = 25;
namespace sessions {
class TestScopedSessionEventListener;
-class SYNC_EXPORT SyncSessionContext {
+class SYNC_EXPORT_PRIVATE SyncSessionContext {
public:
SyncSessionContext(
ServerConnectionManager* connection_manager,
diff --git a/sync/sync.gyp b/sync/sync.gyp
index 3e9629a..e9f991d 100644
--- a/sync/sync.gyp
+++ b/sync/sync.gyp
@@ -560,7 +560,7 @@
'enable_wexit_time_destructors': 1,
'proto_in_dir': 'internal_api/attachments/proto',
'proto_out_dir': 'sync/internal_api/attachments/proto',
- 'cc_generator_options': 'dllexport_decl=SYNC_EXPORT:',
+ 'cc_generator_options': 'dllexport_decl=SYNC_EXPORT_PRIVATE:',
'cc_include': 'sync/base/sync_export.h',
},
'includes': [
diff --git a/sync/syncable/deferred_on_disk_directory_backing_store.h b/sync/syncable/deferred_on_disk_directory_backing_store.h
index 7656809..388e1f9 100644
--- a/sync/syncable/deferred_on_disk_directory_backing_store.h
+++ b/sync/syncable/deferred_on_disk_directory_backing_store.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_
#define SYNC_SYNCABLE_DEFERRED_ON_DISK_DIRECTORY_BACKING_STORE_H_
-#include <string>
-
#include "base/files/file_path.h"
#include "sync/base/sync_export.h"
#include "sync/syncable/on_disk_directory_backing_store.h"
@@ -19,7 +17,7 @@ namespace syncable {
// called, which only happens when SyncBackupManager is shut down and a
// syncing backend is to be created. Thus we guarantee that user data is not
// persisted until user is actually going to sync.
-class SYNC_EXPORT DeferredOnDiskDirectoryBackingStore
+class SYNC_EXPORT_PRIVATE DeferredOnDiskDirectoryBackingStore
: public OnDiskDirectoryBackingStore {
public:
DeferredOnDiskDirectoryBackingStore(const std::string& dir_name,
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index ab01a27..7402697 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -44,10 +44,9 @@ class TransactionObserver;
class WriteTransaction;
enum InvariantCheckLevel {
- OFF = 0, // No checking.
- VERIFY_CHANGES = 1, // Checks only mutated entries. Does not check
- // hierarchy.
- FULL_DB_VERIFICATION = 2 // Check every entry. This can be expensive.
+ OFF = 0, // No checking.
+ VERIFY_CHANGES = 1, // Checks only mutated entries. Does not check hierarchy.
+ FULL_DB_VERIFICATION = 2 // Check every entry. This can be expensive.
};
// Directory stores and manages EntryKernels.
@@ -59,7 +58,6 @@ class SYNC_EXPORT Directory {
public:
typedef std::vector<int64> Metahandles;
- // TODO(skym): Convert this hash_map usage to unordered_map, crbug/567280.
// Be careful when using these hash_map containers. According to the spec,
// inserting into them may invalidate all iterators.
//
@@ -88,7 +86,7 @@ class SYNC_EXPORT Directory {
// Various data that the Directory::Kernel we are backing (persisting data
// for) needs saved across runs of the application.
- struct SYNC_EXPORT PersistedKernelInfo {
+ struct SYNC_EXPORT_PRIVATE PersistedKernelInfo {
PersistedKernelInfo();
~PersistedKernelInfo();
@@ -133,7 +131,7 @@ class SYNC_EXPORT Directory {
// When the Directory is told to SaveChanges, a SaveChangesSnapshot is
// constructed and forms a consistent snapshot of what needs to be sent to
// the backing store.
- struct SYNC_EXPORT SaveChangesSnapshot {
+ struct SYNC_EXPORT_PRIVATE SaveChangesSnapshot {
SaveChangesSnapshot();
~SaveChangesSnapshot();
@@ -374,8 +372,8 @@ class SYNC_EXPORT Directory {
//
// TODO(rlarocque): These functions are used mainly for tree traversal. We
// should replace these with an iterator API. See crbug.com/178275.
- syncable::Id GetPredecessorId(EntryKernel* e);
- syncable::Id GetSuccessorId(EntryKernel* e);
+ syncable::Id GetPredecessorId(EntryKernel*);
+ syncable::Id GetSuccessorId(EntryKernel*);
// Places |e| as a successor to |predecessor|. If |predecessor| is NULL,
// |e| will be placed as the left-most item in its folder.
@@ -666,4 +664,4 @@ class SYNC_EXPORT Directory {
} // namespace syncable
} // namespace syncer
-#endif // SYNC_SYNCABLE_DIRECTORY_H_
+#endif // SYNC_SYNCABLE_DIRECTORY_H_
diff --git a/sync/syncable/directory_backing_store.h b/sync/syncable/directory_backing_store.h
index 0c0dc84..422d13d 100644
--- a/sync/syncable/directory_backing_store.h
+++ b/sync/syncable/directory_backing_store.h
@@ -25,7 +25,7 @@ class EntitySpecifics;
namespace syncer {
namespace syncable {
-SYNC_EXPORT extern const int32 kCurrentDBVersion;
+SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion;
struct ColumnSpec;
@@ -44,7 +44,7 @@ struct ColumnSpec;
// This class is abstract so that we can extend it in interesting ways for use
// in tests. The concrete class used in non-test scenarios is
// OnDiskDirectoryBackingStore.
-class SYNC_EXPORT DirectoryBackingStore : public base::NonThreadSafe {
+class SYNC_EXPORT_PRIVATE DirectoryBackingStore : public base::NonThreadSafe {
public:
explicit DirectoryBackingStore(const std::string& dir_name);
virtual ~DirectoryBackingStore();
diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index a5f81f4..24a2014 100644
--- a/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -2,9 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "sync/syncable/directory_backing_store.h"
+#include "testing/gtest/include/gtest/gtest.h"
-#include <map>
#include <string>
#include "base/files/file_path.h"
@@ -24,13 +23,13 @@
#include "sync/protocol/bookmark_specifics.pb.h"
#include "sync/protocol/sync.pb.h"
#include "sync/syncable/directory.h"
+#include "sync/syncable/directory_backing_store.h"
#include "sync/syncable/on_disk_directory_backing_store.h"
#include "sync/syncable/syncable-inl.h"
#include "sync/test/directory_backing_store_corruption_testing.h"
#include "sync/test/test_directory_backing_store.h"
#include "sync/util/time.h"
#include "testing/gtest/include/gtest/gtest-param-test.h"
-#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
namespace syncable {
@@ -53,7 +52,7 @@ scoped_ptr<EntryKernel> CreateEntry(int id, const std::string &id_suffix) {
} // namespace
-SYNC_EXPORT extern const int32 kCurrentDBVersion;
+SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion;
class MigrationTest : public testing::TestWithParam<int> {
public:
@@ -755,7 +754,8 @@ void MigrationTest::SetUpVersion69Database(sql::Connection* connection) {
"'Unknown',1263522064,-65542,"
"'9010788312004066376x-6609234393368420856x');"
"CREATE TABLE share_version (id VARCHAR(128) primary key, data INT);"
- "INSERT INTO share_version VALUES('nick@chromium.org',69);"));
+ "INSERT INTO share_version VALUES('nick@chromium.org',69);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -862,7 +862,8 @@ void MigrationTest::SetUpVersion70Database(sql::Connection* connection) {
"'The WebKit Open Source Project','The WebKit Open Source Project',"
"NULL,NULL,X'C288101A0A12687474703A2F2F7765626B69742E6F72672F120450"
"4E4758',X'C288101C0A13687474703A2F2F7765626B69742E6F72672F78120550"
- "4E473259');"));
+ "4E473259');"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1275,7 +1276,8 @@ void MigrationTest::SetUpVersion74Database(sql::Connection* connection) {
"ID_6','s_ID_6','s_ID_12','r',0,0,0,0,0,0,'The WebKit Open Source Pr"
"oject','The WebKit Open Source Project',NULL,NULL,X'C288101A0A12687"
"474703A2F2F7765626B69742E6F72672F1204504E4758',X'C288101C0A13687474"
- "703A2F2F7765626B69742E6F72672F781205504E473259');"));
+ "703A2F2F7765626B69742E6F72672F781205504E473259');"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1380,7 +1382,8 @@ void MigrationTest::SetUpVersion75Database(sql::Connection* connection) {
"en Source Project','The WebKit Open Source Project',NULL,NULL,X"
"'C288101A0A12687474703A2F2F7765626B69742E6F72672F1204504E4758',"
"X'C288101C0A13687474703A2F2F7765626B69742E6F72672F781205504E473"
- "259');"));
+ "259');"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1476,7 +1479,8 @@ void MigrationTest::SetUpVersion76Database(sql::Connection* connection) {
"ult -2, cache_guid TEXT , notification_state BLOB);"
"INSERT INTO 'share_info' VALUES('nick@chromium.org','nick@chromium.org',"
"'c27e9f59-08ca-46f8-b0cc-f16a2ed778bb','Unknown',1263522064,-65542,'"
- "9010788312004066376x-6609234393368420856x',NULL);"));
+ "9010788312004066376x-6609234393368420856x',NULL);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1566,7 +1570,8 @@ void MigrationTest::SetUpVersion77Database(sql::Connection* connection) {
"ult -2, cache_guid TEXT , notification_state BLOB);"
"INSERT INTO 'share_info' VALUES('nick@chromium.org','nick@chromium.org',"
"'c27e9f59-08ca-46f8-b0cc-f16a2ed778bb','Unknown',1263522064,-65542,'"
- "9010788312004066376x-6609234393368420856x',NULL);"));
+ "9010788312004066376x-6609234393368420856x',NULL);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1660,7 +1665,8 @@ void MigrationTest::SetUpVersion78Database(sql::Connection* connection) {
"ult -2, cache_guid TEXT , notification_state BLOB);"
"INSERT INTO 'share_info' VALUES('nick@chromium.org','nick@chromium.org',"
"'c27e9f59-08ca-46f8-b0cc-f16a2ed778bb','Unknown',1263522064,-65542,'"
- "9010788312004066376x-6609234393368420856x',NULL);"));
+ "9010788312004066376x-6609234393368420856x',NULL);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1754,7 +1760,8 @@ void MigrationTest::SetUpVersion79Database(sql::Connection* connection) {
"ult -2, cache_guid TEXT , notification_state BLOB);"
"INSERT INTO 'share_info' VALUES('nick@chromium.org','nick@chromium.org',"
"'c27e9f59-08ca-46f8-b0cc-f16a2ed778bb','Unknown',1263522064,"
- "-131078,'9010788312004066376x-6609234393368420856x',NULL);"));
+ "-131078,'9010788312004066376x-6609234393368420856x',NULL);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1849,7 +1856,8 @@ void MigrationTest::SetUpVersion80Database(sql::Connection* connection) {
"blob);"
"INSERT INTO 'share_info' VALUES('nick@chromium.org','nick@chromium.org',"
"'c27e9f59-08ca-46f8-b0cc-f16a2ed778bb','Unknown',1263522064,"
- "-131078,'9010788312004066376x-6609234393368420856x',NULL, NULL);"));
+ "-131078,'9010788312004066376x-6609234393368420856x',NULL, NULL);"
+ ));
ASSERT_TRUE(connection->CommitTransaction());
}
@@ -1878,7 +1886,7 @@ std::string V81_Ordinal(int n) {
return Int64ToNodeOrdinal(V80_POSITIONS[n]).ToInternalValue();
}
-} // namespace
+} //namespace
// Unlike the earlier versions, the rows for version 81 are generated
// programmatically to accurately handle unprintable characters for the
@@ -3987,7 +3995,7 @@ TEST_F(DirectoryBackingStoreTest, IncreaseDatabasePageSizeFrom4KTo32K) {
// Check if update is successful.
int pageSize = 0;
dbs->GetDatabasePageSize(&pageSize);
- EXPECT_NE(32768, pageSize);
+ EXPECT_TRUE(32768 != pageSize);
dbs->db_->set_page_size(32768);
dbs->IncreasePageSizeTo32K();
pageSize = 0;
diff --git a/sync/syncable/directory_change_delegate.h b/sync/syncable/directory_change_delegate.h
index b406f5f..fb76450 100644
--- a/sync/syncable/directory_change_delegate.h
+++ b/sync/syncable/directory_change_delegate.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
#define SYNC_SYNCABLE_DIRECTORY_CHANGE_DELEGATE_H_
-#include <vector>
-
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/write_transaction_info.h"
@@ -24,7 +22,7 @@ namespace syncable {
// (HandleTransactionCompleteChangeEvent).
//
// Note that these methods may be called on *any* thread.
-class SYNC_EXPORT DirectoryChangeDelegate {
+class SYNC_EXPORT_PRIVATE DirectoryChangeDelegate {
public:
// Returns the handles of changed entries in |entry_changed|.
virtual void HandleCalculateChangesChangeEventFromSyncApi(
diff --git a/sync/syncable/entry_kernel.h b/sync/syncable/entry_kernel.h
index be606d1..0257f2f 100644
--- a/sync/syncable/entry_kernel.h
+++ b/sync/syncable/entry_kernel.h
@@ -5,10 +5,7 @@
#ifndef SYNC_SYNCABLE_ENTRY_KERNEL_H_
#define SYNC_SYNCABLE_ENTRY_KERNEL_H_
-#include <algorithm>
-#include <map>
#include <set>
-#include <string>
#include "base/time/time.h"
#include "base/values.h"
@@ -196,7 +193,7 @@ enum {
BIT_TEMPS_COUNT = BIT_TEMPS_END - BIT_TEMPS_BEGIN
};
-struct SYNC_EXPORT EntryKernel {
+struct SYNC_EXPORT_PRIVATE EntryKernel {
private:
typedef syncer::ProtoValuePtr<sync_pb::EntitySpecifics> EntitySpecificsPtr;
typedef syncer::ProtoValuePtr<sync_pb::AttachmentMetadata>
@@ -419,4 +416,4 @@ std::ostream& operator<<(std::ostream& os, const EntryKernel& entry_kernel);
} // namespace syncable
} // namespace syncer
-#endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_
+#endif // SYNC_SYNCABLE_ENTRY_KERNEL_H_
diff --git a/sync/syncable/in_memory_directory_backing_store.h b/sync/syncable/in_memory_directory_backing_store.h
index b482b95..ff85870 100644
--- a/sync/syncable/in_memory_directory_backing_store.h
+++ b/sync/syncable/in_memory_directory_backing_store.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
#define SYNC_SYNCABLE_IN_MEMORY_DIRECTORY_BACKING_STORE_H_
-#include <string>
-
#include "sync/syncable/directory_backing_store.h"
#include "sync/base/sync_export.h"
@@ -22,7 +20,8 @@ namespace syncable {
// When an InMemoryDirectoryBackingStore is destroyed, all data stored in this
// database is lost. If these limitations are a problem for you, consider using
// TestDirectoryBackingStore.
-class SYNC_EXPORT InMemoryDirectoryBackingStore : public DirectoryBackingStore {
+class SYNC_EXPORT_PRIVATE InMemoryDirectoryBackingStore
+ : public DirectoryBackingStore {
public:
explicit InMemoryDirectoryBackingStore(const std::string& dir_name);
DirOpenResult Load(Directory::MetahandlesMap* handles_map,
diff --git a/sync/syncable/invalid_directory_backing_store.h b/sync/syncable/invalid_directory_backing_store.h
index 272e664..2a6d065 100644
--- a/sync/syncable/invalid_directory_backing_store.h
+++ b/sync/syncable/invalid_directory_backing_store.h
@@ -12,7 +12,8 @@ namespace syncer {
namespace syncable {
// A class used to test scenarios where loading a directory fails.
-class SYNC_EXPORT InvalidDirectoryBackingStore : public DirectoryBackingStore {
+class SYNC_EXPORT_PRIVATE InvalidDirectoryBackingStore
+ : public DirectoryBackingStore {
public:
InvalidDirectoryBackingStore();
~InvalidDirectoryBackingStore() override;
diff --git a/sync/syncable/model_neutral_mutable_entry.h b/sync/syncable/model_neutral_mutable_entry.h
index 8f25f23..76f5c63 100644
--- a/sync/syncable/model_neutral_mutable_entry.h
+++ b/sync/syncable/model_neutral_mutable_entry.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
#define SYNC_SYNCABLE_MODEL_NEUTRAL_MUTABLE_ENTRY_H_
-#include <string>
-
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/entry.h"
@@ -29,7 +27,7 @@ enum CreateNewTypeRoot { CREATE_NEW_TYPE_ROOT };
// to be communicated to the model (and the model's thread). It is not possible
// to change an entry's SPECIFICS or UNIQUE_POSITION fields with this kind of
// entry.
-class SYNC_EXPORT ModelNeutralMutableEntry : public Entry {
+class SYNC_EXPORT_PRIVATE ModelNeutralMutableEntry : public Entry {
public:
ModelNeutralMutableEntry(BaseWriteTransaction* trans,
CreateNewUpdateItem,
diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h
index efffa12..f26842e 100644
--- a/sync/syncable/mutable_entry.h
+++ b/sync/syncable/mutable_entry.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_MUTABLE_ENTRY_H_
#define SYNC_SYNCABLE_MUTABLE_ENTRY_H_
-#include <string>
-
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
#include "sync/syncable/entry.h"
@@ -26,7 +24,7 @@ class WriteTransaction;
// A mutable meta entry. Changes get committed to the database when the
// WriteTransaction is destroyed.
-class SYNC_EXPORT MutableEntry : public ModelNeutralMutableEntry {
+class SYNC_EXPORT_PRIVATE MutableEntry : public ModelNeutralMutableEntry {
void Init(WriteTransaction* trans, ModelType model_type,
const Id& parent_id, const std::string& name);
diff --git a/sync/syncable/nigori_handler.h b/sync/syncable/nigori_handler.h
index b337daf..d39ddf9 100644
--- a/sync/syncable/nigori_handler.h
+++ b/sync/syncable/nigori_handler.h
@@ -5,13 +5,11 @@
#ifndef SYNC_SYNCABLE_NIGORI_HANDLER_H_
#define SYNC_SYNCABLE_NIGORI_HANDLER_H_
-#include <string>
-
#include "sync/base/sync_export.h"
#include "sync/internal_api/public/base/model_type.h"
-namespace google {
-namespace protobuf {
+namespace google{
+namespace protobuf{
template <typename T>
class RepeatedPtrField;
}
@@ -29,7 +27,7 @@ class BaseTransaction;
// Sync internal interface for dealing with nigori node and querying
// the current set of encrypted types. Not thread safe, so a sync transaction
// must be held by a caller whenever invoking methods.
-class SYNC_EXPORT NigoriHandler {
+class SYNC_EXPORT_PRIVATE NigoriHandler {
public:
NigoriHandler();
virtual ~NigoriHandler();
diff --git a/sync/syncable/nigori_util.h b/sync/syncable/nigori_util.h
index c7e0a9d..7f57a72 100644
--- a/sync/syncable/nigori_util.h
+++ b/sync/syncable/nigori_util.h
@@ -34,7 +34,7 @@ class WriteTransaction;
// false if some unsynced changes need to be encrypted.
// This method is similar to ProcessUnsyncedChangesForEncryption but does not
// modify the data and does not care if data is unnecessarily encrypted.
-SYNC_EXPORT bool VerifyUnsyncedChangesAreEncrypted(
+SYNC_EXPORT_PRIVATE bool VerifyUnsyncedChangesAreEncrypted(
BaseTransaction* const trans,
ModelTypeSet encrypted_types);
@@ -50,15 +50,15 @@ bool EntryNeedsEncryption(ModelTypeSet encrypted_types,
const Entry& entry);
// Same as EntryNeedsEncryption, but looks at specifics.
-SYNC_EXPORT bool SpecificsNeedsEncryption(
+SYNC_EXPORT_PRIVATE bool SpecificsNeedsEncryption(
ModelTypeSet encrypted_types,
const sync_pb::EntitySpecifics& specifics);
// Verifies all data of type |type| is encrypted appropriately.
-SYNC_EXPORT bool VerifyDataTypeEncryptionForTest(BaseTransaction* const trans,
- ModelType type,
- bool is_encrypted)
- WARN_UNUSED_RESULT;
+SYNC_EXPORT_PRIVATE bool VerifyDataTypeEncryptionForTest(
+ BaseTransaction* const trans,
+ ModelType type,
+ bool is_encrypted) WARN_UNUSED_RESULT;
// Stores |new_specifics| into |entry|, encrypting if necessary.
// Returns false if an error encrypting occurred (does not modify |entry|).
@@ -70,7 +70,7 @@ bool UpdateEntryWithEncryption(
// Updates |nigori| to match the encryption state specified by |encrypted_types|
// and |encrypt_everything|.
-SYNC_EXPORT void UpdateNigoriFromEncryptedTypes(
+SYNC_EXPORT_PRIVATE void UpdateNigoriFromEncryptedTypes(
ModelTypeSet encrypted_types,
bool encrypt_everything,
sync_pb::NigoriSpecifics* nigori);
diff --git a/sync/syncable/on_disk_directory_backing_store.h b/sync/syncable/on_disk_directory_backing_store.h
index b24c584..05f4156 100644
--- a/sync/syncable/on_disk_directory_backing_store.h
+++ b/sync/syncable/on_disk_directory_backing_store.h
@@ -5,8 +5,6 @@
#ifndef SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
#define SYNC_SYNCABLE_ON_DISK_DIRECTORY_BACKING_STORE_H_
-#include <string>
-
#include "base/files/file_path.h"
#include "sync/base/sync_export.h"
#include "sync/syncable/directory_backing_store.h"
@@ -16,7 +14,8 @@ namespace syncable {
// This is the concrete class that provides a useful implementation of
// DirectoryBackingStore.
-class SYNC_EXPORT OnDiskDirectoryBackingStore : public DirectoryBackingStore {
+class SYNC_EXPORT_PRIVATE OnDiskDirectoryBackingStore
+ : public DirectoryBackingStore {
public:
OnDiskDirectoryBackingStore(const std::string& dir_name,
const base::FilePath& backing_file_path);
diff --git a/sync/syncable/parent_child_index.h b/sync/syncable/parent_child_index.h
index eb973f6..6a3145e 100644
--- a/sync/syncable/parent_child_index.h
+++ b/sync/syncable/parent_child_index.h
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
-#define SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
+#ifndef SYNC_SYNCABLE_PARENT_CHILD_INDEX
+#define SYNC_SYNCABLE_PARENT_CHILD_INDEX
#include <map>
#include <set>
-#include <vector>
#include "base/basictypes.h"
#include "base/memory/scoped_vector.h"
@@ -22,7 +21,7 @@ struct EntryKernel;
class ParentChildIndex;
// A node ordering function.
-struct SYNC_EXPORT ChildComparator {
+struct SYNC_EXPORT_PRIVATE ChildComparator {
bool operator() (const EntryKernel* a, const EntryKernel* b) const;
};
@@ -31,7 +30,7 @@ typedef std::set<EntryKernel*, ChildComparator> OrderedChildSet;
// Container that tracks parent-child relationships.
// Provides fast lookup of all items under a given parent.
-class SYNC_EXPORT ParentChildIndex {
+class SYNC_EXPORT_PRIVATE ParentChildIndex {
public:
ParentChildIndex();
~ParentChildIndex();
@@ -101,4 +100,4 @@ class SYNC_EXPORT ParentChildIndex {
} // namespace syncable
} // namespace syncer
-#endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_
+#endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX
diff --git a/sync/syncable/syncable_delete_journal.h b/sync/syncable/syncable_delete_journal.h
index b475850..a4bf9ce 100644
--- a/sync/syncable/syncable_delete_journal.h
+++ b/sync/syncable/syncable_delete_journal.h
@@ -26,7 +26,7 @@ typedef std::set<const EntryKernel*, LessField<IdField, ID> > JournalIndex;
// DeleteJournal is thread-safe and can be accessed on any thread. Has to hold
// a valid transaction object when calling methods of DeleteJournal, thus each
// method requires a non-null |trans| parameter.
-class SYNC_EXPORT DeleteJournal {
+class SYNC_EXPORT_PRIVATE DeleteJournal {
public:
FRIEND_TEST_ALL_PREFIXES(SyncableDirectoryTest, ManageDeleteJournals);
diff --git a/sync/syncable/syncable_enum_conversions.h b/sync/syncable/syncable_enum_conversions.h
index 2d85cdd..0ae53ad 100644
--- a/sync/syncable/syncable_enum_conversions.h
+++ b/sync/syncable/syncable_enum_conversions.h
@@ -19,35 +19,35 @@ namespace syncable {
// The returned strings (which don't have to be freed) are in ASCII.
// The result of passing in an invalid enum value is undefined.
-SYNC_EXPORT const char* GetMetahandleFieldString(
+SYNC_EXPORT_PRIVATE const char* GetMetahandleFieldString(
MetahandleField metahandle_field);
-SYNC_EXPORT const char* GetBaseVersionString(BaseVersion base_version);
+SYNC_EXPORT_PRIVATE const char* GetBaseVersionString(BaseVersion base_version);
-SYNC_EXPORT const char* GetInt64FieldString(Int64Field int64_field);
+SYNC_EXPORT_PRIVATE const char* GetInt64FieldString(Int64Field int64_field);
-SYNC_EXPORT const char* GetTimeFieldString(TimeField time_field);
+SYNC_EXPORT_PRIVATE const char* GetTimeFieldString(TimeField time_field);
-SYNC_EXPORT const char* GetIdFieldString(IdField id_field);
+SYNC_EXPORT_PRIVATE const char* GetIdFieldString(IdField id_field);
-SYNC_EXPORT const char* GetIndexedBitFieldString(
+SYNC_EXPORT_PRIVATE const char* GetIndexedBitFieldString(
IndexedBitField indexed_bit_field);
-SYNC_EXPORT const char* GetIsDelFieldString(IsDelField is_del_field);
+SYNC_EXPORT_PRIVATE const char* GetIsDelFieldString(IsDelField is_del_field);
-SYNC_EXPORT const char* GetBitFieldString(BitField bit_field);
+SYNC_EXPORT_PRIVATE const char* GetBitFieldString(BitField bit_field);
-SYNC_EXPORT const char* GetStringFieldString(StringField string_field);
+SYNC_EXPORT_PRIVATE const char* GetStringFieldString(StringField string_field);
-SYNC_EXPORT const char* GetProtoFieldString(ProtoField proto_field);
+SYNC_EXPORT_PRIVATE const char* GetProtoFieldString(ProtoField proto_field);
-SYNC_EXPORT const char* GetUniquePositionFieldString(
+SYNC_EXPORT_PRIVATE const char* GetUniquePositionFieldString(
UniquePositionField position_field);
-SYNC_EXPORT const char* GetAttachmentMetadataFieldString(
+SYNC_EXPORT_PRIVATE const char* GetAttachmentMetadataFieldString(
AttachmentMetadataField attachment_metadata_field);
-SYNC_EXPORT const char* GetBitTempString(BitTemp bit_temp);
+SYNC_EXPORT_PRIVATE const char* GetBitTempString(BitTemp bit_temp);
} // namespace syncable
} // namespace syncer
diff --git a/sync/syncable/syncable_id.h b/sync/syncable/syncable_id.h
index b2c0edf..e9f937a 100644
--- a/sync/syncable/syncable_id.h
+++ b/sync/syncable/syncable_id.h
@@ -27,7 +27,7 @@ namespace syncable {
struct EntryKernel;
class Id;
-SYNC_EXPORT std::ostream& operator<<(std::ostream& out, const Id& id);
+SYNC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out, const Id& id);
// For historical reasons, 3 concepts got everloaded into the Id:
// 1. A unique, opaque identifier for the object.
@@ -110,7 +110,8 @@ class SYNC_EXPORT Id {
int* total_created_entries);
friend void BindFields(const EntryKernel& entry,
sql::Statement* statement);
- SYNC_EXPORT friend std::ostream& operator<<(std::ostream& out, const Id& id);
+ SYNC_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& out,
+ const Id& id);
friend class SyncableIdTest;
std::string s_;
diff --git a/sync/syncable/syncable_model_neutral_write_transaction.h b/sync/syncable/syncable_model_neutral_write_transaction.h
index f51e802..3caa10e 100644
--- a/sync/syncable/syncable_model_neutral_write_transaction.h
+++ b/sync/syncable/syncable_model_neutral_write_transaction.h
@@ -21,7 +21,8 @@ namespace syncable {
// good job of tracking and reporting on changes to the entries modified within
// its scope. This is because its changes do not need to be reported to the
// DirectoryChangeDelegate.
-class SYNC_EXPORT ModelNeutralWriteTransaction : public BaseWriteTransaction {
+class SYNC_EXPORT_PRIVATE ModelNeutralWriteTransaction
+ : public BaseWriteTransaction {
public:
ModelNeutralWriteTransaction(
const tracked_objects::Location& location,
diff --git a/sync/syncable/syncable_proto_util.h b/sync/syncable/syncable_proto_util.h
index c09ef6f..305fc4c 100644
--- a/sync/syncable/syncable_proto_util.h
+++ b/sync/syncable/syncable_proto_util.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_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
-#define SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
+#ifndef SYNCABLE_PROTOCOL_PROTO_UTIL_H_
+#define SYNCABLE_PROTOCOL_PROTO_UTIL_H_
#include <string>
@@ -22,7 +22,8 @@ syncable::Id SyncableIdFromProto(const std::string& proto_string);
// Converts from a syncable::Id to a formatted std::string. This is useful for
// populating the fields of a protobuf which will be sent to the server.
-SYNC_EXPORT std::string SyncableIdToProto(const syncable::Id& syncable_id);
+SYNC_EXPORT_PRIVATE std::string SyncableIdToProto(
+ const syncable::Id& syncable_id);
// Helper function to determine if this SyncEntity's properties indicate that it
// is a folder.
@@ -34,4 +35,4 @@ bool IsRoot(const sync_pb::SyncEntity& entity);
} // namespace syncer
-#endif // SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_
+#endif // SYNCABLE_PROTOCOL_PROTO_UTIL_H_
diff --git a/sync/syncable/syncable_util.h b/sync/syncable/syncable_util.h
index 7792579..be903fd 100644
--- a/sync/syncable/syncable_util.h
+++ b/sync/syncable/syncable_util.h
@@ -24,30 +24,31 @@ class BaseWriteTransaction;
class ModelNeutralMutableEntry;
class Id;
-SYNC_EXPORT void ChangeEntryIDAndUpdateChildren(BaseWriteTransaction* trans,
- ModelNeutralMutableEntry* entry,
- const Id& new_id);
+SYNC_EXPORT_PRIVATE void ChangeEntryIDAndUpdateChildren(
+ BaseWriteTransaction* trans,
+ ModelNeutralMutableEntry* entry,
+ const Id& new_id);
-SYNC_EXPORT bool IsLegalNewParent(BaseTransaction* trans,
- const Id& id,
- const Id& parentid);
+SYNC_EXPORT_PRIVATE bool IsLegalNewParent(BaseTransaction* trans,
+ const Id& id,
+ const Id& parentid);
bool SyncAssert(bool condition,
const tracked_objects::Location& location,
const char* msg,
BaseTransaction* trans);
-SYNC_EXPORT int GetUnsyncedEntries(BaseTransaction* trans,
- std::vector<int64>* handles);
+SYNC_EXPORT_PRIVATE int GetUnsyncedEntries(BaseTransaction* trans,
+ std::vector<int64> *handles);
// Generates a fixed-length tag for the given string under the given model_type.
-SYNC_EXPORT std::string GenerateSyncableHash(ModelType model_type,
- const std::string& client_tag);
+SYNC_EXPORT_PRIVATE std::string GenerateSyncableHash(
+ ModelType model_type, const std::string& client_tag);
// A helper for generating the bookmark type's tag. This is required in more
// than one place, so we define the algorithm here to make sure the
// implementation is consistent.
-SYNC_EXPORT std::string GenerateSyncableBookmarkHash(
+SYNC_EXPORT_PRIVATE std::string GenerateSyncableBookmarkHash(
const std::string& originator_cache_guid,
const std::string& originator_client_item_id);
diff --git a/sync/syncable/transaction_observer.h b/sync/syncable/transaction_observer.h
index 64d7329..183fd85 100644
--- a/sync/syncable/transaction_observer.h
+++ b/sync/syncable/transaction_observer.h
@@ -12,7 +12,7 @@
namespace syncer {
namespace syncable {
-class SYNC_EXPORT TransactionObserver {
+class SYNC_EXPORT_PRIVATE TransactionObserver {
public:
virtual void OnTransactionWrite(
const ImmutableWriteTransactionInfo& write_transaction_info,
diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h
index 2366409..6dbe70ef 100644
--- a/sync/util/cryptographer.h
+++ b/sync/util/cryptographer.h
@@ -23,7 +23,7 @@ namespace syncer {
class Encryptor;
-SYNC_EXPORT extern const char kNigoriTag[];
+SYNC_EXPORT_PRIVATE extern const char kNigoriTag[];
// The parameters used to initialize a Nigori instance.
struct KeyParams {
diff --git a/sync/util/get_session_name.h b/sync/util/get_session_name.h
index 4f56634..7ac34ad 100644
--- a/sync/util/get_session_name.h
+++ b/sync/util/get_session_name.h
@@ -22,7 +22,7 @@ SYNC_EXPORT void GetSessionName(
const scoped_refptr<base::TaskRunner>& task_runner,
const base::Callback<void(const std::string&)>& done_callback);
-SYNC_EXPORT std::string GetSessionNameSynchronouslyForTesting();
+SYNC_EXPORT_PRIVATE std::string GetSessionNameSynchronouslyForTesting();
} // namespace syncer
diff --git a/sync/util/time.h b/sync/util/time.h
index f9b0cbc..f28a6f0 100644
--- a/sync/util/time.h
+++ b/sync/util/time.h
@@ -20,7 +20,7 @@ namespace syncer {
SYNC_EXPORT int64 TimeToProtoTime(const base::Time& t);
// Converts a time field from sync protobufs to a time object.
-SYNC_EXPORT base::Time ProtoTimeToTime(int64 proto_t);
+SYNC_EXPORT_PRIVATE base::Time ProtoTimeToTime(int64 proto_t);
SYNC_EXPORT std::string GetTimeDebugString(const base::Time& t);