tree: 0087f235d8dd756631f38223eb7d9eee89a76679 [path history] [tgz]
  1. content/
  2. core/
  3. ios/
  4. DEPS
  5. OWNERS
  6. README.md
components/password_manager/README.md

Password Manager

The password manager is a component layered.

This means that the code is spread out through the following directories:

  • ./core/: Essentials, not depending on any other layers. All other layers may depend on core.
  • ./content/: Content-specific embedding.
  • ./ios/: iOS-specific embedding.

NOTE: Some embedder specific code must not be part of content (e.g. UI specific code) and located in

  • /chrome/browser/password_manager/
  • /chrome/android/java/src/org/chromium/chrome/browser/password_manager/
  • /ios/chrome/browser/passwords/

High-level architecture

The following architecture diagram shows instances of core classes. For simplicity, it shows the concrete instances in case of Chrome on desktop. In reality there exist further abstractions, e.g. the ChromePasswordManagerClient is the Chrome-specific implementation of the PasswordManagerClient interface. The ContentPasswordManagerDriver is the content specific implementation of the *::PasswordManagerDriver interfaces.

Browser                                        + UI specific code in browser
                                               | and further browser specific
+-------------------+                          | code
|PasswordFormManager<-------+                  |
+-------------------+       |                  |
                            |  1 per tab       |  1 per tab
+-------------------+       +---------------+  |  +---------------------------+
|PasswordFormManager<-------+PasswordManager<----->ChromePasswordManagerClient|
+-------------------+       +-------+-------+  |  +-------------+-------------+
                            |       |          |                |
+-------------------+       |       |          |                |
|PasswordFormManager<-------+       |          |                |
+-------------------+               |          |                |
1 per form                          |          |  +-------------v-------------+
                                    |          |  |PasswordManagerUIController|
                        1 per frame |          |  +---------------------------+
            +-----------------------+----+     |
            |ContentPasswordManagerDriver|     |
            +-----------------------+----+     |
                                    |          |
+----------------------------------------------+------------------------------+
                                    |
Renderer                            |
             +----------------------------------------------+
             |                      |                       |
             |                      |                       |
             |                      |                       |
     +-------+-----+   +------------+--------+   +----------v------------+
     |AutofillAgent|   |PasswordAutofillAgent|   |PasswordGenerationAgent|
     +-------------+   +---------------------+   +-----------------------+
             1 of each per frame

Here is a summary of the core responsibilities of the classes and interfaces: