commit | 36d9117ab5c372cfc04c9e3370fe622b591bad09 | [log] [tgz] |
---|---|---|
author | Sam Goto <goto@chromium.org> | Thu Jul 18 02:55:21 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 18 02:55:21 2019 |
tree | 907b256c6e3680c3c7816a7614bd343fa26866e4 | |
parent | 0fcb5aa45e88959e36347cba033f6d41588cc802 [diff] |
[sms] Make the lifecycle of SmsServices be managed by FrameServiceBase In the current architecture, SmsService is owned by SmsKeyedService which is owned by Profiles. SmsReceiverImpl is owned by SmsServiceImpl and the StrongBindingSet, which has no connection (from a memory perspective), to RenderFrameHosts. There are no guarantees that the mojo clients are going to outlive the RenderFrameHosts, so we run into possible cases where SmsReceiverImpl is handling requests after the RenderFrameHost was destructed (@see bugs). To address this problem, and make the architecture consistent with other comparable features, this cl makes the SmsService a subclass of FrameServiceBase, which is responsible for managing its lifecycle and memory based on events dispatched by the lifecycle of the RenderFrameHost. We keep the SmsProvider owned by the BrowserMainLoop, which is effectively a singleton. To facilitate BrowserTest testing, we expose a BrowserMainLoop::SetSmsProviderForTesting static method. Design Doc: https://docs.google.com/document/d/1dB5UM9x8Ap2-bs6Xn0KnbC_B1KNLIUv4W05MunuXYh0/edit# Bug: 979265,982370,979418 Change-Id: Ic2b0a9b35fa1f5a3e28c84d77d78c22d41b09ad0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1691683 Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Ayu Ishii <ayui@chromium.org> Reviewed-by: Jun Cai <juncai@chromium.org> Reviewed-by: Reilly Grant <reillyg@chromium.org> Commit-Queue: Sam Goto <goto@chromium.org> Cr-Commit-Position: refs/heads/master@{#678558}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .