| Index: chrome/browser/pepper_broker_infobar_delegate.cc
|
| diff --git a/chrome/browser/pepper_broker_infobar_delegate.cc b/chrome/browser/pepper_broker_infobar_delegate.cc
|
| index 3ef8edf877ee9d5f03b9956a652004ff664c78d2..5c1f0e5b43ce85b28a9160bc69f8925268b8b446 100644
|
| --- a/chrome/browser/pepper_broker_infobar_delegate.cc
|
| +++ b/chrome/browser/pepper_broker_infobar_delegate.cc
|
| @@ -5,6 +5,7 @@
|
| #include "chrome/browser/pepper_broker_infobar_delegate.h"
|
|
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| +#include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/infobars/infobar_tab_helper.h"
|
| #include "chrome/browser/plugins/plugin_finder.h"
|
| #include "chrome/browser/plugins/plugin_metadata.h"
|
| @@ -45,6 +46,8 @@ void PepperBrokerInfoBarDelegate::Show(
|
|
|
| Profile* profile =
|
| Profile::FromBrowserContext(web_contents->GetBrowserContext());
|
| + TabSpecificContentSettings* tab_content_settings =
|
| + TabSpecificContentSettings::FromWebContents(web_contents);
|
| HostContentSettingsMap* content_settings =
|
| profile->GetHostContentSettingsMap();
|
| ContentSetting setting =
|
| @@ -55,12 +58,14 @@ void PepperBrokerInfoBarDelegate::Show(
|
| case CONTENT_SETTING_ALLOW: {
|
| content::RecordAction(
|
| content::UserMetricsAction("PPAPI.BrokerSettingAllow"));
|
| + tab_content_settings->SetPepperBrokerAllowed(true);
|
| callback.Run(true);
|
| break;
|
| }
|
| case CONTENT_SETTING_BLOCK: {
|
| content::RecordAction(
|
| content::UserMetricsAction("PPAPI.BrokerSettingDeny"));
|
| + tab_content_settings->SetPepperBrokerAllowed(false);
|
| callback.Run(false);
|
| break;
|
| }
|
| @@ -75,7 +80,7 @@ void PepperBrokerInfoBarDelegate::Show(
|
| infobar_helper->AddInfoBar(
|
| new PepperBrokerInfoBarDelegate(
|
| infobar_helper, url, plugin_path, languages, content_settings,
|
| - callback));
|
| + tab_content_settings, callback));
|
| break;
|
| }
|
| default:
|
| @@ -89,12 +94,14 @@ PepperBrokerInfoBarDelegate::PepperBrokerInfoBarDelegate(
|
| const FilePath& plugin_path,
|
| const std::string& languages,
|
| HostContentSettingsMap* content_settings,
|
| + TabSpecificContentSettings* tab_content_settings,
|
| const base::Callback<void(bool)>& callback)
|
| : ConfirmInfoBarDelegate(helper),
|
| url_(url),
|
| plugin_path_(plugin_path),
|
| languages_(languages),
|
| content_settings_(content_settings),
|
| + tab_content_settings_(tab_content_settings),
|
| callback_(callback) {
|
| }
|
|
|
| @@ -175,4 +182,5 @@ void PepperBrokerInfoBarDelegate::DispatchCallback(bool result) {
|
| ContentSettingsPattern::Wildcard(),
|
| CONTENT_SETTINGS_TYPE_PPAPI_BROKER,
|
| std::string(), result ? CONTENT_SETTING_ALLOW : CONTENT_SETTING_BLOCK);
|
| + tab_content_settings_->SetPepperBrokerAllowed(result);
|
| }
|
|
|