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

Unified Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 2888633002: Revert of [Autofill] Enable Autofill UKM by default. (Closed)
Patch Set: Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_metrics.cc
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc
index 20ae1e78bf76a28a828c4f1f69fa824cc41c088e..bb0cac81f67629473b4d857d929317467d220e6d 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -793,7 +793,8 @@
const GURL& url,
const std::string& ukm_entry_name,
const std::vector<std::pair<const char*, int>>& metrics) {
- if (!ukm_service || !url.is_valid() || metrics.empty()) {
+ if (!IsUkmLoggingEnabled() || !ukm_service || !url.is_valid() ||
+ metrics.empty()) {
return false;
}
@@ -1034,7 +1035,7 @@
void AutofillMetrics::FormInteractionsUkmLogger::OnFormsParsed(
const GURL& url) {
- if (ukm_service_ == nullptr)
+ if (!IsUkmLoggingEnabled() || ukm_service_ == nullptr)
return;
url_ = url;
@@ -1152,7 +1153,7 @@
}
bool AutofillMetrics::FormInteractionsUkmLogger::CanLog() const {
- return ukm_service_ && url_.is_valid();
+ return IsUkmLoggingEnabled() && ukm_service_ && url_.is_valid();
}
int64_t

Powered by Google App Engine
This is Rietveld 408576698