[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/ethernet.cc b/ethernet.cc
index 1a269c6..c9037a9 100644
--- a/ethernet.cc
+++ b/ethernet.cc
@@ -16,9 +16,10 @@
#include "shill/device_info.h"
#include "shill/manager.h"
#include "shill/shill_event.h"
-
+#include "shill/entry.h"
#include "shill/ethernet.h"
#include "shill/ethernet_service.h"
+#include "shill/profile.h"
#include "shill/rtnl_handler.h"
using std::string;
@@ -39,6 +40,8 @@
service_(new EthernetService(control_interface,
dispatcher,
this,
+ manager->ActiveProfile(),
+ new Entry(manager->ActiveProfile()->name()),
"service-" + link_name)),
link_up_(false) {
VLOG(2) << "Ethernet device " << link_name << " initialized.";