Change information
Commit message:
[context-input] Add CHECK for enterprise policy checking
Adds a method to the session handle that checks for the enterprise
policy. If this method is not called before context is uploaded, this
will trigger a crash.
Also adds calls to this new method wherever SessionHandles are created.
Tested locally with omnibox popup flow, ntp flow, and manual navigation
to contextual-tasks, and issuing context uploads, without crashes.
No changes are need on Android because the query controller bridge is
used, bypassing the session handle.
(cherry picked from commit 38e7f429963be03ff6705540ca25f880b4db789a)
Bug: b:469148340, b:469875164, b:469877869, b:469875837, b:469877646, b:469875247, b:469875271, b:470072061, 471210631
Change-Id: I90d6dba87914ca08790649d44d150177e2cb9660
Cr-Original-Commit-Position: refs/heads/main@{#1560682}
Cr-Commit-Position: refs/branch-heads/7559@{#2107}
Cr-Branched-From: 223dfbac1c7542a06b422390d954afe5b560b607-refs/heads/main@{#1552494}
Files:
- M chrome/browser/contextual_tasks/contextual_tasks_composebox_handler_unittest.cc
- M chrome/browser/contextual_tasks/contextual_tasks_ui.cc
- M chrome/browser/contextual_tasks/contextual_tasks_ui_service.cc
- M chrome/browser/ui/lens/lens_query_flow_router.cc
- M chrome/browser/ui/lens/lens_query_flow_router_unittest.cc
- M chrome/browser/ui/webui/cr_components/composebox/composebox_handler_unittest.cc
- M chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
- M chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_browsertest.cc
- M chrome/browser/ui/webui/searchbox/contextual_searchbox_handler_unittest.cc
- M chrome/browser/ui/webui_browser/webui_browser_ui.cc
- M components/contextual_search/BUILD.gn
- M components/contextual_search/contextual_search_service_unittest.cc
- M components/contextual_search/contextual_search_session_handle.cc
- M components/contextual_search/contextual_search_session_handle.h
- M components/contextual_tasks/internal/pending_context_decorator_unittest.cc
- M ios/chrome/browser/composebox/coordinator/composebox_input_plate_coordinator.mm
- M ios/chrome/browser/composebox/coordinator/composebox_input_plate_mediator_unittest.mm
Change size: M
Delta: 18 files changed, 133 insertions(+), 19 deletions(-)
Branch: refs/branch-heads/7559
Submit Requirements:
Code-Review: Bot-Commit+1 by Rubber Stamper