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

Unified Diff: chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h

Issue 1857513002: Update code so 1:1 relation between delegate and router is more clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback Created 4 years, 8 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: chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h
index df18ead3a568151a1cfd4c5bfa6e364d60e0e7d7..125184f4254317fbdd5e24f335a31dbdbe29eecc 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate.h
@@ -38,30 +38,11 @@ class PasswordsPrivateDelegate : public KeyedService {
public:
~PasswordsPrivateDelegate() override {}
- // An interface used to notify clients (observers) of this object that
- // saved passwords, password exceptions, and plaintext passwords are ready to
- // be consumed by the UI. Register an observer via
- // PasswordsPrivateDelegate::AddObserver().
- class Observer {
- public:
- virtual void OnSavedPasswordsListChanged(
- const std::vector<api::passwords_private::PasswordUiEntry>& entries) {}
- virtual void OnPasswordExceptionsListChanged(
- const std::vector<std::string>& exceptions) {}
- virtual void OnPlaintextPasswordFetched(
- const std::string& origin_url,
- const std::string& username,
- const std::string& plaintext_password) {}
+ // Sends the saved passwords list to the event router.
+ virtual void SendSavedPasswordsList() = 0;
- protected:
- virtual ~Observer() {}
- };
-
- // Adds |observer| to be notified when password data changes.
- virtual void AddObserver(Observer* observer) = 0;
-
- // Removes |observer| from the observer list.
- virtual void RemoveObserver(Observer* observer) = 0;
+ // Sends the password exceptions list to the event router.
+ virtual void SendPasswordExceptionsList() = 0;
// Removes the saved password entry corresponding to |origin_url| and
// |username|.

Powered by Google App Engine
This is Rietveld 408576698