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

Unified Diff: components/translate/core/browser/translate_manager.cc

Issue 1966443003: Call SetTranslateEnable(true) in the 2016Q2 UI even it is blocked language or blocked URL so Omniba… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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: components/translate/core/browser/translate_manager.cc
diff --git a/components/translate/core/browser/translate_manager.cc b/components/translate/core/browser/translate_manager.cc
index 5515c1ab666ef5a71482c6aae11fd12a83fda61b..2524c228d532dedb9bb91dba669d801fa0dd52e7 100644
--- a/components/translate/core/browser/translate_manager.cc
+++ b/components/translate/core/browser/translate_manager.cc
@@ -161,6 +161,12 @@ void TranslateManager::InitiateTranslation(const std::string& page_lang) {
return;
}
+ // In the 2016Q2 UI, enable the translate in language state once we reach
+ // the above check and let omnibar to display the translate icon.
+ if (base::FeatureList::IsEnabled(kTranslateUI2016Q2)) {
+ language_state_.SetTranslateEnabled(true);
+ }
+
TranslateAcceptLanguages* accept_languages =
translate_client_->GetTranslateAcceptLanguages();
// Don't translate any user black-listed languages.
« 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