• Mark Cogan's avatar
    [iOS] Migrate away from downstream URLLoadingService use (1/7). · 0c966880
    Mark Cogan authored
    As part of preparing for multi-window, the URLLoadingService needs
    to be migrated to be a BrowserAgent instead of a KeyedService. That
    change is itself fairly large, but as an additional complication
    URLLoadingService is used in downstream code.
    
    This CL is the first in a series of changes needed to complete this
    refactor:
    
    1. Add a new provider API upstream that passes both a Browser and
       temporary URL loading shim to CreateLogoVendor.
    2. Implement this new API downstream and add support for initializing
       the LogoController with both Browser and the loading shim. Use the
       loading shim for loading URLs if it is present.
    3. Upstream, call the new CreateLogoVendor() API.
    4. Downstream, remove support for the old CreateLogoVendor() API and
       update LogoController to only be initialized with a Browser and the
       shim loader. Remove downstream use of the URLLoadingService.
    5. Upstream, refactor URLLoadingService to be URLLoadingBrowserAgent,
       including updating the upstream implementation of the loading shim
       passed downstream in CreateLogoVendor().
    6. Upstream, add a new provider API that no longer passes the loading
       shim into CreateLogoVendor().
    7. Downstream, remove use of the loading shim from LogoController and
       have it fetch the URLLoadingBrowserAgent from its Browser parameter.
       Implement the new shim-less CreateLogoVendor() API. Remove the
       implementation of the shimmed API.
    8. Upstream, remove the loading shim protocol and the old shimmed
       CreateLogoVendor() API. Call only the new shimless API.
    
    Specifically, this CL creates a shim URLLoadingBridge protocol so that
    the implementation of the actual URL load can be changed upstream in
    a single CL upstream (step 5 in the process above). At the same time,
    a Browser object is also passed into the provider so that after the
    loading service is changed, it can be fetched (via Browser) in the
    downstream code.
    
    This CL doesn't introduce any implementation of the shim protocol; that
    will be in step 3.
    
    Bug: 1046374
    Change-Id: Ic2388c0f9680dabc8cb10349255cc9ab281cccbf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089687Reviewed-by: default avatarStepan Khapugin <stkhapugin@chromium.org>
    Commit-Queue: Mark Cogan <marq@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#747748}
    0c966880
chrome_browser_provider.mm 4.39 KB