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

Unified Diff: chrome/browser/omnibox_search_hint.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
Index: chrome/browser/omnibox_search_hint.cc
===================================================================
--- chrome/browser/omnibox_search_hint.cc (revision 84141)
+++ chrome/browser/omnibox_search_hint.cc (working copy)
@@ -56,15 +56,14 @@
// ConfirmInfoBarDelegate:
virtual bool ShouldExpire(
- const NavigationController::LoadCommittedDetails& details) const;
- virtual void InfoBarDismissed();
- virtual void InfoBarClosed();
- virtual gfx::Image* GetIcon() const;
- virtual Type GetInfoBarType() const;
- virtual string16 GetMessageText() const;
- virtual int GetButtons() const;
- virtual string16 GetButtonLabel(InfoBarButton button) const;
- virtual bool Accept();
+ const NavigationController::LoadCommittedDetails& details) const OVERRIDE;
+ virtual void InfoBarDismissed() OVERRIDE;
+ virtual gfx::Image* GetIcon() const OVERRIDE;
+ virtual Type GetInfoBarType() const OVERRIDE;
+ virtual string16 GetMessageText() const OVERRIDE;
+ virtual int GetButtons() const OVERRIDE;
+ virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE;
+ virtual bool Accept() OVERRIDE;
// The omnibox hint that shows us.
OmniboxSearchHint* omnibox_hint_;
@@ -95,6 +94,8 @@
}
HintInfoBar::~HintInfoBar() {
+ if (!action_taken_)
+ UMA_HISTOGRAM_COUNTS("OmniboxSearchHint.Ignored", 1);
}
bool HintInfoBar::ShouldExpire(
@@ -109,12 +110,6 @@
omnibox_hint_->DisableHint();
}
-void HintInfoBar::InfoBarClosed() {
- if (!action_taken_)
- UMA_HISTOGRAM_COUNTS("OmniboxSearchHint.Ignored", 1);
- delete this;
-}
-
gfx::Image* HintInfoBar::GetIcon() const {
return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
IDR_INFOBAR_QUESTION_MARK);
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/password_manager_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698