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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 7167007: Use empty resource identifier unless --enable-resource-content-settings is set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/content_settings/host_content_settings_map.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698