Commit b206a6bd authored by generatedunixname89002005287564's avatar generatedunixname89002005287564 Committed by Facebook Github Bot

Remove dead includes in folly/io

Reviewed By: yfeldblum

Differential Revision: D19641278

fbshipit-source-id: 2631056c6852de3b1e8b972e8b20b26283ea1070
parent 2498dba8
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#include <folly/detail/FileUtilDetail.h> #include <folly/detail/FileUtilDetail.h>
#include <folly/io/async/AsyncSocketException.h> #include <folly/io/async/AsyncSocketException.h>
using folly::IOBuf;
using folly::IOBufQueue;
using std::string; using std::string;
using std::unique_ptr; using std::unique_ptr;
......
...@@ -36,24 +36,13 @@ ...@@ -36,24 +36,13 @@
#include <folly/lang/Bits.h> #include <folly/lang/Bits.h>
#include <folly/portability/OpenSSL.h> #include <folly/portability/OpenSSL.h>
using folly::SocketAddress;
using folly::SSLContext;
using std::shared_ptr; using std::shared_ptr;
using std::string;
using folly::Endian;
using folly::IOBuf;
using folly::SpinLock; using folly::SpinLock;
using folly::SpinLockGuard;
using folly::io::Cursor; using folly::io::Cursor;
using std::bind;
using std::unique_ptr;
namespace { namespace {
using folly::AsyncSocket;
using folly::AsyncSocketException;
using folly::AsyncSSLSocket; using folly::AsyncSSLSocket;
using folly::Optional;
using folly::SSLContext; using folly::SSLContext;
// For OpenSSL portability API // For OpenSSL portability API
using namespace folly::ssl; using namespace folly::ssl;
...@@ -1031,9 +1020,9 @@ bool AsyncSSLSocket::willBlock( ...@@ -1031,9 +1020,9 @@ bool AsyncSSLSocket::willBlock(
} }
if ((false if ((false
#ifdef SSL_ERROR_WANT_ASYNC // OpenSSL 1.1.0 Async API #ifdef SSL_ERROR_WANT_ASYNC // OpenSSL 1.1.0 Async API
|| error == SSL_ERROR_WANT_ASYNC || error == SSL_ERROR_WANT_ASYNC
#endif #endif
)) { )) {
// An asynchronous request has been kicked off. On completion, it will // An asynchronous request has been kicked off. On completion, it will
// invoke a callback to re-call handleAccept // invoke a callback to re-call handleAccept
sslState_ = STATE_ASYNC_PENDING; sslState_ = STATE_ASYNC_PENDING;
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
namespace folly { namespace folly {
// //
// For OpenSSL portability API // For OpenSSL portability API
using namespace folly::ssl;
// SSLContext implementation // SSLContext implementation
SSLContext::SSLContext(SSLVersion version) { SSLContext::SSLContext(SSLVersion version) {
...@@ -518,9 +517,9 @@ bool SSLContext::setRandomizedAdvertisedNextProtocols( ...@@ -518,9 +517,9 @@ bool SSLContext::setRandomizedAdvertisedNextProtocols(
// Note that this function reverses the typical return value convention // Note that this function reverses the typical return value convention
// of openssl and returns 0 on success. // of openssl and returns 0 on success.
return SSL_CTX_set_alpn_protos( return SSL_CTX_set_alpn_protos(
ctx_, ctx_,
advertisedNextProtocols_[0].protocols, advertisedNextProtocols_[0].protocols,
advertisedNextProtocols_[0].length) == 0; advertisedNextProtocols_[0].length) == 0;
} }
void SSLContext::deleteNextProtocolsStrings() { void SSLContext::deleteNextProtocolsStrings() {
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <folly/ssl/Init.h> #include <folly/ssl/Init.h>
#include <folly/ssl/OpenSSLCertUtils.h> #include <folly/ssl/OpenSSLCertUtils.h>
using namespace testing;
using namespace folly; using namespace folly;
using namespace folly::ssl; using namespace folly::ssl;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
#include <folly/portability/OpenSSL.h> #include <folly/portability/OpenSSL.h>
using namespace testing;
using namespace folly; using namespace folly;
TEST(SSLErrorsTest, TestMessage) { TEST(SSLErrorsTest, TestMessage) {
......
...@@ -57,10 +57,7 @@ ...@@ -57,10 +57,7 @@
using std::cerr; using std::cerr;
using std::endl; using std::endl;
using std::list;
using std::min;
using std::string; using std::string;
using std::vector;
using namespace testing; using namespace testing;
......
...@@ -28,10 +28,6 @@ ...@@ -28,10 +28,6 @@
using std::cerr; using std::cerr;
using std::endl; using std::endl;
using std::list;
using std::min;
using std::string;
using std::vector;
namespace folly { namespace folly {
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
using std::string;
using namespace testing; using namespace testing;
namespace folly { namespace folly {
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include <folly/portability/OpenSSL.h> #include <folly/portability/OpenSSL.h>
#include <folly/ssl/Init.h> #include <folly/ssl/Init.h>
using namespace testing;
namespace folly { namespace folly {
TEST(AsyncSocketException, SimpleTest) { TEST(AsyncSocketException, SimpleTest) {
......
...@@ -40,8 +40,6 @@ ...@@ -40,8 +40,6 @@
#include <memory> #include <memory>
#include <thread> #include <thread>
using std::cerr;
using std::endl;
using std::min; using std::min;
using std::string; using std::string;
using std::unique_ptr; using std::unique_ptr;
......
...@@ -32,7 +32,6 @@ using folly::AsyncUDPServerSocket; ...@@ -32,7 +32,6 @@ using folly::AsyncUDPServerSocket;
using folly::AsyncUDPSocket; using folly::AsyncUDPSocket;
using folly::EventBase; using folly::EventBase;
using folly::IOBuf; using folly::IOBuf;
using folly::SocketAddress;
using namespace testing; using namespace testing;
struct TestData { struct TestData {
......
...@@ -31,8 +31,6 @@ using folly::AsyncTimeout; ...@@ -31,8 +31,6 @@ using folly::AsyncTimeout;
using folly::AsyncUDPServerSocket; using folly::AsyncUDPServerSocket;
using folly::AsyncUDPSocket; using folly::AsyncUDPSocket;
using folly::EventBase; using folly::EventBase;
using folly::IOBuf;
using folly::SocketAddress;
using namespace testing; using namespace testing;
using SizeVec = std::vector<size_t>; using SizeVec = std::vector<size_t>;
......
...@@ -34,7 +34,6 @@ using folly::AsyncUDPServerSocket; ...@@ -34,7 +34,6 @@ using folly::AsyncUDPServerSocket;
using folly::AsyncUDPSocket; using folly::AsyncUDPSocket;
using folly::errnoStr; using folly::errnoStr;
using folly::EventBase; using folly::EventBase;
using folly::IOBuf;
using folly::SocketAddress; using folly::SocketAddress;
using namespace testing; using namespace testing;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
using namespace folly; using namespace folly;
using namespace testing;
class Derived : public DestructorCheck {}; class Derived : public DestructorCheck {};
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <folly/synchronization/Baton.h> #include <folly/synchronization/Baton.h>
#include <folly/system/ThreadName.h> #include <folly/system/ThreadName.h>
using namespace std;
using namespace std::chrono; using namespace std::chrono;
using namespace folly; using namespace folly;
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <folly/io/async/test/SSLUtil.h> #include <folly/io/async/test/SSLUtil.h>
using namespace std; using namespace std;
using namespace testing;
namespace folly { namespace folly {
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <folly/io/async/test/SSLUtil.h> #include <folly/io/async/test/SSLUtil.h>
using namespace std; using namespace std;
using namespace testing;
namespace folly { namespace folly {
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include <memory> #include <memory>
using namespace std;
using namespace testing;
using folly::ssl::SSLSession; using folly::ssl::SSLSession;
namespace folly { namespace folly {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include <folly/portability/GMock.h> #include <folly/portability/GMock.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
using namespace testing;
using testing::_; using testing::_;
namespace folly { namespace folly {
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
//#include <folly/io/async/test/MockAsyncTransport.h> //#include <folly/io/async/test/MockAsyncTransport.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
using namespace testing;
namespace folly { namespace folly {
TEST(WriteFlagsTest, isSet) { TEST(WriteFlagsTest, isSet) {
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <folly/io/async/test/ZeroCopy.h> #include <folly/io/async/test/ZeroCopy.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
using namespace testing;
using namespace folly; using namespace folly;
static auto constexpr kMaxLoops = 20; static auto constexpr kMaxLoops = 20;
......
...@@ -23,10 +23,7 @@ ...@@ -23,10 +23,7 @@
DECLARE_bool(benchmark); DECLARE_bool(benchmark);
using folly::ByteRange;
using folly::format;
using folly::IOBuf; using folly::IOBuf;
using folly::StringPiece;
using std::unique_ptr; using std::unique_ptr;
using namespace folly::io; using namespace folly::io;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
using folly::ByteRange; using folly::ByteRange;
using folly::fbstring; using folly::fbstring;
using folly::fbvector;
using folly::IOBuf; using folly::IOBuf;
using folly::ordering; using folly::ordering;
using folly::StringPiece; using folly::StringPiece;
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
using folly::IOBuf; using folly::IOBuf;
using std::unique_ptr; using std::unique_ptr;
using namespace folly::io;
using namespace std; using namespace std;
size_t buf_size = 0; size_t buf_size = 0;
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#include <folly/net/NetworkSocket.h> #include <folly/net/NetworkSocket.h>
#include <folly/portability/GTest.h> #include <folly/portability/GTest.h>
using folly::ShutdownSocketSet;
namespace folly { namespace folly {
namespace test { namespace test {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment