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

Side by Side Diff: components/password_manager/core/browser/fake_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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/password_manager/core/browser/fake_form_fetcher.h" 5 #include "components/password_manager/core/browser/fake_form_fetcher.h"
6 6
7 #include "components/autofill/core/common/password_form.h" 7 #include "components/autofill/core/common/password_form.h"
8 #include "components/password_manager/core/browser/statistics_table.h" 8 #include "components/password_manager/core/browser/statistics_table.h"
9 9
10 using autofill::PasswordForm; 10 using autofill::PasswordForm;
(...skipping 24 matching lines...) Expand all
35 const std::vector<const autofill::PasswordForm*>& 35 const std::vector<const autofill::PasswordForm*>&
36 FakeFormFetcher::GetFederatedMatches() const { 36 FakeFormFetcher::GetFederatedMatches() const {
37 return federated_; 37 return federated_;
38 } 38 }
39 39
40 const std::vector<const PasswordForm*>& 40 const std::vector<const PasswordForm*>&
41 FakeFormFetcher::GetSuppressedHTTPSForms() const { 41 FakeFormFetcher::GetSuppressedHTTPSForms() const {
42 return suppressed_https_forms_; 42 return suppressed_https_forms_;
43 } 43 }
44 44
45 bool FakeFormFetcher::DidCompleteQueryingSuppressedHTTPSForms() const { 45 const std::vector<const autofill::PasswordForm*>&
46 return did_complete_querying_suppressed_https_forms_; 46 FakeFormFetcher::GetSuppressedPSLMatchingForms() const {
47 return suppressed_psl_matching_forms_;
48 }
49
50 const std::vector<const autofill::PasswordForm*>&
51 FakeFormFetcher::GetSuppressedSameOrganizationNameForms() const {
52 return suppressed_same_organization_name_forms_;
53 }
54
55 bool FakeFormFetcher::DidCompleteQueryingSuppressedForms() const {
56 return did_complete_querying_suppressed_forms_;
47 } 57 }
48 58
49 void FakeFormFetcher::SetNonFederated( 59 void FakeFormFetcher::SetNonFederated(
50 const std::vector<const autofill::PasswordForm*>& non_federated, 60 const std::vector<const autofill::PasswordForm*>& non_federated,
51 size_t filtered_count) { 61 size_t filtered_count) {
52 state_ = State::NOT_WAITING; 62 state_ = State::NOT_WAITING;
53 for (Consumer* consumer : consumers_) { 63 for (Consumer* consumer : consumers_) {
54 consumer->ProcessMatches(non_federated, filtered_count); 64 consumer->ProcessMatches(non_federated, filtered_count);
55 } 65 }
56 } 66 }
57 67
58 void FakeFormFetcher::Fetch() { 68 void FakeFormFetcher::Fetch() {
59 state_ = State::WAITING; 69 state_ = State::WAITING;
60 } 70 }
61 71
62 std::unique_ptr<FormFetcher> FakeFormFetcher::Clone() { 72 std::unique_ptr<FormFetcher> FakeFormFetcher::Clone() {
63 return nullptr; 73 return nullptr;
64 } 74 }
65 75
66 } // namespace password_manager 76 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698