Cleanup: Put DBus unit tests in the dbus namespace, so one does not need to write dbus:: everywhere. Remove some other dbus:: usages in the dbus namespace.

Review URL: https://chromiumcodereview.appspot.com/16012018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206010 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 2a57ca64048fe077fdf841cd49e76fa787a6c251
diff --git a/dbus/bus.cc b/dbus/bus.cc
index c830f06..dd9ed34 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -123,7 +123,7 @@
   }
 
   // Starts monitoring the timeout.
-  void StartMonitoring(dbus::Bus* bus) {
+  void StartMonitoring(Bus* bus) {
     bus->PostDelayedTaskToDBusThread(FROM_HERE,
                                      base::Bind(&Timeout::HandleTimeout,
                                                 this),
@@ -227,7 +227,7 @@
 }
 
 ObjectProxy* Bus::GetObjectProxyWithOptions(const std::string& service_name,
-                                            const dbus::ObjectPath& object_path,
+                                            const ObjectPath& object_path,
                                             int options) {
   AssertOnOriginThread();
 
@@ -255,7 +255,7 @@
 }
 
 bool Bus::RemoveObjectProxyWithOptions(const std::string& service_name,
-                                       const dbus::ObjectPath& object_path,
+                                       const ObjectPath& object_path,
                                        int options,
                                        const base::Closure& callback) {
   AssertOnOriginThread();
@@ -276,9 +276,8 @@
   return false;
 }
 
-void Bus::RemoveObjectProxyInternal(
-    scoped_refptr<dbus::ObjectProxy> object_proxy,
-    const base::Closure& callback) {
+void Bus::RemoveObjectProxyInternal(scoped_refptr<ObjectProxy> object_proxy,
+                                    const base::Closure& callback) {
   AssertOnDBusThread();
 
   object_proxy.get()->Detach();
@@ -325,7 +324,7 @@
 }
 
 void Bus::UnregisterExportedObjectInternal(
-    scoped_refptr<dbus::ExportedObject> exported_object) {
+    scoped_refptr<ExportedObject> exported_object) {
   AssertOnDBusThread();
 
   exported_object->Unregister();
@@ -782,7 +781,8 @@
   if (dbus_connection_get_dispatch_status(connection_) ==
       DBUS_DISPATCH_DATA_REMAINS) {
     while (dbus_connection_dispatch(connection_) ==
-           DBUS_DISPATCH_DATA_REMAINS);
+           DBUS_DISPATCH_DATA_REMAINS) {
+    }
   }
 }