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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
6 #define CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_ 6 #define CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
7 7
8 #include "base/callback.h"
Dan Beam 2015/09/26 23:02:14 callback_forward wasn't working for me
9
8 class GURL; 10 class GURL;
9 11
10 namespace webui { 12 namespace webui {
11 13
14 typedef base::Callback<uint32(const GURL&)> WebUIUrlHash;
15
12 // Called when WebUI objects are created to get aggregate usage data (i.e. is 16 // Called when WebUI objects are created to get aggregate usage data (i.e. is
13 // chrome://history used more than chrome://help?). Only internal (e.g. 17 // chrome://history used more than chrome://help?). Only internal (e.g.
14 // chrome://) URLs are logged. Returns whether the URL was actually logged. 18 // chrome://) URLs are logged. Returns whether the URL was actually logged.
15 bool LogWebUIUrl(const GURL& web_ui_url); 19 bool LogWebUIUrl(const GURL& web_ui_url);
16 20
21 void SetHashFunctionForTesting(const WebUIUrlHash& testing_hash);
22
17 } // namespace webui 23 } // namespace webui
18 24
19 #endif // CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_ 25 #endif // CHROME_BROWSER_UI_WEBUI_LOG_WEB_UI_URL_H_
OLDNEW
« 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