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

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

Issue 1367343002: Add browser test for WebUI URL logging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: safer? 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 | « no previous file | chrome/browser/ui/webui/log_web_ui_url.cc » ('j') | chrome/browser/ui/webui/log_web_ui_url.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/log_web_ui_url.h
diff --git a/chrome/browser/ui/webui/log_web_ui_url.h b/chrome/browser/ui/webui/log_web_ui_url.h
index a5e5dce507040573e383d7e8739a83cbbe7ecd65..a4c0f9b6931bc604ac7d2a2bfa4f5f4327a0c018 100644
--- a/chrome/browser/ui/webui/log_web_ui_url.h
+++ b/chrome/browser/ui/webui/log_web_ui_url.h
@@ -5,15 +5,21 @@
#ifndef CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
#define CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
+#include "base/callback.h"
Dan Beam 2015/09/26 23:02:14 callback_forward wasn't working for me
+
class GURL;
namespace webui {
+typedef base::Callback<uint32(const GURL&)> WebUIUrlHash;
+
// Called when WebUI objects are created to get aggregate usage data (i.e. is
// chrome://history used more than chrome://help?). Only internal (e.g.
// chrome://) URLs are logged. Returns whether the URL was actually logged.
bool LogWebUIUrl(const GURL& web_ui_url);
+void SetHashFunctionForTesting(const WebUIUrlHash& testing_hash);
+
} // namespace webui
#endif // CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
« no previous file with comments | « no previous file | chrome/browser/ui/webui/log_web_ui_url.cc » ('j') | chrome/browser/ui/webui/log_web_ui_url.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698