Commit 61a7a7a8 authored by Bettina's avatar Bettina Committed by Commit Bot

Explain the |kPasswordHashDataList| callback.

Currently, there is only one callback in the
hash_password_manager.h file and the comments
aren't clear enough. The callback is currently
only called when there is a change in the
|kPasswordHashDataList| and the change is not
associated to a first sign-in and the save
was successful.

Bug: 1016458
Change-Id: I422843144778a2e40eafd1f831576fae9a2d5fa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872737
Auto-Submit: Bettina Dea <bdea@chromium.org>
Reviewed-by: default avatarVarun Khaneja <vakh@chromium.org>
Reviewed-by: default avatarVadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Vadym Doroshenko <dvadym@chromium.org>
Cr-Commit-Position: refs/heads/master@{#708151}
parent dae22e4b
......@@ -57,7 +57,9 @@ class HashPasswordManager {
void set_prefs(PrefService* prefs) { prefs_ = prefs; }
// Adds a listener for when |kPasswordHashDataList| list might have changed.
// Should only be called on the UI thread.
// Should only be called on the UI thread. The callback is only called when
// the sign-in isn't the first change on the |kPasswordHashDataList| and
// saving the password hash actually succeeded.
virtual std::unique_ptr<StateSubscription> RegisterStateCallback(
const base::Callback<void(const std::string& username)>& callback);
......@@ -68,7 +70,9 @@ class HashPasswordManager {
PrefService* prefs_ = nullptr;
// Callbacks when |kPasswordHashDataList| might have changed.
// Should only be accessed on the UI thread.
// Should only be accessed on the UI thread. The callback is only called when
// the sign-in isn't the first change on the |kPasswordHashDataList| and
// saving the password hash actually succeeded.
base::CallbackList<void(const std::string& username)> state_callback_list_;
DISALLOW_COPY_AND_ASSIGN(HashPasswordManager);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment