Index: components/page_load_metrics/browser/metrics_web_contents_observer.h |
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
index 4a9e061a00a94cdb55701d37ebe20d12e894aca1..e154c29312f7a4d5062c9e2a80f8f06d6d8f1784 100644 |
--- a/components/page_load_metrics/browser/metrics_web_contents_observer.h |
+++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h |
@@ -33,6 +33,9 @@ class RapporService; |
namespace page_load_metrics { |
+// Returns true if the given URL matches a Google CAPTCHA page. |
+bool IsGoogleCaptcha(const GURL& url); |
+ |
// These constants are for keeping the tests in sync. |
const char kHistogramNameFirstLayout[] = |
"PageLoad.Timing2.NavigationToFirstLayout"; |
@@ -158,6 +161,16 @@ enum InternalErrorLoadEvent { |
ERR_LAST_ENTRY |
}; |
+// Values of the UMA GoogleCaptcha.Event histogram. |
+enum GoogleCaptchaEvent { |
+ // A Google CAPTCHA page was shown to the user. |
+ GOOGLE_CAPTCHA_SHOWN, |
+ // A Google CAPTCHA page was solved by the user. |
+ GOOGLE_CAPTCHA_SOLVED, |
+ // Add new values before this final count. |
+ GOOGLE_CAPTCHA_EVENT_BOUNDARY, |
+}; |
+ |
// This class tracks a given page load, starting from navigation start / |
// provisional load, until a new navigation commits or the navigation fails. It |
// also records RAPPOR/UMA about the page load. |
@@ -239,6 +252,8 @@ class MetricsWebContentsObserver |
content::NavigationHandle* navigation_handle) override; |
void DidFinishNavigation( |
content::NavigationHandle* navigation_handle) override; |
+ void DidRedirectNavigation( |
+ content::NavigationHandle* navigation_handle) override; |
void WasShown() override; |
void WasHidden() override; |