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

Unified Diff: components/navigation_metrics/navigation_metrics.cc

Issue 726923004: Cleanup: Use http/https constants in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/navigation_metrics/navigation_metrics.cc
diff --git a/components/navigation_metrics/navigation_metrics.cc b/components/navigation_metrics/navigation_metrics.cc
index f7d63e48b7a96f82f62d07450e9cd302664bfd10..1c3458aceadf3b657122ac382e58ebe63e68dea0 100644
--- a/components/navigation_metrics/navigation_metrics.cc
+++ b/components/navigation_metrics/navigation_metrics.cc
@@ -22,15 +22,15 @@ enum Scheme {
SCHEME_MAX,
};
-static const char* kSchemeNames[] = {
+const char* const kSchemeNames[] = {
"unknown",
- "http",
- "https",
- "file",
- "ftp",
- "data",
- "javascript",
- "about",
+ url::kHttpScheme,
+ url::kHttpsScheme,
+ url::kFileScheme,
+ url::kFtpScheme,
+ url::kDataScheme,
+ url::kJavaScriptScheme,
+ url::kAboutScheme,
"chrome",
"max",
};
@@ -50,8 +50,7 @@ void RecordMainFrameNavigation(const GURL& url, bool is_in_page) {
break;
}
}
- UMA_HISTOGRAM_ENUMERATION(
- "Navigation.MainFrameScheme", scheme, SCHEME_MAX);
+ UMA_HISTOGRAM_ENUMERATION("Navigation.MainFrameScheme", scheme, SCHEME_MAX);
if (!is_in_page) {
UMA_HISTOGRAM_ENUMERATION(
"Navigation.MainFrameSchemeDifferentPage", scheme, SCHEME_MAX);
« no previous file with comments | « components/error_page/renderer/net_error_helper_core.cc ('k') | components/translate/core/common/translate_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698