OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 RTC_DISALLOW_COPY_AND_ASSIGN(Value); | 320 RTC_DISALLOW_COPY_AND_ASSIGN(Value); |
321 }; | 321 }; |
322 | 322 |
323 // TODO(tommi): Consider using a similar approach to how we store Ids using | 323 // TODO(tommi): Consider using a similar approach to how we store Ids using |
324 // scoped_refptr for values. | 324 // scoped_refptr for values. |
325 typedef rtc::linked_ptr<Value> ValuePtr; | 325 typedef rtc::linked_ptr<Value> ValuePtr; |
326 typedef std::map<StatsValueName, ValuePtr> Values; | 326 typedef std::map<StatsValueName, ValuePtr> Values; |
327 | 327 |
328 // Ownership of |id| is passed to |this|. | 328 // Ownership of |id| is passed to |this|. |
329 explicit StatsReport(const Id& id); | 329 explicit StatsReport(const Id& id); |
| 330 ~StatsReport(); |
330 | 331 |
331 // Factory functions for various types of stats IDs. | 332 // Factory functions for various types of stats IDs. |
332 static Id NewBandwidthEstimationId(); | 333 static Id NewBandwidthEstimationId(); |
333 static Id NewTypedId(StatsType type, const std::string& id); | 334 static Id NewTypedId(StatsType type, const std::string& id); |
334 static Id NewTypedIntId(StatsType type, int id); | 335 static Id NewTypedIntId(StatsType type, int id); |
335 static Id NewIdWithDirection( | 336 static Id NewIdWithDirection( |
336 StatsType type, const std::string& id, Direction direction); | 337 StatsType type, const std::string& id, Direction direction); |
337 static Id NewCandidateId(bool local, const std::string& id); | 338 static Id NewCandidateId(bool local, const std::string& id); |
338 static Id NewComponentId( | 339 static Id NewComponentId( |
339 const std::string& content_name, int component); | 340 const std::string& content_name, int component); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 StatsReport* Find(const StatsReport::Id& id); | 405 StatsReport* Find(const StatsReport::Id& id); |
405 | 406 |
406 private: | 407 private: |
407 Container list_; | 408 Container list_; |
408 rtc::ThreadChecker thread_checker_; | 409 rtc::ThreadChecker thread_checker_; |
409 }; | 410 }; |
410 | 411 |
411 } // namespace webrtc | 412 } // namespace webrtc |
412 | 413 |
413 #endif // WEBRTC_API_STATSTYPES_H_ | 414 #endif // WEBRTC_API_STATSTYPES_H_ |
OLD | NEW |