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

Unified Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 11116008: Flapper has some additional environment expectations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_plugin_main.cc
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
index ed6897788717739452b8da4b550fad28bcaea45a..ec4d6b5fd9419a9674d302cf1e75bb74f855ce49 100644
--- a/content/ppapi_plugin/ppapi_plugin_main.cc
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdlib.h>
+
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/i18n/rtl.h"
@@ -53,6 +55,9 @@ int PpapiPluginMain(const content::MainFunctionParams& parameters) {
if (command_line.HasSwitch(switches::kLang)) {
std::string locale = command_line.GetSwitchValueASCII(switches::kLang);
base::i18n::SetICUDefaultLocale(locale);
+ std::replace(locale.begin(), locale.end(), '-', '_');
+ setlocale(LC_ALL, locale.c_str());
+ setenv("LANG", locale.c_str(), 0);
brettw 2012/10/12 05:50:53 Can you add a comment about why this is needed?
Scott Hess - ex-Googler 2012/10/12 06:15:05 Done. I'll poke around tomorrow morning and see i
}
MessageLoop main_message_loop;
« 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