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

Unified Diff: components/password_manager/core/browser/suppressed_https_form_fetcher.cc

Issue 2912783002: Measure how often PSL and same-organization name credentials are suppressed. (Closed)
Patch Set: Addressed comments from kolos@. Created 3 years, 7 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/password_manager/core/browser/suppressed_https_form_fetcher.cc
diff --git a/components/password_manager/core/browser/suppressed_https_form_fetcher.cc b/components/password_manager/core/browser/suppressed_https_form_fetcher.cc
deleted file mode 100644
index 79e9dd52b5b76c29b024a1ad550acfba7327239e..0000000000000000000000000000000000000000
--- a/components/password_manager/core/browser/suppressed_https_form_fetcher.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/password_manager/core/browser/suppressed_https_form_fetcher.h"
-
-#include "base/logging.h"
-#include "base/stl_util.h"
-#include "components/password_manager/core/browser/password_manager_client.h"
-#include "components/password_manager/core/browser/password_store.h"
-#include "url/gurl.h"
-
-namespace password_manager {
-
-SuppressedHTTPSFormFetcher::SuppressedHTTPSFormFetcher(
- const std::string& observed_signon_realm,
- const PasswordManagerClient* client,
- Consumer* consumer)
- : client_(client),
- consumer_(consumer),
- observed_signon_realm_as_url_(observed_signon_realm) {
- DCHECK(client_);
- DCHECK(consumer_);
- DCHECK(observed_signon_realm_as_url_.SchemeIs(url::kHttpScheme));
- client_->GetPasswordStore()->GetLoginsForSameOrganizationName(
- observed_signon_realm, this);
-}
-
-SuppressedHTTPSFormFetcher::~SuppressedHTTPSFormFetcher() = default;
-
-void SuppressedHTTPSFormFetcher::OnGetPasswordStoreResults(
- std::vector<std::unique_ptr<autofill::PasswordForm>> results) {
- base::EraseIf(
- results, [this](const std::unique_ptr<autofill::PasswordForm>& form) {
- GURL candidate_signon_realm_as_url(form->signon_realm);
- return !candidate_signon_realm_as_url.SchemeIs(url::kHttpsScheme) ||
- candidate_signon_realm_as_url.host() !=
- observed_signon_realm_as_url_.host();
- });
-
- consumer_->ProcessSuppressedHTTPSForms(std::move(results));
-}
-
-} // namespace password_manager

Powered by Google App Engine
This is Rietveld 408576698