• Guillaume Jenkins's avatar
    [iOS intents] Fix Search in Chrome shortcut when in foreground · 7dc53d3b
    Guillaume Jenkins authored
    The Search in Chrome intent wasn't doing anything if Chrome was in
    the foreground, because in that case a separate code path is used and
    that code path did not check for |searchQuery| in the startup
    parameters.
    
    The fix is to have that code path properly check for and handle
    |searchQuery|. Because performing a search requires the user's default
    search engine, the current BrowserState must now be passed to the
    user activity handler.
    
    The code that generates the search URL from the user's default search
    engine has been refactored into a reusable function so it can be called
    from the foreground code path.
    
    Bug: 1115998
    Change-Id: I88899ef8236584b0f69ea58362960abf6924650f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2356669
    Commit-Queue: Guillaume Jenkins <gujen@google.com>
    Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
    Reviewed-by: default avatarMark Cogan <marq@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#800239}
    7dc53d3b
user_activity_handler.mm 24.3 KB