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

Issue 806315 link

Starred by 0 users

Issue metadata

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



Sign in to add a comment

Replace enum with @IntDef in passwords settings on Android

Project Member Reported by vabr@chromium.org, Jan 26 2018

Issue description

As discussed in [1], enum in Java comes with the cost of boxing the integer values into full classes and with potential concerns, e.g., during serialising. The recommended style for Android is to use @IntDef instead.

This bug tracks converting remaining occurrences of enum to @IntDef in the code for Chrome's passwords settings on Android.


[1] https://chromium-review.googlesource.com/c/chromium/src/+/883525/1/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ReauthenticationManager.java#28
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 30 2018

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

commit b3bd868558d6be3824dc3a32edcab1231862a08f
Author: Vaclav Brozek <vabr@chromium.org>
Date: Tue Jan 30 08:19:49 2018

Convert ReauthenticationManager.OverrideState to @IntDef

The OverrideState enum is converted in this CL to plain integers and
@IntDef for efficiency. More context on the associated bug.

Bug:  806315 
Change-Id: Ie7b5d777394ca77c9f9447d8db33754bcf9f7017
Reviewed-on: https://chromium-review.googlesource.com/889738
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532810}
[modify] https://crrev.com/b3bd868558d6be3824dc3a32edcab1231862a08f/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ReauthenticationManager.java
[modify] https://crrev.com/b3bd868558d6be3824dc3a32edcab1231862a08f/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java

Comment 2 by vabr@chromium.org, Jan 30 2018

Status: Fixed (was: Started)

Sign in to add a comment