Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1375)

Unified Diff: sync/engine/model_type_entity.cc

Issue 442623002: Revert of sync: Add non-blocking type encryption support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/model_type_entity.h ('k') | sync/engine/model_type_entity_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/model_type_entity.cc
diff --git a/sync/engine/model_type_entity.cc b/sync/engine/model_type_entity.cc
index 2f758a8e4d64379499635daedc8eaa1e3bac5ae1..5acf5db48138795c81a57bd050d58ae2dd13c58c 100644
--- a/sync/engine/model_type_entity.cc
+++ b/sync/engine/model_type_entity.cc
@@ -24,8 +24,7 @@
specifics,
false,
now,
- now,
- std::string()));
+ now));
}
scoped_ptr<ModelTypeEntity> ModelTypeEntity::FromServerUpdate(
@@ -36,8 +35,7 @@
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 @@
specifics,
deleted,
ctime,
- mtime,
- encryption_key_name));
+ mtime));
}
ModelTypeEntity::ModelTypeEntity(int64 sequence_number,
@@ -64,8 +61,7 @@
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 @@
specifics_(specifics),
deleted_(deleted),
ctime_(ctime),
- mtime_(mtime),
- encryption_key_name_(encryption_key_name) {
+ mtime_(mtime) {
}
ModelTypeEntity::~ModelTypeEntity() {
@@ -108,8 +103,7 @@
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.
@@ -125,15 +119,6 @@
const sync_pb::EntitySpecifics& specifics) {
sequence_number_++;
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() {
@@ -159,15 +144,12 @@
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() {
« no previous file with comments | « sync/engine/model_type_entity.h ('k') | sync/engine/model_type_entity_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698