#include "components/cronet/native/test/test_url_request_callback.h"
#include "base/functional/bind.h"
#include "components/cronet/native/test/test_util.h"
namespace cronet {
namespace test {
TestUrlRequestCallback::UrlResponseInfo::UrlResponseInfo(
Cronet_UrlResponseInfoPtr response_info)
: … { … }
TestUrlRequestCallback::UrlResponseInfo::UrlResponseInfo(
const std::vector<std::string>& urls,
const std::string& message,
int32_t status_code,
int64_t received_bytes,
std::vector<std::string> headers)
: … { … }
TestUrlRequestCallback::UrlResponseInfo::~UrlResponseInfo() = default;
TestUrlRequestCallback::TestUrlRequestCallback(bool direct_executor)
: … { … }
TestUrlRequestCallback::~TestUrlRequestCallback() { … }
Cronet_ExecutorPtr TestUrlRequestCallback::GetExecutor() { … }
Cronet_UrlRequestCallbackPtr
TestUrlRequestCallback::CreateUrlRequestCallback() { … }
void TestUrlRequestCallback::OnRedirectReceived(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_String newLocationUrl) { … }
void TestUrlRequestCallback::OnResponseStarted(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::OnReadCompleted(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_BufferPtr buffer,
uint64_t bytes_read) { … }
void TestUrlRequestCallback::OnSucceeded(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::OnFailed(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_ErrorPtr error) { … }
void TestUrlRequestCallback::OnCanceled(Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::ShutdownExecutor() { … }
void TestUrlRequestCallback::CheckExecutorThread() { … }
bool TestUrlRequestCallback::MaybeCancelOrPause(Cronet_UrlRequestPtr request) { … }
TestUrlRequestCallback* TestUrlRequestCallback::GetThis(
Cronet_UrlRequestCallbackPtr self) { … }
void TestUrlRequestCallback::OnRedirectReceived(
Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_String newLocationUrl) { … }
void TestUrlRequestCallback::OnResponseStarted(
Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::OnReadCompleted(Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_BufferPtr buffer,
uint64_t bytesRead) { … }
void TestUrlRequestCallback::OnSucceeded(Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::OnFailed(Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info,
Cronet_ErrorPtr error) { … }
void TestUrlRequestCallback::OnCanceled(Cronet_UrlRequestCallbackPtr self,
Cronet_UrlRequestPtr request,
Cronet_UrlResponseInfoPtr info) { … }
void TestUrlRequestCallback::Execute(Cronet_ExecutorPtr self,
Cronet_RunnablePtr runnable) { … }
void TestUrlRequestCallback::ExecuteDirect(Cronet_ExecutorPtr self,
Cronet_RunnablePtr runnable) { … }
}
}