#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/url_request/url_request_test_job.h"
#include <algorithm>
#include <list>
#include <memory>
#include "base/compiler_specific.h"
#include "base/functional/bind.h"
#include "base/lazy_instance.h"
#include "base/location.h"
#include "base/strings/string_util.h"
#include "base/task/single_thread_task_runner.h"
#include "base/time/time.h"
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
namespace net {
namespace {
URLRequestJobList;
base::LazyInstance<URLRequestJobList>::Leaky
g_pending_jobs = …;
}
GURL URLRequestTestJob::test_url_1() { … }
GURL URLRequestTestJob::test_url_2() { … }
GURL URLRequestTestJob::test_url_3() { … }
GURL URLRequestTestJob::test_url_4() { … }
GURL URLRequestTestJob::test_url_auto_advance_async_reads_1() { … }
GURL URLRequestTestJob::test_url_error() { … }
GURL URLRequestTestJob::test_url_redirect_to_url_1() { … }
GURL URLRequestTestJob::test_url_redirect_to_url_2() { … }
std::string URLRequestTestJob::test_data_1() { … }
std::string URLRequestTestJob::test_data_2() { … }
std::string URLRequestTestJob::test_data_3() { … }
std::string URLRequestTestJob::test_data_4() { … }
std::string URLRequestTestJob::test_headers() { … }
std::string URLRequestTestJob::test_redirect_headers() { … }
std::string URLRequestTestJob::test_redirect_to_url_1_headers() { … }
std::string URLRequestTestJob::test_redirect_to_url_2_headers() { … }
std::string URLRequestTestJob::test_error_headers() { … }
URLRequestTestJob::URLRequestTestJob(URLRequest* request, bool auto_advance)
: … { … }
URLRequestTestJob::URLRequestTestJob(URLRequest* request,
const std::string& response_headers,
const std::string& response_data,
bool auto_advance)
: … { … }
URLRequestTestJob::~URLRequestTestJob() { … }
bool URLRequestTestJob::GetMimeType(std::string* mime_type) const { … }
void URLRequestTestJob::SetPriority(RequestPriority priority) { … }
void URLRequestTestJob::Start() { … }
void URLRequestTestJob::StartAsync() { … }
void URLRequestTestJob::SetResponseHeaders(
const std::string& response_headers) { … }
int URLRequestTestJob::CopyDataForRead(IOBuffer* buf, int buf_size) { … }
int URLRequestTestJob::ReadRawData(IOBuffer* buf, int buf_size) { … }
void URLRequestTestJob::GetResponseInfo(HttpResponseInfo* info) { … }
void URLRequestTestJob::GetLoadTimingInfo(
LoadTimingInfo* load_timing_info) const { … }
int64_t URLRequestTestJob::GetTotalReceivedBytes() const { … }
bool URLRequestTestJob::IsRedirectResponse(GURL* location,
int* http_status_code,
bool* insecure_scheme_was_upgraded) { … }
void URLRequestTestJob::Kill() { … }
void URLRequestTestJob::ProcessNextOperation() { … }
bool URLRequestTestJob::NextReadAsync() { … }
void URLRequestTestJob::AdvanceJob() { … }
bool URLRequestTestJob::ProcessOnePendingMessage() { … }
}