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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 1148773005: Add a RAPPOR metric to track where users click to allow mixed scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move mixed script shield RAPPOR stats into a new RecordMixedScriptActionWithRAPPOR() function. Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/content_settings/tab_specific_content_settings.cc
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 89d968c54e6e377c29f3ba17f05f606c84f2328b..581439cf5a479f2d4defb209043ae49b1f1631d2 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -11,7 +11,6 @@
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/browser_process.h"
#include "chrome/browser/browsing_data/browsing_data_appcache_helper.h"
#include "chrome/browser/browsing_data/browsing_data_cookie_helper.h"
#include "chrome/browser/browsing_data/browsing_data_database_helper.h"
@@ -31,7 +30,6 @@
#include "components/content_settings/core/browser/content_settings_details.h"
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
-#include "components/rappor/rappor_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
@@ -354,19 +352,9 @@ void TabSpecificContentSettings::OnContentBlockedWithDetail(
content::NotificationService::NoDetails());
if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
- content_settings::RecordMixedScriptAction(
- content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD);
-
- rappor::RapporService* rappor_service =
- g_browser_process->rappor_service();
- if (rappor_service) {
- rappor_service->RecordSample(
- "ContentSettings.MixedScript.DisplayedShield",
- rappor::ETLD_PLUS_ONE_RAPPOR_TYPE,
- net::registry_controlled_domains::GetDomainAndRegistry(
- base::UTF16ToUTF8(details),
- net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES));
- }
+ content_settings::RecordMixedScriptActionWithRAPPOR(
+ content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD,
+ GURL(base::UTF16ToUTF8(details)));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698