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

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: Improve variable name 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
« no previous file with comments | « no previous file | components/autofill/browser/autofill_profile_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a5be4169fb627dd0f851ded925f35d8843c261c0 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 with unverified data.
+ DCHECK(!IsVerified() || profile.IsVerified());
+ set_origin(profile.origin());
+
FieldTypeSet field_types;
profile.GetNonEmptyTypes(app_locale, &field_types);
« no previous file with comments | « no previous file | components/autofill/browser/autofill_profile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698