Commit 6790914e authored by Sorin Jianu's avatar Sorin Jianu Committed by Commit Bot

Remove deprecated macro DISALLOW_COPY_AND_ASSIGN from chrome/updater.

Mechanical change.

Change-Id: I181a9f660529f167878ea1d0ff95a919fbea1b53
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080858Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
Commit-Queue: Joshua Pawlicki <waffles@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745676}
parent 7670cdb2
......@@ -8,7 +8,6 @@
#include <memory>
#include <string>
#include "base/macros.h"
#include "base/sequence_checker.h"
namespace base {
......@@ -25,6 +24,9 @@ namespace updater {
// This class manages interaction with the crash reporter.
class CrashClient {
public:
CrashClient(const CrashClient&) = delete;
CrashClient& operator=(const CrashClient&) = delete;
static CrashClient* GetInstance();
// Retrieves the current guid associated with crashes. The value may be empty
......@@ -51,8 +53,6 @@ class CrashClient {
SEQUENCE_CHECKER(sequence_checker_);
std::unique_ptr<crashpad::CrashReportDatabase> database_;
DISALLOW_COPY_AND_ASSIGN(CrashClient);
};
} // namespace updater
......
......@@ -7,7 +7,6 @@
#include <memory>
#include "base/macros.h"
#include "base/threading/thread_checker.h"
#include "components/update_client/network.h"
......@@ -16,6 +15,8 @@ namespace updater {
class NetworkFetcherFactory : public update_client::NetworkFetcherFactory {
public:
NetworkFetcherFactory();
NetworkFetcherFactory(const NetworkFetcherFactory&) = delete;
NetworkFetcherFactory& operator=(const NetworkFetcherFactory&) = delete;
std::unique_ptr<update_client::NetworkFetcher> Create() const override;
......@@ -24,8 +25,6 @@ class NetworkFetcherFactory : public update_client::NetworkFetcherFactory {
private:
THREAD_CHECKER(thread_checker_);
DISALLOW_COPY_AND_ASSIGN(NetworkFetcherFactory);
};
} // namespace updater
......
......@@ -11,7 +11,6 @@
#include "base/callback.h"
#include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "components/update_client/network.h"
......
......@@ -7,7 +7,6 @@
#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/update_client/patcher.h"
......@@ -16,14 +15,13 @@ namespace updater {
class PatcherFactory : public update_client::PatcherFactory {
public:
PatcherFactory();
PatcherFactory(const PatcherFactory&) = delete;
PatcherFactory& operator=(const PatcherFactory&) = delete;
scoped_refptr<update_client::Patcher> Create() const override;
protected:
~PatcherFactory() override;
private:
DISALLOW_COPY_AND_ASSIGN(PatcherFactory);
};
} // namespace updater
......
......@@ -11,7 +11,6 @@
#include <wrl/module.h>
#include <memory>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/synchronization/waitable_event.h"
#include "chrome/updater/server/win/updater_idl.h"
......@@ -27,6 +26,8 @@ class UpdaterImpl
IUpdater> {
public:
UpdaterImpl() = default;
UpdaterImpl(const UpdaterImpl&) = delete;
UpdaterImpl& operator=(const UpdaterImpl&) = delete;
IFACEMETHODIMP CheckForUpdate(const base::char16* app_id) override;
IFACEMETHODIMP Register(const base::char16* app_id,
......@@ -38,8 +39,6 @@ class UpdaterImpl
private:
~UpdaterImpl() override = default;
DISALLOW_COPY_AND_ASSIGN(UpdaterImpl);
};
// This class is responsible for the lifetime of the COM server, as well as
......@@ -47,6 +46,8 @@ class UpdaterImpl
class ComServer {
public:
ComServer();
ComServer(const ComServer&) = delete;
ComServer& operator=(const ComServer&) = delete;
~ComServer() = default;
// Main entry point for the COM server.
......@@ -75,8 +76,6 @@ class ComServer {
// This event is signaled when the last COM instance is released.
base::WaitableEvent exit_signal_;
DISALLOW_COPY_AND_ASSIGN(ComServer);
};
// Sets up and runs the server.
......
......@@ -7,7 +7,6 @@
#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/update_client/unzipper.h"
......@@ -16,14 +15,13 @@ namespace updater {
class UnzipperFactory : public update_client::UnzipperFactory {
public:
UnzipperFactory();
UnzipperFactory(const UnzipperFactory&) = delete;
UnzipperFactory& operator=(const UnzipperFactory&) = delete;
std::unique_ptr<update_client::Unzipper> Create() const override;
protected:
~UnzipperFactory() override;
private:
DISALLOW_COPY_AND_ASSIGN(UnzipperFactory);
};
} // namespace updater
......
......@@ -10,7 +10,6 @@
#include <memory>
#include "base/environment.h"
#include "base/macros.h"
#include "base/test/test_reg_util_win.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -37,9 +36,8 @@ class TestConfiguration : public Configuration {
explicit TestConfiguration(const wchar_t* command_line) {
EXPECT_TRUE(ParseCommandLine(command_line));
}
private:
DISALLOW_COPY_AND_ASSIGN(TestConfiguration);
TestConfiguration(const TestConfiguration&) = delete;
TestConfiguration& operator=(const TestConfiguration&) = delete;
};
} // namespace
......@@ -47,9 +45,10 @@ class TestConfiguration : public Configuration {
class UpdaterInstallerConfigurationTest : public ::testing::Test {
protected:
UpdaterInstallerConfigurationTest() = default;
private:
DISALLOW_COPY_AND_ASSIGN(UpdaterInstallerConfigurationTest);
UpdaterInstallerConfigurationTest(const UpdaterInstallerConfigurationTest&) =
delete;
UpdaterInstallerConfigurationTest& operator=(
const UpdaterInstallerConfigurationTest&) = delete;
};
// Test that the operation type is CLEANUP iff --cleanup is on the cmdline.
......
......@@ -7,7 +7,6 @@
#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "chrome/updater/win/net/scoped_hinternet.h"
......@@ -19,6 +18,8 @@ namespace updater {
class NetworkFetcherFactory : public update_client::NetworkFetcherFactory {
public:
NetworkFetcherFactory();
NetworkFetcherFactory(const NetworkFetcherFactory&) = delete;
NetworkFetcherFactory& operator=(const NetworkFetcherFactory&) = delete;
std::unique_ptr<update_client::NetworkFetcher> Create() const override;
......@@ -30,8 +31,6 @@ class NetworkFetcherFactory : public update_client::NetworkFetcherFactory {
THREAD_CHECKER(thread_checker_);
scoped_hinternet session_handle_;
DISALLOW_COPY_AND_ASSIGN(NetworkFetcherFactory);
};
} // namespace updater
......
......@@ -13,7 +13,6 @@
#include "base/callback.h"
#include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
#include "components/update_client/network.h"
......@@ -40,6 +39,8 @@ class NetworkFetcher : public update_client::NetworkFetcher {
explicit NetworkFetcher(const HINTERNET& session_handle_);
~NetworkFetcher() override;
NetworkFetcher(const NetworkFetcher&) = delete;
NetworkFetcher& operator=(const NetworkFetcher&) = delete;
// NetworkFetcher overrides.
void PostRequest(
......@@ -67,8 +68,6 @@ class NetworkFetcher : public update_client::NetworkFetcher {
DownloadToFileCompleteCallback download_to_file_complete_callback_;
PostRequestCompleteCallback post_request_complete_callback_;
DISALLOW_COPY_AND_ASSIGN(NetworkFetcher);
};
} // namespace updater
......
......@@ -16,7 +16,6 @@
#include "base/callback.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string_piece_forward.h"
#include "base/threading/thread_checker.h"
......@@ -42,6 +41,8 @@ class NetworkFetcherWinHTTP
using FetchProgressCallback = update_client::NetworkFetcher::ProgressCallback;
explicit NetworkFetcherWinHTTP(const HINTERNET& session_handle_);
NetworkFetcherWinHTTP(const NetworkFetcherWinHTTP&) = delete;
NetworkFetcherWinHTTP& operator=(const NetworkFetcherWinHTTP&) = delete;
void Close();
......@@ -139,8 +140,6 @@ class NetworkFetcherWinHTTP
FetchCompleteCallback fetch_complete_callback_;
scoped_refptr<update_client::NetworkFetcherFactory> network_fetcher_factory_;
DISALLOW_COPY_AND_ASSIGN(NetworkFetcherWinHTTP);
};
} // namespace updater
......
......@@ -159,6 +159,8 @@ class TaskSchedulerV2 final : public TaskScheduler {
task_folder_ = GetUpdaterTaskFolder();
DCHECK(task_folder_);
}
TaskSchedulerV2(const TaskSchedulerV2&) = delete;
TaskSchedulerV2& operator=(const TaskSchedulerV2&) = delete;
// TaskScheduler overrides.
bool IsTaskRegistered(const wchar_t* task_name) override {
......@@ -1030,8 +1032,6 @@ class TaskSchedulerV2 final : public TaskScheduler {
// Folder in which all updater scheduled tasks are grouped in.
Microsoft::WRL::ComPtr<ITaskFolder> task_folder_;
DISALLOW_COPY_AND_ASSIGN(TaskSchedulerV2);
};
} // namespace
......
......@@ -11,7 +11,6 @@
#include <vector>
#include "base/files/file_path.h"
#include "base/macros.h"
namespace base {
class CommandLine;
......@@ -86,6 +85,9 @@ class TaskScheduler {
};
static std::unique_ptr<TaskScheduler> CreateInstance();
TaskScheduler(const TaskScheduler&) = delete;
TaskScheduler& operator=(const TaskScheduler&) = delete;
virtual ~TaskScheduler() {}
// Identify whether the task is registered or not.
......@@ -127,8 +129,6 @@ class TaskScheduler {
protected:
TaskScheduler();
DISALLOW_COPY_AND_ASSIGN(TaskScheduler);
};
} // namespace updater
......
......@@ -7,7 +7,6 @@
#include <windows.h>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/win/atl.h"
#include "chrome/updater/win/ui/resources/resources.grh"
......@@ -25,6 +24,9 @@ class CompleteWndEvents : public OmahaWndEvents {
class CompleteWnd : public OmahaWnd {
public:
CompleteWnd(const CompleteWnd&) = delete;
CompleteWnd& operator=(const CompleteWnd&) = delete;
HRESULT Initialize() override;
void SetEventSink(CompleteWndEvents* ev);
......@@ -70,8 +72,6 @@ class CompleteWnd : public OmahaWnd {
base::string16 help_url_;
CompleteWndEvents* events_sink_ = nullptr;
const DWORD control_classes_;
DISALLOW_COPY_AND_ASSIGN(CompleteWnd);
};
} // namespace ui
......
......@@ -7,7 +7,6 @@
#include <windows.h>
#include "base/macros.h"
#include "base/win/atl.h"
#include "chrome/updater/win/ui/constants.h"
......@@ -27,6 +26,8 @@ class CaptionButton : public CWindowImpl<CaptionButton, WTL::CButton>,
CS_HREDRAW | CS_VREDRAW,
COLOR_WINDOW)
CaptionButton();
CaptionButton(const CaptionButton&) = delete;
CaptionButton& operator=(const CaptionButton&) = delete;
~CaptionButton() override;
void DrawItem(LPDRAWITEMSTRUCT draw_item_struct);
......@@ -84,38 +85,36 @@ class CaptionButton : public CWindowImpl<CaptionButton, WTL::CButton>,
CString tool_tip_text_;
bool is_tracking_mouse_events_ = false;
bool is_mouse_hovering_ = false;
DISALLOW_COPY_AND_ASSIGN(CaptionButton);
};
class CloseButton : public CaptionButton {
public:
CloseButton();
CloseButton(const CloseButton&) = delete;
CloseButton& operator=(const CloseButton&) = delete;
private:
HRGN GetButtonRgn(int rgn_width, int rgn_height) override;
DISALLOW_COPY_AND_ASSIGN(CloseButton);
};
class MinimizeButton : public CaptionButton {
public:
MinimizeButton();
MinimizeButton(const MinimizeButton&) = delete;
MinimizeButton& operator=(const MinimizeButton&) = delete;
private:
HRGN GetButtonRgn(int rgn_width, int rgn_height) override;
DISALLOW_COPY_AND_ASSIGN(MinimizeButton);
};
class MaximizeButton : public CaptionButton {
public:
MaximizeButton();
MaximizeButton(const MaximizeButton&) = delete;
MaximizeButton& operator=(const MaximizeButton&) = delete;
private:
HRGN GetButtonRgn(int rgn_width, int rgn_height) override;
DISALLOW_COPY_AND_ASSIGN(MaximizeButton);
};
class OwnerDrawTitleBarWindow : public CWindowImpl<OwnerDrawTitleBarWindow> {
......@@ -144,6 +143,8 @@ class OwnerDrawTitleBarWindow : public CWindowImpl<OwnerDrawTitleBarWindow> {
END_MSG_MAP()
OwnerDrawTitleBarWindow();
OwnerDrawTitleBarWindow(const OwnerDrawTitleBarWindow&) = delete;
OwnerDrawTitleBarWindow& operator=(const OwnerDrawTitleBarWindow&) = delete;
~OwnerDrawTitleBarWindow() override;
void RecalcLayout();
......@@ -202,13 +203,13 @@ class OwnerDrawTitleBarWindow : public CWindowImpl<OwnerDrawTitleBarWindow> {
CloseButton close_button_;
MinimizeButton minimize_button_;
DISALLOW_COPY_AND_ASSIGN(OwnerDrawTitleBarWindow);
};
class OwnerDrawTitleBar {
public:
OwnerDrawTitleBar();
OwnerDrawTitleBar(const OwnerDrawTitleBar&) = delete;
OwnerDrawTitleBar& operator=(const OwnerDrawTitleBar&) = delete;
~OwnerDrawTitleBar();
void CreateOwnerDrawTitleBar(HWND parent_hwnd,
......@@ -224,8 +225,6 @@ class OwnerDrawTitleBar {
CRect ComputeTitleBarClientRect(HWND parent_hwnd, HWND title_bar_spacer_hwnd);
OwnerDrawTitleBarWindow title_bar_window_;
DISALLOW_COPY_AND_ASSIGN(OwnerDrawTitleBar);
};
// Customizes the text color and the background color for dialog elements.
......@@ -238,6 +237,8 @@ class OwnerDrawTitleBar {
class CustomDlgColors {
public:
CustomDlgColors();
CustomDlgColors(const CustomDlgColors&) = delete;
CustomDlgColors& operator=(const CustomDlgColors&) = delete;
~CustomDlgColors();
void SetCustomDlgColors(COLORREF text_color, COLORREF bk_color);
......@@ -256,13 +257,13 @@ class CustomDlgColors {
COLORREF text_color_ = RGB(0xFF, 0xFF, 0xFF);
COLORREF bk_color_ = RGB(0, 0, 0);
WTL::CBrush bk_brush_;
DISALLOW_COPY_AND_ASSIGN(CustomDlgColors);
};
class CustomProgressBarCtrl : public CWindowImpl<CustomProgressBarCtrl> {
public:
CustomProgressBarCtrl();
CustomProgressBarCtrl(const CustomProgressBarCtrl&) = delete;
CustomProgressBarCtrl& operator=(const CustomProgressBarCtrl&) = delete;
~CustomProgressBarCtrl() override;
BEGIN_MSG_MAP(CustomProgressBarCtrl)
......@@ -323,8 +324,6 @@ class CustomProgressBarCtrl : public CWindowImpl<CustomProgressBarCtrl> {
COLORREF bar_color_dark_ = kProgressBarDarkColor;
COLORREF empty_fill_color_ = kProgressEmptyFillColor;
WTL::CBrush empty_frame_brush_;
DISALLOW_COPY_AND_ASSIGN(CustomProgressBarCtrl);
};
} // namespace ui
......
......@@ -10,7 +10,6 @@
#include <memory>
#include <vector>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/threading/thread_checker.h"
#include "base/win/atl.h"
......@@ -52,6 +51,8 @@ class InstallStoppedWnd : public CAxDialogImpl<InstallStoppedWnd>,
static constexpr int IDD = IDD_INSTALL_STOPPED;
InstallStoppedWnd(WTL::CMessageLoop* message_loop, HWND parent);
InstallStoppedWnd(const InstallStoppedWnd&) = delete;
InstallStoppedWnd& operator=(const InstallStoppedWnd&) = delete;
~InstallStoppedWnd() override;
// Closes the window, handling transition back to the parent window.
......@@ -90,14 +91,14 @@ class InstallStoppedWnd : public CAxDialogImpl<InstallStoppedWnd>,
HWND parent_ = nullptr;
WTL::CFont default_font_;
DISALLOW_COPY_AND_ASSIGN(InstallStoppedWnd);
};
// Implements the UI progress window.
class ProgressWnd : public CompleteWnd, public InstallProgressObserver {
public:
ProgressWnd(WTL::CMessageLoop* message_loop, HWND parent);
ProgressWnd(const ProgressWnd&) = delete;
ProgressWnd& operator=(const ProgressWnd&) = delete;
~ProgressWnd() override;
void SetEventSink(ProgressWndEvents* ev);
......@@ -204,8 +205,6 @@ class ProgressWnd : public CompleteWnd, public InstallProgressObserver {
// The speed by which the progress bar moves in marquee mode.
static constexpr int kMarqueeModeUpdatesMs = 75;
DISALLOW_COPY_AND_ASSIGN(ProgressWnd);
};
} // namespace ui
......
......@@ -8,7 +8,6 @@
#include <windows.h>
#include "base/callback.h"
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/threading/thread_checker.h"
#include "base/win/atl.h"
......@@ -26,7 +25,10 @@ class SplashScreen : public CAxDialogImpl<SplashScreen>,
static constexpr int IDD = IDD_PROGRESS;
explicit SplashScreen(const base::string16& bundle_name);
SplashScreen(const SplashScreen&) = delete;
SplashScreen& operator=(const SplashScreen&) = delete;
~SplashScreen() override;
void Show();
// Does alpha blending and closese the window.
......@@ -92,8 +94,6 @@ class SplashScreen : public CAxDialogImpl<SplashScreen>,
// Called when the window is destroyed.
base::OnceClosure on_close_closure_;
DISALLOW_COPY_AND_ASSIGN(SplashScreen);
};
} // namespace ui
......
......@@ -7,7 +7,6 @@
#include <vector>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/threading/thread_checker.h"
#include "base/win/atl.h"
......@@ -39,6 +38,8 @@ class OmahaWnd : public CAxDialogImpl<OmahaWnd>,
public:
const int IDD;
OmahaWnd(const OmahaWnd&) = delete;
OmahaWnd& operator=(const OmahaWnd&) = delete;
~OmahaWnd() override;
virtual HRESULT Initialize();
......@@ -148,8 +149,6 @@ class OmahaWnd : public CAxDialogImpl<OmahaWnd>,
WTL::CFont error_font_;
CustomProgressBarCtrl progress_bar_;
DISALLOW_COPY_AND_ASSIGN(OmahaWnd);
};
// Registers the specified common control classes from the common control DLL.
......
......@@ -11,7 +11,6 @@
#include <vector>
#include "base/logging.h"
#include "base/macros.h"
#include "base/strings/string16.h"
namespace updater {
......
......@@ -7,7 +7,6 @@
#include <windows.h>
#include "base/macros.h"
#include "base/strings/string16.h"
#include "base/win/atl.h"
#include "base/win/scoped_gdi_object.h"
......@@ -27,6 +26,8 @@ class YesNoDialog : public CAxDialogImpl<YesNoDialog>,
static constexpr int IDD = IDD_YES_NO;
YesNoDialog(WTL::CMessageLoop* message_loop, HWND parent);
YesNoDialog(const YesNoDialog&) = delete;
YesNoDialog& operator=(const YesNoDialog&) = delete;
~YesNoDialog() override;
HRESULT Initialize(const base::string16& yes_no_title,
......@@ -71,8 +72,6 @@ class YesNoDialog : public CAxDialogImpl<YesNoDialog>,
base::win::ScopedGDIObject<HICON> hicon_;
WTL::CFont default_font_;
DISALLOW_COPY_AND_ASSIGN(YesNoDialog);
};
} // namespace ui
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment