shill: profile: Deprecate flimflam namespace.

CL:170123 moves all DBus service constants from the flimflam namespace
to the shill namespace. This CL removes the use of the flimflam
namespace in profile code.

BUG=chromium:295425
CQ-DEPEND=CL:170123
TEST=Unit tests and trybot runs on release builders.

Change-Id: I8b9cb3b3509479f58313ac48a98b3a8b506b8d74
Reviewed-on: https://chromium-review.googlesource.com/170206
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/default_profile.cc b/default_profile.cc
index 475441e..a18df20 100644
--- a/default_profile.cc
+++ b/default_profile.cc
@@ -62,20 +62,16 @@
       profile_id_(profile_id),
       props_(manager_props) {
   PropertyStore *store = this->mutable_store();
-  store->RegisterConstBool(flimflam::kArpGatewayProperty,
-                           &manager_props.arp_gateway);
-  store->RegisterConstString(flimflam::kCheckPortalListProperty,
+  store->RegisterConstBool(kArpGatewayProperty, &manager_props.arp_gateway);
+  store->RegisterConstString(kCheckPortalListProperty,
                              &manager_props.check_portal_list);
-  store->RegisterConstString(flimflam::kCountryProperty,
-                             &manager_props.country);
+  store->RegisterConstString(kCountryProperty, &manager_props.country);
   store->RegisterConstString(shill::kIgnoredDNSSearchPathsProperty,
                              &manager_props.ignored_dns_search_paths);
   store->RegisterConstString(shill::kLinkMonitorTechnologiesProperty,
                              &manager_props.link_monitor_technologies);
-  store->RegisterConstBool(flimflam::kOfflineModeProperty,
-                           &manager_props.offline_mode);
-  store->RegisterConstString(flimflam::kPortalURLProperty,
-                             &manager_props.portal_url);
+  store->RegisterConstBool(kOfflineModeProperty, &manager_props.offline_mode);
+  store->RegisterConstString(kPortalURLProperty, &manager_props.portal_url);
   store->RegisterConstInt32(shill::kPortalCheckIntervalProperty,
                             &manager_props.portal_check_interval_seconds);
 }
diff --git a/default_profile_unittest.cc b/default_profile_unittest.cc
index 6ff59ff..b03cbb4 100644
--- a/default_profile_unittest.cc
+++ b/default_profile_unittest.cc
@@ -85,22 +85,22 @@
     map<string, ::DBus::Variant> props;
     ::DBus::Error dbus_error;
     DBusAdaptor::GetProperties(profile_->store(), &props, &dbus_error);
-    ASSERT_FALSE(props.find(flimflam::kOfflineModeProperty) == props.end());
-    EXPECT_FALSE(props[flimflam::kOfflineModeProperty].reader().get_bool());
+    ASSERT_FALSE(props.find(kOfflineModeProperty) == props.end());
+    EXPECT_FALSE(props[kOfflineModeProperty].reader().get_bool());
   }
   properties_.offline_mode = true;
   {
     map<string, ::DBus::Variant> props;
     ::DBus::Error dbus_error;
     DBusAdaptor::GetProperties(profile_->store(), &props, &dbus_error);
-    ASSERT_FALSE(props.find(flimflam::kOfflineModeProperty) == props.end());
-    EXPECT_TRUE(props[flimflam::kOfflineModeProperty].reader().get_bool());
+    ASSERT_FALSE(props.find(kOfflineModeProperty) == props.end());
+    EXPECT_TRUE(props[kOfflineModeProperty].reader().get_bool());
   }
   {
     Error error(Error::kInvalidProperty, "");
     EXPECT_FALSE(
         profile_->mutable_store()->SetBoolProperty(
-            flimflam::kOfflineModeProperty,
+            kOfflineModeProperty,
             true,
             &error));
   }
diff --git a/profile.cc b/profile.cc
index 7f9f655..b28fbb3 100644
--- a/profile.cc
+++ b/profile.cc
@@ -49,18 +49,17 @@
   if (connect_to_rpc)
     adaptor_.reset(control_interface->CreateProfileAdaptor(this));
 
-  // flimflam::kCheckPortalListProperty: Registered in DefaultProfile
-  // flimflam::kCountryProperty: Registered in DefaultProfile
-  store_.RegisterConstString(flimflam::kNameProperty, &name_.identifier);
+  // kCheckPortalListProperty: Registered in DefaultProfile
+  // kCountryProperty: Registered in DefaultProfile
+  store_.RegisterConstString(kNameProperty, &name_.identifier);
   store_.RegisterConstString(kUserHashProperty, &name_.user_hash);
 
