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

@ -8,7 +8,6 @@
#include <memory>
#include <string>
#include "base/macros.h"
#include "components/keyed_service/core/keyed_service.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@ -32,6 +31,10 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService {
BadgeManager();
~BadgeManager() override;
// disable copy
BadgeManager(const BadgeManager&) = delete;
BadgeManager& operator=(const BadgeManager&) = delete;
static void BindFrameReceiver(
content::RenderFrameHost* frame,
mojo::PendingReceiver<blink::mojom::BadgeService> receiver);
@ -98,8 +101,6 @@ class BadgeManager : public KeyedService, public blink::mojom::BadgeService {
// Delegate which handles actual setting and clearing of the badge.
// Note: This is currently only set on Windows and MacOS.
// std::unique_ptr<BadgeManagerDelegate> delegate_;
DISALLOW_COPY_AND_ASSIGN(BadgeManager);
};
} // namespace badging

View file

@ -5,7 +5,6 @@
#ifndef SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
#define SHELL_BROWSER_BADGING_BADGE_MANAGER_FACTORY_H_
#include "base/macros.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
namespace base {
@ -26,6 +25,10 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory {
// Returns the BadgeManagerFactory singleton.
static BadgeManagerFactory* GetInstance();
// disable copy
BadgeManagerFactory(const BadgeManagerFactory&) = delete;
BadgeManagerFactory& operator=(const BadgeManagerFactory&) = delete;
private:
friend struct base::DefaultSingletonTraits<BadgeManagerFactory>;
@ -35,8 +38,6 @@ class BadgeManagerFactory : public BrowserContextKeyedServiceFactory {
// BrowserContextKeyedServiceFactory
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
DISALLOW_COPY_AND_ASSIGN(BadgeManagerFactory);
};
} // namespace badging