103 lines
5.4 KiB
Diff
103 lines
5.4 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Wed, 23 Sep 2020 14:47:44 +0200
|
|
Subject: Password service build fixes
|
|
|
|
---
|
|
.../password_manager/chrome_password_manager_client.cc | 2 ++
|
|
.../safe_browsing/chrome_password_protection_service.h | 2 --
|
|
.../password_manager/core/browser/password_manager_client.h | 2 ++
|
|
.../core/browser/password_reuse_detection_manager.cc | 2 ++
|
|
.../password_protection/password_protection_request.cc | 2 --
|
|
.../password_protection/password_protection_service.h | 5 -----
|
|
6 files changed, 6 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
|
|
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
|
|
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc
|
|
@@ -462,7 +462,9 @@ void ChromePasswordManagerClient::ShowTouchToFill(
|
|
#if defined(OS_ANDROID)
|
|
void ChromePasswordManagerClient::OnPasswordSelected(
|
|
const base::string16& text) {
|
|
+#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
password_reuse_detection_manager_.OnPaste(text);
|
|
+#endif
|
|
}
|
|
#endif
|
|
|
|
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h
|
|
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
|
|
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
|
|
@@ -255,8 +255,6 @@ class ChromePasswordProtectionService : public PasswordProtectionService {
|
|
// |NOT_SIGNED_IN|.
|
|
LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
GetSyncAccountType() const override;
|
|
- safe_browsing::LoginReputationClientRequest::UrlDisplayExperiment
|
|
- GetUrlDisplayExperiment() const override;
|
|
|
|
// Stores |verdict| in the cache based on its |trigger_type|, |url|,
|
|
// reused |password_type|, |verdict| and |receive_time|.
|
|
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h
|
|
--- a/components/password_manager/core/browser/password_manager_client.h
|
|
+++ b/components/password_manager/core/browser/password_manager_client.h
|
|
@@ -325,6 +325,7 @@ class PasswordManagerClient {
|
|
// Returns the current best guess as to the page's display language.
|
|
virtual std::string GetPageLanguage() const;
|
|
|
|
+#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
// Return the PasswordProtectionService associated with this instance.
|
|
virtual safe_browsing::PasswordProtectionService*
|
|
GetPasswordProtectionService() const = 0;
|
|
@@ -349,6 +350,7 @@ class PasswordManagerClient {
|
|
const std::string& username,
|
|
const std::vector<MatchingReusedCredential>& matching_reused_credentials,
|
|
bool password_field_exists) = 0;
|
|
+#endif
|
|
|
|
#if defined(PASSWORD_REUSE_WARNING_ENABLED)
|
|
// Records a Chrome Sync event that GAIA password reuse was detected.
|
|
diff --git a/components/password_manager/core/browser/password_reuse_detection_manager.cc b/components/password_manager/core/browser/password_reuse_detection_manager.cc
|
|
--- a/components/password_manager/core/browser/password_reuse_detection_manager.cc
|
|
+++ b/components/password_manager/core/browser/password_reuse_detection_manager.cc
|
|
@@ -172,10 +172,12 @@ void PasswordReuseDetectionManager::OnReuseCheckDone(
|
|
? reused_protected_password_hash->username
|
|
: "";
|
|
|
|
+#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
client_->CheckProtectedPasswordEntry(
|
|
reused_password_type, username,
|
|
std::move(all_matching_reused_credentials_).extract(),
|
|
password_field_detected);
|
|
+#endif
|
|
|
|
all_matching_reused_credentials_.clear();
|
|
}
|
|
diff --git a/components/safe_browsing/content/password_protection/password_protection_request.cc b/components/safe_browsing/content/password_protection/password_protection_request.cc
|
|
--- a/components/safe_browsing/content/password_protection/password_protection_request.cc
|
|
+++ b/components/safe_browsing/content/password_protection/password_protection_request.cc
|
|
@@ -133,8 +133,6 @@ PasswordProtectionRequest::PasswordProtectionRequest(
|
|
password_type_ != PasswordType::SAVED_PASSWORD ||
|
|
!matching_reused_credentials_.empty());
|
|
request_proto_->set_trigger_type(trigger_type_);
|
|
- *request_proto_->mutable_url_display_experiment() =
|
|
- pps->GetUrlDisplayExperiment();
|
|
}
|
|
|
|
PasswordProtectionRequest::~PasswordProtectionRequest() {
|
|
diff --git a/components/safe_browsing/content/password_protection/password_protection_service.h b/components/safe_browsing/content/password_protection/password_protection_service.h
|
|
--- a/components/safe_browsing/content/password_protection/password_protection_service.h
|
|
+++ b/components/safe_browsing/content/password_protection/password_protection_service.h
|
|
@@ -423,11 +423,6 @@ class PasswordProtectionService : public history::HistoryServiceObserver {
|
|
virtual LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
GetSyncAccountType() const = 0;
|
|
|
|
- // Get information about Delayed Warnings and Omnibox URL display experiments.
|
|
- // This information is sent in PhishGuard pings.
|
|
- virtual LoginReputationClientRequest::UrlDisplayExperiment
|
|
- GetUrlDisplayExperiment() const = 0;
|
|
-
|
|
// Returns the reason why a ping is not sent based on the |trigger_type|,
|
|
// |url| and |password_type|. Crash if |CanSendPing| is true.
|
|
virtual RequestOutcome GetPingNotSentReason(
|
|
--
|
|
2.17.1
|
|
|