#include "chrome/browser/policy/cloud/fm_registration_token_uploader.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/notreached.h"
#include "base/scoped_observation.h"
#include "components/policy/core/common/cloud/policy_invalidation_scope.h"
#include "components/policy/core/common/cloud/signing_service.h"
#include "components/policy/core/common/policy_logger.h"
#include "components/policy/proto/device_management_backend.pb.h"
em;
namespace policy {
namespace {
static constexpr net::BackoffEntry::Policy kUploadRetryBackoffPolicy = …;
std::string ToString(PolicyInvalidationScope scope) { … }
em::FmRegistrationTokenUploadRequest::TokenType ScopeToTokenType(
PolicyInvalidationScope scope) { … }
}
class FmRegistrationTokenUploader::CloudPolicyCoreConnectionObserver
: public CloudPolicyCore::Observer { … };
class FmRegistrationTokenUploader::CloudPolicyClientRegistrationObserver
: public CloudPolicyClient::Observer { … };
class FmRegistrationTokenUploader::UploadJob { … };
FmRegistrationTokenUploader::FmRegistrationTokenUploader(
PolicyInvalidationScope scope,
invalidation::InvalidationListener* invalidation_listener,
CloudPolicyCore* core)
: … { … }
FmRegistrationTokenUploader::~FmRegistrationTokenUploader() { … }
void FmRegistrationTokenUploader::OnRegistrationTokenReceived(
const std::string& registration_token,
base::Time token_end_of_life) { … }
void FmRegistrationTokenUploader::DoUploadRegistrationToken(
TokenData token_data) { … }
void FmRegistrationTokenUploader::DoAsyncUploadRegistrationToken(
TokenData token_data,
base::TimeDelta delay) { … }
void FmRegistrationTokenUploader::OnRegistrationTokenUploaded(
TokenData token_data,
CloudPolicyClient::Result result) { … }
void FmRegistrationTokenUploader::StopOngoingUpload() { … }
}