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

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

Issue 2552263002: Pass InteractionStats by value (Closed)
Patch Set: ={} Created 4 years 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/form_fetcher_impl.h
diff --git a/components/password_manager/core/browser/form_fetcher_impl.h b/components/password_manager/core/browser/form_fetcher_impl.h
index 096bd618d5e3a35e9fe380cbf09ed941e0bfcc8e..b786f94546508cce0863a401d263e0db54c46f7a 100644
--- a/components/password_manager/core/browser/form_fetcher_impl.h
+++ b/components/password_manager/core/browser/form_fetcher_impl.h
@@ -32,8 +32,7 @@ class FormFetcherImpl : public FormFetcher, public PasswordStoreConsumer {
// FormFetcher:
void AddConsumer(Consumer* consumer) override;
State GetState() const override;
- const std::vector<const InteractionsStats*>& GetInteractionsStats()
- const override;
+ const std::vector<InteractionsStats>& GetInteractionsStats() const override;
const std::vector<const autofill::PasswordForm*>& GetFederatedMatches()
const override;
void Fetch() override;
@@ -41,8 +40,7 @@ class FormFetcherImpl : public FormFetcher, public PasswordStoreConsumer {
// PasswordStoreConsumer:
void OnGetPasswordStoreResults(
std::vector<std::unique_ptr<autofill::PasswordForm>> results) override;
- void OnGetSiteStatistics(
- std::vector<std::unique_ptr<InteractionsStats>> stats) override;
+ void OnGetSiteStatistics(std::vector<InteractionsStats> stats) override;
private:
// PasswordStore results will be fetched for this description.
@@ -57,12 +55,11 @@ class FormFetcherImpl : public FormFetcher, public PasswordStoreConsumer {
std::vector<std::unique_ptr<autofill::PasswordForm>> federated_;
// Statistics for the current domain.
- std::vector<std::unique_ptr<InteractionsStats>> interactions_stats_;
+ std::vector<InteractionsStats> interactions_stats_;
// Non-owning copies of the vectors above.
std::vector<const autofill::PasswordForm*> weak_non_federated_;
std::vector<const autofill::PasswordForm*> weak_federated_;
- std::vector<const InteractionsStats*> weak_interactions_stats_;
// Consumers of the fetcher, all are assumed to outlive |this|.
std::set<Consumer*> consumers_;
« no previous file with comments | « components/password_manager/core/browser/form_fetcher.h ('k') | components/password_manager/core/browser/form_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698