| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
1. Creating DeviceAuthenticator on demand in Authenticate().In order for the tests to be happy, I think you may need to remove the dependency from [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7786130/79/chrome/browser/profiles/profile_keyed_service_browsertest.cc)
As this dependency is no longer loaded on startup.
Thanks for fixing this!!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
1. Creating DeviceAuthenticator on demand in Authenticate().In order for the tests to be happy, I think you may need to remove the dependency from [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7786130/79/chrome/browser/profiles/profile_keyed_service_browsertest.cc)
As this dependency is no longer loaded on startup.
Thanks for fixing this!!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+ Hidehiko for OWNERS of the test
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"ChromeDeviceAuthenticator",could you elaborate the background of this removal in the commit message?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
"ChromeDeviceAuthenticator",could you elaborate the background of this removal in the commit message?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Fix memory leak in AutofillAiAccessManager
AutofillAiAccessManager was creating a DeviceAuthenticator instance in
its constructor and keeping it alive for its entire lifetime. On
Android, DeviceAuthenticator holds a JNI Global Ref to
DeviceAuthenticatorBridge, which holds the Activity. If WebContents (and
thus AutofillAiAccessManager) outlived the Activity, the Activity would
leak.
Fix this by:
1. Creating DeviceAuthenticator on demand in Authenticate().
2. Resetting/destroying it when authentication completes (in the
callback) or when Reset() is called.
3. Ensuring it is only reset in Reset() if authentication was actually
in progress, to avoid destroying mocks injected in tests before
they are used.
4. Update `ProfileKeyedServiceGuestBrowserTest` expectation to remove
`ChromeDeviceAuthenticator`. Previously, `AutofillAiAccessManager`
instantiated the `DeviceAuthenticator` in its constructor, which
runs during `BrowserAutofillManager` initialization on startup. By
moving this instantiation to be lazy, `ChromeDeviceAuthenticator`
is no longer created on startup, so it must be removed from the
test's list of expected active services.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |