This source file includes following definitions.
- requested_types
- needs_crypto
- ConfigureStatusToString
#include "components/sync_driver/data_type_manager.h"
namespace browser_sync {
DataTypeManager::ConfigureResult::ConfigureResult()
: status(UNKNOWN) {
}
DataTypeManager::ConfigureResult::ConfigureResult(ConfigureStatus status,
syncer::ModelTypeSet
requested_types)
: status(status),
requested_types(requested_types) {
DCHECK_EQ(OK, status);
}
DataTypeManager::ConfigureResult::ConfigureResult(
ConfigureStatus status,
syncer::ModelTypeSet requested_types,
std::map<syncer::ModelType, syncer::SyncError> failed_data_types,
syncer::ModelTypeSet unfinished_data_types,
syncer::ModelTypeSet needs_crypto)
: status(status),
requested_types(requested_types),
failed_data_types(failed_data_types),
unfinished_data_types(unfinished_data_types),
needs_crypto(needs_crypto) {
if (!failed_data_types.empty() || !needs_crypto.Empty()) {
DCHECK_NE(OK, status);
}
}
DataTypeManager::ConfigureResult::~ConfigureResult() {
}
std::string DataTypeManager::ConfigureStatusToString(ConfigureStatus status) {
switch (status) {
case OK:
return "Ok";
case ABORTED:
return "Aborted";
case UNRECOVERABLE_ERROR:
return "Unrecoverable Error";
case PARTIAL_SUCCESS:
return "Partial Success";
default:
NOTREACHED();
return std::string();
}
}
}