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

Unified Diff: chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc

Issue 10577028: Move the mixed scripting infobar to a page action icon / content setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/ui/browser_content_setting_bubble_model_delegate.cc
===================================================================
--- chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc (revision 143396)
+++ chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc (working copy)
@@ -4,9 +4,15 @@
#include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/chrome_pages.h"
+// The URL for when the user clicks "learn more" on the mixed scripting page
+// icon bubble.
+const char kInsecureScriptHelpUrl[] =
+ "https://support.google.com/chrome/bin/answer.py?answer=1342714";
+
BrowserContentSettingBubbleModelDelegate::
BrowserContentSettingBubbleModelDelegate(Browser* browser) : browser_(browser) {
}
@@ -22,5 +28,13 @@
void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage(
ContentSettingsType type) {
- chrome::ShowContentSettings(browser_, type);
+ if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
+ // We don't (yet?) implement user-settable exceptions for mixed script
+ // blocking, so bounce to an explanatory page for now.
+ GURL url(google_util::AppendGoogleLocaleParam(
+ GURL(kInsecureScriptHelpUrl)));
+ browser_->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_LINK);
+ } else {
+ chrome::ShowContentSettings(browser_, type);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698