OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/autofill/autofill_profile.h" | 5 #include "chrome/browser/autofill/autofill_profile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 return Compare(profile) == 0; | 428 return Compare(profile) == 0; |
429 } | 429 } |
430 | 430 |
431 bool AutoFillProfile::operator!=(const AutoFillProfile& profile) const { | 431 bool AutoFillProfile::operator!=(const AutoFillProfile& profile) const { |
432 return !operator==(profile); | 432 return !operator==(profile); |
433 } | 433 } |
434 | 434 |
435 const string16 AutoFillProfile::PrimaryValue() const { | 435 const string16 AutoFillProfile::PrimaryValue() const { |
436 return GetFieldText(AutoFillType(NAME_FULL)) + | 436 return GetFieldText(AutoFillType(NAME_FULL)) + |
437 GetFieldText(AutoFillType(ADDRESS_HOME_LINE1)); | 437 GetFieldText(AutoFillType(ADDRESS_HOME_LINE1)) + |
| 438 GetFieldText(AutoFillType(ADDRESS_HOME_LINE2)) + |
| 439 GetFieldText(AutoFillType(EMAIL_ADDRESS)); |
438 } | 440 } |
439 | 441 |
440 Address* AutoFillProfile::GetHomeAddress() { | 442 Address* AutoFillProfile::GetHomeAddress() { |
441 return static_cast<Address*>(personal_info_[AutoFillType::ADDRESS_HOME]); | 443 return static_cast<Address*>(personal_info_[AutoFillType::ADDRESS_HOME]); |
442 } | 444 } |
443 | 445 |
444 string16 AutoFillProfile::ConstructInferredLabel( | 446 string16 AutoFillProfile::ConstructInferredLabel( |
445 const std::vector<AutoFillFieldType>* included_fields) const { | 447 const std::vector<AutoFillFieldType>* included_fields) const { |
446 DCHECK(included_fields); | 448 DCHECK(included_fields); |
447 string16 label; | 449 string16 label; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_ZIP))) | 495 << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_ZIP))) |
494 << " " | 496 << " " |
495 << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_COUNTRY))) | 497 << UTF16ToUTF8(profile.GetFieldText(AutoFillType(ADDRESS_HOME_COUNTRY))) |
496 << " " | 498 << " " |
497 << UTF16ToUTF8(profile.GetFieldText(AutoFillType( | 499 << UTF16ToUTF8(profile.GetFieldText(AutoFillType( |
498 PHONE_HOME_WHOLE_NUMBER))) | 500 PHONE_HOME_WHOLE_NUMBER))) |
499 << " " | 501 << " " |
500 << UTF16ToUTF8(profile.GetFieldText(AutoFillType( | 502 << UTF16ToUTF8(profile.GetFieldText(AutoFillType( |
501 PHONE_FAX_WHOLE_NUMBER))); | 503 PHONE_FAX_WHOLE_NUMBER))); |
502 } | 504 } |
OLD | NEW |