0
Files
src/pdf
Lei Zhang a70ba914fa Return std::optional in PDFiumEngine::GetProgressiveIndex()
Instead of using int -1 as a sentinel value for "no index found", switch
GetProgressiveIndex() to return std::optional<size_t>. Then a bunch of
int to size_t casts can go away, and more index variables can be
declared as size_t.

Along the way, also upgrade some cheap DCHECKs to CHECKs, and change
ContinuePaint() to return early when possible.

Change-Id: Iea544f39bd112190ac1ccd3a615328af10db4648
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5874539
Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Andy Phan <andyphan@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1357330}
2024-09-18 21:38:46 +00:00
..
2024-09-18 14:23:33 +00:00
2024-09-18 14:23:33 +00:00

//pdf contains the PDF plugin, its Blink-based replacement, as well as PDF utility functions that leverage PDFium. It can use low-level components that live below the content layer, as well as other foundational code like //printing. It should not use //content or anything in //components that lives above the content layer. Code that lives above the content layer should live in //components/pdf, or in the embedder. All the code here should run in sandboxed child processes.

TODO(crbug.com/40186598): Remove existing //content dependencies.