diff options
author | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 22:34:00 +0000 |
---|---|---|
committer | georgey@chromium.org <georgey@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-23 22:34:00 +0000 |
commit | f2cd8366d10941fc248db85320bee6a8025b18bc (patch) | |
tree | 71818da5f03ff20a1b446e354aba3cb2894ad5e3 | |
parent | a999d67a5df08491b6829e4ebb4081681f8f18af (diff) | |
download | chromium_src-f2cd8366d10941fc248db85320bee6a8025b18bc.zip chromium_src-f2cd8366d10941fc248db85320bee6a8025b18bc.tar.gz chromium_src-f2cd8366d10941fc248db85320bee6a8025b18bc.tar.bz2 |
Removed deprecated AutofillProfile::Compare, renamed CompareMulti to Compare, fixed related bugs.
BUG=109797
TEST=unit tests
Review URL: http://codereview.chromium.org/9265023
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118750 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/autofill/autofill-inl.h | 6 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_profile.cc | 28 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_profile.h | 8 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_profile_unittest.cc | 14 | ||||
-rw-r--r-- | chrome/browser/autofill/credit_card.cc | 6 | ||||
-rw-r--r-- | chrome/browser/autofill/credit_card.h | 6 | ||||
-rw-r--r-- | chrome/browser/autofill/personal_data_manager_unittest.cc | 16 | ||||
-rw-r--r-- | chrome/browser/sync/profile_sync_service_autofill_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/webdata/autofill_profile_syncable_service.cc | 7 | ||||
-rw-r--r-- | chrome/browser/webdata/autofill_table.cc | 4 | ||||
-rw-r--r-- | chrome/browser/webdata/autofill_table_unittest.cc | 30 |
11 files changed, 41 insertions, 88 deletions
diff --git a/chrome/browser/autofill/autofill-inl.h b/chrome/browser/autofill/autofill-inl.h index 4d90324..30e2abf 100644 --- a/chrome/browser/autofill/autofill-inl.h +++ b/chrome/browser/autofill/autofill-inl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -14,11 +14,11 @@ class FormGroupMatchesByCompareFunctor { } bool operator()(const T* form_group) { - return form_group->CompareMulti(form_group_) == 0; + return form_group->Compare(form_group_) == 0; } bool operator()(const T& form_group) { - return form_group.CompareMulti(form_group_) == 0; + return form_group.Compare(form_group_) == 0; } private: diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc index d093d05..9ac86a7 100644 --- a/chrome/browser/autofill/autofill_profile.cc +++ b/chrome/browser/autofill/autofill_profile.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -444,32 +444,6 @@ bool AutofillProfile::IsEmpty() const { } int AutofillProfile::Compare(const AutofillProfile& profile) const { - // The following Autofill field types are the only types we store in the WebDB - // so far, so we're only concerned with matching these types in the profile. - const AutofillFieldType types[] = { NAME_FIRST, - NAME_MIDDLE, - NAME_LAST, - EMAIL_ADDRESS, - COMPANY_NAME, - ADDRESS_HOME_LINE1, - ADDRESS_HOME_LINE2, - ADDRESS_HOME_CITY, - ADDRESS_HOME_STATE, - ADDRESS_HOME_ZIP, - ADDRESS_HOME_COUNTRY, - PHONE_HOME_NUMBER }; - - for (size_t index = 0; index < arraysize(types); ++index) { - int comparison = GetInfo(types[index]).compare( - profile.GetInfo(types[index])); - if (comparison != 0) - return comparison; - } - - return 0; -} - -int AutofillProfile::CompareMulti(const AutofillProfile& profile) const { const AutofillFieldType single_value_types[] = { COMPANY_NAME, ADDRESS_HOME_LINE1, ADDRESS_HOME_LINE2, diff --git a/chrome/browser/autofill/autofill_profile.h b/chrome/browser/autofill/autofill_profile.h index c58d084..cdafade 100644 --- a/chrome/browser/autofill/autofill_profile.h +++ b/chrome/browser/autofill/autofill_profile.h @@ -105,16 +105,10 @@ class AutofillProfile : public FormGroup { // culling duplicates. The ordering is based on collation order of the // textual contents of the fields. // GUIDs are not compared, only the values of the contents themselves. - // DEPRECATED: Use |CompareMulti| instead. |Compare| does not compare - // multi-valued items. + // Full profile comparision, comparison includes multi-valued fields. int Compare(const AutofillProfile& profile) const; - // Full profile comparision, use instead of |Compare|. Same as |Compare| but - // includes multi-valued fields. - int CompareMulti(const AutofillProfile& profile) const; - // Equality operators compare GUIDs and the contents in the comparison. - // TODO(dhollowa): This needs to be made multi-profile once Sync updates. bool operator==(const AutofillProfile& profile) const; virtual bool operator!=(const AutofillProfile& profile) const; diff --git a/chrome/browser/autofill/autofill_profile_unittest.cc b/chrome/browser/autofill/autofill_profile_unittest.cc index 81b7395..db7e81ade8 100644 --- a/chrome/browser/autofill/autofill_profile_unittest.cc +++ b/chrome/browser/autofill/autofill_profile_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -610,7 +610,6 @@ TEST_F(AutofillProfileTest, MultiValueNames) { // Update the values. AutofillProfile p2 = p; EXPECT_EQ(0, p.Compare(p2)); - EXPECT_EQ(0, p.CompareMulti(p2)); const string16 kNoOne(ASCIIToUTF16("No One")); set_values[1] = kNoOne; p.SetMultiInfo(NAME_FULL, set_values); @@ -618,8 +617,7 @@ TEST_F(AutofillProfileTest, MultiValueNames) { ASSERT_EQ(2UL, get_values.size()); EXPECT_EQ(kJohnDoe, get_values[0]); EXPECT_EQ(kNoOne, get_values[1]); - EXPECT_EQ(0, p.Compare(p2)); - EXPECT_NE(0, p.CompareMulti(p2)); + EXPECT_NE(0, p.Compare(p2)); // Delete values. set_values.clear(); @@ -654,7 +652,6 @@ TEST_F(AutofillProfileTest, MultiValueEmails) { // Update the values. AutofillProfile p2 = p; EXPECT_EQ(0, p.Compare(p2)); - EXPECT_EQ(0, p.CompareMulti(p2)); const string16 kNoOne(ASCIIToUTF16("no@one.com")); set_values[1] = kNoOne; p.SetMultiInfo(EMAIL_ADDRESS, set_values); @@ -662,8 +659,7 @@ TEST_F(AutofillProfileTest, MultiValueEmails) { ASSERT_EQ(2UL, get_values.size()); EXPECT_EQ(kJohnDoe, get_values[0]); EXPECT_EQ(kNoOne, get_values[1]); - EXPECT_EQ(0, p.Compare(p2)); - EXPECT_NE(0, p.CompareMulti(p2)); + EXPECT_NE(0, p.Compare(p2)); // Delete values. set_values.clear(); @@ -698,7 +694,6 @@ TEST_F(AutofillProfileTest, MultiValuePhone) { // Update the values. AutofillProfile p2 = p; EXPECT_EQ(0, p.Compare(p2)); - EXPECT_EQ(0, p.CompareMulti(p2)); const string16 kNoOne(ASCIIToUTF16("4152110000")); set_values[1] = kNoOne; p.SetMultiInfo(PHONE_HOME_WHOLE_NUMBER, set_values); @@ -706,8 +701,7 @@ TEST_F(AutofillProfileTest, MultiValuePhone) { ASSERT_EQ(2UL, get_values.size()); EXPECT_EQ(kJohnDoe, get_values[0]); EXPECT_EQ(kNoOne, get_values[1]); - EXPECT_EQ(0, p.Compare(p2)); - EXPECT_NE(0, p.CompareMulti(p2)); + EXPECT_NE(0, p.Compare(p2)); // Delete values. set_values.clear(); diff --git a/chrome/browser/autofill/credit_card.cc b/chrome/browser/autofill/credit_card.cc index 4764ba42..cc49682 100644 --- a/chrome/browser/autofill/credit_card.cc +++ b/chrome/browser/autofill/credit_card.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -458,10 +458,6 @@ int CreditCard::Compare(const CreditCard& credit_card) const { return 0; } -int CreditCard::CompareMulti(const CreditCard& credit_card) const { - return Compare(credit_card); -} - bool CreditCard::operator==(const CreditCard& credit_card) const { if (guid_ != credit_card.guid_) return false; diff --git a/chrome/browser/autofill/credit_card.h b/chrome/browser/autofill/credit_card.h index 34dcac8..12c80e4 100644 --- a/chrome/browser/autofill/credit_card.h +++ b/chrome/browser/autofill/credit_card.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -67,10 +67,6 @@ class CreditCard : public FormGroup { // credit cards themselves. int Compare(const CreditCard& credit_card) const; - // This is same as |Compare| for credit cards as they are single-valued. - // This is here to unify templated code that deals with |FormGroup|s. - int CompareMulti(const CreditCard& credit_card) const; - // Used by tests. bool operator==(const CreditCard& credit_card) const; bool operator!=(const CreditCard& credit_card) const; diff --git a/chrome/browser/autofill/personal_data_manager_unittest.cc b/chrome/browser/autofill/personal_data_manager_unittest.cc index 90f8d81..0daccb7 100644 --- a/chrome/browser/autofill/personal_data_manager_unittest.cc +++ b/chrome/browser/autofill/personal_data_manager_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -107,7 +107,7 @@ TEST_F(PersonalDataManagerTest, AddProfile) { // Verify the addition. const std::vector<AutofillProfile*>& results1 = personal_data_->profiles(); ASSERT_EQ(1U, results1.size()); - EXPECT_EQ(0, profile0.CompareMulti(*results1[0])); + EXPECT_EQ(0, profile0.Compare(*results1[0])); // Add profile with identical values. Duplicates should not get saved. AutofillProfile profile0a = profile0; @@ -120,7 +120,7 @@ TEST_F(PersonalDataManagerTest, AddProfile) { // Verify the non-addition. const std::vector<AutofillProfile*>& results2 = personal_data_->profiles(); ASSERT_EQ(1U, results2.size()); - EXPECT_EQ(0, profile0.CompareMulti(*results2[0])); + EXPECT_EQ(0, profile0.Compare(*results2[0])); // New profile with different email. AutofillProfile profile1 = profile0; @@ -138,8 +138,8 @@ TEST_F(PersonalDataManagerTest, AddProfile) { // Verify the addition. const std::vector<AutofillProfile*>& results3 = personal_data_->profiles(); ASSERT_EQ(2U, results3.size()); - EXPECT_EQ(0, profile0.CompareMulti(*results3[0])); - EXPECT_EQ(0, profile1.CompareMulti(*results3[1])); + EXPECT_EQ(0, profile0.Compare(*results3[0])); + EXPECT_EQ(0, profile1.Compare(*results3[1])); } TEST_F(PersonalDataManagerTest, AddUpdateRemoveProfiles) { @@ -857,7 +857,7 @@ TEST_F(PersonalDataManagerTest, AggregateTwoProfilesWithMultiValue) { expected.SetMultiInfo(EMAIL_ADDRESS, values); ASSERT_EQ(1U, results2.size()); - EXPECT_EQ(0, expected.CompareMulti(*results2[0])); + EXPECT_EQ(0, expected.Compare(*results2[0])); } TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) { @@ -967,7 +967,7 @@ TEST_F(PersonalDataManagerTest, AggregateSameProfileWithConflict) { expected.SetMultiInfo(PHONE_HOME_WHOLE_NUMBER, values); expected.SetInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("United States")); ASSERT_EQ(1U, results2.size()); - EXPECT_EQ(0, expected.CompareMulti(*results2[0])); + EXPECT_EQ(0, expected.Compare(*results2[0])); } TEST_F(PersonalDataManagerTest, AggregateProfileWithMissingInfoInOld) { @@ -1954,5 +1954,5 @@ TEST_F(PersonalDataManagerTest, CaseInsensitiveMultiValueAggregation) { expected.SetMultiInfo(PHONE_HOME_CITY_AND_NUMBER, values); ASSERT_EQ(1U, results2.size()); - EXPECT_EQ(0, expected.CompareMulti(*results2[0])); + EXPECT_EQ(0, expected.Compare(*results2[0])); } diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc index 74c4690..75fec91 100644 --- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc @@ -124,7 +124,7 @@ class AutofillTableMock : public AutofillTable { }; MATCHER_P(MatchProfiles, profile, "") { - return (profile.CompareMulti(arg) == 0); + return (profile.Compare(arg) == 0); } @@ -943,7 +943,7 @@ TEST_F(ProfileSyncServiceAutofillTest, HasNativeHasSyncMergeProfile) { ASSERT_TRUE(GetAutofillProfilesFromSyncDBUnderProfileNode( &new_sync_profiles)); ASSERT_EQ(1U, new_sync_profiles.size()); - EXPECT_EQ(0, sync_profile.CompareMulti(new_sync_profiles[0])); + EXPECT_EQ(0, sync_profile.Compare(new_sync_profiles[0])); } TEST_F(ProfileSyncServiceAutofillTest, HasNativeHasSyncMergeProfileCombine) { diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.cc b/chrome/browser/webdata/autofill_profile_syncable_service.cc index ee2fc49..892cf88 100644 --- a/chrome/browser/webdata/autofill_profile_syncable_service.cc +++ b/chrome/browser/webdata/autofill_profile_syncable_service.cc @@ -380,7 +380,7 @@ AutofillProfileSyncableService::CreateOrUpdateProfile( // Check if profile appears under a different guid. for (GUIDToProfileMap::iterator i = profile_map->begin(); i != profile_map->end(); ++i) { - if (i->second->CompareMulti(*new_profile) == 0) { + if (i->second->Compare(*new_profile) == 0) { bundle->profiles_to_delete.push_back(i->second->guid()); DVLOG(2) << "[AUTOFILL SYNC]" << "Found in sync db but with a different guid: " @@ -390,7 +390,8 @@ AutofillProfileSyncableService::CreateOrUpdateProfile( << ". Profile to be deleted " << i->second->guid(); profile_map->erase(i); break; - } else if (i->second->PrimaryValue() == new_profile->PrimaryValue()) { + } else if (!i->second->PrimaryValue().empty() && + i->second->PrimaryValue() == new_profile->PrimaryValue()) { // Add it to candidates for merge - if there is no profile with this // guid we will merge them. bundle->candidates_to_merge.insert(std::make_pair(i->second->guid(), @@ -497,7 +498,7 @@ bool AutofillProfileSyncableService::MergeProfile( const AutofillProfile& merge_from, AutofillProfile* merge_into) { merge_into->OverwriteWithOrAddTo(merge_from); - return (merge_into->CompareMulti(merge_from) != 0); + return (merge_into->Compare(merge_from) != 0); } AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { diff --git a/chrome/browser/webdata/autofill_table.cc b/chrome/browser/webdata/autofill_table.cc index 60f3431..d4a291b 100644 --- a/chrome/browser/webdata/autofill_table.cc +++ b/chrome/browser/webdata/autofill_table.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -876,7 +876,7 @@ bool AutofillTable::UpdateAutofillProfileMulti(const AutofillProfile& profile) { // Preserve appropriate modification dates by not updating unchanged profiles. scoped_ptr<AutofillProfile> old_profile(tmp_profile); - if (old_profile->CompareMulti(profile) == 0) + if (old_profile->Compare(profile) == 0) return true; sql::Statement s(db_->GetUniqueStatement( diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/chrome/browser/webdata/autofill_table_unittest.cc index 52d457a..2eca221 100644 --- a/chrome/browser/webdata/autofill_table_unittest.cc +++ b/chrome/browser/webdata/autofill_table_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -682,7 +682,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueNames) { AutofillProfile* db_profile; ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Update the values. @@ -692,7 +692,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueNames) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Delete values. @@ -701,7 +701,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueNames) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); EXPECT_EQ(string16(), db_profile->GetInfo(NAME_FULL)); delete db_profile; } @@ -723,20 +723,18 @@ TEST_F(AutofillTableTest, AutofillProfileSingleValue) { AutofillProfile* db_profile; ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; - // Update the values. This update is the "single value" update, it should - // not perturb the multi-values following the zeroth entry. This simulates - // the Sync use-case until Sync can be changed to be multi-value aware. const string16 kNoOne(ASCIIToUTF16("No One")); set_values.resize(1); set_values[0] = kNoOne; p.SetMultiInfo(NAME_FULL, set_values); EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfile(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); - EXPECT_EQ(p, *db_profile); - EXPECT_NE(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(p.PrimaryValue(), db_profile->PrimaryValue()); + EXPECT_EQ(p.guid(), db_profile->guid()); + EXPECT_NE(0, p.Compare(*db_profile)); db_profile->GetMultiInfo(NAME_FULL, &set_values); ASSERT_EQ(2UL, set_values.size()); EXPECT_EQ(kNoOne, set_values[0]); @@ -761,7 +759,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueEmails) { AutofillProfile* db_profile; ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Update the values. @@ -771,7 +769,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueEmails) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Delete values. @@ -780,7 +778,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValueEmails) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); EXPECT_EQ(string16(), db_profile->GetInfo(EMAIL_ADDRESS)); delete db_profile; } @@ -802,7 +800,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValuePhone) { AutofillProfile* db_profile; ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Update the values. @@ -812,7 +810,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValuePhone) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); delete db_profile; // Delete values. @@ -821,7 +819,7 @@ TEST_F(AutofillTableTest, AutofillProfileMultiValuePhone) { EXPECT_TRUE(db.GetAutofillTable()->UpdateAutofillProfileMulti(p)); ASSERT_TRUE(db.GetAutofillTable()->GetAutofillProfile(p.guid(), &db_profile)); EXPECT_EQ(p, *db_profile); - EXPECT_EQ(0, p.CompareMulti(*db_profile)); + EXPECT_EQ(0, p.Compare(*db_profile)); EXPECT_EQ(string16(), db_profile->GetInfo(EMAIL_ADDRESS)); delete db_profile; } |