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

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

Issue 6185005: NSS: don't set environment variables when multi-threaded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 11 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 | « base/nss_util.cc ('k') | no next file » | no next file with comments »
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 "app/resource_bundle.h" 7 #include "app/resource_bundle.h"
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
11 #include "base/i18n/icu_util.h" 11 #include "base/i18n/icu_util.h"
12 #include "base/mac/scoped_nsautorelease_pool.h" 12 #include "base/mac/scoped_nsautorelease_pool.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/metrics/stats_counters.h" 14 #include "base/metrics/stats_counters.h"
15 #include "base/metrics/stats_table.h" 15 #include "base/metrics/stats_table.h"
16 #include "base/nss_util.h"
16 #include "base/path_service.h" 17 #include "base/path_service.h"
17 #include "base/process_util.h" 18 #include "base/process_util.h"
18 #include "base/string_number_conversions.h" 19 #include "base/string_number_conversions.h"
19 #include "base/string_util.h" 20 #include "base/string_util.h"
20 #include "base/utf_string_conversions.h" 21 #include "base/utf_string_conversions.h"
21 #include "build/build_config.h" 22 #include "build/build_config.h"
22 #include "chrome/browser/defaults.h" 23 #include "chrome/browser/defaults.h"
23 #include "chrome/browser/diagnostics/diagnostics_main.h" 24 #include "chrome/browser/diagnostics/diagnostics_main.h"
24 #include "chrome/browser/platform_util.h" 25 #include "chrome/browser/platform_util.h"
25 #include "chrome/browser/renderer_host/render_process_host.h" 26 #include "chrome/browser/renderer_host/render_process_host.h"
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 // 704 //
704 // Note that we *can't* rely on BeingDebugged to catch this case because we 705 // Note that we *can't* rely on BeingDebugged to catch this case because we
705 // are the child process, which is not being debugged. 706 // are the child process, which is not being debugged.
706 // TODO(evanm): move this to some shared subprocess-init function. 707 // TODO(evanm): move this to some shared subprocess-init function.
707 if (!base::debug::BeingDebugged()) 708 if (!base::debug::BeingDebugged())
708 signal(SIGINT, SIG_IGN); 709 signal(SIGINT, SIG_IGN);
709 #endif 710 #endif
710 } 711 }
711 SetupCRT(command_line); 712 SetupCRT(command_line);
712 713
714 #if defined(USE_NSS)
715 base::EarlySetupForNSSInit();
716 #endif
717
713 // Initialize the Chrome path provider. 718 // Initialize the Chrome path provider.
714 app::RegisterPathProvider(); 719 app::RegisterPathProvider();
715 chrome::RegisterPathProvider(); 720 chrome::RegisterPathProvider();
716 721
717 // Notice a user data directory override if any 722 // Notice a user data directory override if any
718 const FilePath user_data_dir = 723 const FilePath user_data_dir =
719 command_line.GetSwitchValuePath(switches::kUserDataDir); 724 command_line.GetSwitchValuePath(switches::kUserDataDir);
720 if (!user_data_dir.empty()) 725 if (!user_data_dir.empty())
721 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); 726 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir));
722 727
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 918
914 int exit_code = RunNamedProcessTypeMain(process_type, main_params); 919 int exit_code = RunNamedProcessTypeMain(process_type, main_params);
915 920
916 if (SubprocessNeedsResourceBundle(process_type)) 921 if (SubprocessNeedsResourceBundle(process_type))
917 ResourceBundle::CleanupSharedInstance(); 922 ResourceBundle::CleanupSharedInstance();
918 923
919 LowLevelShutdown(); 924 LowLevelShutdown();
920 925
921 return exit_code; 926 return exit_code;
922 } 927 }
OLDNEW
« no previous file with comments | « base/nss_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698