New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 821823 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
hobby only
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task

Blocking:
issue 817292



Sign in to add a comment

Inline histogram names in SavePasswordsPreferences

Project Member Reported by vabr@chromium.org, Mar 14 2018

Issue description

Keeping them in String constants prevents presubmit checks on the histograms being used.
 

Comment 1 by vabr@chromium.org, Mar 15 2018

This was originally inspired by https://chromium-review.googlesource.com/c/chromium/src/+/909108/2/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java#137

I was looking for the concrete histogram-checking presubmit check. So far, I found the one for (Objective-)C++: _CheckUmaHistogramChanges in //PRESUBMIT.py. I was not able to find the one for Java yet.

Also, there appears to be only one non-inlined histogram name in chrome/android/java/src/org/chromium/chrome/browser/preferences/password/, and I'm removing that one soon.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07ef4996a501f1a447e9e605d927452e9f273d44

commit 07ef4996a501f1a447e9e605d927452e9f273d44
Author: Vaclav Brozek <vabr@chromium.org>
Date: Fri Mar 16 12:28:16 2018

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/964842
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543672}
[modify] https://crrev.com/07ef4996a501f1a447e9e605d927452e9f273d44/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java

Comment 3 by vabr@chromium.org, Mar 16 2018

Status: Fixed (was: Assigned)

Sign in to add a comment