Update DevToolsNetworkUploadDataStream
This commit is contained in:
parent
70ffec1134
commit
db7959619e
3 changed files with 10 additions and 9 deletions
|
@ -103,10 +103,9 @@ bool DevToolsNetworkTransaction::CheckFailed() {
|
|||
return false;
|
||||
}
|
||||
|
||||
int DevToolsNetworkTransaction::Start(
|
||||
const net::HttpRequestInfo* request,
|
||||
const net::CompletionCallback& callback,
|
||||
const net::BoundNe& net_log) {
|
||||
int DevToolsNetworkTransaction::Start(const net::HttpRequestInfo* request,
|
||||
const net::CompletionCallback& callback,
|
||||
const net::NetLogWithSource& net_log) {
|
||||
DCHECK(request);
|
||||
request_ = request;
|
||||
|
||||
|
@ -141,9 +140,9 @@ int DevToolsNetworkTransaction::Start(
|
|||
return net::ERR_INTERNET_DISCONNECTED;
|
||||
|
||||
if (!interceptor_)
|
||||
return network_transaction_->Start(request_, callback, net_log);
|
||||
return transaction_->Start(request_, callback, net_log);
|
||||
|
||||
int result = network_transaction_->Start(request_,
|
||||
int result = transaction_->Start(request_,
|
||||
base::Bind(&DevToolsNetworkTransaction::IOCallback,
|
||||
base::Unretained(this), callback, true),
|
||||
net_log);
|
||||
|
|
|
@ -35,11 +35,13 @@ bool DevToolsNetworkUploadDataStream::IsInMemory() const {
|
|||
return false;
|
||||
}
|
||||
|
||||
int DevToolsNetworkUploadDataStream::InitInternal(const net::BoundNetLog& net_log) {
|
||||
int DevToolsNetworkUploadDataStream::InitInternal(
|
||||
const net::NetLogWithSource& net_log) {
|
||||
throttled_byte_count_ = 0;
|
||||
int result = upload_data_stream_->Init(
|
||||
base::Bind(&DevToolsNetworkUploadDataStream::StreamInitCallback,
|
||||
base::Unretained(this)), net_log);
|
||||
base::Unretained(this)),
|
||||
net_log);
|
||||
if (result == net::OK && !is_chunked())
|
||||
SetSize(upload_data_stream_->size());
|
||||
return result;
|
||||
|
|
|
@ -27,7 +27,7 @@ class DevToolsNetworkUploadDataStream : public net::UploadDataStream {
|
|||
private:
|
||||
// net::UploadDataStream implementation.
|
||||
bool IsInMemory() const override;
|
||||
int InitInternal(const net::BoundNetLog& net_log) override;
|
||||
int InitInternal(const net::NetLogWithSource& net_log) override;
|
||||
int ReadInternal(net::IOBuffer* buf, int buf_len) override;
|
||||
void ResetInternal() override;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue