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

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

Issue 1525203003: [Translate] Factor out access to Accept-Languages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@translate-manager-unit
Patch Set: Created 5 years 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') | 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_prefs.cc
diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc
index d02dddebff5796430a65b45d0747232107a4666a..595a8e1bf4c458b6e462b745e47724f019cbb9b2 100644
--- a/components/translate/core/browser/translate_prefs.cc
+++ b/components/translate/core/browser/translate_prefs.cc
@@ -372,6 +372,15 @@ void TranslatePrefs::GetLanguageList(std::vector<std::string>* languages) {
base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
}
+void TranslatePrefs::GetAcceptLanguageList(
groby-ooo-7-16 2015/12/16 02:48:26 Since GetAcceptLanguageList is only used by Transl
+ std::vector<std::string>* languages) const {
+ DCHECK(languages);
+ DCHECK(languages->empty());
+
+ *languages = base::SplitString(prefs_->GetString(accept_languages_pref_), ",",
+ base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+}
+
void TranslatePrefs::UpdateLanguageList(
const std::vector<std::string>& languages) {
#if defined(OS_CHROMEOS)
« no previous file with comments | « components/translate/core/browser/translate_prefs.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698