Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 return guid_ == profile.guid_ && Compare(profile) == 0; | 304 return guid_ == profile.guid_ && Compare(profile) == 0; |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool AutofillProfile::operator!=(const AutofillProfile& profile) const { | 307 bool AutofillProfile::operator!=(const AutofillProfile& profile) const { |
| 308 return !operator==(profile); | 308 return !operator==(profile); |
| 309 } | 309 } |
| 310 | 310 |
| 311 const string16 AutofillProfile::PrimaryValue() const { | 311 const string16 AutofillProfile::PrimaryValue() const { |
| 312 return GetFieldText(AutofillType(NAME_FULL)) + | 312 return GetFieldText(AutofillType(NAME_FULL)) + |
| 313 GetFieldText(AutofillType(ADDRESS_HOME_LINE1)) + | 313 GetFieldText(AutofillType(ADDRESS_HOME_LINE1)) + |
| 314 GetFieldText(AutofillType(ADDRESS_HOME_LINE2)) + | 314 GetFieldText(AutofillType(ADDRESS_HOME_LINE2)); |
| 315 GetFieldText(AutofillType(EMAIL_ADDRESS)); | |
|
Ilya Sherman
2011/03/16 23:07:16
This isn't the right fix for not merging with empt
dhollowa
2011/03/17 00:02:42
Yes, true. Will address later.
On 2011/03/16 23:
| |
| 316 } | 315 } |
| 317 | 316 |
| 318 string16 AutofillProfile::ConstructInferredLabel( | 317 string16 AutofillProfile::ConstructInferredLabel( |
| 319 const std::vector<AutofillFieldType>& included_fields, | 318 const std::vector<AutofillFieldType>& included_fields, |
| 320 size_t num_fields_to_use) const { | 319 size_t num_fields_to_use) const { |
| 321 const string16 separator = | 320 const string16 separator = |
| 322 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADDRESS_SUMMARY_SEPARATOR); | 321 l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_ADDRESS_SUMMARY_SEPARATOR); |
| 323 | 322 |
| 324 string16 label; | 323 string16 label; |
| 325 size_t num_fields_used = 0; | 324 size_t num_fields_used = 0; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 482 << UTF16ToUTF8(profile.GetFieldText(AutofillType(ADDRESS_HOME_ZIP))) | 481 << UTF16ToUTF8(profile.GetFieldText(AutofillType(ADDRESS_HOME_ZIP))) |
| 483 << " " | 482 << " " |
| 484 << UTF16ToUTF8(profile.GetFieldText(AutofillType(ADDRESS_HOME_COUNTRY))) | 483 << UTF16ToUTF8(profile.GetFieldText(AutofillType(ADDRESS_HOME_COUNTRY))) |
| 485 << " " | 484 << " " |
| 486 << UTF16ToUTF8(profile.GetFieldText(AutofillType( | 485 << UTF16ToUTF8(profile.GetFieldText(AutofillType( |
| 487 PHONE_HOME_WHOLE_NUMBER))) | 486 PHONE_HOME_WHOLE_NUMBER))) |
| 488 << " " | 487 << " " |
| 489 << UTF16ToUTF8(profile.GetFieldText(AutofillType( | 488 << UTF16ToUTF8(profile.GetFieldText(AutofillType( |
| 490 PHONE_FAX_WHOLE_NUMBER))); | 489 PHONE_FAX_WHOLE_NUMBER))); |
| 491 } | 490 } |
| OLD | NEW |