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