#include "remoting/host/setup/corp_host_starter.h"
#include <memory>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/strings/string_util.h"
#include "remoting/base/corp_service_client.h"
#include "remoting/base/internal_headers.h"
#include "remoting/base/protobuf_http_status.h"
#include "remoting/host/setup/buildflags.h"
#include "remoting/host/setup/host_starter.h"
#include "remoting/host/setup/host_starter_base.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
namespace remoting {
namespace {
class CorpHostStarter : public HostStarterBase { … };
CorpHostStarter::CorpHostStarter(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
: … { … }
CorpHostStarter::~CorpHostStarter() = default;
void CorpHostStarter::RegisterNewHost(const std::string& public_key,
std::optional<std::string> access_token) { … }
void CorpHostStarter::OnProvisionCorpMachineResponse(
const ProtobufHttpStatus& status,
std::unique_ptr<internal::ProvisionCorpMachineResponse> response) { … }
void CorpHostStarter::RemoveOldHostFromDirectory(
base::OnceClosure on_host_removed) { … }
void CorpHostStarter::ReportError(const std::string& message,
base::OnceClosure on_error_reported) { … }
}
std::unique_ptr<HostStarter> ProvisionCorpMachine(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) { … }
}