#include "remoting/base/protobuf_http_client.h"
#include "base/strings/stringprintf.h"
#include "google_apis/common/api_key_request_util.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "remoting/base/oauth_token_getter.h"
#include "remoting/base/protobuf_http_request_base.h"
#include "remoting/base/protobuf_http_request_config.h"
#include "remoting/base/protobuf_http_status.h"
#include "remoting/base/url_loader_network_service_observer.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/simple_url_loader.h"
#include "third_party/protobuf/src/google/protobuf/message_lite.h"
#include "url/gurl.h"
namespace {
constexpr char kAuthorizationHeaderFormat[] = …;
}
namespace remoting {
ProtobufHttpClient::ProtobufHttpClient(
const std::string& server_endpoint,
OAuthTokenGetter* token_getter,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
: … { … }
ProtobufHttpClient::~ProtobufHttpClient() { … }
void ProtobufHttpClient::ExecuteRequest(
std::unique_ptr<ProtobufHttpRequestBase> request) { … }
void ProtobufHttpClient::CancelPendingRequests() { … }
bool ProtobufHttpClient::HasPendingRequests() const { … }
void ProtobufHttpClient::DoExecuteRequest(
std::unique_ptr<ProtobufHttpRequestBase> request,
OAuthTokenGetter::Status status,
const std::string& user_email,
const std::string& access_token) { … }
void ProtobufHttpClient::CancelRequest(
const PendingRequestListIterator& request_iterator) { … }
}