| 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 23cb8642e3d6ab264d1e91212938b641d3572a16..8d4227d6d72c40c8a24ec45330d5ed946c309c9d 100644
|
| --- a/chrome/browser/sync/syncable/model_type.cc
|
| +++ b/chrome/browser/sync/syncable/model_type.cc
|
| @@ -314,30 +314,6 @@ std::string ModelTypeBitSetToString(const ModelTypeBitSet& model_types) {
|
| return result;
|
| }
|
|
|
| -bool ModelTypeBitSetFromString(
|
| - const std::string& model_type_bitset_string,
|
| - ModelTypeBitSet* model_types) {
|
| - DCHECK(model_types);
|
| - ModelTypeBitSet bitset;
|
| - if (!model_type_bitset_string.empty()) {
|
| - std::vector<std::string> types;
|
| - // Parse the comma-delimited list of types.
|
| - base::SplitString(model_type_bitset_string, ',', &types);
|
| -
|
| - // Walk the list of types and set them in our ModelTypeBitSet.
|
| - for (std::vector<std::string>::const_iterator it = types.begin();
|
| - it != types.end();
|
| - ++it) {
|
| - ModelType type = ModelTypeFromString(*it);
|
| - if (type == UNSPECIFIED)
|
| - return false;
|
| - bitset.set(type);
|
| - }
|
| - }
|
| - *model_types = bitset;
|
| - return true;
|
| -}
|
| -
|
| ModelTypeBitSet ModelTypeBitSetFromSet(const ModelTypeSet& set) {
|
| ModelTypeBitSet bitset;
|
| for (ModelTypeSet::const_iterator iter = set.begin(); iter != set.end();
|
| @@ -375,6 +351,14 @@ ListValue* ModelTypeSetToValue(const ModelTypeSet& model_types) {
|
| 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;
|
| +}
|
| +
|
| // TODO(zea): remove all hardcoded tags in model associators and have them use
|
| // this instead.
|
| std::string ModelTypeToRootTag(ModelType type) {
|
|
|