Index: chrome/renderer/chrome_content_renderer_client.cc |
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc |
index bd71656e3a54f2f5429b5902857ecc723bae3562..21b8e41ed0e0dacd66ceb4fc50a8056c1ff84e2f 100644 |
--- a/chrome/renderer/chrome_content_renderer_client.cc |
+++ b/chrome/renderer/chrome_content_renderer_client.cc |
@@ -267,7 +267,9 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( |
DCHECK(group != NULL); |
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT; |
- std::string resource = group->identifier(); |
+ std::string resource; |
+ if (cmd->HasSwitch(switches::kEnableResourceContentSettings)) |
+ resource = group->identifier(); |
render_view->Send(new ViewHostMsg_GetPluginContentSetting( |
frame->top()->url(), resource, &plugin_setting)); |
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT); |
@@ -350,9 +352,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( |
frame, params, info.path, actual_mime_type); |
} |
- observer->DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, |
- cmd->HasSwitch(switches::kEnableResourceContentSettings) ? |
- resource : std::string()); |
+ observer->DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, resource); |
if (plugin_setting == CONTENT_SETTING_ASK) { |
return CreatePluginPlaceholder( |
render_view, frame, params, *group, IDR_CLICK_TO_PLAY_PLUGIN_HTML, |