Commit 8058403a authored by Daniel Rubery's avatar Daniel Rubery Committed by Commit Bot

Add RequestOutcome SAFE_BROWSING_DISABLED.

Currently, when SafeBrowsing is disabled, CanSendPing sets the reason
for not sending a ping to "URL_NOT_VALID_FOR_REPUTATION_COMPUTING". This
CL creates a separate reason for SafeBrowsing disabled, for more accurate
reporting.

Bug: 864265
Change-Id: I63318a4c8639af3e564a4cc8e4cb371d091ca87e
Reviewed-on: https://chromium-review.googlesource.com/1139109Reviewed-by: default avatarJialiu Lin <jialiul@chromium.org>
Commit-Queue: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575750}
parent fbf1006e
...@@ -523,8 +523,10 @@ bool ChromePasswordProtectionService::IsIncognito() { ...@@ -523,8 +523,10 @@ bool ChromePasswordProtectionService::IsIncognito() {
bool ChromePasswordProtectionService::IsPingingEnabled( bool ChromePasswordProtectionService::IsPingingEnabled(
LoginReputationClientRequest::TriggerType trigger_type, LoginReputationClientRequest::TriggerType trigger_type,
RequestOutcome* reason) { RequestOutcome* reason) {
if (!IsSafeBrowsingEnabled()) if (!IsSafeBrowsingEnabled()) {
*reason = SAFE_BROWSING_DISABLED;
return false; return false;
}
if (trigger_type == LoginReputationClientRequest::PASSWORD_REUSE_EVENT) { if (trigger_type == LoginReputationClientRequest::PASSWORD_REUSE_EVENT) {
PasswordProtectionTrigger trigger_level = PasswordProtectionTrigger trigger_level =
...@@ -761,6 +763,7 @@ void ChromePasswordProtectionService::MaybeLogPasswordReuseLookupEvent( ...@@ -761,6 +763,7 @@ void ChromePasswordProtectionService::MaybeLogPasswordReuseLookupEvent(
case PasswordProtectionService::SERVICE_DESTROYED: case PasswordProtectionService::SERVICE_DESTROYED:
case PasswordProtectionService::DISABLED_DUE_TO_FEATURE_DISABLED: case PasswordProtectionService::DISABLED_DUE_TO_FEATURE_DISABLED:
case PasswordProtectionService::DISABLED_DUE_TO_USER_POPULATION: case PasswordProtectionService::DISABLED_DUE_TO_USER_POPULATION:
case PasswordProtectionService::SAFE_BROWSING_DISABLED:
case PasswordProtectionService::MAX_OUTCOME: case PasswordProtectionService::MAX_OUTCOME:
MaybeLogPasswordReuseLookupResult(web_contents, MaybeLogPasswordReuseLookupResult(web_contents,
PasswordReuseLookup::REQUEST_FAILURE); PasswordReuseLookup::REQUEST_FAILURE);
......
...@@ -103,6 +103,8 @@ class PasswordProtectionService : public history::HistoryServiceObserver { ...@@ -103,6 +103,8 @@ class PasswordProtectionService : public history::HistoryServiceObserver {
PASSWORD_ALERT_MODE = 18, PASSWORD_ALERT_MODE = 18,
// No request is event sent if the admin turns off password protection. // No request is event sent if the admin turns off password protection.
TURNED_OFF_BY_ADMIN = 19, TURNED_OFF_BY_ADMIN = 19,
// Safe Browsing is disabled.
SAFE_BROWSING_DISABLED = 20,
MAX_OUTCOME MAX_OUTCOME
}; };
......
...@@ -37085,6 +37085,7 @@ Called by update_net_trust_anchors.py.--> ...@@ -37085,6 +37085,7 @@ Called by update_net_trust_anchors.py.-->
<int value="17" label="URL matched enterprise login URL"/> <int value="17" label="URL matched enterprise login URL"/>
<int value="18" label="Password Alert mode: no need to send ping"/> <int value="18" label="Password Alert mode: no need to send ping"/>
<int value="19" label="Turned off by enterprise admin"/> <int value="19" label="Turned off by enterprise admin"/>
<int value="20" label="SafeBrowsing disabled"/>
</enum> </enum>
<enum name="PasswordProtectionSyncAccountType"> <enum name="PasswordProtectionSyncAccountType">
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