Change information
Commit message:
[143][context-input] Update cluster info lifecycle for query controller
The query controller may be controlled by multiple UIs at the same time,
so the UI should no longer be in charge of managing the lifecycle of the
query controller. This cl moves the session initialization flow (i.e.
fetching cluster info) to a InitializeIfNeeded method.
Since the cluster info is no longer cleared upon session end, this cl
removes the clear-on-session-start flag and behaviour. It also fixes the
BUILD config for the query controller unit tests and updates some
constants there.
(cherry picked from commit f74cd402a89f61ea2b34efff4586acf97053f7e6)
Bug: b:457472466, b:452118691, 460125833
Change-Id: If3af72c16a90a69ca955eeb802a66bd5fd6bf097
Cr-Original-Commit-Position: refs/heads/main@{#1540243}
Cr-Commit-Position: refs/branch-heads/7499@{#1574}
Cr-Branched-From: b30439823e5177773584139e72e0593e36863899-refs/heads/main@{#1536371}
Files:
- M chrome/browser/android/omnibox/composebox_query_controller_bridge.cc
- M chrome/browser/ui/webui/new_tab_page/composebox/composebox_handler_unittest.cc
- M chrome/browser/ui/webui/new_tab_page/composebox/variations/composebox_fieldtrial.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_handler.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_test_utils.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_test_utils.h
- M components/BUILD.gn
- M components/contextual_search/contextual_search_context_controller.h
- M components/contextual_search/internal/composebox_query_controller.cc
- M components/contextual_search/internal/composebox_query_controller.h
- M components/contextual_search/internal/composebox_query_controller_unittest.cc
- M components/contextual_search/internal/test_composebox_query_controller.cc
- M components/contextual_search/internal/test_composebox_query_controller.h
- M ios/chrome/browser/aim/prototype/coordinator/aim_prototype_composebox_mediator.mm
Change size: L
Delta: 15 files changed, 120 insertions(+), 311 deletions(-)
Branch: refs/branch-heads/7499
Submit Requirements:
Code-Review: +1 by Lei Zhang, +1 by manuk hovanesian, +1 by Duncan Mercer