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

Side by Side Diff: chrome/app/chrome_main.cc

Issue 6347045: linux: set LC_NUMERIC to C for all non-browser processes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/zygote_main_linux.cc » ('j') | chrome/browser/zygote_main_linux.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "app/app_paths.h" 5 #include "app/app_paths.h"
6 #include "app/app_switches.h" 6 #include "app/app_switches.h"
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "base/i18n/icu_util.h" 10 #include "base/i18n/icu_util.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 void CommonSubprocessInit() { 366 void CommonSubprocessInit() {
367 #if defined(OS_WIN) 367 #if defined(OS_WIN)
368 // HACK: Let Windows know that we have started. This is needed to suppress 368 // HACK: Let Windows know that we have started. This is needed to suppress
369 // the IDC_APPSTARTING cursor from being displayed for a prolonged period 369 // the IDC_APPSTARTING cursor from being displayed for a prolonged period
370 // while a subprocess is starting. 370 // while a subprocess is starting.
371 PostThreadMessage(GetCurrentThreadId(), WM_NULL, 0, 0); 371 PostThreadMessage(GetCurrentThreadId(), WM_NULL, 0, 0);
372 MSG msg; 372 MSG msg;
373 PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); 373 PeekMessage(&msg, NULL, 0, 0, PM_REMOVE);
374 #endif 374 #endif
375 #if defined(OS_POSIX) && !defined(OS_MACOSX)
376 // Various things break when you're using a locale where the decimal
377 // separator isn't a period. See e.g. bugs 22782 and 39964. For
378 // all processes except the browser process (where we call system
379 // APIs that may rely on the correct locale for formatting numbers
380 // when presenting them to the user), reset the locale for numeric
381 // formatting.
382 // Note that this is not correct for plugin processes -- they can
383 // surface UI -- but it's likely they get this wrong too so why not.
384 setlocale(LC_NUMERIC, "C");
piman 2011/01/31 23:11:01 I'm not sure setting it for plugins is a good idea
385 #endif
375 } 386 }
376 387
377 // Returns true if this subprocess type needs the ResourceBundle initialized 388 // Returns true if this subprocess type needs the ResourceBundle initialized
378 // and resources loaded. 389 // and resources loaded.
379 bool SubprocessNeedsResourceBundle(const std::string& process_type) { 390 bool SubprocessNeedsResourceBundle(const std::string& process_type) {
380 return 391 return
381 #if defined(OS_WIN) || defined(OS_MACOSX) 392 #if defined(OS_WIN) || defined(OS_MACOSX)
382 // Windows needs resources for the default/null plugin. 393 // Windows needs resources for the default/null plugin.
383 // Mac needs them for the plugin process name. 394 // Mac needs them for the plugin process name.
384 process_type == switches::kPluginProcess || 395 process_type == switches::kPluginProcess ||
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 934
924 int exit_code = RunNamedProcessTypeMain(process_type, main_params); 935 int exit_code = RunNamedProcessTypeMain(process_type, main_params);
925 936
926 if (SubprocessNeedsResourceBundle(process_type)) 937 if (SubprocessNeedsResourceBundle(process_type))
927 ResourceBundle::CleanupSharedInstance(); 938 ResourceBundle::CleanupSharedInstance();
928 939
929 LowLevelShutdown(); 940 LowLevelShutdown();
930 941
931 return exit_code; 942 return exit_code;
932 } 943 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/zygote_main_linux.cc » ('j') | chrome/browser/zygote_main_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698