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

Unified Diff: chrome/renderer/render_process_impl.cc

Issue 6684018: Initialize NSS with no DB in the renderer process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed comments Created 9 years, 9 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
Index: chrome/renderer/render_process_impl.cc
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index e3ff26353c74abd28722076227a8178d97e83c5d..34f21388293fe0cdc45e1eec5d107619d380fdd6 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -19,6 +19,7 @@
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
+#include "base/nss_util.h"
#include "base/path_service.h"
#include "base/sys_info.h"
#include "base/utf_string_conversions.h"
@@ -159,6 +160,17 @@ RenderProcessImpl::RenderProcessImpl()
pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch);
}
#endif
+
+#if defined(OS_LINUX)
+ // Remoting requires NSS to function properly.
+ 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();
+ base::ForceNSSNoDBInit();
+ base::EnsureNSSInit();
+ }
+#endif
}
RenderProcessImpl::~RenderProcessImpl() {

Powered by Google App Engine
This is Rietveld 408576698