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

Remove DISALLOW_COPY_AND_ASSIGN from chrome/browser/ui/app_list/*

A few lint fixes; no functional changes.

Bug: 1010217
Change-Id: I26fac87d0bf50d95eef51eccd73cd1bc17c74330
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2488619Reviewed-by: default avatarcalamity <calamity@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821231}
parent cf4ce552
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
#include "chrome/browser/ui/app_list/app_context_menu.h" #include "chrome/browser/ui/app_list/app_context_menu.h"
#include <utility>
#include "ash/public/cpp/app_menu_constants.h" #include "ash/public/cpp/app_menu_constants.h"
#include "ash/public/cpp/shelf_model.h" #include "ash/public/cpp/shelf_model.h"
#include "chrome/app/vector_icons/vector_icons.h" #include "chrome/app/vector_icons/vector_icons.h"
...@@ -27,8 +29,6 @@ AppContextMenu::AppContextMenu(AppContextMenuDelegate* delegate, ...@@ -27,8 +29,6 @@ AppContextMenu::AppContextMenu(AppContextMenuDelegate* delegate,
app_id_(app_id), app_id_(app_id),
controller_(controller) {} controller_(controller) {}
AppContextMenu::~AppContextMenu() = default;
void AppContextMenu::GetMenuModel(GetMenuModelCallback callback) { void AppContextMenu::GetMenuModel(GetMenuModelCallback callback) {
auto menu_model = std::make_unique<ui::SimpleMenuModel>(this); auto menu_model = std::make_unique<ui::SimpleMenuModel>(this);
BuildMenu(menu_model.get()); BuildMenu(menu_model.get());
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ash/public/cpp/app_menu_constants.h" #include "ash/public/cpp/app_menu_constants.h"
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h"
#include "ui/base/models/image_model.h" #include "ui/base/models/image_model.h"
#include "ui/base/models/simple_menu_model.h" #include "ui/base/models/simple_menu_model.h"
...@@ -28,7 +27,9 @@ class AppContextMenu : public ui::SimpleMenuModel::Delegate { ...@@ -28,7 +27,9 @@ class AppContextMenu : public ui::SimpleMenuModel::Delegate {
Profile* profile, Profile* profile,
const std::string& app_id, const std::string& app_id,
AppListControllerDelegate* controller); AppListControllerDelegate* controller);
~AppContextMenu() override; AppContextMenu(const AppContextMenu&) = delete;
AppContextMenu& operator=(const AppContextMenu&) = delete;
~AppContextMenu() override = default;
using GetMenuModelCallback = using GetMenuModelCallback =
base::OnceCallback<void(std::unique_ptr<ui::SimpleMenuModel>)>; base::OnceCallback<void(std::unique_ptr<ui::SimpleMenuModel>)>;
...@@ -69,8 +70,6 @@ class AppContextMenu : public ui::SimpleMenuModel::Delegate { ...@@ -69,8 +70,6 @@ class AppContextMenu : public ui::SimpleMenuModel::Delegate {
Profile* profile_; Profile* profile_;
const std::string app_id_; const std::string app_id_;
AppListControllerDelegate* controller_; AppListControllerDelegate* controller_;
DISALLOW_COPY_AND_ASSIGN(AppContextMenu);
}; };
} // namespace app_list } // namespace app_list
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "ash/public/cpp/app_list/app_list_client.h" #include "ash/public/cpp/app_list/app_list_client.h"
#include "ash/public/cpp/shelf_types.h" #include "ash/public/cpp/shelf_types.h"
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/scoped_observer.h" #include "base/scoped_observer.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h" #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
...@@ -43,6 +41,8 @@ class AppListClientImpl ...@@ -43,6 +41,8 @@ class AppListClientImpl
public TemplateURLServiceObserver { public TemplateURLServiceObserver {
public: public:
AppListClientImpl(); AppListClientImpl();
AppListClientImpl(const AppListClientImpl&) = delete;
AppListClientImpl& operator=(const AppListClientImpl&) = delete;
~AppListClientImpl() override; ~AppListClientImpl() override;
static AppListClientImpl* GetInstance(); static AppListClientImpl* GetInstance();
...@@ -187,8 +187,6 @@ class AppListClientImpl ...@@ -187,8 +187,6 @@ class AppListClientImpl
bool app_list_visible_ = false; bool app_list_visible_ = false;
base::WeakPtrFactory<AppListClientImpl> weak_ptr_factory_{this}; base::WeakPtrFactory<AppListClientImpl> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AppListClientImpl);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CLIENT_IMPL_H_ #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_CLIENT_IMPL_H_
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "ash/public/cpp/app_list/app_list_switches.h" #include "ash/public/cpp/app_list/app_list_switches.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/macros.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/strings/strcat.h" #include "base/strings/strcat.h"
...@@ -425,13 +424,14 @@ IN_PROC_BROWSER_TEST_F(AppListClientSearchResultsBrowserTest, ...@@ -425,13 +424,14 @@ IN_PROC_BROWSER_TEST_F(AppListClientSearchResultsBrowserTest,
class AppListClientGuestModeBrowserTest : public InProcessBrowserTest { class AppListClientGuestModeBrowserTest : public InProcessBrowserTest {
public: public:
AppListClientGuestModeBrowserTest() {} AppListClientGuestModeBrowserTest() = default;
AppListClientGuestModeBrowserTest(const AppListClientGuestModeBrowserTest&) =
delete;
AppListClientGuestModeBrowserTest& operator=(
const AppListClientGuestModeBrowserTest&) = delete;
protected: protected:
void SetUpCommandLine(base::CommandLine* command_line) override; void SetUpCommandLine(base::CommandLine* command_line) override;
private:
DISALLOW_COPY_AND_ASSIGN(AppListClientGuestModeBrowserTest);
}; };
void AppListClientGuestModeBrowserTest::SetUpCommandLine( void AppListClientGuestModeBrowserTest::SetUpCommandLine(
...@@ -458,6 +458,8 @@ class AppListAppLaunchTest : public extensions::ExtensionBrowserTest { ...@@ -458,6 +458,8 @@ class AppListAppLaunchTest : public extensions::ExtensionBrowserTest {
AppListAppLaunchTest() : extensions::ExtensionBrowserTest() { AppListAppLaunchTest() : extensions::ExtensionBrowserTest() {
histogram_tester_ = std::make_unique<base::HistogramTester>(); histogram_tester_ = std::make_unique<base::HistogramTester>();
} }
AppListAppLaunchTest(const AppListAppLaunchTest&) = delete;
AppListAppLaunchTest& operator=(const AppListAppLaunchTest&) = delete;
~AppListAppLaunchTest() override = default; ~AppListAppLaunchTest() override = default;
// InProcessBrowserTest: // InProcessBrowserTest:
...@@ -482,8 +484,6 @@ class AppListAppLaunchTest : public extensions::ExtensionBrowserTest { ...@@ -482,8 +484,6 @@ class AppListAppLaunchTest : public extensions::ExtensionBrowserTest {
private: private:
AppListModelUpdater* model_updater_; AppListModelUpdater* model_updater_;
DISALLOW_COPY_AND_ASSIGN(AppListAppLaunchTest);
}; };
IN_PROC_BROWSER_TEST_F(AppListAppLaunchTest, IN_PROC_BROWSER_TEST_F(AppListAppLaunchTest,
......
...@@ -14,9 +14,6 @@ AppListModelBuilder::AppListModelBuilder(AppListControllerDelegate* controller, ...@@ -14,9 +14,6 @@ AppListModelBuilder::AppListModelBuilder(AppListControllerDelegate* controller,
const char* item_type) const char* item_type)
: controller_(controller), item_type_(item_type) {} : controller_(controller), item_type_(item_type) {}
AppListModelBuilder::~AppListModelBuilder() {
}
void AppListModelBuilder::Initialize(app_list::AppListSyncableService* service, void AppListModelBuilder::Initialize(app_list::AppListSyncableService* service,
Profile* profile, Profile* profile,
AppListModelUpdater* model_updater) { AppListModelUpdater* model_updater) {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/macros.h"
#include "chrome/browser/ui/app_list/app_list_model_updater.h" #include "chrome/browser/ui/app_list/app_list_model_updater.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
...@@ -23,7 +22,9 @@ class AppListModelBuilder { ...@@ -23,7 +22,9 @@ class AppListModelBuilder {
// |controller| is owned by implementation of AppListService. // |controller| is owned by implementation of AppListService.
AppListModelBuilder(AppListControllerDelegate* controller, AppListModelBuilder(AppListControllerDelegate* controller,
const char* item_type); const char* item_type);
virtual ~AppListModelBuilder(); AppListModelBuilder(const AppListModelBuilder&) = delete;
AppListModelBuilder& operator=(const AppListModelBuilder&) = delete;
virtual ~AppListModelBuilder() = default;
// Initialize to use app-list sync and sets |service_| to |service|. // Initialize to use app-list sync and sets |service_| to |service|.
// |service| is the owner of this instance. // |service| is the owner of this instance.
...@@ -71,8 +72,6 @@ class AppListModelBuilder { ...@@ -71,8 +72,6 @@ class AppListModelBuilder {
// Global constant defined for each item type. // Global constant defined for each item type.
const char* item_type_; const char* item_type_;
DISALLOW_COPY_AND_ASSIGN(AppListModelBuilder);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_ #endif // CHROME_BROWSER_UI_APP_LIST_APP_LIST_MODEL_BUILDER_H_
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include <algorithm> #include <algorithm>
#include <set>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/feature_list.h" #include "base/feature_list.h"
#include "base/macros.h"
#include "base/one_shot_event.h" #include "base/one_shot_event.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/values.h" #include "base/values.h"
...@@ -235,7 +235,8 @@ class AppListSyncableService::ModelUpdaterObserver ...@@ -235,7 +235,8 @@ class AppListSyncableService::ModelUpdaterObserver
DVLOG(2) << owner_ << ": ModelUpdaterObserver Added"; DVLOG(2) << owner_ << ": ModelUpdaterObserver Added";
owner_->GetModelUpdater()->AddObserver(this); owner_->GetModelUpdater()->AddObserver(this);
} }
ModelUpdaterObserver(const ModelUpdaterObserver&) = delete;
ModelUpdaterObserver& operator=(const ModelUpdaterObserver&) = delete;
~ModelUpdaterObserver() override { ~ModelUpdaterObserver() override {
owner_->GetModelUpdater()->RemoveObserver(this); owner_->GetModelUpdater()->RemoveObserver(this);
DVLOG(2) << owner_ << ": ModelUpdaterObserver Removed"; DVLOG(2) << owner_ << ": ModelUpdaterObserver Removed";
...@@ -285,8 +286,6 @@ class AppListSyncableService::ModelUpdaterObserver ...@@ -285,8 +286,6 @@ class AppListSyncableService::ModelUpdaterObserver
AppListSyncableService* owner_; AppListSyncableService* owner_;
std::string adding_item_id_; std::string adding_item_id_;
DISALLOW_COPY_AND_ASSIGN(ModelUpdaterObserver);
}; };
// AppListSyncableService // AppListSyncableService
...@@ -312,9 +311,7 @@ void AppListSyncableService::SetAppIsDefaultForTest(Profile* profile, ...@@ -312,9 +311,7 @@ void AppListSyncableService::SetAppIsDefaultForTest(Profile* profile,
AppListSyncableService::AppListSyncableService(Profile* profile) AppListSyncableService::AppListSyncableService(Profile* profile)
: profile_(profile), : profile_(profile),
extension_system_(extensions::ExtensionSystem::Get(profile)), extension_system_(extensions::ExtensionSystem::Get(profile)),
extension_registry_(extensions::ExtensionRegistry::Get(profile)), extension_registry_(extensions::ExtensionRegistry::Get(profile)) {
initial_sync_data_processed_(false),
first_app_list_sync_(true) {
if (g_model_updater_factory_callback_for_test_) if (g_model_updater_factory_callback_for_test_)
model_updater_ = g_model_updater_factory_callback_for_test_->Run(); model_updater_ = g_model_updater_factory_callback_for_test_->Run();
else else
......
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector>
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/one_shot_event.h" #include "base/one_shot_event.h"
...@@ -82,19 +82,22 @@ class AppListSyncableService : public syncer::SyncableService, ...@@ -82,19 +82,22 @@ class AppListSyncableService : public syncer::SyncableService,
public: public:
explicit ScopedModelUpdaterFactoryForTest( explicit ScopedModelUpdaterFactoryForTest(
const ModelUpdaterFactoryCallback& factory); const ModelUpdaterFactoryCallback& factory);
ScopedModelUpdaterFactoryForTest(const ScopedModelUpdaterFactoryForTest&) =
delete;
ScopedModelUpdaterFactoryForTest& operator=(
const ScopedModelUpdaterFactoryForTest&) = delete;
~ScopedModelUpdaterFactoryForTest(); ~ScopedModelUpdaterFactoryForTest();
private: private:
ModelUpdaterFactoryCallback factory_; ModelUpdaterFactoryCallback factory_;
DISALLOW_COPY_AND_ASSIGN(ScopedModelUpdaterFactoryForTest);
}; };
using SyncItemMap = std::map<std::string, std::unique_ptr<SyncItem>>; using SyncItemMap = std::map<std::string, std::unique_ptr<SyncItem>>;
// Populates the model when |profile|'s extension system is ready. // Populates the model when |profile|'s extension system is ready.
explicit AppListSyncableService(Profile* profile); explicit AppListSyncableService(Profile* profile);
AppListSyncableService(const AppListSyncableService&) = delete;
AppListSyncableService& operator=(const AppListSyncableService&) = delete;
~AppListSyncableService() override; ~AppListSyncableService() override;
// Registers prefs to support local storage. // Registers prefs to support local storage.
...@@ -345,8 +348,8 @@ class AppListSyncableService : public syncer::SyncableService, ...@@ -345,8 +348,8 @@ class AppListSyncableService : public syncer::SyncableService,
// another. // another.
SyncItemMap pending_transfer_map_; SyncItemMap pending_transfer_map_;
syncer::SyncableService::StartSyncFlare flare_; syncer::SyncableService::StartSyncFlare flare_;
bool initial_sync_data_processed_; bool initial_sync_data_processed_ = false;
bool first_app_list_sync_; bool first_app_list_sync_ = true;
std::string oem_folder_name_; std::string oem_folder_name_;
// Callback to install default page breaks. // Callback to install default page breaks.
// Only set for first time user for tablet form devices. // Only set for first time user for tablet form devices.
...@@ -358,8 +361,6 @@ class AppListSyncableService : public syncer::SyncableService, ...@@ -358,8 +361,6 @@ class AppListSyncableService : public syncer::SyncableService,
base::OneShotEvent on_initialized_; base::OneShotEvent on_initialized_;
base::WeakPtrFactory<AppListSyncableService> weak_ptr_factory_{this}; base::WeakPtrFactory<AppListSyncableService> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AppListSyncableService);
}; };
} // namespace app_list } // namespace app_list
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#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"
...@@ -32,6 +31,10 @@ class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory { ...@@ -32,6 +31,10 @@ class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory {
// Marks AppListSyncableService to be used in tests. // Marks AppListSyncableService to be used in tests.
static void SetUseInTesting(bool use); static void SetUseInTesting(bool use);
AppListSyncableServiceFactory(const AppListSyncableServiceFactory&) = delete;
AppListSyncableServiceFactory& operator=(
const AppListSyncableServiceFactory&) = delete;
private: private:
friend struct base::DefaultSingletonTraits<AppListSyncableServiceFactory>; friend struct base::DefaultSingletonTraits<AppListSyncableServiceFactory>;
...@@ -47,8 +50,6 @@ class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory { ...@@ -47,8 +50,6 @@ class AppListSyncableServiceFactory : public BrowserContextKeyedServiceFactory {
content::BrowserContext* context) const override; content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override; bool ServiceIsCreatedWithBrowserContext() const override;
bool ServiceIsNULLWhileTesting() const override; bool ServiceIsNULLWhileTesting() const override;
DISALLOW_COPY_AND_ASSIGN(AppListSyncableServiceFactory);
}; };
} // namespace app_list } // namespace app_list
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include <algorithm>
#include <utility>
#include "ash/public/cpp/app_list/app_list_config.h" #include "ash/public/cpp/app_list/app_list_config.h"
#include "ash/public/cpp/app_list/internal_app_id_constants.h" #include "ash/public/cpp/app_list/internal_app_id_constants.h"
#include "base/bind.h" #include "base/bind.h"
...@@ -213,6 +216,9 @@ std::string GetLastPositionString() { ...@@ -213,6 +216,9 @@ std::string GetLastPositionString() {
class AppListSyncableServiceTest : public AppListTestBase { class AppListSyncableServiceTest : public AppListTestBase {
public: public:
AppListSyncableServiceTest() = default; AppListSyncableServiceTest() = default;
AppListSyncableServiceTest(const AppListSyncableServiceTest&) = delete;
AppListSyncableServiceTest& operator=(const AppListSyncableServiceTest&) =
delete;
~AppListSyncableServiceTest() override = default; ~AppListSyncableServiceTest() override = default;
void SetUp() override { void SetUp() override {
...@@ -303,8 +309,6 @@ class AppListSyncableServiceTest : public AppListTestBase { ...@@ -303,8 +309,6 @@ class AppListSyncableServiceTest : public AppListTestBase {
std::unique_ptr< std::unique_ptr<
app_list::AppListSyncableService::ScopedModelUpdaterFactoryForTest> app_list::AppListSyncableService::ScopedModelUpdaterFactoryForTest>
model_updater_factory_scope_; model_updater_factory_scope_;
DISALLOW_COPY_AND_ASSIGN(AppListSyncableServiceTest);
}; };
TEST_F(AppListSyncableServiceTest, OEMFolderForConflictingPos) { TEST_F(AppListSyncableServiceTest, OEMFolderForConflictingPos) {
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/observer_list.h" #include "base/observer_list.h"
...@@ -250,6 +249,8 @@ class ArcAppListPrefs : public KeyedService, ...@@ -250,6 +249,8 @@ class ArcAppListPrefs : public KeyedService,
static void UprevCurrentIconsVersionForTesting(); static void UprevCurrentIconsVersionForTesting();
ArcAppListPrefs(const ArcAppListPrefs&) = delete;
ArcAppListPrefs& operator=(const ArcAppListPrefs&) = delete;
~ArcAppListPrefs() override; ~ArcAppListPrefs() override;
// Returns a list of all app ids, including ready and non-ready apps. // Returns a list of all app ids, including ready and non-ready apps.
...@@ -604,8 +605,6 @@ class ArcAppListPrefs : public KeyedService, ...@@ -604,8 +605,6 @@ class ArcAppListPrefs : public KeyedService,
base::OnceClosure app_list_refreshed_callback_; base::OnceClosure app_list_refreshed_callback_;
base::WeakPtrFactory<ArcAppListPrefs> weak_ptr_factory_{this}; base::WeakPtrFactory<ArcAppListPrefs> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ArcAppListPrefs);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_H_ #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_H_
...@@ -51,8 +51,7 @@ ArcAppListPrefsFactory::ArcAppListPrefsFactory() ...@@ -51,8 +51,7 @@ ArcAppListPrefsFactory::ArcAppListPrefsFactory()
DependsOn(NotificationDisplayServiceFactory::GetInstance()); DependsOn(NotificationDisplayServiceFactory::GetInstance());
} }
ArcAppListPrefsFactory::~ArcAppListPrefsFactory() { ArcAppListPrefsFactory::~ArcAppListPrefsFactory() = default;
}
KeyedService* ArcAppListPrefsFactory::BuildServiceInstanceFor( KeyedService* ArcAppListPrefsFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const { content::BrowserContext* context) const {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include <unordered_map> #include <unordered_map>
#include "base/macros.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "components/arc/mojom/app.mojom-forward.h" #include "components/arc/mojom/app.mojom-forward.h"
#include "components/arc/session/connection_holder.h" #include "components/arc/session/connection_holder.h"
...@@ -31,6 +30,8 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory { ...@@ -31,6 +30,8 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory {
friend struct base::DefaultSingletonTraits<ArcAppListPrefsFactory>; friend struct base::DefaultSingletonTraits<ArcAppListPrefsFactory>;
ArcAppListPrefsFactory(); ArcAppListPrefsFactory();
ArcAppListPrefsFactory(const ArcAppListPrefsFactory&) = delete;
ArcAppListPrefsFactory& operator=(const ArcAppListPrefsFactory&) = delete;
~ArcAppListPrefsFactory() override; ~ArcAppListPrefsFactory() override;
KeyedService* BuildServiceInstanceFor( KeyedService* BuildServiceInstanceFor(
...@@ -45,8 +46,6 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory { ...@@ -45,8 +46,6 @@ class ArcAppListPrefsFactory : public BrowserContextKeyedServiceFactory {
std::unique_ptr< std::unique_ptr<
arc::ConnectionHolder<arc::mojom::AppInstance, arc::mojom::AppHost>>> arc::ConnectionHolder<arc::mojom::AppInstance, arc::mojom::AppHost>>>
sync_test_app_connection_holders_; sync_test_app_connection_holders_;
DISALLOW_COPY_AND_ASSIGN(ArcAppListPrefsFactory);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_FACTORY_H_ #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_APP_LIST_PREFS_FACTORY_H_
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/arc/session/arc_session_manager_observer.h" #include "chrome/browser/chromeos/arc/session/arc_session_manager_observer.h"
...@@ -58,6 +57,8 @@ class ArcDefaultAppList : public arc::ArcSessionManagerObserver { ...@@ -58,6 +57,8 @@ class ArcDefaultAppList : public arc::ArcSessionManagerObserver {
using AppInfoMap = std::map<std::string, std::unique_ptr<AppInfo>>; using AppInfoMap = std::map<std::string, std::unique_ptr<AppInfo>>;
ArcDefaultAppList(Profile* profile, base::OnceClosure ready_callback); ArcDefaultAppList(Profile* profile, base::OnceClosure ready_callback);
ArcDefaultAppList(const ArcDefaultAppList&) = delete;
ArcDefaultAppList& operator=(const ArcDefaultAppList&) = delete;
~ArcDefaultAppList() override; ~ArcDefaultAppList() override;
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
...@@ -123,8 +124,6 @@ class ArcDefaultAppList : public arc::ArcSessionManagerObserver { ...@@ -123,8 +124,6 @@ class ArcDefaultAppList : public arc::ArcSessionManagerObserver {
base::RepeatingClosure barrier_closure_; base::RepeatingClosure barrier_closure_;
base::WeakPtrFactory<ArcDefaultAppList> weak_ptr_factory_{this}; base::WeakPtrFactory<ArcDefaultAppList> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ArcDefaultAppList);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_DEFAULT_APP_LIST_H_ #endif // CHROME_BROWSER_UI_APP_LIST_ARC_ARC_DEFAULT_APP_LIST_H_
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <utility> #include <utility>
#include "ash/public/cpp/app_list/app_list_types.h" #include "ash/public/cpp/app_list/app_list_types.h"
#include "base/macros.h"
#include "chrome/browser/ui/app_list/app_context_menu.h" #include "chrome/browser/ui/app_list/app_context_menu.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" #include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia.h"
...@@ -45,6 +44,8 @@ class ChromeAppListItem { ...@@ -45,6 +44,8 @@ class ChromeAppListItem {
ChromeAppListItem(Profile* profile, ChromeAppListItem(Profile* profile,
const std::string& app_id, const std::string& app_id,
AppListModelUpdater* model_updater); AppListModelUpdater* model_updater);
ChromeAppListItem(const ChromeAppListItem&) = delete;
ChromeAppListItem& operator=(const ChromeAppListItem&) = delete;
virtual ~ChromeAppListItem(); virtual ~ChromeAppListItem();
// AppListControllerDelegate is not properly implemented in tests. Use mock // AppListControllerDelegate is not properly implemented in tests. Use mock
...@@ -141,8 +142,6 @@ class ChromeAppListItem { ...@@ -141,8 +142,6 @@ class ChromeAppListItem {
std::unique_ptr<ash::AppListItemMetadata> metadata_; std::unique_ptr<ash::AppListItemMetadata> metadata_;
Profile* profile_; Profile* profile_;
AppListModelUpdater* model_updater_ = nullptr; AppListModelUpdater* model_updater_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ChromeAppListItem);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_ #endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_ITEM_H_
...@@ -23,6 +23,9 @@ class ChromeAppListItem; ...@@ -23,6 +23,9 @@ class ChromeAppListItem;
class ChromeAppListModelUpdater : public AppListModelUpdater { class ChromeAppListModelUpdater : public AppListModelUpdater {
public: public:
explicit ChromeAppListModelUpdater(Profile* profile); explicit ChromeAppListModelUpdater(Profile* profile);
ChromeAppListModelUpdater(const ChromeAppListModelUpdater&) = delete;
ChromeAppListModelUpdater& operator=(const ChromeAppListModelUpdater&) =
delete;
~ChromeAppListModelUpdater() override; ~ChromeAppListModelUpdater() override;
void SetActive(bool active) override; void SetActive(bool active) override;
...@@ -116,8 +119,6 @@ class ChromeAppListModelUpdater : public AppListModelUpdater { ...@@ -116,8 +119,6 @@ class ChromeAppListModelUpdater : public AppListModelUpdater {
bool search_engine_is_google_ = false; bool search_engine_is_google_ = false;
base::WeakPtrFactory<ChromeAppListModelUpdater> weak_ptr_factory_{this}; base::WeakPtrFactory<ChromeAppListModelUpdater> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(ChromeAppListModelUpdater);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_MODEL_UPDATER_H_ #endif // CHROME_BROWSER_UI_APP_LIST_CHROME_APP_LIST_MODEL_UPDATER_H_
...@@ -38,6 +38,8 @@ class OemAppPositionTest : public chromeos::LoginManagerTest { ...@@ -38,6 +38,8 @@ class OemAppPositionTest : public chromeos::LoginManagerTest {
OemAppPositionTest() : LoginManagerTest() { OemAppPositionTest() : LoginManagerTest() {
login_mixin_.AppendRegularUsers(1); login_mixin_.AppendRegularUsers(1);
} }
OemAppPositionTest(const OemAppPositionTest&) = delete;
OemAppPositionTest& operator=(const OemAppPositionTest&) = delete;
~OemAppPositionTest() override = default; ~OemAppPositionTest() override = default;
// LoginManagerTest: // LoginManagerTest:
...@@ -66,9 +68,6 @@ class OemAppPositionTest : public chromeos::LoginManagerTest { ...@@ -66,9 +68,6 @@ class OemAppPositionTest : public chromeos::LoginManagerTest {
} }
chromeos::LoginManagerMixin login_mixin_{&mixin_host_}; chromeos::LoginManagerMixin login_mixin_{&mixin_host_};
private:
DISALLOW_COPY_AND_ASSIGN(OemAppPositionTest);
}; };
class AppPositionReorderingTest : public extensions::ExtensionBrowserTest { class AppPositionReorderingTest : public extensions::ExtensionBrowserTest {
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/callback_list.h" #include "base/callback_list.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
#include "chrome/browser/ui/app_list/search/search_result_ranker/app_list_launch_recorder.h" #include "chrome/browser/ui/app_list/search/search_result_ranker/app_list_launch_recorder.h"
...@@ -33,6 +32,9 @@ class AppListLaunchMetricsProviderTest; ...@@ -33,6 +32,9 @@ class AppListLaunchMetricsProviderTest;
// logging events should be sent to AppListLaunchRecorder. // logging events should be sent to AppListLaunchRecorder.
class AppListLaunchMetricsProvider : public metrics::MetricsProvider { class AppListLaunchMetricsProvider : public metrics::MetricsProvider {
public: public:
AppListLaunchMetricsProvider(const AppListLaunchMetricsProvider&) = delete;
AppListLaunchMetricsProvider& operator=(const AppListLaunchMetricsProvider&) =
delete;
~AppListLaunchMetricsProvider() override; ~AppListLaunchMetricsProvider() override;
// metrics::MetricsProvider: // metrics::MetricsProvider:
...@@ -69,8 +71,6 @@ class AppListLaunchMetricsProvider : public metrics::MetricsProvider { ...@@ -69,8 +71,6 @@ class AppListLaunchMetricsProvider : public metrics::MetricsProvider {
SEQUENCE_CHECKER(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<AppListLaunchMetricsProvider> weak_factory_{this}; base::WeakPtrFactory<AppListLaunchMetricsProvider> weak_factory_{this};
DISALLOW_COPY_AND_ASSIGN(AppListLaunchMetricsProvider);
}; };
} // namespace app_list } // namespace app_list
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/callback_list.h" #include "base/callback_list.h"
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/no_destructor.h" #include "base/no_destructor.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/sequence_checker.h" #include "base/sequence_checker.h"
...@@ -53,6 +52,9 @@ class AppListLaunchRecorder { ...@@ -53,6 +52,9 @@ class AppListLaunchRecorder {
static AppListLaunchRecorder* GetInstance(); static AppListLaunchRecorder* GetInstance();
AppListLaunchRecorder(const AppListLaunchRecorder&) = delete;
AppListLaunchRecorder& operator=(const AppListLaunchRecorder&) = delete;
private: private:
friend class base::NoDestructor<AppListLaunchRecorder>; friend class base::NoDestructor<AppListLaunchRecorder>;
friend class app_list::AppListLaunchMetricsProvider; friend class app_list::AppListLaunchMetricsProvider;
...@@ -98,8 +100,6 @@ class AppListLaunchRecorder { ...@@ -98,8 +100,6 @@ class AppListLaunchRecorder {
LaunchEventCallbackList callback_list_; LaunchEventCallbackList callback_list_;
SEQUENCE_CHECKER(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_);
DISALLOW_COPY_AND_ASSIGN(AppListLaunchRecorder);
}; };
} // namespace app_list } // namespace app_list
......
...@@ -19,6 +19,8 @@ class ChromeAppListItem; ...@@ -19,6 +19,8 @@ class ChromeAppListItem;
class FakeAppListModelUpdater : public AppListModelUpdater { class FakeAppListModelUpdater : public AppListModelUpdater {
public: public:
explicit FakeAppListModelUpdater(Profile* profile = nullptr); explicit FakeAppListModelUpdater(Profile* profile = nullptr);
FakeAppListModelUpdater(const FakeAppListModelUpdater&) = delete;
FakeAppListModelUpdater& operator=(const FakeAppListModelUpdater&) = delete;
~FakeAppListModelUpdater() override; ~FakeAppListModelUpdater() override;
// For AppListModel: // For AppListModel:
...@@ -91,8 +93,6 @@ class FakeAppListModelUpdater : public AppListModelUpdater { ...@@ -91,8 +93,6 @@ class FakeAppListModelUpdater : public AppListModelUpdater {
const std::string& oem_folder_name, const std::string& oem_folder_name,
const syncer::StringOrdinal& preferred_oem_position); const syncer::StringOrdinal& preferred_oem_position);
syncer::StringOrdinal GetOemFolderPos(); syncer::StringOrdinal GetOemFolderPos();
DISALLOW_COPY_AND_ASSIGN(FakeAppListModelUpdater);
}; };
#endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_APP_LIST_MODEL_UPDATER_H_ #endif // CHROME_BROWSER_UI_APP_LIST_TEST_FAKE_APP_LIST_MODEL_UPDATER_H_
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