diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-21 20:48:36 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-21 20:48:36 +0000 |
commit | d78354a5e74c5208dd9ebe83717b22223c1e1272 (patch) | |
tree | 4c616bbbfbf1776055d250644e1a47d435b11c8a /sync | |
parent | 41fed979ae412d2475a2860ea1ec95531bebb5af (diff) | |
download | chromium_src-d78354a5e74c5208dd9ebe83717b22223c1e1272.zip chromium_src-d78354a5e74c5208dd9ebe83717b22223c1e1272.tar.gz chromium_src-d78354a5e74c5208dd9ebe83717b22223c1e1272.tar.bz2 |
[Sync] Rename browser_sync to csync in sync/
Update all references from chrome.
Leave possibly-extraneous csync:: qualifications in sync/ for now.
(This will be cleaned up once everything in sync/ is in csync::.)
BUG=128060
TEST=
TBR=jhawkins@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10600002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143449 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync')
241 files changed, 708 insertions, 703 deletions
diff --git a/sync/api/sync_change_unittest.cc b/sync/api/sync_change_unittest.cc index 263abdd..edde073 100644 --- a/sync/api/sync_change_unittest.cc +++ b/sync/api/sync_change_unittest.cc @@ -13,7 +13,7 @@ #include "sync/protocol/sync.pb.h" #include "testing/gtest/include/gtest/gtest.h" -using browser_sync::EntitySpecificsToValue; +using csync::EntitySpecificsToValue; // Ordered list of SyncChange's. typedef std::vector<SyncChange> SyncChangeList; diff --git a/sync/api/sync_data.cc b/sync/api/sync_data.cc index a5a1738..d573b3f 100644 --- a/sync/api/sync_data.cc +++ b/sync/api/sync_data.cc @@ -120,7 +120,7 @@ std::string SyncData::ToString() const { std::string type = syncable::ModelTypeToString(GetDataType()); std::string specifics; scoped_ptr<DictionaryValue> value( - browser_sync::EntitySpecificsToValue(GetSpecifics())); + csync::EntitySpecificsToValue(GetSpecifics())); base::JSONWriter::WriteWithOptions(value.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &specifics); diff --git a/sync/api/sync_data.h b/sync/api/sync_data.h index d6a51ba..974df9b 100644 --- a/sync/api/sync_data.h +++ b/sync/api/sync_data.h @@ -98,7 +98,7 @@ class SyncData { static void Swap(sync_pb::SyncEntity* t1, sync_pb::SyncEntity* t2); }; - typedef browser_sync::Immutable< + typedef csync::Immutable< sync_pb::SyncEntity, ImmutableSyncEntityTraits> ImmutableSyncEntity; diff --git a/sync/engine/all_status.cc b/sync/engine/all_status.cc index cf170f0c1..63a7d0f 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 browser_sync { +namespace csync { AllStatus::AllStatus() { status_.initial_sync_ended = true; @@ -166,4 +166,4 @@ ScopedStatusLock::~ScopedStatusLock() { allstatus_->mutex_.Release(); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/all_status.h b/sync/engine/all_status.h index 68f41f4..93125cd 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 browser_sync { +namespace csync { class ScopedStatusLock; struct ServerConnectionEvent; @@ -77,6 +77,6 @@ class ScopedStatusLock { AllStatus* allstatus_; }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_ALL_STATUS_H_ diff --git a/sync/engine/apply_updates_command.cc b/sync/engine/apply_updates_command.cc index 35490c3..fd18ff2 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 browser_sync { +namespace csync { using sessions::SyncSession; @@ -85,4 +85,4 @@ SyncerError ApplyUpdatesCommand::ModelChangingExecuteImpl( return SYNCER_OK; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/apply_updates_command.h b/sync/engine/apply_updates_command.h index 4282dc1..b6885c3 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 browser_sync { +namespace csync { class ApplyUpdatesCommand : public ModelChangingSyncerCommand { public: @@ -27,6 +27,6 @@ class ApplyUpdatesCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ApplyUpdatesCommand); }; -} // namespace browser_sync +} // namespace csync #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 e60c15f..517e7f2 100644 --- a/sync/engine/apply_updates_command_unittest.cc +++ b/sync/engine/apply_updates_command_unittest.cc @@ -25,7 +25,7 @@ #include "sync/util/cryptographer.h" #include "testing/gtest/include/gtest/gtest.h" -namespace browser_sync { +namespace csync { using sessions::SyncSession; using std::string; @@ -531,7 +531,7 @@ TEST_F(ApplyUpdatesCommandTest, DecryptablePassword) { cryptographer = directory()->GetCryptographer(&trans); } - browser_sync::KeyParams params = {"localhost", "dummy", "foobar"}; + csync::KeyParams params = {"localhost", "dummy", "foobar"}; cryptographer->AddKey(params); sync_pb::EntitySpecifics specifics; @@ -1005,4 +1005,4 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/build_commit_command.cc b/sync/engine/build_commit_command.cc index 665613a..c83bd69 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 browser_sync { +namespace csync { using sessions::SyncSession; @@ -261,4 +261,4 @@ int64 BuildCommitCommand::InterpolatePosition(const int64 lo, } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/build_commit_command.h b/sync/engine/build_commit_command.h index bdcefe1..53bafd7 100644 --- a/sync/engine/build_commit_command.h +++ b/sync/engine/build_commit_command.h @@ -17,7 +17,7 @@ namespace syncable { class Entry; } -namespace browser_sync { +namespace csync { namespace sessions { class OrderedCommitSet; @@ -74,6 +74,6 @@ class BuildCommitCommand : public SyncerCommand { ClientToServerMessage* commit_message_; }; -} // namespace browser_sync +} // namespace csync #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 6263615..f92bcd0 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync diff --git a/sync/engine/cleanup_disabled_types_command.cc b/sync/engine/cleanup_disabled_types_command.cc index 1a94663..953dc6c 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 browser_sync { +namespace csync { CleanupDisabledTypesCommand::CleanupDisabledTypesCommand() {} CleanupDisabledTypesCommand::~CleanupDisabledTypesCommand() {} @@ -66,5 +66,5 @@ SyncerError CleanupDisabledTypesCommand::ExecuteImpl( return SYNCER_OK; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/cleanup_disabled_types_command.h b/sync/engine/cleanup_disabled_types_command.h index c855814..45ec01d 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 665c68c..d386136 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 browser_sync { +namespace csync { namespace { @@ -74,4 +74,4 @@ TEST_F(CleanupDisabledTypesCommandTest, TypeDisabled) { } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/commit.cc b/sync/engine/commit.cc index abef162..7cff6cb 100644 --- a/sync/engine/commit.cc +++ b/sync/engine/commit.cc @@ -16,7 +16,7 @@ using syncable::SYNCER; using syncable::WriteTransaction; -namespace browser_sync { +namespace csync { using sessions::SyncSession; using sessions::StatusController; @@ -152,4 +152,4 @@ SyncerError BuildAndPostCommits(Syncer* syncer, return result; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/commit.h b/sync/engine/commit.h index f03ceb0..5e8e0fa 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 browser_sync { +namespace csync { namespace sessions { class SyncSession; @@ -32,6 +32,6 @@ SyncerError BuildAndPostCommits( Syncer* syncer, sessions::SyncSession* session); -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_COMMIT_H_ diff --git a/sync/engine/conflict_resolver.cc b/sync/engine/conflict_resolver.cc index d775c1d..156bc90 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 browser_sync { +namespace csync { using sessions::ConflictProgress; using sessions::StatusController; @@ -417,4 +417,4 @@ bool ConflictResolver::ResolveConflicts(syncable::WriteTransaction* trans, return forward_progress; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/conflict_resolver.h b/sync/engine/conflict_resolver.h index d2d89d0..fedaa45 100644 --- a/sync/engine/conflict_resolver.h +++ b/sync/engine/conflict_resolver.h @@ -24,7 +24,7 @@ class MutableEntry; class WriteTransaction; } // namespace syncable -namespace browser_sync { +namespace csync { class Cryptographer; @@ -84,6 +84,6 @@ class ConflictResolver { DISALLOW_COPY_AND_ASSIGN(ConflictResolver); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_CONFLICT_RESOLVER_H_ diff --git a/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc index cc8cf4e..fb74f3d 100644 --- a/sync/engine/download_updates_command.cc +++ b/sync/engine/download_updates_command.cc @@ -15,7 +15,7 @@ using sync_pb::DebugInfo; -namespace browser_sync { +namespace csync { using sessions::StatusController; using sessions::SyncSession; using std::string; @@ -127,4 +127,4 @@ void DownloadUpdatesCommand::AppendClientDebugInfoIfNeeded( } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/download_updates_command.h b/sync/engine/download_updates_command.h index 5eddcce..527844e 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 9a6c280..9a9739f 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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync diff --git a/sync/engine/get_commit_ids_command.cc b/sync/engine/get_commit_ids_command.cc index 6936cc7..d3264f2 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 browser_sync { +namespace csync { using sessions::OrderedCommitSet; using sessions::SyncSession; @@ -432,4 +432,4 @@ void GetCommitIdsCommand::BuildCommitIds( AddDeletes(write_transaction, ready_unsynced_set); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/get_commit_ids_command.h b/sync/engine/get_commit_ids_command.h index 3e18f60..5d9117f 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 f6da0f3..08340a4 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 browser_sync { +namespace csync { SyncerError ModelChangingSyncerCommand::ExecuteImpl( sessions::SyncSession* session) { @@ -48,4 +48,4 @@ SyncerError ModelChangingSyncerCommand::ExecuteImpl( return result; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/model_changing_syncer_command.h b/sync/engine/model_changing_syncer_command.h index fba8d11..44f045a 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 browser_sync { +namespace csync { namespace sessions { class SyncSession; } @@ -31,7 +31,7 @@ class ModelChangingSyncerCommand : public SyncerCommand { virtual ~ModelChangingSyncerCommand() { } // SyncerCommand implementation. Sets work_session to session. - virtual browser_sync::SyncerError ExecuteImpl( + virtual csync::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 browser_sync +} // namespace csync #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 1f1d93d..16e8dab 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 browser_sync { +namespace csync { namespace { @@ -74,4 +74,4 @@ TEST_F(ModelChangingSyncerCommandTest, Basic) { } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/net/server_connection_manager.cc b/sync/engine/net/server_connection_manager.cc index 5ffd6a7..92f083e 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 browser_sync { +namespace csync { using std::ostream; using std::string; @@ -332,4 +332,4 @@ std::ostream& operator << (std::ostream& s, const struct HttpResponse& hr) { return s; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/net/server_connection_manager.h b/sync/engine/net/server_connection_manager.h index e6e18da..4083ba2 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 browser_sync { +namespace csync { static const int32 kUnsetResponseCode = -1; static const int32 kUnsetContentLength = -1; @@ -354,6 +354,6 @@ bool FillMessageWithShareDetails(sync_pb::ClientToServerMessage* csm, std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr); -} // namespace browser_sync +} // namespace csync #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 4602bda..3c18794 100644 --- a/sync/engine/net/url_translator.cc +++ b/sync/engine/net/url_translator.cc @@ -13,7 +13,7 @@ using std::string; -namespace browser_sync { +namespace csync { namespace { // Parameters that the server understands. (here, a-Z) @@ -54,4 +54,4 @@ string MakeSyncQueryString(const string& client_id) { return query; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/net/url_translator.h b/sync/engine/net/url_translator.h index 65b7346..1842380 100644 --- a/sync/engine/net/url_translator.h +++ b/sync/engine/net/url_translator.h @@ -11,7 +11,7 @@ #include <string> -namespace browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #endif // SYNC_ENGINE_NET_URL_TRANSLATOR_H_ diff --git a/sync/engine/nigori_util.cc b/sync/engine/nigori_util.cc index 0b34a02..765cf0a 100644 --- a/sync/engine/nigori_util.cc +++ b/sync/engine/nigori_util.cc @@ -20,7 +20,7 @@ namespace syncable { bool ProcessUnsyncedChangesForEncryption( WriteTransaction* const trans, - browser_sync::Cryptographer* cryptographer) { + csync::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; - browser_sync::SyncerUtil::GetUnsyncedEntries(trans, &handles); + csync::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; - browser_sync::SyncerUtil::GetUnsyncedEntries(trans, &handles); + csync::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, - browser_sync::Cryptographer* cryptographer, + csync::Cryptographer* cryptographer, ModelType type, bool is_encrypted) { if (type == PASSWORDS || type == NIGORI) { @@ -156,7 +156,7 @@ bool VerifyDataTypeEncryptionForTest( } bool UpdateEntryWithEncryption( - browser_sync::Cryptographer* cryptographer, + csync::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 2adcc9f..5e5c20a 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 browser_sync { +namespace csync { class Cryptographer; } @@ -43,7 +43,7 @@ bool VerifyUnsyncedChangesAreEncrypted( // or unencrypted, based on |encrypted_types|. bool ProcessUnsyncedChangesForEncryption( WriteTransaction* const trans, - browser_sync::Cryptographer* cryptographer); + csync::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, - browser_sync::Cryptographer* cryptographer, + csync::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( - browser_sync::Cryptographer* cryptographer, + csync::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 50cd7eb..1020fbf 100644 --- a/sync/engine/nudge_source.cc +++ b/sync/engine/nudge_source.cc @@ -6,7 +6,7 @@ #include "base/logging.h" -namespace browser_sync { +namespace csync { #define ENUM_CASE(x) case x: return #x; break @@ -24,4 +24,4 @@ const char* GetNudgeSourceString(NudgeSource nudge_source) { #undef ENUM_CASE -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/nudge_source.h b/sync/engine/nudge_source.h index f3488f4..a842915 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 browser_sync { +namespace csync { enum NudgeSource { NUDGE_SOURCE_UNKNOWN = 0, @@ -22,6 +22,6 @@ enum NudgeSource { const char* GetNudgeSourceString(NudgeSource nudge_source); -} // namespace browser_sync +} // namespace csync #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 fbfe941..2a01a30 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 browser_sync { +namespace csync { using sessions::OrderedCommitSet; using sessions::StatusController; @@ -477,4 +477,4 @@ void ProcessCommitResponseCommand::ProcessSuccessfulCommitResponse( } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/process_commit_response_command.h b/sync/engine/process_commit_response_command.h index b17809f..98de2f2 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 browser_sync { +namespace csync { namespace sessions { class OrderedCommitSet; @@ -131,6 +131,6 @@ class ProcessCommitResponseCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ProcessCommitResponseCommand); }; -} // namespace browser_sync +} // namespace csync #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 bd1b661..0646070 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 browser_sync { +namespace csync { using sessions::SyncSession; using std::string; @@ -119,8 +119,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest { const string& name, syncable::ModelType model_type, sessions::OrderedCommitSet *commit_set, - browser_sync::ClientToServerMessage *commit, - browser_sync::ClientToServerResponse *response) { + csync::ClientToServerMessage *commit, + csync::ClientToServerResponse *response) { bool is_folder = true; int64 metahandle = 0; CreateUnsyncedItem(item_id, parent_id, name, is_folder, model_type, @@ -191,8 +191,8 @@ class ProcessCommitResponseCommandTest : public SyncerCommandTest { TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - browser_sync::ClientToServerMessage request; - browser_sync::ClientToServerResponse response; + csync::ClientToServerMessage request; + csync::ClientToServerResponse response; Id bookmark_folder_id = id_factory_.NewLocalId(); Id bookmark_id1 = id_factory_.NewLocalId(); @@ -275,8 +275,8 @@ TEST_F(ProcessCommitResponseCommandTest, MultipleCommitIdProjections) { // of the children. TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - browser_sync::ClientToServerMessage request; - browser_sync::ClientToServerResponse response; + csync::ClientToServerMessage request; + csync::ClientToServerResponse response; // Create the parent folder, a new item whose ID will change on commit. Id folder_id = id_factory_.NewLocalId(); @@ -403,8 +403,8 @@ INSTANTIATE_TEST_CASE_P(ProcessCommitResponse, // depending on the test parameter. TEST_P(MixedResult, ExtensionActivity) { sessions::OrderedCommitSet commit_set(session()->routing_info()); - browser_sync::ClientToServerMessage request; - browser_sync::ClientToServerResponse response; + csync::ClientToServerMessage request; + csync::ClientToServerResponse response; EXPECT_NE(routing_info().find(syncable::BOOKMARKS)->second, routing_info().find(syncable::AUTOFILL)->second) @@ -452,4 +452,4 @@ TEST_P(MixedResult, ExtensionActivity) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/process_updates_command.cc b/sync/engine/process_updates_command.cc index a7073a5..003c59f 100644 --- a/sync/engine/process_updates_command.cc +++ b/sync/engine/process_updates_command.cc @@ -21,7 +21,7 @@ using std::vector; -namespace browser_sync { +namespace csync { using sessions::SyncSession; using sessions::StatusController; @@ -182,4 +182,4 @@ ServerUpdateProcessingResult ProcessUpdatesCommand::ProcessUpdate( return SUCCESS_PROCESSED; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/process_updates_command.h b/sync/engine/process_updates_command.h index f5f430f..262d5b7 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 browser_sync { +namespace csync { class Cryptographer; @@ -50,6 +50,6 @@ class ProcessUpdatesCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ProcessUpdatesCommand); }; -} // namespace browser_sync +} // namespace csync #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 448daea..a8e8ca3 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 browser_sync { +namespace csync { namespace { @@ -49,4 +49,4 @@ TEST_F(ProcessUpdatesCommandTest, GetGroupsToChange) { } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/resolve_conflicts_command.cc b/sync/engine/resolve_conflicts_command.cc index bac365f..edef3ff 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 browser_sync { +namespace csync { ResolveConflictsCommand::ResolveConflictsCommand() {} ResolveConflictsCommand::~ResolveConflictsCommand() {} @@ -38,4 +38,4 @@ SyncerError ResolveConflictsCommand::ModelChangingExecuteImpl( return SYNCER_OK; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/resolve_conflicts_command.h b/sync/engine/resolve_conflicts_command.h index 8c2c87e4..217ddb2 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 browser_sync { +namespace csync { class ResolveConflictsCommand : public ModelChangingSyncerCommand { public: @@ -28,6 +28,6 @@ class ResolveConflictsCommand : public ModelChangingSyncerCommand { DISALLOW_COPY_AND_ASSIGN(ResolveConflictsCommand); }; -} // namespace browser_sync +} // namespace csync #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 0265317..ac3e84f 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 browser_sync { +namespace csync { namespace { @@ -48,4 +48,4 @@ TEST_F(ResolveConflictsCommandTest, GetGroupsToChange) { } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/store_timestamps_command.cc b/sync/engine/store_timestamps_command.cc index 6791ad2..cfbabe6 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 browser_sync { +namespace csync { StoreTimestampsCommand::StoreTimestampsCommand() {} StoreTimestampsCommand::~StoreTimestampsCommand() {} @@ -56,4 +56,4 @@ SyncerError StoreTimestampsCommand::ExecuteImpl( return SYNCER_OK; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/store_timestamps_command.h b/sync/engine/store_timestamps_command.h index ec57052..cd4c054 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #endif // SYNC_ENGINE_STORE_TIMESTAMPS_COMMAND_H_ diff --git a/sync/engine/sync_engine_event.cc b/sync/engine/sync_engine_event.cc index 9ffb281..d362448 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 browser_sync { +namespace csync { SyncEngineEvent::SyncEngineEvent(EventCause cause) : what_happened(cause) { } SyncEngineEvent::~SyncEngineEvent() {} -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/sync_engine_event.h b/sync/engine/sync_engine_event.h index d47edf3..e0d011c 100644 --- a/sync/engine/sync_engine_event.h +++ b/sync/engine/sync_engine_event.h @@ -15,7 +15,7 @@ namespace syncable { class Id; } -namespace browser_sync { +namespace csync { struct SyncEngineEvent { enum EventCause { @@ -67,6 +67,6 @@ class SyncEngineEventListener { virtual ~SyncEngineEventListener() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNC_ENGINE_EVENT_H_ diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc index bf9deec..199c507 100644 --- a/sync/engine/sync_scheduler.cc +++ b/sync/engine/sync_scheduler.cc @@ -23,7 +23,7 @@ using base::TimeDelta; using base::TimeTicks; -namespace browser_sync { +namespace csync { using sessions::SyncSession; using sessions::SyncSessionSnapshot; @@ -35,22 +35,22 @@ using sync_pb::GetUpdatesCallerInfo; namespace { bool ShouldRequestEarlyExit( - const browser_sync::SyncProtocolError& error) { + const csync::SyncProtocolError& error) { switch (error.error_type) { - case browser_sync::SYNC_SUCCESS: - case browser_sync::MIGRATION_DONE: - case browser_sync::THROTTLED: - case browser_sync::TRANSIENT_ERROR: + case csync::SYNC_SUCCESS: + case csync::MIGRATION_DONE: + case csync::THROTTLED: + case csync::TRANSIENT_ERROR: return false; - case browser_sync::NOT_MY_BIRTHDAY: - case browser_sync::CLEAR_PENDING: + case csync::NOT_MY_BIRTHDAY: + case csync::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 != browser_sync::UNKNOWN_ACTION); + DCHECK(error.action != csync::UNKNOWN_ACTION); return true; - case browser_sync::INVALID_CREDENTIAL: + case csync::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 browser_sync::SyncProtocolError& error) { - return (error.action != browser_sync::UNKNOWN_ACTION); + const csync::SyncProtocolError& error) { + return (error.action != csync::UNKNOWN_ACTION); } } // namespace @@ -1140,4 +1140,4 @@ base::TimeDelta SyncScheduler::sessions_commit_delay() const { #undef ENUM_CASE -} // browser_sync +} // csync diff --git a/sync/engine/sync_scheduler.h b/sync/engine/sync_scheduler.h index 363b93e..51f5792 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 browser_sync { +namespace csync { struct ServerConnectionEvent; @@ -329,8 +329,8 @@ class SyncScheduler : public sessions::SyncSession::Delegate { void OnServerConnectionErrorFixed(); // The pointer is owned by the caller. - browser_sync::sessions::SyncSession* CreateSyncSession( - const browser_sync::sessions::SyncSourceInfo& info); + csync::sessions::SyncSession* CreateSyncSession( + const csync::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 browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNC_SCHEDULER_H_ diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc index d187d7d..82628cb 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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync diff --git a/sync/engine/sync_scheduler_whitebox_unittest.cc b/sync/engine/sync_scheduler_whitebox_unittest.cc index dbfdec1..b6e3234 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 browser_sync { -using browser_sync::Syncer; +namespace csync { +using csync::Syncer; using sessions::SyncSession; using sessions::SyncSessionContext; using sessions::SyncSourceInfo; @@ -265,4 +265,4 @@ TEST_F(SyncSchedulerWhiteboxTest, ContinueCanaryJobConfig) { EXPECT_EQ(decision, SyncScheduler::CONTINUE); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc index da4e27b..8f87cda 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 browser_sync { +namespace csync { using sessions::ScopedSessionContextConflictResolver; using sessions::StatusController; @@ -294,4 +294,4 @@ void ClearServerData(syncable::MutableEntry* entry) { entry->Put(SERVER_POSITION_IN_PARENT, 0); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer.h b/sync/engine/syncer.h index 9d2c32e..edddf9b 100644 --- a/sync/engine/syncer.h +++ b/sync/engine/syncer.h @@ -24,7 +24,7 @@ class Entry; class MutableEntry; } // namespace syncable -namespace browser_sync { +namespace csync { 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 browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNCER_H_ diff --git a/sync/engine/syncer_command.cc b/sync/engine/syncer_command.cc index 60e8deb..cac1fc5 100644 --- a/sync/engine/syncer_command.cc +++ b/sync/engine/syncer_command.cc @@ -7,7 +7,7 @@ #include "sync/engine/net/server_connection_manager.h" #include "sync/sessions/sync_session.h" -namespace browser_sync { +namespace csync { using sessions::SyncSession; SyncerCommand::SyncerCommand() {} @@ -27,4 +27,4 @@ void SyncerCommand::SendNotifications(SyncSession* session) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer_command.h b/sync/engine/syncer_command.h index 949d8fd..bb68161 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 browser_sync { +namespace csync { namespace sessions { class SyncSession; @@ -43,6 +43,6 @@ class SyncerCommand { DISALLOW_COPY_AND_ASSIGN(SyncerCommand); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNCER_COMMAND_H_ diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc index 116556f..8be6888 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 browser_sync::SyncProtocolErrorType; +using csync::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 browser_sync { +namespace csync { 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, browser_sync::THROTTLED); + DCHECK_EQ(error.error_type, csync::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 browser_sync::SYNC_SUCCESS; + return csync::SYNC_SUCCESS; case sync_pb::SyncEnums::NOT_MY_BIRTHDAY: - return browser_sync::NOT_MY_BIRTHDAY; + return csync::NOT_MY_BIRTHDAY; case sync_pb::SyncEnums::THROTTLED: - return browser_sync::THROTTLED; + return csync::THROTTLED; case sync_pb::SyncEnums::CLEAR_PENDING: - return browser_sync::CLEAR_PENDING; + return csync::CLEAR_PENDING; case sync_pb::SyncEnums::TRANSIENT_ERROR: - return browser_sync::TRANSIENT_ERROR; + return csync::TRANSIENT_ERROR; case sync_pb::SyncEnums::MIGRATION_DONE: - return browser_sync::MIGRATION_DONE; + return csync::MIGRATION_DONE; case sync_pb::SyncEnums::UNKNOWN: - return browser_sync::UNKNOWN_ERROR; + return csync::UNKNOWN_ERROR; case sync_pb::SyncEnums::USER_NOT_ACTIVATED: case sync_pb::SyncEnums::AUTH_INVALID: case sync_pb::SyncEnums::ACCESS_DENIED: - return browser_sync::INVALID_CREDENTIAL; + return csync::INVALID_CREDENTIAL; default: NOTREACHED(); - return browser_sync::UNKNOWN_ERROR; + return csync::UNKNOWN_ERROR; } } -browser_sync::ClientAction ConvertClientActionPBToLocalClientAction( +csync::ClientAction ConvertClientActionPBToLocalClientAction( const sync_pb::SyncEnums::Action& action) { switch (action) { case sync_pb::SyncEnums::UPGRADE_CLIENT: - return browser_sync::UPGRADE_CLIENT; + return csync::UPGRADE_CLIENT; case sync_pb::SyncEnums::CLEAR_USER_DATA_AND_RESYNC: - return browser_sync::CLEAR_USER_DATA_AND_RESYNC; + return csync::CLEAR_USER_DATA_AND_RESYNC; case sync_pb::SyncEnums::ENABLE_SYNC_ON_ACCOUNT: - return browser_sync::ENABLE_SYNC_ON_ACCOUNT; + return csync::ENABLE_SYNC_ON_ACCOUNT; case sync_pb::SyncEnums::STOP_AND_RESTART_SYNC: - return browser_sync::STOP_AND_RESTART_SYNC; + return csync::STOP_AND_RESTART_SYNC; case sync_pb::SyncEnums::DISABLE_SYNC_ON_CLIENT: - return browser_sync::DISABLE_SYNC_ON_CLIENT; + return csync::DISABLE_SYNC_ON_CLIENT; case sync_pb::SyncEnums::UNKNOWN_ACTION: - return browser_sync::UNKNOWN_ACTION; + return csync::UNKNOWN_ACTION; default: NOTREACHED(); - return browser_sync::UNKNOWN_ACTION; + return csync::UNKNOWN_ACTION; } } -browser_sync::SyncProtocolError ConvertErrorPBToLocalType( +csync::SyncProtocolError ConvertErrorPBToLocalType( const sync_pb::ClientToServerResponse::Error& error) { - browser_sync::SyncProtocolError sync_protocol_error; + csync::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 @@ browser_sync::SyncProtocolError ConvertErrorPBToLocalType( } // TODO(lipalani) : Rename these function names as per the CR for issue 7740067. -browser_sync::SyncProtocolError ConvertLegacyErrorCodeToNewError( +csync::SyncProtocolError ConvertLegacyErrorCodeToNewError( const sync_pb::SyncEnums::ErrorType& error_type) { - browser_sync::SyncProtocolError error; + csync::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 = browser_sync::DISABLE_SYNC_ON_CLIENT; + error.action = csync::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 browser_sync::HttpResponse::ServerConnectionCode server_status = + const csync::HttpResponse::ServerConnectionCode server_status = session->context()->connection_manager()->server_status(); - DCHECK_NE(server_status, browser_sync::HttpResponse::NONE); - DCHECK_NE(server_status, browser_sync::HttpResponse::SERVER_CONNECTION_OK); + DCHECK_NE(server_status, csync::HttpResponse::NONE); + DCHECK_NE(server_status, csync::HttpResponse::SERVER_CONNECTION_OK); return ServerConnectionErrorAsSyncerError(server_status); } @@ -358,13 +358,13 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( session->context()->traffic_recorder()->RecordClientToServerResponse( *response); - browser_sync::SyncProtocolError sync_protocol_error; + csync::SyncProtocolError sync_protocol_error; // Birthday mismatch overrides any error that is sent by the server. if (!VerifyResponseBirthday(dir, response)) { - sync_protocol_error.error_type = browser_sync::NOT_MY_BIRTHDAY; + sync_protocol_error.error_type = csync::NOT_MY_BIRTHDAY; sync_protocol_error.action = - browser_sync::DISABLE_SYNC_ON_CLIENT; + csync::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 browser_sync::UNKNOWN_ERROR: + case csync::UNKNOWN_ERROR: LOG(WARNING) << "Sync protocol out-of-date. The server is using a more " << "recent version."; return SERVER_RETURN_UNKNOWN_ERROR; - case browser_sync::SYNC_SUCCESS: + case csync::SYNC_SUCCESS: LogResponseProfilingData(*response); return SYNCER_OK; - case browser_sync::THROTTLED: + case csync::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 browser_sync::TRANSIENT_ERROR: + case csync::TRANSIENT_ERROR: return SERVER_RETURN_TRANSIENT_ERROR; - case browser_sync::MIGRATION_DONE: + case csync::MIGRATION_DONE: HandleMigrationDoneResponse(response, session); return SERVER_RETURN_MIGRATION_DONE; - case browser_sync::CLEAR_PENDING: + case csync::CLEAR_PENDING: return SERVER_RETURN_CLEAR_PENDING; - case browser_sync::NOT_MY_BIRTHDAY: + case csync::NOT_MY_BIRTHDAY: return SERVER_RETURN_NOT_MY_BIRTHDAY; default: NOTREACHED(); @@ -542,4 +542,4 @@ std::string SyncerProtoUtil::ClientToServerResponseDebugString( return output; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer_proto_util.h b/sync/engine/syncer_proto_util.h index 3856509..d9ccddc 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 browser_sync { +namespace csync { 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(browser_sync::ServerConnectionManager* scm, + static bool PostAndProcessHeaders(csync::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, - browser_sync::ThrottledDataTypeTracker* tracker, + csync::ThrottledDataTypeTracker* tracker, sessions::SyncSession::Delegate* delegate); friend class SyncerProtoUtilTest; @@ -135,6 +135,6 @@ class SyncerProtoUtil { DISALLOW_COPY_AND_ASSIGN(SyncerProtoUtil); }; -} // namespace browser_sync +} // namespace csync #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 7f81221..753e490 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 browser_sync { +namespace csync { 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 browser_sync::ServerConnectionManager { +class DummyConnectionManager : public csync::ServerConnectionManager { public: DummyConnectionManager() : ServerConnectionManager("unused", 0, false, "version"), @@ -263,7 +263,7 @@ TEST_F(SyncerProtoUtilTest, PostAndProcessHeaders) { TEST_F(SyncerProtoUtilTest, HandleThrottlingWithDatatypes) { ThrottledDataTypeTracker tracker(NULL); SyncProtocolError error; - error.error_type = browser_sync::THROTTLED; + error.error_type = csync::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 = browser_sync::THROTTLED; + error.error_type = csync::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 browser_sync +} // namespace csync diff --git a/sync/engine/syncer_types.h b/sync/engine/syncer_types.h index 5639d98..474bdaec 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 browser_sync { +namespace csync { enum UpdateAttemptResponse { // Update was applied or safely ignored. @@ -82,6 +82,6 @@ enum VerifyCommitResult { VERIFY_OK, }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNCER_TYPES_H_ diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc index 81dfec5..4952d4a 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 browser_sync { +namespace csync { using syncable::BaseTransaction; using syncable::Blob; @@ -561,7 +561,7 @@ class SyncerTest : public testing::Test, scoped_refptr<ModelSafeWorker> worker_; syncable::ModelTypeSet enabled_datatypes_; - browser_sync::TrafficRecorder traffic_recorder_; + csync::TrafficRecorder traffic_recorder_; DISALLOW_COPY_AND_ASSIGN(SyncerTest); }; @@ -715,7 +715,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) { // Mark bookmarks as encrypted and set the cryptographer to have pending // keys. WriteTransaction wtrans(FROM_HERE, UNITTEST, directory()); - browser_sync::Cryptographer other_cryptographer(&encryptor_); + csync::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(other_params); sync_pb::EntitySpecifics specifics; sync_pb::NigoriSpecifics* nigori = specifics.mutable_nigori(); @@ -808,7 +808,7 @@ TEST_F(SyncerTest, GetCommitIdsFiltersUnreadyEntries) { TEST_F(SyncerTest, EncryptionAwareConflicts) { KeyParams key_params = {"localhost", "dummy", "foobar"}; - browser_sync::Cryptographer other_cryptographer(&encryptor_); + csync::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(key_params); sync_pb::EntitySpecifics bookmark, encrypted_bookmark, modified_bookmark; bookmark.mutable_bookmark()->set_title("title"); @@ -982,7 +982,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) { KeyParams current_key = {"localhost", "dummy", "cur"}; // Data for testing encryption/decryption. - browser_sync::Cryptographer other_cryptographer(&encryptor_); + csync::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(old_key); sync_pb::EntitySpecifics other_encrypted_specifics; other_encrypted_specifics.mutable_bookmark()->set_title("title"); @@ -1065,7 +1065,7 @@ TEST_F(SyncerTest, ReceiveOldNigori) { TEST_F(SyncerTest, NigoriConflicts) { KeyParams local_key_params = {"localhost", "dummy", "blargle"}; KeyParams other_key_params = {"localhost", "dummy", "foobar"}; - browser_sync::Cryptographer other_cryptographer(&encryptor_); + csync::Cryptographer other_cryptographer(&encryptor_); other_cryptographer.AddKey(other_key_params); syncable::ModelTypeSet encrypted_types(syncable::PASSWORDS, syncable::NIGORI); sync_pb::EntitySpecifics initial_nigori_specifics; @@ -4832,4 +4832,4 @@ TEST_F(SyncerPositionTiebreakingTest, MidLowHigh) { ExpectLocalOrderIsByServerId(); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer_util.cc b/sync/engine/syncer_util.cc index 0f734cd..f93c58f 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 browser_sync { +namespace csync { // Returns the number of unsynced entries. // static @@ -722,4 +722,4 @@ VerifyResult SyncerUtil::VerifyUndelete(syncable::WriteTransaction* trans, return VERIFY_UNDECIDED; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/syncer_util.h b/sync/engine/syncer_util.h index 546ac3ff..e7d0515 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 browser_sync { +namespace csync { class Cryptographer; class SyncEntity; @@ -123,6 +123,6 @@ class SyncerUtil { DISALLOW_IMPLICIT_CONSTRUCTORS(SyncerUtil); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNCER_UTIL_H_ diff --git a/sync/engine/syncproto.h b/sync/engine/syncproto.h index 0f4e21c..ec6c6e4 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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync #endif // SYNC_ENGINE_SYNCPROTO_H_ diff --git a/sync/engine/syncproto_unittest.cc b/sync/engine/syncproto_unittest.cc index 2c0598b..d641b5d 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 browser_sync { +namespace csync { class SyncProtoTest : public testing::Test { }; @@ -15,4 +15,4 @@ TEST_F(SyncProtoTest, ProtocolVersionPresent) { EXPECT_TRUE(csm.has_protocol_version()); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/throttled_data_type_tracker.cc b/sync/engine/throttled_data_type_tracker.cc index 01317a8..47d68f6 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 browser_sync { +namespace csync { ThrottledDataTypeTracker::ThrottledDataTypeTracker(AllStatus *allstatus) : allstatus_(allstatus) { @@ -69,4 +69,4 @@ syncable::ModelTypeSet ThrottledDataTypeTracker::GetThrottledTypes() const { return types; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/throttled_data_type_tracker.h b/sync/engine/throttled_data_type_tracker.h index aa2835b..f24ab74 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 browser_sync { +namespace csync { class AllStatus; @@ -50,6 +50,6 @@ class ThrottledDataTypeTracker { DISALLOW_COPY_AND_ASSIGN(ThrottledDataTypeTracker); }; -} // namespace browser_sync +} // namespace csync #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 cd80436..6273915 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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync diff --git a/sync/engine/traffic_logger.cc b/sync/engine/traffic_logger.cc index 1f8ba1d..e25fdc8 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 browser_sync { +namespace csync { namespace { template <class T> @@ -43,4 +43,4 @@ void LogClientToServerResponse( "******Server Response******"); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/traffic_logger.h b/sync/engine/traffic_logger.h index 5cb8ffa..93ae2a3 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 browser_sync { +namespace csync { void LogClientToServerMessage(const sync_pb::ClientToServerMessage& msg); void LogClientToServerResponse( const sync_pb::ClientToServerResponse& response); -} // namespace browser_sync +} // namespace csync #endif // CHROME_BROWSER_SYNC_ENGINE_TRAFFIC_LOGGER_H_ diff --git a/sync/engine/traffic_recorder.cc b/sync/engine/traffic_recorder.cc index ae0a059..ade5bd6 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 browser_sync { +namespace csync { TrafficRecorder::TrafficRecord::TrafficRecord(const std::string& message, TrafficMessageType message_type, @@ -129,5 +129,5 @@ void TrafficRecorder::RecordClientToServerResponse( StoreProtoInQueue(response, CLIENT_TO_SERVER_RESPONSE); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/traffic_recorder.h b/sync/engine/traffic_recorder.h index cfcdcc0..525e735 100644 --- a/sync/engine/traffic_recorder.h +++ b/sync/engine/traffic_recorder.h @@ -19,7 +19,7 @@ class ClientToServerResponse; class ClientToServerMessage; } -namespace browser_sync { +namespace csync { class TrafficRecorder { public: @@ -72,7 +72,7 @@ class TrafficRecorder { DISALLOW_COPY_AND_ASSIGN(TrafficRecorder); }; -} // namespace browser_sync +} // namespace csync #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 89a77a6..637aeeb 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 browser_sync { +namespace csync { const unsigned int kMaxMessages = 10; const unsigned int kMaxMessageSize = 5 * 1024; @@ -39,5 +39,5 @@ TEST(TrafficRecorderTest, MaxMessageSizeTest) { EXPECT_TRUE(record.message.empty()); } -} //namespace browser_sync +} //namespace csync diff --git a/sync/engine/update_applicator.cc b/sync/engine/update_applicator.cc index 921cfb5..3986e60 100644 --- a/sync/engine/update_applicator.cc +++ b/sync/engine/update_applicator.cc @@ -16,7 +16,7 @@ using std::vector; -namespace browser_sync { +namespace csync { UpdateApplicator::UpdateApplicator(ConflictResolver* resolver, Cryptographer* cryptographer, @@ -189,4 +189,4 @@ bool UpdateApplicator::ResultTracker::no_conflicts() const { return conflicting_ids_.empty(); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/engine/update_applicator.h b/sync/engine/update_applicator.h index cbd2b5e..fbc8361 100644 --- a/sync/engine/update_applicator.h +++ b/sync/engine/update_applicator.h @@ -24,7 +24,7 @@ class WriteTransaction; class Entry; } -namespace browser_sync { +namespace csync { namespace sessions { class ConflictProgress; @@ -109,6 +109,6 @@ class UpdateApplicator { DISALLOW_COPY_AND_ASSIGN(UpdateApplicator); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_ENGINE_UPDATE_APPLICATOR_H_ diff --git a/sync/engine/verify_updates_command.cc b/sync/engine/verify_updates_command.cc index 40c75cf..91f08f0 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 browser_sync { +namespace csync { 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 = browser_sync::GetRoutingInfoTypes( + ModelTypeSet requested_types = csync::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 browser_sync +} // namespace csync diff --git a/sync/engine/verify_updates_command.h b/sync/engine/verify_updates_command.h index 09376f2..b0bf68e 100644 --- a/sync/engine/verify_updates_command.h +++ b/sync/engine/verify_updates_command.h @@ -17,7 +17,7 @@ namespace syncable { class WriteTransaction; } -namespace browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 15324f4..49ac704 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 browser_sync { +namespace csync { using sessions::StatusController; using std::string; diff --git a/sync/internal_api/base_node.cc b/sync/internal_api/base_node.cc index a66d452..cd9fb65 100644 --- a/sync/internal_api/base_node.cc +++ b/sync/internal_api/base_node.cc @@ -255,7 +255,7 @@ DictionaryValue* BaseNode::GetDetailsAsValue() const { DictionaryValue* node_info = GetSummaryAsValue(); node_info->SetString( "modificationTime", - browser_sync::GetTimeDebugString(GetModificationTime())); + csync::GetTimeDebugString(GetModificationTime())); node_info->SetString("parentId", base::Int64ToString(GetParentId())); // Specifics are already in the Entry value, so no need to duplicate // it here. diff --git a/sync/internal_api/base_transaction.cc b/sync/internal_api/base_transaction.cc index 23b6944..0f4de7c 100644 --- a/sync/internal_api/base_transaction.cc +++ b/sync/internal_api/base_transaction.cc @@ -7,7 +7,7 @@ #include "sync/syncable/directory.h" #include "sync/util/cryptographer.h" -using browser_sync::Cryptographer; +using csync::Cryptographer; namespace sync_api { @@ -20,7 +20,7 @@ BaseTransaction::BaseTransaction(UserShare* share) { BaseTransaction::~BaseTransaction() { } -browser_sync::Cryptographer* BaseTransaction::GetCryptographer() const { +csync::Cryptographer* BaseTransaction::GetCryptographer() const { return directory_->GetCryptographer(this->GetWrappedTrans()); } diff --git a/sync/internal_api/change_record.cc b/sync/internal_api/change_record.cc index 75a57a5..7a78767 100644 --- a/sync/internal_api/change_record.cc +++ b/sync/internal_api/change_record.cc @@ -42,7 +42,7 @@ DictionaryValue* ChangeRecord::ToValue() const { value->Set("extra", extra->ToValue()); } value->Set("specifics", - browser_sync::EntitySpecificsToValue(specifics)); + csync::EntitySpecificsToValue(specifics)); } return value; } @@ -57,7 +57,7 @@ ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { - return browser_sync::PasswordSpecificsDataToValue(unencrypted_); + return csync::PasswordSpecificsDataToValue(unencrypted_); } const sync_pb::PasswordSpecificsData& diff --git a/sync/internal_api/debug_info_event_listener.cc b/sync/internal_api/debug_info_event_listener.cc index 022bac3..0057e92 100644 --- a/sync/internal_api/debug_info_event_listener.cc +++ b/sync/internal_api/debug_info_event_listener.cc @@ -4,7 +4,7 @@ #include "sync/internal_api/debug_info_event_listener.h" -using browser_sync::sessions::SyncSessionSnapshot; +using csync::sessions::SyncSessionSnapshot; namespace sync_api { DebugInfoEventListener::DebugInfoEventListener() @@ -44,7 +44,7 @@ void DebugInfoEventListener::OnSyncCycleCompleted( } void DebugInfoEventListener::OnInitializationComplete( - const browser_sync::WeakHandle<browser_sync::JsBackend>& js_backend, + const csync::WeakHandle<csync::JsBackend>& js_backend, bool success) { CreateAndAddEvent(sync_pb::DebugEventInfo::INITIALIZATION_COMPLETE); } @@ -88,7 +88,7 @@ void DebugInfoEventListener::OnEncryptionComplete() { } void DebugInfoEventListener::OnActionableError( - const browser_sync::SyncProtocolError& sync_error) { + const csync::SyncProtocolError& sync_error) { CreateAndAddEvent(sync_pb::DebugEventInfo::ACTIONABLE_ERROR); } diff --git a/sync/internal_api/debug_info_event_listener.h b/sync/internal_api/debug_info_event_listener.h index d76e9ab..6a7abf9 100644 --- a/sync/internal_api/debug_info_event_listener.h +++ b/sync/internal_api/debug_info_event_listener.h @@ -24,16 +24,16 @@ 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 sync_api::SyncManager::Observer, - public browser_sync::sessions::DebugInfoGetter { + public csync::sessions::DebugInfoGetter { public: DebugInfoEventListener(); virtual ~DebugInfoEventListener(); // SyncManager::Observer implementation. virtual void OnSyncCycleCompleted( - const browser_sync::sessions::SyncSessionSnapshot& snapshot) OVERRIDE; + const csync::sessions::SyncSessionSnapshot& snapshot) OVERRIDE; virtual void OnInitializationComplete( - const browser_sync::WeakHandle<browser_sync::JsBackend>& js_backend, + const csync::WeakHandle<csync::JsBackend>& js_backend, bool success) OVERRIDE; virtual void OnConnectionStatusChange( sync_api::ConnectionStatus connection_status) OVERRIDE; @@ -50,7 +50,7 @@ class DebugInfoEventListener : public sync_api::SyncManager::Observer, bool encrypt_everything) OVERRIDE; virtual void OnEncryptionComplete() OVERRIDE; virtual void OnActionableError( - const browser_sync::SyncProtocolError& sync_error) OVERRIDE; + const csync::SyncProtocolError& sync_error) OVERRIDE; // Sync manager events. void OnNudgeFromDatatype(syncable::ModelType datatype); diff --git a/sync/internal_api/js_mutation_event_observer.cc b/sync/internal_api/js_mutation_event_observer.cc index f03d47a..7452846 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 browser_sync { +namespace csync { JsMutationEventObserver::JsMutationEventObserver() : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {} @@ -109,4 +109,4 @@ void JsMutationEventObserver::HandleJsEvent( &JsEventHandler::HandleJsEvent, name, details); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/js_mutation_event_observer.h b/sync/internal_api/js_mutation_event_observer.h index 6e70c19..1185657 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 browser_sync { +namespace csync { class JsEventDetails; class JsEventHandler; @@ -65,6 +65,6 @@ class JsMutationEventObserver DISALLOW_COPY_AND_ASSIGN(JsMutationEventObserver); }; -} // namespace browser_sync +} // namespace csync #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 8d0e30f..91f9b71 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 browser_sync { +namespace csync { namespace { using ::testing::InSequence; @@ -124,4 +124,4 @@ TEST_F(JsMutationEventObserverTest, OnChangesComplete) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/js_sync_manager_observer.cc b/sync/internal_api/js_sync_manager_observer.cc index fe9fa65..149e8f08 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 browser_sync { +namespace csync { -using browser_sync::SyncProtocolError; +using csync::SyncProtocolError; JsSyncManagerObserver::JsSyncManagerObserver() {} @@ -153,4 +153,4 @@ void JsSyncManagerObserver::HandleJsEvent( &JsEventHandler::HandleJsEvent, name, details); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_manager_observer.h index 6c0a620..a54cfd3 100644 --- a/sync/internal_api/js_sync_manager_observer.h +++ b/sync/internal_api/js_sync_manager_observer.h @@ -18,7 +18,7 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace browser_sync { +namespace csync { class JsEventDetails; class JsEventHandler; @@ -51,7 +51,7 @@ class JsSyncManagerObserver : public sync_api::SyncManager::Observer { const WeakHandle<JsBackend>& js_backend, bool success) OVERRIDE; virtual void OnStopSyncingPermanently() OVERRIDE; virtual void OnActionableError( - const browser_sync::SyncProtocolError& sync_protocol_error) OVERRIDE; + const csync::SyncProtocolError& sync_protocol_error) OVERRIDE; private: void HandleJsEvent(const tracked_objects::Location& from_here, @@ -62,6 +62,6 @@ class JsSyncManagerObserver : public sync_api::SyncManager::Observer { DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver); }; -} // namespace browser_sync +} // namespace csync #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 0791a89..230d17a 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 browser_sync { +namespace csync { namespace { using ::testing::InSequence; @@ -94,9 +94,9 @@ TEST_F(JsSyncManagerObserverTest, OnSyncCycleCompleted) { } TEST_F(JsSyncManagerObserverTest, OnActionableError) { - browser_sync::SyncProtocolError sync_error; - sync_error.action = browser_sync::CLEAR_USER_DATA_AND_RESYNC; - sync_error.error_type = browser_sync::TRANSIENT_ERROR; + csync::SyncProtocolError sync_error; + sync_error.action = csync::CLEAR_USER_DATA_AND_RESYNC; + sync_error.error_type = csync::TRANSIENT_ERROR; DictionaryValue expected_details; expected_details.Set("syncError", sync_error.ToValue()); @@ -208,4 +208,4 @@ TEST_F(JsSyncManagerObserverTest, OnEncryptedTypesChanged) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h index e2ed24a..15efdb79 100644 --- a/sync/internal_api/public/base_transaction.h +++ b/sync/internal_api/public/base_transaction.h @@ -28,7 +28,7 @@ class BaseTransaction { public: // Provide access to the underlying syncable objects from BaseNode. virtual syncable::BaseTransaction* GetWrappedTrans() const = 0; - browser_sync::Cryptographer* GetCryptographer() const; + csync::Cryptographer* GetCryptographer() const; syncable::Directory* GetDirectory() const { return directory_; diff --git a/sync/internal_api/public/change_record.h b/sync/internal_api/public/change_record.h index f522a3b..6faccd5 100644 --- a/sync/internal_api/public/change_record.h +++ b/sync/internal_api/public/change_record.h @@ -60,7 +60,7 @@ struct ChangeRecord { typedef std::vector<ChangeRecord> ChangeRecordList; -typedef browser_sync::Immutable<ChangeRecordList> ImmutableChangeRecordList; +typedef csync::Immutable<ChangeRecordList> ImmutableChangeRecordList; } // namespace sync_api diff --git a/sync/internal_api/public/change_record_unittest.cc b/sync/internal_api/public/change_record_unittest.cc index 4fb1f01..a2c97b6 100644 --- a/sync/internal_api/public/change_record_unittest.cc +++ b/sync/internal_api/public/change_record_unittest.cc @@ -61,7 +61,7 @@ void CheckChangeRecordValue( EXPECT_TRUE(Value::Equals(extra_value, expected_extra_value.get())); scoped_ptr<DictionaryValue> expected_specifics_value( - browser_sync::EntitySpecificsToValue(record.specifics)); + csync::EntitySpecificsToValue(record.specifics)); ExpectDictDictionaryValue(*expected_specifics_value, value, "specifics"); } diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc index 2718acc..f82b451 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 browser_sync { +namespace csync { base::DictionaryValue* ModelSafeRoutingInfoToValue( const ModelSafeRoutingInfo& routing_info) { @@ -72,4 +72,4 @@ std::string ModelSafeGroupToString(ModelSafeGroup group) { ModelSafeWorker::~ModelSafeWorker() {} -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h index 1a6c371..e1d6563 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 browser_sync { +namespace csync { typedef base::Callback<enum SyncerError(void)> WorkCallback; @@ -82,6 +82,6 @@ syncable::ModelTypeSet GetRoutingInfoTypes( ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, const ModelSafeRoutingInfo& routes); -} // namespace browser_sync +} // namespace csync #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 5304c13..a8580e1 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 browser_sync { +namespace csync { namespace { class ModelSafeWorkerTest : public ::testing::Test { @@ -52,4 +52,4 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/engine/passive_model_worker.cc b/sync/internal_api/public/engine/passive_model_worker.cc index 26fccc1..f33488e 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 browser_sync { +namespace csync { PassiveModelWorker::PassiveModelWorker(const MessageLoop* sync_loop) : sync_loop_(sync_loop) {} @@ -25,4 +25,4 @@ ModelSafeGroup PassiveModelWorker::GetModelSafeGroup() { return GROUP_PASSIVE; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/engine/passive_model_worker.h b/sync/internal_api/public/engine/passive_model_worker.h index 7c0ddf3..bb0870a 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 d7fe753..bebf180 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync diff --git a/sync/internal_api/public/engine/polling_constants.h b/sync/internal_api/public/engine/polling_constants.h index 9adfe92..cb7f5f5 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 browser_sync { +namespace csync { extern const int64 kDefaultShortPollIntervalSeconds; extern const int64 kDefaultLongPollIntervalSeconds; extern const int64 kMaxBackoffSeconds; extern const int kBackoffRandomizationFactor; -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_POLLING_CONSTANTS_H_ diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h index f05a5bc..34b951e 100644 --- a/sync/internal_api/public/engine/sync_status.h +++ b/sync/internal_api/public/engine/sync_status.h @@ -29,7 +29,7 @@ struct SyncStatus { // Notifications counters updated by the actions in synapi. int notifications_received; - browser_sync::SyncProtocolError sync_protocol_error; + csync::SyncProtocolError sync_protocol_error; // Number of encryption conflicts counted during most recent sync cycle. int encryption_conflicts; diff --git a/sync/internal_api/public/sessions/error_counters.cc b/sync/internal_api/public/sessions/error_counters.cc index 1982e2d..9ce6772 100644 --- a/sync/internal_api/public/sessions/error_counters.cc +++ b/sync/internal_api/public/sessions/error_counters.cc @@ -4,7 +4,7 @@ #include "sync/internal_api/public/sessions/error_counters.h" -namespace browser_sync { +namespace csync { namespace sessions { ErrorCounters::ErrorCounters() @@ -13,4 +13,4 @@ ErrorCounters::ErrorCounters() } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/sessions/error_counters.h b/sync/internal_api/public/sessions/error_counters.h index e513c84..a5baed7 100644 --- a/sync/internal_api/public/sessions/error_counters.h +++ b/sync/internal_api/public/sessions/error_counters.h @@ -10,7 +10,7 @@ #include "sync/internal_api/public/util/syncer_error.h" #include "sync/protocol/sync_protocol_error.h" -namespace browser_sync { +namespace csync { namespace sessions { // Counters for various errors that can occur repeatedly during a sync session. @@ -27,6 +27,6 @@ struct ErrorCounters { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_ERROR_COUNTERS_H_ diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc index d058a4f..cf910dad 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 browser_sync { +namespace csync { namespace sessions { SyncSessionSnapshot::SyncSessionSnapshot() @@ -170,4 +170,4 @@ bool SyncSessionSnapshot::retry_scheduled() const { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h index 45f6c75..8bd2258 100644 --- a/sync/internal_api/public/sessions/sync_session_snapshot.h +++ b/sync/internal_api/public/sessions/sync_session_snapshot.h @@ -20,7 +20,7 @@ namespace base { class DictionaryValue; } -namespace browser_sync { +namespace csync { namespace sessions { // An immutable snapshot of state from a SyncSession. Convenient to use as @@ -95,6 +95,6 @@ class SyncSessionSnapshot { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #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 191199b..1b6d72d 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 browser_sync { +namespace csync { namespace sessions { SyncSourceInfo::SyncSourceInfo() @@ -33,4 +33,4 @@ DictionaryValue* SyncSourceInfo::ToValue() const { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h index 838e094..cbd66d0 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 browser_sync { +namespace csync { namespace sessions { // A container for the source of a sync session. This includes the update @@ -37,6 +37,6 @@ struct SyncSourceInfo { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNC_SOURCE_INFO_H_ diff --git a/sync/internal_api/public/sessions/syncer_status.cc b/sync/internal_api/public/sessions/syncer_status.cc index efa0c43..5b26a24 100644 --- a/sync/internal_api/public/sessions/syncer_status.cc +++ b/sync/internal_api/public/sessions/syncer_status.cc @@ -6,7 +6,7 @@ #include "base/values.h" -namespace browser_sync { +namespace csync { namespace sessions { SyncerStatus::SyncerStatus() @@ -41,4 +41,4 @@ DictionaryValue* SyncerStatus::ToValue() const { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/sessions/syncer_status.h b/sync/internal_api/public/sessions/syncer_status.h index 7331ca3..070f564 100644 --- a/sync/internal_api/public/sessions/syncer_status.h +++ b/sync/internal_api/public/sessions/syncer_status.h @@ -13,7 +13,7 @@ namespace base { class DictionaryValue; } -namespace browser_sync { +namespace csync { namespace sessions { // Data pertaining to the status of an active Syncer object. @@ -45,6 +45,6 @@ struct SyncerStatus { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_PUBLIC_SESSIONS_SYNCER_STATUS_H_ diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h index e79e071..ac7c1bd 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 browser_sync { +namespace csync { class Encryptor; struct Experiments; class ExtensionsActivityMonitor; @@ -35,7 +35,7 @@ class JsEventHandler; namespace sessions { class SyncSessionSnapshot; } // namespace sessions -} // namespace browser_sync +} // namespace csync namespace csync { class SyncNotifier; @@ -58,7 +58,7 @@ enum ConnectionStatus { CONNECTION_SERVER_ERROR }; -// Reasons due to which browser_sync::Cryptographer might require a passphrase. +// Reasons due to which csync::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 browser_sync::sessions::SyncSessionSnapshot& snapshot) = 0; + const csync::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 browser_sync::WeakHandle<browser_sync::JsBackend>& + const csync::WeakHandle<csync::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 browser_sync::SyncProtocolError& sync_protocol_error) = 0; + const csync::SyncProtocolError& sync_protocol_error) = 0; protected: virtual ~Observer(); @@ -369,16 +369,16 @@ class SyncManager { // |sync_notifier| is owned and used to listen for notifications. // |report_unrecoverable_error_function| may be NULL. bool Init(const FilePath& database_location, - const browser_sync::WeakHandle<browser_sync::JsEventHandler>& + const csync::WeakHandle<csync::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 browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<browser_sync::ModelSafeWorker*>& workers, - browser_sync::ExtensionsActivityMonitor* + const csync::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<csync::ModelSafeWorker*>& workers, + csync::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const std::string& user_agent, @@ -386,10 +386,10 @@ class SyncManager { csync::SyncNotifier* sync_notifier, const std::string& restored_key_for_bootstrapping, TestingMode testing_mode, - browser_sync::Encryptor* encryptor, - browser_sync::UnrecoverableErrorHandler* + csync::Encryptor* encryptor, + csync::UnrecoverableErrorHandler* unrecoverable_error_handler, - browser_sync::ReportUnrecoverableErrorFunction + csync::ReportUnrecoverableErrorFunction report_unrecoverable_error_function); // Throw an unrecoverable error from a transaction (mostly used for @@ -407,7 +407,7 @@ class SyncManager { // Put the syncer in normal mode ready to perform nudges and polls. void StartSyncingNormally( - const browser_sync::ModelSafeRoutingInfo& routing_info); + const csync::ModelSafeRoutingInfo& routing_info); // Attempts to re-encrypt encrypted data types using the passphrase provided. // Notifies observers of the result of the operation via OnPassphraseAccepted @@ -434,12 +434,12 @@ class SyncManager { // Switches the mode of operation to CONFIGURATION_MODE and // schedules a config task to fetch updates for |types|. - void RequestConfig(const browser_sync::ModelSafeRoutingInfo& routing_info, + void RequestConfig(const csync::ModelSafeRoutingInfo& routing_info, const syncable::ModelTypeSet& types, sync_api::ConfigureReason reason); void RequestCleanupDisabledTypes( - const browser_sync::ModelSafeRoutingInfo& routing_info); + const csync::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 @@ -514,7 +514,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(browser_sync::Experiments* experiments) const; + bool ReceivedExperiment(csync::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. diff --git a/sync/internal_api/public/syncable/model_type.h b/sync/internal_api/public/syncable/model_type.h index b7b5fe3..c8a9905 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 browser_sync::EnumSet< +typedef csync::EnumSet< ModelType, FIRST_REAL_MODEL_TYPE, LAST_REAL_MODEL_TYPE> ModelTypeSet; -typedef browser_sync::EnumSet< +typedef csync::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 cff4c92..b803b39 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 browser_sync::ModelSafeRoutingInfo; +using csync::ModelSafeRoutingInfo; namespace syncable { ModelTypePayloadMap ModelTypePayloadMapFromEnumSet( @@ -36,10 +36,10 @@ ModelTypeSet ModelTypePayloadMapToEnumSet( } ModelTypePayloadMap ModelTypePayloadMapFromRoutingInfo( - const browser_sync::ModelSafeRoutingInfo& routes, + const csync::ModelSafeRoutingInfo& routes, const std::string& payload) { ModelTypePayloadMap types_with_payloads; - for (browser_sync::ModelSafeRoutingInfo::const_iterator i = routes.begin(); + for (csync::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 1bf3884..8f3319a 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 browser_sync::ModelSafeRoutingInfo& routes, + const csync::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 browser_sync::ModelSafeRoutingInfo& routing_info); + const csync::ModelSafeRoutingInfo& routing_info); } // namespace syncable diff --git a/sync/internal_api/public/test/test_user_share.h b/sync/internal_api/public/test/test_user_share.h index 7386b18..91c4e9e 100644 --- a/sync/internal_api/public/test/test_user_share.h +++ b/sync/internal_api/public/test/test_user_share.h @@ -34,7 +34,7 @@ #include "base/basictypes.h" #include "sync/internal_api/public/user_share.h" -namespace browser_sync { +namespace csync { class TestDirectorySetterUpper; @@ -63,6 +63,6 @@ class TestUserShare { DISALLOW_COPY_AND_ASSIGN(TestUserShare); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_PUBLIC_TEST_TEST_USER_SHARE_H_ diff --git a/sync/internal_api/public/util/enum_set.h b/sync/internal_api/public/util/enum_set.h index de270d8..1a989ed 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 2caa1de..1f6223c 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 browser_sync { +namespace csync { namespace { enum TestEnum { @@ -192,4 +192,4 @@ TEST_F(EnumSetTest, Difference) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/util/experiments.h b/sync/internal_api/public/util/experiments.h index 1439e2b..f13c09a 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 browser_sync { +namespace csync { // A structure to hold the enable status of experimental sync features. struct Experiments { diff --git a/sync/internal_api/public/util/immutable.h b/sync/internal_api/public/util/immutable.h index 6624b90..3c20a4f 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 browser_sync::Immutable<LargeObjectList>& stuff) { +// const csync::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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync #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 ea0b29b..e124b70 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync // Allowed by the standard (17.4.3.1/1). namespace std { template <> -void swap(browser_sync::SpecializationToken& t1, - browser_sync::SpecializationToken& t2) { +void swap(csync::SpecializationToken& t1, + csync::SpecializationToken& t2) { t1.Swap(&t2); } } // namespace -namespace browser_sync { +namespace csync { namespace { class ImmutableTest : public ::testing::Test {}; @@ -247,4 +247,4 @@ TEST_F(ImmutableTest, Set) { } } // namespace -} // namespace browser_sync +} // namespace csync 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 ead73f0..dfe00a8 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 browser_sync { +namespace csync { // A ReportUnrecoverableErrorFunction is a function that is called // immediately when an unrecoverable error is encountered. Unlike @@ -14,6 +14,6 @@ namespace browser_sync { // context surrounding it. typedef void (*ReportUnrecoverableErrorFunction)(void); -} // namespace browser_sync +} // namespace csync #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 b4ba578..57cd4ed 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 browser_sync { +namespace csync { #define ENUM_CASE(x) case x: return #x; break; const char* GetSyncerErrorString(SyncerError value) { @@ -32,5 +32,5 @@ const char* GetSyncerErrorString(SyncerError value) { } #undef ENUM_CASE -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/util/syncer_error.h b/sync/internal_api/public/util/syncer_error.h index aa6ebb3..8df8afd 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 browser_sync { +namespace csync { // This enum describes all the ways a SyncerCommand can fail. // @@ -41,6 +41,6 @@ enum SyncerError { const char * GetSyncerErrorString(SyncerError); -} // namespace browser_sync +} // namespace csync #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 aaca1e9..a96a487 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 browser_sync { +namespace csync { class UnrecoverableErrorHandler { public: diff --git a/sync/internal_api/public/util/unrecoverable_error_info.cc b/sync/internal_api/public/util/unrecoverable_error_info.cc index 369fa3e..ae17d2f 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 browser_sync { +namespace csync { UnrecoverableErrorInfo::UnrecoverableErrorInfo() : is_set_(false) { @@ -41,4 +41,4 @@ const std::string& UnrecoverableErrorInfo::message() const { return message_; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/util/unrecoverable_error_info.h b/sync/internal_api/public/util/unrecoverable_error_info.h index 64b780a..6e8af72 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 browser_sync { +namespace csync { class UnrecoverableErrorInfo { public: @@ -36,6 +36,6 @@ class UnrecoverableErrorInfo { bool is_set_; }; -} // namespace browser_sync +} // namespace csync #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 136fc58..9de3f9b 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 browser_sync { +namespace csync { namespace internal { diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h index 653da60..fc7909e 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 browser_sync { +namespace csync { 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 browser_sync::WeakHandle<U>& other) // NOLINT + WeakHandle(const csync::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 browser_sync +} // namespace csync #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 af919ad..67c7b20 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 browser_sync { +namespace csync { using ::testing::_; using ::testing::SaveArg; @@ -323,4 +323,4 @@ TEST_F(WeakHandleTest, TypeConversionConstructorUninitializedAssignment) { EXPECT_FALSE(base_weak_handle.IsInitialized()); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h index ba61122..670c82b 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 browser_sync { +namespace csync { class Cryptographer; class TestBookmarkModelAssociator; } @@ -173,8 +173,9 @@ class WriteNode : public BaseNode { virtual const BaseTransaction* GetTransaction() const OVERRIDE; + syncable::MutableEntry* GetMutableEntryForTest(); + private: - friend class browser_sync::TestBookmarkModelAssociator; FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, EncryptBookmarksWithLegacyData); void* operator new(size_t size); // Node is meant for stack use only. diff --git a/sync/internal_api/sync_manager.cc b/sync/internal_api/sync_manager.cc index 96a1ceb..0df325b 100644 --- a/sync/internal_api/sync_manager.cc +++ b/sync/internal_api/sync_manager.cc @@ -60,30 +60,30 @@ #include "sync/util/time.h" using base::TimeDelta; -using browser_sync::AllStatus; -using browser_sync::Cryptographer; -using browser_sync::Encryptor; -using browser_sync::JsArgList; -using browser_sync::JsBackend; -using browser_sync::JsEventDetails; -using browser_sync::JsEventHandler; -using browser_sync::JsEventHandler; -using browser_sync::JsReplyHandler; -using browser_sync::JsMutationEventObserver; -using browser_sync::JsSyncManagerObserver; -using browser_sync::kNigoriTag; -using browser_sync::KeyParams; -using browser_sync::ModelSafeRoutingInfo; -using browser_sync::ReportUnrecoverableErrorFunction; -using browser_sync::ServerConnectionEvent; -using browser_sync::ServerConnectionEventListener; -using browser_sync::SyncEngineEvent; -using browser_sync::SyncEngineEventListener; -using browser_sync::SyncScheduler; -using browser_sync::Syncer; -using browser_sync::UnrecoverableErrorHandler; -using browser_sync::WeakHandle; -using browser_sync::sessions::SyncSessionContext; +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 syncable::ImmutableWriteTransactionInfo; using syncable::ModelType; using syncable::ModelTypeSet; @@ -133,7 +133,7 @@ const unsigned int kMaxMessageSizeToRecord = 5 * 1024; // SyncManager's implementation: SyncManager::SyncInternal class SyncManager::SyncInternal : public net::NetworkChangeNotifier::IPAddressObserver, - public browser_sync::Cryptographer::Observer, + public csync::Cryptographer::Observer, public csync::SyncNotifierObserver, public JsBackend, public SyncEngineEventListener, @@ -199,9 +199,9 @@ class SyncManager::SyncInternal bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<browser_sync::ModelSafeWorker*>& workers, - browser_sync::ExtensionsActivityMonitor* + const csync::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<csync::ModelSafeWorker*>& workers, + csync::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const std::string& user_agent, @@ -228,7 +228,7 @@ class SyncManager::SyncInternal // Tell the sync engine to start the syncing process. void StartSyncingNormally( - const browser_sync::ModelSafeRoutingInfo& routing_info); + const csync::ModelSafeRoutingInfo& routing_info); // Whether or not the Nigori node is encrypted using an explicit passphrase. bool IsUsingExplicitPassphrase(); @@ -552,7 +552,7 @@ class SyncManager::SyncInternal // This can be called from any thread, but only between calls to // OpenDirectory() and ShutdownOnSyncThread(). - browser_sync::WeakHandle<SyncManager::ChangeObserver> change_observer_; + csync::WeakHandle<SyncManager::ChangeObserver> change_observer_; ObserverList<SyncManager::Observer> observers_; @@ -606,12 +606,12 @@ class SyncManager::SyncInternal JsSyncManagerObserver js_sync_manager_observer_; JsMutationEventObserver js_mutation_event_observer_; - browser_sync::ThrottledDataTypeTracker throttled_data_type_tracker_; + csync::ThrottledDataTypeTracker throttled_data_type_tracker_; // This is for keeping track of client events to send to the server. DebugInfoEventListener debug_info_event_listener_; - browser_sync::TrafficRecorder traffic_recorder_; + csync::TrafficRecorder traffic_recorder_; Encryptor* encryptor_; UnrecoverableErrorHandler* unrecoverable_error_handler_; @@ -677,7 +677,7 @@ class NudgeStrategy { break; case ACCOMPANY_ONLY: delay = TimeDelta::FromSeconds( - browser_sync::kDefaultShortPollIntervalSeconds); + csync::kDefaultShortPollIntervalSeconds); break; case CUSTOM: switch (model_type) { @@ -716,9 +716,9 @@ bool SyncManager::Init( bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<browser_sync::ModelSafeWorker*>& workers, - browser_sync::ExtensionsActivityMonitor* extensions_activity_monitor, + const csync::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<csync::ModelSafeWorker*>& workers, + csync::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const std::string& user_agent, const SyncCredentials& credentials, @@ -775,7 +775,7 @@ syncable::ModelTypeSet SyncManager::InitialSyncEndedTypes() { } void SyncManager::StartSyncingNormally( - const browser_sync::ModelSafeRoutingInfo& routing_info) { + const csync::ModelSafeRoutingInfo& routing_info) { DCHECK(thread_checker_.CalledOnValidThread()); data_->StartSyncingNormally(routing_info); } @@ -819,7 +819,7 @@ bool SyncManager::IsUsingExplicitPassphrase() { } void SyncManager::RequestCleanupDisabledTypes( - const browser_sync::ModelSafeRoutingInfo& routing_info) { + const csync::ModelSafeRoutingInfo& routing_info) { DCHECK(thread_checker_.CalledOnValidThread()); if (data_->scheduler()) { data_->session_context()->set_routing_info(routing_info); @@ -828,7 +828,7 @@ void SyncManager::RequestCleanupDisabledTypes( } void SyncManager::RequestConfig( - const browser_sync::ModelSafeRoutingInfo& routing_info, + const csync::ModelSafeRoutingInfo& routing_info, const ModelTypeSet& types, ConfigureReason reason) { DCHECK(thread_checker_.CalledOnValidThread()); if (!data_->scheduler()) { @@ -851,7 +851,7 @@ void SyncManager::StartConfigurationMode(const base::Closure& callback) { return; } data_->scheduler()->Start( - browser_sync::SyncScheduler::CONFIGURATION_MODE, callback); + csync::SyncScheduler::CONFIGURATION_MODE, callback); } bool SyncManager::SyncInternal::Init( @@ -862,9 +862,9 @@ bool SyncManager::SyncInternal::Init( bool use_ssl, const scoped_refptr<base::TaskRunner>& blocking_task_runner, HttpPostProviderFactory* post_factory, - const browser_sync::ModelSafeRoutingInfo& model_safe_routing_info, - const std::vector<browser_sync::ModelSafeWorker*>& workers, - browser_sync::ExtensionsActivityMonitor* extensions_activity_monitor, + const csync::ModelSafeRoutingInfo& model_safe_routing_info, + const std::vector<csync::ModelSafeWorker*>& workers, + csync::ExtensionsActivityMonitor* extensions_activity_monitor, ChangeDelegate* change_delegate, const std::string& user_agent, const SyncCredentials& credentials, @@ -938,7 +938,7 @@ bool SyncManager::SyncInternal::Init( if (signed_in) { if (scheduler()) { scheduler()->Start( - browser_sync::SyncScheduler::CONFIGURATION_MODE, base::Closure()); + csync::SyncScheduler::CONFIGURATION_MODE, base::Closure()); } initialized_ = true; @@ -974,7 +974,7 @@ void SyncManager::SyncInternal::UpdateCryptographerAndNigori( const std::string& chrome_version, const base::Closure& done_callback) { DCHECK(initialized_); - browser_sync::GetSessionName( + csync::GetSessionName( blocking_task_runner_, base::Bind( &SyncManager::SyncInternal::UpdateCryptographerAndNigoriCallback, @@ -1110,7 +1110,7 @@ void SyncManager::SyncInternal::NotifyCryptographerState( } void SyncManager::SyncInternal::StartSyncingNormally( - const browser_sync::ModelSafeRoutingInfo& routing_info) { + const csync::ModelSafeRoutingInfo& routing_info) { // Start the sync scheduler. if (scheduler()) { // NULL during certain unittests. session_context()->set_routing_info(routing_info); @@ -1123,9 +1123,9 @@ bool SyncManager::SyncInternal::OpenDirectory() { // Set before Open(). change_observer_ = - browser_sync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()); + csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr()); WeakHandle<syncable::TransactionObserver> transaction_observer( - browser_sync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr())); + csync::MakeWeakHandle(js_mutation_event_observer_.AsWeakPtr())); syncable::DirOpenResult open_result = syncable::NOT_INITIALIZED; if (testing_mode_ == TEST_IN_MEMORY) { @@ -1736,19 +1736,19 @@ void SyncManager::SyncInternal::OnServerConnectionEvent( const ServerConnectionEvent& event) { DCHECK(thread_checker_.CalledOnValidThread()); if (event.connection_code == - browser_sync::HttpResponse::SERVER_CONNECTION_OK) { + csync::HttpResponse::SERVER_CONNECTION_OK) { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_OK)); } - if (event.connection_code == browser_sync::HttpResponse::SYNC_AUTH_ERROR) { + if (event.connection_code == csync::HttpResponse::SYNC_AUTH_ERROR) { observing_ip_address_changes_ = false; FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_AUTH_ERROR)); } if (event.connection_code == - browser_sync::HttpResponse::SYNC_SERVER_ERROR) { + csync::HttpResponse::SYNC_SERVER_ERROR) { FOR_EACH_OBSERVER(SyncManager::Observer, observers_, OnConnectionStatusChange(CONNECTION_SERVER_ERROR)); } @@ -1938,7 +1938,7 @@ void SyncManager::SyncInternal::RequestNudge( const tracked_objects::Location& location) { if (scheduler()) { scheduler()->ScheduleNudgeAsync( - TimeDelta::FromMilliseconds(0), browser_sync::NUDGE_SOURCE_LOCAL, + TimeDelta::FromMilliseconds(0), csync::NUDGE_SOURCE_LOCAL, ModelTypeSet(), location); } } @@ -1963,7 +1963,7 @@ void SyncManager::SyncInternal::RequestNudgeForDataTypes( types.First().Get(), this); scheduler()->ScheduleNudgeAsync(nudge_delay, - browser_sync::NUDGE_SOURCE_LOCAL, + csync::NUDGE_SOURCE_LOCAL, types, nudge_location); } @@ -2310,14 +2310,14 @@ void SyncManager::SyncInternal::OnIncomingNotification( if (scheduler()) { scheduler()->ScheduleNudgeWithPayloadsAsync( TimeDelta::FromMilliseconds(kSyncRefreshDelayMsec), - browser_sync::NUDGE_SOURCE_LOCAL_REFRESH, + csync::NUDGE_SOURCE_LOCAL_REFRESH, type_payloads, FROM_HERE); } } else if (!type_payloads.empty()) { if (scheduler()) { scheduler()->ScheduleNudgeWithPayloadsAsync( TimeDelta::FromMilliseconds(kSyncSchedulerDelayMsec), - browser_sync::NUDGE_SOURCE_NOTIFICATION, + csync::NUDGE_SOURCE_NOTIFICATION, type_payloads, FROM_HERE); } allstatus_.IncrementNotificationsReceived(); @@ -2392,7 +2392,7 @@ syncable::ModelTypeSet SyncManager::GetEncryptedDataTypesForTest() const { return GetEncryptedTypes(&trans); } -bool SyncManager::ReceivedExperiment(browser_sync::Experiments* experiments) +bool SyncManager::ReceivedExperiment(csync::Experiments* experiments) const { ReadTransaction trans(FROM_HERE, GetUserShare()); ReadNode node(&trans); diff --git a/sync/internal_api/syncapi_internal.cc b/sync/internal_api/syncapi_internal.cc index 0f7a27a..b8e8c43 100644 --- a/sync/internal_api/syncapi_internal.cc +++ b/sync/internal_api/syncapi_internal.cc @@ -9,7 +9,7 @@ #include "sync/protocol/sync.pb.h" #include "sync/util/cryptographer.h" -using browser_sync::Cryptographer; +using csync::Cryptographer; namespace sync_api { @@ -54,7 +54,7 @@ bool IsNameServerIllegalAfterTrimming(const std::string& name) { } // Compare the values of two EntitySpecifics, accounting for encryption. -bool AreSpecificsEqual(const browser_sync::Cryptographer* cryptographer, +bool AreSpecificsEqual(const csync::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 diff --git a/sync/internal_api/syncapi_internal.h b/sync/internal_api/syncapi_internal.h index 162d26f..caeed2b 100644 --- a/sync/internal_api/syncapi_internal.h +++ b/sync/internal_api/syncapi_internal.h @@ -10,7 +10,7 @@ #include <string> -namespace browser_sync { +namespace csync { class Cryptographer; } @@ -22,14 +22,14 @@ class PasswordSpecificsData; namespace sync_api { sync_pb::PasswordSpecificsData* DecryptPasswordSpecifics( const sync_pb::EntitySpecifics& specifics, - browser_sync::Cryptographer* crypto); + csync::Cryptographer* crypto); void SyncAPINameToServerName(const std::string& sync_api_name, std::string* out); bool IsNameServerIllegalAfterTrimming(const std::string& name); -bool AreSpecificsEqual(const browser_sync::Cryptographer* cryptographer, +bool AreSpecificsEqual(const csync::Cryptographer* cryptographer, const sync_pb::EntitySpecifics& left, const sync_pb::EntitySpecifics& right); } diff --git a/sync/internal_api/syncapi_server_connection_manager.cc b/sync/internal_api/syncapi_server_connection_manager.cc index ca849ae..c5f7a74 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 browser_sync::HttpResponse; +using csync::HttpResponse; namespace sync_api { SyncAPIBridgedConnection::SyncAPIBridgedConnection( - browser_sync::ServerConnectionManager* scm, + csync::ServerConnectionManager* scm, HttpPostProviderFactory* factory) : Connection(scm), factory_(factory) { post_provider_ = factory_->Create(); @@ -99,7 +99,7 @@ SyncAPIServerConnectionManager::SyncAPIServerConnectionManager( SyncAPIServerConnectionManager::~SyncAPIServerConnectionManager() {} -browser_sync::ServerConnectionManager::Connection* +csync::ServerConnectionManager::Connection* SyncAPIServerConnectionManager::MakeConnection() { return new SyncAPIBridgedConnection(this, post_provider_factory_.get()); } diff --git a/sync/internal_api/syncapi_server_connection_manager.h b/sync/internal_api/syncapi_server_connection_manager.h index fafde1e..86982f6 100644 --- a/sync/internal_api/syncapi_server_connection_manager.h +++ b/sync/internal_api/syncapi_server_connection_manager.h @@ -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 browser_sync::ServerConnectionManager::Connection { + : public csync::ServerConnectionManager::Connection { public: - SyncAPIBridgedConnection(browser_sync::ServerConnectionManager* scm, + SyncAPIBridgedConnection(csync::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, - browser_sync::HttpResponse* response) OVERRIDE; + csync::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 browser_sync::ServerConnectionManager { + : public csync::ServerConnectionManager { public: // Takes ownership of factory. SyncAPIServerConnectionManager(const std::string& server, diff --git a/sync/internal_api/syncapi_server_connection_manager_unittest.cc b/sync/internal_api/syncapi_server_connection_manager_unittest.cc index 77b5244..e719a21 100644 --- a/sync/internal_api/syncapi_server_connection_manager_unittest.cc +++ b/sync/internal_api/syncapi_server_connection_manager_unittest.cc @@ -17,9 +17,9 @@ #include "testing/gtest/include/gtest/gtest.h" using base::TimeDelta; -using browser_sync::HttpResponse; -using browser_sync::ServerConnectionManager; -using browser_sync::ScopedServerStatusWatcher; +using csync::HttpResponse; +using csync::ServerConnectionManager; +using csync::ScopedServerStatusWatcher; namespace sync_api { namespace { diff --git a/sync/internal_api/syncapi_unittest.cc b/sync/internal_api/syncapi_unittest.cc index b12c048..747b44b 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 browser_sync::Cryptographer; -using browser_sync::FakeEncryptor; -using browser_sync::FakeExtensionsActivityMonitor; -using browser_sync::HasArgsAsList; -using browser_sync::HasDetailsAsDictionary; -using browser_sync::KeyParams; -using browser_sync::kNigoriTag; -using browser_sync::JsArgList; -using browser_sync::JsBackend; -using browser_sync::JsEventHandler; -using browser_sync::JsReplyHandler; -using browser_sync::MockJsEventHandler; -using browser_sync::MockJsReplyHandler; -using browser_sync::ModelSafeRoutingInfo; -using browser_sync::ModelSafeWorker; -using browser_sync::sessions::SyncSessionSnapshot; -using browser_sync::TestUnrecoverableErrorHandler; -using browser_sync::WeakHandle; +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 syncable::IS_DEL; using syncable::IS_UNSYNCED; using syncable::kEncryptedString; @@ -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(browser_sync::GetTimeDebugString(expected_value), time_str); + EXPECT_EQ(csync::GetTimeDebugString(expected_value), time_str); } // Makes a non-folder child of the root node. Returns the id of the @@ -245,7 +245,7 @@ class SyncApiTest : public testing::Test { protected: MessageLoop message_loop_; - browser_sync::TestUserShare test_user_share_; + csync::TestUserShare test_user_share_; }; TEST_F(SyncApiTest, SanityCheckTest) { @@ -705,7 +705,7 @@ class SyncManagerObserverMock : public SyncManager::Observer { void(ModelTypeSet, bool)); // NOLINT MOCK_METHOD0(OnEncryptionComplete, void()); // NOLINT MOCK_METHOD1(OnActionableError, - void(const browser_sync::SyncProtocolError&)); // NOLINT + void(const csync::SyncProtocolError&)); // NOLINT }; class SyncNotifierMock : public csync::SyncNotifier { @@ -815,12 +815,12 @@ class SyncManagerTest : public testing::Test, } void GetModelSafeRoutingInfo(ModelSafeRoutingInfo* out) { - (*out)[syncable::NIGORI] = browser_sync::GROUP_PASSIVE; - (*out)[syncable::BOOKMARKS] = browser_sync::GROUP_PASSIVE; - (*out)[syncable::THEMES] = browser_sync::GROUP_PASSIVE; - (*out)[syncable::SESSIONS] = browser_sync::GROUP_PASSIVE; - (*out)[syncable::PASSWORDS] = browser_sync::GROUP_PASSIVE; - (*out)[syncable::PREFERENCES] = browser_sync::GROUP_PASSIVE; + (*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; } virtual void OnChangesApplied( @@ -1844,7 +1844,7 @@ TEST_F(SyncManagerTest, NudgeDelayTest) { EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::AUTOFILL), base::TimeDelta::FromSeconds( - browser_sync::kDefaultShortPollIntervalSeconds)); + csync::kDefaultShortPollIntervalSeconds)); EXPECT_EQ(sync_manager_.GetNudgeDelayTimeDelta(syncable::PREFERENCES), base::TimeDelta::FromMilliseconds( @@ -2463,7 +2463,7 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) { EXPECT_TRUE(SetUpEncryption(WRITE_TO_NIGORI, DEFAULT_ENCRYPTION)); { ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare()); - browser_sync::Cryptographer* crypto = trans.GetCryptographer(); + csync::Cryptographer* crypto = trans.GetCryptographer(); sync_pb::EntitySpecifics bm_specifics; bm_specifics.mutable_bookmark()->set_title("title"); bm_specifics.mutable_bookmark()->set_url("url"); @@ -2511,4 +2511,4 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/test/test_user_share.cc b/sync/internal_api/test/test_user_share.cc index 2fc0d60..1934bc3 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 browser_sync { +namespace csync { TestUserShare::TestUserShare() : dir_maker_(new TestDirectorySetterUpper()) {} @@ -39,4 +39,4 @@ sync_api::UserShare* TestUserShare::user_share() { return user_share_.get(); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/internal_api/write_node.cc b/sync/internal_api/write_node.cc index e281fcd..24dd9f0 100644 --- a/sync/internal_api/write_node.cc +++ b/sync/internal_api/write_node.cc @@ -21,7 +21,7 @@ #include "sync/syncable/mutable_entry.h" #include "sync/util/cryptographer.h" -using browser_sync::Cryptographer; +using csync::Cryptographer; using std::string; using std::vector; using syncable::kEncryptedString; @@ -205,7 +205,7 @@ void WriteNode::SetEntitySpecifics( if (GetModelType() != syncable::UNSPECIFIED) { DCHECK_EQ(new_specifics_type, GetModelType()); } - browser_sync::Cryptographer* cryptographer = + csync::Cryptographer* cryptographer = GetTransaction()->GetCryptographer(); // Preserve unknown fields. @@ -479,6 +479,10 @@ const BaseTransaction* WriteNode::GetTransaction() const { return transaction_; } +syncable::MutableEntry* WriteNode::GetMutableEntryForTest() { + return entry_; +} + void WriteNode::Remove() { entry_->Put(syncable::IS_DEL, true); MarkForSyncing(); diff --git a/sync/js/js_arg_list.cc b/sync/js/js_arg_list.cc index c95235a..754a2e4 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 browser_sync { +namespace csync { JsArgList::JsArgList() {} @@ -24,4 +24,4 @@ std::string JsArgList::ToString() const { return str; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/js_arg_list.h b/sync/js/js_arg_list.h index 40cf712..28244e8 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 browser_sync { +namespace csync { // A thin wrapper around Immutable<ListValue>. Used for passing // around argument lists to different threads. @@ -39,6 +39,6 @@ class JsArgList { ImmutableListValue args_; }; -} // namespace browser_sync +} // namespace csync #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 3f00e4b..55044b7 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 browser_sync { +namespace csync { namespace { class JsArgListTest : public testing::Test {}; @@ -37,4 +37,4 @@ TEST_F(JsArgListTest, FromList) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/js_backend.h b/sync/js/js_backend.h index 3c7f89a..f0febee 100644 --- a/sync/js/js_backend.h +++ b/sync/js/js_backend.h @@ -10,7 +10,7 @@ #include <string> -namespace browser_sync { +namespace csync { class JsArgList; class JsEventHandler; @@ -36,6 +36,6 @@ class JsBackend { virtual ~JsBackend() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_JS_JS_BACKEND_H_ diff --git a/sync/js/js_controller.h b/sync/js/js_controller.h index d0deb20..e1a0d8a 100644 --- a/sync/js/js_controller.h +++ b/sync/js/js_controller.h @@ -10,7 +10,7 @@ #include <string> -namespace browser_sync { +namespace csync { class JsArgList; class JsEventHandler; @@ -45,6 +45,6 @@ class JsController { virtual ~JsController() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_JS_JS_CONTROLLER_H_ diff --git a/sync/js/js_event_details.cc b/sync/js/js_event_details.cc index b455b01..c5e3f71 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 browser_sync { +namespace csync { JsEventDetails::JsEventDetails() {} @@ -24,4 +24,4 @@ std::string JsEventDetails::ToString() const { return str; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/js_event_details.h b/sync/js/js_event_details.h index fe05066..ad93b67 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 browser_sync { +namespace csync { // A thin wrapper around Immutable<DictionaryValue>. Used for passing // around event details to different threads. @@ -40,6 +40,6 @@ class JsEventDetails { ImmutableDictionaryValue details_; }; -} // namespace browser_sync +} // namespace csync #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 01cea19..b734ec9 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 browser_sync { +namespace csync { namespace { class JsEventDetailsTest : public testing::Test {}; @@ -33,4 +33,4 @@ TEST_F(JsEventDetailsTest, FromDictionary) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/js_event_handler.h b/sync/js/js_event_handler.h index ce15903..9eb73b6 100644 --- a/sync/js/js_event_handler.h +++ b/sync/js/js_event_handler.h @@ -10,7 +10,7 @@ #include <string> -namespace browser_sync { +namespace csync { class JsEventDetails; @@ -25,6 +25,6 @@ class JsEventHandler { virtual ~JsEventHandler() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_JS_JS_EVENT_HANDLER_H_ diff --git a/sync/js/js_reply_handler.h b/sync/js/js_reply_handler.h index 3b10309..9749297 100644 --- a/sync/js/js_reply_handler.h +++ b/sync/js/js_reply_handler.h @@ -10,7 +10,7 @@ #include <string> -namespace browser_sync { +namespace csync { class JsArgList; @@ -25,6 +25,6 @@ class JsReplyHandler { virtual ~JsReplyHandler() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_JS_JS_REPLY_HANDLER_H_ diff --git a/sync/js/js_test_util.cc b/sync/js/js_test_util.cc index 257a947..d90485b 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 browser_sync { +namespace csync { void PrintTo(const JsArgList& args, ::std::ostream* os) { *os << args.ToString(); @@ -133,5 +133,5 @@ WeakHandle<JsReplyHandler> MockJsReplyHandler::AsWeakHandle() { return MakeWeakHandle(AsWeakPtr()); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/js_test_util.h b/sync/js/js_test_util.h index 3e8b24a..042019b1 100644 --- a/sync/js/js_test_util.h +++ b/sync/js/js_test_util.h @@ -22,7 +22,7 @@ class DictionaryValue; class ListValue; } -namespace browser_sync { +namespace csync { class JsArgList; class JsEventDetails; @@ -104,6 +104,6 @@ class MockJsReplyHandler void(const ::std::string&, const JsArgList&)); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_JS_JS_TEST_UTIL_H_ diff --git a/sync/js/sync_js_controller.cc b/sync/js/sync_js_controller.cc index 0448486..b2f57ea 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 browser_sync { +namespace csync { SyncJsController::PendingJsMessage::PendingJsMessage( const std::string& name, const JsArgList& args, @@ -80,4 +80,4 @@ void SyncJsController::UpdateBackendEventHandler() { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/js/sync_js_controller.h b/sync/js/sync_js_controller.h index dcc792d2..26ac93ba 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 browser_sync { +namespace csync { class JsBackend; @@ -76,6 +76,6 @@ class SyncJsController DISALLOW_COPY_AND_ASSIGN(SyncJsController); }; -} // namespace browser_sync +} // namespace csync #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 10a982d..3a8728f 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 browser_sync { +namespace csync { namespace { using ::testing::_; @@ -123,4 +123,4 @@ TEST_F(SyncJsControllerTest, Events) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/notifier/chrome_invalidation_client.cc b/sync/notifier/chrome_invalidation_client.cc index 3557494..0ec2c40 100644 --- a/sync/notifier/chrome_invalidation_client.cc +++ b/sync/notifier/chrome_invalidation_client.cc @@ -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 browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, Listener* listener) { DCHECK(CalledOnValidThread()); diff --git a/sync/notifier/chrome_invalidation_client.h b/sync/notifier/chrome_invalidation_client.h index 2ba7f7a..20733e9 100644 --- a/sync/notifier/chrome_invalidation_client.h +++ b/sync/notifier/chrome_invalidation_client.h @@ -73,7 +73,7 @@ class ChromeInvalidationClient const std::string& client_id, const std::string& client_info, const std::string& state, const InvalidationVersionMap& initial_max_invalidation_versions, - const browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, Listener* listener); @@ -140,7 +140,7 @@ class ChromeInvalidationClient notifier::PushClient* const push_client_; ChromeSystemResources chrome_system_resources_; InvalidationVersionMap max_invalidation_versions_; - browser_sync::WeakHandle<InvalidationStateTracker> + csync::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; Listener* listener_; scoped_ptr<invalidation::InvalidationClient> invalidation_client_; diff --git a/sync/notifier/chrome_invalidation_client_unittest.cc b/sync/notifier/chrome_invalidation_client_unittest.cc index 8cfe490..fae864d 100644 --- a/sync/notifier/chrome_invalidation_client_unittest.cc +++ b/sync/notifier/chrome_invalidation_client_unittest.cc @@ -66,7 +66,7 @@ class ChromeInvalidationClientTest : public testing::Test { virtual void SetUp() { client_.Start(kClientId, kClientInfo, kState, InvalidationVersionMap(), - browser_sync::MakeWeakHandle( + csync::MakeWeakHandle( mock_invalidation_state_tracker_.AsWeakPtr()), &mock_listener_); } diff --git a/sync/notifier/invalidation_notifier.cc b/sync/notifier/invalidation_notifier.cc index 119c54d0..a57336e 100644 --- a/sync/notifier/invalidation_notifier.cc +++ b/sync/notifier/invalidation_notifier.cc @@ -20,7 +20,7 @@ InvalidationNotifier::InvalidationNotifier( scoped_ptr<notifier::PushClient> push_client, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) : state_(STOPPED), diff --git a/sync/notifier/invalidation_notifier.h b/sync/notifier/invalidation_notifier.h index cc5dab2..b47f76f 100644 --- a/sync/notifier/invalidation_notifier.h +++ b/sync/notifier/invalidation_notifier.h @@ -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 browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::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 browser_sync::WeakHandle<InvalidationStateTracker> + const csync::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; // Passed to |invalidation_client_|. diff --git a/sync/notifier/invalidation_notifier_unittest.cc b/sync/notifier/invalidation_notifier_unittest.cc index 16ad31a..4001223 100644 --- a/sync/notifier/invalidation_notifier_unittest.cc +++ b/sync/notifier/invalidation_notifier_unittest.cc @@ -48,7 +48,7 @@ class InvalidationNotifierTest : public testing::Test { scoped_ptr<notifier::PushClient>(new notifier::FakePushClient()), InvalidationVersionMap(), initial_invalidation_state, - browser_sync::MakeWeakHandle(mock_tracker_.AsWeakPtr()), + csync::MakeWeakHandle(mock_tracker_.AsWeakPtr()), "fake_client_info")); invalidation_notifier_->AddObserver(&mock_observer_); } diff --git a/sync/notifier/non_blocking_invalidation_notifier.cc b/sync/notifier/non_blocking_invalidation_notifier.cc index f5fc0b2..4f3459d 100644 --- a/sync/notifier/non_blocking_invalidation_notifier.cc +++ b/sync/notifier/non_blocking_invalidation_notifier.cc @@ -23,7 +23,7 @@ class NonBlockingInvalidationNotifier::Core // Called on parent thread. |delegate_observer| should be // initialized. explicit Core( - const browser_sync::WeakHandle<SyncNotifierObserver>& + const csync::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 browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::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 browser_sync::WeakHandle<SyncNotifierObserver> delegate_observer_; + const csync::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 browser_sync::WeakHandle<SyncNotifierObserver>& + const csync::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 browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::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 browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), core_( - new Core(browser_sync::MakeWeakHandle( + new Core(csync::MakeWeakHandle( weak_ptr_factory_.GetWeakPtr()))), parent_task_runner_( base::ThreadTaskRunnerHandle::Get()), diff --git a/sync/notifier/non_blocking_invalidation_notifier.h b/sync/notifier/non_blocking_invalidation_notifier.h index 9eedd75..0385c72 100644 --- a/sync/notifier/non_blocking_invalidation_notifier.h +++ b/sync/notifier/non_blocking_invalidation_notifier.h @@ -38,7 +38,7 @@ class NonBlockingInvalidationNotifier const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info); diff --git a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc index f749e22..2c4cfa7 100644 --- a/sync/notifier/non_blocking_invalidation_notifier_unittest.cc +++ b/sync/notifier/non_blocking_invalidation_notifier_unittest.cc @@ -43,7 +43,7 @@ class NonBlockingInvalidationNotifierTest : public testing::Test { notifier_options, InvalidationVersionMap(), std::string(), // initial_invalidation_state - browser_sync::MakeWeakHandle( + csync::MakeWeakHandle( base::WeakPtr<csync::InvalidationStateTracker>()), "fake_client_info")); invalidation_notifier_->AddObserver(&mock_observer_); diff --git a/sync/notifier/sync_notifier_factory.cc b/sync/notifier/sync_notifier_factory.cc index b78fac7..d528987 100644 --- a/sync/notifier/sync_notifier_factory.cc +++ b/sync/notifier/sync_notifier_factory.cc @@ -19,7 +19,7 @@ SyncNotifier* CreateDefaultSyncNotifier( const notifier::NotifierOptions& notifier_options, const InvalidationVersionMap& initial_max_invalidation_versions, const std::string& initial_invalidation_state, - const browser_sync::WeakHandle<InvalidationStateTracker>& + const csync::WeakHandle<InvalidationStateTracker>& invalidation_state_tracker, const std::string& client_info) { if (notifier_options.notification_method == notifier::NOTIFICATION_P2P) { diff --git a/sync/notifier/sync_notifier_factory.h b/sync/notifier/sync_notifier_factory.h index 323c09b..851db09 100644 --- a/sync/notifier/sync_notifier_factory.h +++ b/sync/notifier/sync_notifier_factory.h @@ -40,7 +40,7 @@ class SyncNotifierFactory { const std::string client_info_; const InvalidationVersionMap initial_max_invalidation_versions_; const std::string initial_invalidation_state_; - const browser_sync::WeakHandle<InvalidationStateTracker> + const csync::WeakHandle<InvalidationStateTracker> invalidation_state_tracker_; }; diff --git a/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc index 7c6433e..f8fc148 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 browser_sync { +namespace csync { #define ASSERT_ENUM_BOUNDS(enum_parent, enum_type, enum_min, enum_max) \ COMPILE_ASSERT(enum_parent::enum_type##_MIN == enum_parent::enum_min, \ diff --git a/sync/protocol/proto_enum_conversions.h b/sync/protocol/proto_enum_conversions.h index abb65ed1..f9c07da 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 5fa53b2..eb69d5a 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 browser_sync { +namespace csync { namespace { class ProtoEnumConversionsTest : public testing::Test { @@ -90,4 +90,4 @@ TEST_F(ProtoEnumConversionsTest, GetActionString) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/protocol/proto_value_conversions.cc b/sync/protocol/proto_value_conversions.cc index 4f31b8e..8b2e819 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 browser_sync { +namespace csync { namespace { @@ -593,4 +593,4 @@ DictionaryValue* ClientToServerMessageToValue( #undef SET_FIELD -} // namespace browser_sync +} // namespace csync diff --git a/sync/protocol/proto_value_conversions.h b/sync/protocol/proto_value_conversions.h index 4fa8ca5..6c61903 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 browser_sync { +namespace csync { // Ownership of all returned DictionaryValues are transferred to the // caller. @@ -148,6 +148,6 @@ base::DictionaryValue* ClientToServerResponseToValue( bool include_specifics); -} // namespace browser_sync +} // namespace csync #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 4c4c6a7..6363c736 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 browser_sync { +namespace csync { namespace { class ProtoValueConversionsTest : public testing::Test { @@ -250,4 +250,4 @@ TEST_F(ProtoValueConversionsTest, ClientToServerResponseToValue) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/protocol/sync_protocol_error.cc b/sync/protocol/sync_protocol_error.cc index 544d98a..61c0351 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 browser_sync { +namespace csync { #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 browser_sync +} // namespace csync diff --git a/sync/protocol/sync_protocol_error.h b/sync/protocol/sync_protocol_error.h index be43980..fc83de1 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 browser_sync{ +namespace csync{ enum SyncProtocolErrorType { // Success case. @@ -76,6 +76,6 @@ struct SyncProtocolError { const char* GetSyncErrorTypeString(SyncProtocolErrorType type); const char* GetClientActionString(ClientAction action); -} // namespace browser_sync +} // namespace csync #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ diff --git a/sync/sessions/debug_info_getter.h b/sync/sessions/debug_info_getter.h index 257a853..3dea807 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 browser_sync { +namespace csync { namespace sessions { // This is the interface that needs to be implemented by the event listener @@ -21,7 +21,7 @@ class DebugInfoGetter { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_SESSIONS_DEBUG_INFO_GETTER_H_ diff --git a/sync/sessions/ordered_commit_set.cc b/sync/sessions/ordered_commit_set.cc index c3fc5d0..91bc5e2 100644 --- a/sync/sessions/ordered_commit_set.cc +++ b/sync/sessions/ordered_commit_set.cc @@ -8,11 +8,11 @@ #include "base/logging.h" -namespace browser_sync { +namespace csync { namespace sessions { OrderedCommitSet::OrderedCommitSet( - const browser_sync::ModelSafeRoutingInfo& routes) + const csync::ModelSafeRoutingInfo& routes) : routes_(routes) { } @@ -32,7 +32,7 @@ void OrderedCommitSet::AddCommitItem(const int64 metahandle, } const OrderedCommitSet::Projection& OrderedCommitSet::GetCommitIdProjection( - browser_sync::ModelSafeGroup group) const { + csync::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 browser_sync +} // namespace csync diff --git a/sync/sessions/ordered_commit_set.h b/sync/sessions/ordered_commit_set.h index e29737f..7c1937e 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 browser_sync { +namespace csync { 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 browser_sync::ModelSafeRoutingInfo& routes); + explicit OrderedCommitSet(const csync::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( - browser_sync::ModelSafeGroup group) const; + csync::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<browser_sync::ModelSafeGroup, Projection> Projections; + typedef std::map<csync::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_; - browser_sync::ModelSafeRoutingInfo routes_; + csync::ModelSafeRoutingInfo routes_; }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #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 6310c9d..85ca08f 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] = browser_sync::GROUP_UI; - routes_[syncable::PREFERENCES] = browser_sync::GROUP_UI; - routes_[syncable::AUTOFILL] = browser_sync::GROUP_DB; - routes_[syncable::TOP_LEVEL_FOLDER] = browser_sync::GROUP_PASSIVE; + 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; } protected: - browser_sync::TestIdFactory ids_; - browser_sync::ModelSafeRoutingInfo routes_; + csync::TestIdFactory ids_; + csync::ModelSafeRoutingInfo routes_; }; -namespace browser_sync { +namespace csync { namespace sessions { TEST_F(OrderedCommitSetTest, Projections) { @@ -128,5 +128,5 @@ TEST_F(OrderedCommitSetTest, AddAndRemoveEntries) { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/session_state.cc b/sync/sessions/session_state.cc index 1eaf2d0..7562522 100644 --- a/sync/sessions/session_state.cc +++ b/sync/sessions/session_state.cc @@ -13,7 +13,7 @@ using std::set; using std::vector; -namespace browser_sync { +namespace csync { namespace sessions { ConflictProgress::ConflictProgress(bool* dirty_flag) @@ -155,4 +155,4 @@ PerModelSafeGroupState::~PerModelSafeGroupState() { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/session_state.h b/sync/sessions/session_state.h index ae55acb..5384f44 100644 --- a/sync/sessions/session_state.h +++ b/sync/sessions/session_state.h @@ -23,7 +23,7 @@ #include "sync/internal_api/public/sessions/syncer_status.h" #include "sync/syncable/syncable_id.h" -namespace browser_sync { +namespace csync { namespace sessions { class UpdateProgress; @@ -196,6 +196,6 @@ struct PerModelSafeGroupState { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_SESSIONS_SESSION_STATE_H_ diff --git a/sync/sessions/session_state_unittest.cc b/sync/sessions/session_state_unittest.cc index a1a0898..8e396c9 100644 --- a/sync/sessions/session_state_unittest.cc +++ b/sync/sessions/session_state_unittest.cc @@ -17,7 +17,7 @@ #include "sync/internal_api/public/sessions/syncer_status.h" #include "testing/gtest/include/gtest/gtest.h" -namespace browser_sync { +namespace csync { namespace sessions { namespace { @@ -152,4 +152,4 @@ TEST_F(SessionStateTest, SyncSessionSnapshotToValue) { } // namespace } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/status_controller.cc b/sync/sessions/status_controller.cc index 0e8e6a6..1339da8 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 browser_sync { +namespace csync { namespace sessions { using syncable::FIRST_REAL_MODEL_TYPE; @@ -287,4 +287,4 @@ bool StatusController::debug_info_sent() const { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/status_controller.h b/sync/sessions/status_controller.h index ebb77ba..7fc49f8 100644 --- a/sync/sessions/status_controller.h +++ b/sync/sessions/status_controller.h @@ -42,7 +42,7 @@ #include "sync/sessions/ordered_commit_set.h" #include "sync/sessions/session_state.h" -namespace browser_sync { +namespace csync { namespace sessions { class StatusController { diff --git a/sync/sessions/status_controller_unittest.cc b/sync/sessions/status_controller_unittest.cc index 2e0f44d..84d352f 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 browser_sync { +namespace csync { namespace sessions { class StatusControllerTest : public testing::Test { @@ -162,4 +162,4 @@ TEST_F(StatusControllerTest, Unrestricted) { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc index eed4f88..876c736 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 browser_sync { +namespace csync { namespace sessions { namespace { @@ -260,4 +260,4 @@ void SyncSession::SetFinished() { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/sync_session.h b/sync/sessions/sync_session.h index c903be9..6ccae9e 100644 --- a/sync/sessions/sync_session.h +++ b/sync/sessions/sync_session.h @@ -37,7 +37,7 @@ namespace syncable { class WriteTransaction; } -namespace browser_sync { +namespace csync { class ModelSafeWorker; namespace sessions { @@ -247,6 +247,6 @@ class ScopedSetSessionWriteTransaction { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_SESSIONS_SYNC_SESSION_H_ diff --git a/sync/sessions/sync_session_context.cc b/sync/sessions/sync_session_context.cc index ce9d938..22f7582 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 browser_sync { +namespace csync { 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, - browser_sync::TrafficRecorder* traffic_recorder) + csync::TrafficRecorder* traffic_recorder) : resolver_(NULL), connection_manager_(connection_manager), directory_(directory), @@ -44,4 +44,4 @@ SyncSessionContext::~SyncSessionContext() { } } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/sync_session_context.h b/sync/sessions/sync_session_context.h index ebde3f3..20f574c 100644 --- a/sync/sessions/sync_session_context.h +++ b/sync/sessions/sync_session_context.h @@ -34,7 +34,7 @@ namespace syncable { class Directory; } -namespace browser_sync { +namespace csync { class ConflictResolver; class ExtensionsActivityMonitor; @@ -58,7 +58,7 @@ class SyncSessionContext { ThrottledDataTypeTracker* throttled_data_type_tracker, const std::vector<SyncEngineEventListener*>& listeners, DebugInfoGetter* debug_info_getter, - browser_sync::TrafficRecorder* traffic_recorder); + csync::TrafficRecorder* traffic_recorder); ~SyncSessionContext(); ConflictResolver* resolver() { return resolver_; } @@ -124,7 +124,7 @@ class SyncSessionContext { OnSyncEngineEvent(event)); } - browser_sync::TrafficRecorder* traffic_recorder() { + csync::TrafficRecorder* traffic_recorder() { return traffic_recorder_; } @@ -174,7 +174,7 @@ class SyncSessionContext { // client behavior on server side. DebugInfoGetter* const debug_info_getter_; - browser_sync::TrafficRecorder* traffic_recorder_; + csync::TrafficRecorder* traffic_recorder_; DISALLOW_COPY_AND_ASSIGN(SyncSessionContext); }; @@ -203,6 +203,6 @@ class ScopedSessionContextConflictResolver { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_SESSIONS_SYNC_SESSION_CONTEXT_H_ diff --git a/sync/sessions/sync_session_unittest.cc b/sync/sessions/sync_session_unittest.cc index fa5e986..f1d8031 100644 --- a/sync/sessions/sync_session_unittest.cc +++ b/sync/sessions/sync_session_unittest.cc @@ -23,7 +23,7 @@ using syncable::WriteTransaction; -namespace browser_sync { +namespace csync { namespace sessions { namespace { @@ -537,4 +537,4 @@ TEST_F(SyncSessionTest, CoalescePayloads) { } // namespace } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/test_util.cc b/sync/sessions/test_util.cc index a54c8f00..d1bd5b7 100644 --- a/sync/sessions/test_util.cc +++ b/sync/sessions/test_util.cc @@ -4,7 +4,7 @@ #include "sync/sessions/test_util.h" -namespace browser_sync { +namespace csync { namespace sessions { namespace test_util { @@ -63,4 +63,4 @@ void SimulateSessionsCommitDelayUpdateImpl(sessions::SyncSession* session, } // namespace test_util } // namespace sessions -} // namespace browser_sync +} // namespace csync diff --git a/sync/sessions/test_util.h b/sync/sessions/test_util.h index aad02e2..01fa3aa 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 browser_sync { +namespace csync { namespace sessions { namespace test_util { @@ -47,6 +47,6 @@ ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { } // namespace test_util } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_SESSIONS_TEST_UTIL_H_ diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc index 40179b2..ec78f29 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 browser_sync::Encryptor; -using browser_sync::ReportUnrecoverableErrorFunction; -using browser_sync::UnrecoverableErrorHandler; +using csync::Encryptor; +using csync::ReportUnrecoverableErrorFunction; +using csync::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 browser_sync::WeakHandle<TransactionObserver>& + const csync::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 browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer) : refcount(1), next_write_transaction_id(0), @@ -208,7 +208,7 @@ Directory::~Directory() { DirOpenResult Directory::Open( const FilePath& file_path, const string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer) { TRACE_EVENT0("sync", "SyncDatabaseOpen"); @@ -226,7 +226,7 @@ DirOpenResult Directory::Open( DirOpenResult Directory::OpenInMemoryForTest( const string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer) { DirectoryBackingStore* store = new InMemoryDirectoryBackingStore(name); @@ -261,7 +261,7 @@ DirOpenResult Directory::OpenImpl( DirectoryBackingStore* store, const string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer) { DCHECK_EQ(static_cast<DirectoryBackingStore*>(NULL), store_); store_ = store; @@ -797,7 +797,7 @@ string Directory::cache_guid() const { return kernel_->cache_guid; } -browser_sync::Cryptographer* Directory::GetCryptographer( +csync::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 dc47732..95ab97a 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 browser_sync { +namespace csync { class Encryptor; class UnrecoverableErrorHandler; } @@ -201,9 +201,9 @@ class Directory { // Does not take ownership of |encryptor|. // |report_unrecoverable_error_function| may be NULL. Directory( - browser_sync::Encryptor* encryptor, - browser_sync::UnrecoverableErrorHandler* unrecoverable_error_handler, - browser_sync::ReportUnrecoverableErrorFunction + csync::Encryptor* encryptor, + csync::UnrecoverableErrorHandler* unrecoverable_error_handler, + csync::ReportUnrecoverableErrorFunction report_unrecoverable_error_function); virtual ~Directory(); @@ -213,7 +213,7 @@ class Directory { // thread. |transaction_observer| must be initialized. DirOpenResult Open(const FilePath& file_path, const std::string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer); // Same as above, but does not create a file to persist the database. This is @@ -221,7 +221,7 @@ class Directory { // want to pay the performance penalty of using a real database. DirOpenResult OpenInMemoryForTest( const std::string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer); // Stops sending events to the delegate and the transaction @@ -269,7 +269,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. - browser_sync::Cryptographer* GetCryptographer(const BaseTransaction* trans); + csync::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 @@ -315,7 +315,7 @@ class Directory { DirOpenResult OpenImpl( DirectoryBackingStore* store, const std::string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer); private: @@ -483,7 +483,7 @@ class Directory { void InitKernelForTest( const std::string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer); private: @@ -492,7 +492,7 @@ class Directory { // initialized. Kernel(const std::string& name, const KernelLoadInfo& info, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer); ~Kernel(); @@ -566,7 +566,7 @@ class Directory { DirectoryChangeDelegate* const delegate; // The transaction observer. - const browser_sync::WeakHandle<TransactionObserver> transaction_observer; + const csync::WeakHandle<TransactionObserver> transaction_observer; }; // Helper method used to do searches on |parent_id_child_index|. @@ -605,14 +605,14 @@ class Directory { EntryKernel* GetPossibleLastChildForTest( const ScopedKernelLock& lock, const Id& parent_id); - browser_sync::Cryptographer cryptographer_; + csync::Cryptographer cryptographer_; Kernel* kernel_; DirectoryBackingStore* store_; - browser_sync::UnrecoverableErrorHandler* const unrecoverable_error_handler_; - const browser_sync::ReportUnrecoverableErrorFunction + csync::UnrecoverableErrorHandler* const unrecoverable_error_handler_; + const csync::ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; bool unrecoverable_error_set_; }; diff --git a/sync/syncable/directory_backing_store.cc b/sync/syncable/directory_backing_store.cc index 12bc419..177f1ec 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++, - browser_sync::TimeToProtoTime( + csync::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), - browser_sync::ProtoTimeToTime(statement->ColumnInt64(i))); + csync::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 = browser_sync::TimeToProtoTime(base::Time::Now()); + const int64 now = csync::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 62b7ccf..bfb01407 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] = - browser_sync::ProtoTimeToTime(it->second); + csync::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: " << browser_sync::TimeToProtoTime(t1) - << " and " << browser_sync::TimeToProtoTime(t2) + << ") (proto time: " << csync::TimeToProtoTime(t1) + << " and " << csync::TimeToProtoTime(t2) << ") do not match"; } diff --git a/sync/syncable/entry.cc b/sync/syncable/entry.cc index 3f3e785..b9d05a0 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 << ": " - << browser_sync::GetTimeDebugString( + << csync::GetTimeDebugString( kernel->ref(static_cast<TimeField>(i))) << ", "; } for ( ; i < ID_FIELDS_END; ++i) { diff --git a/sync/syncable/entry_kernel.cc b/sync/syncable/entry_kernel.cc index 0ea3d4e..83fc2c4 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(browser_sync::GetTimeDebugString(t)); + return Value::CreateStringValue(csync::GetTimeDebugString(t)); } StringValue* IdToValue(const Id& id) { @@ -119,7 +119,7 @@ DictionaryValue* EntryKernel::ToValue() const { // Proto fields. SetFieldValues(*this, kernel_info, - &GetProtoFieldString, &browser_sync::EntitySpecificsToValue, + &GetProtoFieldString, &csync::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 5c16f1d..3a4e54c 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] = - browser_sync::ProtoTimeToTime( - browser_sync::TimeToProtoTime(value)); + csync::ProtoTimeToTime( + csync::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 browser_sync::Immutable<EntryKernelMutationMap> +typedef csync::Immutable<EntryKernelMutationMap> ImmutableEntryKernelMutationMap; // Caller owns the return value. diff --git a/sync/syncable/model_type.cc b/sync/syncable/model_type.cc index 7589e7f..19a1588 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 browser_sync::SyncEntity& sync_entity = - static_cast<const browser_sync::SyncEntity&>(sync_pb_entity); + const csync::SyncEntity& sync_entity = + static_cast<const csync::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/syncable_id_unittest.cc b/sync/syncable/syncable_id_unittest.cc index 67524b3..605a678 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 browser_sync::TestIdFactory; +using csync::TestIdFactory; class SyncableIdTest : public testing::Test { }; diff --git a/sync/syncable/syncable_mock.cc b/sync/syncable/syncable_mock.cc index 24990d1..77b4743 100644 --- a/sync/syncable/syncable_mock.cc +++ b/sync/syncable/syncable_mock.cc @@ -7,7 +7,7 @@ #include "base/location.h" #include "sync/test/null_transaction_observer.h" -MockDirectory::MockDirectory(browser_sync::UnrecoverableErrorHandler* handler) +MockDirectory::MockDirectory(csync::UnrecoverableErrorHandler* handler) : Directory(&encryptor_, handler, NULL) { InitKernelForTest("myk", &delegate_, syncable::NullTransactionObserver()); } diff --git a/sync/syncable/syncable_mock.h b/sync/syncable/syncable_mock.h index 0dec075..a829ad2 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(browser_sync::UnrecoverableErrorHandler* handler); + explicit MockDirectory(csync::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: - browser_sync::FakeEncryptor encryptor_; + csync::FakeEncryptor encryptor_; syncable::NullDirectoryChangeDelegate delegate_; }; diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc index bc821bf..b820902 100644 --- a/sync/syncable/syncable_unittest.cc +++ b/sync/syncable/syncable_unittest.cc @@ -37,9 +37,9 @@ using base::ExpectDictBooleanValue; using base::ExpectDictStringValue; -using browser_sync::FakeEncryptor; -using browser_sync::TestIdFactory; -using browser_sync::TestUnrecoverableErrorHandler; +using csync::FakeEncryptor; +using csync::TestIdFactory; +using csync::TestUnrecoverableErrorHandler; namespace syncable { @@ -401,7 +401,7 @@ class TestUnsaveableDirectory : public Directory { DirOpenResult OpenUnsaveable( const FilePath& file_path, const std::string& name, DirectoryChangeDelegate* delegate, - const browser_sync::WeakHandle<TransactionObserver>& + const csync::WeakHandle<TransactionObserver>& transaction_observer) { DirectoryBackingStore *store = new UnsaveableBackingStore(name, file_path); DirOpenResult result = @@ -1151,14 +1151,14 @@ TEST_F(SyncableDirectoryTest, GetModelType) { server_item.Put(SERVER_IS_DEL, false); ASSERT_EQ(datatype, server_item.GetServerModelType()); - browser_sync::SyncEntity folder_entity; + csync::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()); - browser_sync::SyncEntity item_entity; + csync::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 9441bf5..b49c376 100644 --- a/sync/syncable/write_transaction_info.h +++ b/sync/syncable/write_transaction_info.h @@ -32,7 +32,7 @@ struct WriteTransactionInfo { }; typedef - browser_sync::Immutable<WriteTransactionInfo> + csync::Immutable<WriteTransactionInfo> ImmutableWriteTransactionInfo; } // namespace syncable diff --git a/sync/test/engine/fake_model_worker.cc b/sync/test/engine/fake_model_worker.cc index 3c254f5..f394bc0 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 browser_sync { +namespace csync { FakeModelWorker::FakeModelWorker(ModelSafeGroup group) : group_(group) {} @@ -28,4 +28,4 @@ ModelSafeGroup FakeModelWorker::GetModelSafeGroup() { return group_; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/test/engine/fake_model_worker.h b/sync/test/engine/fake_model_worker.h index 59a9e0b..b9ca42d 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 f7ecac0..4bf97f5 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 browser_sync::HttpResponse; -using browser_sync::ServerConnectionManager; -using browser_sync::ServerConnectionEventListener; -using browser_sync::ServerConnectionEvent; -using browser_sync::SyncerProtoUtil; -using browser_sync::TestIdFactory; +using csync::HttpResponse; +using csync::ServerConnectionManager; +using csync::ServerConnectionEventListener; +using csync::ServerConnectionEvent; +using csync::SyncerProtoUtil; +using csync::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, - browser_sync::ScopedServerStatusWatcher* watcher) { + csync::ScopedServerStatusWatcher* watcher) { ClientToServerMessage post; CHECK(post.ParseFromString(params->buffer_in)); last_request_.CopyFrom(post); diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h index 84c802c..644ef4e 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 browser_sync::ServerConnectionManager { +class MockConnectionManager : public csync::ServerConnectionManager { public: class MidCommitObserver { public: @@ -39,7 +39,7 @@ class MockConnectionManager : public browser_sync::ServerConnectionManager { PostBufferParams*, const std::string& path, const std::string& auth_token, - browser_sync::ScopedServerStatusWatcher* watcher) OVERRIDE; + csync::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 9275e17..61313b1 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 browser_sync { +namespace csync { const unsigned int kMaxMessages = 10; const unsigned int kMaxMessageSize = 5 * 1024; @@ -63,4 +63,4 @@ Directory* MockDirectorySyncerCommandTest::directory() { return &mock_directory_; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h index 0fc70b3..e519b6b 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 browser_sync { +namespace csync { -class MockDebugInfoGetter : public browser_sync::sessions::DebugInfoGetter { +class MockDebugInfoGetter : public csync::sessions::DebugInfoGetter { public: MockDebugInfoGetter(); virtual ~MockDebugInfoGetter(); @@ -233,6 +233,6 @@ class MockDirectorySyncerCommandTest : public SyncerCommandTestBase { MockDirectory mock_directory_; }; -} // namespace browser_sync +} // namespace csync #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 5303bea..28b9c5c 100644 --- a/sync/test/engine/test_directory_setter_upper.cc +++ b/sync/test/engine/test_directory_setter_upper.cc @@ -16,7 +16,7 @@ using syncable::NullTransactionObserver; using syncable::ReadTransaction; -namespace browser_sync { +namespace csync { TestDirectorySetterUpper::TestDirectorySetterUpper() : name_("Test") {} @@ -57,4 +57,4 @@ void TestDirectorySetterUpper::RunInvariantCheck() { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/test/engine/test_directory_setter_upper.h b/sync/test/engine/test_directory_setter_upper.h index 7e2f894..17ce8da 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 browser_sync { +namespace csync { class TestDirectorySetterUpper { public: @@ -76,6 +76,6 @@ class TestDirectorySetterUpper { DISALLOW_COPY_AND_ASSIGN(TestDirectorySetterUpper); }; -} // namespace browser_sync +} // namespace csync #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 cb82ce4..a0163c8 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 browser_sync { +namespace csync { class TestIdFactory { public: @@ -67,7 +67,7 @@ class TestIdFactory { int next_value_; }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_TEST_ENGINE_TEST_ID_FACTORY_H_ diff --git a/sync/test/fake_encryptor.cc b/sync/test/fake_encryptor.cc index 3d03050..bc7f22d 100644 --- a/sync/test/fake_encryptor.cc +++ b/sync/test/fake_encryptor.cc @@ -6,7 +6,7 @@ #include "base/base64.h" -namespace browser_sync { +namespace csync { FakeEncryptor::~FakeEncryptor() {} @@ -20,4 +20,4 @@ bool FakeEncryptor::DecryptString(const std::string& ciphertext, return base::Base64Decode(ciphertext, plaintext); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/test/fake_encryptor.h b/sync/test/fake_encryptor.h index 7e21061..8b83a43 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 4cf5042..2484448 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 browser_sync { +namespace csync { FakeExtensionsActivityMonitor::FakeExtensionsActivityMonitor() {} @@ -28,4 +28,4 @@ void FakeExtensionsActivityMonitor::PutRecords(const Records& records) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/test/fake_extensions_activity_monitor.h b/sync/test/fake_extensions_activity_monitor.h index 4152bf7..3ff0ce7 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #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 7902433..e400fad 100644 --- a/sync/test/null_transaction_observer.cc +++ b/sync/test/null_transaction_observer.cc @@ -8,8 +8,8 @@ namespace syncable { -browser_sync::WeakHandle<TransactionObserver> NullTransactionObserver() { - return browser_sync::MakeWeakHandle(base::WeakPtr<TransactionObserver>()); +csync::WeakHandle<TransactionObserver> NullTransactionObserver() { + return csync::MakeWeakHandle(base::WeakPtr<TransactionObserver>()); } } // namespace syncable diff --git a/sync/test/null_transaction_observer.h b/sync/test/null_transaction_observer.h index 6fa36e2..b84580e 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. -browser_sync::WeakHandle<TransactionObserver> NullTransactionObserver(); +csync::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 f2cdadd..17fc160 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 browser_sync { +namespace csync { namespace sessions { // Installs a SyncEventListener to a given session context for the lifetime of @@ -31,6 +31,6 @@ class TestScopedSessionEventListener { }; } // namespace sessions -} // namespace browser_sync +} // namespace csync #endif // SYNC_TEST_SESSIONS_TEST_SCOPED_SESSION_EVENT_LISTENER_H_ diff --git a/sync/util/cryptographer.cc b/sync/util/cryptographer.cc index e2ab5e2..d316149 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 browser_sync { +namespace csync { const char kNigoriTag[] = "google_chrome_nigori"; @@ -450,4 +450,4 @@ void Cryptographer::InstallKeyBag(const sync_pb::NigoriKeyBag& bag) { } } -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/cryptographer.h b/sync/util/cryptographer.h index b711f29..24dbf1b 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 browser_sync { +namespace csync { class Encryptor; @@ -248,6 +248,6 @@ class Cryptographer { DISALLOW_COPY_AND_ASSIGN(Cryptographer); }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_UTIL_CRYPTOGRAPHER_H_ diff --git a/sync/util/cryptographer_unittest.cc b/sync/util/cryptographer_unittest.cc index c999916..fbb97ff 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 browser_sync { +namespace csync { namespace { @@ -388,4 +388,4 @@ TEST_F(SyncCryptographerTest, UnknownSensitiveTypes) { cryptographer_.RemoveObserver(&observer); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/data_type_histogram_unittest.cc b/sync/util/data_type_histogram_unittest.cc index 676ebb7..9b5d0ea 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 browser_sync { +namespace csync { namespace { class DataTypeHistogramTest : public testing::Test { @@ -60,4 +60,4 @@ TEST(DataTypeHistogramTest, BasicEnum) { } } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/encryptor.h b/sync/util/encryptor.h index 1549caf..415d6b1 100644 --- a/sync/util/encryptor.h +++ b/sync/util/encryptor.h @@ -8,7 +8,7 @@ #include <string> -namespace browser_sync { +namespace csync { class Encryptor { public: @@ -23,6 +23,6 @@ class Encryptor { virtual ~Encryptor() {} }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_UTIL_ENCRYPTOR_H_ diff --git a/sync/util/extensions_activity_monitor.cc b/sync/util/extensions_activity_monitor.cc index 0414823..24d3b0f 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 browser_sync { +namespace csync { ExtensionsActivityMonitor::Record::Record() : bookmark_write_count(0U) {} @@ -13,4 +13,4 @@ ExtensionsActivityMonitor::Record::~Record() {} ExtensionsActivityMonitor::~ExtensionsActivityMonitor() {} -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/extensions_activity_monitor.h b/sync/util/extensions_activity_monitor.h index 9a5fdef..4533f17 100644 --- a/sync/util/extensions_activity_monitor.h +++ b/sync/util/extensions_activity_monitor.h @@ -11,7 +11,7 @@ #include "base/basictypes.h" -namespace browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #endif // SYNC_UTIL_EXTENSIONS_ACTIVITY_MONITOR_H_ diff --git a/sync/util/get_session_name.cc b/sync/util/get_session_name.cc index 5917191..cd26bba 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 browser_sync { +namespace csync { namespace { @@ -85,4 +85,4 @@ std::string GetSessionNameSynchronouslyForTesting() { return GetSessionNameSynchronously(); } -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/get_session_name.h b/sync/util/get_session_name.h index dc53295..ea84aee 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 browser_sync { +namespace csync { void GetSessionName( const scoped_refptr<base::TaskRunner>& task_runner, @@ -23,6 +23,6 @@ void GetSessionName( std::string GetSessionNameSynchronouslyForTesting(); -} // namespace browser_sync +} // namespace csync #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 771f48f..d262f8d 100644 --- a/sync/util/get_session_name_mac.h +++ b/sync/util/get_session_name_mac.h @@ -8,7 +8,7 @@ #include <string> -namespace browser_sync { +namespace csync { namespace internal { // Returns the Hardware model name, without trailing numbers, if @@ -18,6 +18,6 @@ namespace internal { std::string GetHardwareModelName(); } // namespace internal -} // namespace browser_sync +} // namespace csync #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 4b46139..73a77b9 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 browser_sync { +namespace csync { namespace internal { std::string GetHardwareModelName() { @@ -48,4 +48,4 @@ std::string GetHardwareModelName() { } } // namespace internal -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/get_session_name_unittest.cc b/sync/util/get_session_name_unittest.cc index b335cd0..03c9be4 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 browser_sync { +namespace csync { namespace { @@ -45,4 +45,4 @@ TEST_F(GetSessionNameTest, GetSessionName) { } // namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/get_session_name_win.cc b/sync/util/get_session_name_win.cc index 499930b..c79b7845 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 browser_sync { +namespace csync { namespace internal { std::string GetComputerName() { @@ -18,4 +18,4 @@ std::string GetComputerName() { } } // namespace internal -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/get_session_name_win.h b/sync/util/get_session_name_win.h index 1d6b1eb..590e679 100644 --- a/sync/util/get_session_name_win.h +++ b/sync/util/get_session_name_win.h @@ -8,12 +8,12 @@ #include <string> -namespace browser_sync { +namespace csync { namespace internal { std::string GetComputerName(); } // namespace internal -} // namespace browser_sync +} // namespace csync #endif // SYNC_UTIL_GET_SESSION_NAME_WIN_H_ diff --git a/sync/util/logging.cc b/sync/util/logging.cc index 3d2a269..9458379 100644 --- a/sync/util/logging.cc +++ b/sync/util/logging.cc @@ -6,7 +6,7 @@ #include "base/location.h" -namespace browser_sync { +namespace csync { 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 browser_sync +} // namespace csync diff --git a/sync/util/logging.h b/sync/util/logging.h index 45e901e44..97d215b 100644 --- a/sync/util/logging.h +++ b/sync/util/logging.h @@ -14,12 +14,12 @@ namespace tracked_objects { class Location; } // namespace tracked_objects -namespace browser_sync { +namespace csync { bool VlogIsOnForLocation(const tracked_objects::Location& from_here, int verbose_level); -} // namespace browser_sync +} // namespace csync #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) || \ - ::browser_sync::VlogIsOnForLocation(from_here, verbose_level))) \ + ::csync::VlogIsOnForLocation(from_here, verbose_level))) \ #endif // SYNC_UTIL_LOGGING_H_ diff --git a/sync/util/nigori.cc b/sync/util/nigori.cc index 0b96b37..f68956d 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 browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync diff --git a/sync/util/nigori.h b/sync/util/nigori.h index 2606a44..1901211 100644 --- a/sync/util/nigori.h +++ b/sync/util/nigori.h @@ -14,7 +14,7 @@ namespace crypto { class SymmetricKey; } // namespace crypto -namespace browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #endif // SYNC_UTIL_NIGORI_H_ diff --git a/sync/util/nigori_unittest.cc b/sync/util/nigori_unittest.cc index 41f8ceb..b014a81 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 browser_sync { +namespace csync { namespace { TEST(SyncNigoriTest, Permute) { @@ -167,4 +167,4 @@ TEST(SyncNigoriTest, MAYBE_ExportImport) { } } // anonymous namespace -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/session_utils_android.cc b/sync/util/session_utils_android.cc index 4eee6a3..a4f4400 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 browser_sync { +namespace csync { namespace internal { std::string GetAndroidId() { @@ -73,4 +73,4 @@ bool IsTabletUi() { } } // namespace internal -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/session_utils_android.h b/sync/util/session_utils_android.h index 6d09b7c..4da0ea9 100644 --- a/sync/util/session_utils_android.h +++ b/sync/util/session_utils_android.h @@ -8,7 +8,7 @@ #include <string> -namespace browser_sync { +namespace csync { namespace internal { // Return the unique identifier of this device. @@ -21,6 +21,6 @@ std::string GetModel(); bool IsTabletUi(); } // namespace internal -} // namespace browser_sync +} // namespace csync #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 f7df6d4..07367c3 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 browser_sync { +namespace csync { TestUnrecoverableErrorHandler::TestUnrecoverableErrorHandler() {} @@ -19,5 +19,5 @@ void TestUnrecoverableErrorHandler::OnUnrecoverableError( << from_here.function_name() << ": " << message; } -} // namespace browser_sync +} // namespace csync diff --git a/sync/util/test_unrecoverable_error_handler.h b/sync/util/test_unrecoverable_error_handler.h index d375bd9..758ba79 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 browser_sync { +namespace csync { // Implementation of UnrecoverableErrorHandler that simply adds a // gtest failure. @@ -22,7 +22,7 @@ class TestUnrecoverableErrorHandler : public UnrecoverableErrorHandler { const std::string& message) OVERRIDE; }; -} // namespace browser_sync +} // namespace csync #endif // SYNC_INTERNAL_API_INCLUDES_TEST_UNRECOVERABLE_ERROR_HANDLER_H_ diff --git a/sync/util/time.cc b/sync/util/time.cc index ea0f367..47e6af4 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 browser_sync { +namespace csync { 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 browser_sync +} // namespace csync diff --git a/sync/util/time.h b/sync/util/time.h index fc65efa..2c8a9cf 100644 --- a/sync/util/time.h +++ b/sync/util/time.h @@ -13,7 +13,7 @@ #include "base/basictypes.h" #include "base/time.h" -namespace browser_sync { +namespace csync { // 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 browser_sync +} // namespace csync #endif // SYNC_UTIL_TIME_H_ |