diff options
author | skym <skym@chromium.org> | 2015-12-07 14:20:43 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-07 22:21:29 +0000 |
commit | 1621aa930169650b0c4c371e743f3be58a70abae (patch) | |
tree | 48a2f45aa4f4dedbb8d783c75eb0b57506c1d3d7 /sync | |
parent | 7d1fe34ef189666e5b828cc8b1b11c5516da902d (diff) | |
download | chromium_src-1621aa930169650b0c4c371e743f3be58a70abae.zip chromium_src-1621aa930169650b0c4c371e743f3be58a70abae.tar.gz chromium_src-1621aa930169650b0c4c371e743f3be58a70abae.tar.bz2 |
[Sync] Removing SYNC_EXPORT_PRIVATE macro and fixing lint violations on
all touched files.
BUG=554242,567301
Review URL: https://codereview.chromium.org/1509563002
Cr-Commit-Position: refs/heads/master@{#363603}
Diffstat (limited to 'sync')
108 files changed, 401 insertions, 404 deletions
diff --git a/sync/api/attachments/attachment_store.h b/sync/api/attachments/attachment_store.h index 14fd0fc..5ddac1e 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_PRIVATE AttachmentStoreForSync : public AttachmentStore { +class SYNC_EXPORT AttachmentStoreForSync : public AttachmentStore { public: ~AttachmentStoreForSync(); diff --git a/sync/base/sync_export.h b/sync/base/sync_export.h index 83c65a6..6d86b54 100644 --- a/sync/base/sync_export.h +++ b/sync/base/sync_export.h @@ -2,39 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_SYNC_EXPORT_H_ -#define SYNC_SYNC_EXPORT_H_ +#ifndef SYNC_BASE_SYNC_EXPORT_H_ +#define SYNC_BASE_SYNC_EXPORT_H_ #if defined(COMPONENT_BUILD) #if defined(WIN32) #if defined(SYNC_IMPLEMENTATION) #define SYNC_EXPORT __declspec(dllexport) -#define SYNC_EXPORT_PRIVATE __declspec(dllexport) -#elif defined(SYNC_TEST) +#else // defined(SYNC_IMPLEMENTATION) #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"))) -#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default"))) -#elif defined(SYNC_TEST) -#define SYNC_EXPORT -#define SYNC_EXPORT_PRIVATE __attribute__((visibility("default"))) -#else +#else // defined(SYNC_IMPLEMENTATION) #define SYNC_EXPORT -#define SYNC_EXPORT_PRIVATE #endif // defined(SYNC_IMPLEMENTATION) -#endif +#endif // defined(WIN32) #else // defined(COMPONENT_BUILD) #define SYNC_EXPORT -#define SYNC_EXPORT_PRIVATE -#endif +#endif // defined(COMPONENT_BUILD) -#endif // SYNC_SYNC_EXPORT_H_ +#endif // SYNC_BASE_SYNC_EXPORT_H_ diff --git a/sync/engine/apply_control_data_updates.h b/sync/engine/apply_control_data_updates.h index b825665e..a6b589d5 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_PRIVATE void ApplyControlDataUpdates(syncable::Directory* dir); +SYNC_EXPORT 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 892e6e8..7863e2b 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_PRIVATE BackoffDelayProvider { +class SYNC_EXPORT 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 20b6784..0ac1fa8 100644 --- a/sync/engine/clear_server_data.h +++ b/sync/engine/clear_server_data.h @@ -5,6 +5,8 @@ #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" @@ -20,7 +22,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_PRIVATE ClearServerData { +class SYNC_EXPORT ClearServerData { public: explicit ClearServerData(const std::string& account_name); ~ClearServerData(); diff --git a/sync/engine/commit.h b/sync/engine/commit.h index 871229f6..3baee67 100644 --- a/sync/engine/commit.h +++ b/sync/engine/commit.h @@ -6,6 +6,7 @@ #define SYNC_ENGINE_COMMIT_H_ #include <map> +#include <string> #include "base/macros.h" #include "base/memory/scoped_ptr.h" @@ -36,7 +37,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_PRIVATE Commit { +class SYNC_EXPORT 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 e2e9108..fa440f8 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_PRIVATE CommitContribution { +class SYNC_EXPORT CommitContribution { public: CommitContribution(); virtual ~CommitContribution() = 0; diff --git a/sync/engine/commit_contributor.h b/sync/engine/commit_contributor.h index 5e9d156..8b89a12 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_PRIVATE CommitContributor { +class SYNC_EXPORT CommitContributor { public: CommitContributor(); virtual ~CommitContributor() = 0; @@ -34,6 +34,6 @@ class SYNC_EXPORT_PRIVATE CommitContributor { size_t max_entries) = 0; }; -} // namespace +} // namespace syncer #endif // SYNC_ENGINE_COMMIT_CONTRIBUTOR_H_ diff --git a/sync/engine/commit_processor.h b/sync/engine/commit_processor.h index 70e0e99..67ebe56 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_PRIVATE CommitProcessor { +class SYNC_EXPORT 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 59219d4..a535506 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_PRIVATE CommitQueue { +class SYNC_EXPORT CommitQueue { public: CommitQueue(); virtual ~CommitQueue(); @@ -19,6 +19,6 @@ class SYNC_EXPORT_PRIVATE CommitQueue { virtual void EnqueueForCommit(const CommitRequestDataList& list) = 0; }; -} // namespace syncer +} // namespace syncer_v2 #endif // SYNC_ENGINE_COMMIT_QUEUE_H_ diff --git a/sync/engine/commit_util.h b/sync/engine/commit_util.h index 387bdcf..d6a1b49 100644 --- a/sync/engine/commit_util.h +++ b/sync/engine/commit_util.h @@ -2,8 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_ENGINE_BUILD_COMMIT_UTIL_H_ -#define SYNC_ENGINE_BUILD_COMMIT_UTIL_H_ +#ifndef SYNC_ENGINE_COMMIT_UTIL_H_ +#define SYNC_ENGINE_COMMIT_UTIL_H_ + +#include <set> #include "sync/base/sync_export.h" #include "sync/internal_api/public/base/model_type.h" @@ -27,21 +29,20 @@ class BaseWriteTransaction; namespace commit_util { // Adds bookmark extensions activity report to |message|. -SYNC_EXPORT_PRIVATE void AddExtensionsActivityToMessage( +SYNC_EXPORT void AddExtensionsActivityToMessage( ExtensionsActivity* activity, ExtensionsActivity::Records* extensions_activity_buffer, sync_pb::CommitMessage* message); // Fills the config_params field of |message|. -SYNC_EXPORT_PRIVATE void AddClientConfigParamsToMessage( +SYNC_EXPORT 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_PRIVATE void BuildCommitItem( - const syncable::Entry& meta_entry, - sync_pb::SyncEntity* sync_entry); +SYNC_EXPORT 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|. @@ -49,7 +50,7 @@ SYNC_EXPORT_PRIVATE void BuildCommitItem( // 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_PRIVATE +SYNC_EXPORT sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse( syncable::BaseWriteTransaction* trans, const sync_pb::CommitResponse_EntryResponse& server_entry, @@ -61,4 +62,4 @@ sync_pb::CommitResponse::ResponseType ProcessSingleCommitResponse( } // namespace syncer -#endif // SYNC_ENGINE_BUILD_COMMIT_UTIL_H_ +#endif // SYNC_ENGINE_COMMIT_UTIL_H_ diff --git a/sync/engine/directory_commit_contribution.h b/sync/engine/directory_commit_contribution.h index d8d6aa9..dabb7d9 100644 --- a/sync/engine/directory_commit_contribution.h +++ b/sync/engine/directory_commit_contribution.h @@ -33,8 +33,7 @@ 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_PRIVATE DirectoryCommitContribution - : public CommitContribution { +class SYNC_EXPORT 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 df94f34..442ac54 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_PRIVATE DirectoryUpdateHandler : public UpdateHandler { +class SYNC_EXPORT 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 ddbdb89..4258ca7 100644 --- a/sync/engine/get_commit_ids.h +++ b/sync/engine/get_commit_ids.h @@ -28,11 +28,10 @@ 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_PRIVATE void GetCommitIdsForType( - syncable::BaseTransaction* trans, - ModelType type, - size_t max_entries, - std::vector<int64>* out); +SYNC_EXPORT 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 32d7432..9b8e09d 100644 --- a/sync/engine/get_updates_delegate.h +++ b/sync/engine/get_updates_delegate.h @@ -5,6 +5,7 @@ #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" @@ -19,7 +20,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_PRIVATE GetUpdatesDelegate { +class SYNC_EXPORT GetUpdatesDelegate { public: GetUpdatesDelegate(); virtual ~GetUpdatesDelegate() = 0; @@ -40,9 +41,10 @@ class SYNC_EXPORT_PRIVATE GetUpdatesDelegate { }; // Functionality specific to the normal GetUpdate request. -class SYNC_EXPORT_PRIVATE NormalGetUpdatesDelegate : public GetUpdatesDelegate { +class SYNC_EXPORT NormalGetUpdatesDelegate : public GetUpdatesDelegate { public: - NormalGetUpdatesDelegate(const sessions::NudgeTracker& nudge_tracker); + explicit NormalGetUpdatesDelegate( + const sessions::NudgeTracker& nudge_tracker); ~NormalGetUpdatesDelegate() override; // Uses the member NudgeTracker to populate some fields of this GU message. @@ -59,14 +61,13 @@ class SYNC_EXPORT_PRIVATE NormalGetUpdatesDelegate : public GetUpdatesDelegate { const sync_pb::ClientToServerMessage& request) const override; private: - DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesDelegate); - const sessions::NudgeTracker& nudge_tracker_; + + DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesDelegate); }; // Functionality specific to the configure GetUpdate request. -class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesDelegate - : public GetUpdatesDelegate { +class SYNC_EXPORT ConfigureGetUpdatesDelegate : public GetUpdatesDelegate { public: ConfigureGetUpdatesDelegate( sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source); @@ -89,16 +90,16 @@ class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesDelegate 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_PRIVATE PollGetUpdatesDelegate : public GetUpdatesDelegate { +class SYNC_EXPORT PollGetUpdatesDelegate : public GetUpdatesDelegate { public: PollGetUpdatesDelegate(); ~PollGetUpdatesDelegate() override; diff --git a/sync/engine/get_updates_processor.h b/sync/engine/get_updates_processor.h index 934c3f1..02e4482 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_PRIVATE GetUpdatesProcessor { +class SYNC_EXPORT 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 6514290..ed0f00e 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_PRIVATE HttpResponse { +struct SYNC_EXPORT HttpResponse { enum ServerConnectionCode { // For uninitialized state. NONE, @@ -99,7 +99,7 @@ struct ServerConnectionEvent { connection_code(code) {} }; -class SYNC_EXPORT_PRIVATE ServerConnectionEventListener { +class SYNC_EXPORT ServerConnectionEventListener { public: virtual void OnServerConnectionEvent(const ServerConnectionEvent& event) = 0; protected: @@ -110,8 +110,7 @@ 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_PRIVATE ScopedServerStatusWatcher - : public base::NonThreadSafe { +class SYNC_EXPORT ScopedServerStatusWatcher : public base::NonThreadSafe { public: ScopedServerStatusWatcher(ServerConnectionManager* conn_mgr, HttpResponse* response); @@ -125,7 +124,7 @@ class SYNC_EXPORT_PRIVATE ScopedServerStatusWatcher // Use this class to interact with the sync server. // The ServerConnectionManager currently supports POSTing protocol buffers. // -class SYNC_EXPORT_PRIVATE ServerConnectionManager : public CancelationObserver { +class SYNC_EXPORT 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 f5d18ea..405accb 100644 --- a/sync/engine/nudge_handler.h +++ b/sync/engine/nudge_handler.h @@ -11,7 +11,7 @@ namespace syncer { -class SYNC_EXPORT_PRIVATE NudgeHandler { +class SYNC_EXPORT NudgeHandler { public: NudgeHandler(); virtual ~NudgeHandler(); diff --git a/sync/engine/sync_cycle_event.h b/sync/engine/sync_cycle_event.h index 0f1a04d..4fd549a 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_PRIVATE SyncCycleEvent { +struct SYNC_EXPORT 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 d5678a9..01a614a 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_PRIVATE SyncEngineEventListener { +class SYNC_EXPORT SyncEngineEventListener { public: SyncEngineEventListener(); diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h index 4e5e694..0aa9133 100644 --- a/sync/engine/sync_scheduler.h +++ b/sync/engine/sync_scheduler.h @@ -24,7 +24,7 @@ namespace syncer { struct ServerConnectionEvent; -struct SYNC_EXPORT_PRIVATE ConfigurationParams { +struct SYNC_EXPORT ConfigurationParams { ConfigurationParams(); ConfigurationParams( const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source, @@ -46,16 +46,15 @@ struct SYNC_EXPORT_PRIVATE ConfigurationParams { base::Closure retry_task; }; -struct SYNC_EXPORT_PRIVATE ClearParams { - ClearParams(const base::Closure& report_success_task); +struct SYNC_EXPORT ClearParams { + explicit ClearParams(const base::Closure& report_success_task); ~ClearParams(); // Callback to invoke on successful completion. base::Closure report_success_task; }; -class SYNC_EXPORT_PRIVATE SyncScheduler - : public sessions::SyncSession::Delegate { +class SYNC_EXPORT 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 4e5fb17..acfad93 100644 --- a/sync/engine/sync_scheduler_impl.h +++ b/sync/engine/sync_scheduler_impl.h @@ -37,9 +37,8 @@ namespace sessions { struct ModelNeutralState; } -class SYNC_EXPORT_PRIVATE SyncSchedulerImpl - : public SyncScheduler, - public base::NonThreadSafe { +class SYNC_EXPORT SyncSchedulerImpl : public SyncScheduler, + public base::NonThreadSafe { public: // |name| is a display string to identify the syncer thread. Takes // |ownership of |syncer| and |delay_provider|. @@ -121,7 +120,7 @@ class SYNC_EXPORT_PRIVATE SyncSchedulerImpl FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, FailedRetry); FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, ReceiveNewRetryDelay); - struct SYNC_EXPORT_PRIVATE WaitInterval { + struct SYNC_EXPORT 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 7b77d07..9285967 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_PRIVATE Syncer { +class SYNC_EXPORT Syncer { public: typedef std::vector<int64> UnsyncedMetaHandles; - Syncer(CancelationSignal* cancelation_signal); + explicit 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 ae59cdf..76082c7 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_PRIVATE ModelTypeSet GetTypesToMigrate( - const sync_pb::ClientToServerResponse& response); +SYNC_EXPORT ModelTypeSet +GetTypesToMigrate(const sync_pb::ClientToServerResponse& response); // Builds a SyncProtocolError from the data in |error|. -SYNC_EXPORT_PRIVATE SyncProtocolError ConvertErrorPBToSyncProtocolError( +SYNC_EXPORT SyncProtocolError ConvertErrorPBToSyncProtocolError( const sync_pb::ClientToServerResponse_Error& error); -class SYNC_EXPORT_PRIVATE SyncerProtoUtil { +class SYNC_EXPORT 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 9148398..9b84bae 100644 --- a/sync/engine/syncer_util.h +++ b/sync/engine/syncer_util.h @@ -59,17 +59,16 @@ UpdateAttemptResponse AttemptToUpdateEntry( // // Will return an invalid position if no valid position can be constructed, or // if this type does not support positioning. -SYNC_EXPORT_PRIVATE UniquePosition GetUpdatePosition( - const sync_pb::SyncEntity& update, - const std::string& suffix); +SYNC_EXPORT 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_PRIVATE std::string GetUniqueBookmarkTagFromUpdate( +SYNC_EXPORT std::string GetUniqueBookmarkTagFromUpdate( const sync_pb::SyncEntity& update); // Pass in name to avoid redundant UTF8 conversion. -SYNC_EXPORT_PRIVATE void UpdateServerFieldsFromUpdate( +SYNC_EXPORT 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 e4c9abc..4ed4cb1 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_PRIVATE UpdateHandler { +class SYNC_EXPORT 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 ac1a4b2..2c2fe08 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_PRIVATE:" + cc_generator_options = "dllexport_decl=SYNC_EXPORT:" 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 166b6c2..952eedc 100644 --- a/sync/internal_api/debug_info_event_listener.h +++ b/sync/internal_api/debug_info_event_listener.h @@ -7,6 +7,7 @@ #include <deque> #include <string> +#include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" @@ -31,7 +32,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_PRIVATE DebugInfoEventListener +class SYNC_EXPORT 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 41bd9fab..e274c55 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_PRIVATE JsMutationEventObserver +class SYNC_EXPORT 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 9211514..89ff9d0 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_PRIVATE JsSyncEncryptionHandlerObserver +class SYNC_EXPORT 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 58df73d..4fa9e10 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_PRIVATE JsSyncManagerObserver : public SyncManager::Observer { +class SYNC_EXPORT 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 8d82210..88efb41 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_PRIVATE ProtocolEventBuffer { +class SYNC_EXPORT 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 3f94e25..798d851 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_PRIVATE ActivationContext { +struct SYNC_EXPORT 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 1feca7c..d13fc5d 100644 --- a/sync/internal_api/public/attachments/attachment_downloader_impl.h +++ b/sync/internal_api/public/attachments/attachment_downloader_impl.h @@ -5,6 +5,9 @@ #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" @@ -97,9 +100,8 @@ 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_PRIVATE static bool ExtractCrc32c( - const net::HttpResponseHeaders* headers, - uint32_t* crc32c); + SYNC_EXPORT 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 c0e503e..e0def04 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_PRIVATE uint32_t +SYNC_EXPORT 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 9af3a986..bd2a346 100644 --- a/sync/internal_api/public/base/attachment_id_proto.h +++ b/sync/internal_api/public/base/attachment_id_proto.h @@ -18,16 +18,15 @@ 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_PRIVATE sync_pb::AttachmentIdProto CreateAttachmentIdProto( - size_t size, - uint32_t crc32c); +SYNC_EXPORT 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_PRIVATE sync_pb::AttachmentMetadata CreateAttachmentMetadata( +SYNC_EXPORT 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 a074b62..6a84b7a 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_PRIVATE CancelationSignal { +class SYNC_EXPORT 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 5d353fd..30b15bb 100644 --- a/sync/internal_api/public/base/model_type.h +++ b/sync/internal_api/public/base/model_type.h @@ -181,8 +181,7 @@ 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_PRIVATE ModelType GetModelType( - const sync_pb::SyncEntity& sync_entity); +SYNC_EXPORT 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; @@ -206,7 +205,7 @@ SYNC_EXPORT bool IsUserSelectableType(ModelType model_type); SYNC_EXPORT ModelTypeNameMap GetUserSelectableTypeNameMap(); // This is the subset of UserTypes() that can be encrypted. -SYNC_EXPORT_PRIVATE ModelTypeSet EncryptableUserTypes(); +SYNC_EXPORT 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. @@ -262,8 +261,7 @@ SYNC_EXPORT ModelTypeSet PriorityCoreTypes(); // } // model_types.Put(model_type); // } -SYNC_EXPORT_PRIVATE ModelType GetModelTypeFromSpecificsFieldNumber( - int field_number); +SYNC_EXPORT ModelType GetModelTypeFromSpecificsFieldNumber(int field_number); // Return the field number of the EntitySpecifics field associated with // a model type. @@ -286,10 +284,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_PRIVATE base::StringValue* ModelTypeToValue(ModelType model_type); +SYNC_EXPORT base::StringValue* ModelTypeToValue(ModelType model_type); // Converts a Value into a ModelType - complement to ModelTypeToValue(). -SYNC_EXPORT_PRIVATE ModelType ModelTypeFromValue(const base::Value& value); +SYNC_EXPORT 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 60c32d1..e9a70c4 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_PRIVATE NodeOrdinal Int64ToNodeOrdinal(int64_t x); +SYNC_EXPORT 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_PRIVATE int64 NodeOrdinalToInt64(const NodeOrdinal& ordinal); +SYNC_EXPORT 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 cf022e2..29cc1de 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_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ -#define SYNC_INTERNAL_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ +#ifndef SYNC_INTERNAL_API_PUBLIC_BASE_PROGRESS_MARKER_MAP_H_ +#define SYNC_INTERNAL_API_PUBLIC_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_PRIVATE scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ProgressMarkerMapToValue( const ProgressMarkerMap& marker_map); } // namespace syncer -#endif // SYNC_INTERNAL_PUBLIC_API_BASE_PROGRESS_MARKER_MAP_H_ +#endif // SYNC_INTERNAL_API_PUBLIC_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 64dd905..d425f9a 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_PRIVATE UniquePosition { +class SYNC_EXPORT UniquePosition { public: static const size_t kSuffixLength; static const size_t kCompressBytesThreshold; @@ -141,6 +141,6 @@ class SYNC_EXPORT_PRIVATE 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 9f51737..34e1a7d 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_PUBLIC_API_CHANGE_RECORD_H_ -#define SYNC_INTERNAL_PUBLIC_API_CHANGE_RECORD_H_ +#ifndef SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_ +#define SYNC_INTERNAL_API_PUBLIC_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_PRIVATE ChangeRecord { +struct SYNC_EXPORT 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 e2d04c2..bd78249 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 +} // namespace base namespace syncer { @@ -149,8 +149,8 @@ class SYNC_EXPORT ModelSafeWorker typedef std::map<ModelType, ModelSafeGroup> ModelSafeRoutingInfo; // Caller takes ownership of return value. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -ModelSafeRoutingInfoToValue(const ModelSafeRoutingInfo& routing_info); +SYNC_EXPORT 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 8f4f100..4e93f17 100644 --- a/sync/internal_api/public/engine/polling_constants.h +++ b/sync/internal_api/public/engine/polling_constants.h @@ -11,14 +11,13 @@ namespace syncer { -SYNC_EXPORT_PRIVATE extern const int64 kDefaultShortPollIntervalSeconds; -SYNC_EXPORT_PRIVATE extern const int64 kDefaultLongPollIntervalSeconds; +SYNC_EXPORT extern const int64 kDefaultShortPollIntervalSeconds; +SYNC_EXPORT extern const int64 kDefaultLongPollIntervalSeconds; SYNC_EXPORT extern const int64 kMaxBackoffSeconds; SYNC_EXPORT extern const int kBackoffRandomizationFactor; -SYNC_EXPORT_PRIVATE extern const int kInitialBackoffRetrySeconds; -SYNC_EXPORT_PRIVATE extern const int kInitialBackoffShortRetrySeconds; -SYNC_EXPORT_PRIVATE extern const int kInitialBackoffImmediateRetrySeconds; - +SYNC_EXPORT extern const int kInitialBackoffRetrySeconds; +SYNC_EXPORT extern const int kInitialBackoffShortRetrySeconds; +SYNC_EXPORT 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 3478b4f..8a1fd77 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,8 +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_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H -#define SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H +#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> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -15,7 +17,7 @@ namespace syncer { // An event representing a ClearServerData request message sent to the server. -class SYNC_EXPORT_PRIVATE ClearServerDataRequestEvent : public ProtocolEvent { +class SYNC_EXPORT ClearServerDataRequestEvent : public ProtocolEvent { public: ClearServerDataRequestEvent(base::Time timestamp, const sync_pb::ClientToServerMessage& request); @@ -38,4 +40,4 @@ class SYNC_EXPORT_PRIVATE ClearServerDataRequestEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_REQUEST_EVENT_H +#endif // SYNC_INTERNAL_API_PUBLIC_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 db169ea..9882d02 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,8 +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_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ -#define SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ +#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> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -16,7 +18,7 @@ namespace syncer { // An event representing a ClearServerData response event from the server. -class SYNC_EXPORT_PRIVATE ClearServerDataResponseEvent : public ProtocolEvent { +class SYNC_EXPORT ClearServerDataResponseEvent : public ProtocolEvent { public: ClearServerDataResponseEvent(base::Time timestamp, SyncerError result, @@ -41,4 +43,4 @@ class SYNC_EXPORT_PRIVATE ClearServerDataResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_CLEAR_SERVER_DATA_RESPONSE_EVENT_H_ +#endif // SYNC_INTERNAL_API_PUBLIC_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 23f3cd8..1bf60d3 100644 --- a/sync/internal_api/public/events/commit_request_event.h +++ b/sync/internal_api/public/events/commit_request_event.h @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_H -#define SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_H +#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_REQUEST_EVENT_H_ +#define SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_REQUEST_EVENT_H_ #include <cstddef> +#include <string> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -18,7 +19,7 @@ namespace syncer { // An event representing a commit request message sent to the server. -class SYNC_EXPORT_PRIVATE CommitRequestEvent : public ProtocolEvent { +class SYNC_EXPORT CommitRequestEvent : public ProtocolEvent { public: CommitRequestEvent( base::Time timestamp, @@ -47,4 +48,4 @@ class SYNC_EXPORT_PRIVATE CommitRequestEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_COMMIT_REQUEST_EVENT_H +#endif // SYNC_INTERNAL_API_PUBLIC_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 4de8283..caf18d9 100644 --- a/sync/internal_api/public/events/commit_response_event.h +++ b/sync/internal_api/public/events/commit_response_event.h @@ -2,10 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_H_ -#define SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#define SYNC_INTERNAL_API_PUBLIC_EVENTS_COMMIT_RESPONSE_EVENT_H_ #include <cstddef> +#include <string> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -18,7 +19,7 @@ namespace syncer { // An event representing a commit response event from the server. -class SYNC_EXPORT_PRIVATE CommitResponseEvent : public ProtocolEvent { +class SYNC_EXPORT CommitResponseEvent : public ProtocolEvent { public: CommitResponseEvent( base::Time timestamp, @@ -45,4 +46,4 @@ class SYNC_EXPORT_PRIVATE CommitResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_COMMIT_RESPONSE_EVENT_H_ +#endif // SYNC_INTERNAL_API_PUBLIC_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 984f3e8..37d9037 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,8 +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_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_H -#define SYNC_INTERNAL_API_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_H +#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> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -15,8 +17,7 @@ namespace syncer { // An event representing a configure GetUpdates request to the server. -class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesRequestEvent - : public ProtocolEvent { +class SYNC_EXPORT ConfigureGetUpdatesRequestEvent : public ProtocolEvent { public: ConfigureGetUpdatesRequestEvent( base::Time timestamp, @@ -40,4 +41,4 @@ class SYNC_EXPORT_PRIVATE ConfigureGetUpdatesRequestEvent } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_H +#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_CONFIGURE_GET_UPDATES_REQUEST_EVENT_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 3c76c9a..6ec8674 100644 --- a/sync/internal_api/public/events/get_updates_response_event.h +++ b/sync/internal_api/public/events/get_updates_response_event.h @@ -2,8 +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_EVENTS_GET_UPDATES_RESPONSE_EVENT_H -#define SYNC_INTERNAL_API_EVENTS_GET_UPDATES_RESPONSE_EVENT_H +#ifndef SYNC_INTERNAL_API_PUBLIC_EVENTS_GET_UPDATES_RESPONSE_EVENT_H_ +#define SYNC_INTERNAL_API_PUBLIC_EVENTS_GET_UPDATES_RESPONSE_EVENT_H_ + +#include <string> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -19,7 +21,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_PRIVATE GetUpdatesResponseEvent : public ProtocolEvent { +class SYNC_EXPORT GetUpdatesResponseEvent : public ProtocolEvent { public: GetUpdatesResponseEvent( base::Time timestamp, @@ -44,4 +46,4 @@ class SYNC_EXPORT_PRIVATE GetUpdatesResponseEvent : public ProtocolEvent { } // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_GET_UPDATES_RESPONSE_EVENT_H +#endif // SYNC_INTERNAL_API_PUBLIC_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 5765dec..9df2bd4 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,8 +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_EVENTS_NORMAL_GET_UPDATES_REQUEST_H -#define SYNC_INTERNAL_API_EVENTS_NORMAL_GET_UPDATES_REQUEST_H +#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> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -20,7 +22,7 @@ class NudgeTracker; } // namespace sessions // An event representing a 'normal mode' GetUpdate request to the server. -class SYNC_EXPORT_PRIVATE NormalGetUpdatesRequestEvent : public ProtocolEvent { +class SYNC_EXPORT NormalGetUpdatesRequestEvent : public ProtocolEvent { public: NormalGetUpdatesRequestEvent( base::Time timestamp, @@ -56,6 +58,6 @@ class SYNC_EXPORT_PRIVATE NormalGetUpdatesRequestEvent : public ProtocolEvent { DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesRequestEvent); }; -} +} // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_NORMAL_GET_UPDATES_REQUEST_H +#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_NORMAL_GET_UPDATES_REQUEST_EVENT_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 3db5247..9d71af7 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,8 +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_EVENTS_POLL_GET_UPDATES_REQUEST_H -#define SYNC_INTERNAL_API_EVENTS_POLL_GET_UPDATES_REQUEST_H +#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> #include "base/memory/scoped_ptr.h" #include "base/time/time.h" @@ -20,7 +22,7 @@ class NudgeTracker; } // namespace sessions // An event representing a poll request sent to the server. -class SYNC_EXPORT_PRIVATE PollGetUpdatesRequestEvent : public ProtocolEvent { +class SYNC_EXPORT PollGetUpdatesRequestEvent : public ProtocolEvent { public: PollGetUpdatesRequestEvent( base::Time timestamp, @@ -40,6 +42,6 @@ class SYNC_EXPORT_PRIVATE PollGetUpdatesRequestEvent : public ProtocolEvent { DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesRequestEvent); }; -} +} // namespace syncer -#endif // SYNC_INTERNAL_API_EVENTS_POLL_GET_UPDATES_REQUEST_H +#endif // SYNC_INTERNAL_API_PUBLIC_EVENTS_POLL_GET_UPDATES_REQUEST_EVENT_H_ diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h index bf6ab11..2c25b5b 100644 --- a/sync/internal_api/public/http_bridge.h +++ b/sync/internal_api/public/http_bridge.h @@ -46,10 +46,9 @@ 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_PRIVATE HttpBridge - : public base::RefCountedThreadSafe<HttpBridge>, - public HttpPostProviderInterface, - public net::URLFetcherDelegate { +class SYNC_EXPORT 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 7e7ba3c..f3aefd7 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_PRIVATE HttpPostProviderInterface { +class SYNC_EXPORT 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 42401da..3d0a074 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_PRIVATE ModelTypeEntity { +class SYNC_EXPORT 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 c4ac343..121055f 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_PRIVATE ModelTypeProcessor { +class SYNC_EXPORT 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 47ff50d..6e72839 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_PRIVATE ModelTypeStoreBackend : public base::NonThreadSafe { +class SYNC_EXPORT 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 894e6f8..5fdcac3 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_PRIVATE DataTypeState { +struct SYNC_EXPORT DataTypeState { DataTypeState(); ~DataTypeState(); @@ -43,7 +43,7 @@ struct SYNC_EXPORT_PRIVATE DataTypeState { bool initial_sync_done = false; }; -struct SYNC_EXPORT_PRIVATE CommitRequestData { +struct SYNC_EXPORT CommitRequestData { CommitRequestData(); ~CommitRequestData(); @@ -56,7 +56,7 @@ struct SYNC_EXPORT_PRIVATE CommitRequestData { int64 base_version = 0; }; -struct SYNC_EXPORT_PRIVATE CommitResponseData { +struct SYNC_EXPORT CommitResponseData { CommitResponseData(); ~CommitResponseData(); @@ -66,7 +66,7 @@ struct SYNC_EXPORT_PRIVATE CommitResponseData { int64 response_version = 0; }; -struct SYNC_EXPORT_PRIVATE UpdateResponseData { +struct SYNC_EXPORT UpdateResponseData { UpdateResponseData(); ~UpdateResponseData(); diff --git a/sync/internal_api/public/sessions/commit_counters.h b/sync/internal_api/public/sessions/commit_counters.h index a069eb1..b8375c2 100644 --- a/sync/internal_api/public/sessions/commit_counters.h +++ b/sync/internal_api/public/sessions/commit_counters.h @@ -5,6 +5,8 @@ #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" @@ -12,7 +14,7 @@ namespace syncer { // A class to maintain counts related to sync commit requests and responses. -struct SYNC_EXPORT_PRIVATE CommitCounters { +struct SYNC_EXPORT CommitCounters { CommitCounters(); ~CommitCounters(); diff --git a/sync/internal_api/public/sessions/status_counters.h b/sync/internal_api/public/sessions/status_counters.h index c74f9a9..7c12133 100644 --- a/sync/internal_api/public/sessions/status_counters.h +++ b/sync/internal_api/public/sessions/status_counters.h @@ -5,6 +5,8 @@ #ifndef SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_ #define SYNC_INTERNAL_API_PUBLIC_SESSIONS_STATUS_COUNTERS_H_ +#include <string> + #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "sync/base/sync_export.h" @@ -12,7 +14,7 @@ namespace syncer { // A class to maintain counts related to the current status of a sync type. -struct SYNC_EXPORT_PRIVATE StatusCounters { +struct SYNC_EXPORT StatusCounters { StatusCounters(); ~StatusCounters(); diff --git a/sync/internal_api/public/sessions/update_counters.h b/sync/internal_api/public/sessions/update_counters.h index 506d341..7ce8b5e 100644 --- a/sync/internal_api/public/sessions/update_counters.h +++ b/sync/internal_api/public/sessions/update_counters.h @@ -5,6 +5,8 @@ #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" @@ -13,7 +15,7 @@ namespace syncer { // A class to maintain counts related to the update requests and responses for // a particular sync type. -struct SYNC_EXPORT_PRIVATE UpdateCounters { +struct SYNC_EXPORT 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 00e914a..88adbcc 100644 --- a/sync/internal_api/public/shared_model_type_processor.h +++ b/sync/internal_api/public/shared_model_type_processor.h @@ -27,10 +27,9 @@ 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_PRIVATE SharedModelTypeProcessor - : public ModelTypeProcessor, - public ModelTypeChangeProcessor, - base::NonThreadSafe { +class SYNC_EXPORT 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 5481460..0d522f9 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_PRIVATE SyncContext { +class SYNC_EXPORT 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 de6de25..f2eff7e 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_PRIVATE SyncContextProxy { +class SYNC_EXPORT SyncContextProxy { public: SyncContextProxy(); virtual ~SyncContextProxy(); @@ -35,6 +35,6 @@ class SYNC_EXPORT_PRIVATE SyncContextProxy { virtual scoped_ptr<SyncContextProxy> Clone() const = 0; }; -} // namespace syncer +} // namespace syncer_v2 #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 fc057b8..1ae8ba4 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_PRIVATE ChangeObserver { + class SYNC_EXPORT 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 d5dad53..eee6182 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_PRIVATE UserShare { +struct SYNC_EXPORT UserShare { UserShare(); ~UserShare(); diff --git a/sync/internal_api/sync_backup_manager.h b/sync/internal_api/sync_backup_manager.h index a8f5b8a..0e0227e 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_PRIVATE SyncBackupManager : public SyncRollbackManagerBase { +class SYNC_EXPORT 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 2dc9923..bde38e4 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_PRIVATE SyncContextProxyImpl : public SyncContextProxy { +class SYNC_EXPORT SyncContextProxyImpl : public SyncContextProxy { public: SyncContextProxyImpl( const scoped_refptr<base::SequencedTaskRunner>& sync_task_runner, @@ -49,6 +49,6 @@ class SYNC_EXPORT_PRIVATE SyncContextProxyImpl : public SyncContextProxy { base::WeakPtr<SyncContext> sync_context_; }; -} // namespace syncer +} // namespace syncer_v2 #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 1335ed6..babc942 100644 --- a/sync/internal_api/sync_encryption_handler_impl.h +++ b/sync/internal_api/sync_encryption_handler_impl.h @@ -6,6 +6,7 @@ #define SYNC_INTERNAL_API_SYNC_ENCRYPTION_HANDLER_IMPL_H_ #include <string> +#include <vector> #include "base/compiler_specific.h" #include "base/gtest_prod_util.h" @@ -42,9 +43,8 @@ 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_PRIVATE SyncEncryptionHandlerImpl - : public SyncEncryptionHandler, - public syncable::NigoriHandler { +class SYNC_EXPORT 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_PRIVATE SyncEncryptionHandlerImpl } // namespace syncer -#endif // SYNC_INTERNAL_API_PUBLIC_SYNC_ENCRYPTION_HANDLER_IMPL_H_ +#endif // SYNC_INTERNAL_API_SYNC_ENCRYPTION_HANDLER_IMPL_H_ diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h index b3da76f..18c66df 100644 --- a/sync/internal_api/sync_manager_impl.h +++ b/sync/internal_api/sync_manager_impl.h @@ -5,6 +5,7 @@ #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_ #define SYNC_INTERNAL_API_SYNC_MANAGER_IMPL_H_ +#include <map> #include <string> #include <vector> @@ -56,7 +57,7 @@ class SyncSessionContext; // // Unless stated otherwise, all methods of SyncManager should be called on the // same thread. -class SYNC_EXPORT_PRIVATE SyncManagerImpl +class SYNC_EXPORT 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 70580e5..86c5085 100644 --- a/sync/internal_api/sync_rollback_manager.h +++ b/sync/internal_api/sync_rollback_manager.h @@ -5,6 +5,7 @@ #ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_H_ +#include <map> #include <string> #include <vector> @@ -16,7 +17,7 @@ namespace syncer { // SyncRollbackManager restores user's data to pre-sync state using backup // DB created by SyncBackupManager. -class SYNC_EXPORT_PRIVATE SyncRollbackManager : public SyncRollbackManagerBase { +class SYNC_EXPORT 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 638b2f0..8518ea5 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_PRIVATE SyncRollbackManagerBase : - public SyncManager, - public syncable::DirectoryChangeDelegate, - public syncable::TransactionObserver { +class SYNC_EXPORT 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 d016aa9..103fac0 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_PRIVATE SyncAPIServerConnectionManager +class SYNC_EXPORT SyncAPIServerConnectionManager : public ServerConnectionManager { public: // Takes ownership of factory. diff --git a/sync/js/js_backend.h b/sync/js/js_backend.h index a0ef317..8bb11e0 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_PRIVATE JsBackend { +class SYNC_EXPORT 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 e19fe6b..c379d01 100644 --- a/sync/protocol/proto_enum_conversions.h +++ b/sync/protocol/proto_enum_conversions.h @@ -22,20 +22,19 @@ 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_PRIVATE const char* GetAppListItemTypeString( +SYNC_EXPORT const char* GetAppListItemTypeString( sync_pb::AppListSpecifics::AppListItemType item_type); -SYNC_EXPORT_PRIVATE const char* GetBrowserTypeString( +SYNC_EXPORT const char* GetBrowserTypeString( sync_pb::SessionWindow::BrowserType browser_type); -SYNC_EXPORT_PRIVATE const char* GetPageTransitionString( +SYNC_EXPORT const char* GetPageTransitionString( sync_pb::SyncEnums::PageTransition page_transition); -SYNC_EXPORT_PRIVATE const char* GetPageTransitionRedirectTypeString( - sync_pb::SyncEnums::PageTransitionRedirectType - redirect_type); +SYNC_EXPORT const char* GetPageTransitionRedirectTypeString( + sync_pb::SyncEnums::PageTransitionRedirectType redirect_type); -SYNC_EXPORT_PRIVATE const char* GetWifiCredentialSecurityClassString( +SYNC_EXPORT const char* GetWifiCredentialSecurityClassString( sync_pb::WifiCredentialSpecifics::SecurityClass security_class); SYNC_EXPORT const char* GetUpdatesSourceString( @@ -44,28 +43,27 @@ SYNC_EXPORT const char* GetUpdatesSourceString( SYNC_EXPORT const char* GetUpdatesOriginString( sync_pb::SyncEnums::GetUpdatesOrigin origin); -SYNC_EXPORT_PRIVATE const char* GetResponseTypeString( +SYNC_EXPORT const char* GetResponseTypeString( sync_pb::CommitResponse::ResponseType response_type); -SYNC_EXPORT_PRIVATE const char* GetErrorTypeString( +SYNC_EXPORT const char* GetErrorTypeString( sync_pb::SyncEnums::ErrorType error_type); -SYNC_EXPORT_PRIVATE const char* GetActionString( - sync_pb::SyncEnums::Action action); +SYNC_EXPORT const char* GetActionString(sync_pb::SyncEnums::Action action); -SYNC_EXPORT_PRIVATE const char* GetLaunchTypeString( +SYNC_EXPORT const char* GetLaunchTypeString( sync_pb::AppSpecifics::LaunchType launch_type); -SYNC_EXPORT_PRIVATE const char* GetWalletInfoTypeString( +SYNC_EXPORT const char* GetWalletInfoTypeString( sync_pb::AutofillWalletSpecifics::WalletInfoType wallet_info_type); -SYNC_EXPORT_PRIVATE const char* GetWalletMetadataTypeString( +SYNC_EXPORT const char* GetWalletMetadataTypeString( sync_pb::WalletMetadataSpecifics::Type wallet_metadata_type); -SYNC_EXPORT_PRIVATE const char* GetWalletCardStatusString( +SYNC_EXPORT const char* GetWalletCardStatusString( sync_pb::WalletMaskedCreditCard::WalletCardStatus wallet_card_status); -SYNC_EXPORT_PRIVATE const char* GetWalletCardTypeString( +SYNC_EXPORT 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 9ba4563..7a831bd 100644 --- a/sync/protocol/proto_value_conversions.h +++ b/sync/protocol/proto_value_conversions.h @@ -95,41 +95,40 @@ namespace syncer { // caller. // TODO(akalin): Perhaps extend this to decrypt? -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> EncryptedDataToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> EncryptedDataToValue( const sync_pb::EncryptedData& encrypted_data); // Sub-protocol of AppListSpecifics. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppListSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppListSpecificsToValue( const sync_pb::AppListSpecifics& proto); // Sub-protocols of AppSpecifics. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppSettingsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppSettingsToValue( const sync_pb::AppNotificationSettings& app_notification_settings); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> LinkedAppIconInfoToValue( const sync_pb::LinkedAppIconInfo& linked_app_icon_info); // Sub-protocols of SessionSpecifics. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionHeaderToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionHeaderToValue( const sync_pb::SessionHeader& session_header); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionTabToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionTabToValue( const sync_pb::SessionTab& session_tab); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionWindowToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionWindowToValue( const sync_pb::SessionWindow& session_window); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> TabNavigationToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> TabNavigationToValue( const sync_pb::TabNavigation& tab_navigation); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> NavigationRedirectToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> NavigationRedirectToValue( const sync_pb::NavigationRedirect& navigation_redirect); // Sub-protocol of PasswordSpecifics. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -PasswordSpecificsDataToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> PasswordSpecificsDataToValue( const sync_pb::PasswordSpecificsData& password_specifics_data); // Sub-protocol of NigoriSpecifics. @@ -150,69 +149,61 @@ scoped_ptr<base::DictionaryValue> TimeRangeDirectiveToValue( scoped_ptr<base::DictionaryValue> KeystoreEncryptionToValue( const sync_pb::KeystoreEncryptionFlagsSpecifics& proto); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SessionSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SessionSpecificsToValue( const sync_pb::SessionSpecifics& session_specifics); // Main *SpecificsToValue functions. -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AppNotificationToValue( +SYNC_EXPORT 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_PRIVATE scoped_ptr<base::DictionaryValue> AppSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AppSpecificsToValue( const sync_pb::AppSpecifics& app_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ArticleSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ArticleSpecificsToValue( const sync_pb::ArticleSpecifics& article_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AutofillSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillSpecificsToValue( const sync_pb::AutofillSpecifics& autofill_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -AutofillProfileSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillProfileSpecificsToValue( const sync_pb::AutofillProfileSpecifics& autofill_profile_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -WalletMetadataSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletMetadataSpecificsToValue( const sync_pb::WalletMetadataSpecifics& wallet_metadata_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -AutofillWalletSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( const sync_pb::AutofillWalletSpecifics& autofill_wallet_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> BookmarkSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> BookmarkSpecificsToValue( const sync_pb::BookmarkSpecifics& bookmark_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -DeviceInfoSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> DeviceInfoSpecificsToValue( const sync_pb::DeviceInfoSpecifics& device_info_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -DictionarySpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> DictionarySpecificsToValue( const sync_pb::DictionarySpecifics& dictionary_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -ExperimentsSpecificsToValue(const sync_pb::ExperimentsSpecifics& proto); +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExperimentsSpecificsToValue( + const sync_pb::ExperimentsSpecifics& proto); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> PriorityPreferenceSpecificsToValue( const sync_pb::PriorityPreferenceSpecifics& proto); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -ExtensionSettingSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExtensionSettingSpecificsToValue( const sync_pb::ExtensionSettingSpecifics& extension_setting_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ExtensionSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ExtensionSpecificsToValue( const sync_pb::ExtensionSpecifics& extension_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -FaviconImageSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> FaviconImageSpecificsToValue( const sync_pb::FaviconImageSpecifics& favicon_image_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -FaviconTrackingSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> FaviconTrackingSpecificsToValue( const sync_pb::FaviconTrackingSpecifics& favicon_tracking_specifics); SYNC_EXPORT scoped_ptr<base::DictionaryValue> @@ -220,84 +211,78 @@ HistoryDeleteDirectiveSpecificsToValue( const sync_pb::HistoryDeleteDirectiveSpecifics& history_delete_directive_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ManagedUserSettingSpecificsToValue( const sync_pb::ManagedUserSettingSpecifics& managed_user_setting_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -ManagedUserSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ManagedUserSpecificsToValue( const sync_pb::ManagedUserSpecifics& managed_user_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ManagedUserSharedSettingSpecificsToValue( const sync_pb::ManagedUserSharedSettingSpecifics& managed_user_shared_setting_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ManagedUserWhitelistSpecificsToValue( const sync_pb::ManagedUserWhitelistSpecifics& managed_user_whitelist_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> MediaToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> MediaToValue( const sync_pb::Media& media); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> NigoriSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> NigoriSpecificsToValue( const sync_pb::NigoriSpecifics& nigori_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> PasswordSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> PasswordSpecificsToValue( const sync_pb::PasswordSpecifics& password_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -PreferenceSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> PreferenceSpecificsToValue( const sync_pb::PreferenceSpecifics& password_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SyncedNotificationAppInfoSpecificsToValue( const sync_pb::SyncedNotificationAppInfoSpecifics& synced_notification_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SyncedNotificationSpecificsToValue( const sync_pb::SyncedNotificationSpecifics& synced_notification_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -SearchEngineSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SearchEngineSpecificsToValue( const sync_pb::SearchEngineSpecifics& search_engine_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> ThemeSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ThemeSpecificsToValue( const sync_pb::ThemeSpecifics& theme_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> TypedUrlSpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> TypedUrlSpecificsToValue( const sync_pb::TypedUrlSpecifics& typed_url_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -WalletMaskedCreditCardToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletMaskedCreditCardToValue( const sync_pb::WalletMaskedCreditCard& wallet_masked_card); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -WalletPostalAddressToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> WalletPostalAddressToValue( const sync_pb::WalletPostalAddress& wallet_postal_address); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -WifiCredentialSpecificsToValue( +SYNC_EXPORT 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_PRIVATE scoped_ptr<base::DictionaryValue> EntitySpecificsToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> EntitySpecificsToValue( const sync_pb::EntitySpecifics& specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> SyncEntityToValue( +SYNC_EXPORT scoped_ptr<base::DictionaryValue> SyncEntityToValue( const sync_pb::SyncEntity& entity, 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> ClientToServerMessageToValue( + const sync_pb::ClientToServerMessage& proto, + bool include_specifics); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> -ClientToServerResponseToValue(const sync_pb::ClientToServerResponse& proto, - bool include_specifics); +SYNC_EXPORT scoped_ptr<base::DictionaryValue> ClientToServerResponseToValue( + const sync_pb::ClientToServerResponse& proto, + bool include_specifics); scoped_ptr<base::DictionaryValue> DatatypeAssociationStatsToValue( const sync_pb::DatatypeAssociationStats& proto); @@ -314,7 +299,7 @@ scoped_ptr<base::DictionaryValue> SyncCycleCompletedEventInfoToValue( scoped_ptr<base::DictionaryValue> ClientConfigParamsToValue( const sync_pb::ClientConfigParams& proto); -SYNC_EXPORT_PRIVATE scoped_ptr<base::DictionaryValue> AttachmentIdProtoToValue( +SYNC_EXPORT 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 7efe0cb..43c9349 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_PRIVATE DebugInfoGetter { +class SYNC_EXPORT 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 254e3f9..aa55e3b 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_PRIVATE DirectoryTypeDebugInfoEmitter { +class SYNC_EXPORT DirectoryTypeDebugInfoEmitter { public: // Standard constructor for non-tests. // diff --git a/sync/sessions/model_type_registry.h b/sync/sessions/model_type_registry.h index 6ac0c7c..c79173e 100644 --- a/sync/sessions/model_type_registry.h +++ b/sync/sessions/model_type_registry.h @@ -2,10 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ -#define SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ +#ifndef SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_ +#define SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_ #include <map> +#include <string> +#include <vector> #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" @@ -44,9 +46,8 @@ typedef std::map<ModelType, DirectoryTypeDebugInfoEmitter*> DirectoryTypeDebugInfoEmitterMap; // Keeps track of the sets of active update handlers and commit contributors. -class SYNC_EXPORT_PRIVATE ModelTypeRegistry - : public syncer_v2::SyncContext, - public SyncEncryptionHandler::Observer { +class SYNC_EXPORT ModelTypeRegistry : public syncer_v2::SyncContext, + public SyncEncryptionHandler::Observer { public: // Constructs a ModelTypeRegistry that supports directory types. ModelTypeRegistry(const std::vector<scoped_refptr<ModelSafeWorker> >& workers, @@ -162,4 +163,4 @@ class SYNC_EXPORT_PRIVATE ModelTypeRegistry } // namespace syncer -#endif // SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ +#endif // SYNC_SESSIONS_MODEL_TYPE_REGISTRY_H_ diff --git a/sync/sessions/nudge_tracker.h b/sync/sessions/nudge_tracker.h index f4c1e42..eb74d06 100644 --- a/sync/sessions/nudge_tracker.h +++ b/sync/sessions/nudge_tracker.h @@ -25,7 +25,7 @@ class ObjectIdInvalidationMap; namespace sessions { -class SYNC_EXPORT_PRIVATE NudgeTracker { +class SYNC_EXPORT NudgeTracker { public: static size_t kDefaultMaxPayloadsPerType; diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h index b6f1003..144228b 100644 --- a/sync/sessions/status_controller.h +++ b/sync/sessions/status_controller.h @@ -30,9 +30,9 @@ namespace syncer { namespace sessions { -class SYNC_EXPORT_PRIVATE StatusController { +class SYNC_EXPORT StatusController { public: - explicit StatusController(); + StatusController(); ~StatusController(); // ClientToServer messages. diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h index fd20132..e96b640 100644 --- a/sync/sessions/sync_session.h +++ b/sync/sessions/sync_session.h @@ -36,12 +36,12 @@ namespace sessions { class NudgeTracker; -class SYNC_EXPORT_PRIVATE SyncSession { +class SYNC_EXPORT 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_PRIVATE Delegate { + class SYNC_EXPORT 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 afce0a8..058244c 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -16,6 +16,7 @@ #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" @@ -38,7 +39,7 @@ static const int kDefaultMaxCommitBatchSize = 25; namespace sessions { class TestScopedSessionEventListener; -class SYNC_EXPORT_PRIVATE SyncSessionContext { +class SYNC_EXPORT SyncSessionContext { public: SyncSessionContext( ServerConnectionManager* connection_manager, diff --git a/sync/sync.gyp b/sync/sync.gyp index e9f991d..3e9629a 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_PRIVATE:', + 'cc_generator_options': 'dllexport_decl=SYNC_EXPORT:', '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 388e1f9..7656809 100644 --- a/sync/syncable/deferred_on_disk_directory_backing_store.h +++ b/sync/syncable/deferred_on_disk_directory_backing_store.h @@ -5,6 +5,8 @@ #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" @@ -17,7 +19,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_PRIVATE DeferredOnDiskDirectoryBackingStore +class SYNC_EXPORT DeferredOnDiskDirectoryBackingStore : public OnDiskDirectoryBackingStore { public: DeferredOnDiskDirectoryBackingStore(const std::string& dir_name, diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h index 7402697..ab01a27 100644 --- a/sync/syncable/directory.h +++ b/sync/syncable/directory.h @@ -44,9 +44,10 @@ 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. @@ -58,6 +59,7 @@ 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. // @@ -86,7 +88,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_PRIVATE PersistedKernelInfo { + struct SYNC_EXPORT PersistedKernelInfo { PersistedKernelInfo(); ~PersistedKernelInfo(); @@ -131,7 +133,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_PRIVATE SaveChangesSnapshot { + struct SYNC_EXPORT SaveChangesSnapshot { SaveChangesSnapshot(); ~SaveChangesSnapshot(); @@ -372,8 +374,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*); - syncable::Id GetSuccessorId(EntryKernel*); + syncable::Id GetPredecessorId(EntryKernel* e); + syncable::Id GetSuccessorId(EntryKernel* e); // Places |e| as a successor to |predecessor|. If |predecessor| is NULL, // |e| will be placed as the left-most item in its folder. @@ -664,4 +666,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 422d13d..0c0dc84 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_PRIVATE extern const int32 kCurrentDBVersion; +SYNC_EXPORT 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_PRIVATE DirectoryBackingStore : public base::NonThreadSafe { +class SYNC_EXPORT 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 24a2014..a5f81f4 100644 --- a/sync/syncable/directory_backing_store_unittest.cc +++ b/sync/syncable/directory_backing_store_unittest.cc @@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "testing/gtest/include/gtest/gtest.h" +#include "sync/syncable/directory_backing_store.h" +#include <map> #include <string> #include "base/files/file_path.h" @@ -23,13 +24,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 { @@ -52,7 +53,7 @@ scoped_ptr<EntryKernel> CreateEntry(int id, const std::string &id_suffix) { } // namespace -SYNC_EXPORT_PRIVATE extern const int32 kCurrentDBVersion; +SYNC_EXPORT extern const int32 kCurrentDBVersion; class MigrationTest : public testing::TestWithParam<int> { public: @@ -754,8 +755,7 @@ 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,8 +862,7 @@ 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()); } @@ -1276,8 +1275,7 @@ 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()); } @@ -1382,8 +1380,7 @@ 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()); } @@ -1479,8 +1476,7 @@ 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()); } @@ -1570,8 +1566,7 @@ 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()); } @@ -1665,8 +1660,7 @@ 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()); } @@ -1760,8 +1754,7 @@ 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()); } @@ -1856,8 +1849,7 @@ 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()); } @@ -1886,7 +1878,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 @@ -3995,7 +3987,7 @@ TEST_F(DirectoryBackingStoreTest, IncreaseDatabasePageSizeFrom4KTo32K) { // Check if update is successful. int pageSize = 0; dbs->GetDatabasePageSize(&pageSize); - EXPECT_TRUE(32768 != pageSize); + EXPECT_NE(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 fb76450..b406f5f 100644 --- a/sync/syncable/directory_change_delegate.h +++ b/sync/syncable/directory_change_delegate.h @@ -5,6 +5,8 @@ #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" @@ -22,7 +24,7 @@ namespace syncable { // (HandleTransactionCompleteChangeEvent). // // Note that these methods may be called on *any* thread. -class SYNC_EXPORT_PRIVATE DirectoryChangeDelegate { +class SYNC_EXPORT 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 0257f2f..be606d1 100644 --- a/sync/syncable/entry_kernel.h +++ b/sync/syncable/entry_kernel.h @@ -5,7 +5,10 @@ #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" @@ -193,7 +196,7 @@ enum { BIT_TEMPS_COUNT = BIT_TEMPS_END - BIT_TEMPS_BEGIN }; -struct SYNC_EXPORT_PRIVATE EntryKernel { +struct SYNC_EXPORT EntryKernel { private: typedef syncer::ProtoValuePtr<sync_pb::EntitySpecifics> EntitySpecificsPtr; typedef syncer::ProtoValuePtr<sync_pb::AttachmentMetadata> @@ -416,4 +419,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 ff85870..b482b95 100644 --- a/sync/syncable/in_memory_directory_backing_store.h +++ b/sync/syncable/in_memory_directory_backing_store.h @@ -5,6 +5,8 @@ #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" @@ -20,8 +22,7 @@ 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_PRIVATE InMemoryDirectoryBackingStore - : public DirectoryBackingStore { +class SYNC_EXPORT 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 2a6d065..272e664 100644 --- a/sync/syncable/invalid_directory_backing_store.h +++ b/sync/syncable/invalid_directory_backing_store.h @@ -12,8 +12,7 @@ namespace syncer { namespace syncable { // A class used to test scenarios where loading a directory fails. -class SYNC_EXPORT_PRIVATE InvalidDirectoryBackingStore - : public DirectoryBackingStore { +class SYNC_EXPORT 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 76f5c63..8f25f23 100644 --- a/sync/syncable/model_neutral_mutable_entry.h +++ b/sync/syncable/model_neutral_mutable_entry.h @@ -5,6 +5,8 @@ #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" @@ -27,7 +29,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_PRIVATE ModelNeutralMutableEntry : public Entry { +class SYNC_EXPORT ModelNeutralMutableEntry : public Entry { public: ModelNeutralMutableEntry(BaseWriteTransaction* trans, CreateNewUpdateItem, diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h index f26842e..efffa12 100644 --- a/sync/syncable/mutable_entry.h +++ b/sync/syncable/mutable_entry.h @@ -5,6 +5,8 @@ #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" @@ -24,7 +26,7 @@ class WriteTransaction; // A mutable meta entry. Changes get committed to the database when the // WriteTransaction is destroyed. -class SYNC_EXPORT_PRIVATE MutableEntry : public ModelNeutralMutableEntry { +class SYNC_EXPORT 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 d39ddf9..b337daf 100644 --- a/sync/syncable/nigori_handler.h +++ b/sync/syncable/nigori_handler.h @@ -5,11 +5,13 @@ #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; } @@ -27,7 +29,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_PRIVATE NigoriHandler { +class SYNC_EXPORT NigoriHandler { public: NigoriHandler(); virtual ~NigoriHandler(); diff --git a/sync/syncable/nigori_util.h b/sync/syncable/nigori_util.h index 7f57a72..c7e0a9d 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_PRIVATE bool VerifyUnsyncedChangesAreEncrypted( +SYNC_EXPORT 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_PRIVATE bool SpecificsNeedsEncryption( +SYNC_EXPORT bool SpecificsNeedsEncryption( ModelTypeSet encrypted_types, const sync_pb::EntitySpecifics& specifics); // Verifies all data of type |type| is encrypted appropriately. -SYNC_EXPORT_PRIVATE bool VerifyDataTypeEncryptionForTest( - BaseTransaction* const trans, - ModelType type, - bool is_encrypted) WARN_UNUSED_RESULT; +SYNC_EXPORT 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_PRIVATE void UpdateNigoriFromEncryptedTypes( +SYNC_EXPORT 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 05f4156..b24c584 100644 --- a/sync/syncable/on_disk_directory_backing_store.h +++ b/sync/syncable/on_disk_directory_backing_store.h @@ -5,6 +5,8 @@ #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" @@ -14,8 +16,7 @@ namespace syncable { // This is the concrete class that provides a useful implementation of // DirectoryBackingStore. -class SYNC_EXPORT_PRIVATE OnDiskDirectoryBackingStore - : public DirectoryBackingStore { +class SYNC_EXPORT 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 6a3145e..eb973f6 100644 --- a/sync/syncable/parent_child_index.h +++ b/sync/syncable/parent_child_index.h @@ -2,11 +2,12 @@ // 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 -#define SYNC_SYNCABLE_PARENT_CHILD_INDEX +#ifndef SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_ +#define SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_ #include <map> #include <set> +#include <vector> #include "base/basictypes.h" #include "base/memory/scoped_vector.h" @@ -21,7 +22,7 @@ struct EntryKernel; class ParentChildIndex; // A node ordering function. -struct SYNC_EXPORT_PRIVATE ChildComparator { +struct SYNC_EXPORT ChildComparator { bool operator() (const EntryKernel* a, const EntryKernel* b) const; }; @@ -30,7 +31,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_PRIVATE ParentChildIndex { +class SYNC_EXPORT ParentChildIndex { public: ParentChildIndex(); ~ParentChildIndex(); @@ -100,4 +101,4 @@ class SYNC_EXPORT_PRIVATE ParentChildIndex { } // namespace syncable } // namespace syncer -#endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX +#endif // SYNC_SYNCABLE_PARENT_CHILD_INDEX_H_ diff --git a/sync/syncable/syncable_delete_journal.h b/sync/syncable/syncable_delete_journal.h index a4bf9ce..b475850 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_PRIVATE DeleteJournal { +class SYNC_EXPORT 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 0ae53ad..2d85cdd 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_PRIVATE const char* GetMetahandleFieldString( +SYNC_EXPORT const char* GetMetahandleFieldString( MetahandleField metahandle_field); -SYNC_EXPORT_PRIVATE const char* GetBaseVersionString(BaseVersion base_version); +SYNC_EXPORT const char* GetBaseVersionString(BaseVersion base_version); -SYNC_EXPORT_PRIVATE const char* GetInt64FieldString(Int64Field int64_field); +SYNC_EXPORT const char* GetInt64FieldString(Int64Field int64_field); -SYNC_EXPORT_PRIVATE const char* GetTimeFieldString(TimeField time_field); +SYNC_EXPORT const char* GetTimeFieldString(TimeField time_field); -SYNC_EXPORT_PRIVATE const char* GetIdFieldString(IdField id_field); +SYNC_EXPORT const char* GetIdFieldString(IdField id_field); -SYNC_EXPORT_PRIVATE const char* GetIndexedBitFieldString( +SYNC_EXPORT const char* GetIndexedBitFieldString( IndexedBitField indexed_bit_field); -SYNC_EXPORT_PRIVATE const char* GetIsDelFieldString(IsDelField is_del_field); +SYNC_EXPORT const char* GetIsDelFieldString(IsDelField is_del_field); -SYNC_EXPORT_PRIVATE const char* GetBitFieldString(BitField bit_field); +SYNC_EXPORT const char* GetBitFieldString(BitField bit_field); -SYNC_EXPORT_PRIVATE const char* GetStringFieldString(StringField string_field); +SYNC_EXPORT const char* GetStringFieldString(StringField string_field); -SYNC_EXPORT_PRIVATE const char* GetProtoFieldString(ProtoField proto_field); +SYNC_EXPORT const char* GetProtoFieldString(ProtoField proto_field); -SYNC_EXPORT_PRIVATE const char* GetUniquePositionFieldString( +SYNC_EXPORT const char* GetUniquePositionFieldString( UniquePositionField position_field); -SYNC_EXPORT_PRIVATE const char* GetAttachmentMetadataFieldString( +SYNC_EXPORT const char* GetAttachmentMetadataFieldString( AttachmentMetadataField attachment_metadata_field); -SYNC_EXPORT_PRIVATE const char* GetBitTempString(BitTemp bit_temp); +SYNC_EXPORT 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 e9f937a..b2c0edf 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_PRIVATE std::ostream& operator<<(std::ostream& out, const Id& id); +SYNC_EXPORT 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,8 +110,7 @@ class SYNC_EXPORT Id { int* total_created_entries); friend void BindFields(const EntryKernel& entry, sql::Statement* statement); - SYNC_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& out, - const Id& id); + SYNC_EXPORT 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 3caa10e..f51e802 100644 --- a/sync/syncable/syncable_model_neutral_write_transaction.h +++ b/sync/syncable/syncable_model_neutral_write_transaction.h @@ -21,8 +21,7 @@ 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_PRIVATE ModelNeutralWriteTransaction - : public BaseWriteTransaction { +class SYNC_EXPORT 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 305fc4c..c09ef6f 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 SYNCABLE_PROTOCOL_PROTO_UTIL_H_ -#define SYNCABLE_PROTOCOL_PROTO_UTIL_H_ +#ifndef SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_ +#define SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_ #include <string> @@ -22,8 +22,7 @@ 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_PRIVATE std::string SyncableIdToProto( - const syncable::Id& syncable_id); +SYNC_EXPORT std::string SyncableIdToProto(const syncable::Id& syncable_id); // Helper function to determine if this SyncEntity's properties indicate that it // is a folder. @@ -35,4 +34,4 @@ bool IsRoot(const sync_pb::SyncEntity& entity); } // namespace syncer -#endif // SYNCABLE_PROTOCOL_PROTO_UTIL_H_ +#endif // SYNC_SYNCABLE_SYNCABLE_PROTO_UTIL_H_ diff --git a/sync/syncable/syncable_util.h b/sync/syncable/syncable_util.h index be903fd..7792579 100644 --- a/sync/syncable/syncable_util.h +++ b/sync/syncable/syncable_util.h @@ -24,31 +24,30 @@ class BaseWriteTransaction; class ModelNeutralMutableEntry; class Id; -SYNC_EXPORT_PRIVATE void ChangeEntryIDAndUpdateChildren( - BaseWriteTransaction* trans, - ModelNeutralMutableEntry* entry, - const Id& new_id); +SYNC_EXPORT void ChangeEntryIDAndUpdateChildren(BaseWriteTransaction* trans, + ModelNeutralMutableEntry* entry, + const Id& new_id); -SYNC_EXPORT_PRIVATE bool IsLegalNewParent(BaseTransaction* trans, - const Id& id, - const Id& parentid); +SYNC_EXPORT 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_PRIVATE int GetUnsyncedEntries(BaseTransaction* trans, - std::vector<int64> *handles); +SYNC_EXPORT int GetUnsyncedEntries(BaseTransaction* trans, + std::vector<int64>* handles); // Generates a fixed-length tag for the given string under the given model_type. -SYNC_EXPORT_PRIVATE std::string GenerateSyncableHash( - ModelType model_type, const std::string& client_tag); +SYNC_EXPORT 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_PRIVATE std::string GenerateSyncableBookmarkHash( +SYNC_EXPORT 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 183fd85..64d7329 100644 --- a/sync/syncable/transaction_observer.h +++ b/sync/syncable/transaction_observer.h @@ -12,7 +12,7 @@ namespace syncer { namespace syncable { -class SYNC_EXPORT_PRIVATE TransactionObserver { +class SYNC_EXPORT TransactionObserver { public: virtual void OnTransactionWrite( const ImmutableWriteTransactionInfo& write_transaction_info, diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h index 6dbe70ef..2366409 100644 --- a/sync/util/cryptographer.h +++ b/sync/util/cryptographer.h @@ -23,7 +23,7 @@ namespace syncer { class Encryptor; -SYNC_EXPORT_PRIVATE extern const char kNigoriTag[]; +SYNC_EXPORT 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 7ac34ad..4f56634 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_PRIVATE std::string GetSessionNameSynchronouslyForTesting(); +SYNC_EXPORT std::string GetSessionNameSynchronouslyForTesting(); } // namespace syncer diff --git a/sync/util/time.h b/sync/util/time.h index f28a6f0..f9b0cbc 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_PRIVATE base::Time ProtoTimeToTime(int64 proto_t); +SYNC_EXPORT base::Time ProtoTimeToTime(int64 proto_t); SYNC_EXPORT std::string GetTimeDebugString(const base::Time& t); |