Macros such as DISALLOW_COPY_AND_ASSIGN() are deprecated since r711900 per style arbitration [1]. This commit replaces the macros with deleted constructors and methods, which is preferred by the Google C++ Style Guide [2][3]. Also remove unneeded "base/macros.h" #includes when possible. This CL is created semi-mechanically with remove_disallow and remove_base_macros [4]. [1]: https://groups.google.com/a/chromium.org/g/cxx/c/qwH2hxaEjac/m/TUKq6eqfCwAJ [2]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-dos-and-donts.md#explicitly-declare-class-copyability_movability [3]: https://google.github.io/styleguide/cppguide.html#Copyable_Movable_Types [4]: https://pkg.go.dev/go.timothygu.me/tools/cr/cmd Chromium change: https://chromium.googlesource.com/chromium/src.git/+/d002a3bee7ae75780b604d17df19291a3dd303fb commit d002a3bee7ae75780b604d17df19291a3dd303fb Author: Peter Boström <pbos@chromium.org> Date: Fri Nov 5 17:17:19 2021 +0000 Remove DISALLOW_ macros from base/macros.h This removes DISALLOW_COPY(), DISALLOW_ASSIGN() and DISALLOW_COPY_AND_ASSIGN() from base/macros.h. PRESUBMITs are also updated to no longer check for these macros. IWYU removal is left as a separate change just in case this needs to be reverted. Bug: 1010217
26 lines
964 B
C++
26 lines
964 B
C++
/* Copyright (c) 2018 The Brave Authors. All rights reserved.
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef BRAVE_BROWSER_DEVTOOLS_BRAVE_DEVTOOLS_UI_BINDINGS_H_
|
|
#define BRAVE_BROWSER_DEVTOOLS_BRAVE_DEVTOOLS_UI_BINDINGS_H_
|
|
|
|
#include "chrome/browser/devtools/devtools_ui_bindings.h"
|
|
|
|
class BraveDevToolsUIBindings : public DevToolsUIBindings {
|
|
public:
|
|
using DevToolsUIBindings::DevToolsUIBindings;
|
|
|
|
BraveDevToolsUIBindings(const BraveDevToolsUIBindings&) = delete;
|
|
BraveDevToolsUIBindings& operator=(const BraveDevToolsUIBindings&) = delete;
|
|
|
|
private:
|
|
FRIEND_TEST_ALL_PREFIXES(BraveDevToolsUIBindingsBrowserTest, ThemeTest);
|
|
|
|
// DevToolsUIBindings overrides:
|
|
void GetPreferences(DispatchCallback callback) override;
|
|
};
|
|
|
|
#endif // BRAVE_BROWSER_DEVTOOLS_BRAVE_DEVTOOLS_UI_BINDINGS_H_
|