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 "chromeos/dbus/shill_ipconfig_client.h" | 5 #include "chromeos/dbus/shill_ipconfig_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 case base::Value::Type::LIST: { | 119 case base::Value::Type::LIST: { |
120 const base::ListValue* list_value = NULL; | 120 const base::ListValue* list_value = NULL; |
121 value.GetAsList(&list_value); | 121 value.GetAsList(&list_value); |
122 dbus::MessageWriter variant_writer(NULL); | 122 dbus::MessageWriter variant_writer(NULL); |
123 writer.OpenVariant("as", &variant_writer); | 123 writer.OpenVariant("as", &variant_writer); |
124 dbus::MessageWriter array_writer(NULL); | 124 dbus::MessageWriter array_writer(NULL); |
125 variant_writer.OpenArray("s", &array_writer); | 125 variant_writer.OpenArray("s", &array_writer); |
126 for (base::ListValue::const_iterator it = list_value->begin(); | 126 for (base::ListValue::const_iterator it = list_value->begin(); |
127 it != list_value->end(); | 127 it != list_value->end(); |
128 ++it) { | 128 ++it) { |
129 DLOG_IF(ERROR, it->GetType() != base::Value::Type::STRING) | 129 DLOG_IF(ERROR, (*it)->GetType() != base::Value::Type::STRING) |
130 << "Unexpected type " << it->GetType(); | 130 << "Unexpected type " << (*it)->GetType(); |
131 std::string str; | 131 std::string str; |
132 it->GetAsString(&str); | 132 (*it)->GetAsString(&str); |
133 array_writer.AppendString(str); | 133 array_writer.AppendString(str); |
134 } | 134 } |
135 variant_writer.CloseContainer(&array_writer); | 135 variant_writer.CloseContainer(&array_writer); |
136 writer.CloseContainer(&variant_writer); | 136 writer.CloseContainer(&variant_writer); |
137 } | 137 } |
138 case base::Value::Type::BOOLEAN: | 138 case base::Value::Type::BOOLEAN: |
139 case base::Value::Type::INTEGER: | 139 case base::Value::Type::INTEGER: |
140 case base::Value::Type::DOUBLE: | 140 case base::Value::Type::DOUBLE: |
141 case base::Value::Type::STRING: | 141 case base::Value::Type::STRING: |
142 dbus::AppendBasicTypeValueDataAsVariant(&writer, value); | 142 dbus::AppendBasicTypeValueDataAsVariant(&writer, value); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 ShillIPConfigClient::ShillIPConfigClient() {} | 176 ShillIPConfigClient::ShillIPConfigClient() {} |
177 | 177 |
178 ShillIPConfigClient::~ShillIPConfigClient() {} | 178 ShillIPConfigClient::~ShillIPConfigClient() {} |
179 | 179 |
180 // static | 180 // static |
181 ShillIPConfigClient* ShillIPConfigClient::Create() { | 181 ShillIPConfigClient* ShillIPConfigClient::Create() { |
182 return new ShillIPConfigClientImpl(); | 182 return new ShillIPConfigClientImpl(); |
183 } | 183 } |
184 | 184 |
185 } // namespace chromeos | 185 } // namespace chromeos |
OLD | NEW |