Commit b4b5b57c authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

remove DISALLOW_COPY_AND_ASSIGN from apps/*

Bug: 1010217
Change-Id: I8b8759103f6f34e65d1f28ee6dde52d9a69c87f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434364Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811081}
parent e3023442
......@@ -44,10 +44,12 @@ class AppLifetimeMonitor : public KeyedService,
const std::string& app_id) {}
protected:
virtual ~Observer() {}
virtual ~Observer() = default;
};
explicit AppLifetimeMonitor(content::BrowserContext* context);
AppLifetimeMonitor(const AppLifetimeMonitor&) = delete;
AppLifetimeMonitor& operator=(const AppLifetimeMonitor&) = delete;
~AppLifetimeMonitor() override;
void AddObserver(Observer* observer);
......@@ -78,8 +80,6 @@ class AppLifetimeMonitor : public KeyedService,
content::NotificationRegistrar registrar_;
content::BrowserContext* context_;
base::ObserverList<Observer>::Unchecked observers_;
DISALLOW_COPY_AND_ASSIGN(AppLifetimeMonitor);
};
} // namespace apps
......
......@@ -31,6 +31,8 @@ class AppRestoreService : public KeyedService,
static bool ShouldRestoreApps(bool is_browser_restart);
explicit AppRestoreService(content::BrowserContext* context);
AppRestoreService(const AppRestoreService&) = delete;
AppRestoreService& operator=(const AppRestoreService&) = delete;
// Restart apps that need to be restarted and clear the "running" preference
// from apps to prevent them being restarted in subsequent restarts.
......@@ -69,8 +71,6 @@ class AppRestoreService : public KeyedService,
void StopObservingAppLifetime();
content::BrowserContext* context_;
DISALLOW_COPY_AND_ASSIGN(AppRestoreService);
};
} // namespace apps
......
......@@ -119,6 +119,8 @@ class PlatformAppPathLauncher
if (!file_path.empty())
entry_paths_.push_back(file_path);
}
PlatformAppPathLauncher(const PlatformAppPathLauncher&) = delete;
PlatformAppPathLauncher& operator=(const PlatformAppPathLauncher&) = delete;
void set_action_data(std::unique_ptr<app_runtime::ActionData> action_data) {
action_data_ = std::move(action_data);
......@@ -358,8 +360,6 @@ class PlatformAppPathLauncher
extensions::app_file_handler_util::MimeTypeCollector mime_type_collector_;
extensions::app_file_handler_util::IsDirectoryCollector
is_directory_collector_;
DISALLOW_COPY_AND_ASSIGN(PlatformAppPathLauncher);
};
} // namespace
......
......@@ -145,8 +145,14 @@ namespace {
// TestFixture that appends --load-and-launch-app with an app before calling
// BrowserMain.
class LoadAndLaunchPlatformAppBrowserTest : public PlatformAppBrowserTest {
public:
LoadAndLaunchPlatformAppBrowserTest(
const LoadAndLaunchPlatformAppBrowserTest&) = delete;
LoadAndLaunchPlatformAppBrowserTest& operator=(
const LoadAndLaunchPlatformAppBrowserTest&) = delete;
protected:
LoadAndLaunchPlatformAppBrowserTest() {}
LoadAndLaunchPlatformAppBrowserTest() = default;
void SetUpCommandLine(base::CommandLine* command_line) override {
PlatformAppBrowserTest::SetUpCommandLine(command_line);
......@@ -163,16 +169,19 @@ class LoadAndLaunchPlatformAppBrowserTest : public PlatformAppBrowserTest {
// window.
CreateBrowser(ProfileManager::GetActiveUserProfile());
}
private:
DISALLOW_COPY_AND_ASSIGN(LoadAndLaunchPlatformAppBrowserTest);
};
// TestFixture that appends --load-and-launch-app with an extension before
// calling BrowserMain.
class LoadAndLaunchExtensionBrowserTest : public PlatformAppBrowserTest {
public:
LoadAndLaunchExtensionBrowserTest(const LoadAndLaunchExtensionBrowserTest&) =
delete;
LoadAndLaunchExtensionBrowserTest& operator=(
const LoadAndLaunchExtensionBrowserTest&) = delete;
protected:
LoadAndLaunchExtensionBrowserTest() {}
LoadAndLaunchExtensionBrowserTest() = default;
void SetUpCommandLine(base::CommandLine* command_line) override {
PlatformAppBrowserTest::SetUpCommandLine(command_line);
......@@ -189,8 +198,6 @@ class LoadAndLaunchExtensionBrowserTest : public PlatformAppBrowserTest {
// Skip showing the error message box to avoid freezing the main thread.
chrome::internal::g_should_skip_message_box_for_test = true;
}
DISALLOW_COPY_AND_ASSIGN(LoadAndLaunchExtensionBrowserTest);
};
} // namespace
......
......@@ -147,6 +147,8 @@ std::vector<SavedFileEntry> GetSavedFileEntries(
class SavedFilesService::SavedFiles {
public:
SavedFiles(content::BrowserContext* context, const std::string& extension_id);
SavedFiles(const SavedFiles&) = delete;
SavedFiles& operator=(const SavedFiles&) = delete;
~SavedFiles();
void RegisterFileEntry(const std::string& id,
......@@ -176,8 +178,6 @@ class SavedFilesService::SavedFiles {
// sequence_number. Values are a subset of values in registered_file_entries_.
// This should be kept in sync with file entries stored in extension prefs.
std::map<int, SavedFileEntry*> saved_file_lru_;
DISALLOW_COPY_AND_ASSIGN(SavedFiles);
};
// static
......
......@@ -41,6 +41,8 @@ class SavedFilesService : public extensions::SavedFilesServiceInterface,
public content::NotificationObserver {
public:
explicit SavedFilesService(content::BrowserContext* context);
SavedFilesService(const SavedFilesService&) = delete;
SavedFilesService& operator=(const SavedFilesService&) = delete;
~SavedFilesService() override;
static SavedFilesService* Get(content::BrowserContext* context);
......@@ -105,8 +107,6 @@ class SavedFilesService : public extensions::SavedFilesServiceInterface,
extension_id_to_saved_files_;
content::NotificationRegistrar registrar_;
content::BrowserContext* context_;
DISALLOW_COPY_AND_ASSIGN(SavedFilesService);
};
} // namespace apps
......
......@@ -5,7 +5,6 @@
#ifndef APPS_SAVED_FILES_SERVICE_FACTORY_H_
#define APPS_SAVED_FILES_SERVICE_FACTORY_H_
#include "base/macros.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
......@@ -28,6 +27,9 @@ class SavedFilesServiceFactory : public BrowserContextKeyedServiceFactory {
static SavedFilesServiceFactory* GetInstance();
SavedFilesServiceFactory(const SavedFilesServiceFactory&) = delete;
SavedFilesServiceFactory& operator=(const SavedFilesServiceFactory&) = delete;
private:
SavedFilesServiceFactory();
~SavedFilesServiceFactory() override;
......@@ -37,8 +39,6 @@ class SavedFilesServiceFactory : public BrowserContextKeyedServiceFactory {
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
DISALLOW_COPY_AND_ASSIGN(SavedFilesServiceFactory);
};
} // namespace apps
......
......@@ -9,7 +9,6 @@
#include <string>
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "extensions/browser/app_window/app_window_registry.h"
......@@ -26,6 +25,8 @@ class AppWindowWaiter : public extensions::AppWindowRegistry::Observer {
public:
AppWindowWaiter(extensions::AppWindowRegistry* registry,
const std::string& app_id);
AppWindowWaiter(const AppWindowWaiter&) = delete;
AppWindowWaiter& operator=(const AppWindowWaiter&) = delete;
~AppWindowWaiter() override;
// Waits for an AppWindow of the app to be added.
......@@ -60,8 +61,6 @@ class AppWindowWaiter : public extensions::AppWindowRegistry::Observer {
std::unique_ptr<base::RunLoop> run_loop_;
WaitType wait_type_ = WAIT_FOR_NONE;
extensions::AppWindow* window_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(AppWindowWaiter);
};
} // namespace apps
......
......@@ -47,6 +47,8 @@ class AppWindowFrameView : public views::NonClientFrameView {
bool draw_frame,
const SkColor& active_frame_color,
const SkColor& inactive_frame_color);
AppWindowFrameView(const AppWindowFrameView&) = delete;
AppWindowFrameView& operator=(const AppWindowFrameView&) = delete;
~AppWindowFrameView() override;
void Init();
......@@ -101,8 +103,6 @@ class AppWindowFrameView : public views::NonClientFrameView {
// Size in pixels of the lower-right corner resize handle.
int resize_area_corner_size_ = 16;
DISALLOW_COPY_AND_ASSIGN(AppWindowFrameView);
};
} // namespace apps
......
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