OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2014 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_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ |
6 #define CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ | 6 #define CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ |
7 | 7 |
8 class GURL; | 8 class GURL; |
9 | 9 |
| 10 namespace rappor { |
| 11 class RapporService; |
| 12 } // namespace rappor |
| 13 |
10 // Put utility functions only used by //chrome code here. If a function declared | 14 // Put utility functions only used by //chrome code here. If a function declared |
11 // here would be meaningfully shared with other platforms, consider moving it to | 15 // here would be meaningfully shared with other platforms, consider moving it to |
12 // components/content_settings/core/browser/content_settings_utils.h. | 16 // components/content_settings/core/browser/content_settings_utils.h. |
13 | 17 |
14 namespace content_settings { | 18 namespace content_settings { |
15 | 19 |
16 // UMA statistics for the mixed content shield | 20 // UMA statistics for the mixed content shield |
17 enum MixedScriptAction { | 21 enum MixedScriptAction { |
18 MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD = 0, | 22 MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD = 0, |
19 MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE, | 23 MIXED_SCRIPT_ACTION_DISPLAYED_BUBBLE, |
20 MIXED_SCRIPT_ACTION_CLICKED_ALLOW, | 24 MIXED_SCRIPT_ACTION_CLICKED_ALLOW, |
21 MIXED_SCRIPT_ACTION_CLICKED_LEARN_MORE, | 25 MIXED_SCRIPT_ACTION_CLICKED_LEARN_MORE, |
22 MIXED_SCRIPT_ACTION_COUNT | 26 MIXED_SCRIPT_ACTION_COUNT |
23 }; | 27 }; |
24 | 28 |
25 void RecordMixedScriptAction(MixedScriptAction action); | 29 void RecordMixedScriptAction(MixedScriptAction action); |
26 void RecordMixedScriptActionWithRAPPOR(MixedScriptAction action, | 30 void RecordMixedScriptActionWithRAPPOR(rappor::RapporService* rappor_service, |
| 31 MixedScriptAction action, |
27 const GURL& url); | 32 const GURL& url); |
28 | 33 |
29 } // namespace content_settings | 34 } // namespace content_settings |
30 | 35 |
31 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ | 36 #endif // CHROME_BROWSER_CONTENT_SETTINGS_CHROME_CONTENT_SETTINGS_UTILS_H_ |
OLD | NEW |