• Tommy C. Li's avatar
    [omnibox] Gate DEFAULT_SERP_FOR_URL by page classification · c79d39ab
    Tommy C. Li authored
    Currently, ZeroSuggestProvider uses DEFAULT_SERP_FOR_URL by default.
    
    After this CL, ZeroSuggestProvider will use NONE as the default.
    
    And there will be a ZeroSuggestVariant value of "RemoteSendURL" that
    can be queried via:
    OmniboxFieldTrial::InZeroSuggestRemoteSendURLFieldTrial()
    
    The objective of this is twofold:
    
     1) Enable us to switch put certain page classifications into the
        DEFAULT_SERP_FOR_URL mode without putting every page classification
        into this. This is needed for On Focus Query
        Refinement.
    
     2) Disables ZeroSuggestProvider by default for all page
        classifications not in this field trial. This will allow us to
        get rid of the fake ZeroSuggestRedirectToChrome URL method of
        disabling ZeroSuggestProvider, which is not obvious.
    
        This is also fairly important for On Focus Query Refinement, as
        then we will want to specify a real endpoint URL, not a fake one
        to disable the feature.
    
    Bug: 963173
    Change-Id: I61ce4bbf2f228b477bdf82c581b4cedd88fa546b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632920Reviewed-by: default avatarMark Pearson <mpearson@chromium.org>
    Commit-Queue: Tommy Li <tommycli@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#665959}
    c79d39ab
zero_suggest_provider.cc 25.1 KB