summaryrefslogtreecommitdiffstats
path: root/security/nss/gtests/ssl_gtest/test_io.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/gtests/ssl_gtest/test_io.h')
-rw-r--r--security/nss/gtests/ssl_gtest/test_io.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/security/nss/gtests/ssl_gtest/test_io.h b/security/nss/gtests/ssl_gtest/test_io.h
index 062ae86c8..e262fb123 100644
--- a/security/nss/gtests/ssl_gtest/test_io.h
+++ b/security/nss/gtests/ssl_gtest/test_io.h
@@ -33,9 +33,11 @@ class PacketFilter {
CHANGE, // change the packet to a different value
DROP // drop the packet
};
- PacketFilter(bool enabled = true) : enabled_(enabled) {}
+ explicit PacketFilter(bool on = true) : enabled_(on) {}
virtual ~PacketFilter() {}
+ bool enabled() const { return enabled_; }
+
virtual Action Process(const DataBuffer& input, DataBuffer* output) {
if (!enabled_) {
return KEEP;
@@ -68,6 +70,8 @@ class DummyPrSocket : public DummyIOLayerMethods {
write_error_(0) {}
virtual ~DummyPrSocket() {}
+ static PRDescIdentity LayerId();
+
// Create a file descriptor that will reference this object. The fd must not
// live longer than this adapter; call PR_Close() before.
ScopedPRFileDesc CreateFD();