Up top so this gets more focus: I'd pretty strongly recommend grepping a directory for how many DISALLOW_COPY_AND_ASSIGNs are present before doing any manual work on this gargantuan task (knocking 100 off of 26000 is pretty drop-in-the-bucket unless everyone does it, which is probably not a great use of everyone's time).
In case you're interested, I put together my own version of a script with a couple of deficiencies. The code is hacky and only good enough to run not really to understand, and seems to not have a massive bug-to-usefulness ratio. crrev.com/c/3163571
It works as follows:
Identify classes that're subject to replace DISALLOW_COPY_AND_ASSIGN(Foo) by regex (regex is not a great C++ parser ofc)
For each of those go through the file and see if you can find (virtual) ~Foo( in the public section of a class. If you can, assume that inserting deleted constructors before ~Foo() is the right place.
Remove DISALLOW_COPY_AND_ASSIGN(Foo) and any comments/empty lines/private: label that directly preceded it.
Rinse and repeat. This is pretty hacky, but basically every time something gets replaced, restart. This may fail with DISALLOW_COPY_AND_ASSIGN still present because it doesn't know where to insert its replacement.
Bugs (found by code review) are at least (and counting), so please code review both yourself and w/ reviewer:
* If ~Foo() is under an #if the deleted constructors will be inserted there as well which is not intentional.
* If multiple classes in the same file have the same name (perhaps under different namespaces) this script gets confused and inserts a replacement once but removes all DISALLOW_COPY_AND_ASSIGNs for that name.
Also this does not IWYU, which is left as a separate pass (perhaps after these macros are gone).
If you can make this script deal with some remaining instances in base/ after crrev.com/c/3163384
lands that'd be cool, I don't think this DISALLOW_COPY_AND_ASSIGN thing should be resolved by manual inspection unless the manual time is waaaaaay shorter than it seems to currently be, so beware of being sniped into "knocking a few off the list" as there are many many many more where they came from (unless you find it meditative, which in that case go ahead). :)
Thanks, and thanks for keeping an eye out for code health as well.