Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: components/component_updater/default_component_installer.h

Issue 879993005: Add support for uninstalling components and use it in SupervisedUserWhitelistInstaller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/component_updater/default_component_installer.h
diff --git a/components/component_updater/default_component_installer.h b/components/component_updater/default_component_installer.h
index 8a39993bb970d0c6961df4b265692808cf734dbc..7247891bba59d03cf1f38d0b9d5fb25f083618d6 100644
--- a/components/component_updater/default_component_installer.h
+++ b/components/component_updater/default_component_installer.h
@@ -92,6 +92,10 @@ class DefaultComponentInstaller : public update_client::ComponentInstaller {
// Registers the component for update checks and installs.
void Register(ComponentUpdateService* cus);
+ // Unregisters the component for update checks and uninstalls it when the last
+ // reference to it is dropped.
+ void Unregister(ComponentUpdateService* cus);
+
// Overridden from ComponentInstaller:
void OnUpdateError(int error) override;
bool Install(const base::DictionaryValue& manifest,
@@ -115,6 +119,7 @@ class DefaultComponentInstaller : public update_client::ComponentInstaller {
scoped_ptr<base::DictionaryValue> current_manifest_;
scoped_ptr<ComponentInstallerTraits> installer_traits_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
+ bool should_uninstall_on_destruction_;
// Used to post responses back to the main thread. Initialized on the main
// loop but accessed from the task runner.

Powered by Google App Engine
This is Rietveld 408576698