PolicyManager: Mark protected members as private.
The Google C++ style guide requires members to be private having
a getter and setter with fixed names. This patch moves the protected
members to the private section on the base class for each provider
and adds a protected setter to allow the sub-classes to set these
members on Init().
Also, this patch uniforms the variable names prefixing them with
var_.
BUG=None
TEST=Unit tests still passes.
Change-Id: I4cbf7b7031b430991c12a5c7d9729bafaf359095
Reviewed-on: https://chromium-review.googlesource.com/187979
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/policy_manager/real_shill_provider.cc b/policy_manager/real_shill_provider.cc
index 05a63d5..279266d 100644
--- a/policy_manager/real_shill_provider.cc
+++ b/policy_manager/real_shill_provider.cc
@@ -12,13 +12,13 @@
bool RealShillProvider::DoInit(void) {
// TODO(garnold) Initialize with actual (or fake) DBus connection.
- var_is_connected_.reset(
+ set_var_is_connected(
new CopyVariable<bool>("is_connected", kVariableModeAsync,
is_connected_));
- var_conn_type_.reset(
+ set_var_conn_type(
new CopyVariable<ShillConnType>("conn_type", kVariableModeAsync,
conn_type_));
- var_conn_last_changed_.reset(
+ set_var_conn_last_changed(
new CopyVariable<Time>("conn_last_changed", kVariableModeAsync,
conn_last_changed_));
return true;