• Ce Chen's avatar
    [omnibox] Add OnDeviceModelUpdateListener and update updater id. · 20a56d8f
    Ce Chen authored
    The instance of this class is accessed as an NoDestructor by the model
    component installer to notify the corresponding provider when model
    update is finished, to replace the current polling mechanism over
    DIR_ON_DEVICE_HEAD_SUGGEST in the provider.
    
    Consequently remove DIR_ON_DEVICE_HEAD_SUGGEST since it is no longer
    needed. May remove component updater from omnibox later if it is not
    needed neither.
    
    New component updater ID was previously approved in
    https://crrev.com/c/1710827.
    
    Tested on Nexus 5X for both new model download and pre installed model
    discovery.
    
    Note I cannot test on iOS, as looks like the Component needs to be
    registered at ios/chrome/app/main_controller.mm rather than
    chrome/browser/chrome_browser_main.cc for iOS (though I'm not sure
    what is the best way to register the component in iOS as
    chrome/browser/component_updater is currently not visible in
    ios/chrome/app/). However if I register at main_controller.mm, my dev
    app will crash at ComponentUnpacker::BeginUnzipping() when calling
    unzipper_->Unzip(...) before ComponentUnpacker::EndUnzipping(), with
    error http://screenshot/NqFrd299dnq and http://screenshot/g9RjyC34NaQ.
    
    Bug: 925072
    Change-Id: I99f0baf2bef23a7927847d93467f4be8878931dd
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711030Reviewed-by: default avatarTommy Li <tommycli@chromium.org>
    Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
    Commit-Queue: Ce Chen <cch@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#680561}
    20a56d8f
autocomplete_provider_client.h 6.78 KB