forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add webrtc metric for parsing ice candidates
Logs if parsing the ice candidate message was successful. Bug: 1021984 Change-Id: I5c7adaed6e3fef5e7e5417f8edd6d11381e6f95f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014942 Reviewed-by: Alexei Svitkine <asvitkine@chromium.org> Reviewed-by: Richard Knoll <knollr@chromium.org> Commit-Queue: Himanshu Jaju <himanshujaju@chromium.org> Cr-Commit-Position: refs/heads/master@{#734978}
- Loading branch information
Himanshu Jaju
authored and
Commit Bot
committed
Jan 24, 2020
1 parent
9325f96
commit a80417b
Showing
6 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright 2020 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
source_set("cpp") { | ||
sources = [ | ||
"sharing_webrtc_metrics.cc", | ||
"sharing_webrtc_metrics.h", | ||
] | ||
|
||
public_deps = [ "//base" ] | ||
} |
18 changes: 18 additions & 0 deletions
18
chrome/services/sharing/public/cpp/sharing_webrtc_metrics.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chrome/services/sharing/public/cpp/sharing_webrtc_metrics.h" | ||
|
||
#include "base/metrics/histogram_functions.h" | ||
#include "base/strings/strcat.h" | ||
|
||
namespace { | ||
// Common prefix for all webrtc metric in Sharing service. | ||
const char kMetricsPrefix[] = "Sharing.WebRtc."; | ||
} // namespace | ||
|
||
void LogWebRtcAddIceCandidate(bool success) { | ||
base::UmaHistogramBoolean(base::StrCat({kMetricsPrefix, "AddIceCandidate"}), | ||
success); | ||
} |
11 changes: 11 additions & 0 deletions
11
chrome/services/sharing/public/cpp/sharing_webrtc_metrics.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROME_SERVICES_SHARING_PUBLIC_CPP_SHARING_WEBRTC_METRICS_H_ | ||
#define CHROME_SERVICES_SHARING_PUBLIC_CPP_SHARING_WEBRTC_METRICS_H_ | ||
|
||
// Logs whether adding ice candidate was successful. | ||
void LogWebRtcAddIceCandidate(bool success); | ||
|
||
#endif // CHROME_SERVICES_SHARING_PUBLIC_CPP_SHARING_WEBRTC_METRICS_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters