Commit 226e91fc authored by David Bienvenu's avatar David Bienvenu Committed by Commit Bot

Remove DISALLOW_COPY_AND_ASSIGN from chrome\browser\apps\*

Also fixes some cpp lint warnings; no functional changes.

Bug: 1010217
Change-Id: I50e8b55a7f63402bba2aa0990c7d445bd8665e1c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446990Reviewed-by: default avatarBen Wells <benwells@chromium.org>
Commit-Queue: David Bienvenu <davidbienvenu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814503}
parent 7c051ee5
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
#ifndef CHROME_BROWSER_APPS_APP_SERVICE_APP_ICON_SOURCE_H_ #ifndef CHROME_BROWSER_APPS_APP_SERVICE_APP_ICON_SOURCE_H_
#define CHROME_BROWSER_APPS_APP_SERVICE_APP_ICON_SOURCE_H_ #define CHROME_BROWSER_APPS_APP_SERVICE_APP_ICON_SOURCE_H_
#include "base/macros.h" #include <string>
#include "content/public/browser/url_data_source.h" #include "content/public/browser/url_data_source.h"
class Profile; class Profile;
...@@ -32,6 +33,8 @@ namespace apps { ...@@ -32,6 +33,8 @@ namespace apps {
class AppIconSource : public content::URLDataSource { class AppIconSource : public content::URLDataSource {
public: public:
explicit AppIconSource(Profile* profile); explicit AppIconSource(Profile* profile);
AppIconSource(const AppIconSource&) = delete;
AppIconSource& operator=(const AppIconSource&) = delete;
~AppIconSource() override; ~AppIconSource() override;
static GURL GetIconURL(const std::string& app_id, int icon_size); static GURL GetIconURL(const std::string& app_id, int icon_size);
...@@ -48,8 +51,6 @@ class AppIconSource : public content::URLDataSource { ...@@ -48,8 +51,6 @@ class AppIconSource : public content::URLDataSource {
private: private:
Profile* const profile_; Profile* const profile_;
DISALLOW_COPY_AND_ASSIGN(AppIconSource);
}; };
} // namespace apps } // namespace apps
......
...@@ -57,7 +57,7 @@ void IntentPickerAutoDisplayPref::IncrementCounter() { ...@@ -57,7 +57,7 @@ void IntentPickerAutoDisplayPref::IncrementCounter() {
Commit(); Commit();
} }
bool IntentPickerAutoDisplayPref::HasExceededThreshold() { bool IntentPickerAutoDisplayPref::HasExceededThreshold() const {
return ui_dismissed_counter_ < kDismissThreshold; return ui_dismissed_counter_ < kDismissThreshold;
} }
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <memory> #include <memory>
#include "base/macros.h"
#include "base/values.h" #include "base/values.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -23,11 +22,14 @@ class IntentPickerAutoDisplayPref final { ...@@ -23,11 +22,14 @@ class IntentPickerAutoDisplayPref final {
IntentPickerAutoDisplayPref(const GURL& origin, IntentPickerAutoDisplayPref(const GURL& origin,
HostContentSettingsMap* settings); HostContentSettingsMap* settings);
IntentPickerAutoDisplayPref(const IntentPickerAutoDisplayPref&) = delete;
IntentPickerAutoDisplayPref& operator=(const IntentPickerAutoDisplayPref&) =
delete;
~IntentPickerAutoDisplayPref(); ~IntentPickerAutoDisplayPref();
void IncrementCounter(); void IncrementCounter();
bool HasExceededThreshold(); bool HasExceededThreshold() const;
Platform GetPlatform(); Platform GetPlatform();
...@@ -60,8 +62,6 @@ class IntentPickerAutoDisplayPref final { ...@@ -60,8 +62,6 @@ class IntentPickerAutoDisplayPref final {
// Content settings map used to persist the local values. // Content settings map used to persist the local values.
HostContentSettingsMap* settings_map_; HostContentSettingsMap* settings_map_;
DISALLOW_COPY_AND_ASSIGN(IntentPickerAutoDisplayPref);
}; };
#endif // CHROME_BROWSER_APPS_INTENT_HELPER_INTENT_PICKER_AUTO_DISPLAY_PREF_H_ #endif // CHROME_BROWSER_APPS_INTENT_HELPER_INTENT_PICKER_AUTO_DISPLAY_PREF_H_
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
#ifndef CHROME_BROWSER_APPS_INTENT_HELPER_MAC_APPS_NAVIGATION_THROTTLE_H_ #ifndef CHROME_BROWSER_APPS_INTENT_HELPER_MAC_APPS_NAVIGATION_THROTTLE_H_
#define CHROME_BROWSER_APPS_INTENT_HELPER_MAC_APPS_NAVIGATION_THROTTLE_H_ #define CHROME_BROWSER_APPS_INTENT_HELPER_MAC_APPS_NAVIGATION_THROTTLE_H_
#include <memory>
#include <string>
#include <vector>
#include "chrome/browser/apps/intent_helper/apps_navigation_throttle.h" #include "chrome/browser/apps/intent_helper/apps_navigation_throttle.h"
// This file implements support for the macOS feature of Universal Links, // This file implements support for the macOS feature of Universal Links,
...@@ -32,6 +36,9 @@ class MacAppsNavigationThrottle : public apps::AppsNavigationThrottle { ...@@ -32,6 +36,9 @@ class MacAppsNavigationThrottle : public apps::AppsNavigationThrottle {
explicit MacAppsNavigationThrottle( explicit MacAppsNavigationThrottle(
content::NavigationHandle* navigation_handle); content::NavigationHandle* navigation_handle);
MacAppsNavigationThrottle(const MacAppsNavigationThrottle&) = delete;
MacAppsNavigationThrottle& operator=(const MacAppsNavigationThrottle&) =
delete;
~MacAppsNavigationThrottle() override; ~MacAppsNavigationThrottle() override;
private: private:
...@@ -64,8 +71,6 @@ class MacAppsNavigationThrottle : public apps::AppsNavigationThrottle { ...@@ -64,8 +71,6 @@ class MacAppsNavigationThrottle : public apps::AppsNavigationThrottle {
content::WebContents* web_contents, content::WebContents* web_contents,
IntentPickerAutoDisplayService* ui_auto_display_service, IntentPickerAutoDisplayService* ui_auto_display_service,
const GURL& url) override; const GURL& url) override;
DISALLOW_COPY_AND_ASSIGN(MacAppsNavigationThrottle);
}; };
} // namespace apps } // namespace apps
......
...@@ -19,6 +19,8 @@ namespace { ...@@ -19,6 +19,8 @@ namespace {
class AppsBrowserApiTest : public extensions::ExtensionApiTest { class AppsBrowserApiTest : public extensions::ExtensionApiTest {
public: public:
AppsBrowserApiTest() = default; AppsBrowserApiTest() = default;
AppsBrowserApiTest(const AppsBrowserApiTest&) = delete;
AppsBrowserApiTest& operator=(const AppsBrowserApiTest&) = delete;
~AppsBrowserApiTest() override = default; ~AppsBrowserApiTest() override = default;
// extensions::ExtensionApiTest: // extensions::ExtensionApiTest:
...@@ -27,9 +29,6 @@ class AppsBrowserApiTest : public extensions::ExtensionApiTest { ...@@ -27,9 +29,6 @@ class AppsBrowserApiTest : public extensions::ExtensionApiTest {
host_resolver()->AddRule("*", "127.0.0.1"); host_resolver()->AddRule("*", "127.0.0.1");
ASSERT_TRUE(StartEmbeddedTestServer()); ASSERT_TRUE(StartEmbeddedTestServer());
} }
private:
DISALLOW_COPY_AND_ASSIGN(AppsBrowserApiTest);
}; };
} // namespace } // namespace
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/callback.h" #include "base/callback.h"
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/numerics/safe_conversions.h" #include "base/numerics/safe_conversions.h"
#include "base/stl_util.h" #include "base/stl_util.h"
...@@ -226,6 +225,8 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener, ...@@ -226,6 +225,8 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener,
select_file_dialog_ = ui::SelectFileDialog::Create( select_file_dialog_ = ui::SelectFileDialog::Create(
this, std::make_unique<ChromeSelectFilePolicy>(web_contents)); this, std::make_unique<ChromeSelectFilePolicy>(web_contents));
} }
SelectDirectoryDialog(const SelectDirectoryDialog&) = delete;
SelectDirectoryDialog& operator=(const SelectDirectoryDialog&) = delete;
void Show(const base::FilePath& default_path) { void Show(const base::FilePath& default_path) {
AddRef(); // Balanced in the two reachable listener outcomes. AddRef(); // Balanced in the two reachable listener outcomes.
...@@ -256,13 +257,11 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener, ...@@ -256,13 +257,11 @@ class SelectDirectoryDialog : public ui::SelectFileDialog::Listener,
private: private:
friend class base::RefCounted<SelectDirectoryDialog>; friend class base::RefCounted<SelectDirectoryDialog>;
~SelectDirectoryDialog() override {} ~SelectDirectoryDialog() override = default;
scoped_refptr<ui::SelectFileDialog> select_file_dialog_; scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
WebContents* web_contents_; WebContents* web_contents_;
Callback callback_; Callback callback_;
DISALLOW_COPY_AND_ASSIGN(SelectDirectoryDialog);
}; };
// Returns a web contents to use as the source for a prompt showing to the user. // Returns a web contents to use as the source for a prompt showing to the user.
...@@ -304,7 +303,7 @@ MediaGalleriesEventRouter::MediaGalleriesEventRouter( ...@@ -304,7 +303,7 @@ MediaGalleriesEventRouter::MediaGalleriesEventRouter(
gallery_watch_manager()->AddObserver(profile_, this); gallery_watch_manager()->AddObserver(profile_, this);
} }
MediaGalleriesEventRouter::~MediaGalleriesEventRouter() {} MediaGalleriesEventRouter::~MediaGalleriesEventRouter() = default;
void MediaGalleriesEventRouter::Shutdown() { void MediaGalleriesEventRouter::Shutdown() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <vector> #include <vector>
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "chrome/browser/media_galleries/gallery_watch_manager_observer.h" #include "chrome/browser/media_galleries/gallery_watch_manager_observer.h"
#include "chrome/browser/media_galleries/media_file_system_registry.h" #include "chrome/browser/media_galleries/media_file_system_registry.h"
...@@ -43,6 +42,9 @@ class MediaGalleriesEventRouter : public extensions::BrowserContextKeyedAPI, ...@@ -43,6 +42,9 @@ class MediaGalleriesEventRouter : public extensions::BrowserContextKeyedAPI,
public GalleryWatchManagerObserver, public GalleryWatchManagerObserver,
public extensions::EventRouter::Observer { public extensions::EventRouter::Observer {
public: public:
MediaGalleriesEventRouter(const MediaGalleriesEventRouter&) = delete;
MediaGalleriesEventRouter& operator=(const MediaGalleriesEventRouter&) =
delete;
// KeyedService implementation. // KeyedService implementation.
void Shutdown() override; void Shutdown() override;
...@@ -85,8 +87,6 @@ class MediaGalleriesEventRouter : public extensions::BrowserContextKeyedAPI, ...@@ -85,8 +87,6 @@ class MediaGalleriesEventRouter : public extensions::BrowserContextKeyedAPI,
Profile* profile_; Profile* profile_;
base::WeakPtrFactory<MediaGalleriesEventRouter> weak_ptr_factory_{this}; base::WeakPtrFactory<MediaGalleriesEventRouter> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesEventRouter);
}; };
class MediaGalleriesGetMediaFileSystemsFunction : public ExtensionFunction { class MediaGalleriesGetMediaFileSystemsFunction : public ExtensionFunction {
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/stl_util.h" #include "base/stl_util.h"
...@@ -110,7 +109,9 @@ class TabsAddedNotificationObserver : public TabStripModelObserver { ...@@ -110,7 +109,9 @@ class TabsAddedNotificationObserver : public TabStripModelObserver {
: observations_(observations) { : observations_(observations) {
browser->tab_strip_model()->AddObserver(this); browser->tab_strip_model()->AddObserver(this);
} }
TabsAddedNotificationObserver(const TabsAddedNotificationObserver&) = delete;
TabsAddedNotificationObserver& operator=(
const TabsAddedNotificationObserver&) = delete;
~TabsAddedNotificationObserver() override = default; ~TabsAddedNotificationObserver() override = default;
// TabStripModelObserver: // TabStripModelObserver:
...@@ -136,8 +137,6 @@ class TabsAddedNotificationObserver : public TabStripModelObserver { ...@@ -136,8 +137,6 @@ class TabsAddedNotificationObserver : public TabStripModelObserver {
base::RunLoop run_loop_; base::RunLoop run_loop_;
size_t observations_; size_t observations_;
std::vector<content::WebContents*> observed_tabs_; std::vector<content::WebContents*> observed_tabs_;
DISALLOW_COPY_AND_ASSIGN(TabsAddedNotificationObserver);
}; };
#if BUILDFLAG(ENABLE_PRINT_PREVIEW) #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
...@@ -1304,6 +1303,8 @@ IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest, ...@@ -1304,6 +1303,8 @@ IN_PROC_BROWSER_TEST_F(PlatformAppIncognitoBrowserTest,
class RestartDeviceTest : public PlatformAppBrowserTest { class RestartDeviceTest : public PlatformAppBrowserTest {
public: public:
RestartDeviceTest() = default; RestartDeviceTest() = default;
RestartDeviceTest(const RestartDeviceTest&) = delete;
RestartDeviceTest& operator=(const RestartDeviceTest&) = delete;
~RestartDeviceTest() override = default; ~RestartDeviceTest() override = default;
// PlatformAppBrowserTest overrides // PlatformAppBrowserTest overrides
...@@ -1343,8 +1344,6 @@ class RestartDeviceTest : public PlatformAppBrowserTest { ...@@ -1343,8 +1344,6 @@ class RestartDeviceTest : public PlatformAppBrowserTest {
private: private:
chromeos::MockUserManager* mock_user_manager_ = nullptr; chromeos::MockUserManager* mock_user_manager_ = nullptr;
std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_; std::unique_ptr<user_manager::ScopedUserManager> user_manager_enabler_;
DISALLOW_COPY_AND_ASSIGN(RestartDeviceTest);
}; };
// Tests that chrome.runtime.restart would request device restart in // Tests that chrome.runtime.restart would request device restart in
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <utility>
#include <vector> #include <vector>
#include "base/macros.h"
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/policy/profile_policy_connector.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h" #include "chrome/browser/supervised_user/supervised_user_constants.h"
...@@ -36,6 +36,8 @@ std::unique_ptr<base::DictionaryValue> CreateJsonWithFilter( ...@@ -36,6 +36,8 @@ std::unique_ptr<base::DictionaryValue> CreateJsonWithFilter(
class UserTypeFilterTest : public testing::Test { class UserTypeFilterTest : public testing::Test {
public: public:
UserTypeFilterTest() = default; UserTypeFilterTest() = default;
UserTypeFilterTest(const UserTypeFilterTest&) = delete;
UserTypeFilterTest& operator=(const UserTypeFilterTest&) = delete;
~UserTypeFilterTest() override = default; ~UserTypeFilterTest() override = default;
protected: protected:
...@@ -70,8 +72,6 @@ class UserTypeFilterTest : public testing::Test { ...@@ -70,8 +72,6 @@ class UserTypeFilterTest : public testing::Test {
private: private:
// To support context of browser threads. // To support context of browser threads.
content::BrowserTaskEnvironment task_environment_; content::BrowserTaskEnvironment task_environment_;
DISALLOW_COPY_AND_ASSIGN(UserTypeFilterTest);
}; };
#if BUILDFLAG(ENABLE_SUPERVISED_USERS) #if BUILDFLAG(ENABLE_SUPERVISED_USERS)
......
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