1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/content_settings/chrome_content_settings_utils.h"
7 #include "base/metrics/histogram.h"
8 #include "chrome/browser/browser_process.h"
9 #include "components/rappor/rappor_utils.h"
11 namespace content_settings
{
13 void RecordMixedScriptAction(MixedScriptAction action
) {
14 UMA_HISTOGRAM_ENUMERATION("ContentSettings.MixedScript", action
,
15 MIXED_SCRIPT_ACTION_COUNT
);
18 void RecordMixedScriptActionWithRAPPOR(MixedScriptAction action
,
22 case MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD
:
23 metric
= "ContentSettings.MixedScript.DisplayedShield";
25 case MIXED_SCRIPT_ACTION_CLICKED_ALLOW
:
26 metric
= "ContentSettings.MixedScript.UserClickedAllow";
32 rappor::SampleDomainAndRegistryFromGURL(g_browser_process
->rappor_service(),
37 } // namespace content_settings