shill: Implement more of Profile DBus interface

Return a DBus path from Manager.GetActiveProfile().
Implement the "Profiles" property on the manager Manager.
Fix the "Entries" property on the Profile to only report group
identifiers that correspond to technologies (not ipconfig,
devices, etc).
Fix the "Services" Profile property, to only appear as a property
of the active profile.

BUG=chromium-os:25538, chromium-os:23702
TEST=Manual: Running "list-profiles" from the flimflam test suite now
works correctly.

Change-Id: I3120fe54f02662822186ac033fab0b3566449705
Reviewed-on: https://gerrit.chromium.org/gerrit/14904
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/profile_unittest.cc b/profile_unittest.cc
index d7ef54f..9a1fa7c 100644
--- a/profile_unittest.cc
+++ b/profile_unittest.cc
@@ -219,28 +219,33 @@
 TEST_F(ProfileTest, EntryEnumeration) {
   scoped_refptr<MockService> service1(CreateMockService());
   scoped_refptr<MockService> service2(CreateMockService());
+  string service1_storage_name = Technology::NameFromIdentifier(
+      Technology::kCellular) + "_1";
+  string service2_storage_name = Technology::NameFromIdentifier(
+      Technology::kCellular) + "_2";
   EXPECT_CALL(*service1.get(), Save(_))
       .WillRepeatedly(Invoke(service1.get(), &MockService::FauxSave));
   EXPECT_CALL(*service2.get(), Save(_))
       .WillRepeatedly(Invoke(service2.get(), &MockService::FauxSave));
+  EXPECT_CALL(*service1.get(), GetStorageIdentifier())
+      .WillRepeatedly(Return(service1_storage_name));
+  EXPECT_CALL(*service2.get(), GetStorageIdentifier())
+      .WillRepeatedly(Return(service2_storage_name));
 
   string service1_name(service1->UniqueName());
   string service2_name(service2->UniqueName());
 
-  Error error;
   ASSERT_TRUE(profile_->AdoptService(service1));
   ASSERT_TRUE(profile_->AdoptService(service2));
 
-  ASSERT_EQ(profile_->EnumerateEntries(&error).size(), 2);
+  Error error;
+  ASSERT_EQ(2, profile_->EnumerateEntries(&error).size());
 
   ASSERT_TRUE(profile_->AbandonService(service1));
-  ASSERT_EQ(profile_->EnumerateEntries(&error)[0], service2_name);
-
-  ASSERT_TRUE(profile_->AbandonService(service1));
-  ASSERT_EQ(profile_->EnumerateEntries(&error)[0], service2_name);
+  ASSERT_EQ(service2_storage_name, profile_->EnumerateEntries(&error)[0]);
 
   ASSERT_TRUE(profile_->AbandonService(service2));
-  ASSERT_EQ(profile_->EnumerateEntries(&error).size(), 0);
+  ASSERT_EQ(0, profile_->EnumerateEntries(&error).size());
 }
 
 TEST_F(ProfileTest, MatchesIdentifier) {