Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[omnibox] Fix calc annotations not showing up.
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. Bug: 1402793, 1383985 Change-Id: I5606113334ba6b473b9c6aa562312a85d3cf5b29 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4115267 Reviewed-by: Khalid Peer <khalidpeer@chromium.org> Commit-Queue: manuk hovanesian <manukh@chromium.org> Cr-Commit-Position: refs/heads/main@{#1085973}
- Loading branch information