Index: chromeos/dbus/nfc_record_client.cc |
diff --git a/chromeos/dbus/nfc_record_client.cc b/chromeos/dbus/nfc_record_client.cc |
index d7bbafd987b677dfb5bd7a67529ef154c27521ea..a24b947d54d3220941e04c7f805ad31c2a365415 100644 |
--- a/chromeos/dbus/nfc_record_client.cc |
+++ b/chromeos/dbus/nfc_record_client.cc |
@@ -186,11 +186,16 @@ class NfcRecordClientImpl : public NfcRecordClient, |
// nfc_client_helpers::DBusObjectMap::Delegate override. |
virtual NfcPropertySet* CreateProperties( |
dbus::ObjectProxy* object_proxy) OVERRIDE { |
- return new Properties( |
+ Properties* properties = new Properties( |
object_proxy, |
base::Bind(&NfcRecordClientImpl::OnPropertyChanged, |
weak_ptr_factory_.GetWeakPtr(), |
object_proxy->object_path())); |
+ properties->SetAllPropertiesReceivedCallback( |
+ base::Bind(&NfcRecordClientImpl::OnPropertiesReceived, |
+ weak_ptr_factory_.GetWeakPtr(), |
+ object_proxy->object_path())); |
+ return properties; |
} |
// nfc_client_helpers::DBusObjectMap::Delegate override. |
@@ -215,6 +220,14 @@ class NfcRecordClientImpl : public NfcRecordClient, |
RecordPropertyChanged(object_path, property_name)); |
} |
+ // Called by NfcPropertySet when all properties have been processed as a |
+ // result of a call to GetAll. |
+ void OnPropertiesReceived(const dbus::ObjectPath& object_path) { |
+ VLOG(1) << "All record properties received; Path: " << object_path.value(); |
+ FOR_EACH_OBSERVER(NfcRecordClient::Observer, observers_, |
+ RecordPropertiesReceived(object_path)); |
+ } |
+ |
// We maintain a pointer to the bus to be able to request proxies for |
// new NFC records that appear. |
dbus::Bus* bus_; |