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

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 150142)
+++ chrome/browser/translate/translate_manager.cc (working copy)
@@ -335,8 +335,11 @@
load_details->type != content::NAVIGATION_TYPE_SAME_PAGE) {
return;
}
- // When doing a page reload, we don't get a TAB_LANGUAGE_DETERMINED
- // notification. So we need to explictly initiate the translation.
+ // When doing a page reload, TAB_LANGUAGE_DETERMINED is not sent,
+ // so the translation needs to be explicitly initiated, but only when the
+ // page is translatable.
+ 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