diff options
author | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 06:30:00 +0000 |
---|---|---|
committer | isherman@chromium.org <isherman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-18 06:30:00 +0000 |
commit | 8c5cbd74f49722c71376beb5ccd4688cdf6737b4 (patch) | |
tree | 920ceac285bf0be35be9e524fb17385f0fe23c3a /chrome | |
parent | 932bf0a22adb545f4e775557aea92da8190f328d (diff) | |
download | chromium_src-8c5cbd74f49722c71376beb5ccd4688cdf6737b4.zip chromium_src-8c5cbd74f49722c71376beb5ccd4688cdf6737b4.tar.gz chromium_src-8c5cbd74f49722c71376beb5ccd4688cdf6737b4.tar.bz2 |
Clean up AutoFillProfile::AdjustInferredLabels
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/5869004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/autofill/autofill_profile.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc index b36c52b..aef73dd 100644 --- a/chrome/browser/autofill/autofill_profile.cc +++ b/chrome/browser/autofill/autofill_profile.cc @@ -237,16 +237,18 @@ const string16 AutoFillProfile::Label() const { // static bool AutoFillProfile::AdjustInferredLabels( std::vector<AutoFillProfile*>* profiles) { - std::vector<string16> created_labels; const size_t kMinimalFieldsShown = 2; + + std::vector<string16> created_labels; CreateInferredLabels(profiles, NULL, UNKNOWN_TYPE, kMinimalFieldsShown, &created_labels); - DCHECK(profiles->size() == created_labels.size()); + DCHECK_EQ(profiles->size(), created_labels.size()); + bool updated_labels = false; for (size_t i = 0; i < profiles->size(); ++i) { - if (profiles->at(i)->Label() != created_labels[i]) { + if ((*profiles)[i]->Label() != created_labels[i]) { updated_labels = true; - profiles->at(i)->set_label(created_labels[i]); + (*profiles)[i]->set_label(created_labels[i]); } } return updated_labels; |