Index: net/base/bandwidth_metrics.h |
diff --git a/net/base/bandwidth_metrics.h b/net/base/bandwidth_metrics.h |
index aef366dba247473b2e4e4821fdcaec0c6cda7db7..ce1a498ae4e1b6067a56946d2555430ecef4c4af 100644 |
--- a/net/base/bandwidth_metrics.h |
+++ b/net/base/bandwidth_metrics.h |
@@ -122,30 +122,16 @@ class BandwidthMetrics { |
class ScopedBandwidthMetrics { |
public: |
ScopedBandwidthMetrics(); |
+ ~ScopedBandwidthMetrics(); |
- ~ScopedBandwidthMetrics() { |
- if (started_) |
- metrics_->StopStream(); |
- } |
- |
- void StartStream() { |
- started_ = true; |
- metrics_->StartStream(); |
- } |
- |
- void StopStream() { |
- started_ = false; |
- metrics_->StopStream(); |
- } |
- |
- void RecordBytes(int bytes) { metrics_->RecordBytes(bytes); } |
+ void StartStream(); |
+ void StopStream(); |
+ void RecordBytes(int bytes); |
private: |
- BandwidthMetrics* metrics_; |
bool started_; |
}; |
} // namespace net |
#endif // NET_BASE_BANDWIDTH_METRICS_H_ |
- |