Replace flimflam namespace with shill namespace.

BUG=chromium:295425
CQ-DEPEND=CL:170123
TEST=Build and run unit tests.

Change-Id: Id8ec51b6ff7f2802285706203bc831d3f2277ac7
Reviewed-on: https://chromium-review.googlesource.com/170124
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/connection_manager.cc b/connection_manager.cc
index bbba9f7..bd584b1 100644
--- a/connection_manager.cc
+++ b/connection_manager.cc
@@ -38,7 +38,7 @@
     return false;
   }
   proxy = dbus_iface->ProxyNewForNameOwner(bus,
-                                           flimflam::kFlimflamServiceName,
+                                           shill::kFlimflamServiceName,
                                            path,
                                            interface,
                                            &error);
@@ -90,8 +90,8 @@
   GHashTable* hash_table = NULL;
 
   TEST_AND_RETURN_FALSE(GetProperties(dbus_iface,
-                                      flimflam::kFlimflamServicePath,
-                                      flimflam::kFlimflamManagerInterface,
+                                      shill::kFlimflamServicePath,
+                                      shill::kFlimflamManagerInterface,
                                       &hash_table));
 
   GValue* value = reinterpret_cast<GValue*>(g_hash_table_lookup(hash_table,
@@ -110,15 +110,15 @@
 }
 
 NetworkConnectionType ParseConnectionType(const char* type_str) {
-  if (!strcmp(type_str, flimflam::kTypeEthernet)) {
+  if (!strcmp(type_str, shill::kTypeEthernet)) {
     return kNetEthernet;
-  } else if (!strcmp(type_str, flimflam::kTypeWifi)) {
+  } else if (!strcmp(type_str, shill::kTypeWifi)) {
     return kNetWifi;
-  } else if (!strcmp(type_str, flimflam::kTypeWimax)) {
+  } else if (!strcmp(type_str, shill::kTypeWimax)) {
     return kNetWimax;
-  } else if (!strcmp(type_str, flimflam::kTypeBluetooth)) {
+  } else if (!strcmp(type_str, shill::kTypeBluetooth)) {
     return kNetBluetooth;
-  } else if (!strcmp(type_str, flimflam::kTypeCellular)) {
+  } else if (!strcmp(type_str, shill::kTypeCellular)) {
     return kNetCellular;
   }
   return kNetUnknown;
@@ -131,16 +131,16 @@
 
   TEST_AND_RETURN_FALSE(GetProperties(dbus_iface,
                                       path.c_str(),
-                                      flimflam::kFlimflamServiceInterface,
+                                      shill::kFlimflamServiceInterface,
                                       &hash_table));
 
   GValue* value = (GValue*)g_hash_table_lookup(hash_table,
-                                               flimflam::kTypeProperty);
+                                               shill::kTypeProperty);
   const char* type_str = NULL;
   bool success = false;
   if (value != NULL && (type_str = g_value_get_string(value)) != NULL) {
     success = true;
-    if (!strcmp(type_str, flimflam::kTypeVPN)) {
+    if (!strcmp(type_str, shill::kTypeVPN)) {
       value = (GValue*)g_hash_table_lookup(hash_table,
                                            shill::kPhysicalTechnologyProperty);
       if (value != NULL && (type_str = g_value_get_string(value)) != NULL) {
@@ -187,7 +187,7 @@
         // The update setting is enforced by the device policy.
 
         if ((type == kNetCellular &&
-            !ContainsKey(allowed_types, flimflam::kTypeCellular))) {
+            !ContainsKey(allowed_types, shill::kTypeCellular))) {
           LOG(INFO) << "Disabling updates over cellular connection as it's not "
                        "allowed in the device policy.";
           return false;
@@ -229,11 +229,11 @@
 
 const char* ConnectionManager::StringForConnectionType(
     NetworkConnectionType type) const {
-  static const char* const kValues[] = {flimflam::kTypeEthernet,
-                                        flimflam::kTypeWifi,
-                                        flimflam::kTypeWimax,
-                                        flimflam::kTypeBluetooth,
-                                        flimflam::kTypeCellular};
+  static const char* const kValues[] = {shill::kTypeEthernet,
+                                        shill::kTypeWifi,
+                                        shill::kTypeWimax,
+                                        shill::kTypeBluetooth,
+                                        shill::kTypeCellular};
   if (type < 0 || type >= static_cast<int>(arraysize(kValues))) {
     return "Unknown";
   }
diff --git a/connection_manager_unittest.cc b/connection_manager_unittest.cc
index 0c86f03..3b88564 100644
--- a/connection_manager_unittest.cc
+++ b/connection_manager_unittest.cc
@@ -105,9 +105,9 @@
   // Set other expectations.
   EXPECT_CALL(dbus_iface_,
               ProxyNewForNameOwner(kMockSystemBus_,
-                                   StrEq(flimflam::kFlimflamServiceName),
-                                   StrEq(flimflam::kFlimflamServicePath),
-                                   StrEq(flimflam::kFlimflamManagerInterface),
+                                   StrEq(shill::kFlimflamServiceName),
+                                   StrEq(shill::kFlimflamServicePath),
+                                   StrEq(shill::kFlimflamManagerInterface),
                                    _))
       .WillOnce(Return(kMockFlimFlamManagerProxy_));
   EXPECT_CALL(dbus_iface_, ProxyUnref(kMockFlimFlamManagerProxy_));
@@ -156,9 +156,9 @@
   // Set other expectations.
   EXPECT_CALL(dbus_iface_,
       ProxyNewForNameOwner(kMockSystemBus_,
-                             StrEq(flimflam::kFlimflamServiceName),
+                             StrEq(shill::kFlimflamServiceName),
                              StrEq(kServicePath_),
-                             StrEq(flimflam::kFlimflamServiceInterface),
+                             StrEq(shill::kFlimflamServiceInterface),
                              _))
       .WillOnce(Return(kMockFlimFlamServiceProxy_));
   EXPECT_CALL(dbus_iface_, ProxyUnref(kMockFlimFlamServiceProxy_));
@@ -181,18 +181,18 @@
 }
 
 TEST_F(ConnectionManagerTest, SimpleTest) {
-  TestWithServiceType(flimflam::kTypeEthernet, NULL, kNetEthernet);
-  TestWithServiceType(flimflam::kTypeWifi, NULL, kNetWifi);
-  TestWithServiceType(flimflam::kTypeWimax, NULL, kNetWimax);
-  TestWithServiceType(flimflam::kTypeBluetooth, NULL, kNetBluetooth);
-  TestWithServiceType(flimflam::kTypeCellular, NULL, kNetCellular);
+  TestWithServiceType(shill::kTypeEthernet, NULL, kNetEthernet);
+  TestWithServiceType(shill::kTypeWifi, NULL, kNetWifi);
+  TestWithServiceType(shill::kTypeWimax, NULL, kNetWimax);
+  TestWithServiceType(shill::kTypeBluetooth, NULL, kNetBluetooth);
+  TestWithServiceType(shill::kTypeCellular, NULL, kNetCellular);
 }
 
 TEST_F(ConnectionManagerTest, PhysicalTechnologyTest) {
-  TestWithServiceType(flimflam::kTypeVPN, NULL, kNetUnknown);
-  TestWithServiceType(flimflam::kTypeVPN, flimflam::kTypeVPN, kNetUnknown);
-  TestWithServiceType(flimflam::kTypeVPN, flimflam::kTypeWifi, kNetWifi);
-  TestWithServiceType(flimflam::kTypeVPN, flimflam::kTypeWimax, kNetWimax);
+  TestWithServiceType(shill::kTypeVPN, NULL, kNetUnknown);
+  TestWithServiceType(shill::kTypeVPN, shill::kTypeVPN, kNetUnknown);
+  TestWithServiceType(shill::kTypeVPN, shill::kTypeWifi, kNetWifi);
+  TestWithServiceType(shill::kTypeVPN, shill::kTypeWimax, kNetWimax);
 }
 
 TEST_F(ConnectionManagerTest, UnknownTest) {
@@ -349,15 +349,15 @@
 }
 
 TEST_F(ConnectionManagerTest, StringForConnectionTypeTest) {
-  EXPECT_STREQ(flimflam::kTypeEthernet,
+  EXPECT_STREQ(shill::kTypeEthernet,
                cmut_.StringForConnectionType(kNetEthernet));
-  EXPECT_STREQ(flimflam::kTypeWifi,
+  EXPECT_STREQ(shill::kTypeWifi,
                cmut_.StringForConnectionType(kNetWifi));
-  EXPECT_STREQ(flimflam::kTypeWimax,
+  EXPECT_STREQ(shill::kTypeWimax,
                cmut_.StringForConnectionType(kNetWimax));
-  EXPECT_STREQ(flimflam::kTypeBluetooth,
+  EXPECT_STREQ(shill::kTypeBluetooth,
                cmut_.StringForConnectionType(kNetBluetooth));
-  EXPECT_STREQ(flimflam::kTypeCellular,
+  EXPECT_STREQ(shill::kTypeCellular,
                cmut_.StringForConnectionType(kNetCellular));
   EXPECT_STREQ("Unknown",
                cmut_.StringForConnectionType(kNetUnknown));
diff --git a/http_fetcher_unittest.cc b/http_fetcher_unittest.cc
index f49c563..3b3ffe5 100644
--- a/http_fetcher_unittest.cc
+++ b/http_fetcher_unittest.cc
@@ -436,7 +436,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWifi))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWifi))
-      .WillRepeatedly(Return(flimflam::kTypeWifi));
+      .WillRepeatedly(Return(shill::kTypeWifi));
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
     ASSERT_TRUE(server->started_);
@@ -465,7 +465,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetEthernet))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetEthernet))
-      .WillRepeatedly(Return(flimflam::kTypeEthernet));
+      .WillRepeatedly(Return(shill::kTypeEthernet));
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
     ASSERT_TRUE(server->started_);
@@ -502,7 +502,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWimax))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWimax))
-      .WillRepeatedly(Return(flimflam::kTypeWimax));
+      .WillRepeatedly(Return(shill::kTypeWimax));
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
     ASSERT_TRUE(server->started_);
