summaryrefslogtreecommitdiffstats
path: root/chromeos
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 07:12:03 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-27 07:12:03 +0000
commitdb817802ed529f7064928426ef9ba8f0d427dc2b (patch)
tree365fc0475c271846eb1814c68efcabae8bda7fa1 /chromeos
parenta20f4d8098964adad07825d629dc870804897544 (diff)
downloadchromium_src-db817802ed529f7064928426ef9ba8f0d427dc2b.zip
chromium_src-db817802ed529f7064928426ef9ba8f0d427dc2b.tar.gz
chromium_src-db817802ed529f7064928426ef9ba8f0d427dc2b.tar.bz2
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
Diffstat (limited to 'chromeos')
-rw-r--r--chromeos/dbus/cras_audio_client.cc3
-rw-r--r--chromeos/dbus/power_manager_client.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/chromeos/dbus/cras_audio_client.cc b/chromeos/dbus/cras_audio_client.cc
index 9fe8394..60443a2 100644
--- a/chromeos/dbus/cras_audio_client.cc
+++ b/chromeos/dbus/cras_audio_client.cc
@@ -197,7 +197,8 @@ class CrasAudioClientImpl : public CrasAudioClient {
<< "Failed to connect to cras signal:" << signal_name;
}
- void NameOwnerChangedReceived(dbus::Signal* signal) {
+ void NameOwnerChangedReceived(const std::string& old_owner,
+ const std::string& new_owner) {
FOR_EACH_OBSERVER(Observer, observers_, AudioClientRestarted());
}
diff --git a/chromeos/dbus/power_manager_client.cc b/chromeos/dbus/power_manager_client.cc
index 548b053..23b4c26 100644
--- a/chromeos/dbus/power_manager_client.cc
+++ b/chromeos/dbus/power_manager_client.cc
@@ -338,7 +338,8 @@ class PowerManagerClientImpl : public PowerManagerClient {
dbus::ObjectProxy::EmptyResponseCallback());
}
- void NameOwnerChangedReceived(dbus::Signal* signal) {
+ void NameOwnerChangedReceived(const std::string& old_owner,
+ const std::string& new_owner) {
VLOG(1) << "Power manager restarted";
RegisterSuspendDelay();
SetIsProjecting(last_is_projecting_);