chromium/components/update_client/request_sender.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/update_client/request_sender.h"

#include <utility>

#include "base/base64.h"
#include "base/check.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "components/client_update_protocol/ecdsa.h"
#include "components/update_client/configurator.h"
#include "components/update_client/network.h"
#include "components/update_client/update_client_errors.h"
#include "components/update_client/utils.h"

namespace update_client {

namespace {

// This is an ECDSA prime256v1 named-curve key.
constexpr int kKeyVersion =;
constexpr char kKeyPubBytesBase64[] =;

// The content type for all protocol requests.
constexpr char kContentType[] =;

// Returns the value of |response_cup_server_proof| or the value of
// |response_etag|, if the former value is empty.
const std::string& SelectCupServerProof(
    const std::string& response_cup_server_proof,
    const std::string& response_etag) {}

}  // namespace

RequestSender::RequestSender(scoped_refptr<Configurator> config)
    :{}

RequestSender::~RequestSender() = default;

void RequestSender::Send(
    const std::vector<GURL>& urls,
    const base::flat_map<std::string, std::string>& request_extra_headers,
    const std::string& request_body,
    bool use_signing,
    RequestSenderCallback request_sender_callback) {}

void RequestSender::SendInternal() {}

void RequestSender::SendInternalComplete(
    int error,
    const std::string& response_body,
    const std::string& response_etag,
    const std::string& response_cup_server_proof,
    int retry_after_sec) {}

void RequestSender::OnResponseStarted(int response_code,
                                      int64_t /*content_length*/) {}

void RequestSender::OnNetworkFetcherComplete(
    const GURL& original_url,
    std::unique_ptr<std::string> response_body,
    int net_error,
    const std::string& header_etag,
    const std::string& xheader_cup_server_proof,
    int64_t xheader_retry_after_sec) {}

void RequestSender::HandleSendError(int error, int retry_after_sec) {}

std::string RequestSender::GetKey(const char* key_bytes_base64) {}

GURL RequestSender::BuildUpdateUrl(const GURL& url,
                                   const std::string& query_params) {}

}  // namespace update_client