• Dominick Ng's avatar
    Move the IntentPickerResponse callback to AppsNavigationThrottle. · 6b17a19a
    Dominick Ng authored
    This CL completes the refactoring of the ArcNavigationThrottle to be
    app-platform agnostic by moving the callback run when the user responds
    to the intent picker from ArcNavigationThrottle to
    AppsNavigationThrottle. This will enable a future CL where the
    AppsNavigationThrottle can insert non-ARC++ apps into the intent
    picker, and then launch those apps if the user selects them.
    
    There should be no functional changes from this CL. Two implementation
    changes include:
    
    1) the intent picker UI now returns an app-platform-generic CloseReason,
       and a boolean indicating if the user wanted to persist their choice.
       The AppsNavigationThrottle passes these to the ARC++ code, which
       interpolates them to the existing histogram buckets for metrics
       (which were formerly returned directly by the UI). This simplifies
       code in the UI layer, and moves responsibility for computing
       histogram values into the app-platform-specific code.
    
    2) IntentPickerResponse is changed to be a OnceCallback, which removes
       some book-keeping in the UI layer for enforcing that it is only run
       once.
    
    BUG=824598
    TBR=sky@chromium.org
    
    Change-Id: I1de4fd85c30e9ed09622ead11b709b9d6cdcfa98
    Reviewed-on: https://chromium-review.googlesource.com/983197
    Commit-Queue: Dominick Ng <dominickn@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarDavid Jacobo <djacobo@chromium.org>
    Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548306}
    6b17a19a
intent_picker_bubble_view.cc 15.6 KB