• K. Moon's avatar
    Migrate URLLoaderWrapper to base::OnceCallback · 544e0953
    K. Moon authored
    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: default avatarHenrique Nakashima <hnakashima@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#785816}
    544e0953
document_loader_impl.cc 12.8 KB