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

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

Issue 2912383004: Fill is_chrome_signin_password field in the password entry pings. (Closed)
Patch Set: address nparker's comments Created 3 years, 6 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 5bf0abb361f9b1000de4c104cd6e484b568cc74c..33da0da1d0a3c3cf5a5b4b1e2bccaeb66cffef33 100644
--- a/components/password_manager/core/browser/password_reuse_detector.cc
+++ b/components/password_manager/core/browser/password_reuse_detector.cc
@@ -37,6 +37,8 @@ bool IsSuffix(const base::string16& str,
} // namespace
+const char kSyncPasswordDomain[] = "CHROME SYNC";
+
bool ReverseStringLess::operator()(const base::string16& lhs,
const base::string16& rhs) const {
return std::lexicographical_compare(lhs.rbegin(), lhs.rend(), rhs.rbegin(),
@@ -94,8 +96,8 @@ bool PasswordReuseDetector::CheckSyncPasswordReuse(
base::StringPiece16 input_suffix(input.c_str() + i, input.size() - i);
if (password_manager_util::Calculate37BitsOfSHA256Hash(input_suffix) ==
sync_password_hash_.value()) {
- consumer->OnReuseFound(input_suffix.as_string(), gaia_origin.host(), 1,
- 0);
+ consumer->OnReuseFound(input_suffix.as_string(),
+ std::string(kSyncPasswordDomain), 1, 0);
return true;
}
}

Powered by Google App Engine
This is Rietveld 408576698