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

Unified Diff: chrome/browser/ui/browser.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.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 142907)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -58,6 +58,7 @@
#include "chrome/browser/file_select_helper.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/google/google_url_tracker.h"
+#include "chrome/browser/google/google_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/instant/instant_unload_handler.h"
@@ -236,6 +237,11 @@
// The URL for the privacy dashboard.
const char kPrivacyDashboardUrl[] = "https://www.google.com/dashboard";
+// The URL for when the user clicks "learn more" on the mixed scripting page
+// icon bubble.
+const char kInsecureContentHelpUrl[] =
+ "https://support.google.com/chrome/bin/answer.py?answer=1342714";
+
// How long we wait before updating the browser chrome while loading a page.
const int kUIUpdateCoalescingTimeMS = 200;
@@ -1937,10 +1943,18 @@
}
void Browser::ShowContentSettingsPage(ContentSettingsType content_type) {
- ShowOptionsTab(
- chrome::kContentSettingsExceptionsSubPage + std::string(kHashMark) +
- options2::ContentSettingsHandler::ContentSettingsTypeToGroupName(
- content_type));
+ if (content_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.
+ OpenURL(OpenURLParams(
+ google_util::AppendGoogleLocaleParam(GURL(kInsecureContentHelpUrl)),
+ Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false));
+ } else {
+ ShowOptionsTab(
+ chrome::kContentSettingsExceptionsSubPage + std::string(kHashMark) +
+ options2::ContentSettingsHandler::ContentSettingsTypeToGroupName(
+ content_type));
+ }
}
void Browser::OpenClearBrowsingDataDialog() {

Powered by Google App Engine
This is Rietveld 408576698