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

Unified Diff: chrome/browser/translate/translate_infobar_delegate2.h

Issue 2822032: TranslateInfoBarDelegate2 were leaked. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fixed unit-test Created 10 years, 6 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 | « no previous file | chrome/browser/translate/translate_infobar_delegate2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_infobar_delegate2.h
diff --git a/chrome/browser/translate/translate_infobar_delegate2.h b/chrome/browser/translate/translate_infobar_delegate2.h
index bb535ad3b254936c10c159a855963776918d175e..130c3d5b383d3d315df04ed2dcc7d36e943f1e9e 100644
--- a/chrome/browser/translate/translate_infobar_delegate2.h
+++ b/chrome/browser/translate/translate_infobar_delegate2.h
@@ -49,10 +49,10 @@ class TranslateInfoBarDelegate2 : public InfoBarDelegate {
int GetLanguageCount() const;
// Returns the ISO code for the language at |index|.
- const std::string& GetLanguageCodeAt(int index) const;
+ std::string GetLanguageCodeAt(int index) const;
// Returns the displayable name for the language at |index|.
- const string16& GetLanguageDisplayableNameAt(int index) const;
+ string16 GetLanguageDisplayableNameAt(int index) const;
TabContents* tab_contents() const { return tab_contents_; }
@@ -62,8 +62,8 @@ class TranslateInfoBarDelegate2 : public InfoBarDelegate {
int target_language_index() const { return target_language_index_; }
// Convenience methods.
- const std::string& GetOriginalLanguageCode() const;
- const std::string& GetTargetLanguageCode() const;
+ std::string GetOriginalLanguageCode() const;
+ std::string GetTargetLanguageCode() const;
// Called by the InfoBar to notify that the original/target language has
// changed and is now the language at |language_index|.
@@ -89,7 +89,8 @@ class TranslateInfoBarDelegate2 : public InfoBarDelegate {
// InfoBarDelegate implementation:
virtual InfoBar* CreateInfoBar();
- void InfoBarDismissed();
+ virtual void InfoBarDismissed();
+ virtual void InfoBarClosed();
virtual SkBitmap* GetIcon() const;
virtual InfoBarDelegate::Type GetInfoBarType();
virtual TranslateInfoBarDelegate2* AsTranslateInfoBarDelegate2() {
« no previous file with comments | « no previous file | chrome/browser/translate/translate_infobar_delegate2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698