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

Unified Diff: talk/app/webrtc/fakemetricsobserver.h

Issue 1337673002: Change WebRTC SslCipher to be exposed as number only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months 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
« no previous file with comments | « no previous file | talk/app/webrtc/fakemetricsobserver.cc » ('j') | talk/app/webrtc/fakemetricsobserver.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/fakemetricsobserver.h
diff --git a/talk/app/webrtc/fakemetricsobserver.h b/talk/app/webrtc/fakemetricsobserver.h
index 39454bf4db48862a32b0b7d7b64ed6a1bc184502..75764a387b1abb80a77b6d6962d3ba45b00d8a5e 100644
--- a/talk/app/webrtc/fakemetricsobserver.h
+++ b/talk/app/webrtc/fakemetricsobserver.h
@@ -46,25 +46,21 @@ class FakeMetricsObserver : public MetricsObserverInterface {
int counter_max) override;
void AddHistogramSample(PeerConnectionMetricsName type,
int value) override;
- void AddHistogramSample(PeerConnectionMetricsName type,
- const std::string& value) override;
// Accessors to be used by the tests.
int GetEnumCounter(PeerConnectionEnumCounterType type, int counter) const;
- int GetIntHistogramSample(PeerConnectionMetricsName type) const;
- const std::string& GetStringHistogramSample(
- PeerConnectionMetricsName type) const;
+ int GetHistogramSample(PeerConnectionMetricsName type) const;
protected:
~FakeMetricsObserver() {}
private:
rtc::ThreadChecker thread_checker_;
- // This is a 2 dimension array. The first index is the enum counter type. The
- // 2nd index is the counter of that particular enum counter type.
- std::vector<std::vector<int>> counters_;
- int int_histogram_samples_[kPeerConnectionMetricsName_Max];
- std::string string_histogram_samples_[kPeerConnectionMetricsName_Max];
+ // The outer array is the type of the enum counter. The inner map is mapping
+ // from a particular counter to its accumulated count. The reason it is a map
+ // is to work with sparse enum type which might span a large number space.
juberti 2015/09/24 21:37:32 An example of how this works would also be helpful
guoweis_webrtc 2015/09/25 18:30:31 Done.
+ std::vector<std::map<int, int>> counters_;
+ int histogram_samples_[kPeerConnectionMetricsName_Max];
};
} // namespace webrtc
« no previous file with comments | « no previous file | talk/app/webrtc/fakemetricsobserver.cc » ('j') | talk/app/webrtc/fakemetricsobserver.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698