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

Unified Diff: chrome/browser/translate/translate_manager.cc

Issue 10827183: Don't show the translate bar when refreshing a page with the notranslate content tag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager.cc
===================================================================
--- chrome/browser/translate/translate_manager.cc (revision 143384)
+++ chrome/browser/translate/translate_manager.cc (working copy)
@@ -335,7 +335,10 @@
return;
}
// When doing a page reload, we don't get a TAB_LANGUAGE_DETERMINED
James Hawkins 2012/08/07 00:49:13 Drive-by optional nit: Don't use pronouns (we) in
MAD 2012/08/07 01:25:04 Done.
- // notification. So we need to explictly initiate the translation.
+ // notification. So we need to explicitly initiate the translation.
+ // At least when the page is indeed translatable.
James Hawkins 2012/08/07 00:49:13 Grammar nit: Sentence fragment.
MAD 2012/08/07 01:25:04 Done.
+ if (!helper->language_state().page_translatable())
+ return;
// Note that we delay it as the TranslateManager gets this notification
// before the WebContents and the WebContents processing might remove the
// current infobars. Since InitTranslation might add an infobar, it must
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698