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