#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"
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 { … };
}
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) { … }
}
}
#endif