Cleanup: Remove DISALLOW_EVIL_CONSTRUCTORS macro.
Just use the less-evil version, DISALLOW_COPY_AND_ASSIGN macro. This should help with my TODO in https://chromium.googlesource.com/chromium/src/+/master/base/macros.h#33 Tested on Linux with the following command lines: $ rm -rf out/ $ gn gen //out/Debug --args='is_debug=true target_cpu="x64" build_with_chromium=false' $ ninja -C out/Debug BUG=None TEST=see above R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/50599004 Patch from Thiago Farina <tfarina@chromium.org>. Cr-Commit-Position: refs/heads/master@{#8927}
This commit is contained in:
parent
7351f4689c
commit
ae0f0ee79e
@ -130,7 +130,7 @@ class AsyncPacketSocket : public sigslot::has_slots<> {
|
||||
sigslot::signal2<AsyncPacketSocket*, AsyncPacketSocket*> SignalNewConnection;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncPacketSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncPacketSocket);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -74,7 +74,7 @@ class AsyncTCPSocketBase : public AsyncPacketSocket {
|
||||
char* inbuf_, * outbuf_;
|
||||
size_t insize_, inpos_, outsize_, outpos_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncTCPSocketBase);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncTCPSocketBase);
|
||||
};
|
||||
|
||||
class AsyncTCPSocket : public AsyncTCPSocketBase {
|
||||
@ -95,7 +95,7 @@ class AsyncTCPSocket : public AsyncTCPSocketBase {
|
||||
void HandleIncomingConnection(AsyncSocket* socket) override;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncTCPSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncTCPSocket);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -25,11 +25,6 @@
|
||||
TypeName(const TypeName&); \
|
||||
DISALLOW_ASSIGN(TypeName)
|
||||
|
||||
// Alternative, less-accurate legacy name.
|
||||
#undef DISALLOW_EVIL_CONSTRUCTORS
|
||||
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) \
|
||||
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
// A macro to disallow all the implicit constructors, namely the
|
||||
// default constructor, copy constructor and operator= functions.
|
||||
//
|
||||
@ -39,7 +34,7 @@
|
||||
#undef DISALLOW_IMPLICIT_CONSTRUCTORS
|
||||
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
||||
TypeName(); \
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TypeName)
|
||||
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
|
||||
#endif // WEBRTC_BASE_CONSTRUCTORMAGIC_H_
|
||||
|
@ -45,7 +45,7 @@ class FileLock {
|
||||
std::string path_;
|
||||
scoped_ptr<FileStream> file_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(FileLock);
|
||||
DISALLOW_COPY_AND_ASSIGN(FileLock);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -261,7 +261,7 @@ class WindowsCommandLineArguments {
|
||||
char **argv_;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(WindowsCommandLineArguments);
|
||||
DISALLOW_COPY_AND_ASSIGN(WindowsCommandLineArguments);
|
||||
};
|
||||
#endif // WEBRTC_WIN
|
||||
|
||||
|
@ -225,7 +225,7 @@ class LogMessage {
|
||||
// are we in diagnostic mode (as defined by the app)?
|
||||
static bool is_diagnostic_mode_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(LogMessage);
|
||||
DISALLOW_COPY_AND_ASSIGN(LogMessage);
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -90,7 +90,7 @@ class MacAsyncSocket : public AsyncSocket, public sigslot::has_slots<> {
|
||||
ConnState state_;
|
||||
AsyncResolver* resolver_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(MacAsyncSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(MacAsyncSocket);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -40,7 +40,7 @@ class MacCocoaSocketServer : public MacBaseSocketServer {
|
||||
// The count of how many times we're inside the NSApplication main loop.
|
||||
int run_count_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(MacCocoaSocketServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(MacCocoaSocketServer);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -102,7 +102,7 @@ class NATServer : public sigslot::has_slots<> {
|
||||
AsyncSocket* tcp_server_socket_;
|
||||
InternalMap* int_map_;
|
||||
ExternalMap* ext_map_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NATServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(NATServer);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -54,7 +54,7 @@ class NATSocketFactory : public SocketFactory, public NATInternalSocketFactory {
|
||||
private:
|
||||
SocketFactory* factory_;
|
||||
SocketAddress nat_addr_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NATSocketFactory);
|
||||
DISALLOW_COPY_AND_ASSIGN(NATSocketFactory);
|
||||
};
|
||||
|
||||
// Creates sockets that will send traffic through a NAT depending on what
|
||||
@ -151,7 +151,7 @@ class NATSocketServer : public SocketServer, public NATInternalSocketFactory {
|
||||
SocketServer* server_;
|
||||
MessageQueue* msg_queue_;
|
||||
TranslatorMap nats_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NATSocketServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(NATSocketServer);
|
||||
};
|
||||
|
||||
// Free-standing NAT helper functions.
|
||||
|
@ -42,7 +42,7 @@ class NSSKeyPair {
|
||||
SECKEYPrivateKey* privkey_;
|
||||
SECKEYPublicKey* pubkey_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NSSKeyPair);
|
||||
DISALLOW_COPY_AND_ASSIGN(NSSKeyPair);
|
||||
};
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ class NSSCertificate : public SSLCertificate {
|
||||
CERTCertificate* certificate_;
|
||||
scoped_ptr<SSLCertChain> chain_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NSSCertificate);
|
||||
DISALLOW_COPY_AND_ASSIGN(NSSCertificate);
|
||||
};
|
||||
|
||||
// Represents a SSL key pair and certificate for NSS.
|
||||
@ -116,7 +116,7 @@ class NSSIdentity : public SSLIdentity {
|
||||
rtc::scoped_ptr<NSSKeyPair> keypair_;
|
||||
rtc::scoped_ptr<NSSCertificate> certificate_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(NSSIdentity);
|
||||
DISALLOW_COPY_AND_ASSIGN(NSSIdentity);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -45,7 +45,7 @@ class OpenSSLKeyPair {
|
||||
|
||||
EVP_PKEY* pkey_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(OpenSSLKeyPair);
|
||||
DISALLOW_COPY_AND_ASSIGN(OpenSSLKeyPair);
|
||||
};
|
||||
|
||||
// OpenSSLCertificate encapsulates an OpenSSL X509* certificate object,
|
||||
@ -92,7 +92,7 @@ class OpenSSLCertificate : public SSLCertificate {
|
||||
|
||||
X509* x509_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(OpenSSLCertificate);
|
||||
DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate);
|
||||
};
|
||||
|
||||
// Holds a keypair and certificate together, and a method to generate
|
||||
@ -119,7 +119,7 @@ class OpenSSLIdentity : public SSLIdentity {
|
||||
scoped_ptr<OpenSSLKeyPair> key_pair_;
|
||||
scoped_ptr<OpenSSLCertificate> certificate_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(OpenSSLIdentity);
|
||||
DISALLOW_COPY_AND_ASSIGN(OpenSSLIdentity);
|
||||
};
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ class ProxyBinding : public sigslot::has_slots<> {
|
||||
bool connected_;
|
||||
FifoBuffer out_buffer_;
|
||||
FifoBuffer in_buffer_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ProxyBinding);
|
||||
DISALLOW_COPY_AND_ASSIGN(ProxyBinding);
|
||||
};
|
||||
|
||||
class ProxyServer : public sigslot::has_slots<> {
|
||||
@ -75,7 +75,7 @@ class ProxyServer : public sigslot::has_slots<> {
|
||||
SocketAddress ext_ip_;
|
||||
scoped_ptr<AsyncSocket> server_socket_;
|
||||
BindingList bindings_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ProxyServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(ProxyServer);
|
||||
};
|
||||
|
||||
// SocksProxyServer is a simple extension of ProxyServer to implement SOCKS.
|
||||
@ -87,7 +87,7 @@ class SocksProxyServer : public ProxyServer {
|
||||
}
|
||||
protected:
|
||||
AsyncProxyServerSocket* WrapSocket(AsyncSocket* socket) override;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SocksProxyServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(SocksProxyServer);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -50,7 +50,7 @@ class ScopedAutoreleasePool {
|
||||
|
||||
NSAutoreleasePool* pool_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ScopedAutoreleasePool);
|
||||
DISALLOW_COPY_AND_ASSIGN(ScopedAutoreleasePool);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -57,7 +57,7 @@ class SignalThreadTest : public testing::Test, public sigslot::has_slots<> {
|
||||
|
||||
private:
|
||||
SignalThreadTest* harness_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SlowSignalThread);
|
||||
DISALLOW_COPY_AND_ASSIGN(SlowSignalThread);
|
||||
};
|
||||
|
||||
void OnWorkComplete(rtc::SignalThread* thread) {
|
||||
@ -128,7 +128,7 @@ class OwnerThread : public Thread, public sigslot::has_slots<> {
|
||||
private:
|
||||
SignalThreadTest* harness_;
|
||||
bool has_run_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(OwnerThread);
|
||||
DISALLOW_COPY_AND_ASSIGN(OwnerThread);
|
||||
};
|
||||
|
||||
// Test for when the main thread goes away while the
|
||||
|
@ -180,7 +180,7 @@ class Socket {
|
||||
Socket() {}
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(Socket);
|
||||
DISALLOW_COPY_AND_ASSIGN(Socket);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -50,7 +50,7 @@ class BufferedReadAdapter : public AsyncSocketAdapter {
|
||||
char * buffer_;
|
||||
size_t buffer_size_, data_len_;
|
||||
bool buffering_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(BufferedReadAdapter);
|
||||
DISALLOW_COPY_AND_ASSIGN(BufferedReadAdapter);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -78,7 +78,7 @@ class AsyncSSLSocket : public BufferedReadAdapter {
|
||||
protected:
|
||||
void OnConnectEvent(AsyncSocket* socket) override;
|
||||
void ProcessInput(char* data, size_t* len) override;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncSSLSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncSSLSocket);
|
||||
};
|
||||
|
||||
// Implements a socket adapter that performs the server side of a
|
||||
@ -89,7 +89,7 @@ class AsyncSSLServerSocket : public BufferedReadAdapter {
|
||||
|
||||
protected:
|
||||
void ProcessInput(char* data, size_t* len) override;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncSSLServerSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncSSLServerSocket);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -137,7 +137,7 @@ class AsyncHttpsProxySocket : public BufferedReadAdapter {
|
||||
} state_;
|
||||
HttpAuthContext * context_;
|
||||
std::string unknown_mechanisms_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncHttpsProxySocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncHttpsProxySocket);
|
||||
};
|
||||
|
||||
/* TODO: Implement this.
|
||||
@ -148,7 +148,7 @@ class AsyncHttpsProxyServerSocket : public AsyncProxyServerSocket {
|
||||
private:
|
||||
virtual void ProcessInput(char * data, size_t& len);
|
||||
void Error(int error);
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncHttpsProxyServerSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncHttpsProxyServerSocket);
|
||||
};
|
||||
*/
|
||||
|
||||
@ -183,7 +183,7 @@ class AsyncSocksProxySocket : public BufferedReadAdapter {
|
||||
SocketAddress proxy_, dest_;
|
||||
std::string user_;
|
||||
CryptString pass_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncSocksProxySocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxySocket);
|
||||
};
|
||||
|
||||
// Implements a proxy server socket for the SOCKS protocol.
|
||||
@ -209,7 +209,7 @@ class AsyncSocksProxyServerSocket : public AsyncProxyServerSocket {
|
||||
SS_HELLO, SS_AUTH, SS_CONNECT, SS_CONNECT_PENDING, SS_TUNNEL, SS_ERROR
|
||||
};
|
||||
State state_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncSocksProxyServerSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncSocksProxyServerSocket);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -235,7 +235,7 @@ class LoggingSocketAdapter : public AsyncSocketAdapter {
|
||||
std::string label_;
|
||||
bool hex_mode_;
|
||||
LogMultilineState lms_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(LoggingSocketAdapter);
|
||||
DISALLOW_COPY_AND_ASSIGN(LoggingSocketAdapter);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -51,7 +51,7 @@ class SocketStream : public StreamInterface, public sigslot::has_slots<> {
|
||||
|
||||
AsyncSocket* socket_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SocketStream);
|
||||
DISALLOW_COPY_AND_ASSIGN(SocketStream);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -228,7 +228,7 @@ class StreamInterface : public MessageHandler {
|
||||
void OnMessage(Message* msg) override;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamInterface);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamInterface);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -305,7 +305,7 @@ class StreamAdapterInterface : public StreamInterface,
|
||||
private:
|
||||
StreamInterface* stream_;
|
||||
bool owned_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamAdapterInterface);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamAdapterInterface);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -337,7 +337,7 @@ class StreamTap : public StreamAdapterInterface {
|
||||
scoped_ptr<StreamInterface> tap_;
|
||||
StreamResult tap_result_;
|
||||
int tap_error_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamTap);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamTap);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -367,7 +367,7 @@ class StreamSegment : public StreamAdapterInterface {
|
||||
|
||||
private:
|
||||
size_t start_, pos_, length_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamSegment);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamSegment);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -445,7 +445,7 @@ class FileStream : public StreamInterface {
|
||||
FILE* file_;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(FileStream);
|
||||
DISALLOW_COPY_AND_ASSIGN(FileStream);
|
||||
};
|
||||
|
||||
// A stream that caps the output at a certain size, dropping content from the
|
||||
@ -517,7 +517,7 @@ class AsyncWriteStream : public StreamInterface {
|
||||
mutable CriticalSection crit_stream_;
|
||||
CriticalSection crit_buffer_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncWriteStream);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncWriteStream);
|
||||
};
|
||||
|
||||
|
||||
@ -592,7 +592,7 @@ class MemoryStreamBase : public StreamInterface {
|
||||
size_t seek_position_;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(MemoryStreamBase);
|
||||
DISALLOW_COPY_AND_ASSIGN(MemoryStreamBase);
|
||||
};
|
||||
|
||||
// MemoryStream dynamically resizes to accomodate written data.
|
||||
@ -690,7 +690,7 @@ class FifoBuffer : public StreamInterface {
|
||||
size_t read_position_; // offset to the readable data
|
||||
Thread* owner_; // stream callbacks are dispatched on this thread
|
||||
mutable CriticalSection crit_; // object lock
|
||||
DISALLOW_EVIL_CONSTRUCTORS(FifoBuffer);
|
||||
DISALLOW_COPY_AND_ASSIGN(FifoBuffer);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -721,7 +721,7 @@ class LoggingAdapter : public StreamAdapterInterface {
|
||||
bool hex_mode_;
|
||||
LogMultilineState lms_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(LoggingAdapter);
|
||||
DISALLOW_COPY_AND_ASSIGN(LoggingAdapter);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -804,7 +804,7 @@ class StreamReference : public StreamAdapterInterface {
|
||||
StreamInterface* stream_;
|
||||
int ref_count_;
|
||||
CriticalSection cs_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamRefCount);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamRefCount);
|
||||
};
|
||||
|
||||
// Constructor for adding references
|
||||
@ -812,7 +812,7 @@ class StreamReference : public StreamAdapterInterface {
|
||||
StreamInterface* stream);
|
||||
|
||||
StreamRefCount* stream_ref_count_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(StreamReference);
|
||||
DISALLOW_COPY_AND_ASSIGN(StreamReference);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -308,7 +308,7 @@ class AbortTask : public Task {
|
||||
return STATE_NEXT;
|
||||
}
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AbortTask);
|
||||
DISALLOW_COPY_AND_ASSIGN(AbortTask);
|
||||
};
|
||||
|
||||
class TaskAbortTest : public sigslot::has_slots<> {
|
||||
@ -333,7 +333,7 @@ class TaskAbortTest : public sigslot::has_slots<> {
|
||||
}
|
||||
|
||||
MyTaskRunner task_runner_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TaskAbortTest);
|
||||
DISALLOW_COPY_AND_ASSIGN(TaskAbortTest);
|
||||
};
|
||||
|
||||
TEST(start_task_test, Abort) {
|
||||
@ -363,7 +363,7 @@ class SetBoolOnDeleteTask : public Task {
|
||||
|
||||
private:
|
||||
bool* set_when_deleted_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SetBoolOnDeleteTask);
|
||||
DISALLOW_COPY_AND_ASSIGN(SetBoolOnDeleteTask);
|
||||
};
|
||||
|
||||
class AbortShouldWakeTest : public sigslot::has_slots<> {
|
||||
@ -396,7 +396,7 @@ class AbortShouldWakeTest : public sigslot::has_slots<> {
|
||||
}
|
||||
|
||||
MyTaskRunner task_runner_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AbortShouldWakeTest);
|
||||
DISALLOW_COPY_AND_ASSIGN(AbortShouldWakeTest);
|
||||
};
|
||||
|
||||
TEST(start_task_test, AbortShouldWake) {
|
||||
@ -477,7 +477,7 @@ class TimeoutChangeTest : public sigslot::has_slots<> {
|
||||
MyTaskRunner task_runner_;
|
||||
StuckTask* (stuck_tasks_[3]);
|
||||
int task_count_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TimeoutChangeTest);
|
||||
DISALLOW_COPY_AND_ASSIGN(TimeoutChangeTest);
|
||||
};
|
||||
|
||||
TEST(start_task_test, TimeoutChange) {
|
||||
@ -494,7 +494,7 @@ class DeleteTestTaskRunner : public TaskRunner {
|
||||
return GetCurrentTime();
|
||||
}
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(DeleteTestTaskRunner);
|
||||
DISALLOW_COPY_AND_ASSIGN(DeleteTestTaskRunner);
|
||||
};
|
||||
|
||||
TEST(unstarted_task_test, DeleteTask) {
|
||||
|
@ -53,7 +53,7 @@ class TaskParent {
|
||||
bool child_error_;
|
||||
typedef std::set<Task *> ChildSet;
|
||||
scoped_ptr<ChildSet> children_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TaskParent);
|
||||
DISALLOW_COPY_AND_ASSIGN(TaskParent);
|
||||
};
|
||||
|
||||
|
||||
|
@ -89,7 +89,7 @@ class TestClient : public sigslot::has_slots<> {
|
||||
AsyncPacketSocket* socket_;
|
||||
std::vector<Packet*>* packets_;
|
||||
bool ready_to_send_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TestClient);
|
||||
DISALLOW_COPY_AND_ASSIGN(TestClient);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -65,7 +65,7 @@ class TestEchoServer : public sigslot::has_slots<> {
|
||||
typedef std::list<AsyncTCPSocket*> ClientList;
|
||||
scoped_ptr<AsyncSocket> server_socket_;
|
||||
ClientList client_sockets_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TestEchoServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(TestEchoServer);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -230,7 +230,7 @@ class VirtualSocketServer : public SocketServer, public sigslot::has_slots<> {
|
||||
CriticalSection delay_crit_;
|
||||
|
||||
double drop_prob_;
|
||||
DISALLOW_EVIL_CONSTRUCTORS(VirtualSocketServer);
|
||||
DISALLOW_COPY_AND_ASSIGN(VirtualSocketServer);
|
||||
};
|
||||
|
||||
// Implements the socket interface using the virtual network. Packets are
|
||||
|
@ -329,7 +329,7 @@ class RegKey {
|
||||
// for unittest
|
||||
friend void RegKeyHelperFunctionsTest();
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(RegKey);
|
||||
DISALLOW_COPY_AND_ASSIGN(RegKey);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -139,7 +139,7 @@ class ProcessEnumerator : public ToolhelpEnumeratorBase<ToolhelpProcessTraits> {
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ProcessEnumerator);
|
||||
DISALLOW_COPY_AND_ASSIGN(ProcessEnumerator);
|
||||
};
|
||||
|
||||
class ToolhelpModuleTraits : public ToolhelpTraits {
|
||||
@ -164,7 +164,7 @@ class ModuleEnumerator : public ToolhelpEnumeratorBase<ToolhelpModuleTraits> {
|
||||
}
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(ModuleEnumerator);
|
||||
DISALLOW_COPY_AND_ASSIGN(ModuleEnumerator);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -59,7 +59,7 @@ class P2PTransportParser : public TransportParser {
|
||||
const std::string& username,
|
||||
ParseError* error);
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(P2PTransportParser);
|
||||
DISALLOW_COPY_AND_ASSIGN(P2PTransportParser);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -41,7 +41,7 @@ class RawTransportParser : public TransportParser {
|
||||
rtc::SocketAddress* addr,
|
||||
ParseError* error);
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(RawTransportParser);
|
||||
DISALLOW_COPY_AND_ASSIGN(RawTransportParser);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -106,7 +106,7 @@ class SecureTunnelSessionClient : public TunnelSessionClient {
|
||||
// and used for SSL authentication.
|
||||
rtc::scoped_ptr<rtc::SSLIdentity> identity_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SecureTunnelSessionClient);
|
||||
DISALLOW_COPY_AND_ASSIGN(SecureTunnelSessionClient);
|
||||
};
|
||||
|
||||
// SecureTunnelSession:
|
||||
@ -157,7 +157,7 @@ class SecureTunnelSession : public TunnelSession {
|
||||
// later.
|
||||
rtc::scoped_ptr<rtc::StreamReference> ssl_stream_reference_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(SecureTunnelSession);
|
||||
DISALLOW_COPY_AND_ASSIGN(SecureTunnelSession);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -67,7 +67,7 @@ class XmppClientInterface {
|
||||
virtual void RemoveXmppTask(XmppTask* task) = 0;
|
||||
sigslot::signal0<> SignalDisconnected;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(XmppClientInterface);
|
||||
DISALLOW_COPY_AND_ASSIGN(XmppClientInterface);
|
||||
};
|
||||
|
||||
// XmppTaskParentInterface is the interface require for any parent of
|
||||
@ -86,7 +86,7 @@ class XmppTaskParentInterface : public rtc::Task {
|
||||
|
||||
virtual XmppClientInterface* GetClient() = 0;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(XmppTaskParentInterface);
|
||||
DISALLOW_COPY_AND_ASSIGN(XmppTaskParentInterface);
|
||||
};
|
||||
|
||||
class XmppTaskBase : public XmppTaskParentInterface {
|
||||
@ -104,7 +104,7 @@ class XmppTaskBase : public XmppTaskParentInterface {
|
||||
protected:
|
||||
XmppTaskParentInterface* parent_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(XmppTaskBase);
|
||||
DISALLOW_COPY_AND_ASSIGN(XmppTaskBase);
|
||||
};
|
||||
|
||||
class XmppTask : public XmppTaskBase,
|
||||
|
@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
// This file overrides the inclusion of webrtc/base/constructormagic.h
|
||||
// We do this because constructor magic defines DISALLOW_EVIL_CONSTRUCTORS,
|
||||
// We do this because constructor magic defines DISALLOW_COPY_AND_ASSIGN,
|
||||
// but we want to use the version from Chromium.
|
||||
|
||||
#ifndef OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
|
||||
|
@ -42,7 +42,7 @@ class AsyncStunTCPSocket : public rtc::AsyncTCPSocketBase {
|
||||
size_t GetExpectedLength(const void* data, size_t len,
|
||||
int* pad_bytes);
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(AsyncStunTCPSocket);
|
||||
DISALLOW_COPY_AND_ASSIGN(AsyncStunTCPSocket);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -31,7 +31,7 @@ class P2PTransport : public Transport {
|
||||
|
||||
friend class P2PTransportChannel;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(P2PTransport);
|
||||
DISALLOW_COPY_AND_ASSIGN(P2PTransport);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -242,7 +242,7 @@ class P2PTransportChannel : public TransportChannelImpl,
|
||||
uint64 tiebreaker_;
|
||||
uint32 remote_candidate_generation_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(P2PTransportChannel);
|
||||
DISALLOW_COPY_AND_ASSIGN(P2PTransportChannel);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -50,7 +50,7 @@ class PacketSocketFactory {
|
||||
virtual AsyncResolverInterface* CreateAsyncResolver() = 0;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(PacketSocketFactory);
|
||||
DISALLOW_COPY_AND_ASSIGN(PacketSocketFactory);
|
||||
};
|
||||
|
||||
} // namespace rtc
|
||||
|
@ -36,7 +36,7 @@ class RawTransport : public Transport {
|
||||
private:
|
||||
friend class RawTransportChannel; // For ParseAddress.
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(RawTransport);
|
||||
DISALLOW_COPY_AND_ASSIGN(RawTransport);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -189,7 +189,7 @@ class RawTransportChannel : public TransportChannelImpl,
|
||||
// Handles a message to destroy unused ports.
|
||||
virtual void OnMessage(rtc::Message *msg);
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(RawTransportChannel);
|
||||
DISALLOW_COPY_AND_ASSIGN(RawTransportChannel);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -440,7 +440,7 @@ class Transport : public rtc::MessageHandler,
|
||||
// Protects changes to channels and messages
|
||||
rtc::CriticalSection crit_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(Transport);
|
||||
DISALLOW_COPY_AND_ASSIGN(Transport);
|
||||
};
|
||||
|
||||
// Extract a TransportProtocol from a TransportDescription.
|
||||
|
@ -150,7 +150,7 @@ class TransportChannel : public sigslot::has_slots<> {
|
||||
bool readable_;
|
||||
bool writable_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TransportChannel);
|
||||
DISALLOW_COPY_AND_ASSIGN(TransportChannel);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -102,7 +102,7 @@ class TransportChannelImpl : public TransportChannel {
|
||||
sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved;
|
||||
|
||||
private:
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TransportChannelImpl);
|
||||
DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
@ -88,7 +88,7 @@ class TransportChannelProxy : public TransportChannel,
|
||||
OptionList options_;
|
||||
std::vector<std::string> pending_srtp_ciphers_;
|
||||
|
||||
DISALLOW_EVIL_CONSTRUCTORS(TransportChannelProxy);
|
||||
DISALLOW_COPY_AND_ASSIGN(TransportChannelProxy);
|
||||
};
|
||||
|
||||
} // namespace cricket
|
||||
|
Loading…
x
Reference in New Issue
Block a user