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/syncable | |
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/syncable')
-rw-r--r-- | sync/syncable/directory.cc | 18 | ||||
-rw-r--r-- | sync/syncable/directory.h | 28 | ||||
-rw-r--r-- | sync/syncable/directory_backing_store.cc | 6 | ||||
-rw-r--r-- | sync/syncable/directory_backing_store_unittest.cc | 6 | ||||
-rw-r--r-- | sync/syncable/entry.cc | 2 | ||||
-rw-r--r-- | sync/syncable/entry_kernel.cc | 4 | ||||
-rw-r--r-- | sync/syncable/entry_kernel.h | 6 | ||||
-rw-r--r-- | sync/syncable/model_type.cc | 4 | ||||
-rw-r--r-- | sync/syncable/syncable_id_unittest.cc | 2 | ||||
-rw-r--r-- | sync/syncable/syncable_mock.cc | 2 | ||||
-rw-r--r-- | sync/syncable/syncable_mock.h | 4 | ||||
-rw-r--r-- | sync/syncable/syncable_unittest.cc | 12 | ||||
-rw-r--r-- | sync/syncable/write_transaction_info.h | 2 |
13 files changed, 48 insertions, 48 deletions
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 |