| Index: sync/syncable/nigori_util.cc
|
| diff --git a/sync/syncable/nigori_util.cc b/sync/syncable/nigori_util.cc
|
| index 0228a48ab0bf40cea9f1d0f40453d571ed9bd415..00ddf958b36eca7d3c185f7952dcb73057e02bd5 100644
|
| --- a/sync/syncable/nigori_util.cc
|
| +++ b/sync/syncable/nigori_util.cc
|
| @@ -69,7 +69,7 @@ bool EntryNeedsEncryption(ModelTypeSet encrypted_types,
|
| const Entry& entry) {
|
| if (!entry.Get(UNIQUE_SERVER_TAG).empty())
|
| return false; // We don't encrypt unique server nodes.
|
| - syncable::ModelType type = entry.GetModelType();
|
| + syncer::ModelType type = entry.GetModelType();
|
| if (type == PASSWORDS || type == NIGORI)
|
| return false;
|
| // Checking NON_UNIQUE_NAME is not necessary for the correctness of encrypting
|
| @@ -160,10 +160,10 @@ bool UpdateEntryWithEncryption(
|
| syncer::Cryptographer* cryptographer,
|
| const sync_pb::EntitySpecifics& new_specifics,
|
| syncable::MutableEntry* entry) {
|
| - syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics);
|
| - DCHECK_GE(type, syncable::FIRST_REAL_MODEL_TYPE);
|
| + syncer::ModelType type = syncer::GetModelTypeFromSpecifics(new_specifics);
|
| + DCHECK_GE(type, syncer::FIRST_REAL_MODEL_TYPE);
|
| const sync_pb::EntitySpecifics& old_specifics = entry->Get(SPECIFICS);
|
| - const syncable::ModelTypeSet encrypted_types =
|
| + const syncer::ModelTypeSet encrypted_types =
|
| cryptographer->GetEncryptedTypes();
|
| // It's possible the nigori lost the set of encrypted types. If the current
|
| // specifics are already encrypted, we want to ensure we continue encrypting.
|
| @@ -187,7 +187,7 @@ bool UpdateEntryWithEncryption(
|
| base::JSONWriter::OPTIONS_PRETTY_PRINT,
|
| &info);
|
| DVLOG(2) << "Encrypting specifics of type "
|
| - << syncable::ModelTypeToString(type)
|
| + << syncer::ModelTypeToString(type)
|
| << " with content: "
|
| << info;
|
| }
|
| @@ -195,18 +195,18 @@ bool UpdateEntryWithEncryption(
|
| // encrypted. The first time we encrypt a node we start from scratch, hence
|
| // removing all the unencrypted data, but from then on we only want to
|
| // update the node if the data changes or the encryption key changes.
|
| - if (syncable::GetModelTypeFromSpecifics(old_specifics) == type &&
|
| + if (syncer::GetModelTypeFromSpecifics(old_specifics) == type &&
|
| was_encrypted) {
|
| generated_specifics.CopyFrom(old_specifics);
|
| } else {
|
| - syncable::AddDefaultFieldValue(type, &generated_specifics);
|
| + syncer::AddDefaultFieldValue(type, &generated_specifics);
|
| }
|
| // Does not change anything if underlying encrypted blob was already up
|
| // to date and encrypted with the default key.
|
| if (!cryptographer->Encrypt(new_specifics,
|
| generated_specifics.mutable_encrypted())) {
|
| NOTREACHED() << "Could not encrypt data for node of type "
|
| - << syncable::ModelTypeToString(type);
|
| + << syncer::ModelTypeToString(type);
|
| return false;
|
| }
|
| }
|
| @@ -221,7 +221,7 @@ bool UpdateEntryWithEncryption(
|
| if (!encrypted_without_overwriting_name &&
|
| old_specifics.SerializeAsString() ==
|
| generated_specifics.SerializeAsString()) {
|
| - DVLOG(2) << "Specifics of type " << syncable::ModelTypeToString(type)
|
| + DVLOG(2) << "Specifics of type " << syncer::ModelTypeToString(type)
|
| << " already match, dropping change.";
|
| return true;
|
| }
|
| @@ -231,7 +231,7 @@ bool UpdateEntryWithEncryption(
|
| entry->Put(syncable::NON_UNIQUE_NAME, kEncryptedString);
|
| // For bookmarks we actually put bogus data into the unencrypted specifics,
|
| // else the server will try to do it for us.
|
| - if (type == syncable::BOOKMARKS) {
|
| + if (type == syncer::BOOKMARKS) {
|
| sync_pb::BookmarkSpecifics* bookmark_specifics =
|
| generated_specifics.mutable_bookmark();
|
| if (!entry->Get(syncable::IS_DIR))
|
| @@ -241,7 +241,7 @@ bool UpdateEntryWithEncryption(
|
| }
|
| entry->Put(syncable::SPECIFICS, generated_specifics);
|
| DVLOG(1) << "Overwriting specifics of type "
|
| - << syncable::ModelTypeToString(type)
|
| + << syncer::ModelTypeToString(type)
|
| << " and marking for syncing.";
|
| syncable::MarkForSyncing(entry);
|
| return true;
|
|
|