Commit 5f5e9ff2 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

[Onion Soup] Move webrtc_uma_histograms.h|cc from content to Blink

Header file initially in public/platform so that it can still be
accessed by dependents in content.
Once dependents are migrated to blink, it will be moved to
renderer/platform.

Bug: 704136
Change-Id: If66f57d7239fe585a77d07a098ad20dd51d8e4f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1499553Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637613}
parent b34b3559
......@@ -383,8 +383,6 @@ target(link_target_type, "renderer") {
"media/webrtc/webrtc_media_stream_track_adapter_map.h",
"media/webrtc/webrtc_set_description_observer.cc",
"media/webrtc/webrtc_set_description_observer.h",
"media/webrtc/webrtc_uma_histograms.cc",
"media/webrtc/webrtc_uma_histograms.h",
"media/webrtc/webrtc_util.h",
"media/webrtc/webrtc_video_frame_adapter.cc",
"media/webrtc/webrtc_video_frame_adapter.h",
......
......@@ -17,11 +17,11 @@
#include "content/renderer/media/stream/media_stream_device_observer.h"
#include "content/renderer/media/stream/media_stream_video_track.h"
#include "content/renderer/media/webrtc/peer_connection_tracker.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/media/webrtc_logging.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "services/service_manager/public/cpp/interface_provider.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_media_constraints.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/web_document.h"
......@@ -280,7 +280,8 @@ void UserMediaClientImpl::CancelUserMediaRequest(
// We can't abort the stream generation process.
// Instead, erase the request. Once the stream is generated we will stop the
// stream if the request does not exist.
LogUserMediaRequestWithNoResult(MEDIA_STREAM_REQUEST_EXPLICITLY_CANCELLED);
LogUserMediaRequestWithNoResult(
blink::MEDIA_STREAM_REQUEST_EXPLICITLY_CANCELLED);
}
}
......
......@@ -32,7 +32,6 @@
#include "content/renderer/media/stream/processed_local_audio_source.h"
#include "content/renderer/media/stream/user_media_client_impl.h"
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/media/webrtc_logging.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_view_impl.h"
......@@ -42,6 +41,7 @@
#include "third_party/blink/public/common/mediastream/media_stream_controls.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_source.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_media_constraints.h"
#include "third_party/blink/public/platform/web_media_stream.h"
#include "third_party/blink/public/platform/web_media_stream_source.h"
......@@ -1405,12 +1405,13 @@ void UserMediaProcessor::StopAllProcessing() {
FALLTHROUGH;
case RequestInfo::State::NOT_SENT_FOR_GENERATION:
LogUserMediaRequestWithNoResult(MEDIA_STREAM_REQUEST_NOT_GENERATED);
LogUserMediaRequestWithNoResult(
blink::MEDIA_STREAM_REQUEST_NOT_GENERATED);
break;
case RequestInfo::State::GENERATED:
LogUserMediaRequestWithNoResult(
MEDIA_STREAM_REQUEST_PENDING_MEDIA_TRACKS);
blink::MEDIA_STREAM_REQUEST_PENDING_MEDIA_TRACKS);
break;
}
current_request_info_.reset();
......
......@@ -37,7 +37,6 @@
#include "content/renderer/media/webrtc/stun_field_trial.h"
#include "content/renderer/media/webrtc/video_codec_factory.h"
#include "content/renderer/media/webrtc/webrtc_audio_device_impl.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/media/webrtc_logging.h"
#include "content/renderer/p2p/empty_network_manager.h"
#include "content/renderer/p2p/filtering_network_manager.h"
......@@ -54,6 +53,7 @@
#include "media/base/media_permission.h"
#include "media/media_buildflags.h"
#include "media/video/gpu_video_accelerator_factories.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_media_constraints.h"
#include "third_party/blink/public/platform/web_media_stream.h"
#include "third_party/blink/public/platform/web_media_stream_source.h"
......
......@@ -37,10 +37,10 @@
#include "content/renderer/media/webrtc/rtc_stats.h"
#include "content/renderer/media/webrtc/webrtc_audio_device_impl.h"
#include "content/renderer/media/webrtc/webrtc_set_description_observer.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/render_thread_impl.h"
#include "media/base/media_switches.h"
#include "third_party/blink/public/platform/modules/mediastream/web_platform_media_stream_track.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_media_constraints.h"
#include "third_party/blink/public/platform/web_rtc_answer_options.h"
#include "third_party/blink/public/platform/web_rtc_data_channel_init.h"
......@@ -1726,7 +1726,8 @@ RTCPeerConnectionHandler::AddTrack(
for (const auto& stream_id : rtp_senders_.back()->state().stream_ids()) {
if (GetLocalStreamUsageCount(rtp_senders_, stream_id) == 1u) {
// This is the first occurrence of this stream.
PerSessionWebRTCAPIMetrics::GetInstance()->IncrementStreamCounter();
blink::PerSessionWebRTCAPIMetrics::GetInstance()
->IncrementStreamCounter();
}
}
return web_transceiver;
......@@ -1808,7 +1809,8 @@ bool RTCPeerConnectionHandler::RemoveTrackPlanB(
for (const auto& stream_id : stream_ids) {
if (GetLocalStreamUsageCount(rtp_senders_, stream_id) == 0u) {
// This was the last occurrence of this stream.
PerSessionWebRTCAPIMetrics::GetInstance()->DecrementStreamCounter();
blink::PerSessionWebRTCAPIMetrics::GetInstance()
->DecrementStreamCounter();
}
}
return true;
......@@ -2107,7 +2109,8 @@ void RTCPeerConnectionHandler::OnAddReceiverPlanB(
for (const auto& stream_id : receiver_state.stream_ids()) {
// New remote stream?
if (!IsRemoteStream(rtp_receivers_, stream_id))
PerSessionWebRTCAPIMetrics::GetInstance()->IncrementStreamCounter();
blink::PerSessionWebRTCAPIMetrics::GetInstance()
->IncrementStreamCounter();
}
uintptr_t receiver_id =
RTCRtpReceiver::getId(receiver_state.webrtc_receiver().get());
......@@ -2154,7 +2157,8 @@ void RTCPeerConnectionHandler::OnRemoveReceiverPlanB(uintptr_t receiver_id) {
for (const auto& stream_id : receiver->state().stream_ids()) {
// This was the last occurence of the stream?
if (!IsRemoteStream(rtp_receivers_, stream_id))
PerSessionWebRTCAPIMetrics::GetInstance()->IncrementStreamCounter();
blink::PerSessionWebRTCAPIMetrics::GetInstance()
->IncrementStreamCounter();
}
if (!is_closed_)
client_->DidRemoveReceiverPlanB(std::move(receiver));
......
......@@ -18,9 +18,9 @@
#include "content/renderer/media/stream/media_stream_video_capturer_source.h"
#include "content/renderer/media/stream/media_stream_video_source.h"
#include "content/renderer/media/stream/media_stream_video_track.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/render_thread_impl.h"
#include "media/base/limits.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_graphics_context_3d_provider.h"
#include "third_party/blink/public/platform/web_media_stream_source.h"
#include "third_party/blink/public/platform/web_string.h"
......
......@@ -13,10 +13,10 @@
#include "cc/paint/skia_paint_canvas.h"
#include "content/public/renderer/render_thread.h"
#include "content/renderer/media/stream/media_stream_video_source.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "media/base/limits.h"
#include "media/blink/webmediaplayer_impl.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/web_rect.h"
#include "third_party/blink/public/platform/web_size.h"
......
......@@ -13,7 +13,6 @@
#include "base/strings/string_tokenizer.h"
#include "base/strings/string_util.h"
#include "base/system/sys_info.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "content/renderer/media_recorder/audio_track_recorder.h"
#include "media/base/audio_bus.h"
#include "media/base/audio_codecs.h"
......@@ -26,6 +25,7 @@
#include "third_party/blink/public/platform/modules/media_capabilities/web_media_configuration.h"
#include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_track.h"
#include "third_party/blink/public/platform/modules/mediastream/web_platform_media_stream_track.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/scoped_web_callbacks.h"
#include "third_party/blink/public/platform/web_media_recorder_handler_client.h"
#include "third_party/blink/public/platform/web_media_stream_source.h"
......
......@@ -121,7 +121,7 @@
#include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
#include "content/renderer/media/webrtc/rtc_certificate_generator.h"
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
using blink::Platform;
using blink::WebAudioDevice;
......
......@@ -1829,7 +1829,6 @@ test("content_unittests") {
"../renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc",
"../renderer/media/webrtc/webrtc_media_stream_track_adapter_unittest.cc",
"../renderer/media/webrtc/webrtc_set_description_observer_unittest.cc",
"../renderer/media/webrtc/webrtc_uma_histograms_unittest.cc",
"../renderer/media/webrtc/webrtc_video_track_source_unittest.cc",
"../renderer/media/webrtc_local_audio_source_provider_unittest.cc",
"../renderer/media_capture_from_element/canvas_capture_handler_unittest.cc",
......
......@@ -151,6 +151,7 @@ source_set("blink_headers") {
"platform/modules/mediastream/web_media_stream_video_renderer.h",
"platform/modules/mediastream/web_platform_media_stream_source.h",
"platform/modules/mediastream/web_platform_media_stream_track.h",
"platform/modules/mediastream/webrtc_uma_histograms.h",
"platform/modules/notifications/web_notification_action.h",
"platform/modules/notifications/web_notification_constants.h",
"platform/modules/notifications/web_notification_data.h",
......
......@@ -3,6 +3,8 @@ include_rules = [
# migrated to WTF types in mediastream.
"+base/stl_util.h",
"+base/memory/singleton.h",
"+base/sequence_checker.h",
"+media/base",
"+media/capture",
]
......@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_UMA_HISTOGRAMS_H_
#define CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_UMA_HISTOGRAMS_H_
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIASTREAM_WEBRTC_UMA_HISTOGRAMS_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIASTREAM_WEBRTC_UMA_HISTOGRAMS_H_
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "base/sequence_checker.h"
#include "content/common/content_export.h"
#include "third_party/blink/public/common/mediastream/media_stream_request.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_rtc_api_name.h"
namespace content {
namespace blink {
// Used to investigate where UserMediaRequests end up.
// Only UserMediaRequests that do not log with LogUserMediaRequestResult
......@@ -28,8 +28,10 @@ enum MediaStreamRequestState {
NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT
};
void LogUserMediaRequestWithNoResult(MediaStreamRequestState state);
void LogUserMediaRequestResult(blink::MediaStreamRequestResult result);
BLINK_PLATFORM_EXPORT void LogUserMediaRequestWithNoResult(
MediaStreamRequestState state);
BLINK_PLATFORM_EXPORT void LogUserMediaRequestResult(
MediaStreamRequestResult result);
// Helper method used to collect information about the number of times
// different WebRTC APIs are called from JavaScript.
......@@ -42,7 +44,7 @@ void LogUserMediaRequestResult(blink::MediaStreamRequestResult result);
// that gets incremented only once per "session" as established by the
// PerSessionWebRTCAPIMetrics singleton below. It can be viewed at
// chrome://histograms/WebRTC.webkitApiCountPerSession.
void UpdateWebRTCMethodCount(blink::WebRTCAPIName api_name);
BLINK_PLATFORM_EXPORT void UpdateWebRTCMethodCount(WebRTCAPIName api_name);
// A singleton that keeps track of the number of MediaStreams being
// sent over PeerConnections. It uses the transition to zero such
......@@ -53,7 +55,7 @@ void UpdateWebRTCMethodCount(blink::WebRTCAPIName api_name);
//
// The UpdateWebRTCMethodCount function above uses this class to log a
// metric at most once per session.
class CONTENT_EXPORT PerSessionWebRTCAPIMetrics {
class BLINK_PLATFORM_EXPORT PerSessionWebRTCAPIMetrics {
public:
virtual ~PerSessionWebRTCAPIMetrics();
......@@ -66,30 +68,30 @@ class CONTENT_EXPORT PerSessionWebRTCAPIMetrics {
protected:
friend struct base::DefaultSingletonTraits<PerSessionWebRTCAPIMetrics>;
friend void UpdateWebRTCMethodCount(blink::WebRTCAPIName);
friend BLINK_PLATFORM_EXPORT void UpdateWebRTCMethodCount(WebRTCAPIName);
// Protected so that unit tests can test without this being a
// singleton.
PerSessionWebRTCAPIMetrics();
// Overridable by unit tests.
virtual void LogUsage(blink::WebRTCAPIName api_name);
virtual void LogUsage(WebRTCAPIName api_name);
// Called by UpdateWebRTCMethodCount above. Protected rather than
// private so that unit tests can call it.
void LogUsageOnlyOnce(blink::WebRTCAPIName api_name);
void LogUsageOnlyOnce(WebRTCAPIName api_name);
private:
void ResetUsage();
int num_streams_;
bool has_used_api_[static_cast<int>(blink::WebRTCAPIName::kInvalidName)];
bool has_used_api_[static_cast<int>(WebRTCAPIName::kInvalidName)];
SEQUENCE_CHECKER(sequence_checker_);
DISALLOW_COPY_AND_ASSIGN(PerSessionWebRTCAPIMetrics);
};
} // namespace content
} // namespace blink
#endif // CONTENT_RENDERER_MEDIA_WEBRTC_WEBRTC_UMA_HISTOGRAMS_H_
#endif // THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_MEDIASTREAM_WEBRTC_UMA_HISTOGRAMS_H_
......@@ -500,6 +500,7 @@ jumbo_component("platform") {
"exported/mediastream/media_stream_audio_track.cc",
"exported/mediastream/web_platform_media_stream_source.cc",
"exported/mediastream/web_platform_media_stream_track.cc",
"exported/mediastream/webrtc_uma_histograms.cc",
"exported/notification_data_conversions.cc",
"exported/platform.cc",
"exported/service_registry.cc",
......@@ -1656,6 +1657,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
"bindings/parkable_string_test.cc",
"bindings/runtime_call_stats_test.cc",
"exported/file_path_conversion_test.cc",
"exported/mediastream/webrtc_uma_histograms_test.cc",
"exported/notification_data_conversions_test.cc",
"exported/web_canonical_cookie_test.cc",
"exported/web_string_test.cc",
......
......@@ -2,28 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "base/metrics/histogram_macros.h"
namespace content {
namespace blink {
void LogUserMediaRequestWithNoResult(MediaStreamRequestState state) {
UMA_HISTOGRAM_ENUMERATION("WebRTC.UserMediaRequest.NoResultState",
state,
UMA_HISTOGRAM_ENUMERATION("WebRTC.UserMediaRequest.NoResultState", state,
NUM_MEDIA_STREAM_REQUEST_WITH_NO_RESULT);
}
void LogUserMediaRequestResult(blink::MediaStreamRequestResult result) {
void LogUserMediaRequestResult(MediaStreamRequestResult result) {
UMA_HISTOGRAM_ENUMERATION("WebRTC.UserMediaRequest.Result2", result,
blink::NUM_MEDIA_REQUEST_RESULTS);
NUM_MEDIA_REQUEST_RESULTS);
}
void UpdateWebRTCMethodCount(blink::WebRTCAPIName api_name) {
void UpdateWebRTCMethodCount(WebRTCAPIName api_name) {
DVLOG(3) << "Incrementing WebRTC.webkitApiCount for "
<< static_cast<int>(api_name);
UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCount", api_name,
blink::WebRTCAPIName::kInvalidName);
WebRTCAPIName::kInvalidName);
PerSessionWebRTCAPIMetrics::GetInstance()->LogUsageOnlyOnce(api_name);
}
......@@ -52,15 +51,14 @@ PerSessionWebRTCAPIMetrics::PerSessionWebRTCAPIMetrics() : num_streams_(0) {
ResetUsage();
}
void PerSessionWebRTCAPIMetrics::LogUsage(blink::WebRTCAPIName api_name) {
void PerSessionWebRTCAPIMetrics::LogUsage(WebRTCAPIName api_name) {
DVLOG(3) << "Incrementing WebRTC.webkitApiCountPerSession for "
<< static_cast<int>(api_name);
UMA_HISTOGRAM_ENUMERATION("WebRTC.webkitApiCountPerSession", api_name,
blink::WebRTCAPIName::kInvalidName);
WebRTCAPIName::kInvalidName);
}
void PerSessionWebRTCAPIMetrics::LogUsageOnlyOnce(
blink::WebRTCAPIName api_name) {
void PerSessionWebRTCAPIMetrics::LogUsageOnlyOnce(WebRTCAPIName api_name) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!has_used_api_[static_cast<int>(api_name)]) {
has_used_api_[static_cast<int>(api_name)] = true;
......@@ -73,4 +71,4 @@ void PerSessionWebRTCAPIMetrics::ResetUsage() {
has_used_api = false;
}
} // namespace content
} // namespace blink
......@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/renderer/media/webrtc/webrtc_uma_histograms.h"
#include "third_party/blink/public/platform/modules/mediastream/webrtc_uma_histograms.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
using ::testing::_;
namespace content {
namespace blink {
class MockPerSessionWebRTCAPIMetrics : public PerSessionWebRTCAPIMetrics {
public:
......@@ -17,12 +17,12 @@ class MockPerSessionWebRTCAPIMetrics : public PerSessionWebRTCAPIMetrics {
using PerSessionWebRTCAPIMetrics::LogUsageOnlyOnce;
MOCK_METHOD1(LogUsage, void(blink::WebRTCAPIName));
MOCK_METHOD1(LogUsage, void(WebRTCAPIName));
};
class PerSessionWebRTCAPIMetricsTest
: public testing::Test,
public testing::WithParamInterface<blink::WebRTCAPIName> {
public testing::WithParamInterface<WebRTCAPIName> {
public:
PerSessionWebRTCAPIMetricsTest() = default;
~PerSessionWebRTCAPIMetricsTest() override = default;
......@@ -32,13 +32,13 @@ class PerSessionWebRTCAPIMetricsTest
};
TEST_P(PerSessionWebRTCAPIMetricsTest, NoCallOngoing) {
blink::WebRTCAPIName api_name = GetParam();
WebRTCAPIName api_name = GetParam();
EXPECT_CALL(metrics, LogUsage(api_name)).Times(1);
metrics.LogUsageOnlyOnce(api_name);
}
TEST_P(PerSessionWebRTCAPIMetricsTest, CallOngoing) {
blink::WebRTCAPIName api_name = GetParam();
WebRTCAPIName api_name = GetParam();
metrics.IncrementStreamCounter();
EXPECT_CALL(metrics, LogUsage(api_name)).Times(1);
metrics.LogUsageOnlyOnce(api_name);
......@@ -47,36 +47,33 @@ TEST_P(PerSessionWebRTCAPIMetricsTest, CallOngoing) {
INSTANTIATE_TEST_SUITE_P(
PerSessionWebRTCAPIMetricsTest,
PerSessionWebRTCAPIMetricsTest,
::testing::ValuesIn({blink::WebRTCAPIName::kGetUserMedia,
blink::WebRTCAPIName::kGetDisplayMedia,
blink::WebRTCAPIName::kEnumerateDevices,
blink::WebRTCAPIName::kRTCPeerConnection}));
::testing::ValuesIn({WebRTCAPIName::kGetUserMedia,
WebRTCAPIName::kGetDisplayMedia,
WebRTCAPIName::kEnumerateDevices,
WebRTCAPIName::kRTCPeerConnection}));
TEST(PerSessionWebRTCAPIMetrics, NoCallOngoingMultiplePC) {
MockPerSessionWebRTCAPIMetrics metrics;
EXPECT_CALL(metrics, LogUsage(blink::WebRTCAPIName::kRTCPeerConnection))
.Times(1);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
EXPECT_CALL(metrics, LogUsage(WebRTCAPIName::kRTCPeerConnection)).Times(1);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
}
TEST(PerSessionWebRTCAPIMetrics, BeforeAfterCallMultiplePC) {
MockPerSessionWebRTCAPIMetrics metrics;
EXPECT_CALL(metrics, LogUsage(blink::WebRTCAPIName::kRTCPeerConnection))
.Times(1);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
EXPECT_CALL(metrics, LogUsage(WebRTCAPIName::kRTCPeerConnection)).Times(1);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.IncrementStreamCounter();
metrics.IncrementStreamCounter();
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.DecrementStreamCounter();
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.DecrementStreamCounter();
EXPECT_CALL(metrics, LogUsage(blink::WebRTCAPIName::kRTCPeerConnection))
.Times(1);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(blink::WebRTCAPIName::kRTCPeerConnection);
EXPECT_CALL(metrics, LogUsage(WebRTCAPIName::kRTCPeerConnection)).Times(1);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
metrics.LogUsageOnlyOnce(WebRTCAPIName::kRTCPeerConnection);
}
} // namespace content
} // namespace blink
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