chromium/remoting/base/oauth_token_getter_proxy.h

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

#ifndef REMOTING_BASE_OAUTH_TOKEN_GETTER_PROXY_H_
#define REMOTING_BASE_OAUTH_TOKEN_GETTER_PROXY_H_

#include "base/functional/callback.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "remoting/base/oauth_token_getter.h"

namespace base {
class SequencedTaskRunner;
}  // namespace base

namespace remoting {

// Takes an instance of |OAuthTokenGetter| and runs (and deletes) it on the
// |task_runner| sequence. The proxy will silently drop requests once
// |token_getter| is deleted. This class is useful when a class needs to take a
// unique_ptr to OAuthTokenGetter but you still want to share the underlying
// token getter instance. Methods can be called from any sequence.
class OAuthTokenGetterProxy : public OAuthTokenGetter {};

}  // namespace remoting

#endif  // REMOTING_BASE_OAUTH_TOKEN_GETTER_PROXY_H_