Home | History | Annotate | Download | only in password_manager

Lines Matching defs:form

210   // The time string is of the form "yyyyMMddHHmmss'Z", in UTC time.
236 PasswordForm* form) {
237 DCHECK(form);
271 &(form->password_value));
285 &(form->username_value));
300 form->ssl_valid = (protocol == kSecProtocolTypeHTTPS);
307 form->scheme = SchemeForAuthType(auth_type);
318 &form->date_created);
323 form->blacklisted_by_user = true;
333 if (form->password_value.empty() || EqualsASCII(form->password_value, " ")) {
334 form->blacklisted_by_user = true;
337 form->origin = URLFromComponents(form->ssl_valid, server, port, path);
340 form->signon_realm = form->origin.GetOrigin().spec();
341 if (form->scheme != PasswordForm::SCHEME_HTML) {
342 form->signon_realm.append(security_domain);
358 // Returns an the best match for |form| from |keychain_forms|, or NULL if there
387 PasswordForm* form = *i;
388 if (form->blacklisted_by_user) {
389 blacklist_forms.push_back(form);
502 PasswordForm* form = new PasswordForm();
505 form);
507 return form;
545 bool MacKeychainPasswordFormAdapter::AddPassword(const PasswordForm& form) {
547 DCHECK(!form.blacklisted_by_user);
553 if (!ExtractSignonRealmComponents(form.signon_realm, &server, &port,
557 std::string username = UTF16ToUTF8(form.username_value);
558 std::string password = UTF16ToUTF8(form.password_value);
559 std::string path = form.origin.path();
568 port, protocol, AuthTypeForScheme(form.scheme),
577 SecKeychainItemRef existing_item = KeychainItemForForm(form);
589 bool MacKeychainPasswordFormAdapter::RemovePassword(const PasswordForm& form) {
590 SecKeychainItemRef keychain_item = KeychainItemForForm(form);
609 PasswordForm* form = new PasswordForm();
611 *i, form)) {
612 keychain_forms.push_back(form);
621 const PasswordForm& form) {
623 // Keychain item goes with this form" is always "nothing" for blacklists.
624 if (form.blacklisted_by_user) {
628 std::string path = form.origin.path();
629 std::string username = UTF16ToUTF8(form.username_value);
631 form.signon_realm, form.scheme, path.c_str(), username.c_str());
678 // The signon_realm will be the Origin portion of a URL for an HTML form,
781 void PasswordStoreMac::AddLoginImpl(const PasswordForm& form) {
782 if (AddToKeychainIfNecessary(form)) {
783 if (login_metadata_db_->AddLogin(form)) {
785 changes.push_back(PasswordStoreChange(PasswordStoreChange::ADD, form));
794 void PasswordStoreMac::UpdateLoginImpl(const PasswordForm& form) {
796 if (!login_metadata_db_->UpdateLogin(form, &update_count))
801 !keychain_adapter.HasPasswordsMergeableWithForm(form)) {
809 if (AddToKeychainIfNecessary(form)) {
812 if (login_metadata_db_->AddLogin(form)) {
814 form));
818 form));
829 void PasswordStoreMac::RemoveLoginImpl(const PasswordForm& form) {
830 if (login_metadata_db_->RemoveLogin(form)) {
841 owned_keychain_adapter.PasswordExactlyMatchingForm(form);
843 // If we don't have other forms using it (i.e., a form differing only by
844 // the names of the form elements), delete the keychain entry.
845 if (!DatabaseHasFormMatchingKeychainForm(form)) {
846 owned_keychain_adapter.RemovePassword(form);
851 changes.push_back(PasswordStoreChange(PasswordStoreChange::REMOVE, form));
895 const content::PasswordForm& form,
899 keychain_adapter.PasswordsFillingForm(form);
902 login_metadata_db_->GetLogins(form, &database_forms);
961 bool PasswordStoreMac::AddToKeychainIfNecessary(const PasswordForm& form) {
962 if (form.blacklisted_by_user) {
966 return keychainAdapter.AddPassword(form);
970 const content::PasswordForm& form) {
973 login_metadata_db_->GetLogins(form, &database_forms);
976 if (internal_keychain_helpers::FormsMatchForMerge(form, **i) &&
977 (*i)->origin == form.origin) {