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

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

Issue 814183002: Record eTLD+1 for pages that show the mixed content shield. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f3e7821d73f2e1db8e8826056e60663c8cf5f9bf..eb72d8b372fc57d0ed9d09bdd9066c8e6f33a35a 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -29,6 +29,7 @@
#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"
@@ -39,6 +40,7 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
+#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/cookies/canonical_cookie.h"
#include "storage/common/fileapi/file_system_types.h"
@@ -347,6 +349,18 @@ void TabSpecificContentSettings::OnContentBlockedWithDetail(
if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
content_settings::RecordMixedScriptAction(
content_settings::MIXED_SCRIPT_ACTION_DISPLAYED_SHIELD);
+
+ // RAPPOR
Nico 2014/12/19 23:43:53 useless comment
lgarron 2014/12/19 23:50:34 Done.
+ 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));
+ }
}
}
}
« no previous file with comments | « no previous file | chrome/renderer/content_settings_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698