This source file includes following definitions.
- weak_ptr_factory_
- ConnectSyncTypeToCore
- AsWeakPtr
#include "sync/internal_api/sync_core.h"
#include "sync/engine/non_blocking_type_processor_core.h"
#include "sync/sessions/model_type_registry.h"
namespace syncer {
SyncCore::SyncCore(ModelTypeRegistry* model_type_registry)
: model_type_registry_(model_type_registry), weak_ptr_factory_(this) {}
SyncCore::~SyncCore() {}
void SyncCore::ConnectSyncTypeToCore(
ModelType type,
scoped_refptr<base::SequencedTaskRunner> task_runner,
base::WeakPtr<NonBlockingTypeProcessor> processor) {
model_type_registry_->InitializeNonBlockingType(type, task_runner, processor);
}
base::WeakPtr<SyncCore> SyncCore::AsWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
}