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

Side by Side Diff: components/password_manager/core/browser/form_fetcher.h

Issue 2760653002: Add FormFetcher::RemoveConsumer (Closed)
Patch Set: Rebased Created 3 years, 9 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 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 FormFetcher() = default; 50 FormFetcher() = default;
51 51
52 virtual ~FormFetcher() = default; 52 virtual ~FormFetcher() = default;
53 53
54 // Adds |consumer|, which must not be null. If the current state is 54 // Adds |consumer|, which must not be null. If the current state is
55 // UP_TO_DATE, calls ProcessMatches on the consumer immediately. Assumes that 55 // UP_TO_DATE, calls ProcessMatches on the consumer immediately. Assumes that
56 // |consumer| outlives |this|. 56 // |consumer| outlives |this|.
57 virtual void AddConsumer(Consumer* consumer) = 0; 57 virtual void AddConsumer(Consumer* consumer) = 0;
58 58
59 // Call this to stop |consumer| from receiving updates from |this|.
60 virtual void RemoveConsumer(Consumer* consumer) = 0;
61
59 // Returns the current state of the FormFetcher 62 // Returns the current state of the FormFetcher
60 virtual State GetState() const = 0; 63 virtual State GetState() const = 0;
61 64
62 // Statistics for recent password bubble usage. 65 // Statistics for recent password bubble usage.
63 virtual const std::vector<InteractionsStats>& GetInteractionsStats() 66 virtual const std::vector<InteractionsStats>& GetInteractionsStats()
64 const = 0; 67 const = 0;
65 68
66 // Federated matches obtained from the backend. Valid only if GetState() 69 // Federated matches obtained from the backend. Valid only if GetState()
67 // returns NOT_WAITING. 70 // returns NOT_WAITING.
68 virtual const std::vector<const autofill::PasswordForm*>& 71 virtual const std::vector<const autofill::PasswordForm*>&
(...skipping 10 matching lines...) Expand all
79 // otherwise the original FormFetcher does not have any data to be cloned. 82 // otherwise the original FormFetcher does not have any data to be cloned.
80 virtual std::unique_ptr<FormFetcher> Clone() = 0; 83 virtual std::unique_ptr<FormFetcher> Clone() = 0;
81 84
82 private: 85 private:
83 DISALLOW_COPY_AND_ASSIGN(FormFetcher); 86 DISALLOW_COPY_AND_ASSIGN(FormFetcher);
84 }; 87 };
85 88
86 } // namespace password_manager 89 } // namespace password_manager
87 90
88 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_ 91 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_FORM_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698