summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/content_settings/content_settings_default_provider.cc1
-rw-r--r--chrome/browser/content_settings/content_settings_utils.cc3
-rw-r--r--chrome/browser/content_settings/host_content_settings_map.cc4
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc3
-rw-r--r--chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc16
-rw-r--r--chrome/browser/ui/content_settings/content_setting_bubble_model.cc34
-rw-r--r--chrome/browser/ui/content_settings/content_setting_image_model.cc120
-rw-r--r--chrome/browser/ui/webui/options2/content_settings_handler2.cc14
-rw-r--r--chrome/common/common_param_traits.cc3
-rw-r--r--chrome/common/content_settings_types.h3
-rw-r--r--chrome/renderer/chrome_render_view_observer.cc11
-rw-r--r--chrome/renderer/chrome_render_view_observer.h1
-rw-r--r--chrome/renderer/content_settings_observer.cc10
-rw-r--r--chrome/renderer/content_settings_observer.h5
14 files changed, 143 insertions, 85 deletions
diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc
index 8dc9630..02ecfb4 100644
--- a/chrome/browser/content_settings/content_settings_default_provider.cc
+++ b/chrome/browser/content_settings/content_settings_default_provider.cc
@@ -43,6 +43,7 @@ const ContentSetting kDefaultSettings[] = {
CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE
CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_FULLSCREEN
CONTENT_SETTING_ASK, // CONTENT_SETTINGS_TYPE_MOUSELOCK
+ CONTENT_SETTING_DEFAULT, // CONTENT_SETTINGS_TYPE_MIXEDSCRIPT
};
COMPILE_ASSERT(arraysize(kDefaultSettings) == CONTENT_SETTINGS_NUM_TYPES,
default_settings_incorrect_size);
diff --git a/chrome/browser/content_settings/content_settings_utils.cc b/chrome/browser/content_settings/content_settings_utils.cc
index 6eefa4c..eaafcaa 100644
--- a/chrome/browser/content_settings/content_settings_utils.cc
+++ b/chrome/browser/content_settings/content_settings_utils.cc
@@ -33,7 +33,8 @@ const char* kTypeNames[] = {
"intents",
"auto-select-certificate",
"fullscreen",
- "mouselock"
+ "mouselock",
+ "mixed-script",
};
COMPILE_ASSERT(arraysize(kTypeNames) == CONTENT_SETTINGS_NUM_TYPES,
type_names_incorrect_size);
diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc
index a22307b..2081b03 100644
--- a/chrome/browser/content_settings/host_content_settings_map.cc
+++ b/chrome/browser/content_settings/host_content_settings_map.cc
@@ -343,6 +343,10 @@ bool HostContentSettingsMap::IsSettingAllowedForType(
return false;
}
+ // We don't yet support stored content settings for mixed scripting.
+ if (content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)
+ return false;
+
// BLOCK semantics are not implemented for fullscreen.
if (content_type == CONTENT_SETTINGS_TYPE_FULLSCREEN &&
setting == CONTENT_SETTING_BLOCK) {
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 65731d3..bd28c67 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -199,7 +199,8 @@ bool TabSpecificContentSettings::IsContentBlocked(
content_type == CONTENT_SETTINGS_TYPE_JAVASCRIPT ||
content_type == CONTENT_SETTINGS_TYPE_PLUGINS ||
content_type == CONTENT_SETTINGS_TYPE_COOKIES ||
- content_type == CONTENT_SETTINGS_TYPE_POPUPS)
+ content_type == CONTENT_SETTINGS_TYPE_POPUPS ||
+ content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT)
return content_blocked_[content_type];
return false;
diff --git a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc
index 1dedd65..01c2e49 100644
--- a/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc
+++ b/chrome/browser/ui/browser_content_setting_bubble_model_delegate.cc
@@ -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::ShowCollectedCookiesDialog(
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);
+ }
}
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 f7006a5..d06e2f0 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
@@ -91,6 +91,8 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
{CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_TITLE},
{CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_MESSAGE},
{CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_TITLE},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT,
+ IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT},
};
// Fields as for kBlockedTitleIDs, above.
static const ContentSettingsTypeIdEntry
@@ -125,6 +127,7 @@ class ContentSettingTitleAndLinkModel : public ContentSettingBubbleModel {
{CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LINK},
{CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_LINK},
{CONTENT_SETTINGS_TYPE_GEOLOCATION, IDS_GEOLOCATION_BUBBLE_MANAGE_LINK},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, IDS_LEARN_MORE},
};
set_manage_link(l10n_util::GetStringUTF8(
GetIdForContentType(kLinkIDs, arraysize(kLinkIDs), content_type())));
@@ -157,6 +160,7 @@ class ContentSettingTitleLinkAndCustomModel
static const ContentSettingsTypeIdEntry kCustomIDs[] = {
{CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_INFO},
{CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_LOAD_ALL},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, IDS_ALLOW_INSECURE_CONTENT_BUTTON},
};
int custom_link_id =
GetIdForContentType(kCustomIDs, arraysize(kCustomIDs), content_type());
@@ -510,6 +514,32 @@ class ContentSettingDomainListBubbleModel
}
};
+class ContentSettingMixedScriptBubbleModel
+ : public ContentSettingTitleLinkAndCustomModel {
+ public:
+ ContentSettingMixedScriptBubbleModel(Delegate* delegate,
+ TabContents* tab_contents,
+ Profile* profile,
+ ContentSettingsType content_type)
+ : ContentSettingTitleLinkAndCustomModel(
+ delegate, tab_contents, profile, content_type) {
+ DCHECK_EQ(content_type, CONTENT_SETTINGS_TYPE_MIXEDSCRIPT);
+ set_custom_link_enabled(true);
+ }
+
+ virtual ~ContentSettingMixedScriptBubbleModel() {}
+
+ private:
+ virtual void OnCustomLinkClicked() OVERRIDE {
+ content::RecordAction(UserMetricsAction("MixedScript_LoadAnyway_Bubble"));
+ DCHECK(tab_contents());
+ content::RenderViewHost* host =
+ tab_contents()->web_contents()->GetRenderViewHost();
+ host->Send(new ChromeViewMsg_SetAllowRunningInsecureContent(
+ host->GetRoutingID(), true));
+ }
+};
+
// static
ContentSettingBubbleModel*
ContentSettingBubbleModel::CreateContentSettingBubbleModel(
@@ -533,6 +563,10 @@ ContentSettingBubbleModel*
return new ContentSettingPluginBubbleModel(delegate, tab_contents, profile,
content_type);
}
+ if (content_type == CONTENT_SETTINGS_TYPE_MIXEDSCRIPT) {
+ return new ContentSettingMixedScriptBubbleModel(delegate, tab_contents,
+ profile, content_type);
+ }
return new ContentSettingSingleRadioGroup(delegate, tab_contents, profile,
content_type);
}
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc
index 803ea03..15f20bc 100644
--- a/chrome/browser/ui/content_settings/content_setting_image_model.cc
+++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -23,14 +23,6 @@ class ContentSettingBlockedImageModel : public ContentSettingImageModel {
ContentSettingsType content_settings_type);
virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE;
-
- private:
- static const int kAccessedIconIDs[];
- static const int kBlockedIconIDs[];
- static const int kBlockedExplanatoryTextIDs[];
- static const int kAccessedExplanatoryTextIDs[];
- static const int kAccessedTooltipIDs[];
- static const int kBlockedTooltipIDs[];
};
class ContentSettingGeolocationImageModel : public ContentSettingImageModel {
@@ -47,54 +39,24 @@ class ContentSettingNotificationsImageModel : public ContentSettingImageModel {
virtual void UpdateFromWebContents(WebContents* web_contents) OVERRIDE;
};
-const int ContentSettingBlockedImageModel::kBlockedIconIDs[] = {
- IDR_BLOCKED_COOKIES,
- IDR_BLOCKED_IMAGES,
- IDR_BLOCKED_JAVASCRIPT,
- IDR_BLOCKED_PLUGINS,
- IDR_BLOCKED_POPUPS,
-};
-
-const int ContentSettingBlockedImageModel::kAccessedIconIDs[] = {
- IDR_ACCESSED_COOKIES,
- 0,
- 0,
- 0,
- 0,
-};
-
-const int ContentSettingBlockedImageModel::kBlockedExplanatoryTextIDs[] = {
- 0,
- 0,
- 0,
- 0,
- IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT,
-};
+namespace {
-const int ContentSettingBlockedImageModel::kAccessedExplanatoryTextIDs[] = {
- 0,
- 0,
- 0,
- 0,
- 0,
+struct ContentSettingsTypeIdEntry {
+ ContentSettingsType type;
+ int id;
};
+int GetIdForContentType(const ContentSettingsTypeIdEntry* entries,
+ size_t num_entries,
+ ContentSettingsType type) {
+ for (size_t i = 0; i < num_entries; ++i) {
+ if (entries[i].type == type)
+ return entries[i].id;
+ }
+ return 0;
+}
-const int ContentSettingBlockedImageModel::kBlockedTooltipIDs[] = {
- IDS_BLOCKED_COOKIES_TITLE,
- IDS_BLOCKED_IMAGES_TITLE,
- IDS_BLOCKED_JAVASCRIPT_TITLE,
- IDS_BLOCKED_PLUGINS_MESSAGE,
- IDS_BLOCKED_POPUPS_TOOLTIP,
-};
-
-const int ContentSettingBlockedImageModel::kAccessedTooltipIDs[] = {
- IDS_ACCESSED_COOKIES_TITLE,
- 0,
- 0,
- 0,
- 0,
-};
+} // namespace
ContentSettingBlockedImageModel::ContentSettingBlockedImageModel(
ContentSettingsType content_settings_type)
@@ -107,9 +69,35 @@ void ContentSettingBlockedImageModel::UpdateFromWebContents(
if (!web_contents)
return;
- const int* icon_ids = kBlockedIconIDs;
- const int* tooltip_ids = kBlockedTooltipIDs;
- const int* explanatory_string_ids = kBlockedExplanatoryTextIDs;
+ static const ContentSettingsTypeIdEntry kBlockedIconIDs[] = {
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDR_BLOCKED_COOKIES},
+ {CONTENT_SETTINGS_TYPE_IMAGES, IDR_BLOCKED_IMAGES},
+ {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDR_BLOCKED_JAVASCRIPT},
+ {CONTENT_SETTINGS_TYPE_PLUGINS, IDR_BLOCKED_PLUGINS},
+ {CONTENT_SETTINGS_TYPE_POPUPS, IDR_BLOCKED_POPUPS},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, IDR_OMNIBOX_HTTPS_INVALID},
+ };
+ static const ContentSettingsTypeIdEntry kBlockedTooltipIDs[] = {
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDS_BLOCKED_COOKIES_TITLE},
+ {CONTENT_SETTINGS_TYPE_IMAGES, IDS_BLOCKED_IMAGES_TITLE},
+ {CONTENT_SETTINGS_TYPE_JAVASCRIPT, IDS_BLOCKED_JAVASCRIPT_TITLE},
+ {CONTENT_SETTINGS_TYPE_PLUGINS, IDS_BLOCKED_PLUGINS_MESSAGE},
+ {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_TOOLTIP},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT,
+ IDS_BLOCKED_DISPLAYING_INSECURE_CONTENT},
+ };
+ static const ContentSettingsTypeIdEntry kBlockedExplanatoryTextIDs[] = {
+ {CONTENT_SETTINGS_TYPE_POPUPS, IDS_BLOCKED_POPUPS_EXPLANATORY_TEXT},
+ };
+
+ ContentSettingsType type = get_content_settings_type();
+ int icon_id = GetIdForContentType(
+ kBlockedIconIDs, arraysize(kBlockedIconIDs), type);
+ int tooltip_id = GetIdForContentType(
+ kBlockedTooltipIDs, arraysize(kBlockedTooltipIDs), type);
+ int explanation_id = GetIdForContentType(
+ kBlockedExplanatoryTextIDs, arraysize(kBlockedExplanatoryTextIDs), type);
+
// If a content type is blocked by default and was accessed, display the
// accessed icon.
TabContents* tab_contents = TabContents::FromWebContents(web_contents);
@@ -121,16 +109,22 @@ void ContentSettingBlockedImageModel::UpdateFromWebContents(
GetDefaultContentSetting(get_content_settings_type(), NULL) !=
CONTENT_SETTING_BLOCK))
return;
- icon_ids = kAccessedIconIDs;
- tooltip_ids = kAccessedTooltipIDs;
- explanatory_string_ids = kAccessedExplanatoryTextIDs;
+ static const ContentSettingsTypeIdEntry kAccessedIconIDs[] = {
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDR_ACCESSED_COOKIES},
+ };
+ static const ContentSettingsTypeIdEntry kAccessedTooltipIDs[] = {
+ {CONTENT_SETTINGS_TYPE_COOKIES, IDS_ACCESSED_COOKIES_TITLE},
+ };
+ icon_id = GetIdForContentType(
+ kAccessedIconIDs, arraysize(kAccessedIconIDs), type);
+ tooltip_id = GetIdForContentType(
+ kAccessedTooltipIDs, arraysize(kAccessedTooltipIDs), type);
+ explanation_id = 0;
}
set_visible(true);
- set_icon(icon_ids[get_content_settings_type()]);
- set_explanatory_string_id(
- explanatory_string_ids[get_content_settings_type()]);
- set_tooltip(
- l10n_util::GetStringUTF8(tooltip_ids[get_content_settings_type()]));
+ set_icon(icon_id);
+ set_explanatory_string_id(explanation_id);
+ set_tooltip(l10n_util::GetStringUTF8(tooltip_id));
}
ContentSettingGeolocationImageModel::ContentSettingGeolocationImageModel()
diff --git a/chrome/browser/ui/webui/options2/content_settings_handler2.cc b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
index 79ed7ad..d3c12d2 100644
--- a/chrome/browser/ui/webui/options2/content_settings_handler2.cc
+++ b/chrome/browser/ui/webui/options2/content_settings_handler2.cc
@@ -337,6 +337,7 @@ const ContentSettingsHandler::ExContentSettingsTypeNameEntry
{CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, "auto-select-certificate"},
{CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
{CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
+ {CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, "mixed-script"},
{EX_CONTENT_SETTINGS_TYPE_PEPPER_FLASH_CAMERAMIC, "pepper-flash-cameramic"},
};
@@ -664,11 +665,6 @@ void ContentSettingsHandler::UpdateAllOTRExceptionsViewsFromModel() {
void ContentSettingsHandler::UpdateExceptionsViewFromModel(
const ExContentSettingsType& type) {
- // Don't update intents settings at this point.
- // Turn on when enable_web_intents_tag is enabled.
- if (type == CONTENT_SETTINGS_TYPE_INTENTS)
- return;
-
switch (type) {
case CONTENT_SETTINGS_TYPE_GEOLOCATION:
UpdateGeolocationExceptionsView();
@@ -679,6 +675,13 @@ void ContentSettingsHandler::UpdateExceptionsViewFromModel(
case EX_CONTENT_SETTINGS_TYPE_PEPPER_FLASH_CAMERAMIC:
UpdateFlashCameraMicExceptionsView();
break;
+ case CONTENT_SETTINGS_TYPE_INTENTS:
+ // Don't update intents settings at this point.
+ // Turn on when enable_web_intents_tag is enabled.
+ break;
+ case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
+ // We don't yet support exceptions for mixed scripting.
+ break;
default:
UpdateExceptionsViewFromHostContentSettingsMap(
type.ToContentSettingsType());
@@ -693,6 +696,7 @@ void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel(
case CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
case CONTENT_SETTINGS_TYPE_INTENTS:
case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE:
+ case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
case EX_CONTENT_SETTINGS_TYPE_PEPPER_FLASH_CAMERAMIC:
break;
default:
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index e741e4f..6bbefcc 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -92,6 +92,9 @@ void ParamTraits<ContentSettingsType>::Log(const param_type& p,
case CONTENT_SETTINGS_TYPE_INTENTS:
setting_type = "CONTENT_SETTINGS_TYPE_INTENTS";
break;
+ case CONTENT_SETTINGS_TYPE_MIXEDSCRIPT:
+ setting_type = "CONTENT_SETTINGS_TYPE_MIXEDSCRIPT";
+ break;
default:
setting_type = "UNKNOWN";
break;
diff --git a/chrome/common/content_settings_types.h b/chrome/common/content_settings_types.h
index b902265..e4e5015 100644
--- a/chrome/common/content_settings_types.h
+++ b/chrome/common/content_settings_types.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,6 +23,7 @@ enum ContentSettingsType {
CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
CONTENT_SETTINGS_TYPE_FULLSCREEN,
CONTENT_SETTINGS_TYPE_MOUSELOCK,
+ CONTENT_SETTINGS_TYPE_MIXEDSCRIPT,
CONTENT_SETTINGS_NUM_TYPES
};
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index f54caa2..ab4a437 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -229,7 +229,6 @@ ChromeRenderViewObserver::ChromeRenderViewObserver(
last_indexed_page_id_(-1),
allow_displaying_insecure_content_(false),
allow_running_insecure_content_(false),
- warned_about_insecure_content_(false),
capture_timer_(false, false) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
render_view->GetWebView()->setPermissionClient(this);
@@ -630,10 +629,8 @@ bool ChromeRenderViewObserver::allowRunningInsecureContent(
SendInsecureContentSignal(INSECURE_CONTENT_RUN_SWF);
if (!allow_running_insecure_content_ && !allowed_per_settings) {
- if (!warned_about_insecure_content_ && !IsStrictSecurityHost(origin_host)) {
- warned_about_insecure_content_ = true;
- Send(new ChromeViewHostMsg_DidBlockRunningInsecureContent(routing_id()));
- }
+ if (!IsStrictSecurityHost(origin_host))
+ content_settings_->DidNotAllowMixedScript();
return false;
}
@@ -641,11 +638,11 @@ bool ChromeRenderViewObserver::allowRunningInsecureContent(
}
void ChromeRenderViewObserver::didNotAllowPlugins(WebFrame* frame) {
- content_settings_->DidNotAllowPlugins(frame);
+ content_settings_->DidNotAllowPlugins();
}
void ChromeRenderViewObserver::didNotAllowScript(WebFrame* frame) {
- content_settings_->DidNotAllowScript(frame);
+ content_settings_->DidNotAllowScript();
}
void ChromeRenderViewObserver::OnSetIsPrerendering(bool is_prerendering) {
diff --git a/chrome/renderer/chrome_render_view_observer.h b/chrome/renderer/chrome_render_view_observer.h
index 9ba86ca..57a28a8 100644
--- a/chrome/renderer/chrome_render_view_observer.h
+++ b/chrome/renderer/chrome_render_view_observer.h
@@ -209,7 +209,6 @@ class ChromeRenderViewObserver : public content::RenderViewObserver,
// Insecure content may be permitted for the duration of this render view.
bool allow_displaying_insecure_content_;
bool allow_running_insecure_content_;
- bool warned_about_insecure_content_;
std::set<std::string> strict_security_hosts_;
// External host exposed through automation controller.
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
index 7c540b9..dd1790c 100644
--- a/chrome/renderer/content_settings_observer.cc
+++ b/chrome/renderer/content_settings_observer.cc
@@ -101,7 +101,7 @@ void ContentSettingsObserver::DidBlockContentType(
if (!content_blocked_[settings_type] || !resource_identifier.empty()) {
content_blocked_[settings_type] = true;
Send(new ChromeViewHostMsg_ContentBlocked(routing_id(), settings_type,
- resource_identifier));
+ resource_identifier));
}
}
@@ -288,14 +288,18 @@ bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) {
return result;
}
-void ContentSettingsObserver::DidNotAllowPlugins(WebFrame* frame) {
+void ContentSettingsObserver::DidNotAllowPlugins() {
DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
}
-void ContentSettingsObserver::DidNotAllowScript(WebFrame* frame) {
+void ContentSettingsObserver::DidNotAllowScript() {
DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string());
}
+void ContentSettingsObserver::DidNotAllowMixedScript() {
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_MIXEDSCRIPT, std::string());
+}
+
void ContentSettingsObserver::OnLoadBlockedPlugins(
const std::string& identifier) {
temporarily_allowed_plugins_.insert(identifier);
diff --git a/chrome/renderer/content_settings_observer.h b/chrome/renderer/content_settings_observer.h
index 4e9a8f8..6cd37ca 100644
--- a/chrome/renderer/content_settings_observer.h
+++ b/chrome/renderer/content_settings_observer.h
@@ -61,8 +61,9 @@ class ContentSettingsObserver
bool AllowScriptFromSource(WebKit::WebFrame* frame, bool enabled_per_settings,
const WebKit::WebURL& script_url);
bool AllowStorage(WebKit::WebFrame* frame, bool local);
- void DidNotAllowPlugins(WebKit::WebFrame* frame);
- void DidNotAllowScript(WebKit::WebFrame* frame);
+ void DidNotAllowPlugins();
+ void DidNotAllowScript();
+ void DidNotAllowMixedScript();
private:
FRIEND_TEST_ALL_PREFIXES(ContentSettingsObserverTest, WhitelistedSchemes);