This source file includes following definitions.
- type_
- LoadModels
- StartAssociating
- Stop
- type
- model_safe_group
- name
- state
- OnSingleDatatypeUnrecoverableError
- OnModelLoaded
#include "components/sync_driver/proxy_data_type_controller.h"
namespace browser_sync {
ProxyDataTypeController::ProxyDataTypeController(
scoped_refptr<base::MessageLoopProxy> ui_thread,
syncer::ModelType type)
: DataTypeController(ui_thread, base::Closure()),
state_(NOT_RUNNING),
type_(type) {
DCHECK(syncer::ProxyTypes().Has(type_));
}
ProxyDataTypeController::~ProxyDataTypeController() {
}
void ProxyDataTypeController::LoadModels(
const ModelLoadCallback& model_load_callback) {
state_ = MODEL_LOADED;
model_load_callback.Run(type(), syncer::SyncError());
}
void ProxyDataTypeController::StartAssociating(
const StartCallback& start_callback) {
syncer::SyncMergeResult local_merge_result(type_);
syncer::SyncMergeResult syncer_merge_result(type_);
state_ = RUNNING;
start_callback.Run(DataTypeController::OK,
local_merge_result,
syncer_merge_result);
}
void ProxyDataTypeController::Stop() {
state_ = NOT_RUNNING;
}
syncer::ModelType ProxyDataTypeController::type() const {
DCHECK(syncer::ProxyTypes().Has(type_));
return type_;
}
syncer::ModelSafeGroup ProxyDataTypeController::model_safe_group() const {
DCHECK(syncer::ProxyTypes().Has(type_));
return syncer::GROUP_PASSIVE;
}
std::string ProxyDataTypeController::name() const {
return syncer::ModelTypeToString(type());
}
DataTypeController::State ProxyDataTypeController::state() const {
return state_;
}
void ProxyDataTypeController::OnSingleDatatypeUnrecoverableError(
const tracked_objects::Location& from_here, const std::string& message) {
NOTIMPLEMENTED();
}
void ProxyDataTypeController::OnModelLoaded() {
NOTIMPLEMENTED();
}
}