Index: content/browser/zygote_main_linux.cc |
diff --git a/content/browser/zygote_main_linux.cc b/content/browser/zygote_main_linux.cc |
index b56a8a05ef7c4170258f5a27ccac669c332e0c51..9cc3d98b70481f17a883ea987105a78a5be2c9e5 100644 |
--- a/content/browser/zygote_main_linux.cc |
+++ b/content/browser/zygote_main_linux.cc |
@@ -601,19 +601,12 @@ static void PreSandboxInit() { |
if (PathService::Get(base::DIR_MODULE, &module_path)) |
media::InitializeMediaLibrary(module_path); |
- // Remoting requires NSS to function properly. It is not used for other |
- // reasons so load NSS only if remoting is enabled. |
- const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kEnableRemoting)) { |
- // We are going to fork to engage the sandbox and we have not loaded |
- // any security modules so it is safe to disable the fork check in NSS. |
- base::DisableNSSForkCheck(); |
- |
- // Initialize NSS so that we load the necessary library files |
- // before we enter the sandbox. |
- base::ForceNSSNoDBInit(); |
- base::EnsureNSSInit(); |
- } |
+ // NSS libraries are loaded before sandbox is activated. This is to allow |
+ // successful initialization of NSS which tries to load extra library files. |
+ // Doing so will allow NSS to be used within sandbox for chromoting. |
+#if defined(USE_NSS) |
+ base::LoadNSSLibraries(); |
+#endif |
// Ensure access to the Pepper plugins before the sandbox is turned on. |
PepperPluginRegistry::PreloadModules(); |