#include "chrome/browser/device_identity/device_oauth2_token_store_desktop.h"
#include <string>
#include "base/base64.h"
#include "base/functional/bind.h"
#include "chrome/common/pref_names.h"
#include "components/os_crypt/sync/os_crypt.h"
#include "components/policy/core/common/policy_pref_names.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
const char kCBCMServiceAccountRefreshToken[] = …;
const char kCBCMServiceAccountEmail[] = …;
DeviceOAuth2TokenStoreDesktop::DeviceOAuth2TokenStoreDesktop(
PrefService* local_state)
: … { … }
DeviceOAuth2TokenStoreDesktop::~DeviceOAuth2TokenStoreDesktop() = default;
void DeviceOAuth2TokenStoreDesktop::RegisterPrefs(
PrefRegistrySimple* registry) { … }
void DeviceOAuth2TokenStoreDesktop::Init(InitCallback callback) { … }
CoreAccountId DeviceOAuth2TokenStoreDesktop::GetAccountId() const { … }
std::string DeviceOAuth2TokenStoreDesktop::GetRefreshToken() const { … }
void DeviceOAuth2TokenStoreDesktop::SetAndSaveRefreshToken(
const std::string& refresh_token,
StatusCallback result_callback) { … }
void DeviceOAuth2TokenStoreDesktop::PrepareTrustedAccountId(
TrustedAccountIdCallback callback) { … }
void DeviceOAuth2TokenStoreDesktop::SetAccountEmail(
const std::string& account_email) { … }
void DeviceOAuth2TokenStoreDesktop::OnServiceAccountIdentityChanged() { … }
void DeviceOAuth2TokenStoreDesktop::DecryptToken() const { … }