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

Unified Diff: components/password_manager/core/browser/fake_form_fetcher.h

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/fake_form_fetcher.h
diff --git a/components/password_manager/core/browser/fake_form_fetcher.h b/components/password_manager/core/browser/fake_form_fetcher.h
index defdc60c945d3a6e39922d5949cd76b8f1df3d3a..d7c64a327a21bc30503dadc9f75cfb6a1993f7a1 100644
--- a/components/password_manager/core/browser/fake_form_fetcher.h
+++ b/components/password_manager/core/browser/fake_form_fetcher.h
@@ -65,10 +65,28 @@ class FakeFormFetcher : public FormFetcher {
suppressed_https_forms_ = suppressed_forms;
}
- bool DidCompleteQueryingSuppressedHTTPSForms() const override;
+ const std::vector<const autofill::PasswordForm*>&
+ GetSuppressedPSLMatchingForms() const override;
- void set_did_complete_querying_suppressed_https_forms(bool value) {
- did_complete_querying_suppressed_https_forms_ = value;
+ // The pointees in |suppressed_forms| must outlive the fetcher.
+ void set_suppressed_psl_matching_forms(
+ const std::vector<const autofill::PasswordForm*>& suppressed_forms) {
+ suppressed_psl_matching_forms_ = suppressed_forms;
+ }
+
+ const std::vector<const autofill::PasswordForm*>&
+ GetSuppressedSameOrganizationNameForms() const override;
+
+ // The pointees in |suppressed_forms| must outlive the fetcher.
+ void set_suppressed_same_organization_name_forms(
+ const std::vector<const autofill::PasswordForm*>& suppressed_forms) {
+ suppressed_same_organization_name_forms_ = suppressed_forms;
+ }
+
+ bool DidCompleteQueryingSuppressedForms() const override;
+
+ void set_did_complete_querying_suppressed_forms(bool value) {
+ did_complete_querying_suppressed_forms_ = value;
}
void SetNonFederated(
@@ -87,7 +105,10 @@ class FakeFormFetcher : public FormFetcher {
std::vector<InteractionsStats> stats_;
std::vector<const autofill::PasswordForm*> federated_;
std::vector<const autofill::PasswordForm*> suppressed_https_forms_;
- bool did_complete_querying_suppressed_https_forms_ = false;
+ std::vector<const autofill::PasswordForm*> suppressed_psl_matching_forms_;
+ std::vector<const autofill::PasswordForm*>
+ suppressed_same_organization_name_forms_;
+ bool did_complete_querying_suppressed_forms_ = false;
DISALLOW_COPY_AND_ASSIGN(FakeFormFetcher);
};

Powered by Google App Engine
This is Rietveld 408576698