Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: chromeos/dbus/nfc_tag_client.cc

Issue 99903003: nfc: Various fixes to the NFC D-Bus client in chromeos/dbus. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chromeos/dbus/dbus_thread_manager.cc ('K') | « chromeos/dbus/nfc_tag_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/nfc_tag_client.cc
diff --git a/chromeos/dbus/nfc_tag_client.cc b/chromeos/dbus/nfc_tag_client.cc
index ad80a5109701569560213dfb3510fd26b1e19b7b..fad43c3873ca0a3825ecc9fedba802c30e85d483 100644
--- a/chromeos/dbus/nfc_tag_client.cc
+++ b/chromeos/dbus/nfc_tag_client.cc
@@ -73,7 +73,7 @@ class NfcTagClientImpl : public NfcTagClient,
// NfcTagClient override.
virtual void Write(
const dbus::ObjectPath& object_path,
- const NfcRecordClient::Attributes& attributes,
+ const base::DictionaryValue& attributes,
const base::Closure& callback,
const nfc_client_helpers::ErrorCallback& error_callback) OVERRIDE {
dbus::ObjectProxy* object_proxy =
@@ -103,11 +103,12 @@ class NfcTagClientImpl : public NfcTagClient,
dbus::MessageWriter array_writer(NULL);
dbus::MessageWriter dict_entry_writer(NULL);
writer.OpenArray("{sv}", &array_writer);
- for (NfcRecordClient::Attributes::const_iterator iter = attributes.begin();
- iter != attributes.end(); ++iter) {
+ for (DictionaryValue::Iterator iter(attributes);
+ !iter.IsAtEnd(); iter.Advance()) {
array_writer.OpenDictEntry(&dict_entry_writer);
- dict_entry_writer.AppendString(iter->first);
- dict_entry_writer.AppendVariantOfString(iter->second);
+ dict_entry_writer.AppendString(iter.key());
+ nfc_client_helpers::AppendValueDataAsVariant(&dict_entry_writer,
+ iter.value());
array_writer.CloseContainer(&dict_entry_writer);
}
writer.CloseContainer(&array_writer);
« chromeos/dbus/dbus_thread_manager.cc ('K') | « chromeos/dbus/nfc_tag_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698