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/core/browser/autofill_profile.h" | 5 #include "components/autofill/core/browser/autofill_profile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <map> | 9 #include <map> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 } | 474 } |
475 | 475 |
476 bool AutofillProfile::operator==(const AutofillProfile& profile) const { | 476 bool AutofillProfile::operator==(const AutofillProfile& profile) const { |
477 return guid() == profile.guid() && EqualsSansGuid(profile); | 477 return guid() == profile.guid() && EqualsSansGuid(profile); |
478 } | 478 } |
479 | 479 |
480 bool AutofillProfile::operator!=(const AutofillProfile& profile) const { | 480 bool AutofillProfile::operator!=(const AutofillProfile& profile) const { |
481 return !operator==(profile); | 481 return !operator==(profile); |
482 } | 482 } |
483 | 483 |
484 const base::string16 AutofillProfile::PrimaryValue() const { | 484 const base::string16& AutofillProfile::PrimaryValue() const { |
vabr (Chromium)
2014/07/11 13:37:43
Here again, the returned object is local and goes
vabr (Chromium)
2014/07/11 19:27:49
And retracting my comment here as well, please rev
lucinka.brozkova
2014/07/11 21:05:57
Done.
| |
485 return GetRawInfo(ADDRESS_HOME_LINE1) + GetRawInfo(ADDRESS_HOME_CITY); | 485 return GetRawInfo(ADDRESS_HOME_LINE1) + GetRawInfo(ADDRESS_HOME_CITY); |
486 } | 486 } |
487 | 487 |
488 bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile, | 488 bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile, |
489 const std::string& app_locale) const { | 489 const std::string& app_locale) const { |
490 ServerFieldTypeSet types; | 490 ServerFieldTypeSet types; |
491 GetNonEmptyTypes(app_locale, &types); | 491 GetNonEmptyTypes(app_locale, &types); |
492 | 492 |
493 for (ServerFieldTypeSet::const_iterator it = types.begin(); it != types.end(); | 493 for (ServerFieldTypeSet::const_iterator it = types.begin(); it != types.end(); |
494 ++it) { | 494 ++it) { |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
922 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) | 922 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_SORTING_CODE)) |
923 << " " | 923 << " " |
924 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) | 924 << UTF16ToUTF8(profile.GetRawInfo(ADDRESS_HOME_COUNTRY)) |
925 << " " | 925 << " " |
926 << profile.language_code() | 926 << profile.language_code() |
927 << " " | 927 << " " |
928 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); | 928 << UTF16ToUTF8(MultiString(profile, PHONE_HOME_WHOLE_NUMBER)); |
929 } | 929 } |
930 | 930 |
931 } // namespace autofill | 931 } // namespace autofill |
OLD | NEW |