Migrate URLLoaderWrapper to base::OnceCallback
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}
Showing
Please register or sign in to comment