@@ -581,7 +581,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetCellular))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetCellular))
-      .WillRepeatedly(Return(flimflam::kTypeCellular));
+      .WillRepeatedly(Return(shill::kTypeCellular));
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
     ASSERT_TRUE(server->started_);
@@ -657,7 +657,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWifi))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWifi))
-      .WillRepeatedly(Return(flimflam::kTypeWifi));
+      .WillRepeatedly(Return(shill::kTypeWifi));
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
     this->test_.IgnoreServerAborting(server.get());
@@ -715,7 +715,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWifi))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWifi))
-      .WillRepeatedly(Return(flimflam::kTypeWifi));
+      .WillRepeatedly(Return(shill::kTypeWifi));
 
 
     scoped_ptr<HttpServer> server(this->test_.CreateServer());
@@ -798,7 +798,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetEthernet))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetEthernet))
-      .WillRepeatedly(Return(flimflam::kTypeEthernet));
+      .WillRepeatedly(Return(shill::kTypeEthernet));
 
 
     StartTransferArgs start_xfer_args = {
@@ -892,7 +892,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetEthernet))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetEthernet))
-      .WillRepeatedly(Return(flimflam::kTypeEthernet));
+      .WillRepeatedly(Return(shill::kTypeEthernet));
 
     StartTransferArgs start_xfer_args =
         { fetcher.get(), LocalServerUrlForPath(server->GetPort(), url) };
@@ -1010,7 +1010,7 @@
     EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWifi))
       .WillRepeatedly(Return(true));
     EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWifi))
-      .WillRepeatedly(Return(flimflam::kTypeWifi));
+      .WillRepeatedly(Return(shill::kTypeWifi));
 
     MultiRangeHttpFetcher* multi_fetcher =
         dynamic_cast<MultiRangeHttpFetcher*>(fetcher_in);
@@ -1208,7 +1208,7 @@
       EXPECT_CALL(*mock_cm, IsUpdateAllowedOver(kNetWifi))
         .WillRepeatedly(Return(is_allowed));
       EXPECT_CALL(*mock_cm, StringForConnectionType(kNetWifi))
-        .WillRepeatedly(Return(flimflam::kTypeWifi));
+        .WillRepeatedly(Return(shill::kTypeWifi));
 
       bool is_official_build = (i == 1);
       LOG(INFO) << "is_update_allowed_over_connection: " << is_allowed;