• Brett Wilson's avatar
    Minor improvements to SelectFileDialog API. · 804e83c3
    Brett Wilson authored
    Use scoped_ptr for the policy pointer. It was an owning pointer
    already but was passed as a raw pointer.
    
    Previously the creation code in SelectFileDialog::Create would fall back on
    creating the default one if the factory returned null. This made it difficult
    to use unique_ptr with since ownership of the policy object couldn't be
    unconditionally passed to the factory. But no implementations of the factory
    return null here so this code was changed to unconditionally defer to the
    factory for dialog creation if the factory is set.
    
    Replace callers with make_unique.
    
    Minor documentation improvements.
    
    Cq-Include-Trybots: master.tryserver.chromium.win:win10_chromium_x64_rel_ng
    Change-Id: I2aea0098db3a6d259ba8e282324f0450490c4eb1
    Reviewed-on: https://chromium-review.googlesource.com/619613
    Commit-Queue: Brett Wilson <brettw@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#495723}
    804e83c3
download_file_picker.cc 4.79 KB