refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)
This commit is contained in:
parent
2a2a1a834c
commit
65a980c673
231 changed files with 918 additions and 576 deletions
|
@ -10,7 +10,6 @@
|
|||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/strcat.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
|
@ -44,11 +43,15 @@ class ManagementSetEnabledFunctionInstallPromptDelegate
|
|||
}
|
||||
~ManagementSetEnabledFunctionInstallPromptDelegate() override = default;
|
||||
|
||||
// disable copy
|
||||
ManagementSetEnabledFunctionInstallPromptDelegate(
|
||||
const ManagementSetEnabledFunctionInstallPromptDelegate&) = delete;
|
||||
ManagementSetEnabledFunctionInstallPromptDelegate& operator=(
|
||||
const ManagementSetEnabledFunctionInstallPromptDelegate&) = delete;
|
||||
|
||||
private:
|
||||
base::WeakPtrFactory<ManagementSetEnabledFunctionInstallPromptDelegate>
|
||||
weak_factory_{this};
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ManagementSetEnabledFunctionInstallPromptDelegate);
|
||||
};
|
||||
|
||||
class ManagementUninstallFunctionUninstallDialogDelegate
|
||||
|
@ -63,8 +66,11 @@ class ManagementUninstallFunctionUninstallDialogDelegate
|
|||
|
||||
~ManagementUninstallFunctionUninstallDialogDelegate() override = default;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ManagementUninstallFunctionUninstallDialogDelegate);
|
||||
// disable copy
|
||||
ManagementUninstallFunctionUninstallDialogDelegate(
|
||||
const ManagementUninstallFunctionUninstallDialogDelegate&) = delete;
|
||||
ManagementUninstallFunctionUninstallDialogDelegate& operator=(
|
||||
const ManagementUninstallFunctionUninstallDialogDelegate&) = delete;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
||||
#define SHELL_BROWSER_EXTENSIONS_API_RESOURCES_PRIVATE_RESOURCES_PRIVATE_API_H_
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "extensions/browser/extension_function.h"
|
||||
|
||||
namespace extensions {
|
||||
|
@ -16,14 +15,17 @@ class ResourcesPrivateGetStringsFunction : public ExtensionFunction {
|
|||
RESOURCESPRIVATE_GETSTRINGS)
|
||||
ResourcesPrivateGetStringsFunction();
|
||||
|
||||
// disable copy
|
||||
ResourcesPrivateGetStringsFunction(
|
||||
const ResourcesPrivateGetStringsFunction&) = delete;
|
||||
ResourcesPrivateGetStringsFunction& operator=(
|
||||
const ResourcesPrivateGetStringsFunction&) = delete;
|
||||
|
||||
protected:
|
||||
~ResourcesPrivateGetStringsFunction() override;
|
||||
|
||||
// Override from ExtensionFunction:
|
||||
ExtensionFunction::ResponseAction Run() override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(ResourcesPrivateGetStringsFunction);
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
|
||||
|
||||
namespace content {
|
||||
|
@ -21,6 +20,11 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
|||
explicit ElectronRuntimeAPIDelegate(content::BrowserContext* browser_context);
|
||||
~ElectronRuntimeAPIDelegate() override;
|
||||
|
||||
// disable copy
|
||||
ElectronRuntimeAPIDelegate(const ElectronRuntimeAPIDelegate&) = delete;
|
||||
ElectronRuntimeAPIDelegate& operator=(const ElectronRuntimeAPIDelegate&) =
|
||||
delete;
|
||||
|
||||
// RuntimeAPIDelegate implementation.
|
||||
void AddUpdateObserver(UpdateObserver* observer) override;
|
||||
void RemoveUpdateObserver(UpdateObserver* observer) override;
|
||||
|
@ -33,8 +37,6 @@ class ElectronRuntimeAPIDelegate : public RuntimeAPIDelegate {
|
|||
|
||||
private:
|
||||
content::BrowserContext* browser_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronRuntimeAPIDelegate);
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "third_party/blink/public/mojom/loader/transferrable_url_loader.mojom.h"
|
||||
|
||||
namespace extensions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue