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

Unified Diff: webrtc/base/proxyserver.h

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules Created 3 years, 6 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 | « webrtc/base/proxyinfo.cc ('k') | webrtc/base/proxyserver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/proxyserver.h
diff --git a/webrtc/base/proxyserver.h b/webrtc/base/proxyserver.h
index 86007c3606fc33443cdbc63c3c1916493a047686..1bf580ad70a0b1e6e15242f5db9baa0c394c21ee 100644
--- a/webrtc/base/proxyserver.h
+++ b/webrtc/base/proxyserver.h
@@ -11,90 +11,9 @@
#ifndef WEBRTC_BASE_PROXYSERVER_H_
#define WEBRTC_BASE_PROXYSERVER_H_
-#include <list>
-#include <memory>
-#include "webrtc/base/asyncsocket.h"
-#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/socketadapters.h"
-#include "webrtc/base/socketaddress.h"
-#include "webrtc/base/stream.h"
-namespace rtc {
-
-class SocketFactory;
-
-// ProxyServer is a base class that allows for easy construction of proxy
-// servers. With its helper class ProxyBinding, it contains all the necessary
-// logic for receiving and bridging connections. The specific client-server
-// proxy protocol is implemented by an instance of the AsyncProxyServerSocket
-// class; children of ProxyServer implement WrapSocket appropriately to return
-// the correct protocol handler.
-
-class ProxyBinding : public sigslot::has_slots<> {
- public:
- ProxyBinding(AsyncProxyServerSocket* in_socket, AsyncSocket* out_socket);
- ~ProxyBinding() override;
- sigslot::signal1<ProxyBinding*> SignalDestroyed;
-
- private:
- void OnConnectRequest(AsyncProxyServerSocket* socket,
- const SocketAddress& addr);
- void OnInternalRead(AsyncSocket* socket);
- void OnInternalWrite(AsyncSocket* socket);
- void OnInternalClose(AsyncSocket* socket, int err);
- void OnExternalConnect(AsyncSocket* socket);
- void OnExternalRead(AsyncSocket* socket);
- void OnExternalWrite(AsyncSocket* socket);
- void OnExternalClose(AsyncSocket* socket, int err);
-
- static void Read(AsyncSocket* socket, FifoBuffer* buffer);
- static void Write(AsyncSocket* socket, FifoBuffer* buffer);
- void Destroy();
-
- static const int kBufferSize = 4096;
- std::unique_ptr<AsyncProxyServerSocket> int_socket_;
- std::unique_ptr<AsyncSocket> ext_socket_;
- bool connected_;
- FifoBuffer out_buffer_;
- FifoBuffer in_buffer_;
- RTC_DISALLOW_COPY_AND_ASSIGN(ProxyBinding);
-};
-
-class ProxyServer : public sigslot::has_slots<> {
- public:
- ProxyServer(SocketFactory* int_factory, const SocketAddress& int_addr,
- SocketFactory* ext_factory, const SocketAddress& ext_ip);
- ~ProxyServer() override;
-
- // Returns the address to which the proxy server is bound
- SocketAddress GetServerAddress();
-
- protected:
- void OnAcceptEvent(AsyncSocket* socket);
- virtual AsyncProxyServerSocket* WrapSocket(AsyncSocket* socket) = 0;
- void OnBindingDestroyed(ProxyBinding* binding);
-
- private:
- typedef std::list<ProxyBinding*> BindingList;
- SocketFactory* ext_factory_;
- SocketAddress ext_ip_;
- std::unique_ptr<AsyncSocket> server_socket_;
- BindingList bindings_;
- RTC_DISALLOW_COPY_AND_ASSIGN(ProxyServer);
-};
-
-// SocksProxyServer is a simple extension of ProxyServer to implement SOCKS.
-class SocksProxyServer : public ProxyServer {
- public:
- SocksProxyServer(SocketFactory* int_factory, const SocketAddress& int_addr,
- SocketFactory* ext_factory, const SocketAddress& ext_ip)
- : ProxyServer(int_factory, int_addr, ext_factory, ext_ip) {
- }
- protected:
- AsyncProxyServerSocket* WrapSocket(AsyncSocket* socket) override;
- RTC_DISALLOW_COPY_AND_ASSIGN(SocksProxyServer);
-};
-
-} // namespace rtc
+// This header is deprecated and is just left here temporarily during
+// refactoring. See https://bugs.webrtc.org/7634 for more details.
+#include "webrtc/rtc_base/proxyserver.h"
#endif // WEBRTC_BASE_PROXYSERVER_H_
« no previous file with comments | « webrtc/base/proxyinfo.cc ('k') | webrtc/base/proxyserver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698