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

Unified Diff: chrome/browser/dom_ui/tips_handler.cc

Issue 258037: Fix tips in OS X to respect system language settings instead of locale.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
Index: chrome/browser/dom_ui/tips_handler.cc
===================================================================
--- chrome/browser/dom_ui/tips_handler.cc (revision 28155)
+++ chrome/browser/dom_ui/tips_handler.cc (working copy)
@@ -28,7 +28,7 @@
}
void TipsHandler::HandleGetTips(const Value* content) {
- // List containing the tips to be displayed.
+ // List containing the tips to be displayed.
ListValue list_value;
// Holds the web resource data found in the preferences cache.
@@ -38,15 +38,15 @@
int current_tip_index;
std::string current_tip;
- // If tips are not correct for our locale, do not send. Wait for update.
+ // If tips are not correct for our language, do not send. Wait for update.
// We need to check here because the new tab page calls for tips before
// the tip service starts up.
PrefService* current_prefs = dom_ui_->GetProfile()->GetPrefs();
if (current_prefs->HasPrefPath(prefs::kNTPTipsServer)) {
std::wstring server = current_prefs->GetString(prefs::kNTPTipsServer);
- std::wstring locale = ASCIIToWide(
- g_browser_process->GetApplicationLocale());
- if (!EndsWith(server, locale, false)) {
+ std::wstring tips_language = WebResourceService::GetWebResourceLanguage(
+ current_prefs);
+ if (!EndsWith(server, tips_language, false)) {
dom_ui_->CallJavascriptFunction(L"tips", list_value);
return;
}
« no previous file with comments | « no previous file | chrome/browser/web_resource/web_resource_service.h » ('j') | chrome/browser/web_resource/web_resource_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698