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

Unified Diff: net/socket/ssl_test_util.cc

Issue 558008: Use the USE_NSS macro to help porting to FreeBSD, OpenBSD, etc.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/des.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_test_util.cc
===================================================================
--- net/socket/ssl_test_util.cc (revision 37224)
+++ net/socket/ssl_test_util.cc (working copy)
@@ -2,18 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "net/socket/ssl_test_util.h"
+
#include <algorithm>
#include <string>
#include <vector>
-#include "net/socket/ssl_test_util.h"
-
#include "build/build_config.h"
#if defined(OS_WIN)
#include <windows.h>
#include <wincrypt.h>
-#elif defined(OS_LINUX)
+#elif defined(USE_NSS)
#include <nspr.h>
#include <nss.h>
#include <secerr.h>
@@ -44,7 +44,7 @@
namespace {
-#if defined(OS_LINUX)
+#if defined(USE_NSS)
static CERTCertificate* LoadTemporaryCert(const FilePath& filename) {
base::EnsureNSSInit();
@@ -138,7 +138,7 @@
forking_(false),
connection_attempts_(kDefaultTestConnectionAttempts),
connection_timeout_(kDefaultTestConnectionTimeout)
-#if defined(OS_LINUX)
+#if defined(USE_NSS)
, cert_(NULL)
#endif
{
@@ -151,7 +151,7 @@
forking_(false),
connection_attempts_(connection_attempts),
connection_timeout_(connection_timeout)
-#if defined(OS_LINUX)
+#if defined(USE_NSS)
, cert_(NULL)
#endif
{
@@ -353,7 +353,7 @@
}
TestServerLauncher::~TestServerLauncher() {
-#if defined(OS_LINUX)
+#if defined(USE_NSS)
if (cert_)
CERT_DestroyCertificate(reinterpret_cast<CERTCertificate*>(cert_));
#elif defined(OS_MACOSX)
@@ -381,7 +381,7 @@
}
bool TestServerLauncher::LoadTestRootCert() {
-#if defined(OS_LINUX)
+#if defined(USE_NSS)
if (cert_)
return true;
« no previous file with comments | « net/http/des.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698