diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-28 22:43:58 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-28 22:43:58 +0000 |
commit | 65f173550226cb0dcf577183a462d48c47764ee3 (patch) | |
tree | 9d4451edfc037f39658b804f95a3fbdbc85a7bd5 /sync | |
parent | 7953ef8eea2001287dbd233421226ad3f0e16448 (diff) | |
download | chromium_src-65f173550226cb0dcf577183a462d48c47764ee3.zip chromium_src-65f173550226cb0dcf577183a462d48c47764ee3.tar.gz chromium_src-65f173550226cb0dcf577183a462d48c47764ee3.tar.bz2 |
[Sync] Rename csync namespace to syncer
Everyone was confused by 'csync'. 'syncer' seems more understandable.
(Note that we can't use the 'sync' namespace since sync() is a function
from unistd.h.)
BUG=10662035
TEST=
TBR=jhawkins@chromium.org,pkasting@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10698014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144820 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
303 files changed, 1059 insertions, 1063 deletions
diff --git a/sync/api/fake_syncable_service.cc b/sync/api/fake_syncable_service.cc index 912a646..b0ec323 100644 --- a/sync/api/fake_syncable_service.cc +++ b/sync/api/fake_syncable_service.cc @@ -7,7 +7,7 @@ #include "base/location.h" #include "sync/api/sync_error_factory.h" -namespace csync { +namespace syncer { FakeSyncableService::FakeSyncableService() : syncing_(false), @@ -59,4 +59,4 @@ SyncError FakeSyncableService::ProcessSyncChanges( return process_sync_changes_error_; } -} // namespace csync +} // namespace syncer diff --git a/sync/api/fake_syncable_service.h b/sync/api/fake_syncable_service.h index aa8c462..b89cf1f 100644 --- a/sync/api/fake_syncable_service.h +++ b/sync/api/fake_syncable_service.h @@ -8,7 +8,7 @@ #include "sync/api/syncable_service.h" -namespace csync { +namespace syncer { class SyncErrorFactory; @@ -47,6 +47,6 @@ class FakeSyncableService : public SyncableService { syncable::ModelType type_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_API_FAKE_SYNCABLE_SERVICE_H_ diff --git a/sync/api/sync_change.cc b/sync/api/sync_change.cc index ef9063b..49a387b 100644 --- a/sync/api/sync_change.cc +++ b/sync/api/sync_change.cc @@ -6,7 +6,7 @@ #include <ostream> -namespace csync { +namespace syncer { SyncChange::SyncChange() : change_type_(ACTION_INVALID) { } @@ -74,4 +74,4 @@ void PrintTo(const SyncChange& sync_change, std::ostream* os) { *os << sync_change.ToString(); } -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_change.h b/sync/api/sync_change.h index 11dea71..63a03d9 100644 --- a/sync/api/sync_change.h +++ b/sync/api/sync_change.h @@ -12,7 +12,7 @@ #include "sync/api/sync_data.h" -namespace csync { +namespace syncer { // 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 @@ -66,6 +66,6 @@ class SyncChange { // gmock printer helper. void PrintTo(const SyncChange& sync_change, std::ostream* os); -} // namespace csync +} // namespace syncer #endif // SYNC_API_SYNC_CHANGE_H_ diff --git a/sync/api/sync_change_processor.cc b/sync/api/sync_change_processor.cc index 6a46be5..4a0607e 100644 --- a/sync/api/sync_change_processor.cc +++ b/sync/api/sync_change_processor.cc @@ -4,10 +4,10 @@ #include "sync/api/sync_change_processor.h" -namespace csync { +namespace syncer { SyncChangeProcessor::SyncChangeProcessor() {} SyncChangeProcessor::~SyncChangeProcessor() {} -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_change_processor.h b/sync/api/sync_change_processor.h index 31788e2..85a5e0b 100644 --- a/sync/api/sync_change_processor.h +++ b/sync/api/sync_change_processor.h @@ -14,7 +14,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { class SyncChange; @@ -38,6 +38,6 @@ class SyncChangeProcessor { const SyncChangeList& change_list) = 0; }; -} // namespace csync +} // namespace syncer #endif // SYNC_API_SYNC_CHANGE_PROCESSOR_H_ diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc index a371e08..3faa587 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" -namespace csync { +namespace syncer { // Ordered list of SyncChange's. typedef std::vector<SyncChange> SyncChangeList; @@ -129,4 +129,4 @@ TEST_F(SyncChangeTest, SyncerChanges) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index 43e44eb..078d6e6 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -15,7 +15,7 @@ #include "sync/protocol/proto_value_conversions.h" #include "sync/protocol/sync.pb.h" -namespace csync { +namespace syncer { void SyncData::ImmutableSyncEntityTraits::InitializeWrapper( Wrapper* wrapper) { @@ -44,7 +44,7 @@ void SyncData::ImmutableSyncEntityTraits::Swap(sync_pb::SyncEntity* t1, SyncData::SyncData() : is_valid_(false), - id_(csync::kInvalidId) {} + id_(syncer::kInvalidId) {} SyncData::SyncData(int64 id, sync_pb::SyncEntity* entity) : is_valid_(true), @@ -71,13 +71,13 @@ SyncData SyncData::CreateLocalData( entity.set_client_defined_unique_tag(sync_tag); entity.set_non_unique_name(non_unique_title); entity.mutable_specifics()->CopyFrom(specifics); - return SyncData(csync::kInvalidId, &entity); + return SyncData(syncer::kInvalidId, &entity); } // Static. SyncData SyncData::CreateRemoteData( int64 id, const sync_pb::EntitySpecifics& specifics) { - DCHECK_NE(id, csync::kInvalidId); + DCHECK_NE(id, syncer::kInvalidId); sync_pb::SyncEntity entity; entity.mutable_specifics()->CopyFrom(specifics); return SyncData(id, &entity); @@ -112,7 +112,7 @@ int64 SyncData::GetRemoteId() const { } bool SyncData::IsLocal() const { - return id_ == csync::kInvalidId; + return id_ == syncer::kInvalidId; } std::string SyncData::ToString() const { @@ -122,7 +122,7 @@ std::string SyncData::ToString() const { std::string type = syncable::ModelTypeToString(GetDataType()); std::string specifics; scoped_ptr<DictionaryValue> value( - csync::EntitySpecificsToValue(GetSpecifics())); + syncer::EntitySpecificsToValue(GetSpecifics())); base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics); @@ -141,4 +141,4 @@ void PrintTo(const SyncData& sync_data, std::ostream* os) { *os << sync_data.ToString(); } -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h index 59d4e4e..ffe5825 100644 --- a/sync/api/sync_data.h +++ b/sync/api/sync_data.h @@ -19,7 +19,7 @@ class EntitySpecifics; class SyncEntity; } // namespace sync_pb -namespace csync { +namespace syncer { typedef syncable::ModelType SyncDataType; @@ -100,7 +100,7 @@ class SyncData { static void Swap(sync_pb::SyncEntity* t1, sync_pb::SyncEntity* t2); }; - typedef csync::Immutable< + typedef syncer::Immutable< sync_pb::SyncEntity, ImmutableSyncEntityTraits> ImmutableSyncEntity; @@ -110,7 +110,7 @@ class SyncData { // Whether this SyncData holds valid data. bool is_valid_; - // Equal to csync::kInvalidId iff this is local. + // Equal to syncer::kInvalidId iff this is local. int64 id_; // The actual shared sync entity being held. @@ -120,6 +120,6 @@ class SyncData { // gmock printer helper. void PrintTo(const SyncData& sync_data, std::ostream* os); -} // namespace csync +} // namespace syncer #endif // SYNC_API_SYNC_DATA_H_ diff --git a/sync/api/sync_error.cc b/sync/api/sync_error.cc index 41d20e9..aef1ede 100644 --- a/sync/api/sync_error.cc +++ b/sync/api/sync_error.cc @@ -10,7 +10,7 @@ #include "base/logging.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { SyncError::SyncError() { Clear(); @@ -109,4 +109,4 @@ void PrintTo(const SyncError& sync_error, std::ostream* os) { *os << sync_error.ToString(); } -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_error.h b/sync/api/sync_error.h index 6cd808a..7e24676 100644 --- a/sync/api/sync_error.h +++ b/sync/api/sync_error.h @@ -16,7 +16,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { // Sync errors are used for debug purposes and handled internally and/or // exposed through Chrome's "about:sync" internal page. They are considered @@ -84,6 +84,6 @@ class SyncError { // gmock printer helper. void PrintTo(const SyncError& sync_error, std::ostream* os); -} // namespace csync +} // namespace syncer #endif // SYNC_API_SYNC_ERROR_H_ diff --git a/sync/api/sync_error_factory.cc b/sync/api/sync_error_factory.cc index 5f08b09..11888ff 100644 --- a/sync/api/sync_error_factory.cc +++ b/sync/api/sync_error_factory.cc @@ -4,7 +4,7 @@ #include "sync/api/sync_error_factory.h" -namespace csync { +namespace syncer { SyncErrorFactory::SyncErrorFactory() { } @@ -12,4 +12,4 @@ SyncErrorFactory::SyncErrorFactory() { SyncErrorFactory::~SyncErrorFactory() { } -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_error_factory.h b/sync/api/sync_error_factory.h index ec9f2df..2634506 100644 --- a/sync/api/sync_error_factory.h +++ b/sync/api/sync_error_factory.h @@ -11,7 +11,7 @@ #include "base/location.h" #include "sync/api/sync_error.h" -namespace csync { +namespace syncer { class SyncErrorFactory { public: @@ -24,6 +24,6 @@ class SyncErrorFactory { const std::string& message) = 0; }; -} // namespace csync +} // namespace syncer #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 9cbd882..5326bd9 100644 --- a/sync/api/sync_error_factory_mock.cc +++ b/sync/api/sync_error_factory_mock.cc @@ -4,7 +4,7 @@ #include "sync/api/sync_error_factory_mock.h" -namespace csync { +namespace syncer { SyncErrorFactoryMock::SyncErrorFactoryMock() { } @@ -12,4 +12,4 @@ SyncErrorFactoryMock::SyncErrorFactoryMock() { SyncErrorFactoryMock::~SyncErrorFactoryMock() { } -} // namespace csync +} // namespace syncer diff --git a/sync/api/sync_error_factory_mock.h b/sync/api/sync_error_factory_mock.h index 3808b88..ea96806 100644 --- a/sync/api/sync_error_factory_mock.h +++ b/sync/api/sync_error_factory_mock.h @@ -10,7 +10,7 @@ #include "testing/gmock/include/gmock/gmock.h" -namespace csync { +namespace syncer { class SyncErrorFactoryMock : public SyncErrorFactory { public: @@ -22,6 +22,6 @@ class SyncErrorFactoryMock : public SyncErrorFactory { const std::string& message)); }; -} // namespace csync +} // namespace syncer #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 28fe2b6..593eb0f 100644 --- a/sync/api/sync_error_unittest.cc +++ b/sync/api/sync_error_unittest.cc @@ -9,7 +9,7 @@ #include "base/location.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using std::string; using syncable::ModelType; @@ -133,4 +133,4 @@ TEST_F(SyncErrorTest, ToString) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/api/syncable_service.cc b/sync/api/syncable_service.cc index 93af355..66b1e27 100644 --- a/sync/api/syncable_service.cc +++ b/sync/api/syncable_service.cc @@ -4,8 +4,8 @@ #include "sync/api/syncable_service.h" -namespace csync { +namespace syncer { SyncableService::~SyncableService() {} -} // namespace csync +} // namespace syncer diff --git a/sync/api/syncable_service.h b/sync/api/syncable_service.h index 5c828de..53e2cd5 100644 --- a/sync/api/syncable_service.h +++ b/sync/api/syncable_service.h @@ -16,7 +16,7 @@ #include "sync/api/sync_error.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { class SyncErrorFactory; @@ -64,6 +64,6 @@ class SyncableService : public SyncChangeProcessor, virtual ~SyncableService(); }; -} // namespace csync +} // namespace syncer #endif // SYNC_API_SYNCABLE_SERVICE_H_ diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc index e9e1a20..b5a0025 100644 --- a/sync/engine/all_status.cc +++ b/sync/engine/all_status.cc @@ -12,7 +12,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/sessions/session_state.h" -namespace csync { +namespace syncer { AllStatus::AllStatus() { status_.initial_sync_ended = true; @@ -24,11 +24,11 @@ AllStatus::AllStatus() { AllStatus::~AllStatus() { } -csync::SyncStatus AllStatus::CreateBlankStatus() const { +syncer::SyncStatus AllStatus::CreateBlankStatus() const { // Status is initialized with the previous status value. Variables // whose values accumulate (e.g. lifetime counters like updates_received) // are not to be cleared here. - csync::SyncStatus status = status_; + syncer::SyncStatus status = status_; status.encryption_conflicts = 0; status.hierarchy_conflicts = 0; status.simple_conflicts = 0; @@ -39,9 +39,9 @@ csync::SyncStatus AllStatus::CreateBlankStatus() const { return status; } -csync::SyncStatus AllStatus::CalcSyncing( +syncer::SyncStatus AllStatus::CalcSyncing( const SyncEngineEvent &event) const { - csync::SyncStatus status = CreateBlankStatus(); + syncer::SyncStatus status = CreateBlankStatus(); const sessions::SyncSessionSnapshot& snapshot = event.snapshot; status.encryption_conflicts = snapshot.num_encryption_conflicts(); status.hierarchy_conflicts = snapshot.num_hierarchy_conflicts(); @@ -120,7 +120,7 @@ void AllStatus::OnSyncEngineEvent(const SyncEngineEvent& event) { } } -csync::SyncStatus AllStatus::status() const { +syncer::SyncStatus AllStatus::status() const { base::AutoLock lock(mutex_); return status_; } @@ -169,4 +169,4 @@ ScopedStatusLock::~ScopedStatusLock() { allstatus_->mutex_.Release(); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/all_status.h b/sync/engine/all_status.h index 4e19ef6..bb4a943 100644 --- a/sync/engine/all_status.h +++ b/sync/engine/all_status.h @@ -19,7 +19,7 @@ #include "sync/internal_api/public/engine/sync_status.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { class ScopedStatusLock; struct ServerConnectionEvent; @@ -41,7 +41,7 @@ class AllStatus : public SyncEngineEventListener { virtual void OnSyncEngineEvent(const SyncEngineEvent& event) OVERRIDE; - csync::SyncStatus status() const; + syncer::SyncStatus status() const; void SetNotificationsEnabled(bool notifications_enabled); @@ -60,10 +60,10 @@ class AllStatus : public SyncEngineEventListener { protected: // Examines syncer to calculate syncing and the unsynced count, // and returns a Status with new values. - csync::SyncStatus CalcSyncing(const SyncEngineEvent& event) const; - csync::SyncStatus CreateBlankStatus() const; + syncer::SyncStatus CalcSyncing(const SyncEngineEvent& event) const; + syncer::SyncStatus CreateBlankStatus() const; - csync::SyncStatus status_; + syncer::SyncStatus status_; mutable base::Lock mutex_; // Protects all data members. DISALLOW_COPY_AND_ASSIGN(AllStatus); @@ -77,6 +77,6 @@ class ScopedStatusLock { AllStatus* allstatus_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_ALL_STATUS_H_ diff --git a/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc index fd18ff2..c23241c 100644 --- a/sync/engine/apply_updates_command.cc +++ b/sync/engine/apply_updates_command.cc @@ -11,7 +11,7 @@ #include "sync/syncable/read_transaction.h" #include "sync/syncable/write_transaction.h" -namespace csync { +namespace syncer { using sessions::SyncSession; @@ -85,4 +85,4 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl( return SYNCER_OK; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/apply_updates_command.h b/sync/engine/apply_updates_command.h index b6885c3..bea1a7f 100644 --- a/sync/engine/apply_updates_command.h +++ b/sync/engine/apply_updates_command.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "sync/engine/model_changing_syncer_command.h" -namespace csync { +namespace syncer { class ApplyUpdatesCommand : public ModelChangingSyncerCommand { public: @@ -27,6 +27,6 @@ class ApplyUpdatesCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ApplyUpdatesCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_APPLY_UPDATES_COMMAND_H_ diff --git a/sync/engine/apply_updates_command_unittest.cc b/sync/engine/apply_updates_command_unittest.cc index 5e43d0a..7f9e475 100644 --- a/sync/engine/apply_updates_command_unittest.cc +++ b/sync/engine/apply_updates_command_unittest.cc @@ -27,7 +27,7 @@ #include "sync/util/cryptographer.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using sessions::SyncSession; using std::string; @@ -380,7 +380,7 @@ TEST_F(ApplyUpdatesCommandTest, DecryptablePassword) { cryptographer = directory()->GetCryptographer(&trans); } - csync::KeyParams params = {"localhost", "dummy", "foobar"}; + syncer::KeyParams params = {"localhost", "dummy", "foobar"}; cryptographer->AddKey(params); sync_pb::EntitySpecifics specifics; @@ -856,4 +856,4 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) { } } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/build_commit_command.cc b/sync/engine/build_commit_command.cc index c83bd69..f3c0a9f 100644 --- a/sync/engine/build_commit_command.cc +++ b/sync/engine/build_commit_command.cc @@ -33,7 +33,7 @@ using syncable::MutableEntry; using syncable::SPECIFICS; using syncable::UNSPECIFIED; -namespace csync { +namespace syncer { using sessions::SyncSession; @@ -261,4 +261,4 @@ int64 BuildCommitCommand::InterpolatePosition(const int64 lo, } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h index 53bafd7..d72765b 100644 --- a/sync/engine/build_commit_command.h +++ b/sync/engine/build_commit_command.h @@ -17,7 +17,7 @@ namespace syncable { class Entry; } -namespace csync { +namespace syncer { namespace sessions { class OrderedCommitSet; @@ -74,6 +74,6 @@ class BuildCommitCommand : public SyncerCommand { ClientToServerMessage* commit_message_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_BUILD_COMMIT_COMMAND_H_ diff --git a/sync/engine/build_commit_command_unittest.cc b/sync/engine/build_commit_command_unittest.cc index f92bcd0..59e98ea 100644 --- a/sync/engine/build_commit_command_unittest.cc +++ b/sync/engine/build_commit_command_unittest.cc @@ -5,7 +5,7 @@ #include "sync/engine/build_commit_command.h" #include "sync/test/engine/syncer_command_test.h" -namespace csync { +namespace syncer { // A test fixture for tests exercising ClearDataCommandTest. class BuildCommitCommandTest : public SyncerCommandTest { @@ -102,6 +102,6 @@ TEST_F(BuildCommitCommandTest, InterpolatePosition) { command_.InterpolatePosition(0, BuildCommitCommand::GetGap()*2 + 1)); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/cleanup_disabled_types_command.cc b/sync/engine/cleanup_disabled_types_command.cc index 953dc6c..233f11c 100644 --- a/sync/engine/cleanup_disabled_types_command.cc +++ b/sync/engine/cleanup_disabled_types_command.cc @@ -11,7 +11,7 @@ #include "sync/sessions/sync_session_context.h" #include "sync/syncable/directory.h" -namespace csync { +namespace syncer { CleanupDisabledTypesCommand::CleanupDisabledTypesCommand() {} CleanupDisabledTypesCommand::~CleanupDisabledTypesCommand() {} @@ -66,5 +66,5 @@ SyncerError CleanupDisabledTypesCommand::ExecuteImpl( return SYNCER_OK; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/cleanup_disabled_types_command.h b/sync/engine/cleanup_disabled_types_command.h index 45ec01d..5d2ec38 100644 --- a/sync/engine/cleanup_disabled_types_command.h +++ b/sync/engine/cleanup_disabled_types_command.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "sync/engine/syncer_command.h" -namespace csync { +namespace syncer { // A syncer command that purges (from memory and disk) entries belonging to // a ModelType or ServerModelType that the user has not elected to sync. @@ -40,7 +40,7 @@ class CleanupDisabledTypesCommand : public SyncerCommand { DISALLOW_COPY_AND_ASSIGN(CleanupDisabledTypesCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_CLEANUP_DISABLED_TYPES_COMMAND_H_ diff --git a/sync/engine/cleanup_disabled_types_command_unittest.cc b/sync/engine/cleanup_disabled_types_command_unittest.cc index d386136..d16d0b9 100644 --- a/sync/engine/cleanup_disabled_types_command_unittest.cc +++ b/sync/engine/cleanup_disabled_types_command_unittest.cc @@ -12,7 +12,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -74,4 +74,4 @@ TEST_F(CleanupDisabledTypesCommandTest, TypeDisabled) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc index 4da658d..734cd6c 100644 --- a/sync/engine/commit.cc +++ b/sync/engine/commit.cc @@ -16,7 +16,7 @@ using syncable::SYNCER; using syncable::WriteTransaction; -namespace csync { +namespace syncer { using sessions::SyncSession; using sessions::StatusController; @@ -156,4 +156,4 @@ SyncerError BuildAndPostCommits(Syncer* syncer, return result; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/commit.h b/sync/engine/commit.h index 5e8e0fa..2169adf 100644 --- a/sync/engine/commit.h +++ b/sync/engine/commit.h @@ -8,7 +8,7 @@ #include "sync/internal_api/public/util/syncer_error.h" -namespace csync { +namespace syncer { namespace sessions { class SyncSession; @@ -32,6 +32,6 @@ SyncerError BuildAndPostCommits( Syncer* syncer, sessions::SyncSession* session); -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_COMMIT_H_ diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc index 156bc90..e708f45 100644 --- a/sync/engine/conflict_resolver.cc +++ b/sync/engine/conflict_resolver.cc @@ -32,7 +32,7 @@ using syncable::IsRealDataType; using syncable::MutableEntry; using syncable::WriteTransaction; -namespace csync { +namespace syncer { using sessions::ConflictProgress; using sessions::StatusController; @@ -417,4 +417,4 @@ bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans, return forward_progress; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/conflict_resolver.h b/sync/engine/conflict_resolver.h index fedaa45..733348c 100644 --- a/sync/engine/conflict_resolver.h +++ b/sync/engine/conflict_resolver.h @@ -24,7 +24,7 @@ class MutableEntry; class WriteTransaction; } // namespace syncable -namespace csync { +namespace syncer { class Cryptographer; @@ -84,6 +84,6 @@ class ConflictResolver { DISALLOW_COPY_AND_ASSIGN(ConflictResolver); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ diff --git a/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc index fb74f3d..f73c350 100644 --- a/sync/engine/download_updates_command.cc +++ b/sync/engine/download_updates_command.cc @@ -15,7 +15,7 @@ using sync_pb::DebugInfo; -namespace csync { +namespace syncer { using sessions::StatusController; using sessions::SyncSession; using std::string; @@ -127,4 +127,4 @@ void DownloadUpdatesCommand::AppendClientDebugInfoIfNeeded( } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/download_updates_command.h b/sync/engine/download_updates_command.h index 527844e..56b73c8 100644 --- a/sync/engine/download_updates_command.h +++ b/sync/engine/download_updates_command.h @@ -18,7 +18,7 @@ namespace sync_pb { class EntitySpecifics; } -namespace csync { +namespace syncer { // Determine the enabled datatypes, download a batch of updates for them // from the server, place the result in the SyncSession for further processing. @@ -59,7 +59,7 @@ class DownloadUpdatesCommand : public SyncerCommand { DISALLOW_COPY_AND_ASSIGN(DownloadUpdatesCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_DOWNLOAD_UPDATES_COMMAND_H_ diff --git a/sync/engine/download_updates_command_unittest.cc b/sync/engine/download_updates_command_unittest.cc index 9a9739f..ed0d6bb 100644 --- a/sync/engine/download_updates_command_unittest.cc +++ b/sync/engine/download_updates_command_unittest.cc @@ -11,7 +11,7 @@ #include "sync/test/engine/syncer_command_test.h" using ::testing::_; -namespace csync { +namespace syncer { using syncable::FIRST_REAL_MODEL_TYPE; using syncable::MODEL_TYPE_COUNT; @@ -71,4 +71,4 @@ TEST_F(DownloadUpdatesCommandTest, VerifyAppendDebugInfo) { command_.AppendClientDebugInfoIfNeeded(session(), &debug_info); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/get_commit_ids_command.cc b/sync/engine/get_commit_ids_command.cc index d3264f2..4b70d88 100644 --- a/sync/engine/get_commit_ids_command.cc +++ b/sync/engine/get_commit_ids_command.cc @@ -19,7 +19,7 @@ using std::set; using std::vector; -namespace csync { +namespace syncer { using sessions::OrderedCommitSet; using sessions::SyncSession; @@ -432,4 +432,4 @@ void GetCommitIdsCommand::BuildCommitIds( AddDeletes(write_transaction, ready_unsynced_set); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/get_commit_ids_command.h b/sync/engine/get_commit_ids_command.h index 5d9117f..f6b8a66 100644 --- a/sync/engine/get_commit_ids_command.h +++ b/sync/engine/get_commit_ids_command.h @@ -19,7 +19,7 @@ using std::pair; using std::vector; -namespace csync { +namespace syncer { // A class that contains the code used to search the syncable::Directory for // locally modified items that are ready to be committed to the server. @@ -135,6 +135,6 @@ class GetCommitIdsCommand : public SyncerCommand { DISALLOW_COPY_AND_ASSIGN(GetCommitIdsCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_GET_COMMIT_IDS_COMMAND_H_ diff --git a/sync/engine/model_changing_syncer_command.cc b/sync/engine/model_changing_syncer_command.cc index 08340a4..3fe6b2d 100644 --- a/sync/engine/model_changing_syncer_command.cc +++ b/sync/engine/model_changing_syncer_command.cc @@ -10,7 +10,7 @@ #include "sync/sessions/status_controller.h" #include "sync/sessions/sync_session.h" -namespace csync { +namespace syncer { SyncerError ModelChangingSyncerCommand::ExecuteImpl( sessions::SyncSession* session) { @@ -48,4 +48,4 @@ SyncerError ModelChangingSyncerCommand::ExecuteImpl( return result; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/model_changing_syncer_command.h b/sync/engine/model_changing_syncer_command.h index 44f045a..ad6dc63 100644 --- a/sync/engine/model_changing_syncer_command.h +++ b/sync/engine/model_changing_syncer_command.h @@ -10,7 +10,7 @@ #include "sync/engine/syncer_command.h" #include "sync/internal_api/public/engine/model_safe_worker.h" -namespace csync { +namespace syncer { namespace sessions { class SyncSession; } @@ -31,7 +31,7 @@ class ModelChangingSyncerCommand : public SyncerCommand { virtual ~ModelChangingSyncerCommand() { } // SyncerCommand implementation. Sets work_session to session. - virtual csync::SyncerError ExecuteImpl( + virtual syncer::SyncerError ExecuteImpl( sessions::SyncSession* session) OVERRIDE; // Wrapper so implementations don't worry about storing work_session. @@ -72,6 +72,6 @@ class ModelChangingSyncerCommand : public SyncerCommand { DISALLOW_COPY_AND_ASSIGN(ModelChangingSyncerCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_MODEL_CHANGING_SYNCER_COMMAND_H_ diff --git a/sync/engine/model_changing_syncer_command_unittest.cc b/sync/engine/model_changing_syncer_command_unittest.cc index 16e8dab..ac898c5 100644 --- a/sync/engine/model_changing_syncer_command_unittest.cc +++ b/sync/engine/model_changing_syncer_command_unittest.cc @@ -12,7 +12,7 @@ #include "sync/test/engine/syncer_command_test.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -74,4 +74,4 @@ TEST_F(ModelChangingSyncerCommandTest, Basic) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/engine/net/server_connection_manager.cc b/sync/engine/net/server_connection_manager.cc index 152223a..ff85d10 100644 --- a/sync/engine/net/server_connection_manager.cc +++ b/sync/engine/net/server_connection_manager.cc @@ -20,7 +20,7 @@ #include "sync/protocol/sync.pb.h" #include "sync/syncable/directory.h" -namespace csync { +namespace syncer { using std::ostream; using std::string; @@ -330,4 +330,4 @@ std::ostream& operator << (std::ostream& s, const struct HttpResponse& hr) { return s; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h index c61352e..a94582b 100644 --- a/sync/engine/net/server_connection_manager.h +++ b/sync/engine/net/server_connection_manager.h @@ -26,7 +26,7 @@ namespace sync_pb { class ClientToServerMessage; } -namespace csync { +namespace syncer { static const int32 kUnsetResponseCode = -1; static const int32 kUnsetContentLength = -1; @@ -348,6 +348,6 @@ bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm, std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_NET_SERVER_CONNECTION_MANAGER_H_ diff --git a/sync/engine/net/url_translator.cc b/sync/engine/net/url_translator.cc index 3c18794..e9cae5a 100644 --- a/sync/engine/net/url_translator.cc +++ b/sync/engine/net/url_translator.cc @@ -13,7 +13,7 @@ using std::string; -namespace csync { +namespace syncer { namespace { // Parameters that the server understands. (here, a-Z) @@ -54,4 +54,4 @@ string MakeSyncQueryString(const string& client_id) { return query; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/net/url_translator.h b/sync/engine/net/url_translator.h index 1842380..043a2fe 100644 --- a/sync/engine/net/url_translator.h +++ b/sync/engine/net/url_translator.h @@ -11,7 +11,7 @@ #include <string> -namespace csync { +namespace syncer { // Convenience wrappers around CgiEscapePath(), used by gaia_auth. std::string CgiEscapeString(const char* src); @@ -23,6 +23,6 @@ std::string MakeSyncServerPath(const std::string& path, std::string MakeSyncQueryString(const std::string& client_id); -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_NET_URL_TRANSLATOR_H_ diff --git a/sync/engine/nigori_util.cc b/sync/engine/nigori_util.cc index 765cf0a..e7d4e5c 100644 --- a/sync/engine/nigori_util.cc +++ b/sync/engine/nigori_util.cc @@ -20,7 +20,7 @@ namespace syncable { bool ProcessUnsyncedChangesForEncryption( WriteTransaction* const trans, - csync::Cryptographer* cryptographer) { + syncer::Cryptographer* cryptographer) { DCHECK(cryptographer->is_ready()); // Get list of all datatypes with unsynced changes. It's possible that our // local changes need to be encrypted if encryption for that datatype was @@ -29,7 +29,7 @@ bool ProcessUnsyncedChangesForEncryption( // changes in this code path are likely due to consistency issues (we have // to be updated to a key we already have, e.g. an old key). std::vector<int64> handles; - csync::SyncerUtil::GetUnsyncedEntries(trans, &handles); + syncer::SyncerUtil::GetUnsyncedEntries(trans, &handles); for (size_t i = 0; i < handles.size(); ++i) { MutableEntry entry(trans, GET_BY_HANDLE, handles[i]); const sync_pb::EntitySpecifics& specifics = entry.Get(SPECIFICS); @@ -51,7 +51,7 @@ bool VerifyUnsyncedChangesAreEncrypted( BaseTransaction* const trans, ModelTypeSet encrypted_types) { std::vector<int64> handles; - csync::SyncerUtil::GetUnsyncedEntries(trans, &handles); + syncer::SyncerUtil::GetUnsyncedEntries(trans, &handles); for (size_t i = 0; i < handles.size(); ++i) { Entry entry(trans, GET_BY_HANDLE, handles[i]); if (!entry.good()) { @@ -92,7 +92,7 @@ bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types, // Mainly for testing. bool VerifyDataTypeEncryptionForTest( BaseTransaction* const trans, - csync::Cryptographer* cryptographer, + syncer::Cryptographer* cryptographer, ModelType type, bool is_encrypted) { if (type == PASSWORDS || type == NIGORI) { @@ -156,7 +156,7 @@ bool VerifyDataTypeEncryptionForTest( } bool UpdateEntryWithEncryption( - csync::Cryptographer* cryptographer, + syncer::Cryptographer* cryptographer, const sync_pb::EntitySpecifics& new_specifics, syncable::MutableEntry* entry) { syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics); diff --git a/sync/engine/nigori_util.h b/sync/engine/nigori_util.h index 5e5c20a..9d3e2de 100644 --- a/sync/engine/nigori_util.h +++ b/sync/engine/nigori_util.h @@ -12,7 +12,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/protocol/nigori_specifics.pb.h" -namespace csync { +namespace syncer { class Cryptographer; } @@ -43,7 +43,7 @@ bool VerifyUnsyncedChangesAreEncrypted( // or unencrypted, based on |encrypted_types|. bool ProcessUnsyncedChangesForEncryption( WriteTransaction* const trans, - csync::Cryptographer* cryptographer); + syncer::Cryptographer* cryptographer); // Returns true if the entry requires encryption but is not encrypted, false // otherwise. Note: this does not check that already encrypted entries are @@ -58,7 +58,7 @@ bool SpecificsNeedsEncryption(ModelTypeSet encrypted_types, // Verifies all data of type |type| is encrypted appropriately. bool VerifyDataTypeEncryptionForTest( BaseTransaction* const trans, - csync::Cryptographer* cryptographer, + syncer::Cryptographer* cryptographer, ModelType type, bool is_encrypted) WARN_UNUSED_RESULT; @@ -66,7 +66,7 @@ bool VerifyDataTypeEncryptionForTest( // Returns false if an error encrypting occurred (does not modify |entry|). // Note: gracefully handles new_specifics aliasing with entry->Get(SPECIFICS). bool UpdateEntryWithEncryption( - csync::Cryptographer* cryptographer, + syncer::Cryptographer* cryptographer, const sync_pb::EntitySpecifics& new_specifics, MutableEntry* entry); diff --git a/sync/engine/nudge_source.cc b/sync/engine/nudge_source.cc index 1020fbf..cd01dda 100644 --- a/sync/engine/nudge_source.cc +++ b/sync/engine/nudge_source.cc @@ -6,7 +6,7 @@ #include "base/logging.h" -namespace csync { +namespace syncer { #define ENUM_CASE(x) case x: return #x; break @@ -24,4 +24,4 @@ const char* GetNudgeSourceString(NudgeSource nudge_source) { #undef ENUM_CASE -} // namespace csync +} // namespace syncer diff --git a/sync/engine/nudge_source.h b/sync/engine/nudge_source.h index a842915..b665203 100644 --- a/sync/engine/nudge_source.h +++ b/sync/engine/nudge_source.h @@ -6,7 +6,7 @@ #define SYNC_ENGINE_NUDGE_SOURCE_H_ #pragma once -namespace csync { +namespace syncer { enum NudgeSource { NUDGE_SOURCE_UNKNOWN = 0, @@ -22,6 +22,6 @@ enum NudgeSource { const char* GetNudgeSourceString(NudgeSource nudge_source); -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_NUDGE_SOURCE_H_ diff --git a/sync/engine/process_commit_response_command.cc b/sync/engine/process_commit_response_command.cc index b315062..51e1697 100644 --- a/sync/engine/process_commit_response_command.cc +++ b/sync/engine/process_commit_response_command.cc @@ -45,7 +45,7 @@ using syncable::SERVER_VERSION; using syncable::SYNCER; using syncable::SYNCING; -namespace csync { +namespace syncer { using sessions::OrderedCommitSet; using sessions::StatusController; @@ -477,4 +477,4 @@ void ProcessCommitResponseCommand::ProcessSuccessfulCommitResponse( } } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/process_commit_response_command.h b/sync/engine/process_commit_response_command.h index 98de2f2..80c5753 100644 --- a/sync/engine/process_commit_response_command.h +++ b/sync/engine/process_commit_response_command.h @@ -21,7 +21,7 @@ class MutableEntry; class Directory; } -namespace csync { +namespace syncer { namespace sessions { class OrderedCommitSet; @@ -131,6 +131,6 @@ class ProcessCommitResponseCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_PROCESS_COMMIT_RESPONSE_COMMAND_H_ diff --git a/sync/engine/process_commit_response_command_unittest.cc b/sync/engine/process_commit_response_command_unittest.cc index c18d571..a387bd2 100644 --- a/sync/engine/process_commit_response_command_unittest.cc +++ b/sync/engine/process_commit_response_command_unittest.cc @@ -21,7 +21,7 @@ #include "sync/test/engine/test_id_factory.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using sessions::SyncSession; using std::string; @@ -118,8 +118,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest { const string& name, syncable::ModelType model_type, sessions::OrderedCommitSet *commit_set, - csync::ClientToServerMessage *commit, - csync::ClientToServerResponse *response) { + syncer::ClientToServerMessage *commit, + syncer::ClientToServerResponse *response) { bool is_folder = true; int64 metahandle = 0; CreateUnsyncedItem(item_id, parent_id, name, is_folder, model_type, @@ -190,8 +190,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest { TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - csync::ClientToServerMessage request; - csync::ClientToServerResponse response; + syncer::ClientToServerMessage request; + syncer::ClientToServerResponse response; Id bookmark_folder_id = id_factory_.NewLocalId(); Id bookmark_id1 = id_factory_.NewLocalId(); @@ -274,8 +274,8 @@ TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) { // of the children. TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - csync::ClientToServerMessage request; - csync::ClientToServerResponse response; + syncer::ClientToServerMessage request; + syncer::ClientToServerResponse response; // Create the parent folder, a new item whose ID will change on commit. Id folder_id = id_factory_.NewLocalId(); @@ -402,8 +402,8 @@ INSTANTIATE_TEST_CASE_P(ProcessCommitResponse, // depending on the test parameter. TEST_P(MixedResult, ExtensionActivity) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - csync::ClientToServerMessage request; - csync::ClientToServerResponse response; + syncer::ClientToServerMessage request; + syncer::ClientToServerResponse response; EXPECT_NE(routing_info().find(syncable::BOOKMARKS)->second, routing_info().find(syncable::AUTOFILL)->second) @@ -451,4 +451,4 @@ TEST_P(MixedResult, ExtensionActivity) { } } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/process_updates_command.cc b/sync/engine/process_updates_command.cc index 003c59f..8c2ec75 100644 --- a/sync/engine/process_updates_command.cc +++ b/sync/engine/process_updates_command.cc @@ -21,7 +21,7 @@ using std::vector; -namespace csync { +namespace syncer { using sessions::SyncSession; using sessions::StatusController; @@ -182,4 +182,4 @@ ServerUpdateProcessingResult ProcessUpdatesCommand::ProcessUpdate( return SUCCESS_PROCESSED; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/process_updates_command.h b/sync/engine/process_updates_command.h index 262d5b7..6aeb181 100644 --- a/sync/engine/process_updates_command.h +++ b/sync/engine/process_updates_command.h @@ -18,7 +18,7 @@ namespace sync_pb { class SyncEntity; } -namespace csync { +namespace syncer { class Cryptographer; @@ -50,6 +50,6 @@ class ProcessUpdatesCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_PROCESS_UPDATES_COMMAND_H_ diff --git a/sync/engine/process_updates_command_unittest.cc b/sync/engine/process_updates_command_unittest.cc index a8e8ca3..656091f 100644 --- a/sync/engine/process_updates_command_unittest.cc +++ b/sync/engine/process_updates_command_unittest.cc @@ -13,7 +13,7 @@ #include "sync/test/engine/syncer_command_test.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -49,4 +49,4 @@ TEST_F(ProcessUpdatesCommandTest, GetGroupsToChange) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc index edef3ff..a1ffbde 100644 --- a/sync/engine/resolve_conflicts_command.cc +++ b/sync/engine/resolve_conflicts_command.cc @@ -10,7 +10,7 @@ #include "sync/syncable/directory.h" #include "sync/syncable/write_transaction.h" -namespace csync { +namespace syncer { ResolveConflictsCommand::ResolveConflictsCommand() {} ResolveConflictsCommand::~ResolveConflictsCommand() {} @@ -38,4 +38,4 @@ SyncerError ResolveConflictsCommand::ModelChangingExecuteImpl( return SYNCER_OK; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/resolve_conflicts_command.h b/sync/engine/resolve_conflicts_command.h index 217ddb2..22a9302 100644 --- a/sync/engine/resolve_conflicts_command.h +++ b/sync/engine/resolve_conflicts_command.h @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "sync/engine/model_changing_syncer_command.h" -namespace csync { +namespace syncer { class ResolveConflictsCommand : public ModelChangingSyncerCommand { public: @@ -28,6 +28,6 @@ class ResolveConflictsCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ResolveConflictsCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_RESOLVE_CONFLICTS_COMMAND_H_ diff --git a/sync/engine/resolve_conflicts_command_unittest.cc b/sync/engine/resolve_conflicts_command_unittest.cc index ac3e84f..e5f3c44 100644 --- a/sync/engine/resolve_conflicts_command_unittest.cc +++ b/sync/engine/resolve_conflicts_command_unittest.cc @@ -12,7 +12,7 @@ #include "sync/test/engine/syncer_command_test.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -48,4 +48,4 @@ TEST_F(ResolveConflictsCommandTest, GetGroupsToChange) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc index cfbabe6..89a3088 100644 --- a/sync/engine/store_timestamps_command.cc +++ b/sync/engine/store_timestamps_command.cc @@ -9,7 +9,7 @@ #include "sync/sessions/sync_session.h" #include "sync/syncable/directory.h" -namespace csync { +namespace syncer { StoreTimestampsCommand::StoreTimestampsCommand() {} StoreTimestampsCommand::~StoreTimestampsCommand() {} @@ -56,4 +56,4 @@ SyncerError StoreTimestampsCommand::ExecuteImpl( return SYNCER_OK; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/store_timestamps_command.h b/sync/engine/store_timestamps_command.h index cd4c054..382752b 100644 --- a/sync/engine/store_timestamps_command.h +++ b/sync/engine/store_timestamps_command.h @@ -10,7 +10,7 @@ #include "sync/engine/syncer_command.h" #include "sync/engine/syncer_types.h" -namespace csync { +namespace syncer { // A syncer command that extracts the changelog timestamp information from // a GetUpdatesResponse (fetched in DownloadUpdatesCommand) and stores @@ -36,6 +36,6 @@ class StoreTimestampsCommand : public SyncerCommand { DISALLOW_COPY_AND_ASSIGN(StoreTimestampsCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_ diff --git a/sync/engine/sync_engine_event.cc b/sync/engine/sync_engine_event.cc index d362448..2df3d62 100644 --- a/sync/engine/sync_engine_event.cc +++ b/sync/engine/sync_engine_event.cc @@ -4,11 +4,11 @@ #include "sync/engine/sync_engine_event.h" -namespace csync { +namespace syncer { SyncEngineEvent::SyncEngineEvent(EventCause cause) : what_happened(cause) { } SyncEngineEvent::~SyncEngineEvent() {} -} // namespace csync +} // namespace syncer diff --git a/sync/engine/sync_engine_event.h b/sync/engine/sync_engine_event.h index e0d011c..6545461e 100644 --- a/sync/engine/sync_engine_event.h +++ b/sync/engine/sync_engine_event.h @@ -15,7 +15,7 @@ namespace syncable { class Id; } -namespace csync { +namespace syncer { struct SyncEngineEvent { enum EventCause { @@ -67,6 +67,6 @@ class SyncEngineEventListener { virtual ~SyncEngineEventListener() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc index 1d1ddad..23ad567 100644 --- a/sync/engine/sync_scheduler.cc +++ b/sync/engine/sync_scheduler.cc @@ -23,7 +23,7 @@ using base::TimeDelta; using base::TimeTicks; -namespace csync { +namespace syncer { using sessions::SyncSession; using sessions::SyncSessionSnapshot; @@ -35,22 +35,22 @@ using sync_pb::GetUpdatesCallerInfo; namespace { bool ShouldRequestEarlyExit( - const csync::SyncProtocolError& error) { + const syncer::SyncProtocolError& error) { switch (error.error_type) { - case csync::SYNC_SUCCESS: - case csync::MIGRATION_DONE: - case csync::THROTTLED: - case csync::TRANSIENT_ERROR: + case syncer::SYNC_SUCCESS: + case syncer::MIGRATION_DONE: + case syncer::THROTTLED: + case syncer::TRANSIENT_ERROR: return false; - case csync::NOT_MY_BIRTHDAY: - case csync::CLEAR_PENDING: + case syncer::NOT_MY_BIRTHDAY: + case syncer::CLEAR_PENDING: // If we send terminate sync early then |sync_cycle_ended| notification // would not be sent. If there were no actions then |ACTIONABLE_ERROR| // notification wouldnt be sent either. Then the UI layer would be left // waiting forever. So assert we would send something. - DCHECK(error.action != csync::UNKNOWN_ACTION); + DCHECK(error.action != syncer::UNKNOWN_ACTION); return true; - case csync::INVALID_CREDENTIAL: + case syncer::INVALID_CREDENTIAL: // The notification for this is handled by PostAndProcessHeaders|. // Server does no have to send any action for this. return true; @@ -63,8 +63,8 @@ bool ShouldRequestEarlyExit( } bool IsActionableError( - const csync::SyncProtocolError& error) { - return (error.action != csync::UNKNOWN_ACTION); + const syncer::SyncProtocolError& error) { + return (error.action != syncer::UNKNOWN_ACTION); } } // namespace @@ -1141,4 +1141,4 @@ base::TimeDelta SyncScheduler::sessions_commit_delay() const { #undef ENUM_CASE -} // csync +} // namespace syncer diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h index 51f5792..d8ea732 100644 --- a/sync/engine/sync_scheduler.h +++ b/sync/engine/sync_scheduler.h @@ -33,7 +33,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { struct ServerConnectionEvent; @@ -329,8 +329,8 @@ class SyncScheduler : public sessions::SyncSession::Delegate { void OnServerConnectionErrorFixed(); // The pointer is owned by the caller. - csync::sessions::SyncSession* CreateSyncSession( - const csync::sessions::SyncSourceInfo& info); + syncer::sessions::SyncSession* CreateSyncSession( + const syncer::sessions::SyncSourceInfo& info); // Creates a session for a poll and performs the sync. void PollTimerCallback(); @@ -402,6 +402,6 @@ class SyncScheduler : public sessions::SyncSession::Delegate { DISALLOW_COPY_AND_ASSIGN(SyncScheduler); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc index 82628cb..cfea374 100644 --- a/sync/engine/sync_scheduler_unittest.cc +++ b/sync/engine/sync_scheduler_unittest.cc @@ -30,7 +30,7 @@ using testing::Mock; using testing::Return; using testing::WithArg; -namespace csync { +namespace syncer { using sessions::SyncSession; using sessions::SyncSessionContext; using sessions::SyncSessionSnapshot; @@ -1140,4 +1140,4 @@ TEST_F(SyncSchedulerTest, SetsPreviousRoutingInfo) { EXPECT_TRUE(expected == context()->previous_session_routing_info()); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc index b6e3234..7fb53be 100644 --- a/sync/engine/sync_scheduler_whitebox_unittest.cc +++ b/sync/engine/sync_scheduler_whitebox_unittest.cc @@ -18,8 +18,8 @@ using base::TimeDelta; using base::TimeTicks; -namespace csync { -using csync::Syncer; +namespace syncer { +using syncer::Syncer; using sessions::SyncSession; using sessions::SyncSessionContext; using sessions::SyncSourceInfo; @@ -265,4 +265,4 @@ TEST_F(SyncSchedulerWhiteboxTest, ContinueCanaryJobConfig) { EXPECT_EQ(decision, SyncScheduler::CONTINUE); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc index 8d3063d..3e8e456 100644 --- a/sync/engine/syncer.cc +++ b/sync/engine/syncer.cc @@ -42,7 +42,7 @@ using syncable::SERVER_POSITION_IN_PARENT; using syncable::SERVER_SPECIFICS; using syncable::SERVER_VERSION; -namespace csync { +namespace syncer { using sessions::ScopedSessionContextConflictResolver; using sessions::StatusController; @@ -296,4 +296,4 @@ void ClearServerData(syncable::MutableEntry* entry) { entry->Put(SERVER_POSITION_IN_PARENT, 0); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h index edddf9b..8369d80 100644 --- a/sync/engine/syncer.h +++ b/sync/engine/syncer.h @@ -24,7 +24,7 @@ class Entry; class MutableEntry; } // namespace syncable -namespace csync { +namespace syncer { enum SyncerStep { SYNCER_BEGIN, @@ -107,6 +107,6 @@ void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); void ClearServerData(syncable::MutableEntry* entry); const char* SyncerStepToString(const SyncerStep); -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCER_H_ diff --git a/sync/engine/syncer_command.cc b/sync/engine/syncer_command.cc index bf7bf96..5dfd821 100644 --- a/sync/engine/syncer_command.cc +++ b/sync/engine/syncer_command.cc @@ -4,7 +4,7 @@ #include "sync/engine/syncer_command.h" -namespace csync { +namespace syncer { SyncerCommand::SyncerCommand() {} SyncerCommand::~SyncerCommand() {} @@ -14,4 +14,4 @@ SyncerError SyncerCommand::Execute(sessions::SyncSession* session) { return result; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer_command.h b/sync/engine/syncer_command.h index 710b3ac..b626b0f 100644 --- a/sync/engine/syncer_command.h +++ b/sync/engine/syncer_command.h @@ -10,7 +10,7 @@ #include "sync/internal_api/public/util/syncer_error.h" -namespace csync { +namespace syncer { namespace sessions { class SyncSession; @@ -42,6 +42,6 @@ class SyncerCommand { DISALLOW_COPY_AND_ASSIGN(SyncerCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCER_COMMAND_H_ diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc index 8be6888..e88bc06 100644 --- a/sync/engine/syncer_proto_util.cc +++ b/sync/engine/syncer_proto_util.cc @@ -21,7 +21,7 @@ #include "sync/syncable/syncable-inl.h" #include "sync/util/time.h" -using csync::SyncProtocolErrorType; +using syncer::SyncProtocolErrorType; using std::string; using std::stringstream; using syncable::BASE_VERSION; @@ -33,7 +33,7 @@ using syncable::IS_UNSYNCED; using syncable::MTIME; using syncable::PARENT_ID; -namespace csync { +namespace syncer { using sessions::SyncSession; namespace { @@ -217,7 +217,7 @@ void SyncerProtoUtil::HandleThrottleError( const base::TimeTicks& throttled_until, ThrottledDataTypeTracker* tracker, sessions::SyncSession::Delegate* delegate) { - DCHECK_EQ(error.error_type, csync::THROTTLED); + DCHECK_EQ(error.error_type, syncer::THROTTLED); if (error.error_data_types.Empty()) { // No datatypes indicates the client should be completely throttled. delegate->OnSilencedUntil(throttled_until); @@ -244,53 +244,53 @@ SyncProtocolErrorType ConvertSyncProtocolErrorTypePBToLocalType( const sync_pb::SyncEnums::ErrorType& error_type) { switch (error_type) { case sync_pb::SyncEnums::SUCCESS: - return csync::SYNC_SUCCESS; + return syncer::SYNC_SUCCESS; case sync_pb::SyncEnums::NOT_MY_BIRTHDAY: - return csync::NOT_MY_BIRTHDAY; + return syncer::NOT_MY_BIRTHDAY; case sync_pb::SyncEnums::THROTTLED: - return csync::THROTTLED; + return syncer::THROTTLED; case sync_pb::SyncEnums::CLEAR_PENDING: - return csync::CLEAR_PENDING; + return syncer::CLEAR_PENDING; case sync_pb::SyncEnums::TRANSIENT_ERROR: - return csync::TRANSIENT_ERROR; + return syncer::TRANSIENT_ERROR; case sync_pb::SyncEnums::MIGRATION_DONE: - return csync::MIGRATION_DONE; + return syncer::MIGRATION_DONE; case sync_pb::SyncEnums::UNKNOWN: - return csync::UNKNOWN_ERROR; + return syncer::UNKNOWN_ERROR; case sync_pb::SyncEnums::USER_NOT_ACTIVATED: case sync_pb::SyncEnums::AUTH_INVALID: case sync_pb::SyncEnums::ACCESS_DENIED: - return csync::INVALID_CREDENTIAL; + return syncer::INVALID_CREDENTIAL; default: NOTREACHED(); - return csync::UNKNOWN_ERROR; + return syncer::UNKNOWN_ERROR; } } -csync::ClientAction ConvertClientActionPBToLocalClientAction( +syncer::ClientAction ConvertClientActionPBToLocalClientAction( const sync_pb::SyncEnums::Action& action) { switch (action) { case sync_pb::SyncEnums::UPGRADE_CLIENT: - return csync::UPGRADE_CLIENT; + return syncer::UPGRADE_CLIENT; case sync_pb::SyncEnums::CLEAR_USER_DATA_AND_RESYNC: - return csync::CLEAR_USER_DATA_AND_RESYNC; + return syncer::CLEAR_USER_DATA_AND_RESYNC; case sync_pb::SyncEnums::ENABLE_SYNC_ON_ACCOUNT: - return csync::ENABLE_SYNC_ON_ACCOUNT; + return syncer::ENABLE_SYNC_ON_ACCOUNT; case sync_pb::SyncEnums::STOP_AND_RESTART_SYNC: - return csync::STOP_AND_RESTART_SYNC; + return syncer::STOP_AND_RESTART_SYNC; case sync_pb::SyncEnums::DISABLE_SYNC_ON_CLIENT: - return csync::DISABLE_SYNC_ON_CLIENT; + return syncer::DISABLE_SYNC_ON_CLIENT; case sync_pb::SyncEnums::UNKNOWN_ACTION: - return csync::UNKNOWN_ACTION; + return syncer::UNKNOWN_ACTION; default: NOTREACHED(); - return csync::UNKNOWN_ACTION; + return syncer::UNKNOWN_ACTION; } } -csync::SyncProtocolError ConvertErrorPBToLocalType( +syncer::SyncProtocolError ConvertErrorPBToLocalType( const sync_pb::ClientToServerResponse::Error& error) { - csync::SyncProtocolError sync_protocol_error; + syncer::SyncProtocolError sync_protocol_error; sync_protocol_error.error_type = ConvertSyncProtocolErrorTypePBToLocalType( error.error_type()); sync_protocol_error.error_description = error.error_description(); @@ -312,13 +312,13 @@ csync::SyncProtocolError ConvertErrorPBToLocalType( } // TODO(lipalani) : Rename these function names as per the CR for issue 7740067. -csync::SyncProtocolError ConvertLegacyErrorCodeToNewError( +syncer::SyncProtocolError ConvertLegacyErrorCodeToNewError( const sync_pb::SyncEnums::ErrorType& error_type) { - csync::SyncProtocolError error; + syncer::SyncProtocolError error; error.error_type = ConvertSyncProtocolErrorTypePBToLocalType(error_type); if (error_type == sync_pb::SyncEnums::CLEAR_PENDING || error_type == sync_pb::SyncEnums::NOT_MY_BIRTHDAY) { - error.action = csync::DISABLE_SYNC_ON_CLIENT; + error.action = syncer::DISABLE_SYNC_ON_CLIENT; } // There is no other action we can compute for legacy server. return error; } @@ -345,11 +345,11 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( msg, response)) { // There was an error establishing communication with the server. // We can not proceed beyond this point. - const csync::HttpResponse::ServerConnectionCode server_status = + const syncer::HttpResponse::ServerConnectionCode server_status = session->context()->connection_manager()->server_status(); - DCHECK_NE(server_status, csync::HttpResponse::NONE); - DCHECK_NE(server_status, csync::HttpResponse::SERVER_CONNECTION_OK); + DCHECK_NE(server_status, syncer::HttpResponse::NONE); + DCHECK_NE(server_status, syncer::HttpResponse::SERVER_CONNECTION_OK); return ServerConnectionErrorAsSyncerError(server_status); } @@ -358,13 +358,13 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( session->context()->traffic_recorder()->RecordClientToServerResponse( *response); - csync::SyncProtocolError sync_protocol_error; + syncer::SyncProtocolError sync_protocol_error; // Birthday mismatch overrides any error that is sent by the server. if (!VerifyResponseBirthday(dir, response)) { - sync_protocol_error.error_type = csync::NOT_MY_BIRTHDAY; + sync_protocol_error.error_type = syncer::NOT_MY_BIRTHDAY; sync_protocol_error.action = - csync::DISABLE_SYNC_ON_CLIENT; + syncer::DISABLE_SYNC_ON_CLIENT; } else if (response->has_error()) { // This is a new server. Just get the error from the protocol. sync_protocol_error = ConvertErrorPBToLocalType(response->error()); @@ -384,28 +384,28 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( // Now do any special handling for the error type and decide on the return // value. switch (sync_protocol_error.error_type) { - case csync::UNKNOWN_ERROR: + case syncer::UNKNOWN_ERROR: LOG(WARNING) << "Sync protocol out-of-date. The server is using a more " << "recent version."; return SERVER_RETURN_UNKNOWN_ERROR; - case csync::SYNC_SUCCESS: + case syncer::SYNC_SUCCESS: LogResponseProfilingData(*response); return SYNCER_OK; - case csync::THROTTLED: + case syncer::THROTTLED: LOG(WARNING) << "Client silenced by server."; HandleThrottleError(sync_protocol_error, base::TimeTicks::Now() + GetThrottleDelay(*response), session->context()->throttled_data_type_tracker(), session->delegate()); return SERVER_RETURN_THROTTLED; - case csync::TRANSIENT_ERROR: + case syncer::TRANSIENT_ERROR: return SERVER_RETURN_TRANSIENT_ERROR; - case csync::MIGRATION_DONE: + case syncer::MIGRATION_DONE: HandleMigrationDoneResponse(response, session); return SERVER_RETURN_MIGRATION_DONE; - case csync::CLEAR_PENDING: + case syncer::CLEAR_PENDING: return SERVER_RETURN_CLEAR_PENDING; - case csync::NOT_MY_BIRTHDAY: + case syncer::NOT_MY_BIRTHDAY: return SERVER_RETURN_NOT_MY_BIRTHDAY; default: NOTREACHED(); @@ -542,4 +542,4 @@ std::string SyncerProtoUtil::ClientToServerResponseDebugString( return output; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h index d9ccddc..4e9614c 100644 --- a/sync/engine/syncer_proto_util.h +++ b/sync/engine/syncer_proto_util.h @@ -25,7 +25,7 @@ class ClientToServerResponse; class EntitySpecifics; } // namespace sync_pb -namespace csync { +namespace syncer { namespace sessions { class SyncProtocolError; @@ -111,7 +111,7 @@ class SyncerProtoUtil { // Post the message using the scm, and do some processing on the returned // headers. Decode the server response. - static bool PostAndProcessHeaders(csync::ServerConnectionManager* scm, + static bool PostAndProcessHeaders(syncer::ServerConnectionManager* scm, sessions::SyncSession* session, const ClientToServerMessage& msg, sync_pb::ClientToServerResponse* response); @@ -122,7 +122,7 @@ class SyncerProtoUtil { static void HandleThrottleError( const SyncProtocolError& error, const base::TimeTicks& throttled_until, - csync::ThrottledDataTypeTracker* tracker, + syncer::ThrottledDataTypeTracker* tracker, sessions::SyncSession::Delegate* delegate); friend class SyncerProtoUtilTest; @@ -135,6 +135,6 @@ class SyncerProtoUtil { DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCER_PROTO_UTIL_H_ diff --git a/sync/engine/syncer_proto_util_unittest.cc b/sync/engine/syncer_proto_util_unittest.cc index b0c9f6e..7c496ee 100644 --- a/sync/engine/syncer_proto_util_unittest.cc +++ b/sync/engine/syncer_proto_util_unittest.cc @@ -28,7 +28,7 @@ using syncable::Blob; using ::testing::_; -namespace csync { +namespace syncer { using sessions::SyncSessionContext; class MockDelegate : public sessions::SyncSession::Delegate { @@ -203,7 +203,7 @@ TEST_F(SyncerProtoUtilTest, AddRequestBirthday) { EXPECT_EQ(msg.store_birthday(), "meat"); } -class DummyConnectionManager : public csync::ServerConnectionManager { +class DummyConnectionManager : public syncer::ServerConnectionManager { public: DummyConnectionManager() : ServerConnectionManager("unused", 0, false), @@ -263,7 +263,7 @@ TEST_F(SyncerProtoUtilTest, PostAndProcessHeaders) { TEST_F(SyncerProtoUtilTest, HandleThrottlingWithDatatypes) { ThrottledDataTypeTracker tracker(NULL); SyncProtocolError error; - error.error_type = csync::THROTTLED; + error.error_type = syncer::THROTTLED; syncable::ModelTypeSet types; types.Put(syncable::BOOKMARKS); types.Put(syncable::PASSWORDS); @@ -278,7 +278,7 @@ TEST_F(SyncerProtoUtilTest, HandleThrottlingNoDatatypes) { ThrottledDataTypeTracker tracker(NULL); MockDelegate delegate; SyncProtocolError error; - error.error_type = csync::THROTTLED; + error.error_type = syncer::THROTTLED; base::TimeTicks ticks = base::TimeTicks::FromInternalValue(1); @@ -287,4 +287,4 @@ TEST_F(SyncerProtoUtilTest, HandleThrottlingNoDatatypes) { SyncerProtoUtil::HandleThrottleError(error, ticks, &tracker, &delegate); EXPECT_TRUE(tracker.GetThrottledTypes().Empty()); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer_types.h b/sync/engine/syncer_types.h index 474bdaec..eb79d82 100644 --- a/sync/engine/syncer_types.h +++ b/sync/engine/syncer_types.h @@ -8,7 +8,7 @@ // The intent of this is to keep all shared data types and enums for the syncer // in a single place without having dependencies between other files. -namespace csync { +namespace syncer { enum UpdateAttemptResponse { // Update was applied or safely ignored. @@ -82,6 +82,6 @@ enum VerifyCommitResult { VERIFY_OK, }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCER_TYPES_H_ diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc index 764161e..fe20a65 100644 --- a/sync/engine/syncer_unittest.cc +++ b/sync/engine/syncer_unittest.cc @@ -62,7 +62,7 @@ using std::multimap; using std::set; using std::string; -namespace csync { +namespace syncer { using syncable::BaseTransaction; using syncable::Blob; @@ -560,7 +560,7 @@ class SyncerTest : public testing::Test, scoped_refptr<ModelSafeWorker> worker_; syncable::ModelTypeSet enabled_datatypes_; - csync::TrafficRecorder traffic_recorder_; + syncer::TrafficRecorder traffic_recorder_; DISALLOW_COPY_AND_ASSIGN(SyncerTest); }; @@ -714,7 +714,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) { // Mark bookmarks as encrypted and set the cryptographer to have pending // keys. WriteTransaction wtrans(FROM_HERE, UNITTEST, directory()); - csync::Cryptographer other_cryptographer(&encryptor_); + syncer::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(other_params); sync_pb::EntitySpecifics specifics; sync_pb::NigoriSpecifics* nigori = specifics.mutable_nigori(); @@ -807,7 +807,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) { TEST_F(SyncerTest, EncryptionAwareConflicts) { KeyParams key_params = {"localhost", "dummy", "foobar"}; - csync::Cryptographer other_cryptographer(&encryptor_); + syncer::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(key_params); sync_pb::EntitySpecifics bookmark, encrypted_bookmark, modified_bookmark; bookmark.mutable_bookmark()->set_title("title"); @@ -981,7 +981,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) { KeyParams current_key = {"localhost", "dummy", "cur"}; // Data for testing encryption/decryption. - csync::Cryptographer other_cryptographer(&encryptor_); + syncer::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(old_key); sync_pb::EntitySpecifics other_encrypted_specifics; other_encrypted_specifics.mutable_bookmark()->set_title("title"); @@ -1064,7 +1064,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) { TEST_F(SyncerTest, NigoriConflicts) { KeyParams local_key_params = {"localhost", "dummy", "blargle"}; KeyParams other_key_params = {"localhost", "dummy", "foobar"}; - csync::Cryptographer other_cryptographer(&encryptor_); + syncer::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(other_key_params); syncable::ModelTypeSet encrypted_types(syncable::PASSWORDS, syncable::NIGORI); sync_pb::EntitySpecifics initial_nigori_specifics; @@ -4831,4 +4831,4 @@ TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { ExpectLocalOrderIsByServerId(); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc index 3e78472..4b95d05 100644 --- a/sync/engine/syncer_util.cc +++ b/sync/engine/syncer_util.cc @@ -68,7 +68,7 @@ using syncable::SPECIFICS; using syncable::SYNCER; using syncable::WriteTransaction; -namespace csync { +namespace syncer { // Returns the number of unsynced entries. // static @@ -722,4 +722,4 @@ VerifyResult SyncerUtil::VerifyUndelete(syncable::WriteTransaction* trans, return VERIFY_UNDECIDED; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/syncer_util.h b/sync/engine/syncer_util.h index e7d0515..7312ab7 100644 --- a/sync/engine/syncer_util.h +++ b/sync/engine/syncer_util.h @@ -19,7 +19,7 @@ #include "sync/syncable/metahandle_set.h" #include "sync/syncable/syncable_id.h" -namespace csync { +namespace syncer { class Cryptographer; class SyncEntity; @@ -123,6 +123,6 @@ class SyncerUtil { DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCER_UTIL_H_ diff --git a/sync/engine/syncproto.h b/sync/engine/syncproto.h index ec6c6e4..8fa4697 100644 --- a/sync/engine/syncproto.h +++ b/sync/engine/syncproto.h @@ -12,7 +12,7 @@ #include "sync/protocol/sync.pb.h" #include "sync/syncable/syncable_id.h" -namespace csync { +namespace syncer { template<class Base> class IdWrapper : public Base { @@ -82,6 +82,6 @@ typedef sync_pb::CommitResponse CommitResponse; typedef sync_pb::GetUpdatesResponse GetUpdatesResponse; typedef sync_pb::GetUpdatesMessage GetUpdatesMessage; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_SYNCPROTO_H_ diff --git a/sync/engine/syncproto_unittest.cc b/sync/engine/syncproto_unittest.cc index d641b5d..1ceaab3 100644 --- a/sync/engine/syncproto_unittest.cc +++ b/sync/engine/syncproto_unittest.cc @@ -5,7 +5,7 @@ #include "sync/engine/syncproto.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { class SyncProtoTest : public testing::Test { }; @@ -15,4 +15,4 @@ TEST_F(SyncProtoTest, ProtocolVersionPresent) { EXPECT_TRUE(csm.has_protocol_version()); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/throttled_data_type_tracker.cc b/sync/engine/throttled_data_type_tracker.cc index 47d68f6..e27f2e3 100644 --- a/sync/engine/throttled_data_type_tracker.cc +++ b/sync/engine/throttled_data_type_tracker.cc @@ -7,7 +7,7 @@ #include "sync/engine/all_status.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { ThrottledDataTypeTracker::ThrottledDataTypeTracker(AllStatus *allstatus) : allstatus_(allstatus) { @@ -69,4 +69,4 @@ syncable::ModelTypeSet ThrottledDataTypeTracker::GetThrottledTypes() const { return types; } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/throttled_data_type_tracker.h b/sync/engine/throttled_data_type_tracker.h index f24ab74..a496bea 100644 --- a/sync/engine/throttled_data_type_tracker.h +++ b/sync/engine/throttled_data_type_tracker.h @@ -11,7 +11,7 @@ #include "base/gtest_prod_util.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { class AllStatus; @@ -50,6 +50,6 @@ class ThrottledDataTypeTracker { DISALLOW_COPY_AND_ASSIGN(ThrottledDataTypeTracker); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_THROTTLED_DATA_TYPE_TRACKER_H_ diff --git a/sync/engine/throttled_data_type_tracker_unittest.cc b/sync/engine/throttled_data_type_tracker_unittest.cc index 6273915..20b7237 100644 --- a/sync/engine/throttled_data_type_tracker_unittest.cc +++ b/sync/engine/throttled_data_type_tracker_unittest.cc @@ -10,7 +10,7 @@ using base::TimeDelta; using base::TimeTicks; -namespace csync { +namespace syncer { TEST(ThrottledDataTypeTrackerTest, AddUnthrottleTimeTest) { const syncable::ModelTypeSet types(syncable::BOOKMARKS, syncable::PASSWORDS); @@ -63,5 +63,5 @@ TEST(ThrottledDataTypeTrackerTest, UnthrottleSomeTypesTest) { EXPECT_TRUE(throttler.GetThrottledTypes().Equals(long_throttled)); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/traffic_logger.cc b/sync/engine/traffic_logger.cc index e25fdc8..740409a 100644 --- a/sync/engine/traffic_logger.cc +++ b/sync/engine/traffic_logger.cc @@ -13,7 +13,7 @@ #include "sync/protocol/proto_value_conversions.h" #include "sync/protocol/sync.pb.h" -namespace csync { +namespace syncer { namespace { template <class T> @@ -43,4 +43,4 @@ void LogClientToServerResponse( "******Server Response******"); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/traffic_logger.h b/sync/engine/traffic_logger.h index 93ae2a3..cba7a67 100644 --- a/sync/engine/traffic_logger.h +++ b/sync/engine/traffic_logger.h @@ -15,12 +15,12 @@ class ClientToServerResponse; class ClientToServerMessage; } // namespace sync_pb -namespace csync { +namespace syncer { void LogClientToServerMessage(const sync_pb::ClientToServerMessage& msg); void LogClientToServerResponse( const sync_pb::ClientToServerResponse& response); -} // namespace csync +} // namespace syncer #endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_LOGGER_H_ diff --git a/sync/engine/traffic_recorder.cc b/sync/engine/traffic_recorder.cc index ade5bd6..379c488 100644 --- a/sync/engine/traffic_recorder.cc +++ b/sync/engine/traffic_recorder.cc @@ -12,7 +12,7 @@ #include "sync/protocol/sync.pb.h" #include "sync/sessions/sync_session.h" -namespace csync { +namespace syncer { TrafficRecorder::TrafficRecord::TrafficRecord(const std::string& message, TrafficMessageType message_type, @@ -129,5 +129,5 @@ void TrafficRecorder::RecordClientToServerResponse( StoreProtoInQueue(response, CLIENT_TO_SERVER_RESPONSE); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/traffic_recorder.h b/sync/engine/traffic_recorder.h index 525e735..436f07c 100644 --- a/sync/engine/traffic_recorder.h +++ b/sync/engine/traffic_recorder.h @@ -19,7 +19,7 @@ class ClientToServerResponse; class ClientToServerMessage; } -namespace csync { +namespace syncer { class TrafficRecorder { public: @@ -72,7 +72,7 @@ class TrafficRecorder { DISALLOW_COPY_AND_ASSIGN(TrafficRecorder); }; -} // namespace csync +} // namespace syncer #endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_RECORDER_H_ diff --git a/sync/engine/traffic_recorder_unittest.cc b/sync/engine/traffic_recorder_unittest.cc index 637aeeb..cf821f5 100644 --- a/sync/engine/traffic_recorder_unittest.cc +++ b/sync/engine/traffic_recorder_unittest.cc @@ -7,7 +7,7 @@ #include "sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { const unsigned int kMaxMessages = 10; const unsigned int kMaxMessageSize = 5 * 1024; @@ -39,5 +39,4 @@ TEST(TrafficRecorderTest, MaxMessageSizeTest) { EXPECT_TRUE(record.message.empty()); } -} //namespace csync - +} // namespace syncer diff --git a/sync/engine/update_applicator.cc b/sync/engine/update_applicator.cc index 3986e60..2756902 100644 --- a/sync/engine/update_applicator.cc +++ b/sync/engine/update_applicator.cc @@ -16,7 +16,7 @@ using std::vector; -namespace csync { +namespace syncer { UpdateApplicator::UpdateApplicator(ConflictResolver* resolver, Cryptographer* cryptographer, @@ -189,4 +189,4 @@ bool UpdateApplicator::ResultTracker::no_conflicts() const { return conflicting_ids_.empty(); } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/update_applicator.h b/sync/engine/update_applicator.h index fbc8361..de05999 100644 --- a/sync/engine/update_applicator.h +++ b/sync/engine/update_applicator.h @@ -24,7 +24,7 @@ class WriteTransaction; class Entry; } -namespace csync { +namespace syncer { namespace sessions { class ConflictProgress; @@ -109,6 +109,6 @@ class UpdateApplicator { DISALLOW_COPY_AND_ASSIGN(UpdateApplicator); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_UPDATE_APPLICATOR_H_ diff --git a/sync/engine/verify_updates_command.cc b/sync/engine/verify_updates_command.cc index 91f08f0..93b6263 100644 --- a/sync/engine/verify_updates_command.cc +++ b/sync/engine/verify_updates_command.cc @@ -18,7 +18,7 @@ #include "sync/syncable/mutable_entry.h" #include "sync/syncable/write_transaction.h" -namespace csync { +namespace syncer { using syncable::GET_BY_ID; using syncable::ModelTypeSet; @@ -100,7 +100,7 @@ SyncerError VerifyUpdatesCommand::ModelChangingExecuteImpl( const GetUpdatesResponse& updates = status->updates_response().get_updates(); int update_count = updates.entries().size(); - ModelTypeSet requested_types = csync::GetRoutingInfoTypes( + ModelTypeSet requested_types = syncer::GetRoutingInfoTypes( session->routing_info()); DVLOG(1) << update_count << " entries to verify"; @@ -186,4 +186,4 @@ VerifyUpdatesCommand::VerifyUpdateResult VerifyUpdatesCommand::VerifyUpdate( return result; // This might be VERIFY_SUCCESS as well } -} // namespace csync +} // namespace syncer diff --git a/sync/engine/verify_updates_command.h b/sync/engine/verify_updates_command.h index b0bf68e..27b0b41 100644 --- a/sync/engine/verify_updates_command.h +++ b/sync/engine/verify_updates_command.h @@ -17,7 +17,7 @@ namespace syncable { class WriteTransaction; } -namespace csync { +namespace syncer { // Verifies the response from a GetUpdates request. All invalid updates will be // noted in the SyncSession after this command is executed. @@ -45,6 +45,6 @@ class VerifyUpdatesCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(VerifyUpdatesCommand); }; -} // namespace csync +} // namespace syncer #endif // SYNC_ENGINE_VERIFY_UPDATES_COMMAND_H_ diff --git a/sync/engine/verify_updates_command_unittest.cc b/sync/engine/verify_updates_command_unittest.cc index 49ac704..afbc784 100644 --- a/sync/engine/verify_updates_command_unittest.cc +++ b/sync/engine/verify_updates_command_unittest.cc @@ -13,7 +13,7 @@ #include "sync/test/engine/syncer_command_test.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using sessions::StatusController; using std::string; @@ -105,4 +105,4 @@ TEST_F(VerifyUpdatesCommandTest, AllVerified) { } } -} +} // namespace syncer diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc index 8af53cb..7563d02 100644 --- a/sync/internal_api/base_node.cc +++ b/sync/internal_api/base_node.cc @@ -28,7 +28,7 @@ using syncable::SPECIFICS; using sync_pb::AutofillProfileSpecifics; -namespace csync { +namespace syncer { // Helper function to look up the int64 metahandle of an object given the ID // string. @@ -255,7 +255,7 @@ DictionaryValue* BaseNode::GetDetailsAsValue() const { DictionaryValue* node_info = GetSummaryAsValue(); node_info->SetString( "modificationTime", - csync::GetTimeDebugString(GetModificationTime())); + syncer::GetTimeDebugString(GetModificationTime())); node_info->SetString("parentId", base::Int64ToString(GetParentId())); // Specifics are already in the Entry value, so no need to duplicate // it here. @@ -352,4 +352,4 @@ void BaseNode::SetUnencryptedSpecifics( unencrypted_data_.CopyFrom(specifics); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/base_transaction.cc b/sync/internal_api/base_transaction.cc index d199f30..5b81136 100644 --- a/sync/internal_api/base_transaction.cc +++ b/sync/internal_api/base_transaction.cc @@ -7,9 +7,9 @@ #include "sync/syncable/directory.h" #include "sync/util/cryptographer.h" -using csync::Cryptographer; +using syncer::Cryptographer; -namespace csync { +namespace syncer { ////////////////////////////////////////////////////////////////////////// // BaseTransaction member definitions @@ -20,13 +20,13 @@ BaseTransaction::BaseTransaction(UserShare* share) { BaseTransaction::~BaseTransaction() { } -csync::Cryptographer* BaseTransaction::GetCryptographer() const { +syncer::Cryptographer* BaseTransaction::GetCryptographer() const { return directory_->GetCryptographer(this->GetWrappedTrans()); } syncable::ModelTypeSet GetEncryptedTypes( - const csync::BaseTransaction* trans) { + const syncer::BaseTransaction* trans) { return trans->GetCryptographer()->GetEncryptedTypes(); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc index 231fe42..d75b903 100644 --- a/sync/internal_api/change_record.cc +++ b/sync/internal_api/change_record.cc @@ -10,7 +10,7 @@ #include "sync/internal_api/public/read_node.h" #include "sync/protocol/proto_value_conversions.h" -namespace csync { +namespace syncer { ChangeRecord::ChangeRecord() : id(kInvalidId), action(ACTION_ADD) {} @@ -42,7 +42,7 @@ DictionaryValue* ChangeRecord::ToValue() const { value->Set("extra", extra->ToValue()); } value->Set("specifics", - csync::EntitySpecificsToValue(specifics)); + syncer::EntitySpecificsToValue(specifics)); } return value; } @@ -57,7 +57,7 @@ ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { - return csync::PasswordSpecificsDataToValue(unencrypted_); + return syncer::PasswordSpecificsDataToValue(unencrypted_); } const sync_pb::PasswordSpecificsData& @@ -65,5 +65,5 @@ const sync_pb::PasswordSpecificsData& return unencrypted_; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/change_reorder_buffer.cc b/sync/internal_api/change_reorder_buffer.cc index 84619aa..786fd46 100644 --- a/sync/internal_api/change_reorder_buffer.cc +++ b/sync/internal_api/change_reorder_buffer.cc @@ -20,7 +20,7 @@ using std::pair; using std::queue; using std::set; -namespace csync { +namespace syncer { // Traversal provides a way to collect a set of nodes from the syncable // directory structure and then traverse them, along with any intermediate @@ -226,4 +226,4 @@ bool ChangeReorderBuffer::GetAllChangesInTreeOrder( return true; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/change_reorder_buffer.h b/sync/internal_api/change_reorder_buffer.h index 44773b8..81f4f6d 100644 --- a/sync/internal_api/change_reorder_buffer.h +++ b/sync/internal_api/change_reorder_buffer.h @@ -19,7 +19,7 @@ #include "sync/internal_api/public/change_record.h" #include "sync/protocol/sync.pb.h" -namespace csync { +namespace syncer { // ChangeReorderBuffer is a utility type which accepts an unordered set // of changes (via its Push methods), and yields an ImmutableChangeRecordList @@ -119,6 +119,6 @@ class ChangeReorderBuffer { DISALLOW_COPY_AND_ASSIGN(ChangeReorderBuffer); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_CHANGE_REORDER_BUFFER_H_ diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc index 40c0e9e..27b6a10 100644 --- a/sync/internal_api/debug_info_event_listener.cc +++ b/sync/internal_api/debug_info_event_listener.cc @@ -4,8 +4,8 @@ #include "sync/internal_api/debug_info_event_listener.h" -using csync::sessions::SyncSessionSnapshot; -namespace csync { +using syncer::sessions::SyncSessionSnapshot; +namespace syncer { DebugInfoEventListener::DebugInfoEventListener() : events_dropped_(false), @@ -44,18 +44,18 @@ void DebugInfoEventListener::OnSyncCycleCompleted( } void DebugInfoEventListener::OnInitializationComplete( - const csync::WeakHandle<csync::JsBackend>& js_backend, + const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) { CreateAndAddEvent(sync_pb::DebugEventInfo::INITIALIZATION_COMPLETE); } void DebugInfoEventListener::OnConnectionStatusChange( - csync::ConnectionStatus status) { + syncer::ConnectionStatus status) { CreateAndAddEvent(sync_pb::DebugEventInfo::CONNECTION_STATUS_CHANGE); } void DebugInfoEventListener::OnPassphraseRequired( - csync::PassphraseRequiredReason reason, + syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) { CreateAndAddEvent(sync_pb::DebugEventInfo::PASSPHRASE_REQUIRED); } @@ -88,7 +88,7 @@ void DebugInfoEventListener::OnEncryptionComplete() { } void DebugInfoEventListener::OnActionableError( - const csync::SyncProtocolError& sync_error) { + const syncer::SyncProtocolError& sync_error) { CreateAndAddEvent(sync_pb::DebugEventInfo::ACTIONABLE_ERROR); } @@ -124,7 +124,7 @@ void DebugInfoEventListener::OnIncomingNotification( void DebugInfoEventListener::GetAndClearDebugInfo( sync_pb::DebugInfo* debug_info) { - DCHECK(events_.size() <= csync::kMaxEntries); + DCHECK(events_.size() <= syncer::kMaxEntries); while (!events_.empty()) { sync_pb::DebugEventInfo* event_info = debug_info->add_events(); const sync_pb::DebugEventInfo& debug_event_info = events_.front(); @@ -149,7 +149,7 @@ void DebugInfoEventListener::CreateAndAddEvent( void DebugInfoEventListener::AddEventToQueue( const sync_pb::DebugEventInfo& event_info) { - if (events_.size() >= csync::kMaxEntries) { + if (events_.size() >= syncer::kMaxEntries) { DVLOG(1) << "DebugInfoEventListener::AddEventToQueue Dropping an old event " << "because of full queue"; @@ -158,4 +158,4 @@ void DebugInfoEventListener::AddEventToQueue( } events_.push(event_info); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h index fec0b67..f671dd2 100644 --- a/sync/internal_api/debug_info_event_listener.h +++ b/sync/internal_api/debug_info_event_listener.h @@ -17,28 +17,28 @@ #include "sync/sessions/debug_info_getter.h" #include "sync/sessions/session_state.h" -namespace csync { +namespace syncer { const unsigned int kMaxEntries = 6; // Listens to events and records them in a queue. And passes the events to // syncer when requested. -class DebugInfoEventListener : public csync::SyncManager::Observer, - public csync::sessions::DebugInfoGetter { +class DebugInfoEventListener : public syncer::SyncManager::Observer, + public syncer::sessions::DebugInfoGetter { public: DebugInfoEventListener(); virtual ~DebugInfoEventListener(); // SyncManager::Observer implementation. virtual void OnSyncCycleCompleted( - const csync::sessions::SyncSessionSnapshot& snapshot) OVERRIDE; + const syncer::sessions::SyncSessionSnapshot& snapshot) OVERRIDE; virtual void OnInitializationComplete( - const csync::WeakHandle<csync::JsBackend>& js_backend, + const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) OVERRIDE; virtual void OnConnectionStatusChange( - csync::ConnectionStatus connection_status) OVERRIDE; + syncer::ConnectionStatus connection_status) OVERRIDE; virtual void OnPassphraseRequired( - csync::PassphraseRequiredReason reason, + syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) OVERRIDE; virtual void OnPassphraseAccepted() OVERRIDE; virtual void OnBootstrapTokenUpdated( @@ -50,7 +50,7 @@ class DebugInfoEventListener : public csync::SyncManager::Observer, bool encrypt_everything) OVERRIDE; virtual void OnEncryptionComplete() OVERRIDE; virtual void OnActionableError( - const csync::SyncProtocolError& sync_error) OVERRIDE; + const syncer::SyncProtocolError& sync_error) OVERRIDE; // Sync manager events. void OnNudgeFromDatatype(syncable::ModelType datatype); @@ -86,5 +86,5 @@ class DebugInfoEventListener : public csync::SyncManager::Observer, DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ diff --git a/sync/internal_api/debug_info_event_listener_unittest.cc b/sync/internal_api/debug_info_event_listener_unittest.cc index 2b67782..e37c8e2 100644 --- a/sync/internal_api/debug_info_event_listener_unittest.cc +++ b/sync/internal_api/debug_info_event_listener_unittest.cc @@ -8,9 +8,9 @@ typedef testing::Test DebugInfoEventListenerTest; -namespace csync { +namespace syncer { TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) { - csync::DebugInfoEventListener debug_info_event_listener; + syncer::DebugInfoEventListener debug_info_event_listener; debug_info_event_listener.CreateAndAddEvent( sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE); ASSERT_EQ(debug_info_event_listener.events_.size(), 1U); @@ -21,17 +21,17 @@ TEST_F(DebugInfoEventListenerTest, VerifyEventsAdded) { } TEST_F(DebugInfoEventListenerTest, VerifyQueueSize) { - csync::DebugInfoEventListener debug_info_event_listener; + syncer::DebugInfoEventListener debug_info_event_listener; for (int i = 0; i < 10; ++i) { debug_info_event_listener.CreateAndAddEvent( sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE); } ASSERT_EQ(debug_info_event_listener.events_.size(), - csync::kMaxEntries); + syncer::kMaxEntries); } TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) { - csync::DebugInfoEventListener debug_info_event_listener; + syncer::DebugInfoEventListener debug_info_event_listener; debug_info_event_listener.CreateAndAddEvent( sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE); ASSERT_EQ(debug_info_event_listener.events_.size(), 1U); @@ -44,4 +44,4 @@ TEST_F(DebugInfoEventListenerTest, VerifyGetAndClearEvents) { sync_pb::DebugEventInfo::ENCRYPTION_COMPLETE); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc index 6aa6c4a..3822399 100644 --- a/sync/internal_api/http_bridge.cc +++ b/sync/internal_api/http_bridge.cc @@ -65,13 +65,13 @@ HttpBridgeFactory::HttpBridgeFactory( HttpBridgeFactory::~HttpBridgeFactory() { } -csync::HttpPostProviderInterface* HttpBridgeFactory::Create() { +syncer::HttpPostProviderInterface* HttpBridgeFactory::Create() { HttpBridge* http = new HttpBridge(request_context_getter_); http->AddRef(); return http; } -void HttpBridgeFactory::Destroy(csync::HttpPostProviderInterface* http) { +void HttpBridgeFactory::Destroy(syncer::HttpPostProviderInterface* http) { static_cast<HttpBridge*>(http)->Release(); } diff --git a/sync/internal_api/js_mutation_event_observer.cc b/sync/internal_api/js_mutation_event_observer.cc index dc57f295..02f5837 100644 --- a/sync/internal_api/js_mutation_event_observer.cc +++ b/sync/internal_api/js_mutation_event_observer.cc @@ -13,7 +13,7 @@ #include "sync/js/js_event_details.h" #include "sync/js/js_event_handler.h" -namespace csync { +namespace syncer { JsMutationEventObserver::JsMutationEventObserver() : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {} @@ -46,7 +46,7 @@ const size_t kChangeLimit = 100; void JsMutationEventObserver::OnChangesApplied( syncable::ModelType model_type, int64 write_transaction_id, - const csync::ImmutableChangeRecordList& changes) { + const syncer::ImmutableChangeRecordList& changes) { if (!event_handler_.IsInitialized()) { return; } @@ -58,7 +58,7 @@ void JsMutationEventObserver::OnChangesApplied( const size_t changes_size = changes.Get().size(); if (changes_size <= kChangeLimit) { ListValue* changes_list = new ListValue(); - for (csync::ChangeRecordList::const_iterator it = + for (syncer::ChangeRecordList::const_iterator it = changes.Get().begin(); it != changes.Get().end(); ++it) { changes_list->Append(it->ToValue()); } @@ -109,4 +109,4 @@ void JsMutationEventObserver::HandleJsEvent( &JsEventHandler::HandleJsEvent, name, details); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/js_mutation_event_observer.h b/sync/internal_api/js_mutation_event_observer.h index eb0dc8e..18f6e32 100644 --- a/sync/internal_api/js_mutation_event_observer.h +++ b/sync/internal_api/js_mutation_event_observer.h @@ -20,7 +20,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { class JsEventDetails; class JsEventHandler; @@ -28,7 +28,7 @@ class JsEventHandler; // Observes all change- and transaction-related events and routes a // summarized version to a JsEventHandler. class JsMutationEventObserver - : public csync::SyncManager::ChangeObserver, + : public syncer::SyncManager::ChangeObserver, public syncable::TransactionObserver, public base::NonThreadSafe { public: @@ -42,11 +42,11 @@ class JsMutationEventObserver void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); - // csync::SyncManager::ChangeObserver implementation. + // syncer::SyncManager::ChangeObserver implementation. virtual void OnChangesApplied( syncable::ModelType model_type, int64 write_transaction_id, - const csync::ImmutableChangeRecordList& changes) OVERRIDE; + const syncer::ImmutableChangeRecordList& changes) OVERRIDE; virtual void OnChangesComplete(syncable::ModelType model_type) OVERRIDE; // syncable::TransactionObserver implementation. @@ -65,6 +65,6 @@ class JsMutationEventObserver DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_JS_MUTATION_EVENT_OBSERVER_H_ diff --git a/sync/internal_api/js_mutation_event_observer_unittest.cc b/sync/internal_api/js_mutation_event_observer_unittest.cc index 6bb07c3..2373349 100644 --- a/sync/internal_api/js_mutation_event_observer_unittest.cc +++ b/sync/internal_api/js_mutation_event_observer_unittest.cc @@ -13,7 +13,7 @@ #include "sync/js/js_test_util.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using ::testing::InSequence; @@ -46,22 +46,22 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) { // We don't test with passwords as that requires additional setup. // Build a list of example ChangeRecords. - csync::ChangeRecord changes[syncable::MODEL_TYPE_COUNT]; + syncer::ChangeRecord changes[syncable::MODEL_TYPE_COUNT]; for (int i = syncable::AUTOFILL_PROFILE; i < syncable::MODEL_TYPE_COUNT; ++i) { changes[i].id = i; switch (i % 3) { case 0: changes[i].action = - csync::ChangeRecord::ACTION_ADD; + syncer::ChangeRecord::ACTION_ADD; break; case 1: changes[i].action = - csync::ChangeRecord::ACTION_UPDATE; + syncer::ChangeRecord::ACTION_UPDATE; break; default: changes[i].action = - csync::ChangeRecord::ACTION_DELETE; + syncer::ChangeRecord::ACTION_DELETE; break; } } @@ -91,11 +91,11 @@ TEST_F(JsMutationEventObserverTest, OnChangesApplied) { // Fire OnChangesApplied() for each data type. for (int i = syncable::AUTOFILL_PROFILE; i < syncable::MODEL_TYPE_COUNT; ++i) { - csync::ChangeRecordList + syncer::ChangeRecordList local_changes(changes + i, changes + arraysize(changes)); js_mutation_event_observer_.OnChangesApplied( syncable::ModelTypeFromInt(i), - 0, csync::ImmutableChangeRecordList(&local_changes)); + 0, syncer::ImmutableChangeRecordList(&local_changes)); } PumpLoop(); @@ -124,4 +124,4 @@ TEST_F(JsMutationEventObserverTest, OnChangesComplete) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc index 21a3ad2..70b4e48 100644 --- a/sync/internal_api/js_sync_manager_observer.cc +++ b/sync/internal_api/js_sync_manager_observer.cc @@ -18,9 +18,9 @@ #include "sync/js/js_event_handler.h" #include "sync/sessions/session_state.h" -namespace csync { +namespace syncer { -using csync::SyncProtocolError; +using syncer::SyncProtocolError; JsSyncManagerObserver::JsSyncManagerObserver() {} @@ -42,12 +42,12 @@ void JsSyncManagerObserver::OnSyncCycleCompleted( } void JsSyncManagerObserver::OnConnectionStatusChange( - csync::ConnectionStatus status) { + syncer::ConnectionStatus status) { if (!event_handler_.IsInitialized()) { return; } DictionaryValue details; - details.SetString("status", csync::ConnectionStatusToString(status)); + details.SetString("status", syncer::ConnectionStatusToString(status)); HandleJsEvent(FROM_HERE, "onConnectionStatusChange", JsEventDetails(&details)); } @@ -62,14 +62,14 @@ void JsSyncManagerObserver::OnUpdatedToken(const std::string& token) { } void JsSyncManagerObserver::OnPassphraseRequired( - csync::PassphraseRequiredReason reason, + syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) { if (!event_handler_.IsInitialized()) { return; } DictionaryValue details; details.SetString("reason", - csync::PassphraseRequiredReasonToString(reason)); + syncer::PassphraseRequiredReasonToString(reason)); HandleJsEvent(FROM_HERE, "onPassphraseRequired", JsEventDetails(&details)); } @@ -153,4 +153,4 @@ void JsSyncManagerObserver::HandleJsEvent( &JsEventHandler::HandleJsEvent, name, details); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h index 75e5691..918eab5 100644 --- a/sync/internal_api/js_sync_manager_observer.h +++ b/sync/internal_api/js_sync_manager_observer.h @@ -18,27 +18,27 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { class JsEventDetails; class JsEventHandler; // Routes SyncManager events to a JsEventHandler. -class JsSyncManagerObserver : public csync::SyncManager::Observer { +class JsSyncManagerObserver : public syncer::SyncManager::Observer { public: JsSyncManagerObserver(); virtual ~JsSyncManagerObserver(); void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); - // csync::SyncManager::Observer implementation. + // syncer::SyncManager::Observer implementation. virtual void OnSyncCycleCompleted( const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; virtual void OnConnectionStatusChange( - csync::ConnectionStatus status) OVERRIDE; + syncer::ConnectionStatus status) OVERRIDE; virtual void OnUpdatedToken(const std::string& token) OVERRIDE; virtual void OnPassphraseRequired( - csync::PassphraseRequiredReason reason, + syncer::PassphraseRequiredReason reason, const sync_pb::EncryptedData& pending_keys) OVERRIDE; virtual void OnPassphraseAccepted() OVERRIDE; virtual void OnBootstrapTokenUpdated( @@ -51,7 +51,7 @@ class JsSyncManagerObserver : public csync::SyncManager::Observer { const WeakHandle<JsBackend>& js_backend, bool success) OVERRIDE; virtual void OnStopSyncingPermanently() OVERRIDE; virtual void OnActionableError( - const csync::SyncProtocolError& sync_protocol_error) OVERRIDE; + const syncer::SyncProtocolError& sync_protocol_error) OVERRIDE; private: void HandleJsEvent(const tracked_objects::Location& from_here, @@ -62,6 +62,6 @@ class JsSyncManagerObserver : public csync::SyncManager::Observer { DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_ diff --git a/sync/internal_api/js_sync_manager_observer_unittest.cc b/sync/internal_api/js_sync_manager_observer_unittest.cc index 1693264..95f4e23 100644 --- a/sync/internal_api/js_sync_manager_observer_unittest.cc +++ b/sync/internal_api/js_sync_manager_observer_unittest.cc @@ -16,7 +16,7 @@ #include "sync/protocol/sync_protocol_error.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using ::testing::InSequence; @@ -92,9 +92,9 @@ TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { } TEST_F(JsSyncManagerObserverTest, OnActionableError) { - csync::SyncProtocolError sync_error; - sync_error.action = csync::CLEAR_USER_DATA_AND_RESYNC; - sync_error.error_type = csync::TRANSIENT_ERROR; + syncer::SyncProtocolError sync_error; + sync_error.action = syncer::CLEAR_USER_DATA_AND_RESYNC; + sync_error.error_type = syncer::TRANSIENT_ERROR; DictionaryValue expected_details; expected_details.Set("syncError", sync_error.ToValue()); @@ -108,11 +108,11 @@ TEST_F(JsSyncManagerObserverTest, OnActionableError) { TEST_F(JsSyncManagerObserverTest, OnConnectionStatusChange) { - const csync::ConnectionStatus kStatus = - csync::CONNECTION_AUTH_ERROR; + const syncer::ConnectionStatus kStatus = + syncer::CONNECTION_AUTH_ERROR; DictionaryValue expected_details; expected_details.SetString("status", - csync::ConnectionStatusToString(kStatus)); + syncer::ConnectionStatusToString(kStatus)); EXPECT_CALL(mock_js_event_handler_, HandleJsEvent("onConnectionStatusChange", @@ -131,14 +131,14 @@ TEST_F(JsSyncManagerObserverTest, OnPassphraseRequired) { reason_passphrase_not_required_details.SetString( "reason", - csync::PassphraseRequiredReasonToString( - csync::REASON_PASSPHRASE_NOT_REQUIRED)); + syncer::PassphraseRequiredReasonToString( + syncer::REASON_PASSPHRASE_NOT_REQUIRED)); reason_encryption_details.SetString( "reason", - csync::PassphraseRequiredReasonToString(csync::REASON_ENCRYPTION)); + syncer::PassphraseRequiredReasonToString(syncer::REASON_ENCRYPTION)); reason_decryption_details.SetString( "reason", - csync::PassphraseRequiredReasonToString(csync::REASON_DECRYPTION)); + syncer::PassphraseRequiredReasonToString(syncer::REASON_DECRYPTION)); EXPECT_CALL(mock_js_event_handler_, HandleJsEvent("onPassphraseRequired", @@ -152,11 +152,11 @@ TEST_F(JsSyncManagerObserverTest, OnPassphraseRequired) { HasDetailsAsDictionary(reason_decryption_details))); js_sync_manager_observer_.OnPassphraseRequired( - csync::REASON_PASSPHRASE_NOT_REQUIRED, + syncer::REASON_PASSPHRASE_NOT_REQUIRED, sync_pb::EncryptedData()); - js_sync_manager_observer_.OnPassphraseRequired(csync::REASON_ENCRYPTION, + js_sync_manager_observer_.OnPassphraseRequired(syncer::REASON_ENCRYPTION, sync_pb::EncryptedData()); - js_sync_manager_observer_.OnPassphraseRequired(csync::REASON_DECRYPTION, + js_sync_manager_observer_.OnPassphraseRequired(syncer::REASON_DECRYPTION, sync_pb::EncryptedData()); PumpLoop(); } @@ -206,4 +206,4 @@ TEST_F(JsSyncManagerObserverTest, OnEncryptedTypesChanged) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h index dfcd2a8..4b1924f 100644 --- a/sync/internal_api/public/base_node.h +++ b/sync/internal_api/public/base_node.h @@ -42,7 +42,7 @@ class ThemeSpecifics; class TypedUrlSpecifics; } -namespace csync { +namespace syncer { class BaseTransaction; @@ -250,6 +250,6 @@ class BaseNode { DISALLOW_COPY_AND_ASSIGN(BaseNode); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_BASE_NODE_H_ diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h index 6e96a04..067239b 100644 --- a/sync/internal_api/public/base_transaction.h +++ b/sync/internal_api/public/base_transaction.h @@ -15,7 +15,7 @@ class BaseTransaction; class Directory; } -namespace csync { +namespace syncer { // Sync API's BaseTransaction, ReadTransaction, and WriteTransaction allow for // batching of several read and/or write operations. The read and write @@ -28,7 +28,7 @@ class BaseTransaction { public: // Provide access to the underlying syncable objects from BaseNode. virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; - csync::Cryptographer* GetCryptographer() const; + syncer::Cryptographer* GetCryptographer() const; syncable::Directory* GetDirectory() const { return directory_; @@ -47,8 +47,8 @@ class BaseTransaction { }; syncable::ModelTypeSet GetEncryptedTypes( - const csync::BaseTransaction* trans); + const syncer::BaseTransaction* trans); -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_BASE_TRANSACTION_H_ diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h index 90a21a0..5b27285 100644 --- a/sync/internal_api/public/change_record.h +++ b/sync/internal_api/public/change_record.h @@ -17,7 +17,7 @@ namespace base { class DictionaryValue; } // namespace base -namespace csync { +namespace syncer { // TODO(zea): One day get passwords playing nicely with the rest of encryption // and get rid of this. @@ -60,8 +60,8 @@ struct ChangeRecord { typedef std::vector<ChangeRecord> ChangeRecordList; -typedef csync::Immutable<ChangeRecordList> ImmutableChangeRecordList; +typedef syncer::Immutable<ChangeRecordList> ImmutableChangeRecordList; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_CHANGE_RECORD_H_ diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc index 132a880..b46ab99 100644 --- a/sync/internal_api/public/change_record_unittest.cc +++ b/sync/internal_api/public/change_record_unittest.cc @@ -14,7 +14,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using base::ExpectDictDictionaryValue; @@ -61,7 +61,7 @@ void CheckChangeRecordValue( EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get())); scoped_ptr<DictionaryValue> expected_specifics_value( - csync::EntitySpecificsToValue(record.specifics)); + syncer::EntitySpecificsToValue(record.specifics)); ExpectDictDictionaryValue(*expected_specifics_value, value, "specifics"); } @@ -134,4 +134,4 @@ TEST_F(ChangeRecordTest, ChangeRecordToValue) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/configure_reason.h b/sync/internal_api/public/configure_reason.h index 934c0e9..be77472 100644 --- a/sync/internal_api/public/configure_reason.h +++ b/sync/internal_api/public/configure_reason.h @@ -6,7 +6,7 @@ #define SYNC_INTERNAL_API_PUBLIC_CONFIGURE_REASON_H_ #pragma once -namespace csync { +namespace syncer { // Note: This should confirm with the enums in sync.proto for // GetUpdatesCallerInfo. They will have 1:1 mapping but this will only map @@ -31,6 +31,6 @@ enum ConfigureReason { CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE, }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_CONFIGURE_REASON_H_ diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc index f82b451..0bde89b 100644 --- a/sync/internal_api/public/engine/model_safe_worker.cc +++ b/sync/internal_api/public/engine/model_safe_worker.cc @@ -8,7 +8,7 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" -namespace csync { +namespace syncer { base::DictionaryValue* ModelSafeRoutingInfoToValue( const ModelSafeRoutingInfo& routing_info) { @@ -72,4 +72,4 @@ std::string ModelSafeGroupToString(ModelSafeGroup group) { ModelSafeWorker::~ModelSafeWorker() {} -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h index e1d6563..a78a322 100644 --- a/sync/internal_api/public/engine/model_safe_worker.h +++ b/sync/internal_api/public/engine/model_safe_worker.h @@ -19,7 +19,7 @@ namespace base { class DictionaryValue; } // namespace -namespace csync { +namespace syncer { typedef base::Callback<enum SyncerError(void)> WorkCallback; @@ -82,6 +82,6 @@ syncable::ModelTypeSet GetRoutingInfoTypes( ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, const ModelSafeRoutingInfo& routes); -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc index a8580e1..550c1b2 100644 --- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc +++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc @@ -8,7 +8,7 @@ #include "base/values.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class ModelSafeWorkerTest : public ::testing::Test { @@ -52,4 +52,4 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/engine/passive_model_worker.cc b/sync/internal_api/public/engine/passive_model_worker.cc index f33488e..10d20ee 100644 --- a/sync/internal_api/public/engine/passive_model_worker.cc +++ b/sync/internal_api/public/engine/passive_model_worker.cc @@ -6,7 +6,7 @@ #include "base/message_loop.h" -namespace csync { +namespace syncer { PassiveModelWorker::PassiveModelWorker(const MessageLoop* sync_loop) : sync_loop_(sync_loop) {} @@ -25,4 +25,4 @@ ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() { return GROUP_PASSIVE; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/engine/passive_model_worker.h b/sync/internal_api/public/engine/passive_model_worker.h index bb0870a..1ef9864 100644 --- a/sync/internal_api/public/engine/passive_model_worker.h +++ b/sync/internal_api/public/engine/passive_model_worker.h @@ -13,7 +13,7 @@ class MessageLoop; -namespace csync { +namespace syncer { // Implementation of ModelSafeWorker for passive types. All work is // done on the same thread DoWorkAndWaitUntilDone (i.e., the sync @@ -35,6 +35,6 @@ class PassiveModelWorker : public ModelSafeWorker { DISALLOW_COPY_AND_ASSIGN(PassiveModelWorker); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_PASSIVE_MODEL_WORKER_H_ diff --git a/sync/internal_api/public/engine/polling_constants.cc b/sync/internal_api/public/engine/polling_constants.cc index bebf180..d65994b 100644 --- a/sync/internal_api/public/engine/polling_constants.cc +++ b/sync/internal_api/public/engine/polling_constants.cc @@ -5,7 +5,7 @@ #include "base/basictypes.h" #include "sync/internal_api/public/engine/polling_constants.h" -namespace csync { +namespace syncer { // Server can overwrite these values via client commands. // Standard short poll. This is used when XMPP is off. @@ -22,5 +22,5 @@ const int64 kMaxBackoffSeconds = 60 * 60 * 4; // 4 hours. // Backoff interval randomization factor. const int kBackoffRandomizationFactor = 2; -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/engine/polling_constants.h b/sync/internal_api/public/engine/polling_constants.h index cb7f5f5..94b375b 100644 --- a/sync/internal_api/public/engine/polling_constants.h +++ b/sync/internal_api/public/engine/polling_constants.h @@ -8,13 +8,13 @@ #define SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_ #pragma once -namespace csync { +namespace syncer { extern const int64 kDefaultShortPollIntervalSeconds; extern const int64 kDefaultLongPollIntervalSeconds; extern const int64 kMaxBackoffSeconds; extern const int kBackoffRandomizationFactor; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_ diff --git a/sync/internal_api/public/engine/sync_status.cc b/sync/internal_api/public/engine/sync_status.cc index 7d17269..9ed3bf3 100644 --- a/sync/internal_api/public/engine/sync_status.cc +++ b/sync/internal_api/public/engine/sync_status.cc @@ -4,7 +4,7 @@ #include "sync/internal_api/public/engine/sync_status.h" -namespace csync { +namespace syncer { SyncStatus::SyncStatus() : notifications_enabled(false), @@ -36,4 +36,4 @@ SyncStatus::SyncStatus() SyncStatus::~SyncStatus() { } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h index 3ded90c..cb15adc 100644 --- a/sync/internal_api/public/engine/sync_status.h +++ b/sync/internal_api/public/engine/sync_status.h @@ -10,7 +10,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/protocol/sync_protocol_error.h" -namespace csync { +namespace syncer { // Status encapsulates detailed state about the internals of the SyncManager. // @@ -29,7 +29,7 @@ struct SyncStatus { // Notifications counters updated by the actions in synapi. int notifications_received; - csync::SyncProtocolError sync_protocol_error; + syncer::SyncProtocolError sync_protocol_error; // Number of encryption conflicts counted during most recent sync cycle. int encryption_conflicts; @@ -91,6 +91,6 @@ struct SyncStatus { std::string unique_id; }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_STATUS_SUMMARY_H_ diff --git a/sync/internal_api/public/http_bridge.h b/sync/internal_api/public/http_bridge.h index cec5526..74eaa2c 100644 --- a/sync/internal_api/public/http_bridge.h +++ b/sync/internal_api/public/http_bridge.h @@ -38,7 +38,7 @@ namespace browser_sync { // It is RefCountedThreadSafe because it can PostTask to the io loop, and thus // needs to stick around across context switches, etc. class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, - public csync::HttpPostProviderInterface, + public syncer::HttpPostProviderInterface, public net::URLFetcherDelegate { public: // A request context used for HTTP requests bridged from the sync backend. @@ -98,7 +98,7 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, explicit HttpBridge(RequestContextGetter* context); - // csync::HttpPostProvider implementation. + // syncer::HttpPostProvider implementation. virtual void SetExtraRequestHeaders(const char* headers) OVERRIDE; virtual void SetURL(const char* url, int port) OVERRIDE; virtual void SetPostPayload(const char* content_type, int content_length, @@ -205,16 +205,16 @@ class HttpBridge : public base::RefCountedThreadSafe<HttpBridge>, DISALLOW_COPY_AND_ASSIGN(HttpBridge); }; -class HttpBridgeFactory : public csync::HttpPostProviderFactory { +class HttpBridgeFactory : public syncer::HttpPostProviderFactory { public: HttpBridgeFactory( net::URLRequestContextGetter* baseline_context_getter, const std::string& user_agent); virtual ~HttpBridgeFactory(); - // csync::HttpPostProviderFactory: - virtual csync::HttpPostProviderInterface* Create() OVERRIDE; - virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE; + // syncer::HttpPostProviderFactory: + virtual syncer::HttpPostProviderInterface* Create() OVERRIDE; + virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE; private: // This request context is built on top of the baseline context and shares diff --git a/sync/internal_api/public/http_post_provider_factory.h b/sync/internal_api/public/http_post_provider_factory.h index 709008d..8c5a991 100644 --- a/sync/internal_api/public/http_post_provider_factory.h +++ b/sync/internal_api/public/http_post_provider_factory.h @@ -6,7 +6,7 @@ #define SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_ #pragma once -namespace csync { +namespace syncer { class HttpPostProviderInterface; @@ -29,6 +29,6 @@ class HttpPostProviderFactory { virtual void Destroy(HttpPostProviderInterface* http) = 0; }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_FACTORY_H_ diff --git a/sync/internal_api/public/http_post_provider_interface.h b/sync/internal_api/public/http_post_provider_interface.h index 378e18f..3f5e74e 100644 --- a/sync/internal_api/public/http_post_provider_interface.h +++ b/sync/internal_api/public/http_post_provider_interface.h @@ -8,7 +8,7 @@ #include <string> -namespace csync { +namespace syncer { // An interface the embedding application (e.g. Chromium) implements to provide // required HTTP POST functionality to the syncer backend. This interface is @@ -58,6 +58,6 @@ class HttpPostProviderInterface { virtual ~HttpPostProviderInterface() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_HTTP_POST_PROVIDER_INTERFACE_H_ diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h index a4bd40f..c2a9428 100644 --- a/sync/internal_api/public/read_node.h +++ b/sync/internal_api/public/read_node.h @@ -13,7 +13,7 @@ #include "sync/internal_api/public/base_node.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { // ReadNode wraps a syncable::Entry to provide the functionality of a // read-only BaseNode. @@ -61,6 +61,6 @@ class ReadNode : public BaseNode { DISALLOW_COPY_AND_ASSIGN(ReadNode); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_READ_NODE_H_ diff --git a/sync/internal_api/public/read_transaction.h b/sync/internal_api/public/read_transaction.h index ba5610b..b7bcff3 100644 --- a/sync/internal_api/public/read_transaction.h +++ b/sync/internal_api/public/read_transaction.h @@ -12,7 +12,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { struct UserShare; @@ -41,6 +41,6 @@ class ReadTransaction : public BaseTransaction { DISALLOW_COPY_AND_ASSIGN(ReadTransaction); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_READ_TRANSACTION_H_ diff --git a/sync/internal_api/public/sessions/model_neutral_state.cc b/sync/internal_api/public/sessions/model_neutral_state.cc index 82d9a35..b25d3c7 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.cc +++ b/sync/internal_api/public/sessions/model_neutral_state.cc @@ -4,7 +4,7 @@ #include "sync/internal_api/public/sessions/model_neutral_state.h" -namespace csync { +namespace syncer { namespace sessions { ModelNeutralState::ModelNeutralState() @@ -26,4 +26,4 @@ ModelNeutralState::ModelNeutralState() ModelNeutralState::~ModelNeutralState() {} } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h index c9f93c8..fa127b0 100644 --- a/sync/internal_api/public/sessions/model_neutral_state.h +++ b/sync/internal_api/public/sessions/model_neutral_state.h @@ -11,7 +11,7 @@ #include "sync/protocol/sync.pb.h" #include "sync/protocol/sync_protocol_error.h" -namespace csync { +namespace syncer { namespace sessions { // Grouping of all state that applies to all model types. Note that some @@ -69,6 +69,6 @@ struct ModelNeutralState { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_MODEL_NEUTRAL_STATE_H_ diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index 6c6de86..74fba25 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.cc +++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc @@ -7,7 +7,7 @@ #include "base/json/json_writer.h" #include "base/values.h" -namespace csync { +namespace syncer { namespace sessions { SyncSessionSnapshot::SyncSessionSnapshot() @@ -170,4 +170,4 @@ bool SyncSessionSnapshot::retry_scheduled() const { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h index 1ec188f..9029132 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.h +++ b/sync/internal_api/public/sessions/sync_session_snapshot.h @@ -19,7 +19,7 @@ namespace base { class DictionaryValue; } -namespace csync { +namespace syncer { namespace sessions { // An immutable snapshot of state from a SyncSession. Convenient to use as @@ -91,6 +91,6 @@ class SyncSessionSnapshot { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SESSION_SNAPSHOT_H_ diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc index 1b6d72d..e4536ee 100644 --- a/sync/internal_api/public/sessions/sync_source_info.cc +++ b/sync/internal_api/public/sessions/sync_source_info.cc @@ -7,7 +7,7 @@ #include "base/values.h" #include "sync/protocol/proto_enum_conversions.h" -namespace csync { +namespace syncer { namespace sessions { SyncSourceInfo::SyncSourceInfo() @@ -33,4 +33,4 @@ DictionaryValue* SyncSourceInfo::ToValue() const { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h index cbd66d0..6902b26 100644 --- a/sync/internal_api/public/sessions/sync_source_info.h +++ b/sync/internal_api/public/sessions/sync_source_info.h @@ -15,7 +15,7 @@ namespace base { class DictionaryValue; } -namespace csync { +namespace syncer { namespace sessions { // A container for the source of a sync session. This includes the update @@ -37,6 +37,6 @@ struct SyncSourceInfo { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SOURCE_INFO_H_ diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index 3a2cf2e..3b7164d 100644 --- a/sync/internal_api/public/sync_manager.h +++ b/sync/internal_api/public/sync_manager.h @@ -25,7 +25,7 @@ #include "sync/internal_api/public/util/weak_handle.h" #include "sync/protocol/sync_protocol_error.h" -namespace csync { +namespace syncer { class Encryptor; struct Experiments; class ExtensionsActivityMonitor; @@ -35,17 +35,17 @@ class JsEventHandler; namespace sessions { class SyncSessionSnapshot; } // namespace sessions -} // namespace csync +} // namespace syncer -namespace csync { +namespace syncer { class SyncNotifier; -} // namespace csync +} // namespace syncer namespace sync_pb { class EncryptedData; } // namespace sync_pb -namespace csync { +namespace syncer { class BaseTransaction; class HttpPostProviderFactory; @@ -58,7 +58,7 @@ enum ConnectionStatus { CONNECTION_SERVER_ERROR }; -// Reasons due to which csync::Cryptographer might require a passphrase. +// Reasons due to which syncer::Cryptographer might require a passphrase. enum PassphraseRequiredReason { REASON_PASSPHRASE_NOT_REQUIRED = 0, // Initial value. REASON_ENCRYPTION = 1, // The cryptographer requires a @@ -184,7 +184,7 @@ class SyncManager { // A round-trip sync-cycle took place and the syncer has resolved any // conflicts that may have arisen. virtual void OnSyncCycleCompleted( - const csync::sessions::SyncSessionSnapshot& snapshot) = 0; + const syncer::sessions::SyncSessionSnapshot& snapshot) = 0; // Called when the status of the connection to the sync server has // changed. @@ -300,7 +300,7 @@ class SyncManager { // function getChildNodeIds(id); virtual void OnInitializationComplete( - const csync::WeakHandle<csync::JsBackend>& + const syncer::WeakHandle<syncer::JsBackend>& js_backend, bool success) = 0; // We are no longer permitted to communicate with the server. Sync should @@ -334,7 +334,7 @@ class SyncManager { virtual void OnEncryptionComplete() = 0; virtual void OnActionableError( - const csync::SyncProtocolError& sync_protocol_error) = 0; + const syncer::SyncProtocolError& sync_protocol_error) = 0; protected: virtual ~Observer(); @@ -372,26 +372,26 @@ class SyncManager { // TODO(akalin): Replace the |post_factory| parameter with a // URLFetcher parameter. bool Init(const FilePath& database_location, - const csync::WeakHandle<csync::JsEventHandler>& + const syncer::WeakHandle<syncer::JsEventHandler>& event_handler, const std::string& sync_server_and_path, int sync_server_port, bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const csync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<csync::ModelSafeWorker*>& workers, - csync::ExtensionsActivityMonitor* + const syncer::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<syncer::ModelSafeWorker*>& workers, + syncer::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const SyncCredentials& credentials, - csync::SyncNotifier* sync_notifier, + syncer::SyncNotifier* sync_notifier, const std::string& restored_key_for_bootstrapping, TestingMode testing_mode, - csync::Encryptor* encryptor, - csync::UnrecoverableErrorHandler* + syncer::Encryptor* encryptor, + syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, - csync::ReportUnrecoverableErrorFunction + syncer::ReportUnrecoverableErrorFunction report_unrecoverable_error_function); // Throw an unrecoverable error from a transaction (mostly used for @@ -409,7 +409,7 @@ class SyncManager { // Put the syncer in normal mode ready to perform nudges and polls. void StartSyncingNormally( - const csync::ModelSafeRoutingInfo& routing_info); + const syncer::ModelSafeRoutingInfo& routing_info); // Attempts to re-encrypt encrypted data types using the passphrase provided. // Notifies observers of the result of the operation via OnPassphraseAccepted @@ -436,12 +436,12 @@ class SyncManager { // Switches the mode of operation to CONFIGURATION_MODE and // schedules a config task to fetch updates for |types|. - void RequestConfig(const csync::ModelSafeRoutingInfo& routing_info, + void RequestConfig(const syncer::ModelSafeRoutingInfo& routing_info, const syncable::ModelTypeSet& types, - csync::ConfigureReason reason); + syncer::ConfigureReason reason); void RequestCleanupDisabledTypes( - const csync::ModelSafeRoutingInfo& routing_info); + const syncer::ModelSafeRoutingInfo& routing_info); // Adds a listener to be notified of sync events. // NOTE: It is OK (in fact, it's probably a good idea) to call this before @@ -516,7 +516,7 @@ class SyncManager { // Reads the nigori node to determine if any experimental features should // be enabled. // Note: opens a transaction. May be called on any thread. - bool ReceivedExperiment(csync::Experiments* experiments) const; + bool ReceivedExperiment(syncer::Experiments* experiments) const; // Uses a read-only transaction to determine if the directory being synced has // any remaining unsynced items. May be called on any thread. @@ -555,13 +555,13 @@ bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share); syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( syncable::ModelTypeSet types, - csync::UserShare* share); + syncer::UserShare* share); const char* ConnectionStatusToString(ConnectionStatus status); // Returns the string representation of a PassphraseRequiredReason value. const char* PassphraseRequiredReasonToString(PassphraseRequiredReason reason); -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ diff --git a/sync/internal_api/public/syncable/model_type.h b/sync/internal_api/public/syncable/model_type.h index c8a9905..e134ee6 100644 --- a/sync/internal_api/public/syncable/model_type.h +++ b/sync/internal_api/public/syncable/model_type.h @@ -90,9 +90,9 @@ enum ModelType { MODEL_TYPE_COUNT, }; -typedef csync::EnumSet< +typedef syncer::EnumSet< ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> ModelTypeSet; -typedef csync::EnumSet< +typedef syncer::EnumSet< ModelType, UNSPECIFIED, LAST_REAL_MODEL_TYPE> FullModelTypeSet; inline ModelType ModelTypeFromInt(int i) { diff --git a/sync/internal_api/public/syncable/model_type_payload_map.cc b/sync/internal_api/public/syncable/model_type_payload_map.cc index b803b39..97646b7c 100644 --- a/sync/internal_api/public/syncable/model_type_payload_map.cc +++ b/sync/internal_api/public/syncable/model_type_payload_map.cc @@ -11,7 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" -using csync::ModelSafeRoutingInfo; +using syncer::ModelSafeRoutingInfo; namespace syncable { ModelTypePayloadMap ModelTypePayloadMapFromEnumSet( @@ -36,10 +36,10 @@ ModelTypeSet ModelTypePayloadMapToEnumSet( } ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo( - const csync::ModelSafeRoutingInfo& routes, + const syncer::ModelSafeRoutingInfo& routes, const std::string& payload) { ModelTypePayloadMap types_with_payloads; - for (csync::ModelSafeRoutingInfo::const_iterator i = routes.begin(); + for (syncer::ModelSafeRoutingInfo::const_iterator i = routes.begin(); i != routes.end(); ++i) { types_with_payloads[i->first] = payload; } diff --git a/sync/internal_api/public/syncable/model_type_payload_map.h b/sync/internal_api/public/syncable/model_type_payload_map.h index 8f3319a..5ea9919 100644 --- a/sync/internal_api/public/syncable/model_type_payload_map.h +++ b/sync/internal_api/public/syncable/model_type_payload_map.h @@ -37,7 +37,7 @@ ModelTypeSet ModelTypePayloadMapToEnumSet( // Make a TypePayloadMap for all the enabled types in a // ModelSafeRoutingInfo using a default payload. ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo( - const csync::ModelSafeRoutingInfo& routes, + const syncer::ModelSafeRoutingInfo& routes, const std::string& payload); std::string ModelTypePayloadMapToString( @@ -53,7 +53,7 @@ void CoalescePayloads(ModelTypePayloadMap* original, const ModelTypePayloadMap& update); void PurgeStalePayload(ModelTypePayloadMap* original, - const csync::ModelSafeRoutingInfo& routing_info); + const syncer::ModelSafeRoutingInfo& routing_info); } // namespace syncable diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h index 9eed71d..bb96f2f 100644 --- a/sync/internal_api/public/test/test_entry_factory.h +++ b/sync/internal_api/public/test/test_entry_factory.h @@ -16,7 +16,7 @@ class Directory; class Id; } -namespace csync { +namespace syncer { class TestEntryFactory { public: @@ -65,6 +65,6 @@ class TestEntryFactory { DISALLOW_COPY_AND_ASSIGN(TestEntryFactory); }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_TEST_ENTRY_FACTORY_H_ diff --git a/sync/internal_api/public/test/test_user_share.h b/sync/internal_api/public/test/test_user_share.h index 3c11d49..0fb1503 100644 --- a/sync/internal_api/public/test/test_user_share.h +++ b/sync/internal_api/public/test/test_user_share.h @@ -3,7 +3,7 @@ // found in the LICENSE file. // // A handy class that takes care of setting up and destroying a -// csync::UserShare instance for unit tests that require one. +// syncer::UserShare instance for unit tests that require one. // // The expected usage is to make this a component of your test fixture: // @@ -22,7 +22,7 @@ // Then, in your tests: // // TEST_F(AwesomenessTest, IsMaximal) { -// csync::ReadTransaction trans(test_user_share_.user_share()); +// syncer::ReadTransaction trans(test_user_share_.user_share()); // ... // } // @@ -34,7 +34,7 @@ #include "base/basictypes.h" #include "sync/internal_api/public/user_share.h" -namespace csync { +namespace syncer { class TestDirectorySetterUpper; @@ -54,15 +54,15 @@ class TestUserShare { void TearDown(); // Non-NULL iff called between a call to SetUp() and TearDown(). - csync::UserShare* user_share(); + syncer::UserShare* user_share(); private: scoped_ptr<TestDirectorySetterUpper> dir_maker_; - scoped_ptr<csync::UserShare> user_share_; + scoped_ptr<syncer::UserShare> user_share_; DISALLOW_COPY_AND_ASSIGN(TestUserShare); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_ diff --git a/sync/internal_api/public/user_share.h b/sync/internal_api/public/user_share.h index 95eb7f2..d7936a4 100644 --- a/sync/internal_api/public/user_share.h +++ b/sync/internal_api/public/user_share.h @@ -14,7 +14,7 @@ namespace syncable { class Directory; } -namespace csync { +namespace syncer { // A UserShare encapsulates the syncable pieces that represent an authenticated // user and their data (share). @@ -31,6 +31,6 @@ struct UserShare { std::string name; }; -} +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_USER_SHARE_H_ diff --git a/sync/internal_api/public/util/enum_set.h b/sync/internal_api/public/util/enum_set.h index 1a989ed..911ad12 100644 --- a/sync/internal_api/public/util/enum_set.h +++ b/sync/internal_api/public/util/enum_set.h @@ -13,7 +13,7 @@ #include "base/basictypes.h" #include "base/logging.h" -namespace csync { +namespace syncer { // Forward declarations needed for friend declarations. template <typename E, E MinEnumValue, E MaxEnumValue> @@ -281,6 +281,6 @@ EnumSet<E, Min, Max> Difference(EnumSet<E, Min, Max> set1, return EnumSet<E, Min, Max>(set1.enums_ & ~set2.enums_); } -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_ENUM_SET_H_ diff --git a/sync/internal_api/public/util/enum_set_unittest.cc b/sync/internal_api/public/util/enum_set_unittest.cc index 1f6223c..5f222c6 100644 --- a/sync/internal_api/public/util/enum_set_unittest.cc +++ b/sync/internal_api/public/util/enum_set_unittest.cc @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { enum TestEnum { @@ -192,4 +192,4 @@ TEST_F(EnumSetTest, Difference) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h index f13c09a..c6febe8 100644 --- a/sync/internal_api/public/util/experiments.h +++ b/sync/internal_api/public/util/experiments.h @@ -8,7 +8,7 @@ #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { // A structure to hold the enable status of experimental sync features. struct Experiments { @@ -23,6 +23,6 @@ struct Experiments { bool sync_tab_favicons; }; -} +} // namespace syncer #endif // SYNC_UTIL_EXPERIMENTS_ diff --git a/sync/internal_api/public/util/immutable.h b/sync/internal_api/public/util/immutable.h index 3c20a4f..1742c0e 100644 --- a/sync/internal_api/public/util/immutable.h +++ b/sync/internal_api/public/util/immutable.h @@ -26,7 +26,7 @@ // undesirable. Here's the above code re-written using Immutable<T>: // // void ProcessStuff( -// const csync::Immutable<LargeObjectList>& stuff) { +// const syncer::Immutable<LargeObjectList>& stuff) { // for (LargeObjectList::const_iterator it = stuff.Get().begin(); // it != stuff.Get().end(); ++it) { // ... process it ... @@ -72,7 +72,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" -namespace csync { +namespace syncer { namespace internal { // This class is part of the Immutable implementation. DO NOT USE @@ -257,6 +257,6 @@ Immutable<T> MakeImmutable(T* t) { return Immutable<T>(t); } -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_IMMUTABLE_H_ diff --git a/sync/internal_api/public/util/immutable_unittest.cc b/sync/internal_api/public/util/immutable_unittest.cc index e124b70..f8494b6 100644 --- a/sync/internal_api/public/util/immutable_unittest.cc +++ b/sync/internal_api/public/util/immutable_unittest.cc @@ -16,7 +16,7 @@ #include "base/memory/ref_counted.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { // Helper class that keeps track of the token passed in at // construction and how many times that token is copied. @@ -102,20 +102,20 @@ void swap(ADLToken& t1, ADLToken& t2) { t1.Swap(&t2); } -} // namespace csync +} // namespace syncer // Allowed by the standard (17.4.3.1/1). namespace std { template <> -void swap(csync::SpecializationToken& t1, - csync::SpecializationToken& t2) { +void swap(syncer::SpecializationToken& t1, + syncer::SpecializationToken& t2) { t1.Swap(&t2); } } // namespace -namespace csync { +namespace syncer { namespace { class ImmutableTest : public ::testing::Test {}; @@ -247,4 +247,4 @@ TEST_F(ImmutableTest, Set) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/util/report_unrecoverable_error_function.h b/sync/internal_api/public/util/report_unrecoverable_error_function.h index dfe00a8..a6aec0f2 100644 --- a/sync/internal_api/public/util/report_unrecoverable_error_function.h +++ b/sync/internal_api/public/util/report_unrecoverable_error_function.h @@ -6,7 +6,7 @@ #define SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_ #pragma once -namespace csync { +namespace syncer { // A ReportUnrecoverableErrorFunction is a function that is called // immediately when an unrecoverable error is encountered. Unlike @@ -14,6 +14,6 @@ namespace csync { // context surrounding it. typedef void (*ReportUnrecoverableErrorFunction)(void); -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_REPORT_UNRECOVERABLE_ERROR_FUNCTION_H_ diff --git a/sync/internal_api/public/util/syncer_error.cc b/sync/internal_api/public/util/syncer_error.cc index 57cd4ed..d77821d 100644 --- a/sync/internal_api/public/util/syncer_error.cc +++ b/sync/internal_api/public/util/syncer_error.cc @@ -6,7 +6,7 @@ #include "base/logging.h" -namespace csync { +namespace syncer { #define ENUM_CASE(x) case x: return #x; break; const char* GetSyncerErrorString(SyncerError value) { @@ -32,5 +32,4 @@ const char* GetSyncerErrorString(SyncerError value) { } #undef ENUM_CASE -} // namespace csync - +} // namespace syncer diff --git a/sync/internal_api/public/util/syncer_error.h b/sync/internal_api/public/util/syncer_error.h index 8df8afd..f895066 100644 --- a/sync/internal_api/public/util/syncer_error.h +++ b/sync/internal_api/public/util/syncer_error.h @@ -6,7 +6,7 @@ #define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ #pragma once -namespace csync { +namespace syncer { // This enum describes all the ways a SyncerCommand can fail. // @@ -41,6 +41,6 @@ enum SyncerError { const char * GetSyncerErrorString(SyncerError); -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ diff --git a/sync/internal_api/public/util/unrecoverable_error_handler.h b/sync/internal_api/public/util/unrecoverable_error_handler.h index a96a487..82644ee 100644 --- a/sync/internal_api/public/util/unrecoverable_error_handler.h +++ b/sync/internal_api/public/util/unrecoverable_error_handler.h @@ -10,7 +10,7 @@ #include "base/location.h" -namespace csync { +namespace syncer { class UnrecoverableErrorHandler { public: @@ -24,7 +24,6 @@ class UnrecoverableErrorHandler { virtual ~UnrecoverableErrorHandler() { } }; -} +} // namespace syncer #endif // SYNC_UTIL_UNRECOVERABLE_ERROR_HANDLER_H_ - diff --git a/sync/internal_api/public/util/unrecoverable_error_info.cc b/sync/internal_api/public/util/unrecoverable_error_info.cc index ae17d2f..2234650 100644 --- a/sync/internal_api/public/util/unrecoverable_error_info.cc +++ b/sync/internal_api/public/util/unrecoverable_error_info.cc @@ -4,7 +4,7 @@ #include "sync/internal_api/public/util/unrecoverable_error_info.h" -namespace csync { +namespace syncer { UnrecoverableErrorInfo::UnrecoverableErrorInfo() : is_set_(false) { @@ -41,4 +41,4 @@ const std::string& UnrecoverableErrorInfo::message() const { return message_; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/util/unrecoverable_error_info.h b/sync/internal_api/public/util/unrecoverable_error_info.h index 6e8af72..912b51e 100644 --- a/sync/internal_api/public/util/unrecoverable_error_info.h +++ b/sync/internal_api/public/util/unrecoverable_error_info.h @@ -12,7 +12,7 @@ #include "base/location.h" -namespace csync { +namespace syncer { class UnrecoverableErrorInfo { public: @@ -36,6 +36,6 @@ class UnrecoverableErrorInfo { bool is_set_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_UNRECOVERABLE_ERROR_INFO_H_ diff --git a/sync/internal_api/public/util/weak_handle.cc b/sync/internal_api/public/util/weak_handle.cc index 9de3f9b..e6411ee 100644 --- a/sync/internal_api/public/util/weak_handle.cc +++ b/sync/internal_api/public/util/weak_handle.cc @@ -10,7 +10,7 @@ #include "base/location.h" #include "base/message_loop_proxy.h" -namespace csync { +namespace syncer { namespace internal { @@ -33,4 +33,4 @@ void WeakHandleCoreBase::PostToOwnerThread( } // namespace internal -} // namespace base +} // namespace syncer diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h index fc7909e..9441949 100644 --- a/sync/internal_api/public/util/weak_handle.h +++ b/sync/internal_api/public/util/weak_handle.h @@ -68,7 +68,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { template <typename T> class WeakHandle; @@ -286,7 +286,7 @@ class WeakHandle { // Note that this doesn't override the regular copy constructor, so // that one can be called on any thread. template <typename U> - WeakHandle(const csync::WeakHandle<U>& other) // NOLINT + WeakHandle(const syncer::WeakHandle<U>& other) // NOLINT : core_( other.IsInitialized() ? new internal::WeakHandleCore<T>(other.Get()) : @@ -374,6 +374,6 @@ WeakHandle<T> MakeWeakHandle(const base::WeakPtr<T>& ptr) { return WeakHandle<T>(ptr); } -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_WEAK_HANDLE_H_ diff --git a/sync/internal_api/public/util/weak_handle_unittest.cc b/sync/internal_api/public/util/weak_handle_unittest.cc index 67c7b20..c770a29 100644 --- a/sync/internal_api/public/util/weak_handle_unittest.cc +++ b/sync/internal_api/public/util/weak_handle_unittest.cc @@ -13,7 +13,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using ::testing::_; using ::testing::SaveArg; @@ -323,4 +323,4 @@ TEST_F(WeakHandleTest, TypeConversionConstructorUninitializedAssignment) { EXPECT_FALSE(base_weak_handle.IsInitialized()); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h index c99b3a0..b113187 100644 --- a/sync/internal_api/public/write_node.h +++ b/sync/internal_api/public/write_node.h @@ -14,7 +14,7 @@ #include "sync/internal_api/public/base_node.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { class Cryptographer; class TestBookmarkModelAssociator; } @@ -38,7 +38,7 @@ class ThemeSpecifics; class TypedUrlSpecifics; } -namespace csync { +namespace syncer { class WriteTransaction; @@ -199,6 +199,6 @@ class WriteNode : public BaseNode { DISALLOW_COPY_AND_ASSIGN(WriteNode); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_NODE_H_ diff --git a/sync/internal_api/public/write_transaction.h b/sync/internal_api/public/write_transaction.h index b2de9a1..e72ae71 100644 --- a/sync/internal_api/public/write_transaction.h +++ b/sync/internal_api/public/write_transaction.h @@ -18,7 +18,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { // Sync API's WriteTransaction is a read/write BaseTransaction. It wraps // a syncable::WriteTransaction. @@ -52,6 +52,6 @@ class WriteTransaction : public BaseTransaction { DISALLOW_COPY_AND_ASSIGN(WriteTransaction); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_PUBLIC_WRITE_TRANSACTION_H_ diff --git a/sync/internal_api/read_node.cc b/sync/internal_api/read_node.cc index 019ba1d..6f7fc35 100644 --- a/sync/internal_api/read_node.cc +++ b/sync/internal_api/read_node.cc @@ -9,7 +9,7 @@ #include "sync/syncable/base_transaction.h" #include "sync/syncable/entry.h" -namespace csync { +namespace syncer { ////////////////////////////////////////////////////////////////////////// // ReadNode member definitions @@ -95,4 +95,4 @@ BaseNode::InitByLookupResult ReadNode::InitByTagLookup( return DecryptIfNecessary() ? INIT_OK : INIT_FAILED_DECRYPT_IF_NECESSARY; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/read_transaction.cc b/sync/internal_api/read_transaction.cc index 7b6e117..32296f7 100644 --- a/sync/internal_api/read_transaction.cc +++ b/sync/internal_api/read_transaction.cc @@ -6,7 +6,7 @@ #include "sync/syncable/read_transaction.h" -namespace csync { +namespace syncer { ////////////////////////////////////////////////////////////////////////// // ReadTransaction member definitions @@ -35,4 +35,4 @@ syncable::BaseTransaction* ReadTransaction::GetWrappedTrans() const { return transaction_; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc index 53916d9..efdd5a5 100644 --- a/sync/internal_api/sync_manager.cc +++ b/sync/internal_api/sync_manager.cc @@ -62,30 +62,30 @@ #include "sync/util/time.h" using base::TimeDelta; -using csync::AllStatus; -using csync::Cryptographer; -using csync::Encryptor; -using csync::JsArgList; -using csync::JsBackend; -using csync::JsEventDetails; -using csync::JsEventHandler; -using csync::JsEventHandler; -using csync::JsReplyHandler; -using csync::JsMutationEventObserver; -using csync::JsSyncManagerObserver; -using csync::kNigoriTag; -using csync::KeyParams; -using csync::ModelSafeRoutingInfo; -using csync::ReportUnrecoverableErrorFunction; -using csync::ServerConnectionEvent; -using csync::ServerConnectionEventListener; -using csync::SyncEngineEvent; -using csync::SyncEngineEventListener; -using csync::SyncScheduler; -using csync::Syncer; -using csync::UnrecoverableErrorHandler; -using csync::WeakHandle; -using csync::sessions::SyncSessionContext; +using syncer::AllStatus; +using syncer::Cryptographer; +using syncer::Encryptor; +using syncer::JsArgList; +using syncer::JsBackend; +using syncer::JsEventDetails; +using syncer::JsEventHandler; +using syncer::JsEventHandler; +using syncer::JsReplyHandler; +using syncer::JsMutationEventObserver; +using syncer::JsSyncManagerObserver; +using syncer::kNigoriTag; +using syncer::KeyParams; +using syncer::ModelSafeRoutingInfo; +using syncer::ReportUnrecoverableErrorFunction; +using syncer::ServerConnectionEvent; +using syncer::ServerConnectionEventListener; +using syncer::SyncEngineEvent; +using syncer::SyncEngineEventListener; +using syncer::SyncScheduler; +using syncer::Syncer; +using syncer::UnrecoverableErrorHandler; +using syncer::WeakHandle; +using syncer::sessions::SyncSessionContext; using syncable::ImmutableWriteTransactionInfo; using syncable::ModelType; using syncable::ModelTypeSet; @@ -99,15 +99,15 @@ static const int kSyncRefreshDelayMsec = 500; static const int kSyncSchedulerDelayMsec = 250; GetUpdatesCallerInfo::GetUpdatesSource GetSourceFromReason( - csync::ConfigureReason reason) { + syncer::ConfigureReason reason) { switch (reason) { - case csync::CONFIGURE_REASON_RECONFIGURATION: + case syncer::CONFIGURE_REASON_RECONFIGURATION: return GetUpdatesCallerInfo::RECONFIGURATION; - case csync::CONFIGURE_REASON_MIGRATION: + case syncer::CONFIGURE_REASON_MIGRATION: return GetUpdatesCallerInfo::MIGRATION; - case csync::CONFIGURE_REASON_NEW_CLIENT: + case syncer::CONFIGURE_REASON_NEW_CLIENT: return GetUpdatesCallerInfo::NEW_CLIENT; - case csync::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE: + case syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE: return GetUpdatesCallerInfo::NEWLY_SUPPORTED_DATATYPE; default: NOTREACHED(); @@ -122,7 +122,7 @@ static const int kNigoriOverwriteLimit = 10; } // namespace -namespace csync { +namespace syncer { const int SyncManager::kDefaultNudgeDelayMilliseconds = 200; const int SyncManager::kPreferencesNudgeDelayMilliseconds = 2000; @@ -135,8 +135,8 @@ const unsigned int kMaxMessageSizeToRecord = 5 * 1024; // SyncManager's implementation: SyncManager::SyncInternal class SyncManager::SyncInternal : public net::NetworkChangeNotifier::IPAddressObserver, - public csync::Cryptographer::Observer, - public csync::SyncNotifierObserver, + public syncer::Cryptographer::Observer, + public syncer::SyncNotifierObserver, public JsBackend, public SyncEngineEventListener, public ServerConnectionEventListener, @@ -201,13 +201,13 @@ class SyncManager::SyncInternal bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const csync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<csync::ModelSafeWorker*>& workers, - csync::ExtensionsActivityMonitor* + const syncer::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<syncer::ModelSafeWorker*>& workers, + syncer::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const SyncCredentials& credentials, - csync::SyncNotifier* sync_notifier, + syncer::SyncNotifier* sync_notifier, const std::string& restored_key_for_bootstrapping, TestingMode testing_mode, Encryptor* encryptor, @@ -229,7 +229,7 @@ class SyncManager::SyncInternal // Tell the sync engine to start the syncing process. void StartSyncingNormally( - const csync::ModelSafeRoutingInfo& routing_info); + const syncer::ModelSafeRoutingInfo& routing_info); // Whether or not the Nigori node is encrypted using an explicit passphrase. bool IsUsingExplicitPassphrase(); @@ -325,10 +325,10 @@ class SyncManager::SyncInternal // SyncNotifierObserver implementation. virtual void OnNotificationsEnabled() OVERRIDE; virtual void OnNotificationsDisabled( - csync::NotificationsDisabledReason reason) OVERRIDE; + syncer::NotificationsDisabledReason reason) OVERRIDE; virtual void OnIncomingNotification( const syncable::ModelTypePayloadMap& type_payloads, - csync::IncomingNotificationSource source) OVERRIDE; + syncer::IncomingNotificationSource source) OVERRIDE; void AddObserver(SyncManager::Observer* observer); void RemoveObserver(SyncManager::Observer* observer); @@ -553,7 +553,7 @@ class SyncManager::SyncInternal // This can be called from any thread, but only between calls to // OpenDirectory() and ShutdownOnSyncThread(). - csync::WeakHandle<SyncManager::ChangeObserver> change_observer_; + syncer::WeakHandle<SyncManager::ChangeObserver> change_observer_; ObserverList<SyncManager::Observer> observers_; @@ -570,7 +570,7 @@ class SyncManager::SyncInternal scoped_ptr<SyncScheduler> scheduler_; // The SyncNotifier which notifies us when updates need to be downloaded. - scoped_ptr<csync::SyncNotifier> sync_notifier_; + scoped_ptr<syncer::SyncNotifier> sync_notifier_; // A multi-purpose status watch object that aggregates stats from various // sync components. @@ -607,12 +607,12 @@ class SyncManager::SyncInternal JsSyncManagerObserver js_sync_manager_observer_; JsMutationEventObserver js_mutation_event_observer_; - csync::ThrottledDataTypeTracker throttled_data_type_tracker_; + syncer::ThrottledDataTypeTracker throttled_data_type_tracker_; // This is for keeping track of client events to send to the server. DebugInfoEventListener debug_info_event_listener_; - csync::TrafficRecorder traffic_recorder_; + syncer::TrafficRecorder traffic_recorder_; Encryptor* encryptor_; UnrecoverableErrorHandler* unrecoverable_error_handler_; @@ -678,7 +678,7 @@ class NudgeStrategy { break; case ACCOMPANY_ONLY: delay = TimeDelta::FromSeconds( - csync::kDefaultShortPollIntervalSeconds); + syncer::kDefaultShortPollIntervalSeconds); break; case CUSTOM: switch (model_type) { @@ -717,12 +717,12 @@ bool SyncManager::Init( bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const csync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<csync::ModelSafeWorker*>& workers, - csync::ExtensionsActivityMonitor* extensions_activity_monitor, + const syncer::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<syncer::ModelSafeWorker*>& workers, + syncer::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const SyncCredentials& credentials, - csync::SyncNotifier* sync_notifier, + syncer::SyncNotifier* sync_notifier, const std::string& restored_key_for_bootstrapping, TestingMode testing_mode, Encryptor* encryptor, @@ -774,7 +774,7 @@ syncable::ModelTypeSet SyncManager::InitialSyncEndedTypes() { } void SyncManager::StartSyncingNormally( - const csync::ModelSafeRoutingInfo& routing_info) { + const syncer::ModelSafeRoutingInfo& routing_info) { DCHECK(thread_checker_.CalledOnValidThread()); data_->StartSyncingNormally(routing_info); } @@ -818,7 +818,7 @@ bool SyncManager::IsUsingExplicitPassphrase() { } void SyncManager::RequestCleanupDisabledTypes( - const csync::ModelSafeRoutingInfo& routing_info) { + const syncer::ModelSafeRoutingInfo& routing_info) { DCHECK(thread_checker_.CalledOnValidThread()); if (data_->scheduler()) { data_->session_context()->set_routing_info(routing_info); @@ -827,7 +827,7 @@ void SyncManager::RequestCleanupDisabledTypes( } void SyncManager::RequestConfig( - const csync::ModelSafeRoutingInfo& routing_info, + const syncer::ModelSafeRoutingInfo& routing_info, const ModelTypeSet& types, ConfigureReason reason) { DCHECK(thread_checker_.CalledOnValidThread()); if (!data_->scheduler()) { @@ -850,7 +850,7 @@ void SyncManager::StartConfigurationMode(const base::Closure& callback) { return; } data_->scheduler()->Start( - csync::SyncScheduler::CONFIGURATION_MODE, callback); + syncer::SyncScheduler::CONFIGURATION_MODE, callback); } bool SyncManager::SyncInternal::Init( @@ -861,12 +861,12 @@ bool SyncManager::SyncInternal::Init( bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const csync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<csync::ModelSafeWorker*>& workers, - csync::ExtensionsActivityMonitor* extensions_activity_monitor, + const syncer::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<syncer::ModelSafeWorker*>& workers, + syncer::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const SyncCredentials& credentials, - csync::SyncNotifier* sync_notifier, + syncer::SyncNotifier* sync_notifier, const std::string& restored_key_for_bootstrapping, TestingMode testing_mode, Encryptor* encryptor, @@ -952,7 +952,7 @@ bool SyncManager::SyncInternal::Init( if (signed_in) { if (scheduler()) { scheduler()->Start( - csync::SyncScheduler::CONFIGURATION_MODE, base::Closure()); + syncer::SyncScheduler::CONFIGURATION_MODE, base::Closure()); } initialized_ = true; @@ -988,7 +988,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigori( const std::string& chrome_version, const base::Closure& done_callback) { DCHECK(initialized_); - csync::GetSessionName( + syncer::GetSessionName( blocking_task_runner_, base::Bind( &SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback, @@ -1046,7 +1046,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback( Cryptographer* cryptographer = trans.GetCryptographer(); WriteNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) == csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) == syncer::BaseNode::INIT_OK) { sync_pb::NigoriSpecifics nigori(node.GetNigoriSpecifics()); Cryptographer::UpdateResult result = cryptographer->Update(nigori); if (result == Cryptographer::NEEDS_PASSPHRASE) { @@ -1054,7 +1054,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback( if (cryptographer->has_pending_keys()) pending_keys = cryptographer->GetPendingKeys(); FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_DECRYPTION, + OnPassphraseRequired(syncer::REASON_DECRYPTION, pending_keys)); } @@ -1124,7 +1124,7 @@ void SyncManager::SyncInternal::NotifyCryptographerState( } void SyncManager::SyncInternal::StartSyncingNormally( - const csync::ModelSafeRoutingInfo& routing_info) { + const syncer::ModelSafeRoutingInfo& routing_info) { // Start the sync scheduler. if (scheduler()) { // NULL during certain unittests. session_context()->set_routing_info(routing_info); @@ -1137,9 +1137,9 @@ bool SyncManager::SyncInternal::OpenDirectory() { // Set before Open(). change_observer_ = - csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()); + syncer::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()); WeakHandle<syncable::TransactionObserver> transaction_observer( - csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr())); + syncer::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr())); syncable::DirOpenResult open_result = syncable::NOT_INITIALIZED; open_result = directory()->Open(username_for_share(), this, @@ -1219,7 +1219,7 @@ void SyncManager::SyncInternal::SetEncryptionPassphrase( Cryptographer* cryptographer = trans.GetCryptographer(); KeyParams key_params = {"localhost", "dummy", passphrase}; WriteNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) { // TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS. NOTREACHED(); return; @@ -1333,7 +1333,7 @@ void SyncManager::SyncInternal::SetDecryptionPassphrase( Cryptographer* cryptographer = trans.GetCryptographer(); KeyParams key_params = {"localhost", "dummy", passphrase}; WriteNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) { // TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS. NOTREACHED(); return; @@ -1486,11 +1486,11 @@ void SyncManager::SyncInternal::FinishSetPassphrase( << "was ready."; } else if (cryptographer->has_pending_keys()) { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_DECRYPTION, + OnPassphraseRequired(syncer::REASON_DECRYPTION, cryptographer->GetPendingKeys())); } else { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_ENCRYPTION, + OnPassphraseRequired(syncer::REASON_ENCRYPTION, sync_pb::EncryptedData())); } return; @@ -1522,7 +1522,7 @@ void SyncManager::SyncInternal::FinishSetPassphrase( bool SyncManager::SyncInternal::IsUsingExplicitPassphrase() { ReadTransaction trans(FROM_HERE, &share_); ReadNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) { // TODO(albertb): Plumb an UnrecoverableError all the way back to the PSS. NOTREACHED(); return false; @@ -1536,7 +1536,7 @@ void SyncManager::SyncInternal::RefreshEncryption() { WriteTransaction trans(FROM_HERE, GetUserShare()); WriteNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) { NOTREACHED() << "Unable to set encrypted datatypes because Nigori node not " << "found."; return; @@ -1553,7 +1553,7 @@ void SyncManager::SyncInternal::RefreshEncryption() { if (cryptographer->has_pending_keys()) pending_keys = cryptographer->GetPendingKeys(); FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_DECRYPTION, + OnPassphraseRequired(syncer::REASON_DECRYPTION, pending_keys)); return; } @@ -1584,7 +1584,7 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) { ReadNode type_root(trans); std::string tag = syncable::ModelTypeToRootTag(iter.Get()); - if (type_root.InitByTagLookup(tag) != csync::BaseNode::INIT_OK) + if (type_root.InitByTagLookup(tag) != syncer::BaseNode::INIT_OK) continue; // Don't try to reencrypt if the type's data is unavailable. // Iterate through all children of this datatype. @@ -1598,7 +1598,7 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) { continue; WriteNode child(trans); - if (child.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK) { + if (child.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK) { NOTREACHED(); continue; } @@ -1620,11 +1620,11 @@ void SyncManager::SyncInternal::ReEncryptEverything(WriteTransaction* trans) { std::string passwords_tag = syncable::ModelTypeToRootTag(syncable::PASSWORDS); if (passwords_root.InitByTagLookup(passwords_tag) == - csync::BaseNode::INIT_OK) { + syncer::BaseNode::INIT_OK) { int64 child_id = passwords_root.GetFirstChildId(); while (child_id != kInvalidId) { WriteNode child(trans); - if (child.InitByIdLookup(child_id) != csync::BaseNode::INIT_OK) { + if (child.InitByIdLookup(child_id) != syncer::BaseNode::INIT_OK) { NOTREACHED(); return; } @@ -1744,19 +1744,19 @@ void SyncManager::SyncInternal::OnServerConnectionEvent( const ServerConnectionEvent& event) { DCHECK(thread_checker_.CalledOnValidThread()); if (event.connection_code == - csync::HttpResponse::SERVER_CONNECTION_OK) { + syncer::HttpResponse::SERVER_CONNECTION_OK) { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_OK)); } - if (event.connection_code == csync::HttpResponse::SYNC_AUTH_ERROR) { + if (event.connection_code == syncer::HttpResponse::SYNC_AUTH_ERROR) { observing_ip_address_changes_ = false; FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_AUTH_ERROR)); } if (event.connection_code == - csync::HttpResponse::SYNC_SERVER_ERROR) { + syncer::HttpResponse::SYNC_SERVER_ERROR) { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_SERVER_ERROR)); } @@ -1946,7 +1946,7 @@ void SyncManager::SyncInternal::RequestNudge( const tracked_objects::Location& location) { if (scheduler()) { scheduler()->ScheduleNudgeAsync( - TimeDelta::FromMilliseconds(0), csync::NUDGE_SOURCE_LOCAL, + TimeDelta::FromMilliseconds(0), syncer::NUDGE_SOURCE_LOCAL, ModelTypeSet(), location); } } @@ -1971,7 +1971,7 @@ void SyncManager::SyncInternal::RequestNudgeForDataTypes( types.First().Get(), this); scheduler()->ScheduleNudgeAsync(nudge_delay, - csync::NUDGE_SOURCE_LOCAL, + syncer::NUDGE_SOURCE_LOCAL, types, nudge_location); } @@ -1998,14 +1998,14 @@ void SyncManager::SyncInternal::OnSyncEngineEvent( DVLOG(1) << "OnPassPhraseRequired Sent"; sync_pb::EncryptedData pending_keys = cryptographer->GetPendingKeys(); FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_DECRYPTION, + OnPassphraseRequired(syncer::REASON_DECRYPTION, pending_keys)); } else if (!cryptographer->is_ready() && event.snapshot.initial_sync_ended().Has(syncable::NIGORI)) { DVLOG(1) << "OnPassphraseRequired sent because cryptographer is not " << "ready"; FOR_EACH_OBSERVER(SyncManager::Observer, observers_, - OnPassphraseRequired(csync::REASON_ENCRYPTION, + OnPassphraseRequired(syncer::REASON_ENCRYPTION, sync_pb::EncryptedData())); } @@ -2025,7 +2025,7 @@ void SyncManager::SyncInternal::OnSyncEngineEvent( WriteTransaction trans(FROM_HERE, GetUserShare()); WriteNode nigori_node(&trans); if (nigori_node.InitByTagLookup(kNigoriTag) == - csync::BaseNode::INIT_OK) { + syncer::BaseNode::INIT_OK) { Cryptographer* cryptographer = trans.GetCryptographer(); UpdateNigoriEncryptionState(cryptographer, &nigori_node); } @@ -2194,7 +2194,7 @@ JsArgList GetNodeInfoById(const JsArgList& args, continue; } ReadNode node(&trans); - if (node.InitByIdLookup(id) != csync::BaseNode::INIT_OK) { + if (node.InitByIdLookup(id) != syncer::BaseNode::INIT_OK) { continue; } node_summaries->Append((node.*info_getter)()); @@ -2292,9 +2292,9 @@ void SyncManager::SyncInternal::OnNotificationsEnabled() { } void SyncManager::SyncInternal::OnNotificationsDisabled( - csync::NotificationsDisabledReason reason) { + syncer::NotificationsDisabledReason reason) { DVLOG(1) << "Notifications disabled with reason " - << csync::NotificationsDisabledReasonToString(reason); + << syncer::NotificationsDisabledReasonToString(reason); allstatus_.SetNotificationsEnabled(false); if (scheduler()) { scheduler()->set_notifications_enabled(false); @@ -2313,20 +2313,20 @@ void SyncManager::SyncInternal::OnNotificationsDisabled( void SyncManager::SyncInternal::OnIncomingNotification( const syncable::ModelTypePayloadMap& type_payloads, - csync::IncomingNotificationSource source) { + syncer::IncomingNotificationSource source) { DCHECK(thread_checker_.CalledOnValidThread()); - if (source == csync::LOCAL_NOTIFICATION) { + if (source == syncer::LOCAL_NOTIFICATION) { if (scheduler()) { scheduler()->ScheduleNudgeWithPayloadsAsync( TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), - csync::NUDGE_SOURCE_LOCAL_REFRESH, + syncer::NUDGE_SOURCE_LOCAL_REFRESH, type_payloads, FROM_HERE); } } else if (!type_payloads.empty()) { if (scheduler()) { scheduler()->ScheduleNudgeWithPayloadsAsync( TimeDelta::FromMilliseconds(kSyncSchedulerDelayMsec), - csync::NUDGE_SOURCE_NOTIFICATION, + syncer::NUDGE_SOURCE_NOTIFICATION, type_payloads, FROM_HERE); } allstatus_.IncrementNotificationsReceived(); @@ -2347,7 +2347,7 @@ void SyncManager::SyncInternal::OnIncomingNotification( syncable::ModelTypeToString(it->first); changed_types->Append(Value::CreateStringValue(model_type_str)); } - details.SetString("source", (source == csync::LOCAL_NOTIFICATION) ? + details.SetString("source", (source == syncer::LOCAL_NOTIFICATION) ? "LOCAL_NOTIFICATION" : "REMOTE_NOTIFICATION"); js_event_handler_.Call(FROM_HERE, &JsEventHandler::HandleJsEvent, @@ -2401,11 +2401,11 @@ syncable::ModelTypeSet SyncManager::GetEncryptedDataTypesForTest() const { return GetEncryptedTypes(&trans); } -bool SyncManager::ReceivedExperiment(csync::Experiments* experiments) +bool SyncManager::ReceivedExperiment(syncer::Experiments* experiments) const { ReadTransaction trans(FROM_HERE, GetUserShare()); ReadNode node(&trans); - if (node.InitByTagLookup(kNigoriTag) != csync::BaseNode::INIT_OK) { + if (node.InitByTagLookup(kNigoriTag) != syncer::BaseNode::INIT_OK) { DVLOG(1) << "Couldn't find Nigori node."; return false; } @@ -2418,7 +2418,7 @@ bool SyncManager::ReceivedExperiment(csync::Experiments* experiments) } bool SyncManager::HasUnsyncedItems() const { - csync::ReadTransaction trans(FROM_HERE, GetUserShare()); + syncer::ReadTransaction trans(FROM_HERE, GetUserShare()); return (trans.GetWrappedTrans()->directory()->unsynced_entity_count() != 0); } @@ -2430,7 +2430,7 @@ void SyncManager::SimulateEnableNotificationsForTest() { void SyncManager::SimulateDisableNotificationsForTest(int reason) { DCHECK(thread_checker_.CalledOnValidThread()); data_->OnNotificationsDisabled( - static_cast<csync::NotificationsDisabledReason>(reason)); + static_cast<syncer::NotificationsDisabledReason>(reason)); } void SyncManager::TriggerOnIncomingNotificationForTest( @@ -2441,7 +2441,7 @@ void SyncManager::TriggerOnIncomingNotificationForTest( std::string()); data_->OnIncomingNotification(model_types_with_payloads, - csync::REMOTE_NOTIFICATION); + syncer::REMOTE_NOTIFICATION); } const char* ConnectionStatusToString(ConnectionStatus status) { @@ -2476,7 +2476,7 @@ const char* PassphraseRequiredReasonToString( // Helper function to determine if initial sync had ended for types. bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, - csync::UserShare* share) { + syncer::UserShare* share) { for (syncable::ModelTypeSet::Iterator i = types.First(); i.Good(); i.Inc()) { if (!share->directory->initial_sync_ended_for_type(i.Get())) @@ -2487,7 +2487,7 @@ bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( syncable::ModelTypeSet types, - csync::UserShare* share) { + syncer::UserShare* share) { syncable::ModelTypeSet result; for (syncable::ModelTypeSet::Iterator i = types.First(); i.Good(); i.Inc()) { @@ -2501,4 +2501,4 @@ syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken( return result; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/syncapi_internal.cc b/sync/internal_api/syncapi_internal.cc index c6b1cad..282082b 100644 --- a/sync/internal_api/syncapi_internal.cc +++ b/sync/internal_api/syncapi_internal.cc @@ -9,9 +9,9 @@ #include "sync/protocol/sync.pb.h" #include "sync/util/cryptographer.h" -using csync::Cryptographer; +using syncer::Cryptographer; -namespace csync { +namespace syncer { sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics( const sync_pb::EntitySpecifics& specifics, Cryptographer* crypto) { @@ -33,9 +33,9 @@ static const char* kForbiddenServerNames[] = { "", ".", ".." }; // When taking a name from the syncapi, append a space if it matches the // pattern of a server-illegal name followed by zero or more spaces. -void SyncAPINameToServerName(const std::string& csync_name, +void SyncAPINameToServerName(const std::string& syncer_name, std::string* out) { - *out = csync_name; + *out = syncer_name; if (IsNameServerIllegalAfterTrimming(*out)) out->append(" "); } @@ -54,7 +54,7 @@ bool IsNameServerIllegalAfterTrimming(const std::string& name) { } // Compare the values of two EntitySpecifics, accounting for encryption. -bool AreSpecificsEqual(const csync::Cryptographer* cryptographer, +bool AreSpecificsEqual(const syncer::Cryptographer* cryptographer, const sync_pb::EntitySpecifics& left, const sync_pb::EntitySpecifics& right) { // Note that we can't compare encrypted strings directly as they are seeded @@ -84,4 +84,4 @@ bool AreSpecificsEqual(const csync::Cryptographer* cryptographer, return false; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/syncapi_internal.h b/sync/internal_api/syncapi_internal.h index da8de78..afc9c0a 100644 --- a/sync/internal_api/syncapi_internal.h +++ b/sync/internal_api/syncapi_internal.h @@ -6,32 +6,31 @@ #define SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_ // The functions defined are shared among some of the classes that implement -// the internal csync. They are not to be used by clients of the API. +// the internal sync API. They are not to be used by clients of the API. #include <string> -namespace csync { -class Cryptographer; -} - namespace sync_pb { class EntitySpecifics; class PasswordSpecificsData; } -namespace csync { +namespace syncer { + +class Cryptographer; + sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics( const sync_pb::EntitySpecifics& specifics, - csync::Cryptographer* crypto); + syncer::Cryptographer* crypto); -void SyncAPINameToServerName(const std::string& csync_name, +void SyncAPINameToServerName(const std::string& syncer_name, std::string* out); bool IsNameServerIllegalAfterTrimming(const std::string& name); -bool AreSpecificsEqual(const csync::Cryptographer* cryptographer, +bool AreSpecificsEqual(const syncer::Cryptographer* cryptographer, const sync_pb::EntitySpecifics& left, const sync_pb::EntitySpecifics& right); -} +} // namespace syncer #endif // SYNC_INTERNAL_API_SYNCAPI_INTERNAL_H_ diff --git a/sync/internal_api/syncapi_server_connection_manager.cc b/sync/internal_api/syncapi_server_connection_manager.cc index f2abcc9..63f96c9 100644 --- a/sync/internal_api/syncapi_server_connection_manager.cc +++ b/sync/internal_api/syncapi_server_connection_manager.cc @@ -9,12 +9,12 @@ #include "sync/internal_api/public/http_post_provider_factory.h" #include "sync/internal_api/public/http_post_provider_interface.h" -using csync::HttpResponse; +using syncer::HttpResponse; -namespace csync { +namespace syncer { SyncAPIBridgedConnection::SyncAPIBridgedConnection( - csync::ServerConnectionManager* scm, + syncer::ServerConnectionManager* scm, HttpPostProviderFactory* factory) : Connection(scm), factory_(factory) { post_provider_ = factory_->Create(); @@ -97,9 +97,9 @@ SyncAPIServerConnectionManager::SyncAPIServerConnectionManager( SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} -csync::ServerConnectionManager::Connection* +syncer::ServerConnectionManager::Connection* SyncAPIServerConnectionManager::MakeConnection() { return new SyncAPIBridgedConnection(this, post_provider_factory_.get()); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/syncapi_server_connection_manager.h b/sync/internal_api/syncapi_server_connection_manager.h index 9678045..4b15f72 100644 --- a/sync/internal_api/syncapi_server_connection_manager.h +++ b/sync/internal_api/syncapi_server_connection_manager.h @@ -13,7 +13,7 @@ #include "base/memory/scoped_ptr.h" #include "sync/engine/net/server_connection_manager.h" -namespace csync { +namespace syncer { class HttpPostProviderFactory; class HttpPostProviderInterface; @@ -21,9 +21,9 @@ class HttpPostProviderInterface; // This provides HTTP Post functionality through the interface provided // to the sync API by the application hosting the syncer backend. class SyncAPIBridgedConnection - : public csync::ServerConnectionManager::Connection { + : public syncer::ServerConnectionManager::Connection { public: - SyncAPIBridgedConnection(csync::ServerConnectionManager* scm, + SyncAPIBridgedConnection(syncer::ServerConnectionManager* scm, HttpPostProviderFactory* factory); virtual ~SyncAPIBridgedConnection(); @@ -31,7 +31,7 @@ class SyncAPIBridgedConnection virtual bool Init(const char* path, const std::string& auth_token, const std::string& payload, - csync::HttpResponse* response) OVERRIDE; + syncer::HttpResponse* response) OVERRIDE; virtual void Abort() OVERRIDE; @@ -49,7 +49,7 @@ class SyncAPIBridgedConnection // subclass so that we can override MakePost() to generate a POST object using // an instance of the HttpPostProviderFactory class. class SyncAPIServerConnectionManager - : public csync::ServerConnectionManager { + : public syncer::ServerConnectionManager { public: // Takes ownership of factory. SyncAPIServerConnectionManager(const std::string& server, @@ -72,6 +72,6 @@ class SyncAPIServerConnectionManager DISALLOW_COPY_AND_ASSIGN(SyncAPIServerConnectionManager); }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_SYNCAPI_SERVER_CONNECTION_MANAGER_H_ diff --git a/sync/internal_api/syncapi_server_connection_manager_unittest.cc b/sync/internal_api/syncapi_server_connection_manager_unittest.cc index a6e34d0..606acf5 100644 --- a/sync/internal_api/syncapi_server_connection_manager_unittest.cc +++ b/sync/internal_api/syncapi_server_connection_manager_unittest.cc @@ -17,11 +17,11 @@ #include "testing/gtest/include/gtest/gtest.h" using base::TimeDelta; -using csync::HttpResponse; -using csync::ServerConnectionManager; -using csync::ScopedServerStatusWatcher; +using syncer::HttpResponse; +using syncer::ServerConnectionManager; +using syncer::ScopedServerStatusWatcher; -namespace csync { +namespace syncer { namespace { class BlockingHttpPost : public HttpPostProviderInterface { @@ -111,4 +111,4 @@ TEST(SyncAPIServerConnectionManagerTest, AbortPost) { abort_thread.Stop(); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc index 1d125ce..2ee4977a 100644 --- a/sync/internal_api/syncapi_unittest.cc +++ b/sync/internal_api/syncapi_unittest.cc @@ -67,24 +67,24 @@ #include "testing/gtest/include/gtest/gtest.h" using base::ExpectDictStringValue; -using csync::Cryptographer; -using csync::FakeEncryptor; -using csync::FakeExtensionsActivityMonitor; -using csync::HasArgsAsList; -using csync::HasDetailsAsDictionary; -using csync::KeyParams; -using csync::kNigoriTag; -using csync::JsArgList; -using csync::JsBackend; -using csync::JsEventHandler; -using csync::JsReplyHandler; -using csync::MockJsEventHandler; -using csync::MockJsReplyHandler; -using csync::ModelSafeRoutingInfo; -using csync::ModelSafeWorker; -using csync::sessions::SyncSessionSnapshot; -using csync::TestUnrecoverableErrorHandler; -using csync::WeakHandle; +using syncer::Cryptographer; +using syncer::FakeEncryptor; +using syncer::FakeExtensionsActivityMonitor; +using syncer::HasArgsAsList; +using syncer::HasDetailsAsDictionary; +using syncer::KeyParams; +using syncer::kNigoriTag; +using syncer::JsArgList; +using syncer::JsBackend; +using syncer::JsEventHandler; +using syncer::JsReplyHandler; +using syncer::MockJsEventHandler; +using syncer::MockJsReplyHandler; +using syncer::ModelSafeRoutingInfo; +using syncer::ModelSafeWorker; +using syncer::sessions::SyncSessionSnapshot; +using syncer::TestUnrecoverableErrorHandler; +using syncer::WeakHandle; using syncable::IS_DEL; using syncable::IS_UNSYNCED; using syncable::kEncryptedString; @@ -100,7 +100,7 @@ using testing::Invoke; using testing::SaveArg; using testing::StrictMock; -namespace csync { +namespace syncer { namespace { @@ -121,7 +121,7 @@ void ExpectTimeValue(const base::Time& expected_value, const DictionaryValue& value, const std::string& key) { std::string time_str; EXPECT_TRUE(value.GetString(key, &time_str)); - EXPECT_EQ(csync::GetTimeDebugString(expected_value), time_str); + EXPECT_EQ(syncer::GetTimeDebugString(expected_value), time_str); } // Makes a non-folder child of the root node. Returns the id of the @@ -133,9 +133,9 @@ int64 MakeNode(UserShare* share, ReadNode root_node(&trans); root_node.InitByRootLookup(); WriteNode node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = node.InitUniqueByCreation(model_type, root_node, client_tag); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); node.SetIsFolder(false); return node.GetId(); } @@ -150,9 +150,9 @@ int64 MakeNodeWithParent(UserShare* share, ReadNode parent_node(&trans); EXPECT_EQ(BaseNode::INIT_OK, parent_node.InitByIdLookup(parent_id)); WriteNode node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = node.InitUniqueByCreation(model_type, parent_node, client_tag); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); node.SetIsFolder(false); return node.GetId(); } @@ -245,7 +245,7 @@ class SyncApiTest : public testing::Test { protected: MessageLoop message_loop_; - csync::TestUserShare test_user_share_; + syncer::TestUserShare test_user_share_; }; TEST_F(SyncApiTest, SanityCheckTest) { @@ -381,9 +381,9 @@ TEST_F(SyncApiTest, TestDeleteBehavior) { folder_id = folder_node.GetId(); WriteNode wnode(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = wnode.InitUniqueByCreation(syncable::BOOKMARKS, root_node, "testtag"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); wnode.SetIsFolder(false); wnode.SetTitle(UTF8ToWide(test_title)); @@ -423,9 +423,9 @@ TEST_F(SyncApiTest, TestDeleteBehavior) { WriteNode wnode(&trans); // This will undelete the tag. - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = wnode.InitUniqueByCreation(syncable::BOOKMARKS, folder_node, "testtag"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); EXPECT_EQ(wnode.GetIsFolder(), false); EXPECT_EQ(wnode.GetParentId(), folder_node.GetId()); EXPECT_EQ(wnode.GetId(), node_id); @@ -457,10 +457,10 @@ TEST_F(SyncApiTest, WriteAndReadPassword) { root_node.InitByRootLookup(); WriteNode password_node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = password_node.InitUniqueByCreation(syncable::PASSWORDS, root_node, "foo"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); sync_pb::PasswordSpecificsData data; data.set_password_value("secret"); password_node.SetPasswordSpecifics(data); @@ -493,16 +493,16 @@ TEST_F(SyncApiTest, WriteEncryptedTitle) { root_node.InitByRootLookup(); WriteNode bookmark_node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = bookmark_node.InitUniqueByCreation(syncable::BOOKMARKS, root_node, "foo"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); bookmark_node.SetTitle(UTF8ToWide("foo")); WriteNode pref_node(&trans); result = pref_node.InitUniqueByCreation(syncable::PREFERENCES, root_node, "bar"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); pref_node.SetTitle(UTF8ToWide("bar")); } { @@ -640,9 +640,9 @@ TEST_F(SyncApiTest, EmptyTags) { root_node.InitByRootLookup(); WriteNode node(&trans); std::string empty_tag; - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = node.InitUniqueByCreation(syncable::TYPED_URLS, root_node, empty_tag); - EXPECT_NE(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_NE(syncer::WriteNode::INIT_SUCCESS, result); EXPECT_EQ(BaseNode::INIT_FAILED_PRECONDITION, node.InitByTagLookup(empty_tag)); } @@ -694,7 +694,7 @@ class SyncManagerObserverMock : public SyncManager::Observer { void(const WeakHandle<JsBackend>&, bool)); // NOLINT MOCK_METHOD1(OnConnectionStatusChange, void(ConnectionStatus)); // NOLINT MOCK_METHOD2(OnPassphraseRequired, - void(csync::PassphraseRequiredReason, + void(syncer::PassphraseRequiredReason, const sync_pb::EncryptedData&)); // NOLINT MOCK_METHOD0(OnPassphraseAccepted, void()); // NOLINT MOCK_METHOD1(OnBootstrapTokenUpdated, void(const std::string&)); // NOLINT @@ -704,13 +704,13 @@ class SyncManagerObserverMock : public SyncManager::Observer { void(ModelTypeSet, bool)); // NOLINT MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT MOCK_METHOD1(OnActionableError, - void(const csync::SyncProtocolError&)); // NOLINT + void(const syncer::SyncProtocolError&)); // NOLINT }; -class SyncNotifierMock : public csync::SyncNotifier { +class SyncNotifierMock : public syncer::SyncNotifier { public: - MOCK_METHOD1(AddObserver, void(csync::SyncNotifierObserver*)); - MOCK_METHOD1(RemoveObserver, void(csync::SyncNotifierObserver*)); + MOCK_METHOD1(AddObserver, void(syncer::SyncNotifierObserver*)); + MOCK_METHOD1(RemoveObserver, void(syncer::SyncNotifierObserver*)); MOCK_METHOD1(SetUniqueId, void(const std::string&)); MOCK_METHOD1(SetStateDeprecated, void(const std::string&)); MOCK_METHOD2(UpdateCredentials, @@ -787,7 +787,7 @@ class SyncManagerTest : public testing::Test, &extensions_activity_monitor_, this, credentials, sync_notifier_mock_, "", - csync::SyncManager::TEST_IN_MEMORY, + syncer::SyncManager::TEST_IN_MEMORY, &encryptor_, &handler_, NULL); @@ -814,12 +814,12 @@ class SyncManagerTest : public testing::Test, } void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { - (*out)[syncable::NIGORI] = csync::GROUP_PASSIVE; - (*out)[syncable::BOOKMARKS] = csync::GROUP_PASSIVE; - (*out)[syncable::THEMES] = csync::GROUP_PASSIVE; - (*out)[syncable::SESSIONS] = csync::GROUP_PASSIVE; - (*out)[syncable::PASSWORDS] = csync::GROUP_PASSIVE; - (*out)[syncable::PREFERENCES] = csync::GROUP_PASSIVE; + (*out)[syncable::NIGORI] = syncer::GROUP_PASSIVE; + (*out)[syncable::BOOKMARKS] = syncer::GROUP_PASSIVE; + (*out)[syncable::THEMES] = syncer::GROUP_PASSIVE; + (*out)[syncable::SESSIONS] = syncer::GROUP_PASSIVE; + (*out)[syncable::PASSWORDS] = syncer::GROUP_PASSIVE; + (*out)[syncable::PREFERENCES] = syncer::GROUP_PASSIVE; } virtual void OnChangesApplied( @@ -871,13 +871,13 @@ class SyncManagerTest : public testing::Test, } void SyncNotifierAddObserver( - csync::SyncNotifierObserver* sync_notifier_observer) { + syncer::SyncNotifierObserver* sync_notifier_observer) { EXPECT_EQ(NULL, sync_notifier_observer_); sync_notifier_observer_ = sync_notifier_observer; } void SyncNotifierRemoveObserver( - csync::SyncNotifierObserver* sync_notifier_observer) { + syncer::SyncNotifierObserver* sync_notifier_observer) { EXPECT_EQ(sync_notifier_observer_, sync_notifier_observer); sync_notifier_observer_ = NULL; } @@ -942,7 +942,7 @@ class SyncManagerTest : public testing::Test, SyncManager sync_manager_; WeakHandle<JsBackend> js_backend_; StrictMock<SyncManagerObserverMock> observer_; - csync::SyncNotifierObserver* sync_notifier_observer_; + syncer::SyncNotifierObserver* sync_notifier_observer_; int update_enabled_types_call_count_; }; @@ -1266,17 +1266,17 @@ TEST_F(SyncManagerTest, OnNotificationStateChange) { sync_manager_.SimulateEnableNotificationsForTest(); sync_manager_.SimulateDisableNotificationsForTest( - csync::TRANSIENT_NOTIFICATION_ERROR); + syncer::TRANSIENT_NOTIFICATION_ERROR); SetJsEventHandler(event_handler.AsWeakHandle()); sync_manager_.SimulateEnableNotificationsForTest(); sync_manager_.SimulateDisableNotificationsForTest( - csync::TRANSIENT_NOTIFICATION_ERROR); + syncer::TRANSIENT_NOTIFICATION_ERROR); SetJsEventHandler(WeakHandle<JsEventHandler>()); sync_manager_.SimulateEnableNotificationsForTest(); sync_manager_.SimulateDisableNotificationsForTest( - csync::TRANSIENT_NOTIFICATION_ERROR); + syncer::TRANSIENT_NOTIFICATION_ERROR); // Should trigger the replies. PumpLoop(); @@ -1577,10 +1577,10 @@ TEST_F(SyncManagerTest, SetPassphraseWithPassword) { root_node.InitByRootLookup(); WriteNode password_node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = password_node.InitUniqueByCreation(syncable::PASSWORDS, root_node, "foo"); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); sync_pb::PasswordSpecificsData data; data.set_password_value("secret"); password_node.SetPasswordSpecifics(data); @@ -1811,9 +1811,9 @@ TEST_F(SyncManagerTest, SetPassphraseWithEmptyPasswordNode) { root_node.InitByRootLookup(); WriteNode password_node(&trans); - csync::WriteNode::InitUniqueByCreationResult result = + syncer::WriteNode::InitUniqueByCreationResult result = password_node.InitUniqueByCreation(syncable::PASSWORDS, root_node, tag); - EXPECT_EQ(csync::WriteNode::INIT_SUCCESS, result); + EXPECT_EQ(syncer::WriteNode::INIT_SUCCESS, result); node_id = password_node.GetId(); } EXPECT_CALL(observer_, OnBootstrapTokenUpdated(_)); @@ -1843,7 +1843,7 @@ TEST_F(SyncManagerTest, NudgeDelayTest) { EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::AUTOFILL), base::TimeDelta::FromSeconds( - csync::kDefaultShortPollIntervalSeconds)); + syncer::kDefaultShortPollIntervalSeconds)); EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::PREFERENCES), base::TimeDelta::FromMilliseconds( @@ -2462,7 +2462,7 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) { EXPECT_TRUE(SetUpEncryption(WRITE_TO_NIGORI, DEFAULT_ENCRYPTION)); { ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); - csync::Cryptographer* crypto = trans.GetCryptographer(); + syncer::Cryptographer* crypto = trans.GetCryptographer(); sync_pb::EntitySpecifics bm_specifics; bm_specifics.mutable_bookmark()->set_title("title"); bm_specifics.mutable_bookmark()->set_url("url"); @@ -2510,4 +2510,4 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) { } } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/test/test_entry_factory.cc b/sync/internal_api/test/test_entry_factory.cc index f42fc64..6731f72 100644 --- a/sync/internal_api/test/test_entry_factory.cc +++ b/sync/internal_api/test/test_entry_factory.cc @@ -16,7 +16,7 @@ using syncable::MutableEntry; using syncable::UNITTEST; using syncable::WriteTransaction; -namespace csync { +namespace syncer { TestEntryFactory::TestEntryFactory(syncable::Directory *dir) : directory_(dir), next_revision_(1) { @@ -162,4 +162,4 @@ int64 TestEntryFactory::GetNextRevision() { return next_revision_++; } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/test/test_user_share.cc b/sync/internal_api/test/test_user_share.cc index e11b542..136b438 100644 --- a/sync/internal_api/test/test_user_share.cc +++ b/sync/internal_api/test/test_user_share.cc @@ -9,7 +9,7 @@ #include "sync/test/engine/test_directory_setter_upper.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { TestUserShare::TestUserShare() : dir_maker_(new TestDirectorySetterUpper()) {} @@ -19,7 +19,7 @@ TestUserShare::~TestUserShare() { } void TestUserShare::SetUp() { - user_share_.reset(new csync::UserShare()); + user_share_.reset(new syncer::UserShare()); dir_maker_->SetUp(); // The pointer is owned by dir_maker_, we should not be storing it in a @@ -35,8 +35,8 @@ void TestUserShare::TearDown() { dir_maker_->TearDown(); } -csync::UserShare* TestUserShare::user_share() { +syncer::UserShare* TestUserShare::user_share() { return user_share_.get(); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/user_share.cc b/sync/internal_api/user_share.cc index 5a5cfde..1a3736d 100644 --- a/sync/internal_api/user_share.cc +++ b/sync/internal_api/user_share.cc @@ -6,10 +6,10 @@ #include "sync/syncable/directory.h" -namespace csync { +namespace syncer { UserShare::UserShare() {} UserShare::~UserShare() {} -} +} // namespace syncer diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc index bda6388..17fccd0 100644 --- a/sync/internal_api/write_node.cc +++ b/sync/internal_api/write_node.cc @@ -21,13 +21,13 @@ #include "sync/syncable/mutable_entry.h" #include "sync/util/cryptographer.h" -using csync::Cryptographer; +using syncer::Cryptographer; using std::string; using std::vector; using syncable::kEncryptedString; using syncable::SPECIFICS; -namespace csync { +namespace syncer { static const char kDefaultNameForNewNodes[] = " "; @@ -205,7 +205,7 @@ void WriteNode::SetEntitySpecifics( if (GetModelType() != syncable::UNSPECIFIED) { DCHECK_EQ(new_specifics_type, GetModelType()); } - csync::Cryptographer* cryptographer = + syncer::Cryptographer* cryptographer = GetTransaction()->GetCryptographer(); // Preserve unknown fields. @@ -509,4 +509,4 @@ void WriteNode::MarkForSyncing() { syncable::MarkForSyncing(entry_); } -} // namespace csync +} // namespace syncer diff --git a/sync/internal_api/write_transaction.cc b/sync/internal_api/write_transaction.cc index 7ccb116..fe11adf 100644 --- a/sync/internal_api/write_transaction.cc +++ b/sync/internal_api/write_transaction.cc @@ -6,7 +6,7 @@ #include "sync/syncable/write_transaction.h" -namespace csync { +namespace syncer { ////////////////////////////////////////////////////////////////////////// // WriteTransaction member definitions @@ -26,4 +26,4 @@ syncable::BaseTransaction* WriteTransaction::GetWrappedTrans() const { return transaction_; } -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc index 754a2e4..8eec0aa 100644 --- a/sync/js/js_arg_list.cc +++ b/sync/js/js_arg_list.cc @@ -6,7 +6,7 @@ #include "base/json/json_writer.h" -namespace csync { +namespace syncer { JsArgList::JsArgList() {} @@ -24,4 +24,4 @@ std::string JsArgList::ToString() const { return str; } -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_arg_list.h b/sync/js/js_arg_list.h index 28244e8..6e38869 100644 --- a/sync/js/js_arg_list.h +++ b/sync/js/js_arg_list.h @@ -13,7 +13,7 @@ #include "base/values.h" #include "sync/internal_api/public/util/immutable.h" -namespace csync { +namespace syncer { // A thin wrapper around Immutable<ListValue>. Used for passing // around argument lists to different threads. @@ -39,6 +39,6 @@ class JsArgList { ImmutableListValue args_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_ARG_LIST_H_ diff --git a/sync/js/js_arg_list_unittest.cc b/sync/js/js_arg_list_unittest.cc index 55044b7..537012d 100644 --- a/sync/js/js_arg_list_unittest.cc +++ b/sync/js/js_arg_list_unittest.cc @@ -7,7 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class JsArgListTest : public testing::Test {}; @@ -37,4 +37,4 @@ TEST_F(JsArgListTest, FromList) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_backend.h b/sync/js/js_backend.h index f0febee..960064e 100644 --- a/sync/js/js_backend.h +++ b/sync/js/js_backend.h @@ -10,7 +10,7 @@ #include <string> -namespace csync { +namespace syncer { class JsArgList; class JsEventHandler; @@ -36,6 +36,6 @@ class JsBackend { virtual ~JsBackend() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_BACKEND_H_ diff --git a/sync/js/js_controller.h b/sync/js/js_controller.h index e1a0d8a..359958c 100644 --- a/sync/js/js_controller.h +++ b/sync/js/js_controller.h @@ -10,7 +10,7 @@ #include <string> -namespace csync { +namespace syncer { class JsArgList; class JsEventHandler; @@ -45,6 +45,6 @@ class JsController { virtual ~JsController() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_CONTROLLER_H_ diff --git a/sync/js/js_event_details.cc b/sync/js/js_event_details.cc index c5e3f71..16e4df7 100644 --- a/sync/js/js_event_details.cc +++ b/sync/js/js_event_details.cc @@ -6,7 +6,7 @@ #include "base/json/json_writer.h" -namespace csync { +namespace syncer { JsEventDetails::JsEventDetails() {} @@ -24,4 +24,4 @@ std::string JsEventDetails::ToString() const { return str; } -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_event_details.h b/sync/js/js_event_details.h index ad93b67..fb3bf39 100644 --- a/sync/js/js_event_details.h +++ b/sync/js/js_event_details.h @@ -13,7 +13,7 @@ #include "base/values.h" #include "sync/internal_api/public/util/immutable.h" -namespace csync { +namespace syncer { // A thin wrapper around Immutable<DictionaryValue>. Used for passing // around event details to different threads. @@ -40,6 +40,6 @@ class JsEventDetails { ImmutableDictionaryValue details_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_EVENT_DETAILS_H_ diff --git a/sync/js/js_event_details_unittest.cc b/sync/js/js_event_details_unittest.cc index b734ec9..563def7 100644 --- a/sync/js/js_event_details_unittest.cc +++ b/sync/js/js_event_details_unittest.cc @@ -7,7 +7,7 @@ #include "base/memory/scoped_ptr.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class JsEventDetailsTest : public testing::Test {}; @@ -33,4 +33,4 @@ TEST_F(JsEventDetailsTest, FromDictionary) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_event_handler.h b/sync/js/js_event_handler.h index 9eb73b6..c31c593 100644 --- a/sync/js/js_event_handler.h +++ b/sync/js/js_event_handler.h @@ -10,7 +10,7 @@ #include <string> -namespace csync { +namespace syncer { class JsEventDetails; @@ -25,6 +25,6 @@ class JsEventHandler { virtual ~JsEventHandler() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_EVENT_HANDLER_H_ diff --git a/sync/js/js_reply_handler.h b/sync/js/js_reply_handler.h index 9749297..6f793c0 100644 --- a/sync/js/js_reply_handler.h +++ b/sync/js/js_reply_handler.h @@ -10,7 +10,7 @@ #include <string> -namespace csync { +namespace syncer { class JsArgList; @@ -25,6 +25,6 @@ class JsReplyHandler { virtual ~JsReplyHandler() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_REPLY_HANDLER_H_ diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc index d90485b..6d9679f 100644 --- a/sync/js/js_test_util.cc +++ b/sync/js/js_test_util.cc @@ -9,7 +9,7 @@ #include "sync/js/js_arg_list.h" #include "sync/js/js_event_details.h" -namespace csync { +namespace syncer { void PrintTo(const JsArgList& args, ::std::ostream* os) { *os << args.ToString(); @@ -133,5 +133,5 @@ WeakHandle<JsReplyHandler> MockJsReplyHandler::AsWeakHandle() { return MakeWeakHandle(AsWeakPtr()); } -} // namespace csync +} // namespace syncer diff --git a/sync/js/js_test_util.h b/sync/js/js_test_util.h index 042019b1..885966d 100644 --- a/sync/js/js_test_util.h +++ b/sync/js/js_test_util.h @@ -22,7 +22,7 @@ class DictionaryValue; class ListValue; } -namespace csync { +namespace syncer { class JsArgList; class JsEventDetails; @@ -104,6 +104,6 @@ class MockJsReplyHandler void(const ::std::string&, const JsArgList&)); }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_JS_TEST_UTIL_H_ diff --git a/sync/js/sync_js_controller.cc b/sync/js/sync_js_controller.cc index b2f57ea..49f3cc7 100644 --- a/sync/js/sync_js_controller.cc +++ b/sync/js/sync_js_controller.cc @@ -8,7 +8,7 @@ #include "sync/js/js_backend.h" #include "sync/js/js_event_details.h" -namespace csync { +namespace syncer { SyncJsController::PendingJsMessage::PendingJsMessage( const std::string& name, const JsArgList& args, @@ -80,4 +80,4 @@ void SyncJsController::UpdateBackendEventHandler() { } } -} // namespace csync +} // namespace syncer diff --git a/sync/js/sync_js_controller.h b/sync/js/sync_js_controller.h index 26ac93ba..9eca80c 100644 --- a/sync/js/sync_js_controller.h +++ b/sync/js/sync_js_controller.h @@ -18,7 +18,7 @@ #include "sync/js/js_controller.h" #include "sync/js/js_event_handler.h" -namespace csync { +namespace syncer { class JsBackend; @@ -76,6 +76,6 @@ class SyncJsController DISALLOW_COPY_AND_ASSIGN(SyncJsController); }; -} // namespace csync +} // namespace syncer #endif // SYNC_JS_SYNC_JS_CONTROLLER_H_ diff --git a/sync/js/sync_js_controller_unittest.cc b/sync/js/sync_js_controller_unittest.cc index 3a8728f..4a691d9 100644 --- a/sync/js/sync_js_controller_unittest.cc +++ b/sync/js/sync_js_controller_unittest.cc @@ -12,7 +12,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using ::testing::_; @@ -123,4 +123,4 @@ TEST_F(SyncJsControllerTest, Events) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/chrome_invalidation_client.cc b/sync/notifier/chrome_invalidation_client.cc index 0c1376e..f80575b 100644 --- a/sync/notifier/chrome_invalidation_client.cc +++ b/sync/notifier/chrome_invalidation_client.cc @@ -25,7 +25,7 @@ const char kApplicationName[] = "chrome-sync"; } // namespace -namespace csync { +namespace syncer { ChromeInvalidationClient::Listener::~Listener() {} @@ -52,7 +52,7 @@ void ChromeInvalidationClient::Start( const std::string& client_id, const std::string& client_info, const std::string& state, const InvalidationVersionMap& initial_max_invalidation_versions, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, Listener* listener) { DCHECK(CalledOnValidThread()); @@ -359,4 +359,4 @@ void ChromeInvalidationClient::OnIncomingNotification( // Do nothing, since this is already handled by |invalidation_client_|. } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/chrome_invalidation_client.h b/sync/notifier/chrome_invalidation_client.h index 8d998c6..747ebae 100644 --- a/sync/notifier/chrome_invalidation_client.h +++ b/sync/notifier/chrome_invalidation_client.h @@ -35,7 +35,7 @@ namespace notifier { class PushClient; } // namespace notifier -namespace csync { +namespace syncer { using invalidation::InvalidationListener; @@ -74,7 +74,7 @@ class ChromeInvalidationClient const std::string& client_id, const std::string& client_info, const std::string& state, const InvalidationVersionMap& initial_max_invalidation_versions, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, Listener* listener); @@ -141,7 +141,7 @@ class ChromeInvalidationClient notifier::PushClient* const push_client_; ChromeSystemResources chrome_system_resources_; InvalidationVersionMap max_invalidation_versions_; - csync::WeakHandle<InvalidationStateTracker> + syncer::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; Listener* listener_; scoped_ptr<invalidation::InvalidationClient> invalidation_client_; @@ -160,6 +160,6 @@ class ChromeInvalidationClient DISALLOW_COPY_AND_ASSIGN(ChromeInvalidationClient); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_CHROME_INVALIDATION_CLIENT_H_ diff --git a/sync/notifier/chrome_invalidation_client_unittest.cc b/sync/notifier/chrome_invalidation_client_unittest.cc index fae864d..7c93eef 100644 --- a/sync/notifier/chrome_invalidation_client_unittest.cc +++ b/sync/notifier/chrome_invalidation_client_unittest.cc @@ -17,7 +17,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { using ::testing::_; using ::testing::InSequence; @@ -66,7 +66,7 @@ class ChromeInvalidationClientTest : public testing::Test { virtual void SetUp() { client_.Start(kClientId, kClientInfo, kState, InvalidationVersionMap(), - csync::MakeWeakHandle( + syncer::MakeWeakHandle( mock_invalidation_state_tracker_.AsWeakPtr()), &mock_listener_); } @@ -345,4 +345,4 @@ TEST_F(ChromeInvalidationClientTest, StateChangesAuthError) { client_.Ready(NULL); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/chrome_system_resources.cc b/sync/notifier/chrome_system_resources.cc index 702078b..af4cf9a 100644 --- a/sync/notifier/chrome_system_resources.cc +++ b/sync/notifier/chrome_system_resources.cc @@ -19,7 +19,7 @@ #include "jingle/notifier/listener/push_client.h" #include "sync/notifier/invalidation_util.h" -namespace csync { +namespace syncer { ChromeLogger::ChromeLogger() {} ChromeLogger::~ChromeLogger() {} @@ -252,4 +252,4 @@ ChromeScheduler* ChromeSystemResources::listener_scheduler() { return listener_scheduler_.get(); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/chrome_system_resources.h b/sync/notifier/chrome_system_resources.h index 765d890..8b8b13f 100644 --- a/sync/notifier/chrome_system_resources.h +++ b/sync/notifier/chrome_system_resources.h @@ -27,7 +27,7 @@ namespace notifier { class PushClient; } // namespace notifier -namespace csync { +namespace syncer { class ChromeLogger : public invalidation::Logger { public: @@ -146,6 +146,6 @@ class ChromeSystemResources : public invalidation::SystemResources { PushClientChannel push_client_channel_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_CHROME_SYSTEM_RESOURCES_H_ diff --git a/sync/notifier/chrome_system_resources_unittest.cc b/sync/notifier/chrome_system_resources_unittest.cc index 8ec8c8d..7d05db8 100644 --- a/sync/notifier/chrome_system_resources_unittest.cc +++ b/sync/notifier/chrome_system_resources_unittest.cc @@ -17,7 +17,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using ::testing::_; @@ -174,4 +174,4 @@ TEST_F(ChromeSystemResourcesTest, WriteState) { } } // namespace -} // namespace notifier +} // namespace syncer diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc index a57336e..633ce88 100644 --- a/sync/notifier/invalidation_notifier.cc +++ b/sync/notifier/invalidation_notifier.cc @@ -14,13 +14,13 @@ #include "talk/xmpp/jid.h" #include "talk/xmpp/xmppclientsettings.h" -namespace csync { +namespace syncer { InvalidationNotifier::InvalidationNotifier( scoped_ptr<notifier::PushClient> push_client, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) : state_(STOPPED), @@ -105,7 +105,7 @@ void InvalidationNotifier::OnInvalidate( FOR_EACH_OBSERVER( SyncNotifierObserver, observers_, OnIncomingNotification(type_payloads, - csync::REMOTE_NOTIFICATION)); + syncer::REMOTE_NOTIFICATION)); } void InvalidationNotifier::OnNotificationsEnabled() { @@ -121,4 +121,4 @@ void InvalidationNotifier::OnNotificationsDisabled( OnNotificationsDisabled(reason)); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h index b47f76f..fa57651 100644 --- a/sync/notifier/invalidation_notifier.h +++ b/sync/notifier/invalidation_notifier.h @@ -30,7 +30,7 @@ namespace notifier { class PushClient; } // namespace notifier -namespace csync { +namespace syncer { // This class must live on the IO thread. class InvalidationNotifier @@ -43,7 +43,7 @@ class InvalidationNotifier scoped_ptr<notifier::PushClient> push_client, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info); @@ -84,7 +84,7 @@ class InvalidationNotifier const InvalidationVersionMap initial_max_invalidation_versions_; // Passed to |invalidation_client_|. - const csync::WeakHandle<InvalidationStateTracker> + const syncer::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; // Passed to |invalidation_client_|. @@ -107,6 +107,6 @@ class InvalidationNotifier DISALLOW_COPY_AND_ASSIGN(InvalidationNotifier); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_INVALIDATION_NOTIFIER_H_ diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc index 4001223..d2de7ba 100644 --- a/sync/notifier/invalidation_notifier_unittest.cc +++ b/sync/notifier/invalidation_notifier_unittest.cc @@ -19,7 +19,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -48,7 +48,7 @@ class InvalidationNotifierTest : public testing::Test { scoped_ptr<notifier::PushClient>(new notifier::FakePushClient()), InvalidationVersionMap(), initial_invalidation_state, - csync::MakeWeakHandle(mock_tracker_.AsWeakPtr()), + syncer::MakeWeakHandle(mock_tracker_.AsWeakPtr()), "fake_client_info")); invalidation_notifier_->AddObserver(&mock_observer_); } @@ -127,4 +127,4 @@ TEST_F(InvalidationNotifierTest, MigrateState) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/invalidation_state_tracker.h b/sync/notifier/invalidation_state_tracker.h index 9dbc352..8f080fa 100644 --- a/sync/notifier/invalidation_state_tracker.h +++ b/sync/notifier/invalidation_state_tracker.h @@ -14,7 +14,7 @@ #include "google/cacheinvalidation/include/types.h" #include "sync/notifier/invalidation_util.h" -namespace csync { +namespace syncer { typedef std::map<invalidation::ObjectId, int64, ObjectIdLessThan> InvalidationVersionMap; @@ -41,6 +41,6 @@ class InvalidationStateTracker { virtual ~InvalidationStateTracker() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_INVALIDATION_STATE_TRACKER_H_ diff --git a/sync/notifier/invalidation_util.cc b/sync/notifier/invalidation_util.cc index 3e680ec..0973b7d 100644 --- a/sync/notifier/invalidation_util.cc +++ b/sync/notifier/invalidation_util.cc @@ -9,7 +9,7 @@ #include "google/cacheinvalidation/include/types.h" #include "google/cacheinvalidation/v2/types.pb.h" -namespace csync { +namespace syncer { bool ObjectIdLessThan::operator()(const invalidation::ObjectId& lhs, const invalidation::ObjectId& rhs) const { @@ -56,4 +56,4 @@ std::string InvalidationToString( return ss.str(); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/invalidation_util.h b/sync/notifier/invalidation_util.h index 8a7c931..eaf1ff9 100644 --- a/sync/notifier/invalidation_util.h +++ b/sync/notifier/invalidation_util.h @@ -20,7 +20,7 @@ class ObjectId; } // namespace invalidation -namespace csync { +namespace syncer { struct ObjectIdLessThan { bool operator()(const invalidation::ObjectId& lhs, @@ -40,6 +40,6 @@ std::string ObjectIdToString(const invalidation::ObjectId& object_id); std::string InvalidationToString( const invalidation::Invalidation& invalidation); -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_INVALIDATION_UTIL_H_ diff --git a/sync/notifier/mock_invalidation_state_tracker.cc b/sync/notifier/mock_invalidation_state_tracker.cc index 2f855ed..37aabb3 100644 --- a/sync/notifier/mock_invalidation_state_tracker.cc +++ b/sync/notifier/mock_invalidation_state_tracker.cc @@ -4,9 +4,9 @@ #include "sync/notifier/mock_invalidation_state_tracker.h" -namespace csync { +namespace syncer { MockInvalidationStateTracker::MockInvalidationStateTracker() {} MockInvalidationStateTracker::~MockInvalidationStateTracker() {} -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/mock_invalidation_state_tracker.h b/sync/notifier/mock_invalidation_state_tracker.h index ac884f5..e6d992d 100644 --- a/sync/notifier/mock_invalidation_state_tracker.h +++ b/sync/notifier/mock_invalidation_state_tracker.h @@ -9,7 +9,7 @@ #include "sync/notifier/invalidation_state_tracker.h" #include "testing/gmock/include/gmock/gmock.h" -namespace csync { +namespace syncer { class MockInvalidationStateTracker : public InvalidationStateTracker, @@ -24,6 +24,6 @@ class MockInvalidationStateTracker MOCK_METHOD1(SetInvalidationState, void(const std::string&)); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_MOCK_INVALIDATION_STATE_TRACKER_H_ diff --git a/sync/notifier/mock_sync_notifier_observer.cc b/sync/notifier/mock_sync_notifier_observer.cc index 1287a23..d8db8f2 100644 --- a/sync/notifier/mock_sync_notifier_observer.cc +++ b/sync/notifier/mock_sync_notifier_observer.cc @@ -4,9 +4,9 @@ #include "sync/notifier/mock_sync_notifier_observer.h" -namespace csync { +namespace syncer { MockSyncNotifierObserver::MockSyncNotifierObserver() {} MockSyncNotifierObserver::~MockSyncNotifierObserver() {} -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/mock_sync_notifier_observer.h b/sync/notifier/mock_sync_notifier_observer.h index d25c184..315d104 100644 --- a/sync/notifier/mock_sync_notifier_observer.h +++ b/sync/notifier/mock_sync_notifier_observer.h @@ -11,7 +11,7 @@ #include "sync/notifier/sync_notifier_observer.h" #include "testing/gmock/include/gmock/gmock.h" -namespace csync { +namespace syncer { class MockSyncNotifierObserver : public SyncNotifierObserver { public: @@ -25,6 +25,6 @@ class MockSyncNotifierObserver : public SyncNotifierObserver { IncomingNotificationSource)); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_MOCK_SYNC_NOTIFIER_OBSERVER_H_ diff --git a/sync/notifier/non_blocking_invalidation_notifier.cc b/sync/notifier/non_blocking_invalidation_notifier.cc index 4f3459d..083fcb3 100644 --- a/sync/notifier/non_blocking_invalidation_notifier.cc +++ b/sync/notifier/non_blocking_invalidation_notifier.cc @@ -13,7 +13,7 @@ #include "jingle/notifier/listener/push_client.h" #include "sync/notifier/invalidation_notifier.h" -namespace csync { +namespace syncer { class NonBlockingInvalidationNotifier::Core : public base::RefCountedThreadSafe<NonBlockingInvalidationNotifier::Core>, @@ -23,7 +23,7 @@ class NonBlockingInvalidationNotifier::Core // Called on parent thread. |delegate_observer| should be // initialized. explicit Core( - const csync::WeakHandle<SyncNotifierObserver>& + const syncer::WeakHandle<SyncNotifierObserver>& delegate_observer); // Helpers called on I/O thread. @@ -31,7 +31,7 @@ class NonBlockingInvalidationNotifier::Core const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info); void Teardown(); @@ -56,7 +56,7 @@ class NonBlockingInvalidationNotifier::Core ~Core(); // The variables below should be used only on the I/O thread. - const csync::WeakHandle<SyncNotifierObserver> delegate_observer_; + const syncer::WeakHandle<SyncNotifierObserver> delegate_observer_; scoped_ptr<InvalidationNotifier> invalidation_notifier_; scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; @@ -64,7 +64,7 @@ class NonBlockingInvalidationNotifier::Core }; NonBlockingInvalidationNotifier::Core::Core( - const csync::WeakHandle<SyncNotifierObserver>& + const syncer::WeakHandle<SyncNotifierObserver>& delegate_observer) : delegate_observer_(delegate_observer) { DCHECK(delegate_observer_.IsInitialized()); @@ -77,7 +77,7 @@ void NonBlockingInvalidationNotifier::Core::Initialize( const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) { DCHECK(notifier_options.request_context_getter); @@ -155,12 +155,12 @@ NonBlockingInvalidationNotifier::NonBlockingInvalidationNotifier( const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), core_( - new Core(csync::MakeWeakHandle( + new Core(syncer::MakeWeakHandle( weak_ptr_factory_.GetWeakPtr()))), parent_task_runner_( base::ThreadTaskRunnerHandle::Get()), @@ -275,4 +275,4 @@ void NonBlockingInvalidationNotifier::OnIncomingNotification( OnIncomingNotification(type_payloads, source)); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/non_blocking_invalidation_notifier.h b/sync/notifier/non_blocking_invalidation_notifier.h index 0385c72..e953c3c 100644 --- a/sync/notifier/non_blocking_invalidation_notifier.h +++ b/sync/notifier/non_blocking_invalidation_notifier.h @@ -26,7 +26,7 @@ namespace base { class SingleThreadTaskRunner; } // namespace base -namespace csync { +namespace syncer { class NonBlockingInvalidationNotifier : public SyncNotifier, @@ -38,7 +38,7 @@ class NonBlockingInvalidationNotifier const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info); @@ -81,6 +81,6 @@ class NonBlockingInvalidationNotifier DISALLOW_COPY_AND_ASSIGN(NonBlockingInvalidationNotifier); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_NON_BLOCKING_INVALIDATION_NOTIFIER_H_ diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc index 2c4cfa7..a321907 100644 --- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc +++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc @@ -18,7 +18,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -43,8 +43,8 @@ class NonBlockingInvalidationNotifierTest : public testing::Test { notifier_options, InvalidationVersionMap(), std::string(), // initial_invalidation_state - csync::MakeWeakHandle( - base::WeakPtr<csync::InvalidationStateTracker>()), + syncer::MakeWeakHandle( + base::WeakPtr<syncer::InvalidationStateTracker>()), "fake_client_info")); invalidation_notifier_->AddObserver(&mock_observer_); } @@ -99,4 +99,4 @@ TEST_F(NonBlockingInvalidationNotifierTest, Basic) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/notifications_disabled_reason.cc b/sync/notifier/notifications_disabled_reason.cc index 5636990..89c0a03 100644 --- a/sync/notifier/notifications_disabled_reason.cc +++ b/sync/notifier/notifications_disabled_reason.cc @@ -6,7 +6,7 @@ #include "base/logging.h" -namespace csync { +namespace syncer { const char* NotificationsDisabledReasonToString( NotificationsDisabledReason reason) { @@ -38,4 +38,4 @@ NotificationsDisabledReason FromNotifierReason( } } -} // sync_notifier +} // namespace syncer diff --git a/sync/notifier/notifications_disabled_reason.h b/sync/notifier/notifications_disabled_reason.h index 9ee6f476..52a6a7d 100644 --- a/sync/notifier/notifications_disabled_reason.h +++ b/sync/notifier/notifications_disabled_reason.h @@ -8,7 +8,7 @@ #include "jingle/notifier/listener/push_client_observer.h" -namespace csync { +namespace syncer { enum NotificationsDisabledReason { // There is an underlying transient problem (e.g., network- or @@ -28,6 +28,6 @@ const char* NotificationsDisabledReasonToString( NotificationsDisabledReason FromNotifierReason( notifier::NotificationsDisabledReason reason); -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_NOTIFICATIONS_DISABLED_REASON_H_ diff --git a/sync/notifier/p2p_notifier.cc b/sync/notifier/p2p_notifier.cc index 548e0f5..f92cd98 100644 --- a/sync/notifier/p2p_notifier.cc +++ b/sync/notifier/p2p_notifier.cc @@ -14,7 +14,7 @@ #include "sync/internal_api/public/syncable/model_type_payload_map.h" #include "sync/notifier/sync_notifier_observer.h" -namespace csync { +namespace syncer { const char* kSyncP2PNotificationChannel = "http://www.google.com/chrome/sync"; @@ -289,4 +289,4 @@ void P2PNotifier::SendNotificationData( push_client_->SendNotification(notification); } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/p2p_notifier.h b/sync/notifier/p2p_notifier.h index d449952..7ef9238 100644 --- a/sync/notifier/p2p_notifier.h +++ b/sync/notifier/p2p_notifier.h @@ -25,7 +25,7 @@ namespace notifier { class PushClient; } // namespace notifier -namespace csync { +namespace syncer { // The channel to use for sync notifications. extern const char* kSyncP2PNotificationChannel; @@ -137,6 +137,6 @@ class P2PNotifier syncable::ModelTypeSet enabled_types_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_P2P_NOTIFIER_H_ diff --git a/sync/notifier/p2p_notifier_unittest.cc b/sync/notifier/p2p_notifier_unittest.cc index 845dc8e..905e688 100644 --- a/sync/notifier/p2p_notifier_unittest.cc +++ b/sync/notifier/p2p_notifier_unittest.cc @@ -11,7 +11,7 @@ #include "sync/notifier/mock_sync_notifier_observer.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -288,4 +288,4 @@ TEST_F(P2PNotifierTest, SendNotificationData) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/push_client_channel.cc b/sync/notifier/push_client_channel.cc index a806b20b..5cfd843 100644 --- a/sync/notifier/push_client_channel.cc +++ b/sync/notifier/push_client_channel.cc @@ -8,7 +8,7 @@ #include "google/cacheinvalidation/v2/client_gateway.pb.h" #include "jingle/notifier/listener/push_client.h" -namespace csync { +namespace syncer { namespace { @@ -156,4 +156,4 @@ bool PushClientChannel::DecodeMessage( return true; } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/push_client_channel.h b/sync/notifier/push_client_channel.h index 14d168d..c966b03 100644 --- a/sync/notifier/push_client_channel.h +++ b/sync/notifier/push_client_channel.h @@ -19,7 +19,7 @@ namespace notifier { class PushClient; } // namespace notifier -namespace csync { +namespace syncer { // A PushClientChannel is an implementation of NetworkChannel that // routes messages through a PushClient. @@ -99,6 +99,6 @@ class PushClientChannel DISALLOW_COPY_AND_ASSIGN(PushClientChannel); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_PUSH_CLIENT_CHANNEL_H_ diff --git a/sync/notifier/push_client_channel_unittest.cc b/sync/notifier/push_client_channel_unittest.cc index af59444..4ac0c58 100644 --- a/sync/notifier/push_client_channel_unittest.cc +++ b/sync/notifier/push_client_channel_unittest.cc @@ -12,7 +12,7 @@ #include "jingle/notifier/listener/notification_defines.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class PushClientChannelTest : public ::testing::Test { @@ -250,4 +250,4 @@ TEST_F(PushClientChannelTest, PersistedMessageState) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/registration_manager.cc b/sync/notifier/registration_manager.cc index f999a8e..3d20df0 100644 --- a/sync/notifier/registration_manager.cc +++ b/sync/notifier/registration_manager.cc @@ -16,7 +16,7 @@ #include "google/cacheinvalidation/include/types.h" #include "sync/notifier/invalidation_util.h" -namespace csync { +namespace syncer { RegistrationManager::PendingRegistrationInfo::PendingRegistrationInfo() {} @@ -300,4 +300,4 @@ bool RegistrationManager::IsIdRegistered( it->second->state == invalidation::InvalidationListener::REGISTERED; } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/registration_manager.h b/sync/notifier/registration_manager.h index cf0144c..8500655 100644 --- a/sync/notifier/registration_manager.h +++ b/sync/notifier/registration_manager.h @@ -20,7 +20,7 @@ #include "google/cacheinvalidation/include/types.h" #include "sync/notifier/invalidation_util.h" -namespace csync { +namespace syncer { using ::invalidation::InvalidationListener; @@ -181,6 +181,6 @@ class RegistrationManager : public base::NonThreadSafe { DISALLOW_COPY_AND_ASSIGN(RegistrationManager); }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_REGISTRATION_MANAGER_H_ diff --git a/sync/notifier/registration_manager_unittest.cc b/sync/notifier/registration_manager_unittest.cc index 17f25fe..e2b9b91 100644 --- a/sync/notifier/registration_manager_unittest.cc +++ b/sync/notifier/registration_manager_unittest.cc @@ -17,7 +17,7 @@ #include "sync/notifier/invalidation_util.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { // Fake registration manager that lets you override jitter. @@ -422,4 +422,4 @@ TEST_F(RegistrationManagerTest, DisableId) { } } // namespace -} // namespace notifier +} // namespace syncer diff --git a/sync/notifier/state_writer.h b/sync/notifier/state_writer.h index f135f15..4fe33cb 100644 --- a/sync/notifier/state_writer.h +++ b/sync/notifier/state_writer.h @@ -10,7 +10,7 @@ #include <string> -namespace csync { +namespace syncer { class StateWriter { public: @@ -19,6 +19,6 @@ class StateWriter { virtual void WriteState(const std::string& state) = 0; }; -} // sync_notifier +} // namespace syncer #endif // SYNC_NOTIFIER_STATE_WRITER_H_ diff --git a/sync/notifier/sync_notifier.h b/sync/notifier/sync_notifier.h index 4f3a430..a92a8a4 100644 --- a/sync/notifier/sync_notifier.h +++ b/sync/notifier/sync_notifier.h @@ -13,7 +13,7 @@ #include "sync/internal_api/public/syncable/model_type.h" -namespace csync { +namespace syncer { class SyncNotifierObserver; class SyncNotifier { @@ -50,6 +50,6 @@ class SyncNotifier { virtual void SendNotification( syncable::ModelTypeSet changed_types) = 0; }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_SYNC_NOTIFIER_H_ diff --git a/sync/notifier/sync_notifier_factory.cc b/sync/notifier/sync_notifier_factory.cc index d528987..66077bd 100644 --- a/sync/notifier/sync_notifier_factory.cc +++ b/sync/notifier/sync_notifier_factory.cc @@ -12,14 +12,14 @@ #include "sync/notifier/p2p_notifier.h" #include "sync/notifier/sync_notifier.h" -namespace csync { +namespace syncer { namespace { SyncNotifier* CreateDefaultSyncNotifier( const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const csync::WeakHandle<InvalidationStateTracker>& + const syncer::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) { if (notifier_options.notification_method == notifier::NOTIFICATION_P2P) { @@ -73,4 +73,4 @@ SyncNotifier* SyncNotifierFactory::CreateSyncNotifier() { client_info_); #endif } -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/sync_notifier_factory.h b/sync/notifier/sync_notifier_factory.h index 851db09..1d8dcd1 100644 --- a/sync/notifier/sync_notifier_factory.h +++ b/sync/notifier/sync_notifier_factory.h @@ -12,7 +12,7 @@ #include "sync/internal_api/public/util/weak_handle.h" #include "sync/notifier/invalidation_state_tracker.h" -namespace csync { +namespace syncer { class SyncNotifier; @@ -40,10 +40,10 @@ class SyncNotifierFactory { const std::string client_info_; const InvalidationVersionMap initial_max_invalidation_versions_; const std::string initial_invalidation_state_; - const csync::WeakHandle<InvalidationStateTracker> + const syncer::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_SYNC_NOTIFIER_FACTORY_H_ diff --git a/sync/notifier/sync_notifier_factory_unittest.cc b/sync/notifier/sync_notifier_factory_unittest.cc index bdbc947..629bc23 100644 --- a/sync/notifier/sync_notifier_factory_unittest.cc +++ b/sync/notifier/sync_notifier_factory_unittest.cc @@ -22,7 +22,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { using ::testing::Mock; @@ -54,7 +54,7 @@ TEST_F(SyncNotifierFactoryTest, Basic) { SyncNotifierFactory factory( notifier_options_, "test client info", - base::WeakPtr<csync::InvalidationStateTracker>()); + base::WeakPtr<syncer::InvalidationStateTracker>()); scoped_ptr<SyncNotifier> notifier(factory.CreateSyncNotifier()); #if defined(OS_ANDROID) ASSERT_FALSE(notifier.get()); @@ -71,7 +71,7 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) { SyncNotifierFactory factory( notifier_options_, "test client info", - base::WeakPtr<csync::InvalidationStateTracker>()); + base::WeakPtr<syncer::InvalidationStateTracker>()); scoped_ptr<SyncNotifier> notifier(factory.CreateSyncNotifier()); #if defined(OS_ANDROID) ASSERT_FALSE(notifier.get()); @@ -83,4 +83,4 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/notifier/sync_notifier_observer.h b/sync/notifier/sync_notifier_observer.h index 1c2f1e8..b09770d 100644 --- a/sync/notifier/sync_notifier_observer.h +++ b/sync/notifier/sync_notifier_observer.h @@ -9,7 +9,7 @@ #include "sync/internal_api/public/syncable/model_type_payload_map.h" #include "sync/notifier/notifications_disabled_reason.h" -namespace csync { +namespace syncer { enum IncomingNotificationSource { // The server is notifying us that one or more datatypes have stale data. @@ -38,6 +38,6 @@ class SyncNotifierObserver { virtual ~SyncNotifierObserver() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_NOTIFIER_SYNC_NOTIFIER_OBSERVER_H_ diff --git a/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc index f8fc148..d80b4e3 100644 --- a/sync/protocol/proto_enum_conversions.cc +++ b/sync/protocol/proto_enum_conversions.cc @@ -9,7 +9,7 @@ #include "base/basictypes.h" #include "base/logging.h" -namespace csync { +namespace syncer { #define ASSERT_ENUM_BOUNDS(enum_parent, enum_type, enum_min, enum_max) \ COMPILE_ASSERT(enum_parent::enum_type##_MIN == enum_parent::enum_min, \ @@ -170,4 +170,4 @@ const char* GetFaviconTypeString( #undef ASSERT_ENUM_BOUNDS #undef ENUM_CASE -} // namespace +} // namespace syncer diff --git a/sync/protocol/proto_enum_conversions.h b/sync/protocol/proto_enum_conversions.h index f9c07da..377ec0d 100644 --- a/sync/protocol/proto_enum_conversions.h +++ b/sync/protocol/proto_enum_conversions.h @@ -14,7 +14,7 @@ // Utility functions to get the string equivalent for some sync proto // enums. -namespace csync { +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. @@ -45,6 +45,6 @@ const char* GetDeviceTypeString( const char* GetFaviconTypeString( sync_pb::SessionTab::FaviconType favicon_type); -} // namespace csync +} // namespace syncer #endif // SYNC_PROTOCOL_PROTO_ENUM_CONVERSIONS_H_ diff --git a/sync/protocol/proto_enum_conversions_unittest.cc b/sync/protocol/proto_enum_conversions_unittest.cc index eb69d5a..de208b9 100644 --- a/sync/protocol/proto_enum_conversions_unittest.cc +++ b/sync/protocol/proto_enum_conversions_unittest.cc @@ -10,7 +10,7 @@ #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class ProtoEnumConversionsTest : public testing::Test { @@ -90,4 +90,4 @@ TEST_F(ProtoEnumConversionsTest, GetActionString) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc index 8b2e819..cee2139 100644 --- a/sync/protocol/proto_value_conversions.cc +++ b/sync/protocol/proto_value_conversions.cc @@ -29,7 +29,7 @@ #include "sync/protocol/theme_specifics.pb.h" #include "sync/protocol/typed_url_specifics.pb.h" -namespace csync { +namespace syncer { namespace { @@ -593,4 +593,4 @@ DictionaryValue* ClientToServerMessageToValue( #undef SET_FIELD -} // namespace csync +} // namespace syncer diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h index 6c61903..4ef2400 100644 --- a/sync/protocol/proto_value_conversions.h +++ b/sync/protocol/proto_value_conversions.h @@ -50,7 +50,7 @@ class TypedUrlSpecifics; // // TODO(akalin): Improve enum support. -namespace csync { +namespace syncer { // Ownership of all returned DictionaryValues are transferred to the // caller. @@ -148,6 +148,6 @@ base::DictionaryValue* ClientToServerResponseToValue( bool include_specifics); -} // namespace csync +} // namespace syncer #endif // SYNC_PROTOCOL_PROTO_VALUE_CONVERSIONS_H_ diff --git a/sync/protocol/proto_value_conversions_unittest.cc b/sync/protocol/proto_value_conversions_unittest.cc index 6363c736..304a33f 100644 --- a/sync/protocol/proto_value_conversions_unittest.cc +++ b/sync/protocol/proto_value_conversions_unittest.cc @@ -27,7 +27,7 @@ #include "sync/protocol/typed_url_specifics.pb.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class ProtoValueConversionsTest : public testing::Test { @@ -250,4 +250,4 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc index 61c0351..52421cd 100644 --- a/sync/protocol/sync_protocol_error.cc +++ b/sync/protocol/sync_protocol_error.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/values.h" -namespace csync { +namespace syncer { #define ENUM_CASE(x) case x: return #x; break; const char* GetSyncErrorTypeString(SyncProtocolErrorType type) { @@ -59,5 +59,5 @@ DictionaryValue* SyncProtocolError::ToValue() const { return value; } -} // namespace csync +} // namespace syncer diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h index fc83de1..718cc2d 100644 --- a/sync/protocol/sync_protocol_error.h +++ b/sync/protocol/sync_protocol_error.h @@ -10,7 +10,7 @@ #include "base/values.h" #include "sync/internal_api/public/syncable/model_type.h" -namespace csync{ +namespace syncer{ enum SyncProtocolErrorType { // Success case. @@ -76,6 +76,6 @@ struct SyncProtocolError { const char* GetSyncErrorTypeString(SyncProtocolErrorType type); const char* GetClientActionString(ClientAction action); -} // namespace csync +} // namespace syncer #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h index 3dea807..c434091 100644 --- a/sync/sessions/debug_info_getter.h +++ b/sync/sessions/debug_info_getter.h @@ -7,7 +7,7 @@ #include "sync/protocol/sync.pb.h" -namespace csync { +namespace syncer { namespace sessions { // This is the interface that needs to be implemented by the event listener @@ -21,7 +21,7 @@ class DebugInfoGetter { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_DEBUG_INFO_GETTER_H_ diff --git a/sync/sessions/ordered_commit_set.cc b/sync/sessions/ordered_commit_set.cc index 91bc5e2..1d13c09 100644 --- a/sync/sessions/ordered_commit_set.cc +++ b/sync/sessions/ordered_commit_set.cc @@ -8,11 +8,11 @@ #include "base/logging.h" -namespace csync { +namespace syncer { namespace sessions { OrderedCommitSet::OrderedCommitSet( - const csync::ModelSafeRoutingInfo& routes) + const syncer::ModelSafeRoutingInfo& routes) : routes_(routes) { } @@ -32,7 +32,7 @@ void OrderedCommitSet::AddCommitItem(const int64 metahandle, } const OrderedCommitSet::Projection& OrderedCommitSet::GetCommitIdProjection( - csync::ModelSafeGroup group) const { + syncer::ModelSafeGroup group) const { Projections::const_iterator i = projections_.find(group); DCHECK(i != projections_.end()); return i->second; @@ -124,5 +124,5 @@ void OrderedCommitSet::operator=(const OrderedCommitSet& other) { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h index 7c1937e..1fe8d7c 100644 --- a/sync/sessions/ordered_commit_set.h +++ b/sync/sessions/ordered_commit_set.h @@ -14,7 +14,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/syncable/syncable_id.h" -namespace csync { +namespace syncer { namespace sessions { // TODO(ncarter): This code is more generic than just Commit and can @@ -30,7 +30,7 @@ class OrderedCommitSet { typedef std::vector<size_t> Projection; // TODO(chron): Reserve space according to batch size? - explicit OrderedCommitSet(const csync::ModelSafeRoutingInfo& routes); + explicit OrderedCommitSet(const syncer::ModelSafeRoutingInfo& routes); ~OrderedCommitSet(); bool HaveCommitItem(const int64 metahandle) const { @@ -65,7 +65,7 @@ class OrderedCommitSet { // response one ModelSafeGroup at a time. See GetCommitIdAt for how the // indices contained in the returned Projection can be used. const Projection& GetCommitIdProjection( - csync::ModelSafeGroup group) const; + syncer::ModelSafeGroup group) const; size_t Size() const { return commit_ids_.size(); @@ -89,7 +89,7 @@ class OrderedCommitSet { void operator=(const OrderedCommitSet& other); private: // A set of CommitIdProjections associated with particular ModelSafeGroups. - typedef std::map<csync::ModelSafeGroup, Projection> Projections; + typedef std::map<syncer::ModelSafeGroup, Projection> Projections; // Helper container for return value of GetCommitItemAt. struct CommitItem { @@ -115,11 +115,11 @@ class OrderedCommitSet { // and shouldn't take up too much extra space since commit lists are small. std::vector<syncable::ModelType> types_; - csync::ModelSafeRoutingInfo routes_; + syncer::ModelSafeRoutingInfo routes_; }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_ORDERED_COMMIT_SET_H_ diff --git a/sync/sessions/ordered_commit_set_unittest.cc b/sync/sessions/ordered_commit_set_unittest.cc index 85ca08f..fcdc891 100644 --- a/sync/sessions/ordered_commit_set_unittest.cc +++ b/sync/sessions/ordered_commit_set_unittest.cc @@ -11,17 +11,17 @@ using std::vector; class OrderedCommitSetTest : public testing::Test { public: OrderedCommitSetTest() { - routes_[syncable::BOOKMARKS] = csync::GROUP_UI; - routes_[syncable::PREFERENCES] = csync::GROUP_UI; - routes_[syncable::AUTOFILL] = csync::GROUP_DB; - routes_[syncable::TOP_LEVEL_FOLDER] = csync::GROUP_PASSIVE; + routes_[syncable::BOOKMARKS] = syncer::GROUP_UI; + routes_[syncable::PREFERENCES] = syncer::GROUP_UI; + routes_[syncable::AUTOFILL] = syncer::GROUP_DB; + routes_[syncable::TOP_LEVEL_FOLDER] = syncer::GROUP_PASSIVE; } protected: - csync::TestIdFactory ids_; - csync::ModelSafeRoutingInfo routes_; + syncer::TestIdFactory ids_; + syncer::ModelSafeRoutingInfo routes_; }; -namespace csync { +namespace syncer { namespace sessions { TEST_F(OrderedCommitSetTest, Projections) { @@ -128,5 +128,5 @@ TEST_F(OrderedCommitSetTest, AddAndRemoveEntries) { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/session_state.cc b/sync/sessions/session_state.cc index 6a088d0..cd99800 100644 --- a/sync/sessions/session_state.cc +++ b/sync/sessions/session_state.cc @@ -13,7 +13,7 @@ using std::set; using std::vector; -namespace csync { +namespace syncer { namespace sessions { ConflictProgress::ConflictProgress() @@ -139,4 +139,4 @@ PerModelSafeGroupState::~PerModelSafeGroupState() { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/session_state.h b/sync/sessions/session_state.h index ab35ae8..23f720c 100644 --- a/sync/sessions/session_state.h +++ b/sync/sessions/session_state.h @@ -20,7 +20,7 @@ #include "sync/engine/syncproto.h" #include "sync/syncable/syncable_id.h" -namespace csync { +namespace syncer { namespace sessions { // Tracks progress of conflicts and their resolutions. @@ -129,6 +129,6 @@ struct PerModelSafeGroupState { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_SESSION_STATE_H_ diff --git a/sync/sessions/session_state_unittest.cc b/sync/sessions/session_state_unittest.cc index 52d7e80..3d1b07c 100644 --- a/sync/sessions/session_state_unittest.cc +++ b/sync/sessions/session_state_unittest.cc @@ -15,7 +15,7 @@ #include "sync/internal_api/public/sessions/sync_source_info.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace sessions { namespace { @@ -132,4 +132,4 @@ TEST_F(SessionStateTest, SyncSessionSnapshotToValue) { } // namespace } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc index cab189e..5cca02c 100644 --- a/sync/sessions/status_controller.cc +++ b/sync/sessions/status_controller.cc @@ -10,7 +10,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/protocol/sync_protocol_error.h" -namespace csync { +namespace syncer { namespace sessions { using syncable::FIRST_REAL_MODEL_TYPE; @@ -269,4 +269,4 @@ bool StatusController::debug_info_sent() const { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h index 7837e90..0780a93 100644 --- a/sync/sessions/status_controller.h +++ b/sync/sessions/status_controller.h @@ -43,7 +43,7 @@ #include "sync/sessions/ordered_commit_set.h" #include "sync/sessions/session_state.h" -namespace csync { +namespace syncer { namespace sessions { class StatusController { @@ -234,7 +234,7 @@ class ScopedModelSafeGroupRestriction { DISALLOW_COPY_AND_ASSIGN(ScopedModelSafeGroupRestriction); }; -} -} +} // namespace sessions +} // namespace syncer #endif // SYNC_SESSIONS_STATUS_CONTROLLER_H_ diff --git a/sync/sessions/status_controller_unittest.cc b/sync/sessions/status_controller_unittest.cc index 9037c30..b88ea26 100644 --- a/sync/sessions/status_controller_unittest.cc +++ b/sync/sessions/status_controller_unittest.cc @@ -6,7 +6,7 @@ #include "sync/test/engine/test_id_factory.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace sessions { class StatusControllerTest : public testing::Test { @@ -128,4 +128,4 @@ TEST_F(StatusControllerTest, Unrestricted) { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc index 1ef6e40..da73b1a 100644 --- a/sync/sessions/sync_session.cc +++ b/sync/sessions/sync_session.cc @@ -11,7 +11,7 @@ #include "sync/internal_api/public/syncable/model_type.h" #include "sync/syncable/directory.h" -namespace csync { +namespace syncer { namespace sessions { namespace { @@ -257,4 +257,4 @@ void SyncSession::SetFinished() { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h index 6ccae9e..e847ddb 100644 --- a/sync/sessions/sync_session.h +++ b/sync/sessions/sync_session.h @@ -37,7 +37,7 @@ namespace syncable { class WriteTransaction; } -namespace csync { +namespace syncer { class ModelSafeWorker; namespace sessions { @@ -247,6 +247,6 @@ class ScopedSetSessionWriteTransaction { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_SYNC_SESSION_H_ diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc index 22f7582..8edb458 100644 --- a/sync/sessions/sync_session_context.cc +++ b/sync/sessions/sync_session_context.cc @@ -8,7 +8,7 @@ #include "sync/sessions/debug_info_getter.h" #include "sync/util/extensions_activity_monitor.h" -namespace csync { +namespace syncer { namespace sessions { const unsigned int kMaxMessagesToRecord = 10; @@ -23,7 +23,7 @@ SyncSessionContext::SyncSessionContext( ThrottledDataTypeTracker* throttled_data_type_tracker, const std::vector<SyncEngineEventListener*>& listeners, DebugInfoGetter* debug_info_getter, - csync::TrafficRecorder* traffic_recorder) + syncer::TrafficRecorder* traffic_recorder) : resolver_(NULL), connection_manager_(connection_manager), directory_(directory), @@ -44,4 +44,4 @@ SyncSessionContext::~SyncSessionContext() { } } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index 20f574c..ab54042 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -34,7 +34,7 @@ namespace syncable { class Directory; } -namespace csync { +namespace syncer { class ConflictResolver; class ExtensionsActivityMonitor; @@ -58,7 +58,7 @@ class SyncSessionContext { ThrottledDataTypeTracker* throttled_data_type_tracker, const std::vector<SyncEngineEventListener*>& listeners, DebugInfoGetter* debug_info_getter, - csync::TrafficRecorder* traffic_recorder); + syncer::TrafficRecorder* traffic_recorder); ~SyncSessionContext(); ConflictResolver* resolver() { return resolver_; } @@ -124,7 +124,7 @@ class SyncSessionContext { OnSyncEngineEvent(event)); } - csync::TrafficRecorder* traffic_recorder() { + syncer::TrafficRecorder* traffic_recorder() { return traffic_recorder_; } @@ -174,7 +174,7 @@ class SyncSessionContext { // client behavior on server side. DebugInfoGetter* const debug_info_getter_; - csync::TrafficRecorder* traffic_recorder_; + syncer::TrafficRecorder* traffic_recorder_; DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); }; @@ -203,6 +203,6 @@ class ScopedSessionContextConflictResolver { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc index c792c9d..fb6c684 100644 --- a/sync/sessions/sync_session_unittest.cc +++ b/sync/sessions/sync_session_unittest.cc @@ -23,7 +23,7 @@ using syncable::WriteTransaction; -namespace csync { +namespace syncer { namespace sessions { namespace { @@ -536,4 +536,4 @@ TEST_F(SyncSessionTest, CoalescePayloads) { } // namespace } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/test_util.cc b/sync/sessions/test_util.cc index d1bd5b7..875d133 100644 --- a/sync/sessions/test_util.cc +++ b/sync/sessions/test_util.cc @@ -4,7 +4,7 @@ #include "sync/sessions/test_util.h" -namespace csync { +namespace syncer { namespace sessions { namespace test_util { @@ -63,4 +63,4 @@ void SimulateSessionsCommitDelayUpdateImpl(sessions::SyncSession* session, } // namespace test_util } // namespace sessions -} // namespace csync +} // namespace syncer diff --git a/sync/sessions/test_util.h b/sync/sessions/test_util.h index 01fa3aa..c27d752 100644 --- a/sync/sessions/test_util.h +++ b/sync/sessions/test_util.h @@ -12,7 +12,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace sessions { namespace test_util { @@ -47,6 +47,6 @@ ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { } // namespace test_util } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_SESSIONS_TEST_UTIL_H_ diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc index 92ca8fe..1b515f8 100644 --- a/sync/syncable/directory.cc +++ b/sync/syncable/directory.cc @@ -21,9 +21,9 @@ #include "sync/syncable/syncable_util.h" #include "sync/syncable/write_transaction.h" -using csync::Encryptor; -using csync::ReportUnrecoverableErrorFunction; -using csync::UnrecoverableErrorHandler; +using syncer::Encryptor; +using syncer::ReportUnrecoverableErrorFunction; +using syncer::UnrecoverableErrorHandler; using std::string; namespace syncable { @@ -113,7 +113,7 @@ const FilePath::CharType Directory::kSyncDatabaseFilename[] = void Directory::InitKernelForTest( const std::string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer) { DCHECK(!kernel_); kernel_ = new Kernel(name, KernelLoadInfo(), delegate, transaction_observer); @@ -145,7 +145,7 @@ Directory::SaveChangesSnapshot::~SaveChangesSnapshot() {} Directory::Kernel::Kernel( const std::string& name, const KernelLoadInfo& info, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer) : next_write_transaction_id(0), name(name), @@ -198,7 +198,7 @@ Directory::~Directory() { DirOpenResult Directory::Open( const string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer) { TRACE_EVENT0("sync", "SyncDatabaseOpen"); @@ -232,7 +232,7 @@ void Directory::InitializeIndices() { DirOpenResult Directory::OpenImpl( const string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer) { KernelLoadInfo info; @@ -760,7 +760,7 @@ string Directory::cache_guid() const { return kernel_->cache_guid; } -csync::Cryptographer* Directory::GetCryptographer( +syncer::Cryptographer* Directory::GetCryptographer( const BaseTransaction* trans) { DCHECK_EQ(this, trans->directory()); return &cryptographer_; diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h index 95b5893..a7f7fe1 100644 --- a/sync/syncable/directory.h +++ b/sync/syncable/directory.h @@ -20,7 +20,7 @@ #include "sync/syncable/scoped_kernel_lock.h" #include "sync/util/cryptographer.h" -namespace csync { +namespace syncer { class Encryptor; class UnrecoverableErrorHandler; } @@ -202,9 +202,9 @@ class Directory { // |report_unrecoverable_error_function| may be NULL. // Takes ownership of |store|. Directory( - csync::Encryptor* encryptor, - csync::UnrecoverableErrorHandler* unrecoverable_error_handler, - csync::ReportUnrecoverableErrorFunction + syncer::Encryptor* encryptor, + syncer::UnrecoverableErrorHandler* unrecoverable_error_handler, + syncer::ReportUnrecoverableErrorFunction report_unrecoverable_error_function, DirectoryBackingStore* store); virtual ~Directory(); @@ -215,7 +215,7 @@ class Directory { // thread. |transaction_observer| must be initialized. DirOpenResult Open(const std::string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer); // Stops sending events to the delegate and the transaction @@ -263,7 +263,7 @@ class Directory { // Returns a pointer to our cryptographer. Does not transfer ownership. The // cryptographer is not thread safe; it should not be accessed after the // transaction has been released. - csync::Cryptographer* GetCryptographer(const BaseTransaction* trans); + syncer::Cryptographer* GetCryptographer(const BaseTransaction* trans); // Returns true if the directory had encountered an unrecoverable error. // Note: Any function in |Directory| that can be called without holding a @@ -309,7 +309,7 @@ class Directory { DirOpenResult OpenImpl( const std::string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer); private: @@ -477,7 +477,7 @@ class Directory { void InitKernelForTest( const std::string& name, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer); private: @@ -486,7 +486,7 @@ class Directory { // initialized. Kernel(const std::string& name, const KernelLoadInfo& info, DirectoryChangeDelegate* delegate, - const csync::WeakHandle<TransactionObserver>& + const syncer::WeakHandle<TransactionObserver>& transaction_observer); ~Kernel(); @@ -554,7 +554,7 @@ class Directory { DirectoryChangeDelegate* const delegate; // The transaction observer. - const csync::WeakHandle<TransactionObserver> transaction_observer; + const syncer::WeakHandle<TransactionObserver> transaction_observer; }; // Helper method used to do searches on |parent_id_child_index|. @@ -593,18 +593,18 @@ class Directory { EntryKernel* GetPossibleLastChildForTest( const ScopedKernelLock& lock, const Id& parent_id); - csync::Cryptographer cryptographer_; + syncer::Cryptographer cryptographer_; Kernel* kernel_; scoped_ptr<DirectoryBackingStore> store_; - csync::UnrecoverableErrorHandler* const unrecoverable_error_handler_; - const csync::ReportUnrecoverableErrorFunction + syncer::UnrecoverableErrorHandler* const unrecoverable_error_handler_; + const syncer::ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; bool unrecoverable_error_set_; }; -} // namespace syncable +} // namespace syncable #endif // SYNC_SYNCABLE_DIRECTORY_H_ diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc index 177f1ec..6813cd7 100644 --- a/sync/syncable/directory_backing_store.cc +++ b/sync/syncable/directory_backing_store.cc @@ -50,7 +50,7 @@ void BindFields(const EntryKernel& entry, } for ( ; i < TIME_FIELDS_END; ++i) { statement->BindInt64(index++, - csync::TimeToProtoTime( + syncer::TimeToProtoTime( entry.ref(static_cast<TimeField>(i)))); } for ( ; i < ID_FIELDS_END; ++i) { @@ -80,7 +80,7 @@ EntryKernel* UnpackEntry(sql::Statement* statement) { } for ( ; i < TIME_FIELDS_END; ++i) { kernel->put(static_cast<TimeField>(i), - csync::ProtoTimeToTime(statement->ColumnInt64(i))); + syncer::ProtoTimeToTime(statement->ColumnInt64(i))); } for ( ; i < ID_FIELDS_END; ++i) { kernel->mutable_ref(static_cast<IdField>(i)).s_ = @@ -996,7 +996,7 @@ bool DirectoryBackingStore::CreateTables() { { // Insert the entry for the root into the metas table. - const int64 now = csync::TimeToProtoTime(base::Time::Now()); + const int64 now = syncer::TimeToProtoTime(base::Time::Now()); sql::Statement s(db_->GetUniqueStatement( "INSERT INTO metas " "( id, metahandle, is_dir, ctime, mtime) " diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc index bfb01407..eb892c5 100644 --- a/sync/syncable/directory_backing_store_unittest.cc +++ b/sync/syncable/directory_backing_store_unittest.cc @@ -287,7 +287,7 @@ std::map<int64, base::Time> GetExpectedMetaTimes() { expected_meta_proto_times.begin(); it != expected_meta_proto_times.end(); ++it) { expected_meta_times[it->first] = - csync::ProtoTimeToTime(it->second); + syncer::ProtoTimeToTime(it->second); } return expected_meta_times; } @@ -327,8 +327,8 @@ std::map<int64, int64> GetMetaProtoTimes(sql::Connection *db) { << t1_expr << " and " << t2_expr << " (internal values: " << t1.ToInternalValue() << " and " << t2.ToInternalValue() - << ") (proto time: " << csync::TimeToProtoTime(t1) - << " and " << csync::TimeToProtoTime(t2) + << ") (proto time: " << syncer::TimeToProtoTime(t1) + << " and " << syncer::TimeToProtoTime(t2) << ") do not match"; } diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc index b9d05a0..bb57564 100644 --- a/sync/syncable/entry.cc +++ b/sync/syncable/entry.cc @@ -110,7 +110,7 @@ std::ostream& operator<<(std::ostream& os, const Entry& entry) { } for ( ; i < TIME_FIELDS_END; ++i) { os << g_metas_columns[i].name << ": " - << csync::GetTimeDebugString( + << syncer::GetTimeDebugString( kernel->ref(static_cast<TimeField>(i))) << ", "; } for ( ; i < ID_FIELDS_END; ++i) { diff --git a/sync/syncable/entry.h b/sync/syncable/entry.h index 9ace7ae..374bb36 100644 --- a/sync/syncable/entry.h +++ b/sync/syncable/entry.h @@ -8,7 +8,7 @@ #include "sync/syncable/entry_kernel.h" -namespace csync { +namespace syncer { class ReadNode; } @@ -141,7 +141,7 @@ class Entry { private: friend class Directory; - friend class csync::ReadNode; + friend class syncer::ReadNode; friend std::ostream& operator << (std::ostream& s, const Entry& e); DISALLOW_COPY_AND_ASSIGN(Entry); @@ -149,6 +149,6 @@ class Entry { std::ostream& operator<<(std::ostream& os, const Entry& entry); -} // namespace syncable +} // namespace syncable #endif // SYNC_SYNCABLE_ENTRY_H_ diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc index 83fc2c4..99511d9 100644 --- a/sync/syncable/entry_kernel.cc +++ b/sync/syncable/entry_kernel.cc @@ -61,7 +61,7 @@ StringValue* Int64ToValue(int64 i) { } StringValue* TimeToValue(const base::Time& t) { - return Value::CreateStringValue(csync::GetTimeDebugString(t)); + return Value::CreateStringValue(syncer::GetTimeDebugString(t)); } StringValue* IdToValue(const Id& id) { @@ -119,7 +119,7 @@ DictionaryValue* EntryKernel::ToValue() const { // Proto fields. SetFieldValues(*this, kernel_info, - &GetProtoFieldString, &csync::EntitySpecificsToValue, + &GetProtoFieldString, &syncer::EntitySpecificsToValue, PROTO_FIELDS_BEGIN, PROTO_FIELDS_END - 1); // Bit temps. diff --git a/sync/syncable/entry_kernel.h b/sync/syncable/entry_kernel.h index 3a4e54c..9314797 100644 --- a/sync/syncable/entry_kernel.h +++ b/sync/syncable/entry_kernel.h @@ -216,8 +216,8 @@ struct EntryKernel { // Round-trip to proto time format and back so that we have // consistent time resolutions (ms). time_fields[field - TIME_FIELDS_BEGIN] = - csync::ProtoTimeToTime( - csync::TimeToProtoTime(value)); + syncer::ProtoTimeToTime( + syncer::TimeToProtoTime(value)); } inline void put(IdField field, const Id& value) { id_fields[field - ID_FIELDS_BEGIN] = value; @@ -307,7 +307,7 @@ struct EntryKernelMutation { typedef std::map<int64, EntryKernelMutation> EntryKernelMutationMap; -typedef csync::Immutable<EntryKernelMutationMap> +typedef syncer::Immutable<EntryKernelMutationMap> ImmutableEntryKernelMutationMap; // Caller owns the return value. diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc index 19a1588..1eb4cc0 100644 --- a/sync/syncable/model_type.cc +++ b/sync/syncable/model_type.cc @@ -146,8 +146,8 @@ int GetSpecificsFieldNumberFromModelType(ModelType model_type) { // Note: keep this consistent with GetModelType in syncable.cc! ModelType GetModelType(const sync_pb::SyncEntity& sync_pb_entity) { - const csync::SyncEntity& sync_entity = - static_cast<const csync::SyncEntity&>(sync_pb_entity); + const syncer::SyncEntity& sync_entity = + static_cast<const syncer::SyncEntity&>(sync_pb_entity); DCHECK(!sync_entity.id().IsRoot()); // Root shouldn't ever go over the wire. if (sync_entity.deleted()) diff --git a/sync/syncable/mutable_entry.h b/sync/syncable/mutable_entry.h index 773531b..331ea19 100644 --- a/sync/syncable/mutable_entry.h +++ b/sync/syncable/mutable_entry.h @@ -9,7 +9,7 @@ #include "sync/syncable/entry.h" #include "sync/syncable/metahandle_set.h" -namespace csync { +namespace syncer { class WriteNode; } @@ -89,7 +89,7 @@ class MutableEntry : public Entry { private: friend class Directory; friend class WriteTransaction; - friend class csync::WriteNode; + friend class syncer::WriteNode; // Don't allow creation on heap, except by sync API wrappers. void* operator new(size_t size) { return (::operator new)(size); } @@ -114,6 +114,6 @@ class MutableEntry : public Entry { // This function sets only the flags needed to get this entry to sync. bool MarkForSyncing(syncable::MutableEntry* e); -} // namespace syncable +} // namespace syncable #endif // SYNC_SYNCABLE_MUTABLE_ENTRY_H_ diff --git a/sync/syncable/read_transaction.h b/sync/syncable/read_transaction.h index b8e34e8..a6c51f5 100644 --- a/sync/syncable/read_transaction.h +++ b/sync/syncable/read_transaction.h @@ -8,7 +8,7 @@ #include "sync/syncable/base_transaction.h" -namespace csync { +namespace syncer { class ReadTransaction; } @@ -23,12 +23,12 @@ class ReadTransaction : public BaseTransaction { virtual ~ReadTransaction(); protected: // Don't allow creation on heap, except by sync API wrapper. - friend class csync::ReadTransaction; + friend class syncer::ReadTransaction; void* operator new(size_t size) { return (::operator new)(size); } DISALLOW_COPY_AND_ASSIGN(ReadTransaction); }; -} +} // namespace syncable #endif // SYNC_SYNCABLE_READ_TRANSACTION_H_ diff --git a/sync/syncable/syncable_id_unittest.cc b/sync/syncable/syncable_id_unittest.cc index 605a678..fc774525 100644 --- a/sync/syncable/syncable_id_unittest.cc +++ b/sync/syncable/syncable_id_unittest.cc @@ -16,7 +16,7 @@ using std::vector; namespace syncable { -using csync::TestIdFactory; +using syncer::TestIdFactory; class SyncableIdTest : public testing::Test { }; diff --git a/sync/syncable/syncable_mock.cc b/sync/syncable/syncable_mock.cc index cbea9ea..950f14e 100644 --- a/sync/syncable/syncable_mock.cc +++ b/sync/syncable/syncable_mock.cc @@ -9,7 +9,7 @@ #include "sync/test/null_transaction_observer.h" -MockDirectory::MockDirectory(csync::UnrecoverableErrorHandler* handler) +MockDirectory::MockDirectory(syncer::UnrecoverableErrorHandler* handler) : Directory(&encryptor_, handler, NULL, new syncable::InMemoryDirectoryBackingStore("store")) { InitKernelForTest("myk", &delegate_, syncable::NullTransactionObserver()); diff --git a/sync/syncable/syncable_mock.h b/sync/syncable/syncable_mock.h index a829ad2..82eac1a 100644 --- a/sync/syncable/syncable_mock.h +++ b/sync/syncable/syncable_mock.h @@ -20,7 +20,7 @@ using syncable::EntryKernel; class MockDirectory : public Directory { public: - explicit MockDirectory(csync::UnrecoverableErrorHandler* handler); + explicit MockDirectory(syncer::UnrecoverableErrorHandler* handler); virtual ~MockDirectory(); MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); @@ -33,7 +33,7 @@ class MockDirectory : public Directory { MOCK_METHOD1(PurgeEntriesWithTypeIn, void(syncable::ModelTypeSet)); private: - csync::FakeEncryptor encryptor_; + syncer::FakeEncryptor encryptor_; syncable::NullDirectoryChangeDelegate delegate_; }; diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index a2bf660..be22c0b 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -38,9 +38,9 @@ using base::ExpectDictBooleanValue; using base::ExpectDictStringValue; -using csync::FakeEncryptor; -using csync::TestIdFactory; -using csync::TestUnrecoverableErrorHandler; +using syncer::FakeEncryptor; +using syncer::TestIdFactory; +using syncer::TestUnrecoverableErrorHandler; namespace syncable { @@ -1152,14 +1152,14 @@ TEST_F(SyncableDirectoryTest, GetModelType) { server_item.Put(SERVER_IS_DEL, false); ASSERT_EQ(datatype, server_item.GetServerModelType()); - csync::SyncEntity folder_entity; + syncer::SyncEntity folder_entity; folder_entity.set_id(id_factory.NewServerId()); folder_entity.set_deleted(false); folder_entity.set_folder(true); folder_entity.mutable_specifics()->CopyFrom(specifics); ASSERT_EQ(datatype, folder_entity.GetModelType()); - csync::SyncEntity item_entity; + syncer::SyncEntity item_entity; item_entity.set_id(id_factory.NewServerId()); item_entity.set_deleted(false); item_entity.set_folder(false); diff --git a/sync/syncable/write_transaction_info.h b/sync/syncable/write_transaction_info.h index b49c376..e8a2eae 100644 --- a/sync/syncable/write_transaction_info.h +++ b/sync/syncable/write_transaction_info.h @@ -32,7 +32,7 @@ struct WriteTransactionInfo { }; typedef - csync::Immutable<WriteTransactionInfo> + syncer::Immutable<WriteTransactionInfo> ImmutableWriteTransactionInfo; } // namespace syncable diff --git a/sync/test/engine/fake_model_worker.cc b/sync/test/engine/fake_model_worker.cc index f394bc0..dba6fdd 100644 --- a/sync/test/engine/fake_model_worker.cc +++ b/sync/test/engine/fake_model_worker.cc @@ -4,7 +4,7 @@ #include "sync/test/engine/fake_model_worker.h" -namespace csync { +namespace syncer { FakeModelWorker::FakeModelWorker(ModelSafeGroup group) : group_(group) {} @@ -28,4 +28,4 @@ ModelSafeGroup FakeModelWorker::GetModelSafeGroup() { return group_; } -} // namespace csync +} // namespace syncer diff --git a/sync/test/engine/fake_model_worker.h b/sync/test/engine/fake_model_worker.h index b9ca42d..8b95fc5 100644 --- a/sync/test/engine/fake_model_worker.h +++ b/sync/test/engine/fake_model_worker.h @@ -14,7 +14,7 @@ #include "sync/internal_api/public/engine/model_safe_worker.h" #include "sync/internal_api/public/util/syncer_error.h" -namespace csync { +namespace syncer { // Fake implementation of ModelSafeWorker that does work on the // current thread regardless of the group. @@ -35,7 +35,7 @@ class FakeModelWorker : public ModelSafeWorker, public base::NonThreadSafe { DISALLOW_COPY_AND_ASSIGN(FakeModelWorker); }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_ENGINE_FAKE_MODEL_WORKER_H_ diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc index 95c00f6..4683ab7 100644 --- a/sync/test/engine/mock_connection_manager.cc +++ b/sync/test/engine/mock_connection_manager.cc @@ -17,12 +17,12 @@ #include "sync/test/engine/test_id_factory.h" #include "testing/gtest/include/gtest/gtest.h" -using csync::HttpResponse; -using csync::ServerConnectionManager; -using csync::ServerConnectionEventListener; -using csync::ServerConnectionEvent; -using csync::SyncerProtoUtil; -using csync::TestIdFactory; +using syncer::HttpResponse; +using syncer::ServerConnectionManager; +using syncer::ServerConnectionEventListener; +using syncer::ServerConnectionEvent; +using syncer::SyncerProtoUtil; +using syncer::TestIdFactory; using std::map; using std::string; using sync_pb::ClientToServerMessage; @@ -85,7 +85,7 @@ void MockConnectionManager::SetMidCommitObserver( bool MockConnectionManager::PostBufferToPath(PostBufferParams* params, const string& path, const string& auth_token, - csync::ScopedServerStatusWatcher* watcher) { + syncer::ScopedServerStatusWatcher* watcher) { ClientToServerMessage post; CHECK(post.ParseFromString(params->buffer_in)); CHECK(post.has_protocol_version()); diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h index 644ef4e..1fe264e 100644 --- a/sync/test/engine/mock_connection_manager.h +++ b/sync/test/engine/mock_connection_manager.h @@ -21,7 +21,7 @@ #include "sync/internal_api/public/syncable/model_type_payload_map.h" #include "sync/protocol/sync.pb.h" -class MockConnectionManager : public csync::ServerConnectionManager { +class MockConnectionManager : public syncer::ServerConnectionManager { public: class MidCommitObserver { public: @@ -39,7 +39,7 @@ class MockConnectionManager : public csync::ServerConnectionManager { PostBufferParams*, const std::string& path, const std::string& auth_token, - csync::ScopedServerStatusWatcher* watcher) OVERRIDE; + syncer::ScopedServerStatusWatcher* watcher) OVERRIDE; // Control of commit response. // NOTE: Commit callback is invoked only once then reset. diff --git a/sync/test/engine/syncer_command_test.cc b/sync/test/engine/syncer_command_test.cc index 61313b1..0d215c2 100644 --- a/sync/test/engine/syncer_command_test.cc +++ b/sync/test/engine/syncer_command_test.cc @@ -4,7 +4,7 @@ #include "sync/test/engine/syncer_command_test.h" -namespace csync { +namespace syncer { const unsigned int kMaxMessages = 10; const unsigned int kMaxMessageSize = 5 * 1024; @@ -63,4 +63,4 @@ Directory* MockDirectorySyncerCommandTest::directory() { return &mock_directory_; } -} // namespace csync +} // namespace syncer diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h index e519b6b..bcb0846 100644 --- a/sync/test/engine/syncer_command_test.h +++ b/sync/test/engine/syncer_command_test.h @@ -30,9 +30,9 @@ using ::testing::NiceMock; -namespace csync { +namespace syncer { -class MockDebugInfoGetter : public csync::sessions::DebugInfoGetter { +class MockDebugInfoGetter : public syncer::sessions::DebugInfoGetter { public: MockDebugInfoGetter(); virtual ~MockDebugInfoGetter(); @@ -233,6 +233,6 @@ class MockDirectorySyncerCommandTest : public SyncerCommandTestBase { MockDirectory mock_directory_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_ENGINE_SYNCER_COMMAND_TEST_H_ diff --git a/sync/test/engine/test_directory_setter_upper.cc b/sync/test/engine/test_directory_setter_upper.cc index b73b654..e9847bd 100644 --- a/sync/test/engine/test_directory_setter_upper.cc +++ b/sync/test/engine/test_directory_setter_upper.cc @@ -17,7 +17,7 @@ using syncable::NullTransactionObserver; using syncable::ReadTransaction; -namespace csync { +namespace syncer { TestDirectorySetterUpper::TestDirectorySetterUpper() : name_("Test") {} @@ -59,4 +59,4 @@ void TestDirectorySetterUpper::RunInvariantCheck() { } } -} // namespace csync +} // namespace syncer diff --git a/sync/test/engine/test_directory_setter_upper.h b/sync/test/engine/test_directory_setter_upper.h index 17ce8da..4874440 100644 --- a/sync/test/engine/test_directory_setter_upper.h +++ b/sync/test/engine/test_directory_setter_upper.h @@ -45,7 +45,7 @@ namespace syncable { class Directory; } -namespace csync { +namespace syncer { class TestDirectorySetterUpper { public: @@ -76,6 +76,6 @@ class TestDirectorySetterUpper { DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper); }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_ENGINE_TEST_DIRECTORY_SETTER_UPPER_H_ diff --git a/sync/test/engine/test_id_factory.h b/sync/test/engine/test_id_factory.h index a0163c8..51ffd14 100644 --- a/sync/test/engine/test_id_factory.h +++ b/sync/test/engine/test_id_factory.h @@ -13,7 +13,7 @@ #include "base/string_number_conversions.h" #include "sync/syncable/syncable_id.h" -namespace csync { +namespace syncer { class TestIdFactory { public: @@ -67,7 +67,7 @@ class TestIdFactory { int next_value_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_ diff --git a/sync/test/fake_encryptor.cc b/sync/test/fake_encryptor.cc index bc7f22d..2a1b58c 100644 --- a/sync/test/fake_encryptor.cc +++ b/sync/test/fake_encryptor.cc @@ -6,7 +6,7 @@ #include "base/base64.h" -namespace csync { +namespace syncer { FakeEncryptor::~FakeEncryptor() {} @@ -20,4 +20,4 @@ bool FakeEncryptor::DecryptString(const std::string& ciphertext, return base::Base64Decode(ciphertext, plaintext); } -} // namespace csync +} // namespace syncer diff --git a/sync/test/fake_encryptor.h b/sync/test/fake_encryptor.h index 8b83a43..99641c8 100644 --- a/sync/test/fake_encryptor.h +++ b/sync/test/fake_encryptor.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "sync/util/encryptor.h" -namespace csync { +namespace syncer { // Encryptor which simply base64-encodes the plaintext to get the // ciphertext. Obviously, this should be used only for testing. @@ -24,6 +24,6 @@ class FakeEncryptor : public Encryptor { std::string* plaintext) OVERRIDE; }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_FAKE_ENCRYPTOR_H_ diff --git a/sync/test/fake_extensions_activity_monitor.cc b/sync/test/fake_extensions_activity_monitor.cc index 2484448..9fb20a6 100644 --- a/sync/test/fake_extensions_activity_monitor.cc +++ b/sync/test/fake_extensions_activity_monitor.cc @@ -6,7 +6,7 @@ #include "base/logging.h" -namespace csync { +namespace syncer { FakeExtensionsActivityMonitor::FakeExtensionsActivityMonitor() {} @@ -28,4 +28,4 @@ void FakeExtensionsActivityMonitor::PutRecords(const Records& records) { } } -} // namespace csync +} // namespace syncer diff --git a/sync/test/fake_extensions_activity_monitor.h b/sync/test/fake_extensions_activity_monitor.h index 3ff0ce7..84c38ea 100644 --- a/sync/test/fake_extensions_activity_monitor.h +++ b/sync/test/fake_extensions_activity_monitor.h @@ -10,7 +10,7 @@ #include "base/threading/non_thread_safe.h" #include "sync/util/extensions_activity_monitor.h" -namespace csync { +namespace syncer { // Fake non-thread-safe implementation of ExtensionsActivityMonitor // suitable to be used in single-threaded sync tests. @@ -29,6 +29,6 @@ class FakeExtensionsActivityMonitor Records records_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_FAKE_EXTENSIONS_ACTIVITY_MONITOR_H_ diff --git a/sync/test/null_transaction_observer.cc b/sync/test/null_transaction_observer.cc index e400fad..657e2a4 100644 --- a/sync/test/null_transaction_observer.cc +++ b/sync/test/null_transaction_observer.cc @@ -8,8 +8,8 @@ namespace syncable { -csync::WeakHandle<TransactionObserver> NullTransactionObserver() { - return csync::MakeWeakHandle(base::WeakPtr<TransactionObserver>()); +syncer::WeakHandle<TransactionObserver> NullTransactionObserver() { + return syncer::MakeWeakHandle(base::WeakPtr<TransactionObserver>()); } } // namespace syncable diff --git a/sync/test/null_transaction_observer.h b/sync/test/null_transaction_observer.h index b84580e..eca3e7f 100644 --- a/sync/test/null_transaction_observer.h +++ b/sync/test/null_transaction_observer.h @@ -14,7 +14,7 @@ class TransactionObserver; // Returns an initialized weak handle to a transaction observer that // does nothing. -csync::WeakHandle<TransactionObserver> NullTransactionObserver(); +syncer::WeakHandle<TransactionObserver> NullTransactionObserver(); } // namespace syncable diff --git a/sync/test/sessions/test_scoped_session_event_listener.h b/sync/test/sessions/test_scoped_session_event_listener.h index 17fc160..ef46d7b 100644 --- a/sync/test/sessions/test_scoped_session_event_listener.h +++ b/sync/test/sessions/test_scoped_session_event_listener.h @@ -8,7 +8,7 @@ #include "sync/sessions/sync_session_context.h" -namespace csync { +namespace syncer { namespace sessions { // Installs a SyncEventListener to a given session context for the lifetime of @@ -31,6 +31,6 @@ class TestScopedSessionEventListener { }; } // namespace sessions -} // namespace csync +} // namespace syncer #endif // SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_ diff --git a/sync/tools/sync_listen_notifications.cc b/sync/tools/sync_listen_notifications.cc index 0b0f060..71ea3b5 100644 --- a/sync/tools/sync_listen_notifications.cc +++ b/sync/tools/sync_listen_notifications.cc @@ -39,7 +39,7 @@ namespace { // Class to print received notifications events. -class NotificationPrinter : public csync::SyncNotifierObserver { +class NotificationPrinter : public syncer::SyncNotifierObserver { public: NotificationPrinter() {} virtual ~NotificationPrinter() {} @@ -49,17 +49,17 @@ class NotificationPrinter : public csync::SyncNotifierObserver { } virtual void OnNotificationsDisabled( - csync::NotificationsDisabledReason reason) OVERRIDE { + syncer::NotificationsDisabledReason reason) OVERRIDE { LOG(INFO) << "Notifications disabled with reason " - << csync::NotificationsDisabledReasonToString(reason); + << syncer::NotificationsDisabledReasonToString(reason); } virtual void OnIncomingNotification( const syncable::ModelTypePayloadMap& type_payloads, - csync::IncomingNotificationSource source) OVERRIDE { + syncer::IncomingNotificationSource source) OVERRIDE { for (syncable::ModelTypePayloadMap::const_iterator it = type_payloads.begin(); it != type_payloads.end(); ++it) { - LOG(INFO) << (source == csync::REMOTE_NOTIFICATION ? + LOG(INFO) << (source == syncer::REMOTE_NOTIFICATION ? "Remote" : "Local") << " Notification: type = " << syncable::ModelTypeToString(it->first) @@ -73,21 +73,21 @@ class NotificationPrinter : public csync::SyncNotifierObserver { class NullInvalidationStateTracker : public base::SupportsWeakPtr<NullInvalidationStateTracker>, - public csync::InvalidationStateTracker { + public syncer::InvalidationStateTracker { public: NullInvalidationStateTracker() {} virtual ~NullInvalidationStateTracker() {} - virtual csync::InvalidationVersionMap + virtual syncer::InvalidationVersionMap GetAllMaxVersions() const OVERRIDE { - return csync::InvalidationVersionMap(); + return syncer::InvalidationVersionMap(); } virtual void SetMaxVersion( const invalidation::ObjectId& id, int64 max_invalidation_version) OVERRIDE { LOG(INFO) << "Setting max invalidation version for " - << csync::ObjectIdToString(id) << " to " + << syncer::ObjectIdToString(id) << " to " << max_invalidation_version; } @@ -208,7 +208,7 @@ int main(int argc, char* argv[]) { "[--%s=host:port] [--%s] [--%s]\n" "[--%s=(server|p2p)]\n\n" "Run chrome and set a breakpoint on\n" - "csync::SyncManager::SyncInternal::UpdateCredentials() " + "syncer::SyncManager::SyncInternal::UpdateCredentials() " "after logging into\n" "sync to get the token to pass into this utility.\n", argv[0], @@ -228,10 +228,10 @@ int main(int argc, char* argv[]) { new MyTestURLRequestContextGetter(io_thread.message_loop_proxy())); const char kClientInfo[] = "sync_listen_notifications"; NullInvalidationStateTracker null_invalidation_state_tracker; - csync::SyncNotifierFactory sync_notifier_factory( + syncer::SyncNotifierFactory sync_notifier_factory( notifier_options, kClientInfo, null_invalidation_state_tracker.AsWeakPtr()); - scoped_ptr<csync::SyncNotifier> sync_notifier( + scoped_ptr<syncer::SyncNotifier> sync_notifier( sync_notifier_factory.CreateSyncNotifier()); NotificationPrinter notification_printer; sync_notifier->AddObserver(¬ification_printer); diff --git a/sync/util/cryptographer.cc b/sync/util/cryptographer.cc index d316149..6cb7fab 100644 --- a/sync/util/cryptographer.cc +++ b/sync/util/cryptographer.cc @@ -10,7 +10,7 @@ #include "base/logging.h" #include "sync/util/encryptor.h" -namespace csync { +namespace syncer { const char kNigoriTag[] = "google_chrome_nigori"; @@ -450,4 +450,4 @@ void Cryptographer::InstallKeyBag(const sync_pb::NigoriKeyBag& bag) { } } -} // namespace csync +} // namespace syncer diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h index 24dbf1b..a27fc1d 100644 --- a/sync/util/cryptographer.h +++ b/sync/util/cryptographer.h @@ -18,7 +18,7 @@ #include "sync/protocol/nigori_specifics.pb.h" #include "sync/util/nigori.h" -namespace csync { +namespace syncer { class Encryptor; @@ -248,6 +248,6 @@ class Cryptographer { DISALLOW_COPY_AND_ASSIGN(Cryptographer); }; -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_CRYPTOGRAPHER_H_ diff --git a/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc index fbb97ff..ca9c48d 100644 --- a/sync/util/cryptographer_unittest.cc +++ b/sync/util/cryptographer_unittest.cc @@ -15,7 +15,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -388,4 +388,4 @@ TEST_F(SyncCryptographerTest, UnknownSensitiveTypes) { cryptographer_.RemoveObserver(&observer); } -} // namespace csync +} // namespace syncer diff --git a/sync/util/data_type_histogram_unittest.cc b/sync/util/data_type_histogram_unittest.cc index 9b5d0ea..0601d31 100644 --- a/sync/util/data_type_histogram_unittest.cc +++ b/sync/util/data_type_histogram_unittest.cc @@ -7,7 +7,7 @@ #include "base/time.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { class DataTypeHistogramTest : public testing::Test { @@ -60,4 +60,4 @@ TEST(DataTypeHistogramTest, BasicEnum) { } } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/util/encryptor.h b/sync/util/encryptor.h index 415d6b1..48d5d6c 100644 --- a/sync/util/encryptor.h +++ b/sync/util/encryptor.h @@ -8,7 +8,7 @@ #include <string> -namespace csync { +namespace syncer { class Encryptor { public: @@ -23,6 +23,6 @@ class Encryptor { virtual ~Encryptor() {} }; -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_ENCRYPTOR_H_ diff --git a/sync/util/extensions_activity_monitor.cc b/sync/util/extensions_activity_monitor.cc index 24d3b0f..fabe50b 100644 --- a/sync/util/extensions_activity_monitor.cc +++ b/sync/util/extensions_activity_monitor.cc @@ -4,7 +4,7 @@ #include "sync/util/extensions_activity_monitor.h" -namespace csync { +namespace syncer { ExtensionsActivityMonitor::Record::Record() : bookmark_write_count(0U) {} @@ -13,4 +13,4 @@ ExtensionsActivityMonitor::Record::~Record() {} ExtensionsActivityMonitor::~ExtensionsActivityMonitor() {} -} // namespace csync +} // namespace syncer diff --git a/sync/util/extensions_activity_monitor.h b/sync/util/extensions_activity_monitor.h index 4533f17..bb476e2e 100644 --- a/sync/util/extensions_activity_monitor.h +++ b/sync/util/extensions_activity_monitor.h @@ -11,7 +11,7 @@ #include "base/basictypes.h" -namespace csync { +namespace syncer { // An interface to monitor usage of extensions APIs to send to sync // servers, with the ability to purge data once sync servers have @@ -48,6 +48,6 @@ class ExtensionsActivityMonitor { virtual ~ExtensionsActivityMonitor(); }; -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_ diff --git a/sync/util/get_session_name.cc b/sync/util/get_session_name.cc index cd26bba..99a4ce0 100644 --- a/sync/util/get_session_name.cc +++ b/sync/util/get_session_name.cc @@ -23,7 +23,7 @@ #include "sync/util/session_utils_android.h" #endif -namespace csync { +namespace syncer { namespace { @@ -85,4 +85,4 @@ std::string GetSessionNameSynchronouslyForTesting() { return GetSessionNameSynchronously(); } -} // namespace csync +} // namespace syncer diff --git a/sync/util/get_session_name.h b/sync/util/get_session_name.h index ea84aee..6e1b7dd 100644 --- a/sync/util/get_session_name.h +++ b/sync/util/get_session_name.h @@ -15,7 +15,7 @@ namespace base { class TaskRunner; } // namespace base -namespace csync { +namespace syncer { void GetSessionName( const scoped_refptr<base::TaskRunner>& task_runner, @@ -23,6 +23,6 @@ void GetSessionName( std::string GetSessionNameSynchronouslyForTesting(); -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_GET_SESSION_NAME_H_ diff --git a/sync/util/get_session_name_mac.h b/sync/util/get_session_name_mac.h index d262f8d..6d5c27c 100644 --- a/sync/util/get_session_name_mac.h +++ b/sync/util/get_session_name_mac.h @@ -8,7 +8,7 @@ #include <string> -namespace csync { +namespace syncer { namespace internal { // Returns the Hardware model name, without trailing numbers, if @@ -18,6 +18,6 @@ namespace internal { std::string GetHardwareModelName(); } // namespace internal -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_GET_SESSION_NAME_MAC_H_ diff --git a/sync/util/get_session_name_mac.mm b/sync/util/get_session_name_mac.mm index 73a77b9..6298604 100644 --- a/sync/util/get_session_name_mac.mm +++ b/sync/util/get_session_name_mac.mm @@ -19,7 +19,7 @@ - (NSString*)localizedName; @end -namespace csync { +namespace syncer { namespace internal { std::string GetHardwareModelName() { @@ -48,4 +48,4 @@ std::string GetHardwareModelName() { } } // namespace internal -} // namespace csync +} // namespace syncer diff --git a/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc index 03c9be4..b4922f6 100644 --- a/sync/util/get_session_name_unittest.cc +++ b/sync/util/get_session_name_unittest.cc @@ -9,7 +9,7 @@ #include "sync/util/get_session_name.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { @@ -45,4 +45,4 @@ TEST_F(GetSessionNameTest, GetSessionName) { } // namespace -} // namespace csync +} // namespace syncer diff --git a/sync/util/get_session_name_win.cc b/sync/util/get_session_name_win.cc index c79b7845..101bcd4 100644 --- a/sync/util/get_session_name_win.cc +++ b/sync/util/get_session_name_win.cc @@ -6,7 +6,7 @@ #include <windows.h> -namespace csync { +namespace syncer { namespace internal { std::string GetComputerName() { @@ -18,4 +18,4 @@ std::string GetComputerName() { } } // namespace internal -} // namespace csync +} // namespace syncer diff --git a/sync/util/get_session_name_win.h b/sync/util/get_session_name_win.h index 590e679..68b86f8 100644 --- a/sync/util/get_session_name_win.h +++ b/sync/util/get_session_name_win.h @@ -8,12 +8,12 @@ #include <string> -namespace csync { +namespace syncer { namespace internal { std::string GetComputerName(); } // namespace internal -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_GET_SESSION_NAME_WIN_H_ diff --git a/sync/util/logging.cc b/sync/util/logging.cc index 9458379..272c72c 100644 --- a/sync/util/logging.cc +++ b/sync/util/logging.cc @@ -6,7 +6,7 @@ #include "base/location.h" -namespace csync { +namespace syncer { bool VlogIsOnForLocation(const tracked_objects::Location& from_here, int verbose_level) { @@ -15,4 +15,4 @@ bool VlogIsOnForLocation(const tracked_objects::Location& from_here, from_here.file_name(), ::strlen(from_here.file_name()))); } -} // namespace csync +} // namespace syncer diff --git a/sync/util/logging.h b/sync/util/logging.h index 97d215b..900c08f 100644 --- a/sync/util/logging.h +++ b/sync/util/logging.h @@ -14,12 +14,12 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace csync { +namespace syncer { bool VlogIsOnForLocation(const tracked_objects::Location& from_here, int verbose_level); -} // namespace csync +} // namespace syncer #define VLOG_LOC_STREAM(from_here, verbose_level) \ logging::LogMessage(from_here.file_name(), from_here.line_number(), \ @@ -30,6 +30,6 @@ bool VlogIsOnForLocation(const tracked_objects::Location& from_here, VLOG_LOC_STREAM(from_here, verbose_level), \ ::logging::DEBUG_MODE && \ (VLOG_IS_ON(verbose_level) || \ - ::csync::VlogIsOnForLocation(from_here, verbose_level))) \ + ::syncer::VlogIsOnForLocation(from_here, verbose_level))) \ #endif // SYNC_UTIL_LOGGING_H_ diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc index f68956d..f2ee83d 100644 --- a/sync/util/nigori.cc +++ b/sync/util/nigori.cc @@ -23,7 +23,7 @@ using crypto::Encryptor; using crypto::HMAC; using crypto::SymmetricKey; -namespace csync { +namespace syncer { // NigoriStream simplifies the concatenation operation of the Nigori protocol. class NigoriStream { @@ -254,4 +254,4 @@ bool Nigori::ExportKeys(std::string* user_key, mac_key_->GetRawKey(mac_key); } -} // namespace csync +} // namespace syncer diff --git a/sync/util/nigori.h b/sync/util/nigori.h index 1901211..312cfb3 100644 --- a/sync/util/nigori.h +++ b/sync/util/nigori.h @@ -14,7 +14,7 @@ namespace crypto { class SymmetricKey; } // namespace crypto -namespace csync { +namespace syncer { // A (partial) implementation of Nigori, a protocol to securely store secrets in // the cloud. This implementation does not support server authentication or @@ -81,6 +81,6 @@ class Nigori { scoped_ptr<crypto::SymmetricKey> mac_key_; }; -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_NIGORI_H_ diff --git a/sync/util/nigori_unittest.cc b/sync/util/nigori_unittest.cc index b014a81..7b6ac16 100644 --- a/sync/util/nigori_unittest.cc +++ b/sync/util/nigori_unittest.cc @@ -10,7 +10,7 @@ #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { namespace { TEST(SyncNigoriTest, Permute) { @@ -167,4 +167,4 @@ TEST(SyncNigoriTest, MAYBE_ExportImport) { } } // anonymous namespace -} // namespace csync +} // namespace syncer diff --git a/sync/util/session_utils_android.cc b/sync/util/session_utils_android.cc index a4f4400..676fdde 100644 --- a/sync/util/session_utils_android.cc +++ b/sync/util/session_utils_android.cc @@ -51,7 +51,7 @@ ScopedJavaLocalRef<jobject> GetContentResolver(JNIEnv* env) { } -namespace csync { +namespace syncer { namespace internal { std::string GetAndroidId() { @@ -73,4 +73,4 @@ bool IsTabletUi() { } } // namespace internal -} // namespace csync +} // namespace syncer diff --git a/sync/util/session_utils_android.h b/sync/util/session_utils_android.h index 4da0ea9..412fab7 100644 --- a/sync/util/session_utils_android.h +++ b/sync/util/session_utils_android.h @@ -8,7 +8,7 @@ #include <string> -namespace csync { +namespace syncer { namespace internal { // Return the unique identifier of this device. @@ -21,6 +21,6 @@ std::string GetModel(); bool IsTabletUi(); } // namespace internal -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_SESSION_UTILS_ANDROID_H_ diff --git a/sync/util/test_unrecoverable_error_handler.cc b/sync/util/test_unrecoverable_error_handler.cc index 07367c3..4bdbf3d 100644 --- a/sync/util/test_unrecoverable_error_handler.cc +++ b/sync/util/test_unrecoverable_error_handler.cc @@ -6,7 +6,7 @@ #include "testing/gtest/include/gtest/gtest.h" -namespace csync { +namespace syncer { TestUnrecoverableErrorHandler::TestUnrecoverableErrorHandler() {} @@ -19,5 +19,5 @@ void TestUnrecoverableErrorHandler::OnUnrecoverableError( << from_here.function_name() << ": " << message; } -} // namespace csync +} // namespace syncer diff --git a/sync/util/test_unrecoverable_error_handler.h b/sync/util/test_unrecoverable_error_handler.h index 758ba79..bec0fc7 100644 --- a/sync/util/test_unrecoverable_error_handler.h +++ b/sync/util/test_unrecoverable_error_handler.h @@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "sync/internal_api/public/util/unrecoverable_error_handler.h" -namespace csync { +namespace syncer { // Implementation of UnrecoverableErrorHandler that simply adds a // gtest failure. @@ -22,7 +22,7 @@ class TestUnrecoverableErrorHandler : public UnrecoverableErrorHandler { const std::string& message) OVERRIDE; }; -} // namespace csync +} // namespace syncer #endif // SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_ diff --git a/sync/util/time.cc b/sync/util/time.cc index 47e6af4..a921f07 100644 --- a/sync/util/time.cc +++ b/sync/util/time.cc @@ -7,7 +7,7 @@ #include "base/i18n/time_formatting.h" #include "base/utf_string_conversions.h" -namespace csync { +namespace syncer { int64 TimeToProtoTime(const base::Time& t) { return (t - base::Time::UnixEpoch()).InMilliseconds(); @@ -21,4 +21,4 @@ std::string GetTimeDebugString(const base::Time& t) { return UTF16ToUTF8(base::TimeFormatFriendlyDateAndTime(t)); } -} // namespace csync +} // namespace syncer diff --git a/sync/util/time.h b/sync/util/time.h index 2c8a9cf..1044a5b 100644 --- a/sync/util/time.h +++ b/sync/util/time.h @@ -13,7 +13,7 @@ #include "base/basictypes.h" #include "base/time.h" -namespace csync { +namespace syncer { // Converts a time object to the format used in sync protobufs (ms // since the Unix epoch). @@ -24,6 +24,6 @@ base::Time ProtoTimeToTime(int64 proto_t); std::string GetTimeDebugString(const base::Time& t); -} // namespace csync +} // namespace syncer #endif // SYNC_UTIL_TIME_H_ |