Replace DISALLOW_COPY_AND_ASSIGN in components/

This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).

This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.

IWYU cleanup is left as a separate pass that is easier when these macros
go away.

Bug: 1010217
Change-Id: I917bfbff1357e9e2cfe330d242feff6bb73e1bce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3167004
Reviewed-by: Daniel Cheng <[email protected]>
Owners-Override: Daniel Cheng <[email protected]>
Commit-Queue: Peter Boström <[email protected]>
Cr-Commit-Position: refs/heads/main@{#923103}
diff --git a/components/gcm_driver/fake_gcm_profile_service.cc b/components/gcm_driver/fake_gcm_profile_service.cc
index 3be4335..b0bfb46 100644
--- a/components/gcm_driver/fake_gcm_profile_service.cc
+++ b/components/gcm_driver/fake_gcm_profile_service.cc
@@ -27,6 +27,10 @@
     : public instance_id::FakeGCMDriverForInstanceID {
  public:
   explicit CustomFakeGCMDriver(FakeGCMProfileService* service);
+
+  CustomFakeGCMDriver(const CustomFakeGCMDriver&) = delete;
+  CustomFakeGCMDriver& operator=(const CustomFakeGCMDriver&) = delete;
+
   ~CustomFakeGCMDriver() override;
 
   void OnRegisterFinished(const std::string& app_id,
@@ -85,8 +89,6 @@
 
   base::WeakPtrFactory<CustomFakeGCMDriver> weak_factory_{
       this};  // Must be last.
-
-  DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver);
 };
 
 FakeGCMProfileService::CustomFakeGCMDriver::CustomFakeGCMDriver(