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

Unified Diff: components/navigation_metrics/navigation_metrics.cc

Issue 1844753002: Histogram the scheme of an origin on the 1st navigation to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments. Created 4 years, 8 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
« no previous file with comments | « components/navigation_metrics/navigation_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/navigation_metrics/navigation_metrics.cc
diff --git a/components/navigation_metrics/navigation_metrics.cc b/components/navigation_metrics/navigation_metrics.cc
index e0d61c769f7b6a5daa6c876951b4870d02babf58..e4c8ed5374942953c8a17cbc9a445471c60affc6 100644
--- a/components/navigation_metrics/navigation_metrics.cc
+++ b/components/navigation_metrics/navigation_metrics.cc
@@ -47,7 +47,10 @@ static_assert(arraysize(kSchemeNames) == SCHEME_MAX + 1,
namespace navigation_metrics {
-void RecordMainFrameNavigation(const GURL& url, bool is_in_page) {
+void RecordMainFrameNavigation(const GURL& url,
+ bool is_in_page,
+ bool is_off_the_record,
+ bool have_already_seen_origin) {
Scheme scheme = SCHEME_UNKNOWN;
for (int i = 1; i < SCHEME_MAX; ++i) {
if (url.SchemeIs(kSchemeNames[i])) {
@@ -55,10 +58,21 @@ void RecordMainFrameNavigation(const GURL& url, bool is_in_page) {
break;
}
}
+
+ if (!have_already_seen_origin) {
+ if (is_off_the_record) {
+ UMA_HISTOGRAM_ENUMERATION("Navigation.SchemePerUniqueOriginOTR", scheme,
+ SCHEME_MAX);
+ } else {
+ UMA_HISTOGRAM_ENUMERATION("Navigation.SchemePerUniqueOrigin", scheme,
+ SCHEME_MAX);
+ }
+ }
+
UMA_HISTOGRAM_ENUMERATION("Navigation.MainFrameScheme", scheme, SCHEME_MAX);
if (!is_in_page) {
- UMA_HISTOGRAM_ENUMERATION(
- "Navigation.MainFrameSchemeDifferentPage", scheme, SCHEME_MAX);
+ UMA_HISTOGRAM_ENUMERATION("Navigation.MainFrameSchemeDifferentPage", scheme,
+ SCHEME_MAX);
}
}
« no previous file with comments | « components/navigation_metrics/navigation_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698