commit | 4b3aa684f19390afaa8cb4c10767cdaa14d0432c | [log] [tgz] |
---|---|---|
author | Michael Cui <mlcui@google.com> | Tue Feb 18 23:29:29 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 18 23:29:29 2025 |
tree | 3cb373ae59e78a5c15c5824a98dc5c872fc7c217 | |
parent | d8101de84a909cd8cc8f2fc57f016bacda7ba6ff [diff] |
sunfish: Differentiate between empty and failed OCR responses From `CaptureModeController`, there is no way of differentating between an OCR request that has successfully completed with "no text detected", and "OCR request failed". Without this differentiation, we cannot emit detailed, accurate metrics. Differentiate between them using a `std::optional<std::string>`, where `std::nullopt` represents a failed request. While no visible behaviour has changed in this CL - as `std::nullopt` is treated the same as the empty string in `CaptureModeController` - this will allow for different behavior in future CLs. Bug: b:397296160 Change-Id: I6a6a21009d72a70ccda900d8b8bae06d8b34d2c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6274667 Reviewed-by: Ahmed Fakhry <afakhry@chromium.org> Reviewed-by: Michelle Chen <michellegc@google.com> Reviewed-by: Elijah Hewer <hewer@chromium.org> Commit-Queue: Michael Cui <mlcui@google.com> Cr-Commit-Position: refs/heads/main@{#1421676}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.