chromium/components/sync/model/data_type_sync_bridge.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_SYNC_MODEL_DATA_TYPE_SYNC_BRIDGE_H_
#define COMPONENTS_SYNC_MODEL_DATA_TYPE_SYNC_BRIDGE_H_

#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "base/functional/callback.h"
#include "components/sync/engine/commit_and_get_updates_types.h"
#include "components/sync/model/data_type_local_change_processor.h"
#include "components/sync/model/entity_change.h"

namespace sync_pb {
class EntitySpecifics;
class UniquePosition;
}  // namespace sync_pb

namespace syncer {

enum class ConflictResolution;
class DataBatch;
struct DataTypeActivationRequest;
struct EntityData;
class MetadataChangeList;
class ModelError;

// Interface implemented by data types to receive updates from sync via a
// DataTypeLocalChangeProcessor. Provides a way for sync to update the data and
// metadata for entities, as well as the data type state. Sync bridge
// implementations must provide their change_processor() with metadata through
// ModelReadyToSync() as soon as possible. Once this is called, sync will
// immediately begin locally tracking changes and can start syncing with the
// server soon afterward. If an error occurs during startup, the processor's
// ReportError() method should be called instead of ModelReadyToSync().
// Lives on the model sequence.
class DataTypeSyncBridge {};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_MODEL_DATA_TYPE_SYNC_BRIDGE_H_