| Index: chrome/browser/plugins/plugin_observer.cc
|
| diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
|
| index de6d6f86a6ad9d2651393fed2de8f4c6592b7280..6fead208f6e6baa381edf841e3e556bf5ceae862 100644
|
| --- a/chrome/browser/plugins/plugin_observer.cc
|
| +++ b/chrome/browser/plugins/plugin_observer.cc
|
| @@ -229,22 +229,9 @@ void PluginObserver::OnBlockedUnauthorizedPlugin(
|
| void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
|
| const std::string& identifier) {
|
| #if defined(ENABLE_PLUGIN_INSTALLATION)
|
| - PluginFinder::Get(base::Bind(&PluginObserver::FindPluginToUpdate,
|
| - weak_ptr_factory_.GetWeakPtr(),
|
| - placeholder_id, identifier));
|
| -#else
|
| - // If we don't support third-party plug-in installation, we shouldn't have
|
| - // outdated plug-ins.
|
| - NOTREACHED();
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| -}
|
| -
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| -void PluginObserver::FindPluginToUpdate(int placeholder_id,
|
| - const std::string& identifier,
|
| - PluginFinder* plugin_finder) {
|
| + // Find plugin to update.
|
| PluginInstaller* installer =
|
| - plugin_finder->FindPluginWithIdentifier(identifier);
|
| + PluginFinder::GetInstance()->FindPluginWithIdentifier(identifier);
|
| DCHECK(installer) << "Couldn't find PluginInstaller for identifier "
|
| << identifier;
|
| plugin_placeholders_[placeholder_id] =
|
| @@ -252,20 +239,19 @@ void PluginObserver::FindPluginToUpdate(int placeholder_id,
|
| InfoBarTabHelper* infobar_helper = tab_contents_->infobar_tab_helper();
|
| infobar_helper->AddInfoBar(
|
| OutdatedPluginInfoBarDelegate::Create(this, installer));
|
| +#else
|
| + // If we don't support third-party plug-in installation, we shouldn't have
|
| + // outdated plug-ins.
|
| + NOTREACHED();
|
| +#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| }
|
|
|
| +#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| void PluginObserver::OnFindMissingPlugin(int placeholder_id,
|
| const std::string& mime_type) {
|
| -PluginFinder::Get(base::Bind(&PluginObserver::FindMissingPlugin,
|
| - weak_ptr_factory_.GetWeakPtr(),
|
| - placeholder_id, mime_type));
|
| -}
|
| -
|
| -void PluginObserver::FindMissingPlugin(int placeholder_id,
|
| - const std::string& mime_type,
|
| - PluginFinder* plugin_finder) {
|
| std::string lang = "en-US"; // Oh yes.
|
| - PluginInstaller* installer = plugin_finder->FindPlugin(mime_type, lang);
|
| + PluginInstaller* installer =
|
| + PluginFinder::GetInstance()->FindPlugin(mime_type, lang);
|
| if (!installer) {
|
| Send(new ChromeViewMsg_DidNotFindMissingPlugin(placeholder_id));
|
| return;
|
|
|