#include "chrome/browser/devtools/device/usb/android_usb_socket.h"
#include <stddef.h>
#include "base/check_op.h"
#include "base/functional/callback_helpers.h"
#include "base/notreached.h"
#include "net/base/io_buffer.h"
#include "net/base/ip_address.h"
#include "net/base/net_errors.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
namespace {
const int kMaxPayload = …;
}
AndroidUsbSocket::AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device,
uint32_t socket_id,
const std::string& command,
base::OnceClosure delete_callback)
: … { … }
AndroidUsbSocket::~AndroidUsbSocket() { … }
void AndroidUsbSocket::HandleIncoming(std::unique_ptr<AdbMessage> message) { … }
void AndroidUsbSocket::Terminated(bool closed_by_device) { … }
int AndroidUsbSocket::Read(net::IOBuffer* buffer,
int length,
net::CompletionOnceCallback callback) { … }
int AndroidUsbSocket::Write(
net::IOBuffer* buffer,
int length,
net::CompletionOnceCallback callback,
const net::NetworkTrafficAnnotationTag& ) { … }
int AndroidUsbSocket::SetReceiveBufferSize(int32_t size) { … }
int AndroidUsbSocket::SetSendBufferSize(int32_t size) { … }
int AndroidUsbSocket::Connect(net::CompletionOnceCallback callback) { … }
void AndroidUsbSocket::Disconnect() { … }
bool AndroidUsbSocket::IsConnected() const { … }
bool AndroidUsbSocket::IsConnectedAndIdle() const { … }
int AndroidUsbSocket::GetPeerAddress(net::IPEndPoint* address) const { … }
int AndroidUsbSocket::GetLocalAddress(net::IPEndPoint* address) const { … }
const net::NetLogWithSource& AndroidUsbSocket::NetLog() const { … }
bool AndroidUsbSocket::WasEverUsed() const { … }
net::NextProto AndroidUsbSocket::GetNegotiatedProtocol() const { … }
bool AndroidUsbSocket::GetSSLInfo(net::SSLInfo* ssl_info) { … }
int64_t AndroidUsbSocket::GetTotalReceivedBytes() const { … }
void AndroidUsbSocket::ApplySocketTag(const net::SocketTag& tag) { … }
void AndroidUsbSocket::RespondToReader(bool disconnect) { … }
void AndroidUsbSocket::RespondToWriter(int result) { … }