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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h" 5 #include "chrome/browser/ui/browser_content_setting_bubble_model_delegate.h"
6 6
7 #include "chrome/browser/google/google_util.h"
7 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/chrome_pages.h" 9 #include "chrome/browser/ui/chrome_pages.h"
9 10
11 // The URL for when the user clicks "learn more" on the mixed scripting page
12 // icon bubble.
13 const char kInsecureScriptHelpUrl[] =
14 "https://support.google.com/chrome/bin/answer.py?answer=1342714";
15
10 BrowserContentSettingBubbleModelDelegate:: 16 BrowserContentSettingBubbleModelDelegate::
11 BrowserContentSettingBubbleModelDelegate(Browser* browser) : browser_(browser) { 17 BrowserContentSettingBubbleModelDelegate(Browser* browser) : browser_(browser) {
12 } 18 }
13 19
14 BrowserContentSettingBubbleModelDelegate:: 20 BrowserContentSettingBubbleModelDelegate::
15 ~BrowserContentSettingBubbleModelDelegate() { 21 ~BrowserContentSettingBubbleModelDelegate() {
16 } 22 }
17 23
18 void BrowserContentSettingBubbleModelDelegate::ShowCollectedCookiesDialog( 24 void BrowserContentSettingBubbleModelDelegate::ShowCollectedCookiesDialog(
19 TabContents* contents) { 25 TabContents* contents) {
20 browser_->ShowCollectedCookiesDialog(contents); 26 browser_->ShowCollectedCookiesDialog(contents);
21 } 27 }
22 28
23 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage( 29 void BrowserContentSettingBubbleModelDelegate::ShowContentSettingsPage(
24 ContentSettingsType type) { 30 ContentSettingsType type) {
25 chrome::ShowContentSettings(browser_, type); 31 if (type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
32 // We don't (yet?) implement user-settable exceptions for mixed script
33 // blocking, so bounce to an explanatory page for now.
34 GURL url(google_util::AppendGoogleLocaleParam(
35 GURL(kInsecureScriptHelpUrl)));
36 browser_->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_LINK);
37 } else {
38 chrome::ShowContentSettings(browser_, type);
39 }
26 } 40 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698