refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)

This commit is contained in:
Milan Burda 2021-11-03 12:41:45 +01:00 committed by GitHub
parent 2a2a1a834c
commit 65a980c673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 918 additions and 576 deletions

View file

@ -6,7 +6,6 @@
#define SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_
#include "base/callback_list.h"
#include "base/macros.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "net/cookies/cookie_change_dispatcher.h"
#include "services/network/public/mojom/cookie_manager.mojom.h"
@ -21,6 +20,10 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
explicit CookieChangeNotifier(ElectronBrowserContext* browser_context);
~CookieChangeNotifier() override;
// disable copy
CookieChangeNotifier(const CookieChangeNotifier&) = delete;
CookieChangeNotifier& operator=(const CookieChangeNotifier&) = delete;
// Register callbacks that needs to notified on any cookie store changes.
base::CallbackListSubscription RegisterCookieChangeCallback(
const base::RepeatingCallback<void(const net::CookieChangeInfo& change)>&
@ -38,8 +41,6 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener {
cookie_change_sub_list_;
mojo::Receiver<network::mojom::CookieChangeListener> receiver_;
DISALLOW_COPY_AND_ASSIGN(CookieChangeNotifier);
};
} // namespace electron