chromium/components/optimization_guide/core/access_token_helper.cc

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

#include "components/optimization_guide/core/access_token_helper.h"

#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/metrics/histogram_functions.h"
#include "components/optimization_guide/core/optimization_guide_enums.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/primary_account_access_token_fetcher.h"
#include "google_apis/gaia/gaia_constants.h"
#include "google_apis/gaia/google_service_auth_error.h"

namespace optimization_guide {

namespace {

constexpr char kOptGuideOAuthConsumerName[] =;

void RecordAccessTokenResultHistogram(
    OptimizationGuideAccessTokenResult result) {}

// Invoked when access token is ready.
void OnAccessTokenRequestCompleted(
    std::unique_ptr<signin::PrimaryAccountAccessTokenFetcher>,
    AccessTokenReceivedCallback callback,
    GoogleServiceAuthError error,
    signin::AccessTokenInfo access_token_info) {}

}  // namespace

void RequestAccessToken(signin::IdentityManager* identity_manager,
                        const std::set<std::string>& oauth_scopes,
                        AccessTokenReceivedCallback callback) {}

}  // namespace optimization_guide