[shill] Back property storage in Service objects with Entry objects
Much of Shill Service state is persisted to disk, by creating an Entry
in a Profile. We should store this info just once, so that we don't
have to worry about keeping multiple data stores in sync. This is a
first step in that direction.
BUG=chromium-os:17436
TEST=unit tests
Change-Id: If94db2a38a7d79c56e2c746b2f069cfd7ab4bf65
Reviewed-on: http://gerrit.chromium.org/gerrit/3876
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.cc b/cellular.cc
index 251eaf4..b4375e8 100644
--- a/cellular.cc
+++ b/cellular.cc
@@ -15,7 +15,9 @@
#include "shill/control_interface.h"
#include "shill/device.h"
#include "shill/device_info.h"
+#include "shill/entry.h"
#include "shill/manager.h"
+#include "shill/profile.h"
#include "shill/property_accessor.h"
#include "shill/shill_event.h"
@@ -96,7 +98,9 @@
service_(new CellularService(control_interface,
dispatcher,
this,
- "service-" + link)),
+ manager->ActiveProfile(),
+ new Entry(manager->ActiveProfile()->name()),
+ "service-" + link_name())),
service_registered_(false) {
store_.RegisterConstString(flimflam::kCarrierProperty, &carrier_);
store_.RegisterBool(flimflam::kCellularAllowRoamingProperty, &allow_roaming_);