Index: components/autofill/core/browser/autofill_merge_unittest.cc |
diff --git a/components/autofill/core/browser/autofill_merge_unittest.cc b/components/autofill/core/browser/autofill_merge_unittest.cc |
index 37a5a87ae88b2aab891bbb972df7eef2a128f4ac..ef60bf7b72814a5a86c3c7f2b7383509b88dba25 100644 |
--- a/components/autofill/core/browser/autofill_merge_unittest.cc |
+++ b/components/autofill/core/browser/autofill_merge_unittest.cc |
@@ -88,7 +88,8 @@ class PersonalDataManagerMock : public PersonalDataManager { |
void Reset(); |
// PersonalDataManager: |
- virtual void SaveImportedProfile(const AutofillProfile& profile) OVERRIDE; |
+ virtual std::string SaveImportedProfile( |
+ const AutofillProfile& profile) OVERRIDE; |
virtual const std::vector<AutofillProfile*>& web_profiles() const OVERRIDE; |
private: |
@@ -108,11 +109,14 @@ void PersonalDataManagerMock::Reset() { |
profiles_.clear(); |
} |
-void PersonalDataManagerMock::SaveImportedProfile( |
+std::string PersonalDataManagerMock::SaveImportedProfile( |
const AutofillProfile& profile) { |
std::vector<AutofillProfile> profiles; |
- if (!MergeProfile(profile, profiles_.get(), "en-US", &profiles)) |
+ std::string merged_guid = |
+ MergeProfile(profile, profiles_.get(), "en-US", &profiles); |
+ if (merged_guid == profile.guid()) |
profiles_.push_back(new AutofillProfile(profile)); |
+ return merged_guid; |
} |
const std::vector<AutofillProfile*>& PersonalDataManagerMock::web_profiles() |