diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 03:15:50 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-27 03:15:50 +0000 |
commit | cb02f6137832121af125b0c7c7ef425bca749dfb (patch) | |
tree | 98db52d582414dc4fd87f75fceca8875538bf74c /sync/api | |
parent | a571ce8531f2fe4a9ac4b615f75a5b5147459576 (diff) | |
download | chromium_src-cb02f6137832121af125b0c7c7ef425bca749dfb.zip chromium_src-cb02f6137832121af125b0c7c7ef425bca749dfb.tar.gz chromium_src-cb02f6137832121af125b0c7c7ef425bca749dfb.tar.bz2 |
[Sync] Put everything in sync/api into csync namespace
BUG=128060
TEST=
TBR=pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10662035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144385 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/api')
-rw-r--r-- | sync/api/fake_syncable_service.cc | 4 | ||||
-rw-r--r-- | sync/api/fake_syncable_service.h | 4 | ||||
-rw-r--r-- | sync/api/sync_change.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_change.h | 4 | ||||
-rw-r--r-- | sync/api/sync_change_processor.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_change_processor.h | 8 | ||||
-rw-r--r-- | sync/api/sync_change_unittest.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_data.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_data.h | 4 | ||||
-rw-r--r-- | sync/api/sync_error.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_error.h | 4 | ||||
-rw-r--r-- | sync/api/sync_error_factory.cc | 4 | ||||
-rw-r--r-- | sync/api/sync_error_factory.h | 5 | ||||
-rw-r--r-- | sync/api/sync_error_factory_mock.cc | 3 | ||||
-rw-r--r-- | sync/api/sync_error_factory_mock.h | 4 | ||||
-rw-r--r-- | sync/api/sync_error_unittest.cc | 4 | ||||
-rw-r--r-- | sync/api/syncable_service.cc | 4 | ||||
-rw-r--r-- | sync/api/syncable_service.h | 4 |
18 files changed, 72 insertions, 4 deletions
diff --git a/sync/api/fake_syncable_service.cc b/sync/api/fake_syncable_service.cc index f5738eb..912a646 100644 --- a/sync/api/fake_syncable_service.cc +++ b/sync/api/fake_syncable_service.cc @@ -7,6 +7,8 @@ #include "base/location.h" #include "sync/api/sync_error_factory.h" +namespace csync { + FakeSyncableService::FakeSyncableService() : syncing_(false), type_(syncable::UNSPECIFIED) {} @@ -56,3 +58,5 @@ SyncError FakeSyncableService::ProcessSyncChanges( const SyncChangeList& change_list) { return process_sync_changes_error_; } + +} // namespace csync diff --git a/sync/api/fake_syncable_service.h b/sync/api/fake_syncable_service.h index 9f10a65..aa8c462 100644 --- a/sync/api/fake_syncable_service.h +++ b/sync/api/fake_syncable_service.h @@ -8,6 +8,8 @@ #include "sync/api/syncable_service.h" +namespace csync { + class SyncErrorFactory; // A fake SyncableService that can return arbitrary values and maintains the @@ -45,4 +47,6 @@ class FakeSyncableService : public SyncableService { syncable::ModelType type_; }; +} // namespace csync + #endif // SYNC_API_FAKE_SYNCABLE_SERVICE_H_ diff --git a/sync/api/sync_change.cc b/sync/api/sync_change.cc index 627c19b..ef9063b 100644 --- a/sync/api/sync_change.cc +++ b/sync/api/sync_change.cc @@ -6,6 +6,8 @@ #include <ostream> +namespace csync { + SyncChange::SyncChange() : change_type_(ACTION_INVALID) { } @@ -71,3 +73,5 @@ std::string SyncChange::ToString() const { void PrintTo(const SyncChange& sync_change, std::ostream* os) { *os << sync_change.ToString(); } + +} // namespace csync diff --git a/sync/api/sync_change.h b/sync/api/sync_change.h index 19218f5..11dea71 100644 --- a/sync/api/sync_change.h +++ b/sync/api/sync_change.h @@ -12,6 +12,8 @@ #include "sync/api/sync_data.h" +namespace csync { + // A SyncChange object reflects a change to a piece of synced data. The change // can be either a delete, add, or an update. All data relevant to the change // is encapsulated within the SyncChange, which, once created, is immutable. @@ -64,4 +66,6 @@ class SyncChange { // gmock printer helper. void PrintTo(const SyncChange& sync_change, std::ostream* os); +} // namespace csync + #endif // SYNC_API_SYNC_CHANGE_H_ diff --git a/sync/api/sync_change_processor.cc b/sync/api/sync_change_processor.cc index 74e6401..6a46be5 100644 --- a/sync/api/sync_change_processor.cc +++ b/sync/api/sync_change_processor.cc @@ -4,6 +4,10 @@ #include "sync/api/sync_change_processor.h" +namespace csync { + SyncChangeProcessor::SyncChangeProcessor() {} SyncChangeProcessor::~SyncChangeProcessor() {} + +} // namespace csync diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h index d97d28d..31788e2 100644 --- a/sync/api/sync_change_processor.h +++ b/sync/api/sync_change_processor.h @@ -10,12 +10,14 @@ #include "sync/api/sync_error.h" -class SyncChange; - namespace tracked_objects { class Location; } // namespace tracked_objects +namespace csync { + +class SyncChange; + typedef std::vector<SyncChange> SyncChangeList; // An interface for services that handle receiving SyncChanges. @@ -36,4 +38,6 @@ class SyncChangeProcessor { const SyncChangeList& change_list) = 0; }; +} // namespace csync + #endif // SYNC_API_SYNC_CHANGE_PROCESSOR_H_ diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc index edde073..a371e08 100644 --- a/sync/api/sync_change_unittest.cc +++ b/sync/api/sync_change_unittest.cc @@ -13,7 +13,7 @@ #include "sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" -using csync::EntitySpecificsToValue; +namespace csync { // Ordered list of SyncChange's. typedef std::vector<SyncChange> SyncChangeList; @@ -128,3 +128,5 @@ TEST_F(SyncChangeTest, SyncerChanges) { } } // namespace + +} // namespace csync diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index 8b2e96a..43e44eb 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -15,6 +15,8 @@ #include "sync/protocol/proto_value_conversions.h" #include "sync/protocol/sync.pb.h" +namespace csync { + void SyncData::ImmutableSyncEntityTraits::InitializeWrapper( Wrapper* wrapper) { *wrapper = new sync_pb::SyncEntity(); @@ -138,3 +140,5 @@ std::string SyncData::ToString() const { void PrintTo(const SyncData& sync_data, std::ostream* os) { *os << sync_data.ToString(); } + +} // namespace csync diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h index 24269f7..59d4e4e 100644 --- a/sync/api/sync_data.h +++ b/sync/api/sync_data.h @@ -19,6 +19,8 @@ class EntitySpecifics; class SyncEntity; } // namespace sync_pb +namespace csync { + typedef syncable::ModelType SyncDataType; // A light-weight container for immutable sync data. Pass-by-value and storage @@ -118,4 +120,6 @@ class SyncData { // gmock printer helper. void PrintTo(const SyncData& sync_data, std::ostream* os); +} // namespace csync + #endif // SYNC_API_SYNC_DATA_H_ diff --git a/sync/api/sync_error.cc b/sync/api/sync_error.cc index 501fa53..41d20e9 100644 --- a/sync/api/sync_error.cc +++ b/sync/api/sync_error.cc @@ -10,6 +10,8 @@ #include "base/logging.h" #include "sync/internal_api/public/syncable/model_type.h" +namespace csync { + SyncError::SyncError() { Clear(); } @@ -106,3 +108,5 @@ void SyncError::PrintLogError() const { void PrintTo(const SyncError& sync_error, std::ostream* os) { *os << sync_error.ToString(); } + +} // namespace csync diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h index 2bdb9eb..6cd808a 100644 --- a/sync/api/sync_error.h +++ b/sync/api/sync_error.h @@ -16,6 +16,8 @@ namespace tracked_objects { class Location; } // namespace tracked_objects +namespace csync { + // Sync errors are used for debug purposes and handled internally and/or // exposed through Chrome's "about:sync" internal page. They are considered // unrecoverable for the datatype creating them, and should only be used as @@ -82,4 +84,6 @@ class SyncError { // gmock printer helper. void PrintTo(const SyncError& sync_error, std::ostream* os); +} // namespace csync + #endif // SYNC_API_SYNC_ERROR_H_ diff --git a/sync/api/sync_error_factory.cc b/sync/api/sync_error_factory.cc index 0e9b451..5f08b09 100644 --- a/sync/api/sync_error_factory.cc +++ b/sync/api/sync_error_factory.cc @@ -4,8 +4,12 @@ #include "sync/api/sync_error_factory.h" +namespace csync { + SyncErrorFactory::SyncErrorFactory() { } SyncErrorFactory::~SyncErrorFactory() { } + +} // namespace csync diff --git a/sync/api/sync_error_factory.h b/sync/api/sync_error_factory.h index 72f317e..ec9f2df 100644 --- a/sync/api/sync_error_factory.h +++ b/sync/api/sync_error_factory.h @@ -11,6 +11,8 @@ #include "base/location.h" #include "sync/api/sync_error.h" +namespace csync { + class SyncErrorFactory { public: SyncErrorFactory(); @@ -22,5 +24,6 @@ class SyncErrorFactory { const std::string& message) = 0; }; -#endif // SYNC_API_SYNC_ERROR_FACTORY_H_ +} // namespace csync +#endif // SYNC_API_SYNC_ERROR_FACTORY_H_ diff --git a/sync/api/sync_error_factory_mock.cc b/sync/api/sync_error_factory_mock.cc index e730b88..9cbd882 100644 --- a/sync/api/sync_error_factory_mock.cc +++ b/sync/api/sync_error_factory_mock.cc @@ -4,9 +4,12 @@ #include "sync/api/sync_error_factory_mock.h" +namespace csync { + SyncErrorFactoryMock::SyncErrorFactoryMock() { } SyncErrorFactoryMock::~SyncErrorFactoryMock() { } +} // namespace csync diff --git a/sync/api/sync_error_factory_mock.h b/sync/api/sync_error_factory_mock.h index 6fc58074..3808b88 100644 --- a/sync/api/sync_error_factory_mock.h +++ b/sync/api/sync_error_factory_mock.h @@ -10,6 +10,8 @@ #include "testing/gmock/include/gmock/gmock.h" +namespace csync { + class SyncErrorFactoryMock : public SyncErrorFactory { public: SyncErrorFactoryMock(); @@ -20,4 +22,6 @@ class SyncErrorFactoryMock : public SyncErrorFactory { const std::string& message)); }; +} // namespace csync + #endif // SYNC_API_SYNC_ERROR_FACTORY_MOCK_H_ diff --git a/sync/api/sync_error_unittest.cc b/sync/api/sync_error_unittest.cc index c700db55..28fe2b6 100644 --- a/sync/api/sync_error_unittest.cc +++ b/sync/api/sync_error_unittest.cc @@ -9,6 +9,8 @@ #include "base/location.h" #include "testing/gtest/include/gtest/gtest.h" +namespace csync { + using std::string; using syncable::ModelType; @@ -130,3 +132,5 @@ TEST_F(SyncErrorTest, ToString) { } } // namespace + +} // namespace csync diff --git a/sync/api/syncable_service.cc b/sync/api/syncable_service.cc index 198173a..93af355 100644 --- a/sync/api/syncable_service.cc +++ b/sync/api/syncable_service.cc @@ -4,4 +4,8 @@ #include "sync/api/syncable_service.h" +namespace csync { + SyncableService::~SyncableService() {} + +} // namespace csync diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h index b499a28..5c828de 100644 --- a/sync/api/syncable_service.h +++ b/sync/api/syncable_service.h @@ -16,6 +16,8 @@ #include "sync/api/sync_error.h" #include "sync/internal_api/public/syncable/model_type.h" +namespace csync { + class SyncErrorFactory; typedef std::vector<SyncData> SyncDataList; @@ -62,4 +64,6 @@ class SyncableService : public SyncChangeProcessor, virtual ~SyncableService(); }; +} // namespace csync + #endif // SYNC_API_SYNCABLE_SERVICE_H_ |