| Index: net/spdy/spdy_stream.cc
|
| diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
|
| index e00ae2140c35d47cf8f4fb9af4e5dab490ea9890..05d9f13bb08b68e4538fb7e794630961dcdc9342 100644
|
| --- a/net/spdy/spdy_stream.cc
|
| +++ b/net/spdy/spdy_stream.cc
|
| @@ -23,6 +23,7 @@
|
| #include "net/log/net_log.h"
|
| #include "net/log/net_log_capture_mode.h"
|
| #include "net/log/net_log_event_type.h"
|
| +#include "net/spdy/platform/api/spdy_estimate_memory_usage.h"
|
| #include "net/spdy/spdy_buffer_producer.h"
|
| #include "net/spdy/spdy_http_utils.h"
|
| #include "net/spdy/spdy_session.h"
|
| @@ -112,6 +113,7 @@ class SpdyStream::HeadersBufferProducer : public SpdyBufferProducer {
|
| return std::unique_ptr<SpdyBuffer>(
|
| new SpdyBuffer(stream_->ProduceHeadersFrame()));
|
| }
|
| + size_t EstimateMemoryUsage() const override { return 0; }
|
|
|
| private:
|
| const base::WeakPtr<SpdyStream> stream_;
|
| @@ -820,6 +822,16 @@ bool SpdyStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const {
|
| return result;
|
| }
|
|
|
| +size_t SpdyStream::EstimateMemoryUsage() const {
|
| + // TODO(xunjieli): https://crbug.com/669108. Estimate |pending_send_data_|
|
| + // once scoped_refptr support is in.
|
| + return SpdyEstimateMemoryUsage(url_) +
|
| + SpdyEstimateMemoryUsage(request_headers_) +
|
| + SpdyEstimateMemoryUsage(url_from_header_block_) +
|
| + SpdyEstimateMemoryUsage(pending_recv_data_) +
|
| + SpdyEstimateMemoryUsage(response_headers_);
|
| +}
|
| +
|
| void SpdyStream::UpdateHistograms() {
|
| // We need at least the receive timers to be filled in, as otherwise
|
| // metrics can be bogus.
|
|
|