dbus: Stop accessing ObjectProxy::name_owner_changed_callback_ on the D-Bus thread

Accessing the callback on the D-Bus thread while changing its value may result in a race condition.
Change the type of SetNameOwnerChangedCallback's argument from Signal to strings to stop worrying about on which thread the Signal gets released.

BUG=298747
TEST=dbus_unittests
R=satorux@chromium.org

Review URL: https://codereview.chromium.org/24673006

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


CrOS-Libchrome-Original-Commit: db817802ed529f7064928426ef9ba8f0d427dc2b
diff --git a/dbus/signal_sender_verification_unittest.cc b/dbus/signal_sender_verification_unittest.cc
index cbf4b5f..1d8f6e1 100644
--- a/dbus/signal_sender_verification_unittest.cc
+++ b/dbus/signal_sender_verification_unittest.cc
@@ -120,12 +120,9 @@
     message_loop_.Quit();
   }
 
-  void OnNameOwnerChanged(bool* called_flag, Signal* signal) {
-    MessageReader reader(signal);
-    std::string name, old_owner, new_owner;
-    ASSERT_TRUE(reader.PopString(&name));
-    ASSERT_TRUE(reader.PopString(&old_owner));
-    ASSERT_TRUE(reader.PopString(&new_owner));
+  void OnNameOwnerChanged(bool* called_flag,
+                          const std::string& old_owner,
+                          const std::string& new_owner) {
     latest_name_owner_ = new_owner;
     *called_flag = true;
     message_loop_.Quit();