• Lei Zhang's avatar
    Remove PrintPreviewUI::ShouldCompositeDocumentUsingIndividualPages(). · 8b0e55f5
    Lei Zhang authored
    The removed method is only used in PrintPreviewMessageHandler, and
    PrintPreviewMessageHandler already has ShouldUseCompositor(), which does
    exactly the same thing. Once all the calls to
    ShouldCompositeDocumentUsingIndividualPages() has been replaced,
    PrintPreviewMessageHandler::OnMetafileReadyForPrinting() now has:
    
    if (ShouldUseCompositor(ptr)) {
      if (ShouldUseCompositor(ptr)) {
        ...
      } else {
        // Dead code.
      }
    }
    
    Remove the dead code and simplify the surrounding code. With the
    cleanup, OnMetafileReadyForPrinting() can also make its IPC parameter
    check more strict.
    
    Change-Id: I137f0ceb82f40ede6b61ac3c29fd43d99c12851a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037088
    Commit-Queue: Lei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarDaniel Hosseinian <dhoss@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#738420}
    8b0e55f5
print_preview_message_handler.h 5.44 KB