Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_ |
| OLD | NEW |