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

Unified Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 7848025: Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: indent Created 9 years, 3 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
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 7becf4a9b044992b9481e13a0af047e6ad06cf9e..a6e251a15bc7252940909b3f1c3f0efe9d763bb4 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -327,9 +327,9 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl(
return NULL;
}
- const webkit::npapi::PluginGroup* group =
- webkit::npapi::PluginList::Singleton()->GetPluginGroup(info);
- DCHECK(group != NULL);
+ scoped_ptr<webkit::npapi::PluginGroup> group(
+ webkit::npapi::PluginList::Singleton()->GetPluginGroup(info));
+ DCHECK(group.get());
jam 2011/09/13 01:47:31 nit: this dcheck is not necessary. if it's null, w
Bernhard Bauer 2011/09/13 12:13:01 Done.
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
std::string resource;
@@ -352,14 +352,14 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl(
ContentSetting outdated_policy = CONTENT_SETTING_ASK;
ContentSetting authorize_policy = CONTENT_SETTING_ASK;
- if (group->IsVulnerable() || group->RequiresAuthorization()) {
+ if (group->IsVulnerable(info) || group->RequiresAuthorization(info)) {
// These policies are dynamic and can changed at runtime, so they aren't
// cached here.
render_view->Send(new ChromeViewHostMsg_GetPluginPolicies(
&outdated_policy, &authorize_policy));
}
- if (group->IsVulnerable()) {
+ if (group->IsVulnerable(info)) {
if (outdated_policy == CONTENT_SETTING_ASK ||
outdated_policy == CONTENT_SETTING_BLOCK) {
if (outdated_policy == CONTENT_SETTING_ASK) {
@@ -379,7 +379,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl(
ContentSetting host_setting =
observer->GetContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS);
- if (group->RequiresAuthorization() &&
+ if (group->RequiresAuthorization(info) &&
authorize_policy == CONTENT_SETTING_ASK &&
(plugin_setting == CONTENT_SETTING_ALLOW ||
plugin_setting == CONTENT_SETTING_ASK) &&

Powered by Google App Engine
This is Rietveld 408576698