This source file includes following definitions.
- GetDataTypesInState
- SetDataTypesState
#include "components/sync_driver/backend_data_type_configurer.h"
namespace browser_sync {
syncer::ModelTypeSet
BackendDataTypeConfigurer::GetDataTypesInState(
DataTypeConfigState state, const DataTypeConfigStateMap& state_map) {
syncer::ModelTypeSet types;
for (DataTypeConfigStateMap::const_iterator type_it = state_map.begin();
type_it != state_map.end(); ++type_it) {
if (type_it->second == state)
types.Put(type_it->first);
}
return types;
}
void BackendDataTypeConfigurer::SetDataTypesState(
DataTypeConfigState state, syncer::ModelTypeSet types,
DataTypeConfigStateMap* state_map) {
for (syncer::ModelTypeSet::Iterator it = types.First(); it.Good(); it.Inc()) {
(*state_map)[it.Get()] = state;
}
}
}