chromium/components/sync/engine/syncer_proto_util.h

// Copyright 2012 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_ENGINE_SYNCER_PROTO_UTIL_H_
#define COMPONENTS_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_

#include <string>

#include "base/gtest_prod_util.h"
#include "base/time/time.h"
#include "components/sync/base/data_type.h"
#include "components/sync/engine/cycle/sync_cycle.h"
#include "components/sync/engine/syncer_error.h"

namespace sync_pb {
class ClientToServerMessage;
class ClientToServerResponse;
class ClientToServerResponse_Error;
class SyncEntity;
}  // namespace sync_pb

namespace syncer {

class ServerConnectionManager;
struct SyncProtocolError;

// Returns the types to migrate from the data in |response|.
DataTypeSet GetTypesToMigrate(const sync_pb::ClientToServerResponse& response);

// Builds a SyncProtocolError from the data in |error|.
SyncProtocolError ConvertErrorPBToSyncProtocolError(
    const sync_pb::ClientToServerResponse_Error& error);

class SyncerProtoUtil {};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_ENGINE_SYNCER_PROTO_UTIL_H_