Skip to content

Commit

Permalink
Change GetTotalReceivedBytes() from int64 to int64_t.
Browse files Browse the repository at this point in the history
Changes GetTotalReceivedBytes() from int64 to int64_t, from the
URLRequest all the way down to the HttpStreams.

BUG=527260

TBR=pfeldman@chromium.org

Review URL: https://codereview.chromium.org/1316863007

Cr-Commit-Position: refs/heads/master@{#350239}
  • Loading branch information
scott-little authored and Commit bot committed Sep 22, 2015
1 parent fa7da4e commit 4de1bab
Show file tree
Hide file tree
Showing 30 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion chrome/browser/devtools/devtools_network_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ bool DevToolsNetworkTransaction::GetFullRequestHeaders(
return network_transaction_->GetFullRequestHeaders(headers);
}

int64 DevToolsNetworkTransaction::GetTotalReceivedBytes() const {
int64_t DevToolsNetworkTransaction::GetTotalReceivedBytes() const {
return network_transaction_->GetTotalReceivedBytes();
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/devtools/devtools_network_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class DevToolsNetworkTransaction : public net::HttpTransaction {
const net::CompletionCallback& callback) override;
void StopCaching() override;
bool GetFullRequestHeaders(net::HttpRequestHeaders* headers) const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
void DoneReading() override;
const net::HttpResponseInfo* GetResponseInfo() const override;
Expand Down
2 changes: 1 addition & 1 deletion net/http/failing_http_transaction_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FailingHttpTransaction : public HttpTransaction {
const CompletionCallback& callback) override;
void StopCaching() override;
bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
void DoneReading() override;
const HttpResponseInfo* GetResponseInfo() const override;
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_basic_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bool HttpBasicStream::CanReuseConnection() const {
return parser()->CanReuseConnection();
}

int64 HttpBasicStream::GetTotalReceivedBytes() const {
int64_t HttpBasicStream::GetTotalReceivedBytes() const {
if (parser())
return parser()->received_bytes();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_basic_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class HttpBasicStream : public HttpStream {

bool CanReuseConnection() const override;

int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;

int64_t GetTotalSentBytes() const override;

Expand Down
4 changes: 2 additions & 2 deletions net/http/http_cache_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ bool HttpCache::Transaction::GetFullRequestHeaders(
return false;
}

int64 HttpCache::Transaction::GetTotalReceivedBytes() const {
int64 total_received_bytes = total_received_bytes_;
int64_t HttpCache::Transaction::GetTotalReceivedBytes() const {
int64_t total_received_bytes = total_received_bytes_;
if (network_trans_)
total_received_bytes += network_trans_->GetTotalReceivedBytes();
return total_received_bytes;
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_cache_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class HttpCache::Transaction : public HttpTransaction {
const CompletionCallback& callback) override;
void StopCaching() override;
bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
void DoneReading() override;
const HttpResponseInfo* GetResponseInfo() const override;
Expand Down Expand Up @@ -470,7 +470,7 @@ class HttpCache::Transaction : public HttpTransaction {
base::TimeTicks first_cache_access_since_;
base::TimeTicks send_request_since_;

int64 total_received_bytes_;
int64_t total_received_bytes_;
int64_t total_sent_bytes_;

// Load timing information for the last network request, if any. Set in the
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_network_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ bool HttpNetworkTransaction::GetFullRequestHeaders(
return true;
}

int64 HttpNetworkTransaction::GetTotalReceivedBytes() const {
int64 total_received_bytes = total_received_bytes_;
int64_t HttpNetworkTransaction::GetTotalReceivedBytes() const {
int64_t total_received_bytes = total_received_bytes_;
if (stream_)
total_received_bytes += stream_->GetTotalReceivedBytes();
return total_received_bytes;
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_network_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction
const CompletionCallback& callback) override;
void StopCaching() override;
bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
void DoneReading() override;
const HttpResponseInfo* GetResponseInfo() const override;
Expand Down Expand Up @@ -324,7 +324,7 @@ class NET_EXPORT_PRIVATE HttpNetworkTransaction

// Total number of bytes received on all destroyed HttpStreams for this
// transaction.
int64 total_received_bytes_;
int64_t total_received_bytes_;

// Total number of bytes sent on all destroyed HttpStreams for this
// transaction.
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_network_transaction_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13362,7 +13362,7 @@ class FakeStream : public HttpStream,

bool CanReuseConnection() const override { return false; }

int64 GetTotalReceivedBytes() const override {
int64_t GetTotalReceivedBytes() const override {
ADD_FAILURE();
return 0;
}
Expand Down Expand Up @@ -13578,7 +13578,7 @@ class FakeWebSocketBasicHandshakeStream : public WebSocketHandshakeStreamBase {

bool CanReuseConnection() const override { return false; }

int64 GetTotalReceivedBytes() const override {
int64_t GetTotalReceivedBytes() const override {
NOTREACHED();
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_response_body_drainer_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class MockHttpStream : public HttpStream {
bool IsConnectionReused() const override { return false; }
void SetConnectionReused() override {}
bool CanReuseConnection() const override { return false; }
int64 GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalSentBytes() const override { return 0; }
void GetSSLInfo(SSLInfo* ssl_info) override {}
void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override {}
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class NET_EXPORT_PRIVATE HttpStream {
virtual bool CanReuseConnection() const = 0;

// Get the total number of bytes received from network for this stream.
virtual int64 GetTotalReceivedBytes() const = 0;
virtual int64_t GetTotalReceivedBytes() const = 0;

// Get the total number of bytes sent over the network for this stream.
virtual int64_t GetTotalSentBytes() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_stream_factory_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MockWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {
bool IsConnectionReused() const override { return false; }
void SetConnectionReused() override {}
bool CanReuseConnection() const override { return false; }
int64 GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalSentBytes() const override { return 0; }
bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
return false;
Expand Down
4 changes: 2 additions & 2 deletions net/http/http_stream_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
// false.
bool CanReuseConnection() const;

int64 received_bytes() const { return received_bytes_; }
int64_t received_bytes() const { return received_bytes_; }

int64_t sent_bytes() const { return sent_bytes_; }

Expand Down Expand Up @@ -211,7 +211,7 @@ class NET_EXPORT_PRIVATE HttpStreamParser {

// The amount of received data. If connection is reused then intermediate
// value may be bigger than final.
int64 received_bytes_;
int64_t received_bytes_;

// The amount of sent data.
int64_t sent_bytes_;
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class NET_EXPORT_PRIVATE HttpTransaction {
virtual bool GetFullRequestHeaders(HttpRequestHeaders* headers) const = 0;

// Get the number of bytes received from network.
virtual int64 GetTotalReceivedBytes() const = 0;
virtual int64_t GetTotalReceivedBytes() const = 0;

// Get the number of bytes sent over the network.
virtual int64_t GetTotalSentBytes() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion net/http/http_transaction_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ bool MockNetworkTransaction::GetFullRequestHeaders(
return false;
}

int64 MockNetworkTransaction::GetTotalReceivedBytes() const {
int64_t MockNetworkTransaction::GetTotalReceivedBytes() const {
return received_bytes_;
}

Expand Down
4 changes: 2 additions & 2 deletions net/http/http_transaction_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class MockNetworkTransaction

bool GetFullRequestHeaders(HttpRequestHeaders* headers) const override;

int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;

int64_t GetTotalSentBytes() const override;

Expand Down Expand Up @@ -256,7 +256,7 @@ class MockNetworkTransaction
RequestPriority priority_;
CreateHelper* websocket_handshake_stream_create_helper_;
base::WeakPtr<MockNetworkLayer> transaction_factory_;
int64 received_bytes_;
int64_t received_bytes_;
int64_t sent_bytes_;

// NetLog ID of the fake / non-existent underlying socket used by the
Expand Down
2 changes: 1 addition & 1 deletion net/http/proxy_connect_redirect_http_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ bool ProxyConnectRedirectHttpStream::CanReuseConnection() const {
return false;
}

int64 ProxyConnectRedirectHttpStream::GetTotalReceivedBytes() const {
int64_t ProxyConnectRedirectHttpStream::GetTotalReceivedBytes() const {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion net/http/proxy_connect_redirect_http_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ProxyConnectRedirectHttpStream : public HttpStream {
void SetConnectionReused() override;
bool CanReuseConnection() const override;

int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;

// This function may be called.
Expand Down
2 changes: 1 addition & 1 deletion net/quic/quic_http_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ bool QuicHttpStream::CanReuseConnection() const {
return false;
}

int64 QuicHttpStream::GetTotalReceivedBytes() const {
int64_t QuicHttpStream::GetTotalReceivedBytes() const {
// TODO(sclittle): Currently, this only includes response body bytes. Change
// this to include headers and QUIC overhead as well.
if (stream_) {
Expand Down
4 changes: 2 additions & 2 deletions net/quic/quic_http_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream
bool IsConnectionReused() const override;
void SetConnectionReused() override;
bool CanReuseConnection() const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
void GetSSLInfo(SSLInfo* ssl_info) override;
Expand Down Expand Up @@ -145,7 +145,7 @@ class NET_EXPORT_PRIVATE QuicHttpStream
std::string request_;

// Number of bytes received when the stream was closed.
int64 closed_stream_received_bytes_;
int64_t closed_stream_received_bytes_;
// Number of bytes sent when the stream was closed.
int64_t closed_stream_sent_bytes_;

Expand Down
2 changes: 1 addition & 1 deletion net/spdy/spdy_http_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool SpdyHttpStream::CanReuseConnection() const {
return false;
}

int64 SpdyHttpStream::GetTotalReceivedBytes() const {
int64_t SpdyHttpStream::GetTotalReceivedBytes() const {
if (stream_closed_)
return closed_stream_received_bytes_;

Expand Down
4 changes: 2 additions & 2 deletions net/spdy/spdy_http_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
// Total number of bytes received over the network of SPDY data, headers, and
// push_promise frames associated with this stream, including the size of
// frame headers, after SSL decryption and not including proxy overhead.
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
// Total number of bytes sent over the network of SPDY frames associated with
// this stream, including the size of frame headers, before SSL encryption and
// not including proxy overhead. Note that some SPDY frames such as pings are
Expand Down Expand Up @@ -129,7 +129,7 @@ class NET_EXPORT_PRIVATE SpdyHttpStream : public SpdyStream::Delegate,
LoadTimingInfo closed_stream_load_timing_info_;
// After |stream_| has been closed, this keeps track of the total number of
// bytes received over the network for |stream_| while it was open.
int64 closed_stream_received_bytes_;
int64_t closed_stream_received_bytes_;
// After |stream_| has been closed, this keeps track of the total number of
// bytes sent over the network for |stream_| while it was open.
int64_t closed_stream_sent_bytes_;
Expand Down
2 changes: 1 addition & 1 deletion net/url_request/url_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ bool URLRequest::GetFullRequestHeaders(HttpRequestHeaders* headers) const {
return job_->GetFullRequestHeaders(headers);
}

int64 URLRequest::GetTotalReceivedBytes() const {
int64_t URLRequest::GetTotalReceivedBytes() const {
if (!job_.get())
return 0;

Expand Down
2 changes: 1 addition & 1 deletion net/url_request/url_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
// proxy handling. Pertains only to the last URLRequestJob issued by this
// URLRequest, i.e. reset on redirects, but not reset when multiple roundtrips
// are used for range requests or auth.
int64 GetTotalReceivedBytes() const;
int64_t GetTotalReceivedBytes() const;

// Gets the total amount of data sent over the network before SSL encoding and
// proxy handling. Pertains only to the last URLRequestJob issued by this
Expand Down
2 changes: 1 addition & 1 deletion net/url_request/url_request_http_job_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ class FakeWebSocketHandshakeStream : public WebSocketHandshakeStreamBase {

bool CanReuseConnection() const override { return false; }

int64 GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalReceivedBytes() const override { return 0; }
int64_t GetTotalSentBytes() const override { return 0; }

bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override {
Expand Down
2 changes: 1 addition & 1 deletion net/url_request/url_request_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ bool URLRequestJob::GetFullRequestHeaders(HttpRequestHeaders* headers) const {
return false;
}

int64 URLRequestJob::GetTotalReceivedBytes() const {
int64_t URLRequestJob::GetTotalReceivedBytes() const {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion net/url_request/url_request_job.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class NET_EXPORT URLRequestJob

// Get the number of bytes received from network. The values returned by this
// will never decrease over the lifetime of the URLRequestJob.
virtual int64 GetTotalReceivedBytes() const;
virtual int64_t GetTotalReceivedBytes() const;

// Get the number of bytes sent over the network. The values returned by this
// will never decrease over the lifetime of the URLRequestJob.
Expand Down
2 changes: 1 addition & 1 deletion net/websockets/websocket_basic_handshake_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ bool WebSocketBasicHandshakeStream::CanReuseConnection() const {
return false;
}

int64 WebSocketBasicHandshakeStream::GetTotalReceivedBytes() const {
int64_t WebSocketBasicHandshakeStream::GetTotalReceivedBytes() const {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion net/websockets/websocket_basic_handshake_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class NET_EXPORT_PRIVATE WebSocketBasicHandshakeStream
bool IsConnectionReused() const override;
void SetConnectionReused() override;
bool CanReuseConnection() const override;
int64 GetTotalReceivedBytes() const override;
int64_t GetTotalReceivedBytes() const override;
int64_t GetTotalSentBytes() const override;
bool GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const override;
void GetSSLInfo(SSLInfo* ssl_info) override;
Expand Down

0 comments on commit 4de1bab

Please sign in to comment.