PM: Move the getters/variables on provider base classes to abstract methods.
Also make all DoInit() overrides in subclasses private, not protected
and ensure that all the abstract Provider interface classes has
virtual destructors.
Additionally, remove inlining of virtual methods in derived classes
since it won't matter much in our application. This is because we'll
call these methods only indirectly e.g. through a vtable dispatch via
a method call on the interface class.
BUG=chromium:364763
TEST=Unit tests pass.
Change-Id: I7f6a10d9c0b01c4f5c035125755ef132738e72aa
Reviewed-on: https://chromium-review.googlesource.com/196656
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
diff --git a/policy_manager/real_updater_provider.h b/policy_manager/real_updater_provider.h
index 1b24e16..7ff8e69 100644
--- a/policy_manager/real_updater_provider.h
+++ b/policy_manager/real_updater_provider.h
@@ -62,10 +62,9 @@
return var_cellular_enabled_.get();
}
- protected:
+ private:
virtual bool DoInit() { return true; }
- private:
// A pointer to the update engine's system state aggregator.
chromeos_update_engine::SystemState* system_state_;