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

Unified Diff: chrome/browser/sync/internal_api/write_node.cc

Issue 8851006: [Sync] Replace all instances of ModelTypeSet with ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup pass #2 Created 9 years 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
Index: chrome/browser/sync/internal_api/write_node.cc
diff --git a/chrome/browser/sync/internal_api/write_node.cc b/chrome/browser/sync/internal_api/write_node.cc
index b088dc1a28d84fbecd2c51548eae62331b45c5d8..c693eaca98dbda770a763237d391a0d60411249b 100644
--- a/chrome/browser/sync/internal_api/write_node.cc
+++ b/chrome/browser/sync/internal_api/write_node.cc
@@ -38,7 +38,8 @@ bool WriteNode::UpdateEntryWithEncryption(
syncable::MutableEntry* entry) {
syncable::ModelType type = syncable::GetModelTypeFromSpecifics(new_specifics);
DCHECK_GE(type, syncable::FIRST_REAL_MODEL_TYPE);
- syncable::ModelTypeSet encrypted_types = cryptographer->GetEncryptedTypes();
+ const syncable::ModelEnumSet encrypted_types =
+ cryptographer->GetEncryptedTypes();
sync_pb::EntitySpecifics generated_specifics;
if (!SpecificsNeedsEncryption(encrypted_types, new_specifics) ||
!cryptographer->is_initialized()) {
@@ -119,7 +120,7 @@ void WriteNode::SetTitle(const std::wstring& title) {
// Only set NON_UNIQUE_NAME to the title if we're not encrypted.
Cryptographer* cryptographer = GetTransaction()->GetCryptographer();
- if (cryptographer->GetEncryptedTypes().count(GetModelType()) > 0) {
+ if (cryptographer->GetEncryptedTypes().Has(GetModelType())) {
if (old_name != kEncryptedString)
entry_->Put(syncable::NON_UNIQUE_NAME, kEncryptedString);
} else {
« no previous file with comments | « chrome/browser/sync/internal_api/syncapi_unittest.cc ('k') | chrome/browser/sync/js/js_sync_manager_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698