OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "dbus/bus.h" | 5 #include "dbus/bus.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 return false; | 606 return false; |
607 } | 607 } |
608 // Store the match rule, so that we can remove this in Detach(). | 608 // Store the match rule, so that we can remove this in Detach(). |
609 match_rules_.insert(match_rule); | 609 match_rules_.insert(match_rule); |
610 return true; | 610 return true; |
611 } | 611 } |
612 | 612 |
613 void ObjectProxy::UpdateNameOwnerAndBlock() { | 613 void ObjectProxy::UpdateNameOwnerAndBlock() { |
614 bus_->AssertOnDBusThread(); | 614 bus_->AssertOnDBusThread(); |
615 service_name_owner_ = | 615 service_name_owner_ = |
616 bus_->GetServiceOwnerAndBlock(service_name_, Bus::SUPPRESS_ERRORS); | 616 bus_->GetServiceOwnerAndBlock(service_name_, Bus::REPORT_ERRORS); |
617 } | 617 } |
618 | 618 |
619 DBusHandlerResult ObjectProxy::HandleNameOwnerChanged( | 619 DBusHandlerResult ObjectProxy::HandleNameOwnerChanged( |
620 scoped_ptr<Signal> signal) { | 620 scoped_ptr<Signal> signal) { |
621 DCHECK(signal); | 621 DCHECK(signal); |
622 bus_->AssertOnDBusThread(); | 622 bus_->AssertOnDBusThread(); |
623 | 623 |
624 // Confirm the validity of the NameOwnerChanged signal. | 624 // Confirm the validity of the NameOwnerChanged signal. |
625 if (signal->GetMember() == kNameOwnerChangedMember && | 625 if (signal->GetMember() == kNameOwnerChangedMember && |
626 signal->GetInterface() == kDBusSystemObjectInterface && | 626 signal->GetInterface() == kDBusSystemObjectInterface && |
(...skipping 19 matching lines...) Expand all Loading... |
646 } | 646 } |
647 } | 647 } |
648 } | 648 } |
649 | 649 |
650 // Always return unhandled to let other object proxies handle the same | 650 // Always return unhandled to let other object proxies handle the same |
651 // signal. | 651 // signal. |
652 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; | 652 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; |
653 } | 653 } |
654 | 654 |
655 } // namespace dbus | 655 } // namespace dbus |
OLD | NEW |