Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Unified Diff: components/autofill/browser/autofill_profile.cc

Issue 16034018: [Autofill] Support "importing" verified profiles and credit cards. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix up comments Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/autofill_profile.cc
diff --git a/components/autofill/browser/autofill_profile.cc b/components/autofill/browser/autofill_profile.cc
index 976cee9fa4418fe28b02e3d1198b808ea2117da0..4bb098173e2b938e7a21417865e1785057d170bd 100644
--- a/components/autofill/browser/autofill_profile.cc
+++ b/components/autofill/browser/autofill_profile.cc
@@ -505,6 +505,10 @@ bool AutofillProfile::IsSubsetOf(const AutofillProfile& profile,
void AutofillProfile::OverwriteWithOrAddTo(const AutofillProfile& profile,
const std::string& app_locale) {
+ // Verified profiles should never be overwritten piecemeal.
+ DCHECK(!IsVerified());
+ set_origin(profile.origin());
+
FieldTypeSet field_types;
profile.GetNonEmptyTypes(app_locale, &field_types);

Powered by Google App Engine
This is Rietveld 408576698