chromium/chrome/browser/sync_file_system/drive_backend/callback_helper.h

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

#ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_
#define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_

#include <functional>
#include <memory>
#include <type_traits>

#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"

// TODO(tzik): Merge this file to base/task/bind_post_task.h.

namespace sync_file_system {
namespace drive_backend {

namespace internal {

template <typename Signature, typename... Args>
base::OnceClosure MakeClosure(base::RepeatingCallback<Signature>* callback,
                              Args&&... args) {}

template <typename Signature, typename... Args>
base::OnceClosure MakeClosure(base::OnceCallback<Signature>* callback,
                              Args&&... args) {}

template <typename CallbackType>
class CallbackHolder {};

}  // namespace internal

template <typename... Args>
base::OnceCallback<void(Args...)> RelayCallbackToTaskRunner(
    const scoped_refptr<base::SequencedTaskRunner>& task_runner,
    const base::Location& from_here,
    base::OnceCallback<void(Args...)> callback) {}

template <typename... Args>
base::RepeatingCallback<void(Args...)> RelayCallbackToTaskRunner(
    const scoped_refptr<base::SequencedTaskRunner>& task_runner,
    const base::Location& from_here,
    base::RepeatingCallback<void(Args...)> callback) {}

template <typename CallbackType>
CallbackType RelayCallbackToCurrentThread(const base::Location& from_here,
                                          CallbackType callback) {}

}  // namespace drive_backend
}  // namespace sync_file_system

#endif  // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_CALLBACK_HELPER_H_