The experiment to disable PDF partial loading was successful, so we're
making it the default now.
The PdfPartialLoading and PdfIncrementalLoading features will be kept
for now for tests that rely on these features (often to test mostly
unrelated behaviors).
Fixed: 1115149
Change-Id: Iea45106f919d1fa608fcf6cfc28e432c88d4d75b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505972
Commit-Queue: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Auto-Submit: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823998}
Drops various GetDownloadProgress() APIs from the PDF viewer because:
1. We never call pp::URLRequestInfo::SetRecordDownloadProgress(), so
calls to pp::URLLoader::GetDownloadProgress() always return false.
2. We only use GetDownloadProgress() in DocumentLoaderImpl, to try to
get the total content length if we fail to get it from the
Content-Length header. But the total content length reported by
GetDownloadProgress() also comes from Content-Length, so this is not
useful.
3. GetDownloadProgress() won't be useful post-Pepper, as
blink::WebAssociatedURLLoader does not have a similar API. Instead,
the client is expected to track this internally.
Bug: 1099022
Change-Id: I6f2f183e84b2d9e4c0dee2c116ac08bce3dc4ed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429545
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810442}
Adds a "PdfPartialLoading" feature to control whether or not the PDF
viewer tries to use partial loading. The default state is enabled, as
this feature has shipped already, but we would like to experiment with
disabling it to address certain problems related to partial loading.
Bug: 1115149
Change-Id: Ie66fddf5b633269226bc01fca20ac7013f0c1e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349429
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797378}
Switches chrome_pdf::URLLoaderWrapper's API from pp::CompletionCallback
to base::OnceCallback. pp::CompletionCallback is still used internally
when calling Pepper APIs., but clients of URLLoaderWrapper no longer
need to deal with pp::CompletionCallback.
Using base::OnceCallback also simplifies resource management,
eliminating the need to manage references to pp::CompletionCallback.
With respect to thread safety, most Pepper APIs invoke asynchronous
callbacks on the original caller's thread, so there should be no new
thread safety issues. The base:: APIs also do sequence checking in
DCHECK mode, which should catch any unanticipated issues.
Bug: 1099022, 1101169
Change-Id: Ia355588b25b54a776ac972a7b5b2104b1a3b18c8
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2278169
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#785816}
CHECK, CHECK_EQ etc., and NOTREACHED/NOTIMPLEMENTED have moved
to the much smaller headers check.h, check_op.h, and notreached.h,
respectively.
This CL updates .cc files to use those headers instead when
possible, with the purpose of saving compile time.
(Split out from https://crrev.com/c/2164525 which also has
notes on how the change was generated.)
Bug: 1031540
Change-Id: Ia89f8dd8a7ca818e539d4be41556e247e9849017
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2164637
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763916}
This CL removes MimeHandlerService::AbortStream and all uses of it,
since it's a no-op. The pdf viewer currently calls it via
CancelBrowserDownload, which this CL also removes. The pdf request
actually gets stopped by resetting the chrome_pdf::URLLoaderWrapper,
which closes the connection on desctruction.
Bug: 934009
Change-Id: Ib3cc6fb1aa12270d39c16a6770d3726a3198682c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1696444
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#677545}
To make it easier to write fake DocumentLoaders for testing. Split the
implementation off into DocumentLoaderImpl.
Change-Id: I44f16c757b8a9be133936c41c231a552a7e05f0a
Reviewed-on: https://chromium-review.googlesource.com/1013998
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553816}