Commit 07ef4996 authored by Vaclav Brozek's avatar Vaclav Brozek Committed by Commit Bot

Inline histograme name in SavePasswordsPreferences.java

The histogram name "PasswordManager.Android.PasswordSearchTriggered"
is put in a String constant in SavePasswordsPreferences. There are two
reasons to inline it instead:
(1) Inlining allows better presubmit checks for undefined histogram
    names.
(2) There is only one place where the String constant is used, anyway.

This CL inlines the histogram name.

Bug: 821823
Change-Id: I16d5ed0e23e3402d0307f537eb904ae7220a2c5b
Reviewed-on: https://chromium-review.googlesource.com/964842Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543672}
parent 766bc54b
......@@ -125,11 +125,6 @@ public class SavePasswordsPreferences
// Name of the subdirectory in cache which stores the exported passwords file.
private static final String PASSWORDS_CACHE_DIR = "/passwords";
// Name of the histogram that records whether the user visiting the settings triggered the
// search.
private static final String HISTOGRAM_SEARCH_TRIGGERED =
"PasswordManager.Android.PasswordSearchTriggered";
// Potential values of the histogram recording the result of exporting. This needs to match
// ExportPasswordsResult from
// //components/password_manager/core/browser/password_manager_metrics_util.h.
......@@ -302,7 +297,8 @@ public class SavePasswordsPreferences
private void maybeRecordTriggeredPasswordSearch(boolean searchTriggered) {
if (providesPasswordSearch() && !mSearchRecorded) {
mSearchRecorded = true;
RecordHistogram.recordBooleanHistogram(HISTOGRAM_SEARCH_TRIGGERED, searchTriggered);
RecordHistogram.recordBooleanHistogram(
"PasswordManager.Android.PasswordSearchTriggered", searchTriggered);
}
}
......
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