-  // flimflam::kOfflineModeProperty: Registered in DefaultProfile
-  // flimflam::kPortalURLProperty: Registered in DefaultProfile
+  // kOfflineModeProperty: Registered in DefaultProfile
+  // kPortalURLProperty: Registered in DefaultProfile
 
-  HelpRegisterConstDerivedStrings(flimflam::kServicesProperty,
+  HelpRegisterConstDerivedStrings(kServicesProperty,
                                   &Profile::EnumerateAvailableServices);
-  HelpRegisterConstDerivedStrings(flimflam::kEntriesProperty,
-                                  &Profile::EnumerateEntries);
+  HelpRegisterConstDerivedStrings(kEntriesProperty, &Profile::EnumerateEntries);
 }
 
 Profile::~Profile() {}
diff --git a/profile_dbus_property_exporter.cc b/profile_dbus_property_exporter.cc
index a9881ef..812d496 100644
--- a/profile_dbus_property_exporter.cc
+++ b/profile_dbus_property_exporter.cc
@@ -51,16 +51,15 @@
     LoadWiFiServiceProperties(properties, error);
   }
 
-  LoadBool(properties, Service::kStorageAutoConnect,
-           flimflam::kAutoConnectProperty);
-  LoadString(properties, Service::kStorageError, flimflam::kErrorProperty);
-  LoadString(properties, Service::kStorageGUID, flimflam::kGuidProperty);
-  LoadString(properties, Service::kStorageName, flimflam::kNameProperty);
-  if (!LoadString(properties, Service::kStorageType, flimflam::kTypeProperty)) {
-    SetString(properties, flimflam::kTypeProperty,
+  LoadBool(properties, Service::kStorageAutoConnect, kAutoConnectProperty);
+  LoadString(properties, Service::kStorageError, kErrorProperty);
+  LoadString(properties, Service::kStorageGUID, kGuidProperty);
+  LoadString(properties, Service::kStorageName, kNameProperty);
+  if (!LoadString(properties, Service::kStorageType, kTypeProperty)) {
+    SetString(properties, kTypeProperty,
               Technology::NameFromIdentifier(technology));
   }
-  LoadString(properties, Service::kStorageUIData, flimflam::kUIDataProperty);
+  LoadString(properties, Service::kStorageUIData, kUIDataProperty);
   return true;
 }
 
@@ -68,19 +67,16 @@
     PropertyList *properties,
     Error */*error*/) {
   LoadString(properties, EapCredentials::kStorageEapCACertID,
-             flimflam::kEapCaCertIDProperty);
-  LoadString(properties, EapCredentials::kStorageEapCertID,
-             flimflam::kEAPCertIDProperty);
-  LoadString(properties, EapCredentials::kStorageEapKeyID,
-             flimflam::kEAPKeyIDProperty);
+             kEapCaCertIDProperty);
+  LoadString(properties, EapCredentials::kStorageEapCertID, kEAPCertIDProperty);
+  LoadString(properties, EapCredentials::kStorageEapKeyID, kEAPKeyIDProperty);
   return true;
 }
 
 bool ProfileDBusPropertyExporter::LoadWiFiServiceProperties(
     PropertyList *properties,
     Error */*error*/) {
-  LoadBool(properties, WiFiService::kStorageHiddenSSID,
-             flimflam::kWifiHiddenSsid);
+  LoadBool(properties, WiFiService::kStorageHiddenSSID, kWifiHiddenSsid);
 
   // Support the old and busted technique for storing "Mode" and "Security"
   // within the entry name.
@@ -90,14 +86,14 @@
   bool parsed_identifier = WiFiService::ParseStorageIdentifier(
       entry_name_, &address, &mode, &security);
 
-  if (!LoadString(properties, WiFiService::kStorageMode,
-                  flimflam::kModeProperty) && parsed_identifier) {
-    SetString(properties, flimflam::kModeProperty, mode);
+  if (!LoadString(properties, WiFiService::kStorageMode, kModeProperty) &&
+      parsed_identifier) {
+    SetString(properties, kModeProperty, mode);
   }
 
   if (!LoadString(properties, WiFiService::kStorageSecurity,
-                  flimflam::kSecurityProperty) && parsed_identifier) {
-    SetString(properties, flimflam::kSecurityProperty, security);
+                  kSecurityProperty) && parsed_identifier) {
+    SetString(properties, kSecurityProperty, security);
   }
 
   LoadEapServiceProperties(properties, NULL);
diff --git a/profile_dbus_property_exporter_unittest.cc b/profile_dbus_property_exporter_unittest.cc
index 2c1d6b3..08b7186 100644
--- a/profile_dbus_property_exporter_unittest.cc
+++ b/profile_dbus_property_exporter_unittest.cc
@@ -102,8 +102,7 @@
   Error e;
   EXPECT_TRUE(exporter_->LoadServiceProperties(&props, &e));
   EXPECT_EQ(1, props.size());
-  EXPECT_EQ(flimflam::kTypeEthernet,
-            GetStringProperty(&props, flimflam::kTypeProperty));
+  EXPECT_EQ(kTypeEthernet, GetStringProperty(&props, kTypeProperty));
 }
 
 TEST_F(ProfileDBusPropertyExporterTest, OverrideTypeProperty) {
@@ -115,7 +114,7 @@
   Error e;
   EXPECT_TRUE(exporter_->LoadServiceProperties(&props, &e));
   EXPECT_EQ(1, props.size());
-  EXPECT_EQ(service_type, GetStringProperty(&props, flimflam::kTypeProperty));
+  EXPECT_EQ(service_type, GetStringProperty(&props, kTypeProperty));
 }
 
 TEST_F(ProfileDBusPropertyExporterTest, AllServiceProperties) {
@@ -136,13 +135,12 @@
   ProfileDBusPropertyExporter::PropertyList props;
   Error e;
   EXPECT_TRUE(exporter_->LoadServiceProperties(&props, &e));
-  EXPECT_EQ(auto_connect, GetBoolProperty(&props,
-                                          flimflam::kAutoConnectProperty));
-  EXPECT_EQ(error, GetStringProperty(&props, flimflam::kErrorProperty));
-  EXPECT_EQ(guid, GetStringProperty(&props, flimflam::kGuidProperty));
-  EXPECT_EQ(name, GetStringProperty(&props, flimflam::kNameProperty));
-  EXPECT_EQ(type, GetStringProperty(&props, flimflam::kTypeProperty));
-  EXPECT_EQ(uidata, GetStringProperty(&props, flimflam::kUIDataProperty));
+  EXPECT_EQ(auto_connect, GetBoolProperty(&props, kAutoConnectProperty));
+  EXPECT_EQ(error, GetStringProperty(&props, kErrorProperty));
+  EXPECT_EQ(guid, GetStringProperty(&props, kGuidProperty));
+  EXPECT_EQ(name, GetStringProperty(&props, kNameProperty));
+  EXPECT_EQ(type, GetStringProperty(&props, kTypeProperty));
+  EXPECT_EQ(uidata, GetStringProperty(&props, kUIDataProperty));
 }
 
 TEST_F(ProfileDBusPropertyExporterTest, MinimalWiFiServiceProperties) {
@@ -151,9 +149,8 @@
   ProfileDBusPropertyExporter::PropertyList props;
   Error e;
   EXPECT_TRUE(exporter_->LoadServiceProperties(&props, &e));
-  EXPECT_EQ("superfly", GetStringProperty(&props, flimflam::kModeProperty));
-  EXPECT_EQ("unbreakable_crypto",
-            GetStringProperty(&props, flimflam::kSecurityProperty));
+  EXPECT_EQ("superfly", GetStringProperty(&props, kModeProperty));
+  EXPECT_EQ("unbreakable_crypto", GetStringProperty(&props, kSecurityProperty));
 }
 
 TEST_F(ProfileDBusPropertyExporterTest, AllWiFiServiceProperties) {
@@ -176,13 +173,12 @@
   ProfileDBusPropertyExporter::PropertyList props;
   Error e;
   EXPECT_TRUE(exporter_->LoadServiceProperties(&props, &e));
-  EXPECT_EQ(hidden_ssid, GetBoolProperty(&props, flimflam::kWifiHiddenSsid));
-  EXPECT_EQ(mode, GetStringProperty(&props, flimflam::kModeProperty));
-  EXPECT_EQ(security, GetStringProperty(&props, flimflam::kSecurityProperty));
-  EXPECT_EQ(ca_cert_id,
-            GetStringProperty(&props, flimflam::kEapCaCertIDProperty));
-  EXPECT_EQ(cert_id, GetStringProperty(&props, flimflam::kEAPCertIDProperty));
-  EXPECT_EQ(key_id, GetStringProperty(&props, flimflam::kEAPKeyIDProperty));
+  EXPECT_EQ(hidden_ssid, GetBoolProperty(&props, kWifiHiddenSsid));
+  EXPECT_EQ(mode, GetStringProperty(&props, kModeProperty));
+  EXPECT_EQ(security, GetStringProperty(&props, kSecurityProperty));
+  EXPECT_EQ(ca_cert_id, GetStringProperty(&props, kEapCaCertIDProperty));
+  EXPECT_EQ(cert_id, GetStringProperty(&props, kEAPCertIDProperty));
+  EXPECT_EQ(key_id, GetStringProperty(&props, kEAPKeyIDProperty));
 }
 
 }  // namespace shill