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/syncable | |
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/syncable')
21 files changed, 102 insertions, 97 deletions
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, |