Home | History | Annotate | Download | only in autofill

Lines Matching refs:profile

21 #include "chrome/browser/profiles/profile.h"
92 // Returns true if minimum requirements for import of a given |profile| have
96 bool IsMinimumAddress(const AutofillProfile& profile) {
97 return !profile.GetInfo(ADDRESS_HOME_LINE1).empty() &&
98 !profile.GetInfo(ADDRESS_HOME_CITY).empty() &&
99 !profile.GetInfo(ADDRESS_HOME_STATE).empty() &&
100 !profile.GetInfo(ADDRESS_HOME_ZIP).empty();
176 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
197 // TODO: Is this the funcionality that tries to create a profile for the user
204 // Parse the form and construct a profile based on the information that is
313 // Reject the profile if minimum address and validation requirements are not
360 // Ensure that profile labels are up to date. Currently, sync relies on
361 // labels to identify a profile.
369 WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
373 // Any profiles that are not in the new profile list should be removed from
425 WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
467 void PersonalDataManager::AddProfile(const AutofillProfile& profile) {
468 // Don't save a web profile if the data in the profile is a subset of an
469 // auxiliary profile.
473 if (profile.IsSubsetOf(**iter))
478 MergeProfile(profile, web_profiles_.get(), &profiles);
482 void PersonalDataManager::UpdateProfile(const AutofillProfile& profile) {
484 WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
488 // Update the cached profile.
491 if ((*iter)->guid() == profile.guid()) {
493 *iter = new AutofillProfile(profile);
498 // Ensure that profile labels are up to date.
501 wds->UpdateAutofillProfile(profile);
513 // Remove the profile that matches |guid|.
545 WebDataService* wds = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
600 const FormGroup* profile = *iter;
601 if (!profile) {
606 profile->GetPossibleFieldTypes(clean_info, possible_types);
680 void PersonalDataManager::Init(Profile* profile) {
681 profile_ = profile;
698 const AutofillProfile& profile) {
699 if (!IsMinimumAddress(profile))
702 string16 email = profile.GetInfo(EMAIL_ADDRESS);
707 string16 state = profile.GetInfo(ADDRESS_HOME_STATE);
708 if (profile.CountryCode() == "US" &&
714 string16 zip = profile.GetInfo(ADDRESS_HOME_ZIP);
715 if (profile.CountryCode() == "US" && !zip.empty() && !IsValidZip(zip))
723 const AutofillProfile& profile,
729 // Set to true if |profile| is merged into |existing_profiles|.
732 // First preference is to add missing values to an existing profile.
738 if (profile.IsSubsetOf(**iter)) {
739 // In this case, the existing profile already contains all of the data
740 // in |profile|, so consider the profiles already merged.
742 } else if ((*iter)->IntersectionOfTypesHasEqualValues(profile)) {
743 // |profile| contains all of the data in this profile, plus more.
745 (*iter)->MergeWith(profile);
760 if (!profile.PrimaryValue().empty() &&
762 StringToLowerASCII(profile.PrimaryValue())) {
764 (*iter)->OverwriteWithOrAddTo(profile);
771 // Finally, if the new profile was not merged with an existing profile then
772 // add the new profile to the list.
774 merged_profiles->push_back(profile);
781 // This shoud request the profile(s) from java land on Android.
783 // WebAutoFillClientAndroid will inject a profile while we're testing.
786 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
809 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
863 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
877 // TODO: This should update the profile in Java land.
934 profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);