Commit ef299313 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Switch platform/mediastream/ away from SEQUENCE_CHECKER

... to use THREAD_CHECKER instead.

Blink does not currently make use of sequences.

BUG=787254
R=guidou@chromium.org

Change-Id: Idda5453badb39a2c52ea8c5d8282a338d9cb5d3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946623
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Auto-Submit: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721505}
parent 4f72758c
...@@ -29,7 +29,7 @@ void UpdateWebRTCMethodCount(WebRTCAPIName api_name) { ...@@ -29,7 +29,7 @@ void UpdateWebRTCMethodCount(WebRTCAPIName api_name) {
} }
PerSessionWebRTCAPIMetrics::~PerSessionWebRTCAPIMetrics() { PerSessionWebRTCAPIMetrics::~PerSessionWebRTCAPIMetrics() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
} }
// static // static
...@@ -38,12 +38,12 @@ PerSessionWebRTCAPIMetrics* PerSessionWebRTCAPIMetrics::GetInstance() { ...@@ -38,12 +38,12 @@ PerSessionWebRTCAPIMetrics* PerSessionWebRTCAPIMetrics::GetInstance() {
} }
void PerSessionWebRTCAPIMetrics::IncrementStreamCounter() { void PerSessionWebRTCAPIMetrics::IncrementStreamCounter() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
++num_streams_; ++num_streams_;
} }
void PerSessionWebRTCAPIMetrics::DecrementStreamCounter() { void PerSessionWebRTCAPIMetrics::DecrementStreamCounter() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (--num_streams_ == 0) { if (--num_streams_ == 0) {
ResetUsage(); ResetUsage();
} }
...@@ -61,7 +61,7 @@ void PerSessionWebRTCAPIMetrics::LogUsage(WebRTCAPIName api_name) { ...@@ -61,7 +61,7 @@ void PerSessionWebRTCAPIMetrics::LogUsage(WebRTCAPIName api_name) {
} }
void PerSessionWebRTCAPIMetrics::LogUsageOnlyOnce(WebRTCAPIName api_name) { void PerSessionWebRTCAPIMetrics::LogUsageOnlyOnce(WebRTCAPIName api_name) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
if (!has_used_api_[static_cast<int>(api_name)]) { if (!has_used_api_[static_cast<int>(api_name)]) {
has_used_api_[static_cast<int>(api_name)] = true; has_used_api_[static_cast<int>(api_name)] = true;
LogUsage(api_name); LogUsage(api_name);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/sequence_checker.h" #include "base/threading/thread_checker.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h" #include "third_party/blink/public/mojom/mediastream/media_stream.mojom-shared.h"
#include "third_party/blink/public/platform/web_rtc_api_name.h" #include "third_party/blink/public/platform/web_rtc_api_name.h"
...@@ -88,7 +88,7 @@ class PLATFORM_EXPORT PerSessionWebRTCAPIMetrics { ...@@ -88,7 +88,7 @@ class PLATFORM_EXPORT PerSessionWebRTCAPIMetrics {
int num_streams_; int num_streams_;
bool has_used_api_[static_cast<int>(WebRTCAPIName::kInvalidName)]; bool has_used_api_[static_cast<int>(WebRTCAPIName::kInvalidName)];
SEQUENCE_CHECKER(sequence_checker_); THREAD_CHECKER(thread_checker_);
DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics); DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment