#include "components/sync/engine/commit_contribution_impl.h"
#include <memory>
#include <string>
#include <utility>
#include "base/feature_list.h"
#include "base/logging.h"
#include "base/uuid.h"
#include "components/sync/base/data_type_histogram.h"
#include "components/sync/base/passphrase_enums.h"
#include "components/sync/base/time.h"
#include "components/sync/base/unique_position.h"
#include "components/sync/engine/commit_and_get_updates_types.h"
#include "components/sync/engine/cycle/entity_change_metric_recording.h"
#include "components/sync/engine/sync_protocol_error.h"
#include "components/sync/protocol/entity_specifics.pb.h"
#include "components/sync/protocol/proto_value_conversions.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/protocol/sync_entity.pb.h"
namespace syncer {
namespace {
BASE_FEATURE(…);
CommitResponseData BuildCommitResponseData(
const CommitRequestData& commit_request,
const sync_pb::CommitResponse_EntryResponse& entry_response) { … }
FailedCommitResponseData BuildFailedCommitResponseData(
const CommitRequestData& commit_request,
const sync_pb::CommitResponse_EntryResponse& entry_response) { … }
}
CommitContributionImpl::CommitContributionImpl(
DataType type,
const sync_pb::DataTypeContext& context,
CommitRequestDataList commit_requests,
base::OnceCallback<void(const CommitResponseDataList&,
const FailedCommitResponseDataList&)>
on_commit_response_callback,
base::OnceCallback<void(SyncCommitError)> on_full_commit_failure_callback,
PassphraseType passphrase_type)
: … { … }
CommitContributionImpl::~CommitContributionImpl() = default;
void CommitContributionImpl::AddToCommitMessage(
sync_pb::ClientToServerMessage* msg) { … }
SyncerError CommitContributionImpl::ProcessCommitResponse(
const sync_pb::ClientToServerResponse& response,
StatusController* status) { … }
void CommitContributionImpl::ProcessCommitFailure(
SyncCommitError commit_error) { … }
size_t CommitContributionImpl::GetNumEntries() const { … }
void CommitContributionImpl::PopulateCommitProto(
DataType type,
const CommitRequestData& commit_entity,
sync_pb::SyncEntity* commit_proto) { … }
void CommitContributionImpl::AdjustCommitProto(
sync_pb::SyncEntity* commit_proto) { … }
}