tree: 4abce69878a3aabc50843e8eb0bbce56161c89ee [path history] [tgz]
  1. internal/
  2. java/
  3. javatests/
  4. junit/
  5. BUILD.gn
  6. bulk_leak_check_controller_android.cc
  7. bulk_leak_check_controller_android.h
  8. bulk_leak_check_controller_android_unittest.cc
  9. DEPS
  10. password_check_bridge.cc
  11. password_check_bridge.h
  12. password_check_ui_status.h
  13. README.md
chrome/browser/password_check/android/README.md

Password Check Android Feature

This folder contains the Android UI implementation for the Password Check feature. Password Check provides users with an overview of compromised credentials and options to fix them.

Use case

This component displays a set of compromised credentials. The user can fight any potential misuse by changing affected credentials (either for a particular site or on all pages). The site will support different kinds of compromised credentials.

Folder Structure

java/

The root folder contains the public interface of this component and data that is used by other components (like the settings fragment). This folder also contains the factory to instantiate the component. The factory has two implementations:

  • an auto-generated one returning null which is used in tests and targets that don't directly depend on this component
  • one that provides the actual implementation

Add chrome/browser/password_check/android:public_java as dependency to use the interface and classes defined here.

java/internal/

Contains the actual implementation. Don't try to use any class defined here outside of this package. If you need access to any method, consider making it part of the public interface as defined in PasswordCheckComponent

This folder contains a separate README that explains in detail how the architecture looks like and how to extend the component further.

junit/

Contains Robolectric tests that test the controller of the component. These tests run without emulator which means that they are incredibly fast but cannot instantiate or verify Android Views. The public build and run target is password_check_junit_tests. Run them with:

./out/<OutDirectory>/bin/run_password_check_junit_tests

Although the entire suite should run in seconds, you can filter tests with -f.

javatests/

Contains View and Integration tests. These tests need an emulator which means that they run slowly but can test rendered Views. The public build and run target is chrome_public_test_apk. Run them with:

./out/<OutDirectory>/bin/run_chrome_public_test_apk -f *PasswordCheck*

Example usage


// Currently, you need access to internal/ to instantiate the component: PasswordCheckComponent component = new PasswordCheckComponentFactory.createComponent(/*...*/); component.initialize(activity);