#include "components/password_manager/core/browser/password_manager_metrics_util.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "content/public/common/origin_util.h"
using autofill::PasswordForm;
using autofill::PasswordFormMap;
// If there is no corresponding PasswordFormManager, we create one. This is
// not the common case, and should only happen when there is a bug in our
// ability to detect forms.
- bool ssl_valid = (form.origin.SchemeIsSecure() &&
+ bool ssl_valid = (content::IsOriginSecure(form.origin) &&
!driver_->DidLastPageLoadEncounterSSLErrors());
PasswordFormManager* manager = new PasswordFormManager(
this, client_, driver_, form, ssl_valid);
// Always save generated passwords, as the user expresses explicit intent for
// Chrome to manage such passwords. For other passwords, respect the
// autocomplete attribute if autocomplete='off' is not ignored.
- if (!manager->HasGeneratedPassword() &&
- !form.password_autocomplete_set) {
+ if (!manager->HasGeneratedPassword()) {
RecordFailure(AUTOCOMPLETE_OFF, form.origin.host());
return;
}
PasswordForm provisionally_saved_form(form);
provisionally_saved_form.ssl_valid =
- form.origin.SchemeIsSecure() &&
+ content::IsOriginSecure(form.origin) &&
!driver_->DidLastPageLoadEncounterSSLErrors();
provisionally_saved_form.preferred = true;
PasswordFormManager::OtherPossibleUsernamesAction action =
iter != forms.end(); ++iter) {
// Don't involve the password manager if this form corresponds to
// SpdyProxy authentication, as indicated by the realm.
- if (EndsWith(iter->signon_realm, kSpdyProxyRealm, true))
+ if (base::EndsWith(iter->signon_realm, kSpdyProxyRealm, base::CompareCase::SENSITIVE))
continue;
- bool ssl_valid = iter->origin.SchemeIsSecure() && !had_ssl_error;
+ bool ssl_valid = content::IsOriginSecure(iter->origin) && !had_ssl_error;
PasswordFormManager* manager = new PasswordFormManager(
this, client_, driver_, *iter, ssl_valid);
pending_login_managers_.push_back(manager);