Skip to content

Commit

Permalink
Remove the ScopedBandwidthMetrics class and associated Net.DownloadBa…
Browse files Browse the repository at this point in the history
…ndwith metric.

Also had to fix a couple missing includes.

BUG=469288

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

Cr-Commit-Position: refs/heads/master@{#323108}
  • Loading branch information
rkaplow authored and Commit bot committed Mar 31, 2015
1 parent 4fd3330 commit 2551ddd
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 182 deletions.
36 changes: 0 additions & 36 deletions net/base/bandwidth_metrics.cc

This file was deleted.

136 changes: 0 additions & 136 deletions net/base/bandwidth_metrics.h

This file was deleted.

1 change: 1 addition & 0 deletions net/http/http_stream_factory_impl_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/logging.h"
#include "base/metrics/histogram_macros.h"
#include "base/profiler/scoped_tracker.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
Expand Down
2 changes: 0 additions & 2 deletions net/net.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@
'base/address_tracker_linux.h',
'base/backoff_entry.cc',
'base/backoff_entry.h',
'base/bandwidth_metrics.cc',
'base/bandwidth_metrics.h',
'base/cache_type.h',
'base/chunked_upload_data_stream.cc',
'base/chunked_upload_data_stream.h',
Expand Down
6 changes: 1 addition & 5 deletions net/spdy/spdy_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
Expand Down Expand Up @@ -427,8 +428,6 @@ int SpdyStream::OnInitialResponseHeadersReceived(
break;
}

metrics_.StartStream();

DCHECK_NE(io_state_, STATE_IDLE);

response_time_ = response_time;
Expand Down Expand Up @@ -477,7 +476,6 @@ void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
pending_recv_data_.push_back(buffer.release());
} else {
pending_recv_data_.push_back(NULL);
metrics_.StopStream();
// Note: we leave the stream open in the session until the stream
// is claimed.
}
Expand All @@ -496,7 +494,6 @@ void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
CHECK(!IsClosed());

if (!buffer) {
metrics_.StopStream();
if (io_state_ == STATE_OPEN) {
io_state_ = STATE_HALF_CLOSED_REMOTE;
} else if (io_state_ == STATE_HALF_CLOSED_LOCAL) {
Expand All @@ -518,7 +515,6 @@ void SpdyStream::OnDataReceived(scoped_ptr<SpdyBuffer> buffer) {
}

// Track our bandwidth.
metrics_.RecordBytes(length);
recv_bytes_ += length;
recv_last_byte_time_ = base::TimeTicks::Now();

Expand Down
3 changes: 0 additions & 3 deletions net/spdy/spdy_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "net/base/bandwidth_metrics.h"
#include "net/base/io_buffer.h"
#include "net/base/net_export.h"
#include "net/base/net_log.h"
Expand Down Expand Up @@ -508,8 +507,6 @@ class NET_EXPORT_PRIVATE SpdyStream {
int32 recv_window_size_;
int32 unacked_recv_window_bytes_;

ScopedBandwidthMetrics metrics_;

const base::WeakPtr<SpdySession> session_;

// The transaction should own the delegate.
Expand Down
3 changes: 3 additions & 0 deletions tools/metrics/histograms/histograms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17786,6 +17786,9 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</histogram>

<histogram name="Net.DownloadBandwidth">
<obsolete>
Deprecated as of 03/2015. No longer generated.
</obsolete>
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<summary>
Kbps on download streams exceeding 25KB. Measures from the beginning of the
Expand Down

0 comments on commit 2551ddd

Please sign in to comment.