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

Issue 810016 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

Separate export flow handling from SavePasswordsPreferences.java to a separate class

Project Member Reported by vabr@chromium.org, Feb 7 2018

Issue description

As pointed out in https://chromium-review.googlesource.com/c/chromium/src/+/899363/4/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java#334, the export flow blew up the preferences fragment quite a bit. It should get separated out of the preferences.

Perhaps this will also allow testing to be further modularised, e.g., on the preferences fragment side we could mock out the answer to tapping menu items, and on the export flow site we could get rid of tapping to get things started.
 

Comment 1 by vabr@chromium.org, Feb 28 2018

Blocking: 817292
Project Member

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

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

commit 8ce77a0228e3cde50d2d4d6b378c91f71b53b7ec
Author: Vaclav Brozek <vabr@chromium.org>
Date: Thu Mar 22 18:03:25 2018

Split code from SavePasswordsPreferences to ExportFlow

SavePasswordsPreferences currently contain code to handle showing
stored passwords, searching in them, and also exporting them.

While searching passwords is tighly coupled with displaying them,
exporting has nothing in common with displaying, apart from handling
the same data.

To make the classes more focused and reasonably sized, this CL splits
the explort flow UX logic from SavePasswordsPreferences.java to a new
class, ExportFlow.java.

The Espresso tests for export remain part of
SavePasswordsPreferencesTest.java, because from the user point of view
nothing changes and the export flow is still part of the functionality
offered on the settings page provided by SavePasswordsPreferences. Not
changing the tests during a refactoring also ensures that no
unintentional behaviour was introduced.

Bug:  810016 
Change-Id: I90e1a5b62f3a3ed7573d62fcf97d49519cbfc074
Reviewed-on: https://chromium-review.googlesource.com/973205
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545150}
[add] https://crrev.com/8ce77a0228e3cde50d2d4d6b378c91f71b53b7ec/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/ExportFlow.java
[modify] https://crrev.com/8ce77a0228e3cde50d2d4d6b378c91f71b53b7ec/chrome/android/java/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferences.java
[modify] https://crrev.com/8ce77a0228e3cde50d2d4d6b378c91f71b53b7ec/chrome/android/java_sources.gni
[modify] https://crrev.com/8ce77a0228e3cde50d2d4d6b378c91f71b53b7ec/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/password/SavePasswordsPreferencesTest.java

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

Status: Fixed (was: Assigned)

Comment 4 by vabr@chromium.org, Mar 22 2018

Labels: -Type-Bug Type-Task

Sign in to add a comment