Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[m110][omnibox] Fix calc annotations not showing up.
Merging to m110. Currently, the calc suggestion for the input '3+4' will display '3+4' instead of '3+4 \n 7'. Before CL crrev.com/c/4067382, the suggest response parsing flow was: if (IsCalc()) SetCalcAnnotation(); if (HasJsonData() SetJsonAnnotation(); And that worked fine, because calc suggestions didn't have JSON data, so they'd get the calc annotations. CL crrev.com/c/4067382 changed the flow to: if (IsCalc()) SetCalcAnnotation(); if (HasProtoData() SetProtoAnnotation(); else SetJsonAnnotation(); This is problematic, because the non-existent JSON annotation is overwriting the correct calc annotation. This CL changes the logic to: if (IsCalc()) SetCalcAnnotation(); if (HasProtoData() SetProtoAnnotation(); if (HasJsonData()) SetJsonAnnotation(); Also removes some unused leftover local variables. (cherry picked from commit 76ff5cf) Bug: 1402793, 1383985 Change-Id: I5606113334ba6b473b9c6aa562312a85d3cf5b29 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4115267 Reviewed-by: Khalid Peer <[email protected]> Commit-Queue: manuk hovanesian <[email protected]> Cr-Original-Commit-Position: refs/heads/main@{#1085973} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4119311 Commit-Queue: Rubber Stamper <[email protected]> Auto-Submit: manuk hovanesian <[email protected]> Bot-Commit: Rubber Stamper <[email protected]> Cr-Commit-Position: refs/branch-heads/5481@{#48} Cr-Branched-From: 130f3e4-refs/heads/main@{#1084008}
- Loading branch information