chromium/components/sync/service/get_types_with_unsynced_data_request_barrier.h

// Copyright 2024 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_SERVICE_GET_TYPES_WITH_UNSYNCED_DATA_REQUEST_BARRIER_H_
#define COMPONENTS_SYNC_SERVICE_GET_TYPES_WITH_UNSYNCED_DATA_REQUEST_BARRIER_H_

#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "base/sequence_checker.h"
#include "components/sync/base/data_type.h"

namespace syncer {

// A helper class for SyncServiceImpl's implementation of
// GetTypesWithUnsyncedData. It accumulates the responses from each type's
// DataTypeController, and runs the supplied callback once they're all done.
class GetTypesWithUnsyncedDataRequestBarrier
    : public base::RefCounted<GetTypesWithUnsyncedDataRequestBarrier> {};

}  // namespace syncer

#endif  // COMPONENTS_SYNC_SERVICE_GET_TYPES_WITH_UNSYNCED_DATA_REQUEST_BARRIER_H_