• Ernesto García's avatar
    omnibox: Exclude enterprise-enrolled devices from simplified domain display · f2af1ee6
    Ernesto García authored
    For a 1% experiment with simplified domain display, we should exclude
    enterprise enrolled devices to not disrupt enterprise environments when
    collecting data.
    This CL includes the following settings to achieve that purpose:
    - Added a IsEnterpriseManaged() virtual method to OmniboxViewViews, in order to
    filter whether a device is enterprise enrolled or not
    - Added |is_enterprise_managed_for_testing| variable to toggle during
    testing. It is by default FALSE, so, it should not affect previous
    tests
    - Added a SetEnterpriseManagedForTesting() method in TestOmniboxView to manually toggle the
    |is_enterprise_managed_for_testing| flag, which is used in an overrode version of IsEnterpriseManaged()
    - Add an special test to validate that URL is not unelided even when
    field trials are enabled but the device is enterprise managed
    
    Bug: 1109243
    Change-Id: I79b47374de6c9eb780b5e56bef6408d3130c4168
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2348578
    Commit-Queue: Ernesto García <ernestognw@google.com>
    Reviewed-by: default avatarCarlos IL <carlosil@chromium.org>
    Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#797930}
    f2af1ee6
omnibox_view_views.cc 111 KB