#include "components/supervised_user/core/browser/api_access_token_fetcher.h"
#include <memory>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/types/expected.h"
#include "components/signin/public/identity_manager/access_token_fetcher.h"
#include "components/signin/public/identity_manager/access_token_info.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/primary_account_access_token_fetcher.h"
#include "components/supervised_user/core/browser/fetcher_config.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "google_apis/gaia/oauth2_access_token_manager.h"
namespace supervised_user {
namespace {
base::expected<signin::AccessTokenInfo, GoogleServiceAuthError>
ToSingleReturnValue(GoogleServiceAuthError error,
signin::AccessTokenInfo access_token_info) { … }
}
ApiAccessTokenFetcher::ApiAccessTokenFetcher(
signin::IdentityManager& identity_manager,
const AccessTokenConfig& access_token_config,
Consumer consumer)
: … { … }
ApiAccessTokenFetcher::~ApiAccessTokenFetcher() = default;
void ApiAccessTokenFetcher::OnAccessTokenFetchComplete(
GoogleServiceAuthError error,
signin::AccessTokenInfo access_token_info) { … }
}