#include "remoting/base/protobuf_http_status.h"
#include "base/no_destructor.h"
#include "net/http/http_status_code.h"
#include "remoting/base/protobuf_http_client_messages.pb.h"
namespace remoting {
namespace {
constexpr ProtobufHttpStatus::Code HttpStatusCodeToClientCode(
net::HttpStatusCode http_status_code) { … }
constexpr ProtobufHttpStatus::Code NetErrorToClientCode(net::Error net_error) { … }
}
const ProtobufHttpStatus& ProtobufHttpStatus::OK() { … }
ProtobufHttpStatus::ProtobufHttpStatus(net::HttpStatusCode http_status_code)
: … { … }
ProtobufHttpStatus::ProtobufHttpStatus(net::Error net_error)
: … { … }
ProtobufHttpStatus::ProtobufHttpStatus(const protobufhttpclient::Status& status)
: … { … }
ProtobufHttpStatus::ProtobufHttpStatus(Code code,
const std::string& error_message)
: … { … }
ProtobufHttpStatus::ProtobufHttpStatus(const protobufhttpclient::Status& status,
const std::string& response_body)
: … { … }
ProtobufHttpStatus::~ProtobufHttpStatus() = default;
bool ProtobufHttpStatus::ok() const { … }
}