Commit 8dc55380 authored by Daniel McArdle's avatar Daniel McArdle Committed by Commit Bot

Mark Net.Certificate.ClientCertDialogCount.Android UMA obsolete

Bug: 1048210
Change-Id: Ia2ba09cf13fa0db4b6dc68a9d968028cc97831cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2081519Reviewed-by: default avatarCharlie Harrison <csharrison@chromium.org>
Reviewed-by: default avatarDan McArdle <dmcardle@chromium.org>
Commit-Queue: Dan McArdle <dmcardle@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746935}
parent ee62035e
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/containers/queue.h" #include "base/containers/queue.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/metrics/histogram_macros.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "chrome/android/chrome_jni_headers/SSLClientCertificateRequest_jni.h" #include "chrome/android/chrome_jni_headers/SSLClientCertificateRequest_jni.h"
#include "chrome/browser/ssl/ssl_client_certificate_selector.h" #include "chrome/browser/ssl/ssl_client_certificate_selector.h"
...@@ -103,20 +102,12 @@ class SSLClientCertPendingRequests ...@@ -103,20 +102,12 @@ class SSLClientCertPendingRequests
void ReadyToCommitNavigation( void ReadyToCommitNavigation(
content::NavigationHandle* navigation_handle) override; content::NavigationHandle* navigation_handle) override;
void WebContentsDestroyed() override;
class CertificateDialogPolicy { class CertificateDialogPolicy {
public: public:
// Has the maximum number of cert dialogs been exceeded? // Has the maximum number of cert dialogs been exceeded?
bool MaxExceeded() { return count_ >= k_max_displayed_dialogs; } bool MaxExceeded() { return count_ >= k_max_displayed_dialogs; }
// Resets counter. Should be called on navigation. // Resets counter. Should be called on navigation.
void ResetCount() { void ResetCount() { count_ = 0; }
// Record sample right before the value is reset. This represents the
// maximum number of certificate dialogs displayed by sites in the wild.
UMA_HISTOGRAM_COUNTS_10000(
"Net.Certificate.ClientCertDialogCount.Android", count_);
count_ = 0;
}
// Increment the counter. // Increment the counter.
void IncrementCount() { count_++; } void IncrementCount() { count_++; }
...@@ -301,11 +292,6 @@ void SSLClientCertPendingRequests::ReadyToCommitNavigation( ...@@ -301,11 +292,6 @@ void SSLClientCertPendingRequests::ReadyToCommitNavigation(
} }
} }
void SSLClientCertPendingRequests::WebContentsDestroyed() {
// Record UMA sample for last page loaded in WebContents.
dialog_policy_.ResetCount();
}
void ClientCertRequest::CertificateSelected( void ClientCertRequest::CertificateSelected(
scoped_refptr<net::X509Certificate> cert, scoped_refptr<net::X509Certificate> cert,
scoped_refptr<net::SSLPrivateKey> key) { scoped_refptr<net::SSLPrivateKey> key) {
......
...@@ -84208,6 +84208,10 @@ uploading your change for review. ...@@ -84208,6 +84208,10 @@ uploading your change for review.
<histogram name="Net.Certificate.ClientCertDialogCount.Android" units="dialogs" <histogram name="Net.Certificate.ClientCertDialogCount.Android" units="dialogs"
expires_after="2020-03-14"> expires_after="2020-03-14">
<obsolete>
Removed 03/2020, since the client cert dialog capping logic has been in
place for a year now without any problems.
</obsolete>
<owner>dmcardle@chromium.org</owner> <owner>dmcardle@chromium.org</owner>
<owner>davidben@chromium.org</owner> <owner>davidben@chromium.org</owner>
<summary> <summary>
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