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

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
« base/nss_util.cc ('K') | « 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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
713 // Initialize the Chrome path provider. 714 // Initialize the Chrome path provider.
714 app::RegisterPathProvider(); 715 app::RegisterPathProvider();
715 chrome::RegisterPathProvider(); 716 chrome::RegisterPathProvider();
716 717
718 base::EarlyNSSInit();
wtc 2011/01/13 00:07:02 Nit: since EarlyNSSInit doesn't use the Chrome pat
719
717 // Notice a user data directory override if any 720 // Notice a user data directory override if any
718 const FilePath user_data_dir = 721 const FilePath user_data_dir =
719 command_line.GetSwitchValuePath(switches::kUserDataDir); 722 command_line.GetSwitchValuePath(switches::kUserDataDir);
720 if (!user_data_dir.empty()) 723 if (!user_data_dir.empty())
721 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); 724 CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir));
722 725
723 #if defined(OS_MACOSX) 726 #if defined(OS_MACOSX)
724 // TODO(mark): Right now, InitCrashReporter() needs to be called after 727 // TODO(mark): Right now, InitCrashReporter() needs to be called after
725 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Breakpad 728 // CommandLine::Init() and chrome::RegisterPathProvider(). Ideally, Breakpad
726 // initialization could occur sooner, preferably even before the framework 729 // initialization could occur sooner, preferably even before the framework
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 916
914 int exit_code = RunNamedProcessTypeMain(process_type, main_params); 917 int exit_code = RunNamedProcessTypeMain(process_type, main_params);
915 918
916 if (SubprocessNeedsResourceBundle(process_type)) 919 if (SubprocessNeedsResourceBundle(process_type))
917 ResourceBundle::CleanupSharedInstance(); 920 ResourceBundle::CleanupSharedInstance();
918 921
919 LowLevelShutdown(); 922 LowLevelShutdown();
920 923
921 return exit_code; 924 return exit_code;
922 } 925 }
OLDNEW
« base/nss_util.cc ('K') | « base/nss_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698