| Index: chrome/browser/content_settings/chrome_content_settings_utils.cc
|
| diff --git a/chrome/browser/content_settings/chrome_content_settings_utils.cc b/chrome/browser/content_settings/chrome_content_settings_utils.cc
|
| index 7da4bf12814a8bb28e3fd37bffbc786e6649f2a6..342fc193cc77f6b887666fde3bb3784ad5b601fe 100644
|
| --- a/chrome/browser/content_settings/chrome_content_settings_utils.cc
|
| +++ b/chrome/browser/content_settings/chrome_content_settings_utils.cc
|
| @@ -5,6 +5,8 @@
|
| #include "chrome/browser/content_settings/chrome_content_settings_utils.h"
|
|
|
| #include "base/metrics/histogram.h"
|
| +#include "chrome/browser/browser_process.h"
|
| +#include "components/rappor/rappor_utils.h"
|
|
|
| namespace content_settings {
|
|
|
| @@ -13,4 +15,23 @@ void RecordMixedScriptAction(MixedScriptAction action) {
|
| MIXED_SCRIPT_ACTION_COUNT);
|
| }
|
|
|
| +void RecordMixedScriptActionWithRAPPOR(MixedScriptAction action,
|
| + const GURL& url) {
|
| + std::string metric;
|
| + switch (action) {
|
| + case MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD:
|
| + metric = "ContentSettings.MixedScript.DisplayedShield";
|
| + break;
|
| + case MIXED_SCRIPT_ACTION_CLICKED_ALLOW:
|
| + metric = "ContentSettings.MixedScript.UserClickedAllow";
|
| + break;
|
| + default:
|
| + NOTREACHED();
|
| + }
|
| +
|
| + rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
|
| + metric,
|
| + url);
|
| +}
|
| +
|
| } // namespace content_settings
|
|
|