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

Unified Diff: components/safe_browsing/password_protection/password_protection_service.h

Issue 2869253002: Add UMA metrics to phishguard pings (Closed)
Patch Set: fix unittest 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/safe_browsing/password_protection/password_protection_service.h
diff --git a/components/safe_browsing/password_protection/password_protection_service.h b/components/safe_browsing/password_protection/password_protection_service.h
index e688efc4414070f76c81ef416e3b92f5be58dc62..8ae29ab3cdcc96ee8b8e4a1a6b65add93da44e82 100644
--- a/components/safe_browsing/password_protection/password_protection_service.h
+++ b/components/safe_browsing/password_protection/password_protection_service.h
@@ -35,6 +35,8 @@ class PasswordProtectionRequest;
extern const base::Feature kPasswordFieldOnFocusPinging;
extern const base::Feature kProtectedPasswordEntryPinging;
+extern const char kPasswordOnFocusRequestOutcomeHistogramName[];
+extern const char kPasswordEntryRequestOutcomeHistogramName[];
// Manage password protection pings and verdicts. There is one instance of this
// class per profile. Therefore, every PasswordProtectionService instance is
@@ -42,6 +44,25 @@ extern const base::Feature kProtectedPasswordEntryPinging;
// HostContentSettingsMap instance.
class PasswordProtectionService : public history::HistoryServiceObserver {
public:
+ // The outcome of the request. These values are used for UMA.
+ // DO NOT CHANGE THE ORDERING OF THESE VALUES.
+ enum RequestOutcome {
+ UNKNOWN = 0,
+ SUCCEEDED = 1,
+ CANCELED = 2,
+ TIMEDOUT = 3,
+ MATCHED_WHITELIST = 4,
+ RESPONSE_ALREADY_CACHED = 5,
+ DEPRECATED_NO_EXTENDED_REPORTING = 6,
+ DISABLED_DUE_TO_INCOGNITO = 7,
+ REQUEST_MALFORMED = 8,
+ FETCH_FAILED = 9,
+ RESPONSE_MALFORMED = 10,
+ SERVICE_DESTROYED = 11,
+ DISABLED_DUE_TO_FEATURE_DISABLED = 12,
+ DISABLED_DUE_TO_USER_POPULATION = 13,
+ MAX_OUTCOME
+ };
PasswordProtectionService(
const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager,
scoped_refptr<net::URLRequestContextGetter> request_context_getter,
@@ -79,7 +100,7 @@ class PasswordProtectionService : public history::HistoryServiceObserver {
const GURL& password_form_frame_url,
LoginReputationClientRequest::TriggerType type);
- virtual void MaybeStartLowReputationRequest(
+ virtual void MaybeStartPasswordFieldOnFocusRequest(
const GURL& main_frame_url,
const GURL& password_form_action,
const GURL& password_form_frame_url);

Powered by Google App Engine
This is Rietveld 408576698