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

Unified Diff: chrome/browser/sync/notifier/registration_manager.cc

Issue 8772074: [Sync] Convert syncable/ directory to ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo 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/notifier/registration_manager.cc
diff --git a/chrome/browser/sync/notifier/registration_manager.cc b/chrome/browser/sync/notifier/registration_manager.cc
index 2ab8b6274cfedb1ad896e189df23f20b6f936e2e..d510012bcf3aeac32afcda72d2616c9ead28e3c6 100644
--- a/chrome/browser/sync/notifier/registration_manager.cc
+++ b/chrome/browser/sync/notifier/registration_manager.cc
@@ -70,13 +70,13 @@ RegistrationManager::~RegistrationManager() {
}
void RegistrationManager::SetRegisteredTypes(
- const syncable::ModelTypeSet& types) {
+ syncable::ModelEnumSet types) {
DCHECK(non_thread_safe_.CalledOnValidThread());
for (int i = syncable::FIRST_REAL_MODEL_TYPE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
syncable::ModelType model_type = syncable::ModelTypeFromInt(i);
- if (types.count(model_type) > 0) {
+ if (types.Has(model_type)) {
if (!IsTypeRegistered(model_type)) {
TryRegisterType(model_type, false /* is_retry */);
}
@@ -118,14 +118,14 @@ void RegistrationManager::DisableType(syncable::ModelType model_type) {
status->Disable();
}
-syncable::ModelTypeSet RegistrationManager::GetRegisteredTypes() const {
+syncable::ModelEnumSet RegistrationManager::GetRegisteredTypes() const {
DCHECK(non_thread_safe_.CalledOnValidThread());
- syncable::ModelTypeSet registered_types;
+ syncable::ModelEnumSet registered_types;
for (int i = syncable::FIRST_REAL_MODEL_TYPE;
i < syncable::MODEL_TYPE_COUNT; ++i) {
syncable::ModelType model_type = syncable::ModelTypeFromInt(i);
if (IsTypeRegistered(model_type)) {
- registered_types.insert(model_type);
+ registered_types.Put(model_type);
}
}
return registered_types;
« no previous file with comments | « chrome/browser/sync/notifier/registration_manager.h ('k') | chrome/browser/sync/notifier/registration_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698