Commit 08ba61fb authored by ckitagawa's avatar ckitagawa Committed by Commit Bot

[Paint Preview] Allow a partial capture success to pass

Minor change. Allows partial success status to count as a success. This
means one or more subframes were unable to be captured. Usually this is
due to a subframe not being loaded (e.g. lazily loaded iframe). This
loss in fidelity is usually minor and acceptable.

Change-Id: I65a4ca2d0e366e4b93bfede7212b45ff2f6d7fd8
Bug: 1084657
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2211914Reviewed-by: default avatarMehran Mahmoudi <mahmoudi@chromium.org>
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771624}
parent 6410e7e9
...@@ -148,7 +148,9 @@ void PaintPreviewBaseService::OnCaptured( ...@@ -148,7 +148,9 @@ void PaintPreviewBaseService::OnCaptured(
if (web_contents) if (web_contents)
web_contents->DecrementCapturerCount(true); web_contents->DecrementCapturerCount(true);
if (status != mojom::PaintPreviewStatus::kOk || !proto) { if (!(status == mojom::PaintPreviewStatus::kOk ||
status == mojom::PaintPreviewStatus::kPartialSuccess) ||
!proto) {
DVLOG(1) << "ERROR: Paint Preview failed to capture for document " DVLOG(1) << "ERROR: Paint Preview failed to capture for document "
<< guid.ToString() << " with error " << status; << guid.ToString() << " with error " << status;
std::move(callback).Run(kCaptureFailed, nullptr); std::move(callback).Run(kCaptureFailed, nullptr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment