blob: 13c2265003c901d487110535a3851856877e1f21 [file] [log] [blame]
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_IDENTITY_PUBLIC_CPP_DIAGNOSTICS_PROVIDER_IMPL_H_
#define SERVICES_IDENTITY_PUBLIC_CPP_DIAGNOSTICS_PROVIDER_IMPL_H_
#include "base/macros.h"
#include "services/identity/public/cpp/diagnostics_provider.h"
class GaiaCookieManagerService;
class ProfileOAuth2TokenService;
namespace identity {
// Concrete implementation of the DiagnosticsProvider interface.
class DiagnosticsProviderImpl final : public DiagnosticsProvider {
public:
DiagnosticsProviderImpl(
ProfileOAuth2TokenService* profile_oauth2_token_service,
GaiaCookieManagerService* gaia_cookie_manager_service);
~DiagnosticsProviderImpl() override;
// Returns the state of the load credentials operation.
OAuth2TokenServiceDelegate::LoadCredentialsState
GetDetailedStateOfLoadingOfRefreshTokens() const override;
// Returns the time until a access token request can be sent (will be zero if
// the release time is in the past).
base::TimeDelta GetDelayBeforeMakingAccessTokenRequests() const override;
// Returns the time until a cookie request can be sent (will be zero if the
// release time is in the past).
base::TimeDelta GetDelayBeforeMakingCookieRequests() const override;
private:
GaiaCookieManagerService* gaia_cookie_manager_service_;
ProfileOAuth2TokenService* profile_oauth2_token_service_;
DISALLOW_COPY_AND_ASSIGN(DiagnosticsProviderImpl);
};
} // namespace identity
#endif // SERVICES_IDENTITY_PUBLIC_CPP_DIAGNOSTICS_PROVIDER_IMPL_H_