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

Side by Side Diff: webrtc/api/statstypes.h

Issue 2567143003: Delete rtc::linked_ptr. Only use, in statstypes.h, replaced bu std::unique_ptr. (Closed)
Patch Set: Created 4 years 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/base/BUILD.gn » ('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 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
11 // This file contains structures used for retrieving statistics from an ongoing 11 // This file contains structures used for retrieving statistics from an ongoing
12 // libjingle session. 12 // libjingle session.
13 13
14 #ifndef WEBRTC_API_STATSTYPES_H_ 14 #ifndef WEBRTC_API_STATSTYPES_H_
15 #define WEBRTC_API_STATSTYPES_H_ 15 #define WEBRTC_API_STATSTYPES_H_
16 16
17 #include <algorithm> 17 #include <algorithm>
18 #include <list> 18 #include <list>
19 #include <map> 19 #include <map>
20 #include <string> 20 #include <string>
21 21
22 #include "webrtc/base/basictypes.h" 22 #include "webrtc/base/basictypes.h"
23 #include "webrtc/base/common.h" 23 #include "webrtc/base/common.h"
24 #include "webrtc/base/constructormagic.h" 24 #include "webrtc/base/constructormagic.h"
25 #include "webrtc/base/linked_ptr.h"
26 #include "webrtc/base/refcount.h" 25 #include "webrtc/base/refcount.h"
27 #include "webrtc/base/scoped_ref_ptr.h" 26 #include "webrtc/base/scoped_ref_ptr.h"
28 #include "webrtc/base/stringencode.h" 27 #include "webrtc/base/stringencode.h"
29 #include "webrtc/base/thread_checker.h" 28 #include "webrtc/base/thread_checker.h"
30 29
31 namespace webrtc { 30 namespace webrtc {
32 31
33 class StatsReport { 32 class StatsReport {
34 public: 33 public:
35 // Indicates whether a track is for sending or receiving. 34 // Indicates whether a track is for sending or receiving.
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 const char* static_string_; 313 const char* static_string_;
315 Id* id_; 314 Id* id_;
316 } value_; 315 } value_;
317 316
318 private: 317 private:
319 RTC_DISALLOW_COPY_AND_ASSIGN(Value); 318 RTC_DISALLOW_COPY_AND_ASSIGN(Value);
320 }; 319 };
321 320
322 // TODO(tommi): Consider using a similar approach to how we store Ids using 321 // TODO(tommi): Consider using a similar approach to how we store Ids using
323 // scoped_refptr for values. 322 // scoped_refptr for values.
324 typedef rtc::linked_ptr<Value> ValuePtr; 323 typedef std::unique_ptr<Value> ValuePtr;
325 typedef std::map<StatsValueName, ValuePtr> Values; 324 typedef std::map<StatsValueName, ValuePtr> Values;
326 325
327 // Ownership of |id| is passed to |this|. 326 // Ownership of |id| is passed to |this|.
328 explicit StatsReport(const Id& id); 327 explicit StatsReport(const Id& id);
329 328
330 // Factory functions for various types of stats IDs. 329 // Factory functions for various types of stats IDs.
331 static Id NewBandwidthEstimationId(); 330 static Id NewBandwidthEstimationId();
332 static Id NewTypedId(StatsType type, const std::string& id); 331 static Id NewTypedId(StatsType type, const std::string& id);
333 static Id NewTypedIntId(StatsType type, int id); 332 static Id NewTypedIntId(StatsType type, int id);
334 static Id NewIdWithDirection( 333 static Id NewIdWithDirection(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 StatsReport* Find(const StatsReport::Id& id); 402 StatsReport* Find(const StatsReport::Id& id);
404 403
405 private: 404 private:
406 Container list_; 405 Container list_;
407 rtc::ThreadChecker thread_checker_; 406 rtc::ThreadChecker thread_checker_;
408 }; 407 };
409 408
410 } // namespace webrtc 409 } // namespace webrtc
411 410
412 #endif // WEBRTC_API_STATSTYPES_H_ 411 #endif // WEBRTC_API_STATSTYPES_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698