Skip to content
Snippets Groups Projects
Commit 73a797fb authored by tfarina@chromium.org's avatar tfarina@chromium.org
Browse files

Get rid of DISALLOW_EVIL_CONSTRUCTORS macro usage in our code base.

TODO: Fix the remaining usages in third_party libraries and get rid of the macro in question.

BUG=None
TEST=trybots

Review URL: http://codereview.chromium.org/2657005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49032 0039d316-1c4b-4281-b951-d872f2087c98
parent 347dc0a1
No related branches found
No related tags found
No related merge requests found
Showing
with 40 additions and 39 deletions
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -82,6 +82,10 @@ const int64 kint64max = (( int64) GG_LONGLONG(0x7FFFFFFFFFFFFFFF));
void operator=(const TypeName&)
// An older, deprecated, politically incorrect name for the above.
// NOTE: The usage of this macro was baned from our code base, but some
// third_party libraries are yet using it.
// TODO(tfarina): Figure out how to fix the usage of this macro in the
// third_party libraries and get rid of it.
#define DISALLOW_EVIL_CONSTRUCTORS(TypeName) DISALLOW_COPY_AND_ASSIGN(TypeName)
// A macro to disallow all the implicit constructors, namely the
......
......@@ -49,7 +49,7 @@ namespace {
std::wstring test_data_directory_;
private:
DISALLOW_EVIL_CONSTRUCTORS(IconUtilTest);
DISALLOW_COPY_AND_ASSIGN(IconUtilTest);
};
};
......
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -69,9 +69,6 @@ typedef unsigned long long uint64;
TypeName(const TypeName&); \
void operator=(const TypeName&)
// An older, deprecated, politically incorrect name for the above.
#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.
//
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -146,7 +146,7 @@ class SyncChannel : public ChannelProxy,
// Used to signal events between the IPC and listener threads.
base::WaitableEventWatcher dispatch_watcher_;
DISALLOW_EVIL_CONSTRUCTORS(SyncChannel);
DISALLOW_COPY_AND_ASSIGN(SyncChannel);
};
} // namespace IPC
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -222,7 +222,7 @@ class Worker : public Channel::Listener, public Message::Sender {
base::WaitableEvent shutdown_event_;
DISALLOW_EVIL_CONSTRUCTORS(Worker);
DISALLOW_COPY_AND_ASSIGN(Worker);
};
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -136,7 +136,7 @@ class GZipFilter : public Filter {
// we don't get a valid gzip header.
bool possible_sdch_pass_through_;
DISALLOW_EVIL_CONSTRUCTORS(GZipFilter);
DISALLOW_COPY_AND_ASSIGN(GZipFilter);
};
#endif // NET_BASE_GZIP_FILTER_H__
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -48,7 +48,7 @@ class SSLConfigServiceMac : public SSLConfigService {
base::TimeTicks config_time_;
bool ever_updated_;
DISALLOW_EVIL_CONSTRUCTORS(SSLConfigServiceMac);
DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceMac);
};
} // namespace net
......
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -53,7 +53,7 @@ class SSLConfigServiceWin : public SSLConfigService {
base::TimeTicks config_time_;
bool ever_updated_;
DISALLOW_EVIL_CONSTRUCTORS(SSLConfigServiceWin);
DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceWin);
};
} // namespace net
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -55,7 +55,7 @@ private:
int iac_option_; // Last option read.
std::string command_line_;
DISALLOW_EVIL_CONSTRUCTORS(TelnetServer);
DISALLOW_COPY_AND_ASSIGN(TelnetServer);
};
#endif // NET_BASE_TELNET_SERVER_H_
......@@ -83,7 +83,7 @@ class UploadDataStream {
// Whether there is no data left to read.
bool eof_;
DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream);
DISALLOW_COPY_AND_ASSIGN(UploadDataStream);
};
} // namespace net
......
// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -84,7 +84,7 @@ class CleanupTask : public Task {
private:
FilePath path_;
std::string name_;
DISALLOW_EVIL_CONSTRUCTORS(CleanupTask);
DISALLOW_COPY_AND_ASSIGN(CleanupTask);
};
void CleanupTask::Run() {
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -303,7 +303,7 @@ class BackendImpl : public Backend {
scoped_refptr<TraceObject> trace_object_; // Inits internal tracing.
ScopedRunnableMethodFactory<BackendImpl> factory_;
DISALLOW_EVIL_CONSTRUCTORS(BackendImpl);
DISALLOW_COPY_AND_ASSIGN(BackendImpl);
};
// Returns the prefered max cache size given the available disk space.
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -80,7 +80,7 @@ class BlockFiles {
FRIEND_TEST(DiskCacheTest, BlockFiles_ZeroSizeFile);
FRIEND_TEST(DiskCacheTest, BlockFiles_InvalidFile);
DISALLOW_EVIL_CONSTRUCTORS(BlockFiles);
DISALLOW_COPY_AND_ASSIGN(BlockFiles);
};
} // namespace disk_cache
......
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -45,7 +45,7 @@ class SyncCallback: public disk_cache::FileIOCallback {
scoped_refptr<net::IOBuffer> buf_;
TimeTicks start_;
DISALLOW_EVIL_CONSTRUCTORS(SyncCallback);
DISALLOW_COPY_AND_ASSIGN(SyncCallback);
};
void SyncCallback::OnFileIOComplete(int bytes_copied) {
......
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -189,7 +189,7 @@ class EntryImpl : public Entry, public base::RefCounted<EntryImpl> {
bool doomed_; // True if this entry was removed from the cache.
scoped_ptr<SparseControl> sparse_; // Support for sparse entries.
DISALLOW_EVIL_CONSTRUCTORS(EntryImpl);
DISALLOW_COPY_AND_ASSIGN(EntryImpl);
};
} // namespace disk_cache
......
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -94,7 +94,7 @@ class MemBackendImpl : public Backend {
int32 max_size_; // Maximum data size for this instance.
int32 current_size_;
DISALLOW_EVIL_CONSTRUCTORS(MemBackendImpl);
DISALLOW_COPY_AND_ASSIGN(MemBackendImpl);
};
} // namespace disk_cache
......
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -159,7 +159,7 @@ class MemEntryImpl : public Entry {
MemBackendImpl* backend_; // Back pointer to the cache.
bool doomed_; // True if this entry was removed from the cache.
DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl);
DISALLOW_COPY_AND_ASSIGN(MemEntryImpl);
};
} // namespace disk_cache
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -36,7 +36,7 @@ class MemRankings {
MemEntryImpl* head_;
MemEntryImpl* tail_;
DISALLOW_EVIL_CONSTRUCTORS(MemRankings);
DISALLOW_COPY_AND_ASSIGN(MemRankings);
};
} // namespace disk_cache
......
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -86,7 +86,7 @@ class Rankings {
private:
Rankings* rankings_;
DISALLOW_EVIL_CONSTRUCTORS(ScopedRankingsBlock);
DISALLOW_COPY_AND_ASSIGN(ScopedRankingsBlock);
};
// If we have multiple lists, we have to iterate through all at the same time.
......
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -71,7 +71,7 @@ class ChildrenDeleter
disk_cache::Bitmap children_map_;
int64 signature_;
scoped_array<char> buffer_;
DISALLOW_EVIL_CONSTRUCTORS(ChildrenDeleter);
DISALLOW_COPY_AND_ASSIGN(ChildrenDeleter);
};
// This is the callback of the file operation.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment