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

Unified Diff: chrome/browser/sync/syncable/model_type.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
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/sync/syncable/model_type_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/model_type.cc
diff --git a/chrome/browser/sync/syncable/model_type.cc b/chrome/browser/sync/syncable/model_type.cc
index b7e147c075b963f2d624663764fdc1d180931338..4bbadbf1d89dea9b037e941207dd965f228a18e7 100644
--- a/chrome/browser/sync/syncable/model_type.cc
+++ b/chrome/browser/sync/syncable/model_type.cc
@@ -287,17 +287,6 @@ StringValue* ModelTypeToValue(ModelType model_type) {
return Value::CreateStringValue("");
}
-std::string ModelTypeSetToString(const ModelTypeSet& model_types) {
- std::string result;
- for (ModelTypeSet::const_iterator iter = model_types.begin();
- iter != model_types.end();) {
- result += ModelTypeToString(*iter);
- if (++iter != model_types.end())
- result += ", ";
- }
- return result;
-}
-
ModelType ModelTypeFromValue(const Value& value) {
if (value.IsType(Value::TYPE_STRING)) {
std::string result;
@@ -361,23 +350,6 @@ std::string ModelEnumSetToString(ModelEnumSet model_types) {
return result;
}
-ModelTypeSet ModelEnumSetToSet(ModelEnumSet enum_set) {
- ModelTypeSet model_type_set;
- for (ModelEnumSet::Iterator it = enum_set.First(); it.Good(); it.Inc()) {
- model_type_set.insert(it.Get());
- }
- return model_type_set;
-}
-
-ModelEnumSet ModelTypeSetToEnumSet(const ModelTypeSet& model_type_set) {
- ModelEnumSet enum_set;
- for (ModelTypeSet::const_iterator it = model_type_set.begin();
- it != model_type_set.end(); ++it) {
- enum_set.Put(*it);
- }
- return enum_set;
-}
-
base::ListValue* ModelEnumSetToValue(ModelEnumSet model_types) {
ListValue* value = new ListValue();
for (ModelEnumSet::Iterator it = model_types.First(); it.Good(); it.Inc()) {
@@ -387,23 +359,6 @@ base::ListValue* ModelEnumSetToValue(ModelEnumSet model_types) {
return value;
}
-ListValue* ModelTypeSetToValue(const ModelTypeSet& model_types) {
- ListValue* value = new ListValue();
- for (ModelTypeSet::const_iterator i = model_types.begin();
- i != model_types.end(); ++i) {
- value->Append(Value::CreateStringValue(ModelTypeToString(*i)));
- }
- return value;
-}
-
-ModelTypeSet ModelTypeSetFromValue(const base::ListValue& value) {
- ModelTypeSet result;
- for (ListValue::const_iterator i = value.begin(); i != value.end(); ++i) {
- result.insert(ModelTypeFromValue(**i));
- }
- return result;
-}
-
ModelEnumSet ModelEnumSetFromValue(const base::ListValue& value) {
ModelEnumSet result;
for (ListValue::const_iterator i = value.begin(); i != value.end(); ++i) {
@@ -656,14 +611,6 @@ bool NotificationTypeToRealModelType(const std::string& notification_type,
}
}
-ModelTypeSet GetAllRealModelTypes() {
- ModelTypeSet all_types;
- for (int i = FIRST_REAL_MODEL_TYPE; i < MODEL_TYPE_COUNT; ++i) {
- all_types.insert(ModelTypeFromInt(i));
- }
- return all_types;
-}
-
bool IsRealDataType(ModelType model_type) {
return model_type >= FIRST_REAL_MODEL_TYPE && model_type < MODEL_TYPE_COUNT;
}
« no previous file with comments | « chrome/browser/sync/syncable/model_type.h ('k') | chrome/browser/sync/syncable/model_type_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698