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

Unified Diff: components/password_manager/core/browser/password_reuse_detector.cc

Issue 2913323004: Implementation of sync password hash clearing. (Closed)
Patch Set: addressed reviewer's comments Created 3 years, 7 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: components/password_manager/core/browser/password_reuse_detector.cc
diff --git a/components/password_manager/core/browser/password_reuse_detector.cc b/components/password_manager/core/browser/password_reuse_detector.cc
index a06e94eb1838d049822ad0a581cecc05099f8d86..5bf0abb361f9b1000de4c104cd6e484b568cc74c 100644
--- a/components/password_manager/core/browser/password_reuse_detector.cc
+++ b/components/password_manager/core/browser/password_reuse_detector.cc
@@ -137,6 +137,12 @@ void PasswordReuseDetector::SaveSyncPasswordHash(
}
}
+void PasswordReuseDetector::ClearSyncPasswordHash() {
+ sync_password_hash_.reset();
+ if (prefs_)
+ prefs_->ClearPref(prefs::kSyncPasswordHash);
+}
+
void PasswordReuseDetector::AddPassword(const autofill::PasswordForm& form) {
if (form.password_value.size() < kMinPasswordLengthToCheck)
return;

Powered by Google App Engine
This is Rietveld 408576698