OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/autofill/content/browser/wallet/wallet_address.h" | 5 #include "components/autofill/content/browser/wallet/wallet_address.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 #if defined(OS_ANDROID) | 257 #if defined(OS_ANDROID) |
258 // TODO(aruslan): improve this stub implementation. | 258 // TODO(aruslan): improve this stub implementation. |
259 return address_line_1(); | 259 return address_line_1(); |
260 #else | 260 #else |
261 return string16(); | 261 return string16(); |
262 #endif | 262 #endif |
263 } | 263 } |
264 | 264 |
265 string16 Address::GetInfo(const AutofillType& type, | 265 string16 Address::GetInfo(const AutofillType& type, |
266 const std::string& app_locale) const { | 266 const std::string& app_locale) const { |
267 switch (AutofillType::GetEquivalentFieldType(type.native_type())) { | 267 switch (type.GetEquivalentNativeType()) { |
268 case NAME_FULL: | 268 case NAME_FULL: |
269 return recipient_name(); | 269 return recipient_name(); |
270 | 270 |
271 case ADDRESS_HOME_LINE1: | 271 case ADDRESS_HOME_LINE1: |
272 return address_line_1(); | 272 return address_line_1(); |
273 | 273 |
274 case ADDRESS_HOME_LINE2: | 274 case ADDRESS_HOME_LINE2: |
275 return address_line_2(); | 275 return address_line_2(); |
276 | 276 |
277 case ADDRESS_HOME_CITY: | 277 case ADDRESS_HOME_CITY: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 bool Address::operator==(const Address& other) const { | 313 bool Address::operator==(const Address& other) const { |
314 return object_id_ == other.object_id_ && EqualsIgnoreID(other); | 314 return object_id_ == other.object_id_ && EqualsIgnoreID(other); |
315 } | 315 } |
316 | 316 |
317 bool Address::operator!=(const Address& other) const { | 317 bool Address::operator!=(const Address& other) const { |
318 return !(*this == other); | 318 return !(*this == other); |
319 } | 319 } |
320 | 320 |
321 } // namespace wallet | 321 } // namespace wallet |
322 } // namespace autofill | 322 } // namespace autofill |
OLD | NEW |