Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: net/base/bandwidth_metrics.h

Issue 5682008: Make members of Singleton<T> private and only visible to the singleton type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
-

Powered by Google App Engine
This is Rietveld 408576698