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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model.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: 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
« no previous file with comments | « no previous file | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/content_settings/content_setting_bubble_model.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
index bdc7df799563be57ae400c71306f41395bd38395..811f57fbbfb29fb2b731a6e29bdd8e6657507311 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/chrome_content_settings_utils.h"
#include "chrome/browser/content_settings/cookie_settings.h"
@@ -28,6 +29,7 @@
#include "components/content_settings/content/common/content_settings_messages.h"
#include "components/content_settings/core/browser/content_settings_utils.h"
#include "components/content_settings/core/common/content_settings.h"
+#include "components/rappor/rappor_utils.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
@@ -1003,6 +1005,12 @@ void ContentSettingMixedScriptBubbleModel::OnCustomLinkClicked() {
new ChromeViewMsg_SetAllowRunningInsecureContent(MSG_ROUTING_NONE, true));
web_contents()->GetMainFrame()->Send(new ChromeViewMsg_ReloadFrame(
web_contents()->GetMainFrame()->GetRoutingID()));
+
+ // During an interstitial, the shield applies to the last committed URL.
felt 2015/05/22 20:59:34 what is this comment here for? to explain why you'
lgarron 2015/06/03 03:19:55 Yeah, exactly. (I would have put the comment below
+ rappor::SampleDomainAndRegistryFromGURL(
+ g_browser_process->rappor_service(),
+ "ContentSettings.MixedScript.UserClickedAllow",
+ web_contents()->GetLastCommittedURL());
}
ContentSettingRPHBubbleModel::ContentSettingRPHBubbleModel(
« no previous file with comments | « no previous file | tools/metrics/rappor/rappor.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698