New issue
Advanced search Search tips

Issue 857215 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

component_updater::OnDemandUpdater should allow foreground and background calls.

Project Member Reported by sorin@chromium.org, Jun 27 2018

Issue description

Component updater exposes an OnDemandUpdater, which can be programmatically called to initiate an update of a component. The current implementation handles such calls with foreground priorities, meaning that the download and the install of the component happen as fast as possible. 

This is the correct behavior when the call to the OnDemandUpdater is the result of a user interaction. 

However, there are cases in which the user is not involved, and still, we'd like to allow OnDemandUpdater calls, and it is ok if the download or the install occur at background priority.

The request is for the OnDemandUpdater class to expose something like:

// The priority of the on demand update. Calls with |BACKGROUND| priority may
// be queued up but calls with |FOREGROUND| priority may be processed right
// away.
enum class Priority { BACKGROUND = 0, FOREGROUND = 1 };
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d20ed85342da5d84b5c5584bde3af399a20e5925

commit d20ed85342da5d84b5c5584bde3af399a20e5925
Author: Sorin Jianu <sorin@chromium.org>
Date: Thu Jun 28 17:24:31 2018

component_updater::OnDemandUpdater should allow foreground and background calls.

This change introduces a Priority parameter for
component_updater::OnDemandUpdater::OnDemandUpdate.

The change is mechanical for the existing implementation.

Bug:  857215 

Change-Id: I736b2ece704a8dda8d8f2d5a0d6d6419ceb22402
Reviewed-on: https://chromium-review.googlesource.com/1111558
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571176}
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/cros_component_installer_chromeos.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/supervised_user_whitelist_installer_unittest.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/sw_reporter_installer_win.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/component_updater/vr_assets_component_installer.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/plugins/plugin_observer.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/policy/policy_browsertest.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/chrome/browser/ui/webui/components_ui.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/components/component_updater/component_updater_service.cc
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/components/component_updater/component_updater_service.h
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/components/component_updater/component_updater_service_internal.h
[modify] https://crrev.com/d20ed85342da5d84b5c5584bde3af399a20e5925/components/component_updater/component_updater_service_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment