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

Side by Side Diff: webrtc/api/stats/rtcstats.h

Issue 2387343002: RTCStatsMember<bool> and RTCStatsMember<std::vector<bool>> added. (Closed)
Patch Set: Removed spaces between RTCStatsMember and variable name Created 4 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
« no previous file with comments | « no previous file | webrtc/stats/rtcstats.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 public: 159 public:
160 160
161 // Interface for |RTCStats| members, which have a name and a value of a type 161 // Interface for |RTCStats| members, which have a name and a value of a type
162 // defined in a subclass. Only the types listed in |Type| are supported, these 162 // defined in a subclass. Only the types listed in |Type| are supported, these
163 // are implemented by |RTCStatsMember<T>|. The value of a member may be 163 // are implemented by |RTCStatsMember<T>|. The value of a member may be
164 // undefined, the value can only be read if |is_defined|. 164 // undefined, the value can only be read if |is_defined|.
165 class RTCStatsMemberInterface { 165 class RTCStatsMemberInterface {
166 public: 166 public:
167 // Member value types. 167 // Member value types.
168 enum Type { 168 enum Type {
169 kBool, // bool
169 kInt32, // int32_t 170 kInt32, // int32_t
170 kUint32, // uint32_t 171 kUint32, // uint32_t
171 kInt64, // int64_t 172 kInt64, // int64_t
172 kUint64, // uint64_t 173 kUint64, // uint64_t
173 kDouble, // double 174 kDouble, // double
174 kString, // std::string 175 kString, // std::string
175 176
177 kSequenceBool, // std::vector<bool>
176 kSequenceInt32, // std::vector<int32_t> 178 kSequenceInt32, // std::vector<int32_t>
177 kSequenceUint32, // std::vector<uint32_t> 179 kSequenceUint32, // std::vector<uint32_t>
178 kSequenceInt64, // std::vector<int64_t> 180 kSequenceInt64, // std::vector<int64_t>
179 kSequenceUint64, // std::vector<uint64_t> 181 kSequenceUint64, // std::vector<uint64_t>
180 kSequenceDouble, // std::vector<double> 182 kSequenceDouble, // std::vector<double>
181 kSequenceString, // std::vector<std::string> 183 kSequenceString, // std::vector<std::string>
182 }; 184 };
183 185
184 virtual ~RTCStatsMemberInterface() {} 186 virtual ~RTCStatsMemberInterface() {}
185 187
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 return &value_; 274 return &value_;
273 } 275 }
274 276
275 private: 277 private:
276 T value_; 278 T value_;
277 }; 279 };
278 280
279 } // namespace webrtc 281 } // namespace webrtc
280 282
281 #endif // WEBRTC_API_STATS_RTCSTATS_H_ 283 #endif // WEBRTC_API_STATS_RTCSTATS_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/stats/rtcstats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698