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

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

Issue 2819793002: Translate: do not show the context menu entry when the feature is disabled (Closed)
Patch Set: some more include path changes for ios/android Created 3 years, 8 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 | « components/translate/core/browser/translate_prefs.h ('k') | components/translate/core/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_prefs.cc
diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc
index 63d758b0aa7b2f54b7063ed5fb4c2a702674ec41..92391c564570ddbaf0df417150a56049bb43e778 100644
--- a/components/translate/core/browser/translate_prefs.cc
+++ b/components/translate/core/browser/translate_prefs.cc
@@ -17,6 +17,7 @@
#include "components/translate/core/browser/translate_accept_languages.h"
#include "components/translate/core/browser/translate_download_manager.h"
#include "components/translate/core/browser/translate_experiment.h"
+#include "components/translate/core/browser/translate_pref_names.h"
#include "components/translate/core/common/translate_util.h"
namespace translate {
@@ -160,6 +161,10 @@ TranslatePrefs::TranslatePrefs(PrefService* user_prefs,
#endif
}
+bool TranslatePrefs::IsEnabled() const {
+ return prefs_->GetBoolean(prefs::kEnableTranslate);
+}
+
void TranslatePrefs::SetCountry(const std::string& country) {
country_ = country;
}
« no previous file with comments | « components/translate/core/browser/translate_prefs.h ('k') | components/translate/core/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698