shill: wifi: Scan for non-ephemeral hidden networks

Before, shill used the "favorite()" property to tell whether it
should scan for a hidden SSID.  Instead, use a more direct approach
of asking whether the service is part of a non-ephemeral profile.
This allows services configured via Manager::ConfigureService()
for which the "favorite" flag has not been set to be scanned for
and listed for the user to select.

BUG=chromium-os:26676
TEST=New unit tests, manual -- configure a hidden network via
configure-hidden-wifi, then propose a scan via "test-flimflam scan",
while running "iw event" to confirm whether the new SSID appears in
the scan list

Change-Id: I75364c83c94482c0c3d654e2076a4bed06a7fca2
Reviewed-on: https://gerrit.chromium.org/gerrit/21288
Commit-Ready: Paul Stewart <pstew@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/service_unittest.cc b/service_unittest.cc
index 62e8832..424c949 100644
--- a/service_unittest.cc
+++ b/service_unittest.cc
@@ -423,6 +423,22 @@
   EXPECT_FALSE(service_->auto_connect());
 }
 
+TEST_F(ServiceTest, IsRemembered) {
+  ServiceConstRefPtr service_ref(service_);
+  service_->set_profile(NULL);
+  EXPECT_CALL(mock_manager_, IsServiceEphemeral(_)).Times(0);
+  EXPECT_FALSE(service_->IsRemembered());
+
+  scoped_refptr<MockProfile> profile(
+      new StrictMock<MockProfile>(control_interface(), manager()));
+  service_->set_profile(profile);
+  EXPECT_CALL(mock_manager_, IsServiceEphemeral(service_ref))
+     .WillOnce(Return(true))
+     .WillOnce(Return(false));
+  EXPECT_FALSE(service_->IsRemembered());
+  EXPECT_TRUE(service_->IsRemembered());
+}
+
 TEST_F(ServiceTest, OnPropertyChanged) {
   scoped_refptr<MockProfile> profile(
       new StrictMock<MockProfile>(control_interface(), manager()));