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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 28 matching lines...) Expand all
39 class FakeMetricsObserver : public MetricsObserverInterface { 39 class FakeMetricsObserver : public MetricsObserverInterface {
40 public: 40 public:
41 FakeMetricsObserver(); 41 FakeMetricsObserver();
42 void Reset(); 42 void Reset();
43 43
44 void IncrementEnumCounter(PeerConnectionEnumCounterType, 44 void IncrementEnumCounter(PeerConnectionEnumCounterType,
45 int counter, 45 int counter,
46 int counter_max) override; 46 int counter_max) override;
47 void AddHistogramSample(PeerConnectionMetricsName type, 47 void AddHistogramSample(PeerConnectionMetricsName type,
48 int value) override; 48 int value) override;
49 void AddHistogramSample(PeerConnectionMetricsName type,
50 const std::string& value) override;
51 49
52 // Accessors to be used by the tests. 50 // Accessors to be used by the tests.
53 int GetEnumCounter(PeerConnectionEnumCounterType type, int counter) const; 51 int GetEnumCounter(PeerConnectionEnumCounterType type, int counter) const;
54 int GetIntHistogramSample(PeerConnectionMetricsName type) const; 52 int GetHistogramSample(PeerConnectionMetricsName type) const;
55 const std::string& GetStringHistogramSample(
56 PeerConnectionMetricsName type) const;
57 53
58 protected: 54 protected:
59 ~FakeMetricsObserver() {} 55 ~FakeMetricsObserver() {}
60 56
61 private: 57 private:
62 rtc::ThreadChecker thread_checker_; 58 rtc::ThreadChecker thread_checker_;
63 // This is a 2 dimension array. The first index is the enum counter type. The 59 // The vector contains maps for each counter type. In the map, it's a mapping
64 // 2nd index is the counter of that particular enum counter type. 60 // from individual counter to its count, such that it's memory efficient when
65 std::vector<std::vector<int>> counters_; 61 // comes to sparse enum type, like SSL cipher IANA registry.
pthatcher1 2015/09/29 22:25:16 "spare enum type" => "sparse enum types" ? "like S
guoweis_webrtc 2015/09/30 04:09:46 Done.
66 int int_histogram_samples_[kPeerConnectionMetricsName_Max]; 62 std::vector<std::map<int, int>> counters_;
67 std::string string_histogram_samples_[kPeerConnectionMetricsName_Max]; 63 int histogram_samples_[kPeerConnectionMetricsName_Max];
68 }; 64 };
69 65
70 } // namespace webrtc 66 } // namespace webrtc
71 67
72 #endif // TALK_APP_WEBRTC_FAKEMETRICSOBSERVER_H_ 68 #endif // TALK_APP_WEBRTC_FAKEMETRICSOBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | talk/app/webrtc/fakemetricsobserver.cc » ('j') | talk/app/webrtc/peerconnectioninterface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698