diff options
Diffstat (limited to 'sync/engine/model_type_entity.cc')
-rw-r--r-- | sync/engine/model_type_entity.cc | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/sync/engine/model_type_entity.cc b/sync/engine/model_type_entity.cc index 2f758a8..5acf5db 100644 --- a/sync/engine/model_type_entity.cc +++ b/sync/engine/model_type_entity.cc @@ -24,8 +24,7 @@ scoped_ptr<ModelTypeEntity> ModelTypeEntity::NewLocalItem( specifics, false, now, - now, - std::string())); + now)); } scoped_ptr<ModelTypeEntity> ModelTypeEntity::FromServerUpdate( @@ -36,8 +35,7 @@ scoped_ptr<ModelTypeEntity> ModelTypeEntity::FromServerUpdate( const sync_pb::EntitySpecifics& specifics, bool deleted, base::Time ctime, - base::Time mtime, - const std::string& encryption_key_name) { + base::Time mtime) { return scoped_ptr<ModelTypeEntity>(new ModelTypeEntity(0, 0, 0, @@ -49,8 +47,7 @@ scoped_ptr<ModelTypeEntity> ModelTypeEntity::FromServerUpdate( specifics, deleted, ctime, - mtime, - encryption_key_name)); + mtime)); } ModelTypeEntity::ModelTypeEntity(int64 sequence_number, @@ -64,8 +61,7 @@ ModelTypeEntity::ModelTypeEntity(int64 sequence_number, const sync_pb::EntitySpecifics& specifics, bool deleted, base::Time ctime, - base::Time mtime, - const std::string& encryption_key_name) + base::Time mtime) : sequence_number_(sequence_number), commit_requested_sequence_number_(commit_requested_sequence_number), acked_sequence_number_(acked_sequence_number), @@ -77,8 +73,7 @@ ModelTypeEntity::ModelTypeEntity(int64 sequence_number, specifics_(specifics), deleted_(deleted), ctime_(ctime), - mtime_(mtime), - encryption_key_name_(encryption_key_name) { + mtime_(mtime) { } ModelTypeEntity::~ModelTypeEntity() { @@ -108,8 +103,7 @@ void ModelTypeEntity::ApplyUpdateFromServer( int64 update_version, bool deleted, const sync_pb::EntitySpecifics& specifics, - base::Time mtime, - const std::string& encryption_key_name) { + base::Time mtime) { // There was a conflict and the server just won it. // This implicitly acks all outstanding commits because a received update // will clobber any pending commits on the sync thread. @@ -127,15 +121,6 @@ void ModelTypeEntity::MakeLocalChange( specifics_ = specifics; } -void ModelTypeEntity::UpdateDesiredEncryptionKey(const std::string& name) { - if (encryption_key_name_ == name) - return; - - // Schedule commit with the expectation that the worker will re-encrypt with - // the latest encryption key as it does. - sequence_number_++; -} - void ModelTypeEntity::Delete() { sequence_number_++; specifics_.Clear(); @@ -159,15 +144,12 @@ void ModelTypeEntity::SetCommitRequestInProgress() { commit_requested_sequence_number_ = sequence_number_; } -void ModelTypeEntity::ReceiveCommitResponse( - const std::string& id, - int64 sequence_number, - int64 response_version, - const std::string& encryption_key_name) { +void ModelTypeEntity::ReceiveCommitResponse(const std::string& id, + int64 sequence_number, + int64 response_version) { id_ = id; // The server can assign us a new ID in a commit response. acked_sequence_number_ = sequence_number; base_version_ = response_version; - encryption_key_name_ = encryption_key_name; } void ModelTypeEntity::ClearTransientSyncState() { |