Replace DISALLOW_COPY_AND_ASSIGN in chrome/
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: I882202fb6295332b52c34ba12fae4705276b0b5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3165772
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@{#922479}
diff --git a/chrome/browser/ui/browser_live_tab_context.h b/chrome/browser/ui/browser_live_tab_context.h
index 1e7123d..ad221e6b 100644
--- a/chrome/browser/ui/browser_live_tab_context.h
+++ b/chrome/browser/ui/browser_live_tab_context.h
@@ -31,6 +31,10 @@
class BrowserLiveTabContext : public sessions::LiveTabContext {
public:
explicit BrowserLiveTabContext(Browser* browser) : browser_(browser) {}
+
+ BrowserLiveTabContext(const BrowserLiveTabContext&) = delete;
+ BrowserLiveTabContext& operator=(const BrowserLiveTabContext&) = delete;
+
~BrowserLiveTabContext() override {}
// Overridden from LiveTabContext:
@@ -102,8 +106,6 @@
private:
Browser* const browser_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowserLiveTabContext);
};
#endif // CHROME_BROWSER_UI_BROWSER_LIVE_TAB_CONTEXT_H_