| Index: chrome/renderer/content_settings_observer.cc
|
| diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
|
| index 59f58df1d3100fa019cb41f96c239987591ac74e..5333cf0eff302e75ad5089a87b44007f7c1f1fb5 100644
|
| --- a/chrome/renderer/content_settings_observer.cc
|
| +++ b/chrome/renderer/content_settings_observer.cc
|
| @@ -84,16 +84,11 @@ ContentSetting ContentSettingsObserver::GetContentSetting(
|
|
|
| void ContentSettingsObserver::DidBlockContentType(
|
| ContentSettingsType settings_type,
|
| - const std::string& resource_identifier) {
|
| - // Always send a message when |resource_identifier| is not empty, to tell the
|
| - // browser which resource was blocked (otherwise the browser will only show
|
| - // the first resource to be blocked, and none that are blocked at a later
|
| - // time).
|
| - if (!content_blocked_[settings_type] || !resource_identifier.empty()) {
|
| - content_blocked_[settings_type] = true;
|
| - Send(new ViewHostMsg_ContentBlocked(routing_id(), settings_type,
|
| - resource_identifier));
|
| - }
|
| + const std::string& resource_identifier,
|
| + ContentSetting setting) {
|
| + content_blocked_[settings_type] = true;
|
| + Send(new ViewHostMsg_ContentBlocked(routing_id(), settings_type,
|
| + resource_identifier, setting));
|
| }
|
|
|
| bool ContentSettingsObserver::OnMessageReceived(const IPC::Message& message) {
|
| @@ -204,7 +199,8 @@ bool ContentSettingsObserver::AllowImages(WebFrame* frame,
|
| if (IsWhitelistedForContentSettings(frame))
|
| return true;
|
|
|
| - DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string());
|
| + DidBlockContentType(CONTENT_SETTINGS_TYPE_IMAGES, std::string(),
|
| + CONTENT_SETTING_BLOCK);
|
| return false; // Other protocols fall through here.
|
| }
|
|
|
| @@ -264,11 +260,13 @@ bool ContentSettingsObserver::AllowStorage(WebFrame* frame, bool local) {
|
| }
|
|
|
| void ContentSettingsObserver::DidNotAllowPlugins(WebFrame* frame) {
|
| - DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string());
|
| + DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, std::string(),
|
| + CONTENT_SETTING_BLOCK);
|
| }
|
|
|
| void ContentSettingsObserver::DidNotAllowScript(WebFrame* frame) {
|
| - DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string());
|
| + DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT, std::string(),
|
| + CONTENT_SETTING_BLOCK);
|
| }
|
|
|
| void ContentSettingsObserver::OnSetContentSettingsForLoadingURL(
|
|
|