| Index: chrome/browser/plugins/plugin_observer.cc
|
| diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc
|
| index 6b47e7be06a25c605f182c12c5e0228a00b9d198..611bc871ebef81dbd35e411a4f7137882ee16d2d 100644
|
| --- a/chrome/browser/plugins/plugin_observer.cc
|
| +++ b/chrome/browser/plugins/plugin_observer.cc
|
| @@ -22,6 +22,7 @@
|
| #include "chrome/browser/plugins/plugin_infobar_delegates.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
|
| +#include "chrome/common/features.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "chrome/grit/generated_resources.h"
|
| @@ -43,11 +44,11 @@
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/gfx/vector_icons_public.h"
|
|
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| #include "chrome/browser/plugins/plugin_installer.h"
|
| #include "chrome/browser/plugins/plugin_installer_observer.h"
|
| #include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#endif // BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
|
|
| using content::OpenURLParams;
|
| using content::PluginService;
|
| @@ -58,7 +59,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(PluginObserver);
|
|
|
| namespace {
|
|
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
|
|
| // ConfirmInstallDialogDelegate ------------------------------------------------
|
|
|
| @@ -123,7 +124,7 @@ void ConfirmInstallDialogDelegate::DownloadStarted() {
|
| void ConfirmInstallDialogDelegate::OnlyWeakObserversLeft() {
|
| Cancel();
|
| }
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#endif // BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
|
|
| // ReloadPluginInfoBarDelegate -------------------------------------------------
|
|
|
| @@ -200,7 +201,7 @@ bool ReloadPluginInfoBarDelegate::Accept() {
|
|
|
| // PluginObserver -------------------------------------------------------------
|
|
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| class PluginObserver::PluginPlaceholderHost : public PluginInstallerObserver {
|
| public:
|
| PluginPlaceholderHost(PluginObserver* observer,
|
| @@ -247,7 +248,7 @@ class PluginObserver::PluginPlaceholderHost : public PluginInstallerObserver {
|
|
|
| int routing_id_;
|
| };
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#endif // BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
|
|
| class PluginObserver::ComponentObserver
|
| : public update_client::UpdateClient::Observer {
|
| @@ -303,7 +304,7 @@ PluginObserver::PluginObserver(content::WebContents* web_contents)
|
| }
|
|
|
| PluginObserver::~PluginObserver() {
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| base::STLDeleteValues(&plugin_placeholders_);
|
| #endif
|
| }
|
| @@ -365,7 +366,7 @@ bool PluginObserver::OnMessageReceived(
|
| OnBlockedOutdatedPlugin)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_BlockedComponentUpdatedPlugin,
|
| OnBlockedComponentUpdatedPlugin)
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RemovePluginPlaceholderHost,
|
| OnRemovePluginPlaceholderHost)
|
| #endif
|
| @@ -384,7 +385,7 @@ bool PluginObserver::OnMessageReceived(
|
|
|
| void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
|
| const std::string& identifier) {
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| PluginFinder* finder = PluginFinder::GetInstance();
|
| // Find plugin to update.
|
| PluginInstaller* installer = NULL;
|
| @@ -402,7 +403,7 @@ void PluginObserver::OnBlockedOutdatedPlugin(int placeholder_id,
|
| // If we don't support third-party plugin installation, we shouldn't have
|
| // outdated plugins.
|
| NOTREACHED();
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#endif // BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| }
|
|
|
| void PluginObserver::OnBlockedComponentUpdatedPlugin(
|
| @@ -421,7 +422,7 @@ void PluginObserver::RemoveComponentObserver(int placeholder_id) {
|
| component_observers_.erase(it);
|
| }
|
|
|
| -#if defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#if BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
| void PluginObserver::OnRemovePluginPlaceholderHost(int placeholder_id) {
|
| std::map<int, PluginPlaceholderHost*>::iterator it =
|
| plugin_placeholders_.find(placeholder_id);
|
| @@ -432,7 +433,7 @@ void PluginObserver::OnRemovePluginPlaceholderHost(int placeholder_id) {
|
| delete it->second;
|
| plugin_placeholders_.erase(it);
|
| }
|
| -#endif // defined(ENABLE_PLUGIN_INSTALLATION)
|
| +#endif // BUILDFLAG(ENABLE_PLUGIN_INSTALLATION)
|
|
|
| void PluginObserver::OnOpenAboutPlugins() {
|
| web_contents()->OpenURL(
|
|
|