Replace DISALLOW_COPY_AND_ASSIGN in ash/
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: Iedd7c835cea6c26dd4655c11e875cbf1b06bd1ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3163767
Auto-Submit: Peter Boström <[email protected]>
Commit-Queue: Daniel Cheng <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Owners-Override: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/main@{#922357}
diff --git a/ash/shutdown_controller_impl.h b/ash/shutdown_controller_impl.h
index 7d005396..fc530bc0 100644
--- a/ash/shutdown_controller_impl.h
+++ b/ash/shutdown_controller_impl.h
@@ -27,6 +27,10 @@
};
ShutdownControllerImpl();
+
+ ShutdownControllerImpl(const ShutdownControllerImpl&) = delete;
+ ShutdownControllerImpl& operator=(const ShutdownControllerImpl&) = delete;
+
~ShutdownControllerImpl() override;
void AddObserver(Observer* observer);
@@ -43,8 +47,6 @@
bool reboot_on_shutdown_ = false;
base::ObserverList<Observer>::Unchecked observers_;
-
- DISALLOW_COPY_AND_ASSIGN(ShutdownControllerImpl);
};
} // namespace ash