diff options
author | bauerb <bauerb@chromium.org> | 2015-02-26 17:29:24 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-27 01:30:24 +0000 |
commit | 9dcd9897bddc7f8b2da43292c72c025a60c58fbc (patch) | |
tree | 941478ef1fd3061f28e93177678654bbb3fad32e /components/component_updater/default_component_installer.h | |
parent | 6274399b9a1e29985f9604e01e8e7d28c9def596 (diff) | |
download | chromium_src-9dcd9897bddc7f8b2da43292c72c025a60c58fbc.zip chromium_src-9dcd9897bddc7f8b2da43292c72c025a60c58fbc.tar.gz chromium_src-9dcd9897bddc7f8b2da43292c72c025a60c58fbc.tar.bz2 |
Don't check for supervised user whitelist updates until after registering the corresponding component.
Previously, the call to OnDemandUpdate would fail because the component wasn't registered yet, but SupervisedUserWhitelistInstaller didn't check the return value. Now it does, and the unit test checks that OnDemandUpdate isn't called too early.
BUG=436459
Review URL: https://codereview.chromium.org/938053002
Cr-Commit-Position: refs/heads/master@{#318372}
Diffstat (limited to 'components/component_updater/default_component_installer.h')
-rw-r--r-- | components/component_updater/default_component_installer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/components/component_updater/default_component_installer.h b/components/component_updater/default_component_installer.h index 5815cd1..1725798 100644 --- a/components/component_updater/default_component_installer.h +++ b/components/component_updater/default_component_installer.h @@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "base/callback_forward.h" #include "base/compiler_specific.h" #include "base/macros.h" #include "base/memory/ref_counted.h" @@ -90,7 +91,9 @@ class DefaultComponentInstaller : public update_client::ComponentInstaller { scoped_ptr<ComponentInstallerTraits> installer_traits); // Registers the component for update checks and installs. - void Register(ComponentUpdateService* cus); + // The passed |callback| will be called once the initial check for installed + // versions is done and the component has been registered. + void Register(ComponentUpdateService* cus, const base::Closure& callback); // Overridden from ComponentInstaller: void OnUpdateError(int error) override; @@ -108,7 +111,8 @@ class DefaultComponentInstaller : public update_client::ComponentInstaller { const base::FilePath& unpack_path, const base::FilePath& install_path); void StartRegistration(ComponentUpdateService* cus); - void FinishRegistration(ComponentUpdateService* cus); + void FinishRegistration(ComponentUpdateService* cus, + const base::Closure& callback); void ComponentReady(scoped_ptr<base::DictionaryValue> manifest); void UninstallOnTaskRunner(); |