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

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

Issue 25531002: Move language detection to a component (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Run translate unittests on iOS Created 7 years, 2 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 | « chrome/browser/resources/translate.js ('k') | chrome/browser/translate/translate_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_accept_languages.cc
diff --git a/chrome/browser/translate/translate_accept_languages.cc b/chrome/browser/translate/translate_accept_languages.cc
index d05644762095b338be8799750099d6e823597bea..8099847b435d5dddf09fd6d804236497d1ada525 100644
--- a/chrome/browser/translate/translate_accept_languages.cc
+++ b/chrome/browser/translate/translate_accept_languages.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/translate/translate_manager.h"
#include "chrome/common/pref_names.h"
-#include "chrome/common/translate/translate_util.h"
+#include "components/translate/common/translate_util.h"
#include "content/public/browser/notification_source.h"
#include "net/url_request/url_fetcher.h"
#include "ui/base/l10n/l10n_util.h"
@@ -29,7 +29,7 @@ TranslateAcceptLanguages::~TranslateAcceptLanguages() {
bool TranslateAcceptLanguages::CanBeAcceptLanguage(
const std::string& language) {
std::string accept_language = language;
- TranslateUtil::ToChromeLanguageSynonym(&accept_language);
+ translate::ToChromeLanguageSynonym(&accept_language);
const std::string locale = g_browser_process->GetApplicationLocale();
std::vector<std::string> accept_language_codes;
@@ -73,7 +73,7 @@ bool TranslateAcceptLanguages::IsAcceptLanguage(Profile* profile,
}
std::string accept_language = language;
- TranslateUtil::ToChromeLanguageSynonym(&accept_language);
+ translate::ToChromeLanguageSynonym(&accept_language);
return iter->second.count(accept_language) != 0;
}
« no previous file with comments | « chrome/browser/resources/translate.js ('k') | chrome/browser/translate/translate_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698