summaryrefslogtreecommitdiffstats
path: root/components/component_updater/default_component_installer.h
diff options
context:
space:
mode:
authorbauerb <bauerb@chromium.org>2015-02-27 09:27:43 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-27 17:28:15 +0000
commita62abf7bad8d3d50d9c433ac97f1eeca7b9dfcfc (patch)
tree370fba225fa40a40fc7a726e2eba8e983b0abf34 /components/component_updater/default_component_installer.h
parentd49594b5595a26fd0cb5e30a3e0255e74f31a5f5 (diff)
downloadchromium_src-a62abf7bad8d3d50d9c433ac97f1eeca7b9dfcfc.zip
chromium_src-a62abf7bad8d3d50d9c433ac97f1eeca7b9dfcfc.tar.gz
chromium_src-a62abf7bad8d3d50d9c433ac97f1eeca7b9dfcfc.tar.bz2
Reland r318372: 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 Review URL: https://codereview.chromium.org/962993002 Cr-Commit-Position: refs/heads/master@{#318474}
Diffstat (limited to 'components/component_updater/default_component_installer.h')
-rw-r--r--components/component_updater/default_component_installer.h8
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();