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

Unified Diff: chrome/browser/ui/views/infobars/before_translate_infobar.cc

Issue 7006010: Change InfoBar-related notifications to be sourced from a TabContentsWrapper, not a TabContents. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/ui/views/infobars/before_translate_infobar.cc
===================================================================
--- chrome/browser/ui/views/infobars/before_translate_infobar.cc (revision 87541)
+++ chrome/browser/ui/views/infobars/before_translate_infobar.cc (working copy)
@@ -179,7 +179,12 @@
}
void BeforeTranslateInfoBar::OriginalLanguageChanged() {
- UpdateLanguageButtonText(language_menu_button_, LanguagesMenuModel::ORIGINAL);
+ // Tests can call this function when the infobar has never been added to a
+ // view hierarchy and thus there is no button.
+ if (language_menu_button_) {
+ UpdateLanguageButtonText(language_menu_button_,
+ LanguagesMenuModel::ORIGINAL);
+ }
}
void BeforeTranslateInfoBar::RunMenu(View* source, const gfx::Point& pt) {

Powered by Google App Engine
This is Rietveld 408576698