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