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

Unified Diff: chrome/browser/ui/webui/log_web_ui_url.cc

Issue 1367343002: Add browser test for WebUI URL logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: histogram_tester Created 5 years, 3 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 | « chrome/browser/ui/webui/log_web_ui_url.h ('k') | chrome/browser/ui/webui/log_web_ui_url_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/log_web_ui_url.cc
diff --git a/chrome/browser/ui/webui/log_web_ui_url.cc b/chrome/browser/ui/webui/log_web_ui_url.cc
index 3b793a211879fecf1fcad90fa6f2fa1fc6a417a6..6f983ffe90c8810a2cf555917e56825edbab61b5 100644
--- a/chrome/browser/ui/webui/log_web_ui_url.cc
+++ b/chrome/browser/ui/webui/log_web_ui_url.cc
@@ -18,6 +18,8 @@
namespace webui {
+const char kWebUICreatedForUrl[] = "WebUI.CreatedForUrl";
+
bool LogWebUIUrl(const GURL& web_ui_url) {
bool should_log = web_ui_url.SchemeIs(content::kChromeUIScheme) ||
web_ui_url.SchemeIs(content::kChromeDevToolsScheme);
@@ -29,7 +31,7 @@ bool LogWebUIUrl(const GURL& web_ui_url) {
if (should_log) {
uint32 hash = base::Hash(web_ui_url.GetOrigin().spec());
- UMA_HISTOGRAM_SPARSE_SLOWLY("WebUI.CreatedForUrl",
+ UMA_HISTOGRAM_SPARSE_SLOWLY(kWebUICreatedForUrl,
static_cast<base::HistogramBase::Sample>(hash));
}
« no previous file with comments | « chrome/browser/ui/webui/log_web_ui_url.h ('k') | chrome/browser/ui/webui/log_web_ui_url_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698