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

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

Issue 2468763002: MD Settings: fix chrome.passwordsPrivate empty list bug (Closed)
Patch Set: git cl format + compile + const ref + bool rename Created 4 years, 1 month 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_impl.h
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.h b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.h
index 55b87f518b98598be7555f32ac2c31cb8d271880..830e8ba9a9887e0093acdf95556140a6b65c7ecc 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.h
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.h
@@ -40,11 +40,10 @@ class PasswordsPrivateDelegateImpl : public PasswordsPrivateDelegate,
// PasswordsPrivateDelegate implementation.
void SendSavedPasswordsList() override;
- const std::vector<api::passwords_private::PasswordUiEntry>*
- GetSavedPasswordsList() const override;
+ void GetSavedPasswordsList(const UiEntriesCallback& callback) override;
void SendPasswordExceptionsList() override;
- const std::vector<api::passwords_private::ExceptionPair>*
- GetPasswordExceptionsList() const override;
+ void GetPasswordExceptionsList(
+ const ExceptionPairsCallback& callback) override;
void RemoveSavedPassword(
const std::string& origin_url, const std::string& username) override;
void RemovePasswordException(const std::string& exception_url) override;
@@ -80,7 +79,7 @@ class PasswordsPrivateDelegateImpl : public PasswordsPrivateDelegate,
// Executes a given callback by either invoking it immediately if the class
// has been initialized or by deferring it until initialization has completed.
- void ExecuteFunction(const base::Callback<void()>& callback);
+ void ExecuteFunction(const base::Closure& callback);
void RemoveSavedPasswordInternal(
const std::string& origin_url, const std::string& username);
@@ -98,20 +97,22 @@ class PasswordsPrivateDelegateImpl : public PasswordsPrivateDelegate,
// The current list of entries/exceptions. Cached here so that when new
// observers are added, this delegate can send the current lists without
// having to request them from |password_manager_presenter_| again.
- std::vector<api::passwords_private::PasswordUiEntry> current_entries_;
- std::vector<api::passwords_private::ExceptionPair> current_exceptions_;
+ UiEntries current_entries_;
+ ExceptionPairs current_exceptions_;
// Whether SetPasswordList and SetPasswordExceptionList have been called, and
// whether this class has been initialized, meaning both have been called.
- bool set_password_list_called_;
- bool set_password_exception_list_called_;
+ bool current_entries_initialized_;
+ bool current_exceptions_initialized_;
bool is_initialized_;
// Vector of callbacks which are queued up before the password store has been
// initialized. Once both SetPasswordList() and SetPasswordExceptionList()
// have been called, this class is considered initialized and can these
// callbacks are invoked.
- std::vector<base::Callback<void()>> pre_initialization_callbacks_;
+ std::vector<base::Closure> pre_initialization_callbacks_;
+ std::vector<UiEntriesCallback> get_saved_passwords_list_callbacks_;
+ std::vector<ExceptionPairsCallback> get_password_exception_list_callbacks_;
// The WebContents used when invoking this API. Used to fetch the
// NativeWindow for the window where the API was called.

Powered by Google App Engine
This is Rietveld 408576698