|
@@ -3,18 +3,20 @@ Date: Wed, 23 Sep 2020 14:47:44 +0200
|
|
Subject: Password service build fixes
|
|
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(-)
|
|
|
|
|
|
+ .../chrome_password_manager_client.cc | 2 ++
|
|
|
|
+ .../chrome_password_manager_client.h | 10 ++++++++--
|
|
|
|
+ .../chrome_password_protection_service.cc | 20 -------------------
|
|
|
|
+ .../chrome_password_protection_service.h | 2 --
|
|
|
|
+ .../core/browser/password_manager_client.h | 4 ++++
|
|
|
|
+ .../password_reuse_detection_manager.cc | 2 ++
|
|
|
|
+ .../password_protection_request.cc | 2 --
|
|
|
|
+ .../password_protection_service.h | 5 -----
|
|
|
|
+ 8 files changed, 16 insertions(+), 31 deletions(-)
|
|
|
|
|
|
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc
|
|
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
|
|
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc
|
|
+++ b/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(
|
|
|
|
|
|
+@@ -471,7 +471,9 @@ void ChromePasswordManagerClient::ShowTouchToFill(
|
|
#if defined(OS_ANDROID)
|
|
#if defined(OS_ANDROID)
|
|
void ChromePasswordManagerClient::OnPasswordSelected(
|
|
void ChromePasswordManagerClient::OnPasswordSelected(
|
|
const base::string16& text) {
|
|
const base::string16& text) {
|
|
@@ -24,10 +26,68 @@ diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+diff --git a/chrome/browser/password_manager/chrome_password_manager_client.h b/chrome/browser/password_manager/chrome_password_manager_client.h
|
|
|
|
+--- a/chrome/browser/password_manager/chrome_password_manager_client.h
|
|
|
|
++++ b/chrome/browser/password_manager/chrome_password_manager_client.h
|
|
|
|
+@@ -190,8 +190,14 @@ class ChromePasswordManagerClient
|
|
|
|
+ void AnnotateNavigationEntry(bool has_password_field) override;
|
|
|
|
+ autofill::LanguageCode GetPageLanguage() const override;
|
|
|
|
+
|
|
|
|
++#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
|
|
++#define PASSWORD_REUSE_DETECTION_ENABLED_OVERRIDE override
|
|
|
|
++#else
|
|
|
|
++#define PASSWORD_REUSE_DETECTION_ENABLED_OVERRIDE
|
|
|
|
++#endif
|
|
|
|
++
|
|
|
|
+ safe_browsing::PasswordProtectionService* GetPasswordProtectionService()
|
|
|
|
+- const override;
|
|
|
|
++ const PASSWORD_REUSE_DETECTION_ENABLED_OVERRIDE;
|
|
|
|
+
|
|
|
|
+ #if defined(ON_FOCUS_PING_ENABLED)
|
|
|
|
+ void CheckSafeBrowsingReputation(const GURL& form_action,
|
|
|
|
+@@ -203,7 +209,7 @@ class ChromePasswordManagerClient
|
|
|
|
+ const std::string& username,
|
|
|
|
+ const std::vector<password_manager::MatchingReusedCredential>&
|
|
|
|
+ matching_reused_credentials,
|
|
|
|
+- bool password_field_exists) override;
|
|
|
|
++ bool password_field_exists) PASSWORD_REUSE_DETECTION_ENABLED_OVERRIDE;
|
|
|
|
+
|
|
|
|
+ void LogPasswordReuseDetectedEvent() override;
|
|
|
|
+
|
|
|
|
+diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.cc b/chrome/browser/safe_browsing/chrome_password_protection_service.cc
|
|
|
|
+--- a/chrome/browser/safe_browsing/chrome_password_protection_service.cc
|
|
|
|
++++ b/chrome/browser/safe_browsing/chrome_password_protection_service.cc
|
|
|
|
+@@ -353,26 +353,6 @@ bool ChromePasswordProtectionService::ShouldShowPasswordReusePageInfoBubble(
|
|
|
|
+ : false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+-safe_browsing::LoginReputationClientRequest::UrlDisplayExperiment
|
|
|
|
+-ChromePasswordProtectionService::GetUrlDisplayExperiment() const {
|
|
|
|
+- safe_browsing::LoginReputationClientRequest::UrlDisplayExperiment experiment;
|
|
|
|
+- experiment.set_simplified_url_display_enabled(
|
|
|
|
+- base::FeatureList::IsEnabled(safe_browsing::kSimplifiedUrlDisplay));
|
|
|
|
+- // Delayed warnings parameters:
|
|
|
|
+- experiment.set_delayed_warnings_enabled(
|
|
|
|
+- base::FeatureList::IsEnabled(safe_browsing::kDelayedWarnings));
|
|
|
|
+- experiment.set_delayed_warnings_mouse_clicks_enabled(
|
|
|
|
+- safe_browsing::kDelayedWarningsEnableMouseClicks.Get());
|
|
|
|
+- // Actual URL display experiments:
|
|
|
|
+- experiment.set_reveal_on_hover(base::FeatureList::IsEnabled(
|
|
|
|
+- omnibox::kRevealSteadyStateUrlPathQueryAndRefOnHover));
|
|
|
|
+- experiment.set_hide_on_interaction(base::FeatureList::IsEnabled(
|
|
|
|
+- omnibox::kHideSteadyStateUrlPathQueryAndRefOnInteraction));
|
|
|
|
+- experiment.set_elide_to_registrable_domain(
|
|
|
|
+- base::FeatureList::IsEnabled(omnibox::kMaybeElideToRegistrableDomain));
|
|
|
|
+- return experiment;
|
|
|
|
+-}
|
|
|
|
+-
|
|
|
|
+ void ChromePasswordProtectionService::ShowModalWarning(
|
|
|
|
+ content::WebContents* web_contents,
|
|
|
|
+ RequestOutcome outcome,
|
|
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h
|
|
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
|
|
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
|
|
+++ b/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 {
|
|
|
|
|
|
+@@ -256,8 +256,6 @@ class ChromePasswordProtectionService : public PasswordProtectionService {
|
|
// |NOT_SIGNED_IN|.
|
|
// |NOT_SIGNED_IN|.
|
|
LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
GetSyncAccountType() const override;
|
|
GetSyncAccountType() const override;
|
|
@@ -39,26 +99,38 @@ diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b
|
|
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h
|
|
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
|
|
--- a/components/password_manager/core/browser/password_manager_client.h
|
|
+++ b/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 {
|
|
|
|
|
|
+@@ -330,9 +330,11 @@ class PasswordManagerClient {
|
|
// Returns the current best guess as to the page's display language.
|
|
// Returns the current best guess as to the page's display language.
|
|
- virtual std::string GetPageLanguage() const;
|
|
|
|
|
|
+ virtual autofill::LanguageCode GetPageLanguage() const;
|
|
|
|
|
|
+#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
+#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
// Return the PasswordProtectionService associated with this instance.
|
|
// Return the PasswordProtectionService associated with this instance.
|
|
virtual safe_browsing::PasswordProtectionService*
|
|
virtual safe_browsing::PasswordProtectionService*
|
|
GetPasswordProtectionService() const = 0;
|
|
GetPasswordProtectionService() const = 0;
|
|
-@@ -349,6 +350,7 @@ class PasswordManagerClient {
|
|
|
|
|
|
++#endif
|
|
|
|
+
|
|
|
|
+ #if defined(ON_FOCUS_PING_ENABLED)
|
|
|
|
+ // Checks the safe browsing reputation of the webpage when the
|
|
|
|
+@@ -342,6 +344,7 @@ class PasswordManagerClient {
|
|
|
|
+ const GURL& frame_url) = 0;
|
|
|
|
+ #endif
|
|
|
|
+
|
|
|
|
++#if defined(PASSWORD_REUSE_DETECTION_ENABLED)
|
|
|
|
+ // Checks the safe browsing reputation of the webpage where password reuse
|
|
|
|
+ // happens. This is called by the PasswordReuseDetectionManager when a
|
|
|
|
+ // protected password is typed on the wrong domain. This may trigger a
|
|
|
|
+@@ -354,6 +357,7 @@ class PasswordManagerClient {
|
|
const std::string& username,
|
|
const std::string& username,
|
|
const std::vector<MatchingReusedCredential>& matching_reused_credentials,
|
|
const std::vector<MatchingReusedCredential>& matching_reused_credentials,
|
|
bool password_field_exists) = 0;
|
|
bool password_field_exists) = 0;
|
|
+#endif
|
|
+#endif
|
|
|
|
|
|
- #if defined(PASSWORD_REUSE_WARNING_ENABLED)
|
|
|
|
// Records a Chrome Sync event that GAIA password reuse was detected.
|
|
// Records a Chrome Sync event that GAIA password reuse was detected.
|
|
|
|
+ virtual void LogPasswordReuseDetectedEvent() = 0;
|
|
diff --git a/components/password_manager/core/browser/password_reuse_detection_manager.cc b/components/password_manager/core/browser/password_reuse_detection_manager.cc
|
|
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
|
|
--- a/components/password_manager/core/browser/password_reuse_detection_manager.cc
|
|
+++ b/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(
|
|
|
|
|
|
+@@ -170,10 +170,12 @@ void PasswordReuseDetectionManager::OnReuseCheckDone(
|
|
? reused_protected_password_hash->username
|
|
? reused_protected_password_hash->username
|
|
: "";
|
|
: "";
|
|
|
|
|
|
@@ -74,19 +146,19 @@ diff --git a/components/password_manager/core/browser/password_reuse_detection_m
|
|
diff --git a/components/safe_browsing/content/password_protection/password_protection_request.cc b/components/safe_browsing/content/password_protection/password_protection_request.cc
|
|
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
|
|
--- a/components/safe_browsing/content/password_protection/password_protection_request.cc
|
|
+++ b/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(
|
|
|
|
|
|
+@@ -137,8 +137,6 @@ PasswordProtectionRequest::PasswordProtectionRequest(
|
|
password_type_ != PasswordType::SAVED_PASSWORD ||
|
|
password_type_ != PasswordType::SAVED_PASSWORD ||
|
|
!matching_reused_credentials_.empty());
|
|
!matching_reused_credentials_.empty());
|
|
request_proto_->set_trigger_type(trigger_type_);
|
|
request_proto_->set_trigger_type(trigger_type_);
|
|
- *request_proto_->mutable_url_display_experiment() =
|
|
- *request_proto_->mutable_url_display_experiment() =
|
|
- pps->GetUrlDisplayExperiment();
|
|
- pps->GetUrlDisplayExperiment();
|
|
- }
|
|
|
|
|
|
|
|
- PasswordProtectionRequest::~PasswordProtectionRequest() {
|
|
|
|
|
|
+ request_canceler_ =
|
|
|
|
+ RequestCanceler::CreateRequestCanceler(GetWeakPtr(), web_contents);
|
|
diff --git a/components/safe_browsing/content/password_protection/password_protection_service.h b/components/safe_browsing/content/password_protection/password_protection_service.h
|
|
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
|
|
--- a/components/safe_browsing/content/password_protection/password_protection_service.h
|
|
+++ b/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 {
|
|
|
|
|
|
+@@ -411,11 +411,6 @@ class PasswordProtectionServiceBase : public history::HistoryServiceObserver {
|
|
virtual LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
virtual LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
|
|
GetSyncAccountType() const = 0;
|
|
GetSyncAccountType() const = 0;
|
|
|
|
|