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

Unified Diff: chrome/browser/plugin_observer.cc

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
« no previous file with comments | « chrome/browser/plugin_installer_infobar_delegate.h ('k') | chrome/browser/tab_contents/infobar_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_observer.cc
===================================================================
--- chrome/browser/plugin_observer.cc (revision 84141)
+++ chrome/browser/plugin_observer.cc (working copy)
@@ -38,9 +38,8 @@
virtual ~PluginInfoBarDelegate();
// ConfirmInfoBarDelegate:
- virtual void InfoBarClosed();
- virtual bool Cancel();
- virtual bool LinkClicked(WindowOpenDisposition disposition);
+ virtual bool Cancel() OVERRIDE;
+ virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
virtual std::string GetLearnMoreURL() const = 0;
@@ -65,10 +64,6 @@
PluginInfoBarDelegate::~PluginInfoBarDelegate() {
}
-void PluginInfoBarDelegate::InfoBarClosed() {
- delete this;
-}
-
bool PluginInfoBarDelegate::Cancel() {
tab_contents_->render_view_host()->Send(new ViewMsg_LoadBlockedPlugins(
tab_contents_->render_view_host()->routing_id()));
@@ -102,14 +97,13 @@
virtual ~BlockedPluginInfoBarDelegate();
// PluginInfoBarDelegate:
- virtual string16 GetMessageText() const;
- virtual string16 GetButtonLabel(InfoBarButton button) const;
- virtual bool Accept();
- virtual bool Cancel();
- virtual void InfoBarClosed();
- virtual void InfoBarDismissed();
- virtual bool LinkClicked(WindowOpenDisposition disposition);
- virtual std::string GetLearnMoreURL() const;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual bool Accept() OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual void InfoBarDismissed() OVERRIDE;
+ virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ virtual std::string GetLearnMoreURL() const OVERRIDE;
DISALLOW_COPY_AND_ASSIGN(BlockedPluginInfoBarDelegate);
};
@@ -135,6 +129,7 @@
}
BlockedPluginInfoBarDelegate::~BlockedPluginInfoBarDelegate() {
+ UserMetrics::RecordAction(UserMetricsAction("BlockedPluginInfobar.Closed"));
}
std::string BlockedPluginInfoBarDelegate::GetLearnMoreURL() const {
@@ -171,11 +166,6 @@
UserMetricsAction("BlockedPluginInfobar.Dismissed"));
}
-void BlockedPluginInfoBarDelegate::InfoBarClosed() {
- UserMetrics::RecordAction(UserMetricsAction("BlockedPluginInfobar.Closed"));
- PluginInfoBarDelegate::InfoBarClosed();
-}
-
bool BlockedPluginInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
UserMetrics::RecordAction(
@@ -195,14 +185,13 @@
virtual ~OutdatedPluginInfoBarDelegate();
// PluginInfoBarDelegate:
- virtual string16 GetMessageText() const;
- virtual string16 GetButtonLabel(InfoBarButton button) const;
- virtual bool Accept();
- virtual bool Cancel();
- virtual void InfoBarClosed();
- virtual void InfoBarDismissed();
- virtual bool LinkClicked(WindowOpenDisposition disposition);
- virtual std::string GetLearnMoreURL() const;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual bool Accept() OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual void InfoBarDismissed() OVERRIDE;
+ virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ virtual std::string GetLearnMoreURL() const OVERRIDE;
GURL update_url_;
@@ -238,6 +227,7 @@
}
OutdatedPluginInfoBarDelegate::~OutdatedPluginInfoBarDelegate() {
+ UserMetrics::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Closed"));
}
std::string OutdatedPluginInfoBarDelegate::GetLearnMoreURL() const {
@@ -272,11 +262,6 @@
UserMetricsAction("OutdatedPluginInfobar.Dismissed"));
}
-void OutdatedPluginInfoBarDelegate::InfoBarClosed() {
- UserMetrics::RecordAction(UserMetricsAction("OutdatedPluginInfobar.Closed"));
- PluginInfoBarDelegate::InfoBarClosed();
-}
-
bool OutdatedPluginInfoBarDelegate::LinkClicked(
WindowOpenDisposition disposition) {
UserMetrics::RecordAction(
« no previous file with comments | « chrome/browser/plugin_installer_infobar_delegate.h ('k') | chrome/browser/tab_contents/infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698