Index: chrome/browser/pepper_broker_infobar_delegate.cc |
=================================================================== |
--- chrome/browser/pepper_broker_infobar_delegate.cc (revision 238220) |
+++ chrome/browser/pepper_broker_infobar_delegate.cc (working copy) |
@@ -7,6 +7,7 @@ |
#include "base/prefs/pref_service.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.h" |
#include "chrome/browser/infobars/infobar_service.h" |
#include "chrome/browser/plugins/plugin_finder.h" |
#include "chrome/browser/plugins/plugin_metadata.h" |
@@ -95,11 +96,11 @@ |
content::UserMetricsAction("PPAPI.BrokerInfobarDisplayed")); |
InfoBarService* infobar_service = |
InfoBarService::FromWebContents(web_contents); |
- infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>( |
- new PepperBrokerInfoBarDelegate( |
- infobar_service, url, plugin_path, |
+ infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar( |
+ scoped_ptr<ConfirmInfoBarDelegate>(new PepperBrokerInfoBarDelegate( |
+ url, plugin_path, |
profile->GetPrefs()->GetString(prefs::kAcceptLanguages), |
- content_settings, tab_content_settings, callback))); |
+ content_settings, tab_content_settings, callback)))); |
return; |
} |
@@ -112,7 +113,6 @@ |
} |
PepperBrokerInfoBarDelegate::PepperBrokerInfoBarDelegate( |
- InfoBarService* infobar_service, |
const GURL& url, |
const base::FilePath& plugin_path, |
const std::string& languages, |
@@ -119,7 +119,7 @@ |
HostContentSettingsMap* content_settings, |
TabSpecificContentSettings* tab_content_settings, |
const base::Callback<void(bool)>& callback) |
- : ConfirmInfoBarDelegate(infobar_service), |
+ : ConfirmInfoBarDelegate(), |
url_(url), |
plugin_path_(plugin_path), |
languages_(languages), |