Remove DISALLOW_* macros from chrome/
This inlines all remaining DISALLOW_* macros in chrome/. This is done
manually (vim regex + manually finding insertion position).
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: Idb18af9d32397a302fe0fcf51636160f744a572e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3192336
Commit-Queue: Peter Boström <pbos@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#926874}
diff --git a/chrome/app/chrome_crash_reporter_client.h b/chrome/app/chrome_crash_reporter_client.h
index 75afb31..8f633f1 100644
--- a/chrome/app/chrome_crash_reporter_client.h
+++ b/chrome/app/chrome_crash_reporter_client.h
@@ -21,6 +21,10 @@
public:
static void Create();
+ ChromeCrashReporterClient(const ChromeCrashReporterClient&) = delete;
+ ChromeCrashReporterClient& operator=(const ChromeCrashReporterClient&) =
+ delete;
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
// If true, processes of this type should pass crash-loop-before down to the
// crash reporter and to their children (if the children's type is a process
@@ -72,8 +76,6 @@
ChromeCrashReporterClient();
~ChromeCrashReporterClient() override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeCrashReporterClient);
};
#endif // OS_WIN
diff --git a/chrome/browser/accessibility/accessibility_labels_service_browsertest.cc b/chrome/browser/accessibility/accessibility_labels_service_browsertest.cc
index aa75e7b..6f26f02fc 100644
--- a/chrome/browser/accessibility/accessibility_labels_service_browsertest.cc
+++ b/chrome/browser/accessibility/accessibility_labels_service_browsertest.cc
@@ -25,6 +25,11 @@
public:
AccessibilityLabelsBrowserTest() {}
+ AccessibilityLabelsBrowserTest(const AccessibilityLabelsBrowserTest&) =
+ delete;
+ AccessibilityLabelsBrowserTest& operator=(
+ const AccessibilityLabelsBrowserTest&) = delete;
+
// InProcessBrowserTest overrides:
void SetUp() override {
scoped_feature_list_.InitAndEnableFeature(
@@ -52,7 +57,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
- DISALLOW_COPY_AND_ASSIGN(AccessibilityLabelsBrowserTest);
};
// Changing the kAccessibilityImageLabelsEnabled pref should affect the
diff --git a/chrome/browser/accessibility/caption_settings_dialog.h b/chrome/browser/accessibility/caption_settings_dialog.h
index d6f08fa..91fc549 100644
--- a/chrome/browser/accessibility/caption_settings_dialog.h
+++ b/chrome/browser/accessibility/caption_settings_dialog.h
@@ -13,11 +13,12 @@
// sub-section of Settings.
class CaptionSettingsDialog {
public:
+ CaptionSettingsDialog() = delete;
+ CaptionSettingsDialog(const CaptionSettingsDialog&) = delete;
+ CaptionSettingsDialog& operator=(const CaptionSettingsDialog&) = delete;
+
// Displays the native captions manager dialog.
static void ShowCaptionSettingsDialog();
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(CaptionSettingsDialog);
};
} // namespace captions
diff --git a/chrome/browser/accessibility/image_annotation_browsertest.cc b/chrome/browser/accessibility/image_annotation_browsertest.cc
index c03a618..2f8e7f9 100644
--- a/chrome/browser/accessibility/image_annotation_browsertest.cc
+++ b/chrome/browser/accessibility/image_annotation_browsertest.cc
@@ -224,6 +224,10 @@
https_server_.AddDefaultHandlers(base::FilePath(kDocRoot));
}
+ ImageAnnotationBrowserTest(const ImageAnnotationBrowserTest&) = delete;
+ ImageAnnotationBrowserTest& operator=(const ImageAnnotationBrowserTest&) =
+ delete;
+
protected:
void SetUp() override {
scoped_feature_list_.InitWithFeatures(
@@ -277,8 +281,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageAnnotationBrowserTest);
};
IN_PROC_BROWSER_TEST_F(ImageAnnotationBrowserTest,
diff --git a/chrome/browser/after_startup_task_utils.h b/chrome/browser/after_startup_task_utils.h
index 13613842..cd5ab77 100644
--- a/chrome/browser/after_startup_task_utils.h
+++ b/chrome/browser/after_startup_task_utils.h
@@ -21,6 +21,10 @@
class AfterStartupTaskUtils {
public:
+ AfterStartupTaskUtils() = delete;
+ AfterStartupTaskUtils(const AfterStartupTaskUtils&) = delete;
+ AfterStartupTaskUtils& operator=(const AfterStartupTaskUtils&) = delete;
+
// Observes startup and when complete runs tasks that have accrued.
static void StartMonitoringStartup();
@@ -50,8 +54,6 @@
friend class android::AfterStartupTaskUtilsJNI;
static void SetBrowserStartupIsComplete();
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(AfterStartupTaskUtils);
};
#endif // CHROME_BROWSER_AFTER_STARTUP_TASK_UTILS_H_
diff --git a/chrome/browser/android/background_sync_launcher_android.h b/chrome/browser/android/background_sync_launcher_android.h
index 5fbc531..5abfce7 100644
--- a/chrome/browser/android/background_sync_launcher_android.h
+++ b/chrome/browser/android/background_sync_launcher_android.h
@@ -20,6 +20,10 @@
public:
static BackgroundSyncLauncherAndroid* Get();
+ BackgroundSyncLauncherAndroid(const BackgroundSyncLauncherAndroid&) = delete;
+ BackgroundSyncLauncherAndroid& operator=(
+ const BackgroundSyncLauncherAndroid&) = delete;
+
// Schedules a BackgroundTaskScheduler task for |sync_type| with delay |delay|
// to ensure that the browser is running when the device next goes online
// after that time has passed. If |delay| is base::TimeDelta::Max(), the
@@ -59,8 +63,6 @@
base::android::ScopedJavaGlobalRef<jobject>
java_background_sync_background_task_scheduler_launcher_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundSyncLauncherAndroid);
};
#endif // CHROME_BROWSER_ANDROID_BACKGROUND_SYNC_LAUNCHER_ANDROID_H_
diff --git a/chrome/browser/android/bookmarks/bookmark_bridge.h b/chrome/browser/android/bookmarks/bookmark_bridge.h
index 4d6018e5..7d2b3039 100644
--- a/chrome/browser/android/bookmarks/bookmark_bridge.h
+++ b/chrome/browser/android/bookmarks/bookmark_bridge.h
@@ -44,6 +44,10 @@
BookmarkBridge(JNIEnv* env,
const base::android::JavaRef<jobject>& obj,
const base::android::JavaRef<jobject>& j_profile);
+
+ BookmarkBridge(const BookmarkBridge&) = delete;
+ BookmarkBridge& operator=(const BookmarkBridge&) = delete;
+
void Destroy(JNIEnv*, const base::android::JavaParamRef<jobject>&);
jlong GetBookmarkIdForWebContents(
@@ -359,8 +363,6 @@
// Observes the profile destruction and creation.
base::ScopedObservation<Profile, ProfileObserver> profile_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkBridge);
};
#endif // CHROME_BROWSER_ANDROID_BOOKMARKS_BOOKMARK_BRIDGE_H_
diff --git a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
index 0b39abe..138c56a 100644
--- a/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
+++ b/chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc
@@ -28,17 +28,21 @@
class MockObserver : public PartnerBookmarksShim::Observer {
public:
MockObserver() {}
+
+ MockObserver(const MockObserver&) = delete;
+ MockObserver& operator=(const MockObserver&) = delete;
+
MOCK_METHOD1(PartnerShimChanged, void(PartnerBookmarksShim*));
MOCK_METHOD1(PartnerShimLoaded, void(PartnerBookmarksShim*));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockObserver);
};
class PartnerBookmarksShimTest : public testing::Test {
public:
PartnerBookmarksShimTest() = default;
+ PartnerBookmarksShimTest(const PartnerBookmarksShimTest&) = delete;
+ PartnerBookmarksShimTest& operator=(const PartnerBookmarksShimTest&) = delete;
+
PartnerBookmarksShim* partner_bookmarks_shim() const {
return PartnerBookmarksShim::BuildForBrowserContext(profile_.get());
}
@@ -65,9 +69,6 @@
content::BrowserTaskEnvironment task_environment_;
MockObserver observer_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PartnerBookmarksShimTest);
};
TEST_F(PartnerBookmarksShimTest, GetNodeByID) {
diff --git a/chrome/browser/android/compositor/compositor_view.h b/chrome/browser/android/compositor/compositor_view.h
index 2f9c46e..37c4d53 100644
--- a/chrome/browser/android/compositor/compositor_view.h
+++ b/chrome/browser/android/compositor/compositor_view.h
@@ -47,6 +47,9 @@
ui::WindowAndroid* window_android,
TabContentManager* tab_content_manager);
+ CompositorView(const CompositorView&) = delete;
+ CompositorView& operator=(const CompositorView&) = delete;
+
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& object);
ui::ResourceManager* GetResourceManager();
@@ -149,8 +152,6 @@
bool overlay_immersive_ar_mode_;
base::WeakPtrFactory<CompositorView> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CompositorView);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/content_layer.h b/chrome/browser/android/compositor/layer/content_layer.h
index 1ee55b1c..7889c1f 100644
--- a/chrome/browser/android/compositor/layer/content_layer.h
+++ b/chrome/browser/android/compositor/layer/content_layer.h
@@ -27,6 +27,10 @@
public:
static scoped_refptr<ContentLayer> Create(
TabContentManager* tab_content_manager);
+
+ ContentLayer(const ContentLayer&) = delete;
+ ContentLayer& operator=(const ContentLayer&) = delete;
+
void SetProperties(int id,
bool can_use_live_layer,
float static_to_view_blend,
@@ -48,9 +52,6 @@
// is available).
scoped_refptr<cc::Layer> layer_;
TabContentManager* tab_content_manager_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ContentLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/layer.h b/chrome/browser/android/compositor/layer/layer.h
index c02b0d1..5b4620d9 100644
--- a/chrome/browser/android/compositor/layer/layer.h
+++ b/chrome/browser/android/compositor/layer/layer.h
@@ -17,6 +17,9 @@
// layers and add functionalities to it.
class Layer : public base::RefCounted<Layer> {
public:
+ Layer(const Layer&) = delete;
+ Layer& operator=(const Layer&) = delete;
+
virtual scoped_refptr<cc::Layer> layer() = 0;
protected:
@@ -25,8 +28,6 @@
private:
friend class base::RefCounted<Layer>;
-
- DISALLOW_COPY_AND_ASSIGN(Layer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/tab_handle_layer.h b/chrome/browser/android/compositor/layer/tab_handle_layer.h
index baf4b8f9..eff4eca 100644
--- a/chrome/browser/android/compositor/layer/tab_handle_layer.h
+++ b/chrome/browser/android/compositor/layer/tab_handle_layer.h
@@ -30,6 +30,9 @@
static scoped_refptr<TabHandleLayer> Create(
LayerTitleCache* layer_title_cache);
+ TabHandleLayer(const TabHandleLayer&) = delete;
+ TabHandleLayer& operator=(const TabHandleLayer&) = delete;
+
void SetProperties(int id,
ui::Resource* close_button_resource,
ui::NinePatchResource* tab_handle_resource,
@@ -63,8 +66,6 @@
float brightness_;
bool foreground_;
-
- DISALLOW_COPY_AND_ASSIGN(TabHandleLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/tab_layer.h b/chrome/browser/android/compositor/layer/tab_layer.h
index 13cbab7..01115c4 100644
--- a/chrome/browser/android/compositor/layer/tab_layer.h
+++ b/chrome/browser/android/compositor/layer/tab_layer.h
@@ -44,6 +44,9 @@
LayerTitleCache* layer_title_cache,
TabContentManager* tab_content_manager);
+ TabLayer(const TabLayer&) = delete;
+ TabLayer& operator=(const TabLayer&) = delete;
+
// TODO(meiliang): This method needs another parameter, a resource that can be
// used to indicate the currently selected tab for the TabLayer.
void SetProperties(int id,
@@ -163,8 +166,6 @@
scoped_refptr<cc::NinePatchLayer> shadow_;
scoped_refptr<cc::UIResourceLayer> back_logo_;
float brightness_;
-
- DISALLOW_COPY_AND_ASSIGN(TabLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/tabgroup_content_layer.h b/chrome/browser/android/compositor/layer/tabgroup_content_layer.h
index c7670a7..0f66318 100644
--- a/chrome/browser/android/compositor/layer/tabgroup_content_layer.h
+++ b/chrome/browser/android/compositor/layer/tabgroup_content_layer.h
@@ -25,6 +25,9 @@
static scoped_refptr<TabGroupContentLayer> Create(
TabContentManager* tab_content_manager);
+ TabGroupContentLayer(const TabGroupContentLayer&) = delete;
+ TabGroupContentLayer& operator=(const TabGroupContentLayer&) = delete;
+
void SetProperties(int id,
const std::vector<int>& tab_ids,
bool can_use_live_layer,
@@ -43,7 +46,6 @@
private:
std::vector<scoped_refptr<TabGroupTabContentLayer>> group_tab_content_layers_;
- DISALLOW_COPY_AND_ASSIGN(TabGroupContentLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/tabgroup_tab_content_layer.h b/chrome/browser/android/compositor/layer/tabgroup_tab_content_layer.h
index e12bbfc..dc391400 100644
--- a/chrome/browser/android/compositor/layer/tabgroup_tab_content_layer.h
+++ b/chrome/browser/android/compositor/layer/tabgroup_tab_content_layer.h
@@ -30,6 +30,9 @@
static scoped_refptr<TabGroupTabContentLayer> Create(
TabContentManager* tab_content_manager);
+ TabGroupTabContentLayer(const TabGroupTabContentLayer&) = delete;
+ TabGroupTabContentLayer& operator=(const TabGroupTabContentLayer&) = delete;
+
void SetProperties(int id,
bool can_use_live_layer,
float static_to_view_blend,
@@ -55,7 +58,6 @@
scoped_refptr<cc::Layer> layer_;
scoped_refptr<ContentLayer> content_;
scoped_refptr<cc::NinePatchLayer> front_border_inner_shadow_;
- DISALLOW_COPY_AND_ASSIGN(TabGroupTabContentLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/thumbnail_layer.h b/chrome/browser/android/compositor/layer/thumbnail_layer.h
index 5537059..06b83c0 100644
--- a/chrome/browser/android/compositor/layer/thumbnail_layer.h
+++ b/chrome/browser/android/compositor/layer/thumbnail_layer.h
@@ -28,6 +28,10 @@
public:
// Creates a ThumbnailLayer.
static scoped_refptr<ThumbnailLayer> Create();
+
+ ThumbnailLayer(const ThumbnailLayer&) = delete;
+ ThumbnailLayer& operator=(const ThumbnailLayer&) = delete;
+
// Sets thumbnail that will be shown. |thumbnail| should not be nullptr.
void SetThumbnail(Thumbnail* thumbnail);
// Clip the thumbnail to the given |clipping|.
@@ -54,8 +58,6 @@
gfx::Rect last_clipping_;
bool clipped_ = false;
gfx::SizeF resource_size_;
-
- DISALLOW_COPY_AND_ASSIGN(ThumbnailLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer/toolbar_layer.h b/chrome/browser/android/compositor/layer/toolbar_layer.h
index 4256fdb1..ebb8c4c 100644
--- a/chrome/browser/android/compositor/layer/toolbar_layer.h
+++ b/chrome/browser/android/compositor/layer/toolbar_layer.h
@@ -24,6 +24,9 @@
static scoped_refptr<ToolbarLayer> Create(
ui::ResourceManager* resource_manager);
+ ToolbarLayer(const ToolbarLayer&) = delete;
+ ToolbarLayer& operator=(const ToolbarLayer&) = delete;
+
// Implements Layer
scoped_refptr<cc::Layer> layer() override;
@@ -66,8 +69,6 @@
scoped_refptr<cc::SolidColorLayer> progress_bar_layer_;
scoped_refptr<cc::SolidColorLayer> progress_bar_background_layer_;
scoped_refptr<cc::SolidColorLayer> debug_layer_;
-
- DISALLOW_COPY_AND_ASSIGN(ToolbarLayer);
};
} // namespace android
diff --git a/chrome/browser/android/compositor/layer_title_cache.h b/chrome/browser/android/compositor/layer_title_cache.h
index bc3c34d5..5efe8d2 100644
--- a/chrome/browser/android/compositor/layer_title_cache.h
+++ b/chrome/browser/android/compositor/layer_title_cache.h
@@ -44,6 +44,10 @@
jint spinner_resource_id,
jint spinner_incognito_resource_id,
ui::ResourceManager* resource_manager);
+
+ LayerTitleCache(const LayerTitleCache&) = delete;
+ LayerTitleCache& operator=(const LayerTitleCache&) = delete;
+
void Destroy(JNIEnv* env);
// Called from Java, updates a native cc::Layer based on the new texture
@@ -84,8 +88,6 @@
int spinner_incognito_resource_id_;
ui::ResourceManager* resource_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(LayerTitleCache);
};
} // namespace android
diff --git a/chrome/browser/android/context_menu/context_menu_native_delegate_impl.cc b/chrome/browser/android/context_menu/context_menu_native_delegate_impl.cc
index 5cddffd..8267809 100644
--- a/chrome/browser/android/context_menu/context_menu_native_delegate_impl.cc
+++ b/chrome/browser/android/context_menu/context_menu_native_delegate_impl.cc
@@ -25,6 +25,10 @@
class ContextMenuImageRequest : public ImageDecoder::ImageRequest {
public:
+ ContextMenuImageRequest() = delete;
+ ContextMenuImageRequest(const ContextMenuImageRequest&) = delete;
+ ContextMenuImageRequest& operator=(const ContextMenuImageRequest&) = delete;
+
static void Start(const JavaRef<jobject>& jcallback,
const std::vector<uint8_t>& thumbnail_data) {
auto* request = new ContextMenuImageRequest(jcallback);
@@ -49,8 +53,6 @@
: jcallback_(jcallback) {}
const base::android::ScopedJavaGlobalRef<jobject> jcallback_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ContextMenuImageRequest);
};
chrome::mojom::ImageFormat ToChromeMojomImageFormat(int image_format) {
diff --git a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h
index f009070b..ce96b50 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h
+++ b/chrome/browser/android/contextualsearch/contextual_search_tab_helper.h
@@ -22,6 +22,10 @@
ContextualSearchTabHelper(JNIEnv* env, jobject obj, Profile* profile);
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+ ContextualSearchTabHelper(const ContextualSearchTabHelper&) = delete;
+ ContextualSearchTabHelper& operator=(const ContextualSearchTabHelper&) =
+ delete;
+
// Installs the UnhandledTapNotifier Mojo handler if needed.
// The |j_base_web_contents| is a java WebContents of the base page tab.
// The |device_scale_factor| is the ratio of pixels to dips.
@@ -49,7 +53,6 @@
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
base::WeakPtrFactory<ContextualSearchTabHelper> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(ContextualSearchTabHelper);
};
#endif // CHROME_BROWSER_ANDROID_CONTEXTUALSEARCH_CONTEXTUAL_SEARCH_TAB_HELPER_H_
diff --git a/chrome/browser/android/devtools_server.cc b/chrome/browser/android/devtools_server.cc
index e8fe8b2..e4cdb47 100644
--- a/chrome/browser/android/devtools_server.cc
+++ b/chrome/browser/android/devtools_server.cc
@@ -83,6 +83,10 @@
auth_callback_(auth_callback) {
}
+ UnixDomainServerSocketFactory(const UnixDomainServerSocketFactory&) = delete;
+ UnixDomainServerSocketFactory& operator=(
+ const UnixDomainServerSocketFactory&) = delete;
+
private:
std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
std::unique_ptr<net::UnixDomainServerSocket> socket(
@@ -116,8 +120,6 @@
std::string socket_name_;
int last_tethering_socket_;
net::UnixDomainServerSocket::AuthCallback auth_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(UnixDomainServerSocketFactory);
};
} // namespace
diff --git a/chrome/browser/android/explore_sites/explore_sites_service_factory.cc b/chrome/browser/android/explore_sites/explore_sites_service_factory.cc
index 88f95e0..8dea4c9 100644
--- a/chrome/browser/android/explore_sites/explore_sites_service_factory.cc
+++ b/chrome/browser/android/explore_sites/explore_sites_service_factory.cc
@@ -35,14 +35,16 @@
public:
explicit URLLoaderFactoryGetterImpl(Profile* profile) : profile_(profile) {}
+ URLLoaderFactoryGetterImpl(const URLLoaderFactoryGetterImpl&) = delete;
+ URLLoaderFactoryGetterImpl& operator=(const URLLoaderFactoryGetterImpl&) =
+ delete;
+
scoped_refptr<network::SharedURLLoaderFactory> GetFactory() override {
return profile_->GetURLLoaderFactory();
}
private:
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryGetterImpl);
};
ExploreSitesServiceFactory::ExploreSitesServiceFactory()
diff --git a/chrome/browser/android/explore_sites/explore_sites_service_factory.h b/chrome/browser/android/explore_sites/explore_sites_service_factory.h
index 50c3540..ca3df856 100644
--- a/chrome/browser/android/explore_sites/explore_sites_service_factory.h
+++ b/chrome/browser/android/explore_sites/explore_sites_service_factory.h
@@ -25,6 +25,10 @@
static ExploreSitesService* GetForBrowserContext(
content::BrowserContext* context);
+ ExploreSitesServiceFactory(const ExploreSitesServiceFactory&) = delete;
+ ExploreSitesServiceFactory& operator=(const ExploreSitesServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ExploreSitesServiceFactory>;
@@ -36,8 +40,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ExploreSitesServiceFactory);
};
} // namespace explore_sites
diff --git a/chrome/browser/android/explore_sites/explore_sites_service_impl_unittest.cc b/chrome/browser/android/explore_sites/explore_sites_service_impl_unittest.cc
index 5f6ad82..c88c749 100644
--- a/chrome/browser/android/explore_sites/explore_sites_service_impl_unittest.cc
+++ b/chrome/browser/android/explore_sites/explore_sites_service_impl_unittest.cc
@@ -132,13 +132,17 @@
explicit TestURLLoaderFactoryGetter(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory)
: url_loader_factory_(url_loader_factory) {}
+
+ TestURLLoaderFactoryGetter(const TestURLLoaderFactoryGetter&) = delete;
+ TestURLLoaderFactoryGetter& operator=(const TestURLLoaderFactoryGetter&) =
+ delete;
+
scoped_refptr<network::SharedURLLoaderFactory> GetFactory() override {
return url_loader_factory_;
}
private:
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
- DISALLOW_COPY_AND_ASSIGN(TestURLLoaderFactoryGetter);
};
base::test::ScopedFeatureList scoped_feature_list_;
diff --git a/chrome/browser/android/explore_sites/explore_sites_types.h b/chrome/browser/android/explore_sites/explore_sites_types.h
index 4ce8c2c..2cf4b5e 100644
--- a/chrome/browser/android/explore_sites/explore_sites_types.h
+++ b/chrome/browser/android/explore_sites/explore_sites_types.h
@@ -25,7 +25,11 @@
GURL url,
std::string title,
bool is_blocked);
+ ExploreSitesSite(const ExploreSitesSite&) = delete;
+ ExploreSitesSite& operator=(const ExploreSitesSite&) = delete;
+
ExploreSitesSite(ExploreSitesSite&& other);
+
virtual ~ExploreSitesSite();
int site_id;
@@ -33,8 +37,6 @@
GURL url;
std::string title;
bool is_blocked;
-
- DISALLOW_COPY_AND_ASSIGN(ExploreSitesSite);
};
// The in-memory representation of a category in the ExploreSitesStore.
@@ -48,7 +50,12 @@
std::string label,
int ntp_shown_count,
int interaction_count);
+
+ ExploreSitesCategory(const ExploreSitesCategory&) = delete;
+ ExploreSitesCategory& operator=(const ExploreSitesCategory&) = delete;
+
ExploreSitesCategory(ExploreSitesCategory&& other);
+
virtual ~ExploreSitesCategory();
int category_id;
@@ -60,8 +67,6 @@
int interaction_count;
std::vector<ExploreSitesSite> sites;
-
- DISALLOW_COPY_AND_ASSIGN(ExploreSitesCategory);
};
enum class GetCatalogStatus { kFailed, kNoCatalog, kSuccess };
diff --git a/chrome/browser/android/favicon_helper.h b/chrome/browser/android/favicon_helper.h
index 63f3d0e..3eb49e9 100644
--- a/chrome/browser/android/favicon_helper.h
+++ b/chrome/browser/android/favicon_helper.h
@@ -22,6 +22,10 @@
public:
FaviconHelper();
void Destroy(JNIEnv* env);
+
+ FaviconHelper(const FaviconHelper&) = delete;
+ FaviconHelper& operator=(const FaviconHelper&) = delete;
+
jboolean GetComposedFaviconImage(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& j_profile,
@@ -80,8 +84,6 @@
int last_used_job_id_;
base::WeakPtrFactory<FaviconHelper> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FaviconHelper);
};
#endif // CHROME_BROWSER_ANDROID_FAVICON_HELPER_H_
diff --git a/chrome/browser/android/history/browsing_history_bridge.h b/chrome/browser/android/history/browsing_history_bridge.h
index 4281c17..7a2d24d4 100644
--- a/chrome/browser/android/history/browsing_history_bridge.h
+++ b/chrome/browser/android/history/browsing_history_bridge.h
@@ -23,6 +23,10 @@
explicit BrowsingHistoryBridge(JNIEnv* env,
const JavaParamRef<jobject>& obj,
const JavaParamRef<jobject>& j_profile);
+
+ BrowsingHistoryBridge(const BrowsingHistoryBridge&) = delete;
+ BrowsingHistoryBridge& operator=(const BrowsingHistoryBridge&) = delete;
+
void Destroy(JNIEnv*, const JavaParamRef<jobject>&);
void QueryHistory(JNIEnv* env,
@@ -81,8 +85,6 @@
Profile* profile_;
base::OnceClosure query_history_continuation_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryBridge);
};
#endif // CHROME_BROWSER_ANDROID_HISTORY_BROWSING_HISTORY_BRIDGE_H_
diff --git a/chrome/browser/android/history/history_deletion_bridge.h b/chrome/browser/android/history/history_deletion_bridge.h
index ee8060a..96b71c8 100644
--- a/chrome/browser/android/history/history_deletion_bridge.h
+++ b/chrome/browser/android/history/history_deletion_bridge.h
@@ -21,6 +21,9 @@
public:
explicit HistoryDeletionBridge(const base::android::JavaRef<jobject>& j_this);
+ HistoryDeletionBridge(const HistoryDeletionBridge&) = delete;
+ HistoryDeletionBridge& operator=(const HistoryDeletionBridge&) = delete;
+
// history::HistoryServiceObserver.
void OnURLsDeleted(history::HistoryService* history_service,
const history::DeletionInfo& deletion_info) override;
@@ -42,8 +45,6 @@
base::ScopedObservation<history::HistoryService,
history::HistoryServiceObserver>
scoped_history_service_observer_{this};
-
- DISALLOW_COPY_AND_ASSIGN(HistoryDeletionBridge);
};
#endif // CHROME_BROWSER_ANDROID_HISTORY_HISTORY_DELETION_BRIDGE_H_
diff --git a/chrome/browser/android/history_report/data_observer_unittest.cc b/chrome/browser/android/history_report/data_observer_unittest.cc
index c85a7fd..12c0738 100644
--- a/chrome/browser/android/history_report/data_observer_unittest.cc
+++ b/chrome/browser/android/history_report/data_observer_unittest.cc
@@ -59,6 +59,9 @@
public:
DataObserverTest() {}
+ DataObserverTest(const DataObserverTest&) = delete;
+ DataObserverTest& operator=(const DataObserverTest&) = delete;
+
void SetUp() override {
// Make unique temp directory.
EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -96,8 +99,6 @@
std::unique_ptr<BookmarkModel> bookmark_model_;
std::unique_ptr<HistoryService> history_service_;
std::unique_ptr<DataObserver> data_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(DataObserverTest);
};
TEST_F(DataObserverTest, VisitLinkShouldBeLogged) {
diff --git a/chrome/browser/android/history_report/get_all_urls_from_history_task.h b/chrome/browser/android/history_report/get_all_urls_from_history_task.h
index 6cd1316..09011a0 100644
--- a/chrome/browser/android/history_report/get_all_urls_from_history_task.h
+++ b/chrome/browser/android/history_report/get_all_urls_from_history_task.h
@@ -21,6 +21,10 @@
GetAllUrlsFromHistoryTask(base::WaitableEvent* wait_event,
std::vector<std::string>* urls);
+ GetAllUrlsFromHistoryTask(const GetAllUrlsFromHistoryTask&) = delete;
+ GetAllUrlsFromHistoryTask& operator=(const GetAllUrlsFromHistoryTask&) =
+ delete;
+
bool RunOnDBThread(history::HistoryBackend* backend,
history::HistoryDatabase* db) override;
void DoneRunOnMainThread() override {}
@@ -31,8 +35,6 @@
private:
std::vector<std::string>* urls_;
base::WaitableEvent* wait_event_;
-
- DISALLOW_COPY_AND_ASSIGN(GetAllUrlsFromHistoryTask);
};
} // namespace history_report
diff --git a/chrome/browser/android/history_report/historic_visits_migration_task.h b/chrome/browser/android/history_report/historic_visits_migration_task.h
index aa514c9c..8fb6351 100644
--- a/chrome/browser/android/history_report/historic_visits_migration_task.h
+++ b/chrome/browser/android/history_report/historic_visits_migration_task.h
@@ -17,6 +17,10 @@
HistoricVisitsMigrationTask(base::WaitableEvent* event,
UsageReportsBufferService* report_buffer_service);
+ HistoricVisitsMigrationTask(const HistoricVisitsMigrationTask&) = delete;
+ HistoricVisitsMigrationTask& operator=(const HistoricVisitsMigrationTask&) =
+ delete;
+
bool RunOnDBThread(history::HistoryBackend* backend,
history::HistoryDatabase* db) override;
void DoneRunOnMainThread() override {}
@@ -26,8 +30,6 @@
base::WaitableEvent* wait_event_;
UsageReportsBufferService* usage_reports_buffer_service_;
-
- DISALLOW_COPY_AND_ASSIGN(HistoricVisitsMigrationTask);
};
} // namespace history_report
diff --git a/chrome/browser/android/hung_renderer_infobar_delegate.h b/chrome/browser/android/hung_renderer_infobar_delegate.h
index 00b10e3..a11141e 100644
--- a/chrome/browser/android/hung_renderer_infobar_delegate.h
+++ b/chrome/browser/android/hung_renderer_infobar_delegate.h
@@ -30,6 +30,10 @@
static void Create(infobars::ContentInfoBarManager* infobar_manager,
content::RenderProcessHost* render_process_host);
+ HungRendererInfoBarDelegate(const HungRendererInfoBarDelegate&) = delete;
+ HungRendererInfoBarDelegate& operator=(const HungRendererInfoBarDelegate&) =
+ delete;
+
// Called if the renderer regains responsiveness before the infobar is
// dismissed.
void OnRendererResponsive();
@@ -65,8 +69,6 @@
content::RenderProcessHost* render_process_host_;
bool terminal_event_logged_for_uma_;
-
- DISALLOW_COPY_AND_ASSIGN(HungRendererInfoBarDelegate);
};
#endif // CHROME_BROWSER_ANDROID_HUNG_RENDERER_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/android/instantapps/instant_apps_settings.h b/chrome/browser/android/instantapps/instant_apps_settings.h
index ae38e75..e50060e2 100644
--- a/chrome/browser/android/instantapps/instant_apps_settings.h
+++ b/chrome/browser/android/instantapps/instant_apps_settings.h
@@ -17,12 +17,14 @@
// retrieve information about the Instant App banner events.
class InstantAppsSettings {
public:
+ InstantAppsSettings() = delete;
+ InstantAppsSettings(const InstantAppsSettings&) = delete;
+ InstantAppsSettings& operator=(const InstantAppsSettings&) = delete;
+
static void RecordInfoBarShowEvent(content::WebContents* web_contents,
const std::string& url);
static void RecordInfoBarDismissEvent(content::WebContents* web_contents,
const std::string& url);
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(InstantAppsSettings);
};
#endif // CHROME_BROWSER_ANDROID_INSTANTAPPS_INSTANT_APPS_SETTINGS_H_
diff --git a/chrome/browser/android/locale/locale_manager.h b/chrome/browser/android/locale/locale_manager.h
index 6cff5188..9719891 100644
--- a/chrome/browser/android/locale/locale_manager.h
+++ b/chrome/browser/android/locale/locale_manager.h
@@ -13,12 +13,13 @@
// Provides access to the locale specific customizations on Android.
class LocaleManager {
public:
+ LocaleManager() = delete;
+ LocaleManager(const LocaleManager&) = delete;
+ LocaleManager& operator=(const LocaleManager&) = delete;
+
static std::string GetYandexReferralID();
static std::string GetMailRUReferralID();
static void RecordUserTypeMetrics();
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(LocaleManager);
};
#endif // CHROME_BROWSER_ANDROID_LOCALE_LOCALE_MANAGER_H_
diff --git a/chrome/browser/android/locale/locale_template_url_loader_unittest.cc b/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
index e166462..91a0c90 100644
--- a/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
+++ b/chrome/browser/android/locale/locale_template_url_loader_unittest.cc
@@ -49,6 +49,10 @@
public:
LocaleTemplateUrlLoaderTest() {}
+ LocaleTemplateUrlLoaderTest(const LocaleTemplateUrlLoaderTest&) = delete;
+ LocaleTemplateUrlLoaderTest& operator=(const LocaleTemplateUrlLoaderTest&) =
+ delete;
+
void SetUp() override;
void TearDown() override;
LocaleTemplateUrlLoader* loader() { return loader_.get(); }
@@ -60,8 +64,6 @@
task_environment_; // To set up BrowserThreads.
std::unique_ptr<LocaleTemplateUrlLoader> loader_;
std::unique_ptr<TemplateURLServiceTestUtil> test_util_;
-
- DISALLOW_COPY_AND_ASSIGN(LocaleTemplateUrlLoaderTest);
};
void LocaleTemplateUrlLoaderTest::SetUp() {
diff --git a/chrome/browser/android/logo_bridge.h b/chrome/browser/android/logo_bridge.h
index ced0a9e2..f3df691 100644
--- a/chrome/browser/android/logo_bridge.h
+++ b/chrome/browser/android/logo_bridge.h
@@ -20,6 +20,10 @@
class LogoBridge {
public:
explicit LogoBridge(const base::android::JavaRef<jobject>& j_profile);
+
+ LogoBridge(const LogoBridge&) = delete;
+ LogoBridge& operator=(const LogoBridge&) = delete;
+
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
// TODO(treib): Double-check the observer contract (esp. for
@@ -42,8 +46,6 @@
search_provider_logos::LogoService* logo_service_;
base::WeakPtrFactory<LogoBridge> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(LogoBridge);
};
#endif // CHROME_BROWSER_ANDROID_LOGO_BRIDGE_H_
diff --git a/chrome/browser/android/metrics/ukm_utils_for_test.h b/chrome/browser/android/metrics/ukm_utils_for_test.h
index a3624ec..bae355fd 100644
--- a/chrome/browser/android/metrics/ukm_utils_for_test.h
+++ b/chrome/browser/android/metrics/ukm_utils_for_test.h
@@ -14,6 +14,9 @@
// The native part of java UkmUtilsForTest class.
class UkmUtilsForTest {
public:
+ UkmUtilsForTest(const UkmUtilsForTest&) = delete;
+ UkmUtilsForTest& operator=(const UkmUtilsForTest&) = delete;
+
static bool IsEnabled();
static bool HasSourceWithId(SourceId source_id);
static void RecordSourceWithId(SourceId source_id);
@@ -24,8 +27,6 @@
// access UKM internals for testing.
UkmUtilsForTest();
~UkmUtilsForTest();
-
- DISALLOW_COPY_AND_ASSIGN(UkmUtilsForTest);
};
} // namespace ukm
diff --git a/chrome/browser/android/metrics/uma_session_stats.h b/chrome/browser/android/metrics/uma_session_stats.h
index 62017707..df182d5 100644
--- a/chrome/browser/android/metrics/uma_session_stats.h
+++ b/chrome/browser/android/metrics/uma_session_stats.h
@@ -30,6 +30,9 @@
static UmaSessionStats* GetInstance();
+ UmaSessionStats(const UmaSessionStats&) = delete;
+ UmaSessionStats& operator=(const UmaSessionStats&) = delete;
+
// Returns true if there is a visible activity. Android Chrome only.
static bool HasVisibleActivity();
@@ -83,8 +86,6 @@
SessionTimeTracker session_time_tracker_;
int active_session_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(UmaSessionStats);
};
#endif // CHROME_BROWSER_ANDROID_METRICS_UMA_SESSION_STATS_H_
diff --git a/chrome/browser/android/net/nqe/network_quality_provider.h b/chrome/browser/android/net/nqe/network_quality_provider.h
index e2c781d..235c9a7 100644
--- a/chrome/browser/android/net/nqe/network_quality_provider.h
+++ b/chrome/browser/android/net/nqe/network_quality_provider.h
@@ -22,6 +22,9 @@
NetworkQualityProvider(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
+ NetworkQualityProvider(const NetworkQualityProvider&) = delete;
+ NetworkQualityProvider& operator=(const NetworkQualityProvider&) = delete;
+
private:
// Note that this destructor is currently dead code. This destructor is never
// called as this object is owned by a java singleton that never goes away.
@@ -40,8 +43,6 @@
base::android::ScopedJavaGlobalRef<jobject> j_obj_;
THREAD_CHECKER(thread_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkQualityProvider);
};
#endif // CHROME_BROWSER_ANDROID_NET_NQE_NETWORK_QUALITY_PROVIDER_H_
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
index 6020f572..21b44ea 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -55,6 +55,9 @@
const JavaParamRef<jobject>& obj,
Profile* profile);
+ JavaHomepageClient(const JavaHomepageClient&) = delete;
+ JavaHomepageClient& operator=(const JavaHomepageClient&) = delete;
+
bool IsHomepageTileEnabled() const override;
GURL GetHomepageUrl() const override;
void QueryHomepageTitle(TitleCallback title_callback) override;
@@ -68,8 +71,6 @@
// Used in loading titles.
base::CancelableTaskTracker task_tracker_;
-
- DISALLOW_COPY_AND_ASSIGN(JavaHomepageClient);
};
JavaHomepageClient::JavaHomepageClient(JNIEnv* env,
@@ -132,6 +133,9 @@
public:
JavaObserver(JNIEnv* env, const JavaParamRef<jobject>& obj);
+ JavaObserver(const JavaObserver&) = delete;
+ JavaObserver& operator=(const JavaObserver&) = delete;
+
void OnURLsAvailable(
const std::map<SectionType, NTPTilesVector>& sections) override;
@@ -139,8 +143,6 @@
private:
ScopedJavaGlobalRef<jobject> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(JavaObserver);
};
MostVisitedSitesBridge::JavaObserver::JavaObserver(
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.h b/chrome/browser/android/ntp/most_visited_sites_bridge.h
index d5dff6e..e5f9f35 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.h
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.h
@@ -23,6 +23,9 @@
public:
explicit MostVisitedSitesBridge(Profile* profile);
+ MostVisitedSitesBridge(const MostVisitedSitesBridge&) = delete;
+ MostVisitedSitesBridge& operator=(const MostVisitedSitesBridge&) = delete;
+
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
void OnHomepageStateChanged(JNIEnv* env,
@@ -68,8 +71,6 @@
std::unique_ptr<ntp_tiles::MostVisitedSites> most_visited_;
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(MostVisitedSitesBridge);
};
#endif // CHROME_BROWSER_ANDROID_NTP_MOST_VISITED_SITES_BRIDGE_H_
diff --git a/chrome/browser/android/ntp/recent_tabs_page_prefs.h b/chrome/browser/android/ntp/recent_tabs_page_prefs.h
index f255fc2f5..4a538e7 100644
--- a/chrome/browser/android/ntp/recent_tabs_page_prefs.h
+++ b/chrome/browser/android/ntp/recent_tabs_page_prefs.h
@@ -14,6 +14,9 @@
explicit RecentTabsPagePrefs(Profile* profile);
void Destroy(JNIEnv* env);
+ RecentTabsPagePrefs(const RecentTabsPagePrefs&) = delete;
+ RecentTabsPagePrefs& operator=(const RecentTabsPagePrefs&) = delete;
+
jboolean GetSnapshotDocumentCollapsed(JNIEnv* env);
void SetSnapshotDocumentCollapsed(
JNIEnv* env,
@@ -42,7 +45,6 @@
virtual ~RecentTabsPagePrefs();
Profile* profile_; // weak
- DISALLOW_COPY_AND_ASSIGN(RecentTabsPagePrefs);
};
#endif // CHROME_BROWSER_ANDROID_NTP_RECENT_TABS_PAGE_PREFS_H_
diff --git a/chrome/browser/android/omnibox/autocomplete_controller_android.h b/chrome/browser/android/omnibox/autocomplete_controller_android.h
index a76f584..50873cb 100644
--- a/chrome/browser/android/omnibox/autocomplete_controller_android.h
+++ b/chrome/browser/android/omnibox/autocomplete_controller_android.h
@@ -33,6 +33,10 @@
Profile* profile,
std::unique_ptr<ChromeAutocompleteProviderClient> client);
+ AutocompleteControllerAndroid(const AutocompleteControllerAndroid&) = delete;
+ AutocompleteControllerAndroid& operator=(
+ const AutocompleteControllerAndroid&) = delete;
+
// Methods that forward to AutocompleteController:
void Start(JNIEnv* env,
const base::android::JavaRef<jstring>& j_text,
@@ -169,8 +173,6 @@
// Retained throughout the lifetime of the AutocompleteControllerAndroid.
const base::WeakPtrFactory<AutocompleteControllerAndroid> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(AutocompleteControllerAndroid);
};
#endif // CHROME_BROWSER_ANDROID_OMNIBOX_AUTOCOMPLETE_CONTROLLER_ANDROID_H_
diff --git a/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc b/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc
index 634be7c..f11026a 100644
--- a/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc
+++ b/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc
@@ -25,6 +25,9 @@
memory_info_.swap_free = kTestSwapTotalKB / 2;
}
+ MockNearOomMonitor(const MockNearOomMonitor&) = delete;
+ MockNearOomMonitor& operator=(const MockNearOomMonitor&) = delete;
+
void SetSwapFree(int swap_free) { memory_info_.swap_free = swap_free; }
void SimulateNonNearOom() {
@@ -48,8 +51,6 @@
base::SystemMemoryInfoKB memory_info_;
bool is_get_system_memory_info_called_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(MockNearOomMonitor);
};
class TestNearOomObserver {
@@ -60,6 +61,9 @@
&TestNearOomObserver::OnNearOomDetected, base::Unretained(this)));
}
+ TestNearOomObserver(const TestNearOomObserver&) = delete;
+ TestNearOomObserver& operator=(const TestNearOomObserver&) = delete;
+
void Unsubscribe() { subscription_ = {}; }
bool is_detected() const { return is_detected_; }
@@ -69,8 +73,6 @@
bool is_detected_ = false;
base::CallbackListSubscription subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(TestNearOomObserver);
};
class NearOomMonitorTest : public testing::Test {
diff --git a/chrome/browser/android/partner_browser_customizations.h b/chrome/browser/android/partner_browser_customizations.h
index 6d3ad77..647d231 100644
--- a/chrome/browser/android/partner_browser_customizations.h
+++ b/chrome/browser/android/partner_browser_customizations.h
@@ -12,11 +12,13 @@
class PartnerBrowserCustomizations {
public:
+ PartnerBrowserCustomizations() = delete;
+ PartnerBrowserCustomizations(const PartnerBrowserCustomizations&) = delete;
+ PartnerBrowserCustomizations& operator=(const PartnerBrowserCustomizations&) =
+ delete;
+
// Whether incognito mode is disabled by the partner.
static bool IsIncognitoDisabled();
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(PartnerBrowserCustomizations);
};
} // namespace android
diff --git a/chrome/browser/android/preferences/pref_change_registrar_android.h b/chrome/browser/android/preferences/pref_change_registrar_android.h
index d1126f8f..19ef57e9 100644
--- a/chrome/browser/android/preferences/pref_change_registrar_android.h
+++ b/chrome/browser/android/preferences/pref_change_registrar_android.h
@@ -20,6 +20,11 @@
public:
PrefChangeRegistrarAndroid(JNIEnv* env, const JavaParamRef<jobject>& obj);
void Destroy(JNIEnv*, const JavaParamRef<jobject>&);
+
+ PrefChangeRegistrarAndroid(const PrefChangeRegistrarAndroid&) = delete;
+ PrefChangeRegistrarAndroid& operator=(const PrefChangeRegistrarAndroid&) =
+ delete;
+
void Add(JNIEnv* env,
const JavaParamRef<jobject>& obj,
const JavaParamRef<jstring>& j_preference);
@@ -34,8 +39,6 @@
PrefChangeRegistrar pref_change_registrar_;
ScopedJavaGlobalRef<jobject> pref_change_registrar_jobject_;
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(PrefChangeRegistrarAndroid);
};
#endif // CHROME_BROWSER_ANDROID_PREFERENCES_PREF_CHANGE_REGISTRAR_ANDROID_H_
diff --git a/chrome/browser/android/recently_closed_tabs_bridge.h b/chrome/browser/android/recently_closed_tabs_bridge.h
index 5383fa7..b90cb1e6 100644
--- a/chrome/browser/android/recently_closed_tabs_bridge.h
+++ b/chrome/browser/android/recently_closed_tabs_bridge.h
@@ -18,7 +18,11 @@
RecentlyClosedTabsBridge(base::android::ScopedJavaGlobalRef<jobject> jbridge,
Profile* profile);
+ RecentlyClosedTabsBridge(const RecentlyClosedTabsBridge&) = delete;
+ RecentlyClosedTabsBridge& operator=(const RecentlyClosedTabsBridge&) = delete;
+
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
+
jboolean GetRecentlyClosedTabs(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -59,8 +63,6 @@
// TabRestoreService that we are observing.
sessions::TabRestoreService* tab_restore_service_;
-
- DISALLOW_COPY_AND_ASSIGN(RecentlyClosedTabsBridge);
};
#endif // CHROME_BROWSER_ANDROID_RECENTLY_CLOSED_TABS_BRIDGE_H_
diff --git a/chrome/browser/android/send_tab_to_self/send_tab_to_self_model_observer_bridge.h b/chrome/browser/android/send_tab_to_self/send_tab_to_self_model_observer_bridge.h
index e916386..732b24d 100644
--- a/chrome/browser/android/send_tab_to_self/send_tab_to_self_model_observer_bridge.h
+++ b/chrome/browser/android/send_tab_to_self/send_tab_to_self_model_observer_bridge.h
@@ -24,6 +24,11 @@
const base::android::JavaRef<jobject>& obj,
const base::android::JavaRef<jobject>& j_profile);
+ SendTabToSelfModelObserverBridge(const SendTabToSelfModelObserverBridge&) =
+ delete;
+ SendTabToSelfModelObserverBridge& operator=(
+ const SendTabToSelfModelObserverBridge&) = delete;
+
void Destroy(JNIEnv*);
// SendTabToSelfModelObserver implementation.
@@ -41,8 +46,6 @@
// is based off the KeyedServiceFactory which lives for the length of the
// profile. SendTabToSelf is not supported for the Incognito profile.
SendTabToSelfModel* send_tab_to_self_model_;
-
- DISALLOW_COPY_AND_ASSIGN(SendTabToSelfModelObserverBridge);
};
} // namespace send_tab_to_self
diff --git a/chrome/browser/android/service_tab_launcher.h b/chrome/browser/android/service_tab_launcher.h
index e42cb29..2a8f00b 100644
--- a/chrome/browser/android/service_tab_launcher.h
+++ b/chrome/browser/android/service_tab_launcher.h
@@ -28,6 +28,9 @@
// Returns the singleton instance of the service tab launcher.
static ServiceTabLauncher* GetInstance();
+ ServiceTabLauncher(const ServiceTabLauncher&) = delete;
+ ServiceTabLauncher& operator=(const ServiceTabLauncher&) = delete;
+
// Launches a new tab when we're in a Service rather than in an Activity.
// |callback| will be invoked with the resulting content::WebContents* when
// the tab is avialable. This method must only be called from the UI thread.
@@ -47,8 +50,6 @@
~ServiceTabLauncher();
base::IDMap<std::unique_ptr<TabLaunchedCallback>> tab_launched_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceTabLauncher);
};
#endif // CHROME_BROWSER_ANDROID_SERVICE_TAB_LAUNCHER_H_
diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h
index ad82047..9441f77 100644
--- a/chrome/browser/android/shortcut_helper.h
+++ b/chrome/browser/android/shortcut_helper.h
@@ -30,6 +30,10 @@
// ShortcutHelper in Java.
class ShortcutHelper {
public:
+ ShortcutHelper() = delete;
+ ShortcutHelper(const ShortcutHelper&) = delete;
+ ShortcutHelper& operator=(const ShortcutHelper&) = delete;
+
// Adds a shortcut to the launcher using a SkBitmap. The type of shortcut
// added depends on the properties in |info|.
static void AddToLauncherWithSkBitmap(content::WebContents* web_contents,
@@ -61,9 +65,6 @@
// Sets a flag to force an update for the WebAPK corresponding to |id| on next
// launch.
static void SetForceWebApkUpdate(const std::string& id);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ShortcutHelper);
};
#endif // CHROME_BROWSER_ANDROID_SHORTCUT_HELPER_H_
diff --git a/chrome/browser/android/ssl/mock_cert_verifier_rule_android.h b/chrome/browser/android/ssl/mock_cert_verifier_rule_android.h
index 2d5dcd7..4fdc93f 100644
--- a/chrome/browser/android/ssl/mock_cert_verifier_rule_android.h
+++ b/chrome/browser/android/ssl/mock_cert_verifier_rule_android.h
@@ -14,6 +14,10 @@
public:
MockCertVerifierRuleAndroid();
+ MockCertVerifierRuleAndroid(const MockCertVerifierRuleAndroid&) = delete;
+ MockCertVerifierRuleAndroid& operator=(const MockCertVerifierRuleAndroid&) =
+ delete;
+
// Sets the certificate verification result to force.
void SetResult(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -24,8 +28,6 @@
private:
content::ContentMockCertVerifier mock_cert_verifier_;
-
- DISALLOW_COPY_AND_ASSIGN(MockCertVerifierRuleAndroid);
};
#endif // CHROME_BROWSER_ANDROID_SSL_MOCK_CERT_VERIFIER_RULE_ANDROID_H_
diff --git a/chrome/browser/android/survey/http_client_type_unittest.cc b/chrome/browser/android/survey/http_client_type_unittest.cc
index e09f92f..4cb568e 100644
--- a/chrome/browser/android/survey/http_client_type_unittest.cc
+++ b/chrome/browser/android/survey/http_client_type_unittest.cc
@@ -15,6 +15,10 @@
namespace survey {
class HttpClientTypeUnitTest : public testing::Test {
+ public:
+ HttpClientTypeUnitTest(const HttpClientTypeUnitTest&) = delete;
+ HttpClientTypeUnitTest& operator=(const HttpClientTypeUnitTest&) = delete;
+
protected:
HttpClientTypeUnitTest() {}
~HttpClientTypeUnitTest() override {}
@@ -24,7 +28,6 @@
private:
base::HistogramTester histogram_tester_;
const std::vector<HttpClientType> client_types_;
- DISALLOW_COPY_AND_ASSIGN(HttpClientTypeUnitTest);
};
TEST_F(HttpClientTypeUnitTest, TestRecordHistogram) {
diff --git a/chrome/browser/android/survey/survey_http_client_unittest.cc b/chrome/browser/android/survey/survey_http_client_unittest.cc
index ecdc3f5..48e6d13 100644
--- a/chrome/browser/android/survey/survey_http_client_unittest.cc
+++ b/chrome/browser/android/survey/survey_http_client_unittest.cc
@@ -140,6 +140,10 @@
};
class SurveyHttpClientTest : public testing::Test {
+ public:
+ SurveyHttpClientTest(const SurveyHttpClientTest&) = delete;
+ SurveyHttpClientTest& operator=(const SurveyHttpClientTest&) = delete;
+
protected:
SurveyHttpClientTest() {}
@@ -248,8 +252,6 @@
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory_;
base::HistogramTester histogram_tester_;
-
- DISALLOW_COPY_AND_ASSIGN(SurveyHttpClientTest);
};
TEST_F(SurveyHttpClientTest, TestSendEmptyRequest) {
diff --git a/chrome/browser/android/usage_stats/usage_stats_database_unittest.cc b/chrome/browser/android/usage_stats/usage_stats_database_unittest.cc
index 13ad22e..264109d1 100644
--- a/chrome/browser/android/usage_stats/usage_stats_database_unittest.cc
+++ b/chrome/browser/android/usage_stats/usage_stats_database_unittest.cc
@@ -77,6 +77,9 @@
std::move(fake_token_mapping_db));
}
+ UsageStatsDatabaseTest(const UsageStatsDatabaseTest&) = delete;
+ UsageStatsDatabaseTest& operator=(const UsageStatsDatabaseTest&) = delete;
+
UsageStatsDatabase* usage_stats_database() {
return usage_stats_database_.get();
}
@@ -109,8 +112,6 @@
FakeDB<TokenMapping>* token_mapping_db_unowned_;
std::unique_ptr<UsageStatsDatabase> usage_stats_database_;
-
- DISALLOW_COPY_AND_ASSIGN(UsageStatsDatabaseTest);
};
TEST_F(UsageStatsDatabaseTest, Initialization) {
diff --git a/chrome/browser/android/vr/vr_shell.h b/chrome/browser/android/vr/vr_shell.h
index 62fc267..b69f3477 100644
--- a/chrome/browser/android/vr/vr_shell.h
+++ b/chrome/browser/android/vr/vr_shell.h
@@ -80,6 +80,10 @@
int display_height_pixels,
bool pause_content,
bool low_density);
+
+ VrShell(const VrShell&) = delete;
+ VrShell& operator=(const VrShell&) = delete;
+
bool HasUiFinishedLoading(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
void SwapContents(JNIEnv* env,
@@ -379,8 +383,6 @@
std::set<int> incognito_tab_ids_;
base::WeakPtrFactory<VrShell> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(VrShell);
};
} // namespace vr
diff --git a/chrome/browser/android/webapk/webapk_info.h b/chrome/browser/android/webapk/webapk_info.h
index a16a20e..673239a 100644
--- a/chrome/browser/android/webapk/webapk_info.h
+++ b/chrome/browser/android/webapk/webapk_info.h
@@ -41,11 +41,15 @@
std::string backing_browser_package_name,
bool is_backing_browser,
std::string update_status);
- ~WebApkInfo();
+
+ WebApkInfo(const WebApkInfo&) = delete;
+ WebApkInfo& operator=(const WebApkInfo&) = delete;
WebApkInfo& operator=(WebApkInfo&& other) noexcept;
WebApkInfo(WebApkInfo&& other) noexcept;
+ ~WebApkInfo();
+
// Short name of the WebAPK.
std::string name;
@@ -80,9 +84,6 @@
// Update Status of the WebAPK.
std::string update_status;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebApkInfo);
};
#endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INFO_H_
diff --git a/chrome/browser/android/webapk/webapk_install_service_factory.h b/chrome/browser/android/webapk/webapk_install_service_factory.h
index 35b5771..3ce5f2a 100644
--- a/chrome/browser/android/webapk/webapk_install_service_factory.h
+++ b/chrome/browser/android/webapk/webapk_install_service_factory.h
@@ -19,6 +19,10 @@
static WebApkInstallService* GetForBrowserContext(
content::BrowserContext* context);
+ WebApkInstallServiceFactory(const WebApkInstallServiceFactory&) = delete;
+ WebApkInstallServiceFactory& operator=(const WebApkInstallServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<WebApkInstallServiceFactory>;
@@ -30,8 +34,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(WebApkInstallServiceFactory);
};
#endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_INSTALL_SERVICE_FACTORY_H_
diff --git a/chrome/browser/android/webapk/webapk_installer_unittest.cc b/chrome/browser/android/webapk/webapk_installer_unittest.cc
index 5942438..ab9af8a 100644
--- a/chrome/browser/android/webapk/webapk_installer_unittest.cc
+++ b/chrome/browser/android/webapk/webapk_installer_unittest.cc
@@ -77,6 +77,9 @@
SpaceStatus status)
: WebApkInstaller(browser_context), test_space_status_(status) {}
+ TestWebApkInstaller(const TestWebApkInstaller&) = delete;
+ TestWebApkInstaller& operator=(const TestWebApkInstaller&) = delete;
+
void InstallOrUpdateWebApk(const std::string& package_name,
const std::string& token) override {
PostTaskToRunSuccessCallback();
@@ -97,8 +100,6 @@
// The space status used in tests.
SpaceStatus test_space_status_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWebApkInstaller);
};
// Runs the WebApkInstaller installation process/update and blocks till done.
@@ -162,6 +163,9 @@
public:
UpdateRequestStorer() {}
+ UpdateRequestStorer(const UpdateRequestStorer&) = delete;
+ UpdateRequestStorer& operator=(const UpdateRequestStorer&) = delete;
+
void StoreSync(const base::FilePath& update_request_path) {
base::RunLoop run_loop;
quit_closure_ = run_loop.QuitClosure();
@@ -179,8 +183,6 @@
void OnComplete(bool success) { std::move(quit_closure_).Run(); }
base::OnceClosure quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateRequestStorer);
};
// Builds a webapk::WebApkResponse with |token| as the token from the WebAPK
diff --git a/chrome/browser/android/webapk/webapk_ukm_recorder.h b/chrome/browser/android/webapk/webapk_ukm_recorder.h
index 5bcf4258..0292eb9d 100644
--- a/chrome/browser/android/webapk/webapk_ukm_recorder.h
+++ b/chrome/browser/android/webapk/webapk_ukm_recorder.h
@@ -19,6 +19,10 @@
// avoid having to instantiate this class and deal with object lifetimes.
class WebApkUkmRecorder {
public:
+ WebApkUkmRecorder() = delete;
+ WebApkUkmRecorder(const WebApkUkmRecorder&) = delete;
+ WebApkUkmRecorder& operator=(const WebApkUkmRecorder&) = delete;
+
static void RecordInstall(const GURL& manifest_url, int version_code);
static void RecordSessionDuration(const GURL& manifest_url,
@@ -45,9 +49,6 @@
// installed - all that matters is that it is being visited from a
// "non-installed experience" (ie, as a normal browser tab).
static void RecordWebApkableVisit(const GURL& manifest_url);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(WebApkUkmRecorder);
};
#endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UKM_RECORDER_H_
diff --git a/chrome/browser/android/webapk/webapk_update_data_fetcher.h b/chrome/browser/android/webapk/webapk_update_data_fetcher.h
index 62d5e7af6..fffc042 100644
--- a/chrome/browser/android/webapk/webapk_update_data_fetcher.h
+++ b/chrome/browser/android/webapk/webapk_update_data_fetcher.h
@@ -35,6 +35,9 @@
const GURL& scope,
const GURL& web_manifest_url);
+ WebApkUpdateDataFetcher(const WebApkUpdateDataFetcher&) = delete;
+ WebApkUpdateDataFetcher& operator=(const WebApkUpdateDataFetcher&) = delete;
+
// Replaces the WebContents that is being observed.
void ReplaceWebContents(
JNIEnv* env,
@@ -92,8 +95,6 @@
bool is_splash_icon_maskable_;
base::WeakPtrFactory<WebApkUpdateDataFetcher> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(WebApkUpdateDataFetcher);
};
#endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_UPDATE_DATA_FETCHER_H_
diff --git a/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.cc b/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.cc
index ec12fab..2c0d52f 100644
--- a/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.cc
+++ b/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.cc
@@ -17,9 +17,14 @@
class AppInstaller::WebContentsObserver : public content::WebContentsObserver {
public:
+ WebContentsObserver() = delete;
+
WebContentsObserver(content::WebContents* web_contents, AppInstaller* parent)
: content::WebContentsObserver(web_contents), parent_(parent) {}
+ WebContentsObserver(const WebContentsObserver&) = delete;
+ WebContentsObserver& operator=(const WebContentsObserver&) = delete;
+
protected:
// content::WebContentsObserver implementation.
void WebContentsDestroyed() override {
@@ -28,8 +33,6 @@
private:
AppInstaller* parent_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(WebContentsObserver);
};
AppInstaller::AppInstaller(content::WebContents* web_contents,
diff --git a/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.h b/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.h
index 71f2fc3..d4251592 100644
--- a/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.h
+++ b/chrome/browser/apps/platform_apps/api/webstore_widget_private/app_installer.h
@@ -22,12 +22,17 @@
// Chrome Web Store Gallery widget.
class AppInstaller : public extensions::WebstoreStandaloneInstaller {
public:
+ AppInstaller() = delete;
+
AppInstaller(content::WebContents* web_contents,
const std::string& item_id,
Profile* profile,
bool silent_installation,
Callback callback);
+ AppInstaller(const AppInstaller&) = delete;
+ AppInstaller& operator=(const AppInstaller&) = delete;
+
protected:
friend class base::RefCountedThreadSafe<AppInstaller>;
@@ -49,8 +54,6 @@
bool silent_installation_;
content::WebContents* web_contents_;
std::unique_ptr<WebContentsObserver> web_contents_observer_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(AppInstaller);
};
} // namespace webstore_widget
diff --git a/chrome/browser/ash/android_sms/android_sms_app_manager_impl_unittest.cc b/chrome/browser/ash/android_sms/android_sms_app_manager_impl_unittest.cc
index 1b4ef261..fb319f3 100644
--- a/chrome/browser/ash/android_sms/android_sms_app_manager_impl_unittest.cc
+++ b/chrome/browser/ash/android_sms/android_sms_app_manager_impl_unittest.cc
@@ -58,6 +58,11 @@
};
class AndroidSmsAppManagerImplTest : public testing::Test {
+ public:
+ AndroidSmsAppManagerImplTest(const AndroidSmsAppManagerImplTest&) = delete;
+ AndroidSmsAppManagerImplTest& operator=(const AndroidSmsAppManagerImplTest&) =
+ delete;
+
protected:
class TestPwaDelegate : public AndroidSmsAppManagerImpl::PwaDelegate {
public:
@@ -166,8 +171,6 @@
std::unique_ptr<TestObserver> test_observer_;
std::unique_ptr<AndroidSmsAppManagerImpl> android_sms_app_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(AndroidSmsAppManagerImplTest);
};
TEST_F(AndroidSmsAppManagerImplTest, TestSetUpMessages_NoPreviousApp_Fails) {
diff --git a/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc b/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
index 13beee3..4a30969 100644
--- a/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
+++ b/chrome/browser/ash/android_sms/android_sms_app_setup_controller_impl_unittest.cc
@@ -131,6 +131,12 @@
} // namespace
class AndroidSmsAppSetupControllerImplTest : public testing::Test {
+ public:
+ AndroidSmsAppSetupControllerImplTest(
+ const AndroidSmsAppSetupControllerImplTest&) = delete;
+ AndroidSmsAppSetupControllerImplTest& operator=(
+ const AndroidSmsAppSetupControllerImplTest&) = delete;
+
protected:
class TestPwaDelegate : public AndroidSmsAppSetupControllerImpl::PwaDelegate {
public:
@@ -462,8 +468,6 @@
fake_externally_managed_app_manager_;
TestPwaDelegate* test_pwa_delegate_;
std::unique_ptr<AndroidSmsAppSetupController> setup_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(AndroidSmsAppSetupControllerImplTest);
};
TEST_F(AndroidSmsAppSetupControllerImplTest, SetUpApp_NoPreviousApp) {
diff --git a/chrome/browser/ash/android_sms/android_sms_service_factory.h b/chrome/browser/ash/android_sms/android_sms_service_factory.h
index 8fb2fc9..26ce063 100644
--- a/chrome/browser/ash/android_sms/android_sms_service_factory.h
+++ b/chrome/browser/ash/android_sms/android_sms_service_factory.h
@@ -23,6 +23,9 @@
static AndroidSmsService* GetForBrowserContext(
content::BrowserContext* browser_context);
+ AndroidSmsServiceFactory(const AndroidSmsServiceFactory&) = delete;
+ AndroidSmsServiceFactory& operator=(const AndroidSmsServiceFactory&) = delete;
+
private:
friend class base::NoDestructor<AndroidSmsServiceFactory>;
@@ -38,8 +41,6 @@
bool ServiceIsNULLWhileTesting() const override;
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
-
- DISALLOW_COPY_AND_ASSIGN(AndroidSmsServiceFactory);
};
} // namespace android_sms
diff --git a/chrome/browser/ash/android_sms/connection_manager_unittest.cc b/chrome/browser/ash/android_sms/connection_manager_unittest.cc
index c4de663..b7c1723 100644
--- a/chrome/browser/ash/android_sms/connection_manager_unittest.cc
+++ b/chrome/browser/ash/android_sms/connection_manager_unittest.cc
@@ -77,6 +77,10 @@
enum class PwaState { kEnabledWithNewUrl, kEnabledWithOldUrl, kDisabled };
ConnectionManagerTest() = default;
+
+ ConnectionManagerTest(const ConnectionManagerTest&) = delete;
+ ConnectionManagerTest& operator=(const ConnectionManagerTest&) = delete;
+
~ConnectionManagerTest() override = default;
void SetUp() override {
@@ -196,8 +200,6 @@
TestServiceWorkerProvider* test_service_worker_provider_;
std::unique_ptr<ConnectionManager> connection_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(ConnectionManagerTest);
};
TEST_F(ConnectionManagerTest, ConnectOnActivate) {
diff --git a/chrome/browser/ash/android_sms/fcm_connection_establisher_unittest.cc b/chrome/browser/ash/android_sms/fcm_connection_establisher_unittest.cc
index 9dd6fcc..50027f5 100644
--- a/chrome/browser/ash/android_sms/fcm_connection_establisher_unittest.cc
+++ b/chrome/browser/ash/android_sms/fcm_connection_establisher_unittest.cc
@@ -21,6 +21,11 @@
namespace android_sms {
class FcmConnectionEstablisherTest : public testing::Test {
+ public:
+ FcmConnectionEstablisherTest(const FcmConnectionEstablisherTest&) = delete;
+ FcmConnectionEstablisherTest& operator=(const FcmConnectionEstablisherTest&) =
+ delete;
+
protected:
FcmConnectionEstablisherTest()
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {}
@@ -39,7 +44,6 @@
private:
content::BrowserTaskEnvironment task_environment_;
- DISALLOW_COPY_AND_ASSIGN(FcmConnectionEstablisherTest);
};
TEST_F(FcmConnectionEstablisherTest, TestEstablishConnection) {
diff --git a/chrome/browser/ash/android_sms/pairing_lost_notifier_unittest.cc b/chrome/browser/ash/android_sms/pairing_lost_notifier_unittest.cc
index be6434eb..3387323 100644
--- a/chrome/browser/ash/android_sms/pairing_lost_notifier_unittest.cc
+++ b/chrome/browser/ash/android_sms/pairing_lost_notifier_unittest.cc
@@ -29,6 +29,10 @@
} // namespace
class PairingLostNotifierTest : public BrowserWithTestWindowTest {
+ public:
+ PairingLostNotifierTest(const PairingLostNotifierTest&) = delete;
+ PairingLostNotifierTest& operator=(const PairingLostNotifierTest&) = delete;
+
protected:
PairingLostNotifierTest() = default;
~PairingLostNotifierTest() override = default;
@@ -92,8 +96,6 @@
fake_android_sms_app_helper_delegate_;
std::unique_ptr<PairingLostNotifier> pairing_lost_notifier_;
-
- DISALLOW_COPY_AND_ASSIGN(PairingLostNotifierTest);
};
TEST_F(PairingLostNotifierTest, WasNotPreviouslySetUp) {
diff --git a/chrome/browser/ash/cryptauth/client_app_metadata_provider_service_factory.h b/chrome/browser/ash/cryptauth/client_app_metadata_provider_service_factory.h
index 814c8b8..2eb6a1a0 100644
--- a/chrome/browser/ash/cryptauth/client_app_metadata_provider_service_factory.h
+++ b/chrome/browser/ash/cryptauth/client_app_metadata_provider_service_factory.h
@@ -22,6 +22,11 @@
static ClientAppMetadataProviderService* GetForProfile(Profile* profile);
static ClientAppMetadataProviderServiceFactory* GetInstance();
+ ClientAppMetadataProviderServiceFactory(
+ const ClientAppMetadataProviderServiceFactory&) = delete;
+ ClientAppMetadataProviderServiceFactory& operator=(
+ const ClientAppMetadataProviderServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
ClientAppMetadataProviderServiceFactory>;
@@ -32,8 +37,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* browser_context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ClientAppMetadataProviderServiceFactory);
};
} // namespace ash
diff --git a/chrome/browser/ash/cryptauth/cryptauth_device_id_provider_impl.h b/chrome/browser/ash/cryptauth/cryptauth_device_id_provider_impl.h
index f6802ad..6745b957 100644
--- a/chrome/browser/ash/cryptauth/cryptauth_device_id_provider_impl.h
+++ b/chrome/browser/ash/cryptauth/cryptauth_device_id_provider_impl.h
@@ -26,6 +26,10 @@
static const CryptAuthDeviceIdProviderImpl* GetInstance();
+ CryptAuthDeviceIdProviderImpl(const CryptAuthDeviceIdProviderImpl&) = delete;
+ CryptAuthDeviceIdProviderImpl& operator=(
+ const CryptAuthDeviceIdProviderImpl&) = delete;
+
// CryptAuthDeviceIdProvider:
std::string GetDeviceId() const override;
@@ -33,8 +37,6 @@
friend class base::NoDestructor<CryptAuthDeviceIdProviderImpl>;
CryptAuthDeviceIdProviderImpl();
-
- DISALLOW_COPY_AND_ASSIGN(CryptAuthDeviceIdProviderImpl);
};
} // namespace cryptauth
diff --git a/chrome/browser/ash/cryptauth/gcm_device_info_provider_impl.h b/chrome/browser/ash/cryptauth/gcm_device_info_provider_impl.h
index 8c5ac32..92eaaf92 100644
--- a/chrome/browser/ash/cryptauth/gcm_device_info_provider_impl.h
+++ b/chrome/browser/ash/cryptauth/gcm_device_info_provider_impl.h
@@ -17,6 +17,10 @@
public:
static const GcmDeviceInfoProviderImpl* GetInstance();
+ GcmDeviceInfoProviderImpl(const GcmDeviceInfoProviderImpl&) = delete;
+ GcmDeviceInfoProviderImpl& operator=(const GcmDeviceInfoProviderImpl&) =
+ delete;
+
// device_sync::GcmDeviceInfoProvider:
const cryptauth::GcmDeviceInfo& GetGcmDeviceInfo() const override;
@@ -24,8 +28,6 @@
friend class base::NoDestructor<GcmDeviceInfoProviderImpl>;
GcmDeviceInfoProviderImpl();
-
- DISALLOW_COPY_AND_ASSIGN(GcmDeviceInfoProviderImpl);
};
} // namespace ash
diff --git a/chrome/browser/ash/device_sync/device_sync_client_factory.cc b/chrome/browser/ash/device_sync/device_sync_client_factory.cc
index cbf8bc2..2a4b655 100644
--- a/chrome/browser/ash/device_sync/device_sync_client_factory.cc
+++ b/chrome/browser/ash/device_sync/device_sync_client_factory.cc
@@ -63,6 +63,9 @@
device_sync_client_->Initialize(base::ThreadTaskRunnerHandle::Get());
}
+ DeviceSyncClientHolder(const DeviceSyncClientHolder&) = delete;
+ DeviceSyncClientHolder& operator=(const DeviceSyncClientHolder&) = delete;
+
DeviceSyncClient* device_sync_client() { return device_sync_client_.get(); }
private:
@@ -75,8 +78,6 @@
std::unique_ptr<DeviceSyncBase> device_sync_;
std::unique_ptr<DeviceSyncClient> device_sync_client_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceSyncClientHolder);
};
DeviceSyncClientFactory::DeviceSyncClientFactory()
diff --git a/chrome/browser/ash/device_sync/device_sync_client_factory.h b/chrome/browser/ash/device_sync/device_sync_client_factory.h
index 6dd412f..4a12010 100644
--- a/chrome/browser/ash/device_sync/device_sync_client_factory.h
+++ b/chrome/browser/ash/device_sync/device_sync_client_factory.h
@@ -23,6 +23,9 @@
static DeviceSyncClientFactory* GetInstance();
+ DeviceSyncClientFactory(const DeviceSyncClientFactory&) = delete;
+ DeviceSyncClientFactory& operator=(const DeviceSyncClientFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<DeviceSyncClientFactory>;
@@ -33,8 +36,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceSyncClientFactory);
};
} // namespace device_sync
diff --git a/chrome/browser/ash/multidevice_setup/auth_token_validator_factory.h b/chrome/browser/ash/multidevice_setup/auth_token_validator_factory.h
index f585d32b..54e1831 100644
--- a/chrome/browser/ash/multidevice_setup/auth_token_validator_factory.h
+++ b/chrome/browser/ash/multidevice_setup/auth_token_validator_factory.h
@@ -23,6 +23,10 @@
static AuthTokenValidatorFactory* GetInstance();
+ AuthTokenValidatorFactory(const AuthTokenValidatorFactory&) = delete;
+ AuthTokenValidatorFactory& operator=(const AuthTokenValidatorFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<AuthTokenValidatorFactory>;
@@ -32,8 +36,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(AuthTokenValidatorFactory);
};
} // namespace multidevice_setup
diff --git a/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.cc b/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.cc
index 9a59e916..e05e89e7 100644
--- a/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.cc
+++ b/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.cc
@@ -54,6 +54,10 @@
weak_factory_.GetWeakPtr(), std::move(receiver)));
}
+ MultiDeviceSetupClientHolder(const MultiDeviceSetupClientHolder&) = delete;
+ MultiDeviceSetupClientHolder& operator=(const MultiDeviceSetupClientHolder&) =
+ delete;
+
MultiDeviceSetupClient* multidevice_setup_client() {
return multidevice_setup_client_.get();
}
@@ -73,8 +77,6 @@
Profile* const profile_;
std::unique_ptr<MultiDeviceSetupClient> multidevice_setup_client_;
base::WeakPtrFactory<MultiDeviceSetupClientHolder> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MultiDeviceSetupClientHolder);
};
} // namespace
diff --git a/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.h b/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.h
index 5c867c8..b0f1eac 100644
--- a/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.h
+++ b/chrome/browser/ash/multidevice_setup/multidevice_setup_client_factory.h
@@ -24,6 +24,10 @@
static MultiDeviceSetupClientFactory* GetInstance();
+ MultiDeviceSetupClientFactory(const MultiDeviceSetupClientFactory&) = delete;
+ MultiDeviceSetupClientFactory& operator=(
+ const MultiDeviceSetupClientFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<MultiDeviceSetupClientFactory>;
friend class ::ChromeOSMetricsProviderTest;
@@ -41,8 +45,6 @@
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
bool service_is_null_while_testing_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(MultiDeviceSetupClientFactory);
};
} // namespace multidevice_setup
diff --git a/chrome/browser/ash/multidevice_setup/oobe_completion_tracker_factory.h b/chrome/browser/ash/multidevice_setup/oobe_completion_tracker_factory.h
index e1b92ab..9090eba 100644
--- a/chrome/browser/ash/multidevice_setup/oobe_completion_tracker_factory.h
+++ b/chrome/browser/ash/multidevice_setup/oobe_completion_tracker_factory.h
@@ -23,6 +23,10 @@
static OobeCompletionTrackerFactory* GetInstance();
+ OobeCompletionTrackerFactory(const OobeCompletionTrackerFactory&) = delete;
+ OobeCompletionTrackerFactory& operator=(const OobeCompletionTrackerFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<OobeCompletionTrackerFactory>;
@@ -32,8 +36,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(OobeCompletionTrackerFactory);
};
} // namespace multidevice_setup
diff --git a/chrome/browser/ash/net/network_portal_detector_impl_browsertest.cc b/chrome/browser/ash/net/network_portal_detector_impl_browsertest.cc
index 43c9cab9..f7844c2d 100644
--- a/chrome/browser/ash/net/network_portal_detector_impl_browsertest.cc
+++ b/chrome/browser/ash/net/network_portal_detector_impl_browsertest.cc
@@ -194,10 +194,13 @@
NetworkPortalDetectorImplBrowserTestIgnoreProxy()
: NetworkPortalDetectorImplBrowserTest() {}
+ NetworkPortalDetectorImplBrowserTestIgnoreProxy(
+ const NetworkPortalDetectorImplBrowserTestIgnoreProxy&) = delete;
+ NetworkPortalDetectorImplBrowserTestIgnoreProxy& operator=(
+ const NetworkPortalDetectorImplBrowserTestIgnoreProxy&) = delete;
+
protected:
void TestImpl(const bool preference_value);
-
- DISALLOW_COPY_AND_ASSIGN(NetworkPortalDetectorImplBrowserTestIgnoreProxy);
};
void NetworkPortalDetectorImplBrowserTestIgnoreProxy::TestImpl(
diff --git a/chrome/browser/ash/secure_channel/secure_channel_client_provider.h b/chrome/browser/ash/secure_channel/secure_channel_client_provider.h
index 56cf542..7ba4609 100644
--- a/chrome/browser/ash/secure_channel/secure_channel_client_provider.h
+++ b/chrome/browser/ash/secure_channel/secure_channel_client_provider.h
@@ -21,6 +21,10 @@
public:
static SecureChannelClientProvider* GetInstance();
+ SecureChannelClientProvider(const SecureChannelClientProvider&) = delete;
+ SecureChannelClientProvider& operator=(const SecureChannelClientProvider&) =
+ delete;
+
SecureChannelClient* GetClient();
private:
@@ -30,8 +34,6 @@
virtual ~SecureChannelClientProvider();
std::unique_ptr<SecureChannelClient> secure_channel_client_;
-
- DISALLOW_COPY_AND_ASSIGN(SecureChannelClientProvider);
};
} // namespace secure_channel
diff --git a/chrome/browser/ash/tether/fake_tether_service.h b/chrome/browser/ash/tether/fake_tether_service.h
index 0c25de0..7dcc8db 100644
--- a/chrome/browser/ash/tether/fake_tether_service.h
+++ b/chrome/browser/ash/tether/fake_tether_service.h
@@ -22,6 +22,9 @@
chromeos::NetworkStateHandler* network_state_handler,
session_manager::SessionManager* session_manager);
+ FakeTetherService(const FakeTetherService&) = delete;
+ FakeTetherService& operator=(const FakeTetherService&) = delete;
+
// TetherService:
void StartTetherIfPossible() override;
void StopTetherIfNecessary() override;
@@ -36,8 +39,6 @@
private:
int num_tether_networks_ = 1;
-
- DISALLOW_COPY_AND_ASSIGN(FakeTetherService);
};
#endif // CHROME_BROWSER_ASH_TETHER_FAKE_TETHER_SERVICE_H_
diff --git a/chrome/browser/ash/tether/tether_service_factory.h b/chrome/browser/ash/tether/tether_service_factory.h
index af79104..f381276 100644
--- a/chrome/browser/ash/tether/tether_service_factory.h
+++ b/chrome/browser/ash/tether/tether_service_factory.h
@@ -26,6 +26,9 @@
static TetherService* GetForBrowserContext(
content::BrowserContext* browser_context);
+ TetherServiceFactory(const TetherServiceFactory&) = delete;
+ TetherServiceFactory& operator=(const TetherServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TetherServiceFactory>;
@@ -38,8 +41,6 @@
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(TetherServiceFactory);
};
#endif // CHROME_BROWSER_ASH_TETHER_TETHER_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ash/tether/tether_service_unittest.cc b/chrome/browser/ash/tether/tether_service_unittest.cc
index a2126c76..01d5e4a 100644
--- a/chrome/browser/ash/tether/tether_service_unittest.cc
+++ b/chrome/browser/ash/tether/tether_service_unittest.cc
@@ -298,6 +298,10 @@
} // namespace
class TetherServiceTest : public testing::Test {
+ public:
+ TetherServiceTest(const TetherServiceTest&) = delete;
+ TetherServiceTest& operator=(const TetherServiceTest&) = delete;
+
protected:
TetherServiceTest() : test_devices_(CreateTestDevices()) {}
~TetherServiceTest() override {}
@@ -570,9 +574,6 @@
std::unique_ptr<TestTetherService> tether_service_;
base::HistogramTester histogram_tester_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TetherServiceTest);
};
TEST_F(TetherServiceTest, TestShutdown) {
diff --git a/chrome/browser/assist_ranker/assist_ranker_service_factory.h b/chrome/browser/assist_ranker/assist_ranker_service_factory.h
index acb9673..a5511bac 100644
--- a/chrome/browser/assist_ranker/assist_ranker_service_factory.h
+++ b/chrome/browser/assist_ranker/assist_ranker_service_factory.h
@@ -25,6 +25,10 @@
static AssistRankerService* GetForBrowserContext(
content::BrowserContext* browser_context);
+ AssistRankerServiceFactory(const AssistRankerServiceFactory&) = delete;
+ AssistRankerServiceFactory& operator=(const AssistRankerServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<AssistRankerServiceFactory>;
@@ -36,8 +40,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(AssistRankerServiceFactory);
};
} // namespace assist_ranker
diff --git a/chrome/browser/autocomplete/autocomplete_classifier_factory.h b/chrome/browser/autocomplete/autocomplete_classifier_factory.h
index 6d9ccc27..962a3bc 100644
--- a/chrome/browser/autocomplete/autocomplete_classifier_factory.h
+++ b/chrome/browser/autocomplete/autocomplete_classifier_factory.h
@@ -23,6 +23,10 @@
static AutocompleteClassifierFactory* GetInstance();
+ AutocompleteClassifierFactory(const AutocompleteClassifierFactory&) = delete;
+ AutocompleteClassifierFactory& operator=(
+ const AutocompleteClassifierFactory&) = delete;
+
static std::unique_ptr<KeyedService> BuildInstanceFor(
content::BrowserContext* context);
@@ -38,8 +42,6 @@
bool ServiceIsNULLWhileTesting() const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(AutocompleteClassifierFactory);
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_CLASSIFIER_FACTORY_H_
diff --git a/chrome/browser/autocomplete/document_suggestions_service_factory.h b/chrome/browser/autocomplete/document_suggestions_service_factory.h
index d6baa11e..63ea876 100644
--- a/chrome/browser/autocomplete/document_suggestions_service_factory.h
+++ b/chrome/browser/autocomplete/document_suggestions_service_factory.h
@@ -19,6 +19,11 @@
bool create_if_necessary);
static DocumentSuggestionsServiceFactory* GetInstance();
+ DocumentSuggestionsServiceFactory(const DocumentSuggestionsServiceFactory&) =
+ delete;
+ DocumentSuggestionsServiceFactory& operator=(
+ const DocumentSuggestionsServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<DocumentSuggestionsServiceFactory>;
@@ -28,8 +33,6 @@
// Overrides from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DocumentSuggestionsServiceFactory);
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_DOCUMENT_SUGGESTIONS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/autocomplete/remote_suggestions_service_factory.h b/chrome/browser/autocomplete/remote_suggestions_service_factory.h
index fc3b989..75b589a6 100644
--- a/chrome/browser/autocomplete/remote_suggestions_service_factory.h
+++ b/chrome/browser/autocomplete/remote_suggestions_service_factory.h
@@ -19,6 +19,11 @@
bool create_if_necessary);
static RemoteSuggestionsServiceFactory* GetInstance();
+ RemoteSuggestionsServiceFactory(const RemoteSuggestionsServiceFactory&) =
+ delete;
+ RemoteSuggestionsServiceFactory& operator=(
+ const RemoteSuggestionsServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<RemoteSuggestionsServiceFactory>;
@@ -28,8 +33,6 @@
// Overrides from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteSuggestionsServiceFactory);
};
#endif // CHROME_BROWSER_AUTOCOMPLETE_REMOTE_SUGGESTIONS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/autofill/address_normalizer_factory.h b/chrome/browser/autofill/address_normalizer_factory.h
index df4d061b..88e6686 100644
--- a/chrome/browser/autofill/address_normalizer_factory.h
+++ b/chrome/browser/autofill/address_normalizer_factory.h
@@ -16,6 +16,9 @@
public:
static AddressNormalizer* GetInstance();
+ AddressNormalizerFactory(const AddressNormalizerFactory&) = delete;
+ AddressNormalizerFactory& operator=(const AddressNormalizerFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<AddressNormalizerFactory>;
@@ -24,8 +27,6 @@
// The only instance that exists.
AddressNormalizerImpl address_normalizer_;
-
- DISALLOW_COPY_AND_ASSIGN(AddressNormalizerFactory);
};
} // namespace autofill
diff --git a/chrome/browser/autofill/android/personal_data_manager_android.cc b/chrome/browser/autofill/android/personal_data_manager_android.cc
index 2da0a4c1..b267eeb 100644
--- a/chrome/browser/autofill/android/personal_data_manager_android.cc
+++ b/chrome/browser/autofill/android/personal_data_manager_android.cc
@@ -104,6 +104,9 @@
public:
FullCardRequester() {}
+ FullCardRequester(const FullCardRequester&) = delete;
+ FullCardRequester& operator=(const FullCardRequester&) = delete;
+
// Takes ownership of |card|.
void GetFullCard(JNIEnv* env,
const base::android::JavaParamRef<jobject>& jweb_contents,
@@ -172,8 +175,6 @@
std::unique_ptr<CreditCard> card_;
ScopedJavaGlobalRef<jobject> jdelegate_;
-
- DISALLOW_COPY_AND_ASSIGN(FullCardRequester);
};
void OnSubKeysReceived(ScopedJavaGlobalRef<jobject> jdelegate,
diff --git a/chrome/browser/autofill/android/personal_data_manager_android.h b/chrome/browser/autofill/android/personal_data_manager_android.h
index b356a6c..d27c022 100644
--- a/chrome/browser/autofill/android/personal_data_manager_android.h
+++ b/chrome/browser/autofill/android/personal_data_manager_android.h
@@ -23,6 +23,10 @@
public:
PersonalDataManagerAndroid(JNIEnv* env, jobject obj);
+ PersonalDataManagerAndroid(const PersonalDataManagerAndroid&) = delete;
+ PersonalDataManagerAndroid& operator=(const PersonalDataManagerAndroid&) =
+ delete;
+
static base::android::ScopedJavaLocalRef<jobject>
CreateJavaCreditCardFromNative(JNIEnv* env, const CreditCard& card);
static void PopulateNativeCreditCardFromJava(
@@ -407,8 +411,6 @@
// Used for subkey request.
SubKeyRequester subkey_requester_;
-
- DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerAndroid);
};
} // namespace autofill
diff --git a/chrome/browser/autofill/autofill_keyboard_accessory_adapter_unittest.cc b/chrome/browser/autofill/autofill_keyboard_accessory_adapter_unittest.cc
index 74328a4f..0d8d88f 100644
--- a/chrome/browser/autofill/autofill_keyboard_accessory_adapter_unittest.cc
+++ b/chrome/browser/autofill/autofill_keyboard_accessory_adapter_unittest.cc
@@ -37,6 +37,10 @@
: public AutofillKeyboardAccessoryAdapter::AccessoryView {
public:
MockAccessoryView() {}
+
+ MockAccessoryView(const MockAccessoryView&) = delete;
+ MockAccessoryView& operator=(const MockAccessoryView&) = delete;
+
MOCK_METHOD0(Initialize, bool());
MOCK_METHOD0(Hide, void());
MOCK_METHOD0(Show, void());
@@ -45,8 +49,6 @@
const std::u16string&,
base::OnceClosure));
- private:
- DISALLOW_COPY_AND_ASSIGN(MockAccessoryView);
};
Suggestion createPasswordEntry(std::string password,
diff --git a/chrome/browser/autofill/autofill_profile_validator_factory.h b/chrome/browser/autofill/autofill_profile_validator_factory.h
index 85d1413..f78b06a5 100644
--- a/chrome/browser/autofill/autofill_profile_validator_factory.h
+++ b/chrome/browser/autofill/autofill_profile_validator_factory.h
@@ -16,6 +16,11 @@
public:
static AutofillProfileValidator* GetInstance();
+ AutofillProfileValidatorFactory(const AutofillProfileValidatorFactory&) =
+ delete;
+ AutofillProfileValidatorFactory& operator=(
+ const AutofillProfileValidatorFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<AutofillProfileValidatorFactory>;
@@ -24,8 +29,6 @@
// The only instance that exists.
AutofillProfileValidator autofill_profile_validator_;
-
- DISALLOW_COPY_AND_ASSIGN(AutofillProfileValidatorFactory);
};
} // namespace autofill
diff --git a/chrome/browser/autofill/autofill_uitest.h b/chrome/browser/autofill/autofill_uitest.h
index 7cbe214..6471053 100644
--- a/chrome/browser/autofill/autofill_uitest.h
+++ b/chrome/browser/autofill/autofill_uitest.h
@@ -74,6 +74,10 @@
class AutofillUiTest : public InProcessBrowserTest,
public content::WebContentsObserver {
+ public:
+ AutofillUiTest(const AutofillUiTest&) = delete;
+ AutofillUiTest& operator=(const AutofillUiTest&) = delete;
+
protected:
AutofillUiTest();
~AutofillUiTest() override;
@@ -132,8 +136,6 @@
content::RenderWidgetHost::KeyPressEventCallback key_press_event_sink_;
std::unique_ptr<ui::ScopedAnimationDurationScaleMode> disable_animation_;
-
- DISALLOW_COPY_AND_ASSIGN(AutofillUiTest);
};
} // namespace autofill
diff --git a/chrome/browser/autofill/captured_sites_test_utils.h b/chrome/browser/autofill/captured_sites_test_utils.h
index 1957093..f59b5063 100644
--- a/chrome/browser/autofill/captured_sites_test_utils.h
+++ b/chrome/browser/autofill/captured_sites_test_utils.h
@@ -149,6 +149,11 @@
// InProcessBrowserTest exposes its feature to captured site automation.
class TestRecipeReplayChromeFeatureActionExecutor {
public:
+ TestRecipeReplayChromeFeatureActionExecutor(
+ const TestRecipeReplayChromeFeatureActionExecutor&) = delete;
+ TestRecipeReplayChromeFeatureActionExecutor& operator=(
+ const TestRecipeReplayChromeFeatureActionExecutor&) = delete;
+
// Chrome Autofill feature methods.
// Triggers Chrome Autofill in the specified input element on the specified
// document.
@@ -175,8 +180,6 @@
protected:
TestRecipeReplayChromeFeatureActionExecutor();
~TestRecipeReplayChromeFeatureActionExecutor();
-
- DISALLOW_COPY_AND_ASSIGN(TestRecipeReplayChromeFeatureActionExecutor);
};
// TestRecipeReplayer
diff --git a/chrome/browser/autofill/form_structure_browsertest.cc b/chrome/browser/autofill/form_structure_browsertest.cc
index be6d4416..a40b658d 100644
--- a/chrome/browser/autofill/form_structure_browsertest.cc
+++ b/chrome/browser/autofill/form_structure_browsertest.cc
@@ -147,6 +147,10 @@
: public InProcessBrowserTest,
public DataDrivenTest,
public ::testing::WithParamInterface<base::FilePath> {
+ public:
+ FormStructureBrowserTest(const FormStructureBrowserTest&) = delete;
+ FormStructureBrowserTest& operator=(const FormStructureBrowserTest&) = delete;
+
protected:
FormStructureBrowserTest();
~FormStructureBrowserTest() override;
@@ -170,7 +174,6 @@
// GenerateResults method but it is consumed later in the IO thread by the
// embedded test server to generate the response.
std::string html_content_;
- DISALLOW_COPY_AND_ASSIGN(FormStructureBrowserTest);
};
FormStructureBrowserTest::FormStructureBrowserTest()
diff --git a/chrome/browser/autofill/strike_database_factory.h b/chrome/browser/autofill/strike_database_factory.h
index e094671..b7455e9 100644
--- a/chrome/browser/autofill/strike_database_factory.h
+++ b/chrome/browser/autofill/strike_database_factory.h
@@ -30,6 +30,9 @@
static StrikeDatabaseFactory* GetInstance();
+ StrikeDatabaseFactory(const StrikeDatabaseFactory&) = delete;
+ StrikeDatabaseFactory& operator=(const StrikeDatabaseFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<StrikeDatabaseFactory>;
@@ -39,8 +42,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(StrikeDatabaseFactory);
};
} // namespace autofill
diff --git a/chrome/browser/autofill/validation_rules_storage_factory.h b/chrome/browser/autofill/validation_rules_storage_factory.h
index 3a95d6c..d0f597d 100644
--- a/chrome/browser/autofill/validation_rules_storage_factory.h
+++ b/chrome/browser/autofill/validation_rules_storage_factory.h
@@ -26,6 +26,10 @@
public:
static std::unique_ptr<::i18n::addressinput::Storage> CreateStorage();
+ ValidationRulesStorageFactory(const ValidationRulesStorageFactory&) = delete;
+ ValidationRulesStorageFactory& operator=(
+ const ValidationRulesStorageFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<ValidationRulesStorageFactory>;
@@ -33,8 +37,6 @@
~ValidationRulesStorageFactory();
scoped_refptr<JsonPrefStore> json_pref_store_;
-
- DISALLOW_COPY_AND_ASSIGN(ValidationRulesStorageFactory);
};
} // namespace autofill
diff --git a/chrome/browser/background/background_application_list_model.h b/chrome/browser/background/background_application_list_model.h
index 8dd50e9..aabb47b 100644
--- a/chrome/browser/background/background_application_list_model.h
+++ b/chrome/browser/background/background_application_list_model.h
@@ -65,6 +65,11 @@
// Create a new model associated with profile.
explicit BackgroundApplicationListModel(Profile* profile);
+ BackgroundApplicationListModel(const BackgroundApplicationListModel&) =
+ delete;
+ BackgroundApplicationListModel& operator=(
+ const BackgroundApplicationListModel&) = delete;
+
~BackgroundApplicationListModel() override;
// Associate observer with this model.
@@ -199,8 +204,6 @@
process_manager_observation_{this};
base::WeakPtrFactory<BackgroundApplicationListModel> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundApplicationListModel);
};
#endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_APPLICATION_LIST_MODEL_H_
diff --git a/chrome/browser/background/background_contents.h b/chrome/browser/background/background_contents.h
index 9474877..d974ab2 100644
--- a/chrome/browser/background/background_contents.h
+++ b/chrome/browser/background/background_contents.h
@@ -66,6 +66,10 @@
Delegate* delegate,
const content::StoragePartitionId& partition_id,
content::SessionStorageNamespace* session_storage_namespace);
+
+ BackgroundContents(const BackgroundContents&) = delete;
+ BackgroundContents& operator=(const BackgroundContents&) = delete;
+
~BackgroundContents() override;
content::WebContents* web_contents() const { return web_contents_.get(); }
@@ -111,8 +115,6 @@
// The initial URL to load.
GURL initial_url_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundContents);
};
// This is the data sent out as the details with BACKGROUND_CONTENTS_OPENED.
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 423c641e..33c6ebad 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -92,6 +92,10 @@
is_platform_app_(extension->is_platform_app()),
extension_id_(extension->id()) {}
+ CrashNotificationDelegate(const CrashNotificationDelegate&) = delete;
+ CrashNotificationDelegate& operator=(const CrashNotificationDelegate&) =
+ delete;
+
void Click(const absl::optional<int>& button_index,
const absl::optional<std::u16string>& reply) override {
// Pass arguments by value as HandleClick() might destroy *this.
@@ -136,8 +140,6 @@
bool is_hosted_app_;
bool is_platform_app_;
std::string extension_id_;
-
- DISALLOW_COPY_AND_ASSIGN(CrashNotificationDelegate);
};
void NotificationImageReady(const std::string extension_name,
diff --git a/chrome/browser/background/background_contents_service_factory.h b/chrome/browser/background/background_contents_service_factory.h
index 0b266f7b..0bdc2ec 100644
--- a/chrome/browser/background/background_contents_service_factory.h
+++ b/chrome/browser/background/background_contents_service_factory.h
@@ -22,6 +22,11 @@
static BackgroundContentsServiceFactory* GetInstance();
+ BackgroundContentsServiceFactory(const BackgroundContentsServiceFactory&) =
+ delete;
+ BackgroundContentsServiceFactory& operator=(
+ const BackgroundContentsServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<BackgroundContentsServiceFactory>;
@@ -36,8 +41,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundContentsServiceFactory);
};
#endif // CHROME_BROWSER_BACKGROUND_BACKGROUND_CONTENTS_SERVICE_FACTORY_H_
diff --git a/chrome/browser/background_fetch/background_fetch_delegate_factory.h b/chrome/browser/background_fetch/background_fetch_delegate_factory.h
index 660444c..3cd291a 100644
--- a/chrome/browser/background_fetch/background_fetch_delegate_factory.h
+++ b/chrome/browser/background_fetch/background_fetch_delegate_factory.h
@@ -18,6 +18,11 @@
static BackgroundFetchDelegateImpl* GetForProfile(Profile* profile);
static BackgroundFetchDelegateFactory* GetInstance();
+ BackgroundFetchDelegateFactory(const BackgroundFetchDelegateFactory&) =
+ delete;
+ BackgroundFetchDelegateFactory& operator=(
+ const BackgroundFetchDelegateFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<BackgroundFetchDelegateFactory>;
@@ -28,8 +33,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundFetchDelegateFactory);
};
#endif // CHROME_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_DELEGATE_FACTORY_H_
diff --git a/chrome/browser/background_fetch/background_fetch_permission_context_unittest.cc b/chrome/browser/background_fetch/background_fetch_permission_context_unittest.cc
index 7ec38e21..d57a9b4f 100644
--- a/chrome/browser/background_fetch/background_fetch_permission_context_unittest.cc
+++ b/chrome/browser/background_fetch/background_fetch_permission_context_unittest.cc
@@ -25,6 +25,11 @@
protected:
BackgroundFetchPermissionContextTest() = default;
+ BackgroundFetchPermissionContextTest(
+ const BackgroundFetchPermissionContextTest&) = delete;
+ BackgroundFetchPermissionContextTest& operator=(
+ const BackgroundFetchPermissionContextTest&) = delete;
+
~BackgroundFetchPermissionContextTest() override = default;
ContentSetting GetPermissonStatus(
@@ -53,9 +58,6 @@
host_content_settings_map->SetContentSettingDefaultScope(
url /* primary_url*/, url /* secondary_url*/, content_type, setting);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BackgroundFetchPermissionContextTest);
};
// Test that Background Fetch permission is "allow" by default, when queried
diff --git a/chrome/browser/background_sync/background_sync_controller_factory.h b/chrome/browser/background_sync/background_sync_controller_factory.h
index 1ad530b..ed81dbb 100644
--- a/chrome/browser/background_sync/background_sync_controller_factory.h
+++ b/chrome/browser/background_sync/background_sync_controller_factory.h
@@ -18,6 +18,11 @@
static BackgroundSyncControllerImpl* GetForProfile(Profile* profile);
static BackgroundSyncControllerFactory* GetInstance();
+ BackgroundSyncControllerFactory(const BackgroundSyncControllerFactory&) =
+ delete;
+ BackgroundSyncControllerFactory& operator=(
+ const BackgroundSyncControllerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<BackgroundSyncControllerFactory>;
@@ -29,8 +34,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerFactory);
};
#endif // CHROME_BROWSER_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_FACTORY_H_
diff --git a/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc b/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
index 8d2459a..2b49253 100644
--- a/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
+++ b/chrome/browser/background_sync/background_sync_controller_impl_unittest.cc
@@ -52,6 +52,12 @@
}
class BackgroundSyncControllerImplTest : public testing::Test {
+ public:
+ BackgroundSyncControllerImplTest(const BackgroundSyncControllerImplTest&) =
+ delete;
+ BackgroundSyncControllerImplTest& operator=(
+ const BackgroundSyncControllerImplTest&) = delete;
+
protected:
BackgroundSyncControllerImplTest()
: task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {
@@ -100,8 +106,6 @@
content::BrowserTaskEnvironment task_environment_;
TestingProfile profile_;
std::unique_ptr<BackgroundSyncControllerImpl> controller_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImplTest);
};
TEST_F(BackgroundSyncControllerImplTest, NoFieldTrial) {
diff --git a/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc b/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc
index 0a7da96..48e80202 100644
--- a/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc
+++ b/chrome/browser/background_sync/periodic_background_sync_permission_context_unittest.cc
@@ -63,6 +63,12 @@
class PeriodicBackgroundSyncPermissionContextTest
: public ChromeRenderViewHostTestHarness {
+ public:
+ PeriodicBackgroundSyncPermissionContextTest(
+ const PeriodicBackgroundSyncPermissionContextTest&) = delete;
+ PeriodicBackgroundSyncPermissionContextTest& operator=(
+ const PeriodicBackgroundSyncPermissionContextTest&) = delete;
+
protected:
PeriodicBackgroundSyncPermissionContextTest() = default;
~PeriodicBackgroundSyncPermissionContextTest() override = default;
@@ -121,7 +127,6 @@
private:
std::unique_ptr<TestPeriodicBackgroundSyncPermissionContext>
permission_context_;
- DISALLOW_COPY_AND_ASSIGN(PeriodicBackgroundSyncPermissionContextTest);
};
TEST_F(PeriodicBackgroundSyncPermissionContextTest, DenyWhenFeatureDisabled) {
diff --git a/chrome/browser/badging/badge_manager_factory.h b/chrome/browser/badging/badge_manager_factory.h
index 5bc883e..8c2d7f78 100644
--- a/chrome/browser/badging/badge_manager_factory.h
+++ b/chrome/browser/badging/badge_manager_factory.h
@@ -29,6 +29,9 @@
// Returns the BadgeManagerFactory singleton.
static BadgeManagerFactory* GetInstance();
+ BadgeManagerFactory(const BadgeManagerFactory&) = delete;
+ BadgeManagerFactory& operator=(const BadgeManagerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<BadgeManagerFactory>;
@@ -38,8 +41,6 @@
// BrowserContextKeyedServiceFactory
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BadgeManagerFactory);
};
} // namespace badging
diff --git a/chrome/browser/banners/app_banner_manager_browsertest.cc b/chrome/browser/banners/app_banner_manager_browsertest.cc
index df4ae89..48ec3ec 100644
--- a/chrome/browser/banners/app_banner_manager_browsertest.cc
+++ b/chrome/browser/banners/app_banner_manager_browsertest.cc
@@ -168,6 +168,10 @@
public:
AppBannerManagerBrowserTest() = default;
+ AppBannerManagerBrowserTest(const AppBannerManagerBrowserTest&) = delete;
+ AppBannerManagerBrowserTest& operator=(const AppBannerManagerBrowserTest&) =
+ delete;
+
void SetUpOnMainThread() override {
AppBannerSettingsHelper::SetTotalEngagementToTrigger(10);
site_engagement::SiteEngagementScore::SetParamValuesForTesting();
@@ -257,9 +261,6 @@
if (expected_state)
EXPECT_EQ(expected_state, manager->state());
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AppBannerManagerBrowserTest);
};
IN_PROC_BROWSER_TEST_F(AppBannerManagerBrowserTest,
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
index a92d00a..8d5b897 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_delegate.h
@@ -15,6 +15,9 @@
public:
BitmapFetcherDelegate() {}
+ BitmapFetcherDelegate(const BitmapFetcherDelegate&) = delete;
+ BitmapFetcherDelegate& operator=(const BitmapFetcherDelegate&) = delete;
+
// This will be called when the bitmap has been requested, whether or not the
// request succeeds. |url| is the URL that was originally fetched so we can
// match up the bitmap with a specific request. |bitmap| may be NULL if the
@@ -23,8 +26,6 @@
protected:
virtual ~BitmapFetcherDelegate() {}
-
- DISALLOW_COPY_AND_ASSIGN(BitmapFetcherDelegate);
};
#endif // CHROME_BROWSER_BITMAP_FETCHER_BITMAP_FETCHER_DELEGATE_H_
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h
index 87cd13b..6901ebf 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_service_factory.h
@@ -18,6 +18,10 @@
content::BrowserContext* context);
static BitmapFetcherServiceFactory* GetInstance();
+ BitmapFetcherServiceFactory(const BitmapFetcherServiceFactory&) = delete;
+ BitmapFetcherServiceFactory& operator=(const BitmapFetcherServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<BitmapFetcherServiceFactory>;
@@ -27,8 +31,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BitmapFetcherServiceFactory);
};
#endif // CHROME_BROWSER_BITMAP_FETCHER_BITMAP_FETCHER_SERVICE_FACTORY_H_
diff --git a/chrome/browser/bookmarks/bookmark_html_writer.cc b/chrome/browser/bookmarks/bookmark_html_writer.cc
index 16ae15d..c95ca11 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer.cc
@@ -166,6 +166,9 @@
DCHECK(bookmarks_.is_dict());
}
+ Writer(const Writer&) = delete;
+ Writer& operator=(const Writer&) = delete;
+
// Writing bookmarks and favicons data to file.
void DoWrite() {
if (!OpenFile()) {
@@ -436,8 +439,6 @@
// How much we indent when writing a bookmark/folder. This is modified
// via IncrementIndent and DecrementIndent.
std::string indent_;
-
- DISALLOW_COPY_AND_ASSIGN(Writer);
};
} // namespace
diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
index 86045bbd..20cdac28 100644
--- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
+++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc
@@ -138,6 +138,9 @@
DCHECK(loop);
}
+ BookmarksObserver(const BookmarksObserver&) = delete;
+ BookmarksObserver& operator=(const BookmarksObserver&) = delete;
+
void OnExportFinished(Result result) override {
EXPECT_EQ(Result::kSuccess, result);
loop_->Quit();
@@ -145,8 +148,6 @@
private:
base::RunLoop* loop_;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarksObserver);
};
// Tests bookmark_html_writer by populating a BookmarkModel, writing it out by
diff --git a/chrome/browser/bookmarks/bookmark_model_factory.h b/chrome/browser/bookmarks/bookmark_model_factory.h
index 55af05f..ce7195b 100644
--- a/chrome/browser/bookmarks/bookmark_model_factory.h
+++ b/chrome/browser/bookmarks/bookmark_model_factory.h
@@ -28,6 +28,9 @@
static BookmarkModelFactory* GetInstance();
+ BookmarkModelFactory(const BookmarkModelFactory&) = delete;
+ BookmarkModelFactory& operator=(const BookmarkModelFactory&) = delete;
+
// Returns the default factory, useful in tests where it's null by default.
static TestingFactory GetDefaultFactory();
@@ -45,8 +48,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkModelFactory);
};
#endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_MODEL_FACTORY_H_
diff --git a/chrome/browser/bookmarks/managed_bookmark_service_factory.h b/chrome/browser/bookmarks/managed_bookmark_service_factory.h
index 114ed8ed..9077b37 100644
--- a/chrome/browser/bookmarks/managed_bookmark_service_factory.h
+++ b/chrome/browser/bookmarks/managed_bookmark_service_factory.h
@@ -27,6 +27,11 @@
public:
static bookmarks::ManagedBookmarkService* GetForProfile(Profile* profile);
static ManagedBookmarkServiceFactory* GetInstance();
+
+ ManagedBookmarkServiceFactory(const ManagedBookmarkServiceFactory&) = delete;
+ ManagedBookmarkServiceFactory& operator=(
+ const ManagedBookmarkServiceFactory&) = delete;
+
static TestingFactory GetDefaultFactory();
static std::string GetManagedBookmarksManager(Profile* profile);
@@ -43,8 +48,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(ManagedBookmarkServiceFactory);
};
#endif // CHROME_BROWSER_BOOKMARKS_MANAGED_BOOKMARK_SERVICE_FACTORY_H_
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index fd3f15d..bad9e11 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -102,6 +102,9 @@
content::Source<content::WebContents>(web_contents));
}
+ TestFinishObserver(const TestFinishObserver&) = delete;
+ TestFinishObserver& operator=(const TestFinishObserver&) = delete;
+
bool WaitForFinish() {
if (!finished_) {
waiting_ = true;
@@ -129,8 +132,6 @@
bool finished_;
bool waiting_;
content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(TestFinishObserver);
};
class BrowserKeyEventsTest : public InProcessBrowserTest {
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 480a28b..f0ad783 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -520,6 +520,9 @@
public:
RundownTaskCounter();
+ RundownTaskCounter(const RundownTaskCounter&) = delete;
+ RundownTaskCounter& operator=(const RundownTaskCounter&) = delete;
+
// Increments |count_| and returns a closure bound to Decrement(). All
// closures returned by this RundownTaskCounter's GetRundownClosure() method
// must be invoked for TimedWait() to complete its wait without timing
@@ -542,8 +545,6 @@
// until TimedWait is called.
base::AtomicRefCount count_{1};
base::WaitableEvent waitable_event_;
-
- DISALLOW_COPY_AND_ASSIGN(RundownTaskCounter);
};
RundownTaskCounter::RundownTaskCounter() = default;
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 311938a..f2e95cee 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -75,6 +75,11 @@
PrimaryProfileServicesShutdownNotifierFactory>::get();
}
+ PrimaryProfileServicesShutdownNotifierFactory(
+ const PrimaryProfileServicesShutdownNotifierFactory&) = delete;
+ PrimaryProfileServicesShutdownNotifierFactory& operator=(
+ const PrimaryProfileServicesShutdownNotifierFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
PrimaryProfileServicesShutdownNotifierFactory>;
@@ -83,8 +88,6 @@
: BrowserContextKeyedServiceShutdownNotifierFactory(
"PrimaryProfileServices") {}
~PrimaryProfileServicesShutdownNotifierFactory() override {}
-
- DISALLOW_COPY_AND_ASSIGN(PrimaryProfileServicesShutdownNotifierFactory);
};
} // namespace
diff --git a/chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h b/chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h
index dc91056..c7601c9 100644
--- a/chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h
+++ b/chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h
@@ -14,12 +14,15 @@
// redirect, may open an alternative browser and close the tab.
class BrowserSwitcherNavigationThrottle {
public:
+ BrowserSwitcherNavigationThrottle() = delete;
+ BrowserSwitcherNavigationThrottle(const BrowserSwitcherNavigationThrottle&) =
+ delete;
+ BrowserSwitcherNavigationThrottle& operator=(
+ const BrowserSwitcherNavigationThrottle&) = delete;
+
// Creates a |NavigationThrottle| if needed for the navigation.
static std::unique_ptr<content::NavigationThrottle> MaybeCreateThrottleFor(
content::NavigationHandle* navigation);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSwitcherNavigationThrottle);
};
} // namespace browser_switcher
diff --git a/chrome/browser/browser_switcher/browser_switcher_prefs.h b/chrome/browser/browser_switcher/browser_switcher_prefs.h
index 3638968..8877ba05 100644
--- a/chrome/browser/browser_switcher/browser_switcher_prefs.h
+++ b/chrome/browser/browser_switcher/browser_switcher_prefs.h
@@ -116,7 +116,13 @@
public:
using PrefsChangedCallback = base::RepeatingCallback<PrefsChangedSignature>;
+ BrowserSwitcherPrefs() = delete;
+
explicit BrowserSwitcherPrefs(Profile* profile);
+
+ BrowserSwitcherPrefs(const BrowserSwitcherPrefs&) = delete;
+ BrowserSwitcherPrefs& operator=(const BrowserSwitcherPrefs&) = delete;
+
~BrowserSwitcherPrefs() override;
// KeyedService:
@@ -245,8 +251,6 @@
base::RepeatingCallbackList<PrefsChangedSignature> callback_list_;
base::WeakPtrFactory<BrowserSwitcherPrefs> weak_ptr_factory_{this};
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSwitcherPrefs);
};
namespace prefs {
diff --git a/chrome/browser/browser_switcher/browser_switcher_service.h b/chrome/browser/browser_switcher/browser_switcher_service.h
index 954c758..3290db4 100644
--- a/chrome/browser/browser_switcher/browser_switcher_service.h
+++ b/chrome/browser/browser_switcher/browser_switcher_service.h
@@ -119,7 +119,13 @@
base::RepeatingCallback<AllRulesetsParsedCallbackSignature>;
public:
+ BrowserSwitcherService() = delete;
+
explicit BrowserSwitcherService(Profile* profile);
+
+ BrowserSwitcherService(const BrowserSwitcherService&) = delete;
+ BrowserSwitcherService& operator=(const BrowserSwitcherService&) = delete;
+
~BrowserSwitcherService() override;
virtual void Init();
@@ -204,9 +210,6 @@
std::unique_ptr<BrowserSwitcherSitelist> sitelist_;
base::WeakPtrFactory<BrowserSwitcherService> weak_ptr_factory_{this};
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSwitcherService);
};
} // namespace browser_switcher
diff --git a/chrome/browser/browser_switcher/browser_switcher_service_win.h b/chrome/browser/browser_switcher/browser_switcher_service_win.h
index 042a6788..1f3d87b1 100644
--- a/chrome/browser/browser_switcher/browser_switcher_service_win.h
+++ b/chrome/browser/browser_switcher/browser_switcher_service_win.h
@@ -16,9 +16,16 @@
// Windows-specific extension of BrowserSwitcherService.
class BrowserSwitcherServiceWin : public BrowserSwitcherService {
public:
+ BrowserSwitcherServiceWin() = delete;
+
explicit BrowserSwitcherServiceWin(
Profile* profile,
base::FilePath cache_dir_for_testing = base::FilePath());
+
+ BrowserSwitcherServiceWin(const BrowserSwitcherServiceWin&) = delete;
+ BrowserSwitcherServiceWin& operator=(const BrowserSwitcherServiceWin&) =
+ delete;
+
~BrowserSwitcherServiceWin() override;
void Init() override;
@@ -77,8 +84,6 @@
scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_;
base::WeakPtrFactory<BrowserSwitcherServiceWin> weak_ptr_factory_{this};
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(BrowserSwitcherServiceWin);
};
} // namespace browser_switcher
diff --git a/chrome/browser/browsing_data/access_context_audit_service.h b/chrome/browser/browsing_data/access_context_audit_service.h
index 0709aca71..b6daec10 100644
--- a/chrome/browser/browsing_data/access_context_audit_service.h
+++ b/chrome/browser/browsing_data/access_context_audit_service.h
@@ -72,6 +72,11 @@
};
explicit AccessContextAuditService(Profile* profile);
+
+ AccessContextAuditService(const AccessContextAuditService&) = delete;
+ AccessContextAuditService& operator=(const AccessContextAuditService&) =
+ delete;
+
~AccessContextAuditService() override;
// Initialises the Access Context Audit database in |database_dir|, and
@@ -191,7 +196,6 @@
storage_partition_observation_{this};
base::WeakPtrFactory<AccessContextAuditService> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(AccessContextAuditService);
};
#endif // CHROME_BROWSER_BROWSING_DATA_ACCESS_CONTEXT_AUDIT_SERVICE_H_
diff --git a/chrome/browser/browsing_data/browsing_data_media_license_helper.cc b/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
index 57b5306..c9c96db 100644
--- a/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
+++ b/chrome/browser/browsing_data/browsing_data_media_license_helper.cc
@@ -34,6 +34,12 @@
// BrowsingDataMediaLicenseHelper implementation
explicit BrowsingDataMediaLicenseHelperImpl(
storage::FileSystemContext* filesystem_context);
+
+ BrowsingDataMediaLicenseHelperImpl(
+ const BrowsingDataMediaLicenseHelperImpl&) = delete;
+ BrowsingDataMediaLicenseHelperImpl& operator=(
+ const BrowsingDataMediaLicenseHelperImpl&) = delete;
+
void StartFetching(FetchCallback callback) final;
void DeleteMediaLicenseOrigin(const GURL& origin) final;
@@ -57,8 +63,6 @@
// Keep a reference to the FileSystemContext object for the current profile
// for use on the file task runner.
scoped_refptr<storage::FileSystemContext> filesystem_context_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowsingDataMediaLicenseHelperImpl);
};
BrowsingDataMediaLicenseHelperImpl::BrowsingDataMediaLicenseHelperImpl(
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper.h b/chrome/browser/browsing_data/browsing_data_quota_helper.h
index 4b63601..dbf327d 100644
--- a/chrome/browser/browsing_data/browsing_data_quota_helper.h
+++ b/chrome/browser/browsing_data/browsing_data_quota_helper.h
@@ -63,6 +63,9 @@
static scoped_refptr<BrowsingDataQuotaHelper> Create(Profile* profile);
+ BrowsingDataQuotaHelper(const BrowsingDataQuotaHelper&) = delete;
+ BrowsingDataQuotaHelper& operator=(const BrowsingDataQuotaHelper&) = delete;
+
virtual void StartFetching(FetchResultCallback callback) = 0;
virtual void RevokeHostQuota(const std::string& host) = 0;
@@ -74,8 +77,6 @@
private:
friend class base::DeleteHelper<BrowsingDataQuotaHelper>;
friend struct BrowsingDataQuotaHelperDeleter;
-
- DISALLOW_COPY_AND_ASSIGN(BrowsingDataQuotaHelper);
};
#endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_QUOTA_HELPER_H_
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.h b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.h
index 9617eb4..2f24949 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.h
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_factory.h
@@ -24,6 +24,11 @@
// Returns the ChromeBrowsingDataRemoverDelegate associated with |profile|.
static ChromeBrowsingDataRemoverDelegate* GetForProfile(Profile* profile);
+ ChromeBrowsingDataRemoverDelegateFactory(
+ const ChromeBrowsingDataRemoverDelegateFactory&) = delete;
+ ChromeBrowsingDataRemoverDelegateFactory& operator=(
+ const ChromeBrowsingDataRemoverDelegateFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
ChromeBrowsingDataRemoverDelegateFactory>;
@@ -36,8 +41,6 @@
content::BrowserContext* context) const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeBrowsingDataRemoverDelegateFactory);
};
#endif // CHROME_BROWSER_BROWSING_DATA_CHROME_BROWSING_DATA_REMOVER_DELEGATE_FACTORY_H_
diff --git a/chrome/browser/browsing_data/counters/browsing_data_counter_factory.h b/chrome/browser/browsing_data/counters/browsing_data_counter_factory.h
index 0d674001..6a14537 100644
--- a/chrome/browser/browsing_data/counters/browsing_data_counter_factory.h
+++ b/chrome/browser/browsing_data/counters/browsing_data_counter_factory.h
@@ -23,11 +23,13 @@
static std::unique_ptr<browsing_data::BrowsingDataCounter>
GetForProfileAndPref(Profile* profile, const std::string& pref_name);
+ BrowsingDataCounterFactory(const BrowsingDataCounterFactory&) = delete;
+ BrowsingDataCounterFactory& operator=(const BrowsingDataCounterFactory&) =
+ delete;
+
private:
BrowsingDataCounterFactory();
~BrowsingDataCounterFactory();
-
- DISALLOW_COPY_AND_ASSIGN(BrowsingDataCounterFactory);
};
#endif // CHROME_BROWSER_BROWSING_DATA_COUNTERS_BROWSING_DATA_COUNTER_FACTORY_H_
diff --git a/chrome/browser/browsing_data/counters/hosted_apps_counter.h b/chrome/browser/browsing_data/counters/hosted_apps_counter.h
index 48c7848..ea3cebd 100644
--- a/chrome/browser/browsing_data/counters/hosted_apps_counter.h
+++ b/chrome/browser/browsing_data/counters/hosted_apps_counter.h
@@ -34,6 +34,10 @@
};
explicit HostedAppsCounter(Profile* profile);
+
+ HostedAppsCounter(const HostedAppsCounter&) = delete;
+ HostedAppsCounter& operator=(const HostedAppsCounter&) = delete;
+
~HostedAppsCounter() override;
const char* GetPrefName() const override;
@@ -43,8 +47,6 @@
void Count() override;
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(HostedAppsCounter);
};
#endif // CHROME_BROWSER_BROWSING_DATA_COUNTERS_HOSTED_APPS_COUNTER_H_
diff --git a/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h b/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h
index 726c7ad..3294fa1 100644
--- a/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h
+++ b/chrome/browser/browsing_data/mock_browsing_data_media_license_helper.h
@@ -19,6 +19,11 @@
public:
explicit MockBrowsingDataMediaLicenseHelper(Profile* profile);
+ MockBrowsingDataMediaLicenseHelper(
+ const MockBrowsingDataMediaLicenseHelper&) = delete;
+ MockBrowsingDataMediaLicenseHelper& operator=(
+ const MockBrowsingDataMediaLicenseHelper&) = delete;
+
// BrowsingDataMediaLicenseHelper implementation:
void StartFetching(FetchCallback callback) override;
void DeleteMediaLicenseOrigin(const GURL& origin) override;
@@ -38,8 +43,6 @@
private:
FetchCallback callback_;
std::list<MediaLicenseInfo> media_licenses_;
-
- DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataMediaLicenseHelper);
};
#endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_MEDIA_LICENSE_HELPER_H_
diff --git a/chrome/browser/browsing_data/mock_browsing_data_quota_helper.h b/chrome/browser/browsing_data/mock_browsing_data_quota_helper.h
index d059e0ac..26ec468 100644
--- a/chrome/browser/browsing_data/mock_browsing_data_quota_helper.h
+++ b/chrome/browser/browsing_data/mock_browsing_data_quota_helper.h
@@ -17,6 +17,10 @@
public:
explicit MockBrowsingDataQuotaHelper(Profile* profile);
+ MockBrowsingDataQuotaHelper(const MockBrowsingDataQuotaHelper&) = delete;
+ MockBrowsingDataQuotaHelper& operator=(const MockBrowsingDataQuotaHelper&) =
+ delete;
+
void StartFetching(FetchResultCallback callback) override;
void RevokeHostQuota(const std::string& host) override;
@@ -32,8 +36,6 @@
FetchResultCallback callback_;
std::list<QuotaInfo> response_;
-
- DISALLOW_COPY_AND_ASSIGN(MockBrowsingDataQuotaHelper);
};
#endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_QUOTA_HELPER_H_
diff --git a/chrome/browser/browsing_data/navigation_entry_remover.cc b/chrome/browser/browsing_data/navigation_entry_remover.cc
index b83a3e1..9221c31 100644
--- a/chrome/browser/browsing_data/navigation_entry_remover.cc
+++ b/chrome/browser/browsing_data/navigation_entry_remover.cc
@@ -155,6 +155,9 @@
service->LoadTabsFromLastSession();
}
+ TabRestoreDeletionHelper(const TabRestoreDeletionHelper&) = delete;
+ TabRestoreDeletionHelper& operator=(const TabRestoreDeletionHelper&) = delete;
+
// sessions::TabRestoreServiceObserver:
void TabRestoreServiceDestroyed(
sessions::TabRestoreService* service) override {
@@ -171,8 +174,6 @@
sessions::TabRestoreService* service_;
sessions::TabRestoreService::DeletionPredicate deletion_predicate_;
-
- DISALLOW_COPY_AND_ASSIGN(TabRestoreDeletionHelper);
};
void DeleteTabRestoreEntries(
diff --git a/chrome/browser/browsing_data/third_party_data_remover_browsertest.cc b/chrome/browser/browsing_data/third_party_data_remover_browsertest.cc
index 06e9b32..45b39fc 100644
--- a/chrome/browser/browsing_data/third_party_data_remover_browsertest.cc
+++ b/chrome/browser/browsing_data/third_party_data_remover_browsertest.cc
@@ -40,6 +40,11 @@
"CacheStorage", "ServiceWorker", "StorageFoundation"};
class ThirdPartyDataRemoverTest : public InProcessBrowserTest {
+ public:
+ ThirdPartyDataRemoverTest(const ThirdPartyDataRemoverTest&) = delete;
+ ThirdPartyDataRemoverTest& operator=(const ThirdPartyDataRemoverTest&) =
+ delete;
+
protected:
ThirdPartyDataRemoverTest()
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {
@@ -162,8 +167,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
net::test_server::EmbeddedTestServer https_server_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyDataRemoverTest);
};
// Test that ClearThirdPartyData clears SameSite=None cookies.
@@ -202,6 +205,12 @@
}
class ThirdPartyDataRemoverFallbackTest : public ThirdPartyDataRemoverTest {
+ public:
+ ThirdPartyDataRemoverFallbackTest(const ThirdPartyDataRemoverFallbackTest&) =
+ delete;
+ ThirdPartyDataRemoverFallbackTest& operator=(
+ const ThirdPartyDataRemoverFallbackTest&) = delete;
+
protected:
ThirdPartyDataRemoverFallbackTest()
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {
@@ -212,8 +221,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
net::test_server::EmbeddedTestServer https_server_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyDataRemoverFallbackTest);
};
// Test the fallback behavior of ClearThirdPartyData when access context
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc
index b77acdd0..c2a03a8 100644
--- a/chrome/browser/captive_portal/captive_portal_browsertest.cc
+++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -397,6 +397,9 @@
public:
explicit CaptivePortalObserver(Profile* profile);
+ CaptivePortalObserver(const CaptivePortalObserver&) = delete;
+ CaptivePortalObserver& operator=(const CaptivePortalObserver&) = delete;
+
// Runs the message loop until exactly |update_count| captive portal
// results have been received, since the creation of |this|. Expects no
// additional captive portal results.
@@ -428,8 +431,6 @@
// Last result received.
CaptivePortalResult captive_portal_result_;
-
- DISALLOW_COPY_AND_ASSIGN(CaptivePortalObserver);
};
CaptivePortalObserver::CaptivePortalObserver(Profile* profile)
@@ -531,6 +532,9 @@
tab_strip_model->AddObserver(this);
}
+ TabActivationWaiter(const TabActivationWaiter&) = delete;
+ TabActivationWaiter& operator=(const TabActivationWaiter&) = delete;
+
void WaitForActiveTabChange() {
if (number_of_unconsumed_active_tab_changes_ == 0) {
// Wait until TabStripModelObserver::ActiveTabChanged will get called.
@@ -560,8 +564,6 @@
private:
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
int number_of_unconsumed_active_tab_changes_;
-
- DISALLOW_COPY_AND_ASSIGN(TabActivationWaiter);
};
} // namespace
diff --git a/chrome/browser/captive_portal/captive_portal_service_factory.h b/chrome/browser/captive_portal/captive_portal_service_factory.h
index d4fd65d..d13b3e9 100644
--- a/chrome/browser/captive_portal/captive_portal_service_factory.h
+++ b/chrome/browser/captive_portal/captive_portal_service_factory.h
@@ -27,6 +27,10 @@
static CaptivePortalServiceFactory* GetInstance();
+ CaptivePortalServiceFactory(const CaptivePortalServiceFactory&) = delete;
+ CaptivePortalServiceFactory& operator=(const CaptivePortalServiceFactory&) =
+ delete;
+
private:
friend class CaptivePortalBrowserTest;
friend class CaptivePortalServiceTest;
@@ -40,8 +44,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(CaptivePortalServiceFactory);
};
#endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_SERVICE_FACTORY_H_
diff --git a/chrome/browser/certificate_manager_model.cc b/chrome/browser/certificate_manager_model.cc
index 100e18b..60a8495 100644
--- a/chrome/browser/certificate_manager_model.cc
+++ b/chrome/browser/certificate_manager_model.cc
@@ -395,6 +395,9 @@
certificate_provider_service_(std::move(certificate_provider_service)) {
}
+ CertsSourceExtensions(const CertsSourceExtensions&) = delete;
+ CertsSourceExtensions& operator=(const CertsSourceExtensions&) = delete;
+
void Refresh() override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
certificate_provider_service_->GetCertificates(base::BindOnce(
@@ -448,8 +451,6 @@
std::unique_ptr<chromeos::CertificateProvider> certificate_provider_service_;
base::WeakPtrFactory<CertsSourceExtensions> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CertsSourceExtensions);
};
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/certificate_manager_model.h b/chrome/browser/certificate_manager_model.h
index 15d34ae..625f166 100644
--- a/chrome/browser/certificate_manager_model.h
+++ b/chrome/browser/certificate_manager_model.h
@@ -135,11 +135,13 @@
#endif
Params();
- Params(Params&& other);
- ~Params();
- private:
- DISALLOW_COPY_AND_ASSIGN(Params);
+ Params(const Params&) = delete;
+ Params& operator=(const Params&) = delete;
+
+ Params(Params&& other);
+
+ ~Params();
};
// Map from the subject organization name to the list of certs from that
@@ -174,6 +176,10 @@
CertificateManagerModel(std::unique_ptr<Params> params,
Observer* observer,
net::NSSCertDatabase* nss_cert_database);
+
+ CertificateManagerModel(const CertificateManagerModel&) = delete;
+ CertificateManagerModel& operator=(const CertificateManagerModel&) = delete;
+
~CertificateManagerModel();
// Accessor for read-only access to the underlying NSSCertDatabase.
@@ -277,8 +283,6 @@
// The observer to notify when certificate list is refreshed.
Observer* observer_;
-
- DISALLOW_COPY_AND_ASSIGN(CertificateManagerModel);
};
#endif // CHROME_BROWSER_CERTIFICATE_MANAGER_MODEL_H_
diff --git a/chrome/browser/certificate_manager_model_unittest.cc b/chrome/browser/certificate_manager_model_unittest.cc
index ac77fd0..20b79dd5 100644
--- a/chrome/browser/certificate_manager_model_unittest.cc
+++ b/chrome/browser/certificate_manager_model_unittest.cc
@@ -65,6 +65,10 @@
public:
CertificateManagerModelTest() {}
+ CertificateManagerModelTest(const CertificateManagerModelTest&) = delete;
+ CertificateManagerModelTest& operator=(const CertificateManagerModelTest&) =
+ delete;
+
protected:
void SetUp() override {
ASSERT_TRUE(test_nssdb_.is_open());
@@ -110,9 +114,6 @@
std::unique_ptr<net::NSSCertDatabase> nss_cert_db_;
std::unique_ptr<FakeObserver> fake_observer_;
std::unique_ptr<CertificateManagerModel> certificate_manager_model_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CertificateManagerModelTest);
};
// CertificateManagerModel correctly lists CA certificates from the platform NSS
diff --git a/chrome/browser/chrome_browser_main_posix.cc b/chrome/browser/chrome_browser_main_posix.cc
index ad5a41b..d042749 100644
--- a/chrome/browser/chrome_browser_main_posix.cc
+++ b/chrome/browser/chrome_browser_main_posix.cc
@@ -40,6 +40,9 @@
// way through startup which causes all sorts of problems.
class ExitHandler {
public:
+ ExitHandler(const ExitHandler&) = delete;
+ ExitHandler& operator=(const ExitHandler&) = delete;
+
// Invokes exit when appropriate.
static void ExitWhenPossibleOnUIThread(int signal);
@@ -59,8 +62,6 @@
// SessionRestore, so that the callback list does not contain any obsolete
// callbacks.
base::CallbackListSubscription on_session_restored_callback_subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(ExitHandler);
};
// static
diff --git a/chrome/browser/chrome_browser_main_posix.h b/chrome/browser/chrome_browser_main_posix.h
index 54c71ddf..dade7e6 100644
--- a/chrome/browser/chrome_browser_main_posix.h
+++ b/chrome/browser/chrome_browser_main_posix.h
@@ -13,15 +13,16 @@
ChromeBrowserMainPartsPosix(const content::MainFunctionParams& parameters,
StartupData* startup_data);
+ ChromeBrowserMainPartsPosix(const ChromeBrowserMainPartsPosix&) = delete;
+ ChromeBrowserMainPartsPosix& operator=(const ChromeBrowserMainPartsPosix&) =
+ delete;
+
// content::BrowserMainParts overrides.
int PreEarlyInitialization() override;
void PostCreateMainMessageLoop() override;
// ChromeBrowserMainParts overrides.
void ShowMissingLocaleMessageBox() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainPartsPosix);
};
#endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_POSIX_H_
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 0f79fe4..f45da04 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -4658,6 +4658,11 @@
return pending_remote;
}
+ SpecialAccessFileURLLoaderFactory(const SpecialAccessFileURLLoaderFactory&) =
+ delete;
+ SpecialAccessFileURLLoaderFactory& operator=(
+ const SpecialAccessFileURLLoaderFactory&) = delete;
+
private:
explicit SpecialAccessFileURLLoaderFactory(
int child_id,
@@ -4688,7 +4693,6 @@
}
int child_id_;
- DISALLOW_COPY_AND_ASSIGN(SpecialAccessFileURLLoaderFactory);
};
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/chrome_content_browser_client_browsertest.cc b/chrome/browser/chrome_content_browser_client_browsertest.cc
index 2fe68d29..7ae001c 100644
--- a/chrome/browser/chrome_content_browser_client_browsertest.cc
+++ b/chrome/browser/chrome_content_browser_client_browsertest.cc
@@ -77,12 +77,14 @@
public:
ChromeContentBrowserClientBrowserTest() {}
+ ChromeContentBrowserClientBrowserTest(
+ const ChromeContentBrowserClientBrowserTest&) = delete;
+ ChromeContentBrowserClientBrowserTest& operator=(
+ const ChromeContentBrowserClientBrowserTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
content::IsolateAllSitesForTesting(command_line);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientBrowserTest);
};
// Test that a basic navigation works in --site-per-process mode. This prevents
@@ -111,6 +113,10 @@
public:
IsolatedOriginNTPBrowserTest() {}
+ IsolatedOriginNTPBrowserTest(const IsolatedOriginNTPBrowserTest&) = delete;
+ IsolatedOriginNTPBrowserTest& operator=(const IsolatedOriginNTPBrowserTest&) =
+ delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
ASSERT_TRUE(https_test_server().InitializeAndListen());
@@ -127,9 +133,6 @@
host_resolver()->AddRule("*", "127.0.0.1");
https_test_server().StartAcceptingConnections();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(IsolatedOriginNTPBrowserTest);
};
// Verifies that when the remote NTP URL has an origin which is also marked as
@@ -189,6 +192,10 @@
public:
OpenWindowFromNTPBrowserTest() {}
+ OpenWindowFromNTPBrowserTest(const OpenWindowFromNTPBrowserTest&) = delete;
+ OpenWindowFromNTPBrowserTest& operator=(const OpenWindowFromNTPBrowserTest&) =
+ delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
}
@@ -199,9 +206,6 @@
ASSERT_TRUE(https_test_server().InitializeAndListen());
https_test_server().StartAcceptingConnections();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OpenWindowFromNTPBrowserTest);
};
// Test checks that navigations from NTP tab to URLs with same host as NTP but
@@ -442,6 +446,9 @@
public:
ProtocolHandlerTest() = default;
+ ProtocolHandlerTest(const ProtocolHandlerTest&) = delete;
+ ProtocolHandlerTest& operator=(const ProtocolHandlerTest&) = delete;
+
void SetUpOnMainThread() override {
InProcessBrowserTest::SetUpOnMainThread();
host_resolver()->AddRule("*", "127.0.0.1");
@@ -460,9 +467,6 @@
return ProtocolHandlerRegistryFactory::GetInstance()->GetForBrowserContext(
browser()->profile());
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerTest);
};
IN_PROC_BROWSER_TEST_F(ProtocolHandlerTest, CustomHandler) {
diff --git a/chrome/browser/chrome_content_browser_client_unittest.cc b/chrome/browser/chrome_content_browser_client_unittest.cc
index 393a4e2..755ae1d 100644
--- a/chrome/browser/chrome_content_browser_client_unittest.cc
+++ b/chrome/browser/chrome_content_browser_client_unittest.cc
@@ -238,6 +238,11 @@
: from_command_line_(base::CommandLine::NO_PROGRAM),
to_command_line_(base::CommandLine::NO_PROGRAM) {}
+ DisableWebRtcEncryptionFlagTest(const DisableWebRtcEncryptionFlagTest&) =
+ delete;
+ DisableWebRtcEncryptionFlagTest& operator=(
+ const DisableWebRtcEncryptionFlagTest&) = delete;
+
protected:
void SetUp() override {
from_command_line_.AppendSwitch(switches::kDisableWebRtcEncryption);
@@ -252,9 +257,6 @@
base::CommandLine from_command_line_;
base::CommandLine to_command_line_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisableWebRtcEncryptionFlagTest);
};
TEST_F(DisableWebRtcEncryptionFlagTest, UnknownChannel) {
@@ -656,6 +658,10 @@
content::BrowserContext* browser_context)
: MockRenderProcessHost(browser_context) {}
+ CaptivePortalCheckProcessHost(const CaptivePortalCheckProcessHost&) = delete;
+ CaptivePortalCheckProcessHost& operator=(
+ const CaptivePortalCheckProcessHost&) = delete;
+
void CreateURLLoaderFactory(
mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver,
network::mojom::URLLoaderFactoryParamsPtr params) override {
@@ -672,8 +678,6 @@
private:
bool* invoked_url_factory_ = nullptr;
bool expected_disable_secure_dns_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(CaptivePortalCheckProcessHost);
};
class CaptivePortalCheckRenderProcessHostFactory
@@ -681,6 +685,11 @@
public:
CaptivePortalCheckRenderProcessHostFactory() = default;
+ CaptivePortalCheckRenderProcessHostFactory(
+ const CaptivePortalCheckRenderProcessHostFactory&) = delete;
+ CaptivePortalCheckRenderProcessHostFactory& operator=(
+ const CaptivePortalCheckRenderProcessHostFactory&) = delete;
+
content::RenderProcessHost* CreateRenderProcessHost(
content::BrowserContext* browser_context,
content::SiteInstance* site_instance) override {
@@ -700,8 +709,6 @@
private:
std::list<std::unique_ptr<CaptivePortalCheckProcessHost>> processes_;
-
- DISALLOW_COPY_AND_ASSIGN(CaptivePortalCheckRenderProcessHostFactory);
};
class ChromeContentBrowserClientCaptivePortalBrowserTest
diff --git a/chrome/browser/chrome_origin_trials_browsertest.cc b/chrome/browser/chrome_origin_trials_browsertest.cc
index bb0dae16..8e0fe0d 100644
--- a/chrome/browser/chrome_origin_trials_browsertest.cc
+++ b/chrome/browser/chrome_origin_trials_browsertest.cc
@@ -43,6 +43,10 @@
};
class ChromeOriginTrialsTest : public InProcessBrowserTest {
+ public:
+ ChromeOriginTrialsTest(const ChromeOriginTrialsTest&) = delete;
+ ChromeOriginTrialsTest& operator=(const ChromeOriginTrialsTest&) = delete;
+
protected:
ChromeOriginTrialsTest() {}
@@ -73,9 +77,6 @@
}
PrefService* local_state() { return g_browser_process->local_state(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeOriginTrialsTest);
};
// Tests to verify that the command line is not set, when no prefs exist for
diff --git a/chrome/browser/chrome_service_worker_browsertest.cc b/chrome/browser/chrome_service_worker_browsertest.cc
index 256f760..7384276d 100644
--- a/chrome/browser/chrome_service_worker_browsertest.cc
+++ b/chrome/browser/chrome_service_worker_browsertest.cc
@@ -100,6 +100,10 @@
}
class ChromeServiceWorkerTest : public InProcessBrowserTest {
+ public:
+ ChromeServiceWorkerTest(const ChromeServiceWorkerTest&) = delete;
+ ChromeServiceWorkerTest& operator=(const ChromeServiceWorkerTest&) = delete;
+
protected:
ChromeServiceWorkerTest() {
EXPECT_TRUE(service_worker_dir_.CreateUniqueTempDir());
@@ -195,9 +199,6 @@
}
base::ScopedTempDir service_worker_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerTest);
};
// http://crbug.com/368570
@@ -306,6 +307,11 @@
}
class ChromeServiceWorkerFetchTest : public ChromeServiceWorkerTest {
+ public:
+ ChromeServiceWorkerFetchTest(const ChromeServiceWorkerFetchTest&) = delete;
+ ChromeServiceWorkerFetchTest& operator=(const ChromeServiceWorkerFetchTest&) =
+ delete;
+
protected:
ChromeServiceWorkerFetchTest() {}
~ChromeServiceWorkerFetchTest() override {}
@@ -409,8 +415,6 @@
browser(), embedded_test_server()->GetURL("/test.html")));
EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
}
-
- DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerFetchTest);
};
class FaviconUpdateWaiter : public favicon::FaviconDriverObserver {
@@ -453,6 +457,12 @@
};
class ChromeServiceWorkerLinkFetchTest : public ChromeServiceWorkerFetchTest {
+ public:
+ ChromeServiceWorkerLinkFetchTest(const ChromeServiceWorkerLinkFetchTest&) =
+ delete;
+ ChromeServiceWorkerLinkFetchTest& operator=(
+ const ChromeServiceWorkerLinkFetchTest&) = delete;
+
protected:
ChromeServiceWorkerLinkFetchTest() {}
~ChromeServiceWorkerLinkFetchTest() override {}
@@ -538,8 +548,6 @@
blink::mojom::ManifestPtr) {
std::move(continuation).Run();
}
-
- DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerLinkFetchTest);
};
IN_PROC_BROWSER_TEST_F(ChromeServiceWorkerLinkFetchTest, ManifestSameOrigin) {
@@ -600,6 +608,12 @@
// expect that the the service worker only see the navigation request for the
// iframe.
class ChromeServiceWorkerFetchPPAPITest : public ChromeServiceWorkerFetchTest {
+ public:
+ ChromeServiceWorkerFetchPPAPITest(const ChromeServiceWorkerFetchPPAPITest&) =
+ delete;
+ ChromeServiceWorkerFetchPPAPITest& operator=(
+ const ChromeServiceWorkerFetchPPAPITest&) = delete;
+
protected:
ChromeServiceWorkerFetchPPAPITest() {}
~ChromeServiceWorkerFetchPPAPITest() override {}
@@ -638,8 +652,6 @@
private:
std::string test_page_url_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerFetchPPAPITest);
};
// Flaky on Windows and Linux ASan. https://crbug.com/1113802
@@ -902,6 +914,11 @@
public:
ChromeServiceWorkerNavigationPreloadTest() = default;
+ ChromeServiceWorkerNavigationPreloadTest(
+ const ChromeServiceWorkerNavigationPreloadTest&) = delete;
+ ChromeServiceWorkerNavigationPreloadTest& operator=(
+ const ChromeServiceWorkerNavigationPreloadTest&) = delete;
+
void SetUp() override {
embedded_test_server()->RegisterRequestHandler(base::BindRepeating(
&ChromeServiceWorkerNavigationPreloadTest::HandleRequest,
@@ -967,8 +984,6 @@
// The request that hit the "test" endpoint.
absl::optional<net::test_server::HttpRequest> received_request_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeServiceWorkerNavigationPreloadTest);
};
// Tests navigation preload during a navigation in the top-level frame
diff --git a/chrome/browser/chromeos/camera_detector.h b/chrome/browser/chromeos/camera_detector.h
index 8353683..e4bfa0f 100644
--- a/chrome/browser/chromeos/camera_detector.h
+++ b/chrome/browser/chromeos/camera_detector.h
@@ -19,6 +19,9 @@
kCameraPresent
};
+ CameraDetector(const CameraDetector&) = delete;
+ CameraDetector& operator=(const CameraDetector&) = delete;
+
// Returns result of the last presence check. If no check has been performed
// yet, returns |kCameraPresenceUnknown|.
static CameraPresence camera_presence() {
@@ -41,8 +44,6 @@
static CameraPresence camera_presence_;
static bool presence_check_in_progress_;
-
- DISALLOW_COPY_AND_ASSIGN(CameraDetector);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/camera_presence_notifier.h b/chrome/browser/chromeos/camera_presence_notifier.h
index 4a59df0..e1054bc 100644
--- a/chrome/browser/chromeos/camera_presence_notifier.h
+++ b/chrome/browser/chromeos/camera_presence_notifier.h
@@ -25,6 +25,9 @@
static CameraPresenceNotifier* GetInstance();
+ CameraPresenceNotifier(const CameraPresenceNotifier&) = delete;
+ CameraPresenceNotifier& operator=(const CameraPresenceNotifier&) = delete;
+
void AddObserver(CameraPresenceNotifier::Observer* observer);
void RemoveObserver(CameraPresenceNotifier::Observer* observer);
@@ -46,8 +49,6 @@
base::ObserverList<Observer>::Unchecked observers_;
base::WeakPtrFactory<CameraPresenceNotifier> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CameraPresenceNotifier);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/concierge_helper_service.h b/chrome/browser/chromeos/concierge_helper_service.h
index eadaaeaf..ff534da8 100644
--- a/chrome/browser/chromeos/concierge_helper_service.h
+++ b/chrome/browser/chromeos/concierge_helper_service.h
@@ -38,6 +38,10 @@
static ConciergeHelperService* GetForBrowserContext(
content::BrowserContext* context);
+ ConciergeHelperServiceFactory(const ConciergeHelperServiceFactory&) = delete;
+ ConciergeHelperServiceFactory& operator=(
+ const ConciergeHelperServiceFactory&) = delete;
+
protected:
friend class base::NoDestructor<ConciergeHelperServiceFactory>;
@@ -47,9 +51,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ConciergeHelperServiceFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_apitest.cc b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_apitest.cc
index 703db280..82855dbf 100644
--- a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_apitest.cc
+++ b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_apitest.cc
@@ -245,6 +245,11 @@
public:
AutotestPrivateWithPolicyApiTest() {}
+ AutotestPrivateWithPolicyApiTest(const AutotestPrivateWithPolicyApiTest&) =
+ delete;
+ AutotestPrivateWithPolicyApiTest& operator=(
+ const AutotestPrivateWithPolicyApiTest&) = delete;
+
void SetUpInProcessBrowserTestFixture() override {
provider_.SetDefaultReturns(
/*is_initialization_complete_return=*/true,
@@ -266,9 +271,6 @@
protected:
testing::NiceMock<policy::MockConfigurationPolicyProvider> provider_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AutotestPrivateWithPolicyApiTest);
};
// GetAllEnterprisePolicies Sanity check.
diff --git a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h
index 7f6c257..4e29ad5 100644
--- a/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h
+++ b/chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h
@@ -36,6 +36,11 @@
DeviceLocalAccountExternalPolicyLoader(policy::CloudPolicyStore* store,
const base::FilePath& cache_dir);
+ DeviceLocalAccountExternalPolicyLoader(
+ const DeviceLocalAccountExternalPolicyLoader&) = delete;
+ DeviceLocalAccountExternalPolicyLoader& operator=(
+ const DeviceLocalAccountExternalPolicyLoader&) = delete;
+
// While running, the cache requires exclusive write access to the
// |cache_dir_|.
bool IsCacheRunning() const;
@@ -74,8 +79,6 @@
const base::FilePath cache_dir_;
std::unique_ptr<ExternalCache> external_cache_;
std::unique_ptr<base::DictionaryValue> prefs_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceLocalAccountExternalPolicyLoader);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/extensions/extensions_permissions_tracker_unittest.cc b/chrome/browser/chromeos/extensions/extensions_permissions_tracker_unittest.cc
index 3e7fbef..63ed7be 100644
--- a/chrome/browser/chromeos/extensions/extensions_permissions_tracker_unittest.cc
+++ b/chrome/browser/chromeos/extensions/extensions_permissions_tracker_unittest.cc
@@ -78,6 +78,11 @@
registry_(ExtensionRegistry::Get(&profile_)),
testing_local_state_(TestingBrowserProcess::GetGlobal()) {}
+ ExtensionsPermissionsTrackerTest(const ExtensionsPermissionsTrackerTest&) =
+ delete;
+ ExtensionsPermissionsTrackerTest& operator=(
+ const ExtensionsPermissionsTrackerTest&) = delete;
+
base::Value SetupForceList() {
base::Value dict(base::Value::Type::DICTIONARY);
dict.SetKey(kExtensionId1, base::Value(kExtensionUrl1));
@@ -117,8 +122,6 @@
ExtensionRegistry* registry_;
ScopedTestingLocalState testing_local_state_;
std::unique_ptr<MockExtensionsPermissionsTracker> permissions_tracker_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionsPermissionsTrackerTest);
};
TEST_F(ExtensionsPermissionsTrackerTest, EmptyForceList) {
diff --git a/chrome/browser/chromeos/extensions/file_manager/drivefs_event_router_unittest.cc b/chrome/browser/chromeos/extensions/file_manager/drivefs_event_router_unittest.cc
index fb514fc..07017239 100644
--- a/chrome/browser/chromeos/extensions/file_manager/drivefs_event_router_unittest.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/drivefs_event_router_unittest.cc
@@ -78,6 +78,9 @@
extensions::Extension::GetBaseURLFromExtensionId("ext")}));
}
+ TestDriveFsEventRouter(const TestDriveFsEventRouter&) = delete;
+ TestDriveFsEventRouter& operator=(const TestDriveFsEventRouter&) = delete;
+
void BroadcastEvent(extensions::events::HistogramValue histogram_value,
const std::string& event_name,
std::vector<base::Value> event_args) override {
@@ -100,9 +103,6 @@
GetEventListenerURLs,
(const std::string& event_name),
(override));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestDriveFsEventRouter);
};
class DriveFsEventRouterTest : public testing::Test {
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index d0a1f3b..aea4fcb 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -326,6 +326,9 @@
Profile* profile)
: DeviceEventRouter(notification_manager), profile_(profile) {}
+ DeviceEventRouterImpl(const DeviceEventRouterImpl&) = delete;
+ DeviceEventRouterImpl& operator=(const DeviceEventRouterImpl&) = delete;
+
// DeviceEventRouter overrides.
void OnDeviceEvent(file_manager_private::DeviceEventType type,
const std::string& device_path,
@@ -353,8 +356,6 @@
private:
Profile* const profile_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceEventRouterImpl);
};
class DriveFsEventRouterImpl : public DriveFsEventRouter {
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
index 5523b82..2ca6bc5 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_file_system.h
@@ -76,6 +76,11 @@
public:
FileManagerPrivateGrantAccessFunction();
+ FileManagerPrivateGrantAccessFunction(
+ const FileManagerPrivateGrantAccessFunction&) = delete;
+ FileManagerPrivateGrantAccessFunction& operator=(
+ const FileManagerPrivateGrantAccessFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.grantAccess",
FILEMANAGERPRIVATE_GRANTACCESS)
@@ -84,7 +89,6 @@
private:
ExtensionFunction::ResponseAction Run() override;
- DISALLOW_COPY_AND_ASSIGN(FileManagerPrivateGrantAccessFunction);
};
// Base class for FileManagerPrivateInternalAddFileWatchFunction and
diff --git a/chrome/browser/chromeos/extensions/file_manager/select_file_dialog_extension_user_data.h b/chrome/browser/chromeos/extensions/file_manager/select_file_dialog_extension_user_data.h
index 29f2fee..f7557f9 100644
--- a/chrome/browser/chromeos/extensions/file_manager/select_file_dialog_extension_user_data.h
+++ b/chrome/browser/chromeos/extensions/file_manager/select_file_dialog_extension_user_data.h
@@ -17,6 +17,11 @@
// Used for attachingSelectFileDialogExtension's routing ID to its WebContents.
class SelectFileDialogExtensionUserData : public base::SupportsUserData::Data {
public:
+ SelectFileDialogExtensionUserData(const SelectFileDialogExtensionUserData&) =
+ delete;
+ SelectFileDialogExtensionUserData& operator=(
+ const SelectFileDialogExtensionUserData&) = delete;
+
static void SetRoutingIdForWebContents(content::WebContents* web_contents,
const std::string& routing_id);
static std::string GetRoutingIdForWebContents(
@@ -28,8 +33,6 @@
const std::string& routing_id() const { return routing_id_; }
std::string routing_id_;
-
- DISALLOW_COPY_AND_ASSIGN(SelectFileDialogExtensionUserData);
};
#endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_SELECT_FILE_DIALOG_EXTENSION_USER_DATA_H_
diff --git a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc
index 8248ae4..208677e 100644
--- a/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc
+++ b/chrome/browser/chromeos/extensions/file_system_provider/file_system_provider_apitest.cc
@@ -133,6 +133,10 @@
public:
FileSystemProviderApiTest() {}
+ FileSystemProviderApiTest(const FileSystemProviderApiTest&) = delete;
+ FileSystemProviderApiTest& operator=(const FileSystemProviderApiTest&) =
+ delete;
+
// Loads a helper testing extension.
void SetUpOnMainThread() override {
ExtensionApiTest::SetUpOnMainThread();
@@ -152,7 +156,6 @@
private:
ash::FakeChromeUserManager user_manager_;
- DISALLOW_COPY_AND_ASSIGN(FileSystemProviderApiTest);
};
IN_PROC_BROWSER_TEST_F(FileSystemProviderApiTest, Mount) {
diff --git a/chrome/browser/chromeos/extensions/gfx_utils.cc b/chrome/browser/chromeos/extensions/gfx_utils.cc
index 4ac09bd..dfc0a23 100644
--- a/chrome/browser/chromeos/extensions/gfx_utils.cc
+++ b/chrome/browser/chromeos/extensions/gfx_utils.cc
@@ -115,6 +115,9 @@
}
}
+ AppDualBadgeMap(const AppDualBadgeMap&) = delete;
+ AppDualBadgeMap& operator=(const AppDualBadgeMap&) = delete;
+
std::vector<std::string> GetExtensionIdsForArcPackageName(
std::string arc_package_name) {
const auto iter = arc_app_to_extensions_map_.find(arc_package_name);
@@ -133,8 +136,6 @@
private:
ArcAppToExtensionsMap arc_app_to_extensions_map_;
ExtensionToArcAppMap extension_to_arc_app_map_;
-
- DISALLOW_COPY_AND_ASSIGN(AppDualBadgeMap);
};
base::LazyInstance<AppDualBadgeMap>::DestructorAtExit g_dual_badge_map =
diff --git a/chrome/browser/chromeos/extensions/incoming_native_messaging_apitest.cc b/chrome/browser/chromeos/extensions/incoming_native_messaging_apitest.cc
index b29779945..05335ce 100644
--- a/chrome/browser/chromeos/extensions/incoming_native_messaging_apitest.cc
+++ b/chrome/browser/chromeos/extensions/incoming_native_messaging_apitest.cc
@@ -55,6 +55,12 @@
// initiated by the native application.
class ExtensionIncomingNativeMessagingTest
: public extensions::ExtensionApiTest {
+ public:
+ ExtensionIncomingNativeMessagingTest(
+ const ExtensionIncomingNativeMessagingTest&) = delete;
+ ExtensionIncomingNativeMessagingTest& operator=(
+ const ExtensionIncomingNativeMessagingTest&) = delete;
+
protected:
ExtensionIncomingNativeMessagingTest() = default;
~ExtensionIncomingNativeMessagingTest() override = default;
@@ -82,8 +88,6 @@
private:
const extensions::Extension* extension_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionIncomingNativeMessagingTest);
};
// Tests that the extension receives the onConnectNative event when the native
diff --git a/chrome/browser/chromeos/extensions/input_method_api.h b/chrome/browser/chromeos/extensions/input_method_api.h
index 6283209..0e0f8d5 100644
--- a/chrome/browser/chromeos/extensions/input_method_api.h
+++ b/chrome/browser/chromeos/extensions/input_method_api.h
@@ -28,6 +28,11 @@
public:
InputMethodPrivateGetInputMethodConfigFunction() {}
+ InputMethodPrivateGetInputMethodConfigFunction(
+ const InputMethodPrivateGetInputMethodConfigFunction&) = delete;
+ InputMethodPrivateGetInputMethodConfigFunction& operator=(
+ const InputMethodPrivateGetInputMethodConfigFunction&) = delete;
+
protected:
~InputMethodPrivateGetInputMethodConfigFunction() override {}
@@ -36,7 +41,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getInputMethodConfig",
INPUTMETHODPRIVATE_GETINPUTMETHODCONFIG)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetInputMethodConfigFunction);
};
// Implements the inputMethodPrivate.getCurrentInputMethod method.
@@ -45,6 +49,11 @@
public:
InputMethodPrivateGetCurrentInputMethodFunction() {}
+ InputMethodPrivateGetCurrentInputMethodFunction(
+ const InputMethodPrivateGetCurrentInputMethodFunction&) = delete;
+ InputMethodPrivateGetCurrentInputMethodFunction& operator=(
+ const InputMethodPrivateGetCurrentInputMethodFunction&) = delete;
+
protected:
~InputMethodPrivateGetCurrentInputMethodFunction() override {}
@@ -53,7 +62,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getCurrentInputMethod",
INPUTMETHODPRIVATE_GETCURRENTINPUTMETHOD)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetCurrentInputMethodFunction);
};
// Implements the inputMethodPrivate.setCurrentInputMethod method.
@@ -62,6 +70,11 @@
public:
InputMethodPrivateSetCurrentInputMethodFunction() {}
+ InputMethodPrivateSetCurrentInputMethodFunction(
+ const InputMethodPrivateSetCurrentInputMethodFunction&) = delete;
+ InputMethodPrivateSetCurrentInputMethodFunction& operator=(
+ const InputMethodPrivateSetCurrentInputMethodFunction&) = delete;
+
protected:
~InputMethodPrivateSetCurrentInputMethodFunction() override {}
@@ -70,7 +83,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setCurrentInputMethod",
INPUTMETHODPRIVATE_SETCURRENTINPUTMETHOD)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetCurrentInputMethodFunction);
};
// Implements the inputMethodPrivate.getInputMethods method.
@@ -78,6 +90,11 @@
public:
InputMethodPrivateGetInputMethodsFunction() {}
+ InputMethodPrivateGetInputMethodsFunction(
+ const InputMethodPrivateGetInputMethodsFunction&) = delete;
+ InputMethodPrivateGetInputMethodsFunction& operator=(
+ const InputMethodPrivateGetInputMethodsFunction&) = delete;
+
protected:
~InputMethodPrivateGetInputMethodsFunction() override {}
@@ -86,7 +103,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getInputMethods",
INPUTMETHODPRIVATE_GETINPUTMETHODS)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetInputMethodsFunction);
};
// Implements the inputMethodPrivate.fetchAllDictionaryWords method.
@@ -95,6 +111,11 @@
public:
InputMethodPrivateFetchAllDictionaryWordsFunction() {}
+ InputMethodPrivateFetchAllDictionaryWordsFunction(
+ const InputMethodPrivateFetchAllDictionaryWordsFunction&) = delete;
+ InputMethodPrivateFetchAllDictionaryWordsFunction& operator=(
+ const InputMethodPrivateFetchAllDictionaryWordsFunction&) = delete;
+
protected:
~InputMethodPrivateFetchAllDictionaryWordsFunction() override {}
@@ -103,7 +124,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.fetchAllDictionaryWords",
INPUTMETHODPRIVATE_FETCHALLDICTIONARYWORDS)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateFetchAllDictionaryWordsFunction);
};
// Implements the inputMethodPrivate.addWordToDictionary method.
@@ -111,6 +131,11 @@
public:
InputMethodPrivateAddWordToDictionaryFunction() {}
+ InputMethodPrivateAddWordToDictionaryFunction(
+ const InputMethodPrivateAddWordToDictionaryFunction&) = delete;
+ InputMethodPrivateAddWordToDictionaryFunction& operator=(
+ const InputMethodPrivateAddWordToDictionaryFunction&) = delete;
+
protected:
~InputMethodPrivateAddWordToDictionaryFunction() override {}
@@ -119,7 +144,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.addWordToDictionary",
INPUTMETHODPRIVATE_ADDWORDTODICTIONARY)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateAddWordToDictionaryFunction);
};
// Implements the inputMethodPrivate.getEncryptSyncEnabled method.
@@ -128,6 +152,11 @@
public:
InputMethodPrivateGetEncryptSyncEnabledFunction() {}
+ InputMethodPrivateGetEncryptSyncEnabledFunction(
+ const InputMethodPrivateGetEncryptSyncEnabledFunction&) = delete;
+ InputMethodPrivateGetEncryptSyncEnabledFunction& operator=(
+ const InputMethodPrivateGetEncryptSyncEnabledFunction&) = delete;
+
protected:
~InputMethodPrivateGetEncryptSyncEnabledFunction() override {}
@@ -136,7 +165,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getEncryptSyncEnabled",
INPUTMETHODPRIVATE_GETENCRYPTSYNCENABLED)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetEncryptSyncEnabledFunction);
};
// Implements the inputMethodPrivate.setXkbLayout method.
@@ -144,6 +172,11 @@
public:
InputMethodPrivateSetXkbLayoutFunction() {}
+ InputMethodPrivateSetXkbLayoutFunction(
+ const InputMethodPrivateSetXkbLayoutFunction&) = delete;
+ InputMethodPrivateSetXkbLayoutFunction& operator=(
+ const InputMethodPrivateSetXkbLayoutFunction&) = delete;
+
protected:
~InputMethodPrivateSetXkbLayoutFunction() override {}
@@ -152,7 +185,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setXkbLayout",
INPUTMETHODPRIVATE_SETXKBLAYOUT)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetXkbLayoutFunction);
};
// Implements the inputMethodPrivate.showInputView method.
@@ -160,6 +192,11 @@
public:
InputMethodPrivateShowInputViewFunction() {}
+ InputMethodPrivateShowInputViewFunction(
+ const InputMethodPrivateShowInputViewFunction&) = delete;
+ InputMethodPrivateShowInputViewFunction& operator=(
+ const InputMethodPrivateShowInputViewFunction&) = delete;
+
protected:
~InputMethodPrivateShowInputViewFunction() override {}
@@ -168,7 +205,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.showInputView",
INPUTMETHODPRIVATE_SHOWINPUTVIEW)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateShowInputViewFunction);
};
// Implements the inputMethodPrivate.hideInputView method.
@@ -195,6 +231,11 @@
public:
InputMethodPrivateOpenOptionsPageFunction() {}
+ InputMethodPrivateOpenOptionsPageFunction(
+ const InputMethodPrivateOpenOptionsPageFunction&) = delete;
+ InputMethodPrivateOpenOptionsPageFunction& operator=(
+ const InputMethodPrivateOpenOptionsPageFunction&) = delete;
+
protected:
~InputMethodPrivateOpenOptionsPageFunction() override {}
@@ -203,13 +244,17 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.openOptionsPage",
INPUTMETHODPRIVATE_OPENOPTIONSPAGE)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateOpenOptionsPageFunction);
};
class InputMethodPrivateGetSurroundingTextFunction : public ExtensionFunction {
public:
InputMethodPrivateGetSurroundingTextFunction() {}
+ InputMethodPrivateGetSurroundingTextFunction(
+ const InputMethodPrivateGetSurroundingTextFunction&) = delete;
+ InputMethodPrivateGetSurroundingTextFunction& operator=(
+ const InputMethodPrivateGetSurroundingTextFunction&) = delete;
+
protected:
~InputMethodPrivateGetSurroundingTextFunction() override {}
@@ -218,13 +263,17 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getSurroundingText",
INPUTMETHODPRIVATE_GETSURROUNDINGTEXT)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetSurroundingTextFunction);
};
class InputMethodPrivateGetSettingsFunction : public ExtensionFunction {
public:
InputMethodPrivateGetSettingsFunction() = default;
+ InputMethodPrivateGetSettingsFunction(
+ const InputMethodPrivateGetSettingsFunction&) = delete;
+ InputMethodPrivateGetSettingsFunction& operator=(
+ const InputMethodPrivateGetSettingsFunction&) = delete;
+
protected:
~InputMethodPrivateGetSettingsFunction() override = default;
@@ -234,13 +283,17 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.getSettings",
INPUTMETHODPRIVATE_GETSETTINGS)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateGetSettingsFunction);
};
class InputMethodPrivateSetSettingsFunction : public ExtensionFunction {
public:
InputMethodPrivateSetSettingsFunction() = default;
+ InputMethodPrivateSetSettingsFunction(
+ const InputMethodPrivateSetSettingsFunction&) = delete;
+ InputMethodPrivateSetSettingsFunction& operator=(
+ const InputMethodPrivateSetSettingsFunction&) = delete;
+
protected:
~InputMethodPrivateSetSettingsFunction() override = default;
@@ -250,7 +303,6 @@
private:
DECLARE_EXTENSION_FUNCTION("inputMethodPrivate.setSettings",
INPUTMETHODPRIVATE_SETSETTINGS)
- DISALLOW_COPY_AND_ASSIGN(InputMethodPrivateSetSettingsFunction);
};
class InputMethodPrivateSetCompositionRangeFunction : public ExtensionFunction {
diff --git a/chrome/browser/chromeos/extensions/install_limiter_factory.h b/chrome/browser/chromeos/extensions/install_limiter_factory.h
index 45f0fa1..1028b63c 100644
--- a/chrome/browser/chromeos/extensions/install_limiter_factory.h
+++ b/chrome/browser/chromeos/extensions/install_limiter_factory.h
@@ -23,6 +23,9 @@
static InstallLimiterFactory* GetInstance();
+ InstallLimiterFactory(const InstallLimiterFactory&) = delete;
+ InstallLimiterFactory& operator=(const InstallLimiterFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<InstallLimiterFactory>;
@@ -32,8 +35,6 @@
// BrowserContextKeyedServiceFactory overrides:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(InstallLimiterFactory);
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h b/chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h
index a44c715..d13ad4d 100644
--- a/chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h
+++ b/chrome/browser/chromeos/extensions/login_screen/login_screen_storage/login_screen_storage_api.h
@@ -13,6 +13,12 @@
// Provides common callback functions to return results from
// 'LoginScreenStorageStore' and 'LoginScreenStorageRetrieve' D-Bus methods.
class LoginScreenStorageExtensionFunction : public ExtensionFunction {
+ public:
+ LoginScreenStorageExtensionFunction(
+ const LoginScreenStorageExtensionFunction&) = delete;
+ LoginScreenStorageExtensionFunction& operator=(
+ const LoginScreenStorageExtensionFunction&) = delete;
+
protected:
LoginScreenStorageExtensionFunction();
~LoginScreenStorageExtensionFunction() override;
@@ -25,14 +31,17 @@
// returns its result to the calling extension.
void OnDataRetrieved(absl::optional<std::string> data,
absl::optional<std::string> error);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginScreenStorageExtensionFunction);
};
class LoginScreenStorageStorePersistentDataFunction : public ExtensionFunction {
public:
LoginScreenStorageStorePersistentDataFunction();
+
+ LoginScreenStorageStorePersistentDataFunction(
+ const LoginScreenStorageStorePersistentDataFunction&) = delete;
+ LoginScreenStorageStorePersistentDataFunction& operator=(
+ const LoginScreenStorageStorePersistentDataFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenStorage.storePersistentData",
LOGINSCREENSTORAGE_STOREPERSISTENTDATA)
@@ -55,14 +64,18 @@
std::vector<std::string> extension_ids,
const login_manager::LoginScreenStorageMetadata& metadata,
const std::string& data);
-
- DISALLOW_COPY_AND_ASSIGN(LoginScreenStorageStorePersistentDataFunction);
};
class LoginScreenStorageRetrievePersistentDataFunction
: public LoginScreenStorageExtensionFunction {
public:
LoginScreenStorageRetrievePersistentDataFunction();
+
+ LoginScreenStorageRetrievePersistentDataFunction(
+ const LoginScreenStorageRetrievePersistentDataFunction&) = delete;
+ LoginScreenStorageRetrievePersistentDataFunction& operator=(
+ const LoginScreenStorageRetrievePersistentDataFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenStorage.retrievePersistentData",
LOGINSCREENSTORAGE_RETRIEVEPERSISTENTDATA)
@@ -71,15 +84,18 @@
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginScreenStorageRetrievePersistentDataFunction);
};
class LoginScreenStorageStoreCredentialsFunction
: public LoginScreenStorageExtensionFunction {
public:
LoginScreenStorageStoreCredentialsFunction();
+
+ LoginScreenStorageStoreCredentialsFunction(
+ const LoginScreenStorageStoreCredentialsFunction&) = delete;
+ LoginScreenStorageStoreCredentialsFunction& operator=(
+ const LoginScreenStorageStoreCredentialsFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenStorage.storeCredentials",
LOGINSCREENSTORAGE_STORECREDENTIALS)
@@ -88,15 +104,18 @@
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginScreenStorageStoreCredentialsFunction);
};
class LoginScreenStorageRetrieveCredentialsFunction
: public LoginScreenStorageExtensionFunction {
public:
LoginScreenStorageRetrieveCredentialsFunction();
+
+ LoginScreenStorageRetrieveCredentialsFunction(
+ const LoginScreenStorageRetrieveCredentialsFunction&) = delete;
+ LoginScreenStorageRetrieveCredentialsFunction& operator=(
+ const LoginScreenStorageRetrieveCredentialsFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenStorage.retrieveCredentials",
LOGINSCREENSTORAGE_RETRIEVECREDENTIALS)
@@ -105,9 +124,6 @@
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginScreenStorageRetrieveCredentialsFunction);
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
index f6ecd6c..717be8d1 100644
--- a/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
+++ b/chrome/browser/chromeos/extensions/login_screen/login_screen_ui/login_screen_ui_api.h
@@ -13,6 +13,10 @@
public:
LoginScreenUiShowFunction();
+ LoginScreenUiShowFunction(const LoginScreenUiShowFunction&) = delete;
+ LoginScreenUiShowFunction& operator=(const LoginScreenUiShowFunction&) =
+ delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenUi.show", LOGINSCREENUI_SHOW)
protected:
@@ -20,15 +24,16 @@
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoginScreenUiShowFunction);
};
class LoginScreenUiCloseFunction : public ExtensionFunction {
public:
LoginScreenUiCloseFunction();
+ LoginScreenUiCloseFunction(const LoginScreenUiCloseFunction&) = delete;
+ LoginScreenUiCloseFunction& operator=(const LoginScreenUiCloseFunction&) =
+ delete;
+
DECLARE_EXTENSION_FUNCTION("loginScreenUi.close", LOGINSCREENUI_CLOSE)
protected:
@@ -40,8 +45,6 @@
private:
// Callback upon completion of window closing.
void OnClosed(bool success, const absl::optional<std::string>& error);
-
- DISALLOW_COPY_AND_ASSIGN(LoginScreenUiCloseFunction);
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_api.h b/chrome/browser/chromeos/extensions/users_private/users_private_api.h
index 31c757b..f754d8e 100644
--- a/chrome/browser/chromeos/extensions/users_private/users_private_api.h
+++ b/chrome/browser/chromeos/extensions/users_private/users_private_api.h
@@ -15,6 +15,11 @@
class UsersPrivateGetUsersFunction : public ExtensionFunction {
public:
UsersPrivateGetUsersFunction();
+
+ UsersPrivateGetUsersFunction(const UsersPrivateGetUsersFunction&) = delete;
+ UsersPrivateGetUsersFunction& operator=(const UsersPrivateGetUsersFunction&) =
+ delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.getUsers", USERSPRIVATE_GETUSERS)
protected:
@@ -22,15 +27,18 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetUsersFunction);
};
// Implements the chrome.usersPrivate.isUserInList method.
class UsersPrivateIsUserInListFunction : public ExtensionFunction {
public:
UsersPrivateIsUserInListFunction();
+
+ UsersPrivateIsUserInListFunction(const UsersPrivateIsUserInListFunction&) =
+ delete;
+ UsersPrivateIsUserInListFunction& operator=(
+ const UsersPrivateIsUserInListFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.isUserInList",
USERSPRIVATE_ISUSERINLIST)
@@ -39,15 +47,17 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsUserInListFunction);
};
// Implements the chrome.usersPrivate.addUser method.
class UsersPrivateAddUserFunction : public ExtensionFunction {
public:
UsersPrivateAddUserFunction();
+
+ UsersPrivateAddUserFunction(const UsersPrivateAddUserFunction&) = delete;
+ UsersPrivateAddUserFunction& operator=(const UsersPrivateAddUserFunction&) =
+ delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.addUser", USERSPRIVATE_ADDUSER)
protected:
@@ -55,15 +65,18 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateAddUserFunction);
};
// Implements the chrome.usersPrivate.removeUser method.
class UsersPrivateRemoveUserFunction : public ExtensionFunction {
public:
UsersPrivateRemoveUserFunction();
+
+ UsersPrivateRemoveUserFunction(const UsersPrivateRemoveUserFunction&) =
+ delete;
+ UsersPrivateRemoveUserFunction& operator=(
+ const UsersPrivateRemoveUserFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.removeUser", USERSPRIVATE_REMOVEUSER)
protected:
@@ -71,15 +84,18 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateRemoveUserFunction);
};
// Implements the chrome.usersPrivate.isUserListManaged method.
class UsersPrivateIsUserListManagedFunction : public ExtensionFunction {
public:
UsersPrivateIsUserListManagedFunction();
+
+ UsersPrivateIsUserListManagedFunction(
+ const UsersPrivateIsUserListManagedFunction&) = delete;
+ UsersPrivateIsUserListManagedFunction& operator=(
+ const UsersPrivateIsUserListManagedFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.isUserListManaged",
USERSPRIVATE_ISUSERLISTMANAGED)
@@ -88,15 +104,18 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsUserListManagedFunction);
};
// Implements the chrome.usersPrivate.getCurrentUser method.
class UsersPrivateGetCurrentUserFunction : public ExtensionFunction {
public:
UsersPrivateGetCurrentUserFunction();
+
+ UsersPrivateGetCurrentUserFunction(
+ const UsersPrivateGetCurrentUserFunction&) = delete;
+ UsersPrivateGetCurrentUserFunction& operator=(
+ const UsersPrivateGetCurrentUserFunction&) = delete;
+
DECLARE_EXTENSION_FUNCTION("usersPrivate.getCurrentUser",
USERSPRIVATE_GETCURRENTUSER)
@@ -105,9 +124,6 @@
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetCurrentUserFunction);
};
class UsersPrivateGetLoginStatusFunction : public ExtensionFunction {
@@ -116,13 +132,16 @@
USERSPRIVATE_GETLOGINSTATUS)
UsersPrivateGetLoginStatusFunction();
+ UsersPrivateGetLoginStatusFunction(
+ const UsersPrivateGetLoginStatusFunction&) = delete;
+ UsersPrivateGetLoginStatusFunction& operator=(
+ const UsersPrivateGetLoginStatusFunction&) = delete;
+
private:
~UsersPrivateGetLoginStatusFunction() override;
// ExtensionFunction overrides.
ResponseAction Run() override;
-
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetLoginStatusFunction);
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/users_private/users_private_delegate_factory.h b/chrome/browser/chromeos/extensions/users_private/users_private_delegate_factory.h
index 411e981..0c142991 100644
--- a/chrome/browser/chromeos/extensions/users_private/users_private_delegate_factory.h
+++ b/chrome/browser/chromeos/extensions/users_private/users_private_delegate_factory.h
@@ -24,6 +24,10 @@
static UsersPrivateDelegateFactory* GetInstance();
+ UsersPrivateDelegateFactory(const UsersPrivateDelegateFactory&) = delete;
+ UsersPrivateDelegateFactory& operator=(const UsersPrivateDelegateFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<UsersPrivateDelegateFactory>;
@@ -33,8 +37,6 @@
// BrowserContextKeyedServiceFactory implementation.
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(UsersPrivateDelegateFactory);
};
} // namespace extensions
diff --git a/chrome/browser/chromeos/extensions/wallpaper_function_base.cc b/chrome/browser/chromeos/extensions/wallpaper_function_base.cc
index 11b28bf..c1981da 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_function_base.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_function_base.cc
@@ -91,6 +91,9 @@
explicit UnsafeWallpaperDecoder(scoped_refptr<WallpaperFunctionBase> function)
: function_(function) {}
+ UnsafeWallpaperDecoder(const UnsafeWallpaperDecoder&) = delete;
+ UnsafeWallpaperDecoder& operator=(const UnsafeWallpaperDecoder&) = delete;
+
void Start(const std::vector<uint8_t>& image_data) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -136,8 +139,6 @@
private:
scoped_refptr<WallpaperFunctionBase> function_;
base::AtomicFlag cancel_flag_;
-
- DISALLOW_COPY_AND_ASSIGN(UnsafeWallpaperDecoder);
};
WallpaperFunctionBase::UnsafeWallpaperDecoder*
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.h b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
index 6331683..17933e2 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
@@ -65,6 +65,11 @@
WallpaperPrivateSetWallpaperIfExistsFunction();
+ WallpaperPrivateSetWallpaperIfExistsFunction(
+ const WallpaperPrivateSetWallpaperIfExistsFunction&) = delete;
+ WallpaperPrivateSetWallpaperIfExistsFunction& operator=(
+ const WallpaperPrivateSetWallpaperIfExistsFunction&) = delete;
+
protected:
~WallpaperPrivateSetWallpaperIfExistsFunction() override;
@@ -74,8 +79,6 @@
private:
// Responds with the |file_exists| result.
void OnSetOnlineWallpaperIfExistsCallback(bool file_exists);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateSetWallpaperIfExistsFunction);
};
class WallpaperPrivateSetWallpaperFunction : public ExtensionFunction {
@@ -85,6 +88,11 @@
WallpaperPrivateSetWallpaperFunction();
+ WallpaperPrivateSetWallpaperFunction(
+ const WallpaperPrivateSetWallpaperFunction&) = delete;
+ WallpaperPrivateSetWallpaperFunction& operator=(
+ const WallpaperPrivateSetWallpaperFunction&) = delete;
+
protected:
~WallpaperPrivateSetWallpaperFunction() override;
@@ -94,8 +102,6 @@
private:
// Responds with the |success| status.
void OnSetWallpaperCallback(bool success);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateSetWallpaperFunction);
};
class WallpaperPrivateResetWallpaperFunction : public ExtensionFunction {
@@ -238,6 +244,11 @@
WALLPAPERPRIVATE_GETOFFLINEWALLPAPERLIST)
WallpaperPrivateGetOfflineWallpaperListFunction();
+ WallpaperPrivateGetOfflineWallpaperListFunction(
+ const WallpaperPrivateGetOfflineWallpaperListFunction&) = delete;
+ WallpaperPrivateGetOfflineWallpaperListFunction& operator=(
+ const WallpaperPrivateGetOfflineWallpaperListFunction&) = delete;
+
protected:
~WallpaperPrivateGetOfflineWallpaperListFunction() override;
@@ -247,8 +258,6 @@
private:
// Responds with the list of urls.
void OnOfflineWallpaperListReturned(const std::vector<std::string>& url_list);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetOfflineWallpaperListFunction);
};
// The wallpaper UMA is recorded when a new wallpaper is set, either by the
@@ -271,6 +280,11 @@
WALLPAPERPRIVATE_GETCOLLECTIONSINFO)
WallpaperPrivateGetCollectionsInfoFunction();
+ WallpaperPrivateGetCollectionsInfoFunction(
+ const WallpaperPrivateGetCollectionsInfoFunction&) = delete;
+ WallpaperPrivateGetCollectionsInfoFunction& operator=(
+ const WallpaperPrivateGetCollectionsInfoFunction&) = delete;
+
protected:
~WallpaperPrivateGetCollectionsInfoFunction() override;
@@ -286,8 +300,6 @@
void OnCollectionsInfoFetched(
bool success,
const std::vector<backdrop::Collection>& collections);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetCollectionsInfoFunction);
};
class WallpaperPrivateGetImagesInfoFunction : public ExtensionFunction {
@@ -296,6 +308,11 @@
WALLPAPERPRIVATE_GETIMAGESINFO)
WallpaperPrivateGetImagesInfoFunction();
+ WallpaperPrivateGetImagesInfoFunction(
+ const WallpaperPrivateGetImagesInfoFunction&) = delete;
+ WallpaperPrivateGetImagesInfoFunction& operator=(
+ const WallpaperPrivateGetImagesInfoFunction&) = delete;
+
protected:
~WallpaperPrivateGetImagesInfoFunction() override;
@@ -312,8 +329,6 @@
void OnImagesInfoFetched(bool success,
const std::string& collection_id,
const std::vector<backdrop::Image>& images);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetImagesInfoFunction);
};
class WallpaperPrivateGetLocalImagePathsFunction : public ExtensionFunction {
@@ -322,6 +337,11 @@
WALLPAPERPRIVATE_GETLOCALIMAGEPATHS)
WallpaperPrivateGetLocalImagePathsFunction();
+ WallpaperPrivateGetLocalImagePathsFunction(
+ const WallpaperPrivateGetLocalImagePathsFunction&) = delete;
+ WallpaperPrivateGetLocalImagePathsFunction& operator=(
+ const WallpaperPrivateGetLocalImagePathsFunction&) = delete;
+
protected:
~WallpaperPrivateGetLocalImagePathsFunction() override;
@@ -331,8 +351,6 @@
private:
// Responds with the list of collected image paths.
void OnGetImagePathsComplete(const std::vector<base::FilePath>& image_paths);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetLocalImagePathsFunction);
};
class WallpaperPrivateGetLocalImageDataFunction : public ExtensionFunction {
@@ -341,6 +359,11 @@
WALLPAPERPRIVATE_GETLOCALIMAGEDATA)
WallpaperPrivateGetLocalImageDataFunction();
+ WallpaperPrivateGetLocalImageDataFunction(
+ const WallpaperPrivateGetLocalImageDataFunction&) = delete;
+ WallpaperPrivateGetLocalImageDataFunction& operator=(
+ const WallpaperPrivateGetLocalImageDataFunction&) = delete;
+
protected:
~WallpaperPrivateGetLocalImageDataFunction() override;
@@ -351,8 +374,6 @@
// Responds with the image data or an error message.
void OnReadImageDataComplete(std::unique_ptr<std::string> image_data,
bool success);
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetLocalImageDataFunction);
};
class WallpaperPrivateConfirmPreviewWallpaperFunction
@@ -362,14 +383,16 @@
WALLPAPERPRIVATE_CONFIRMPREVIEWWALLPAPER)
WallpaperPrivateConfirmPreviewWallpaperFunction();
+ WallpaperPrivateConfirmPreviewWallpaperFunction(
+ const WallpaperPrivateConfirmPreviewWallpaperFunction&) = delete;
+ WallpaperPrivateConfirmPreviewWallpaperFunction& operator=(
+ const WallpaperPrivateConfirmPreviewWallpaperFunction&) = delete;
+
protected:
~WallpaperPrivateConfirmPreviewWallpaperFunction() override;
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateConfirmPreviewWallpaperFunction);
};
class WallpaperPrivateCancelPreviewWallpaperFunction
@@ -379,14 +402,16 @@
WALLPAPERPRIVATE_CANCELPREVIEWWALLPAPER)
WallpaperPrivateCancelPreviewWallpaperFunction();
+ WallpaperPrivateCancelPreviewWallpaperFunction(
+ const WallpaperPrivateCancelPreviewWallpaperFunction&) = delete;
+ WallpaperPrivateCancelPreviewWallpaperFunction& operator=(
+ const WallpaperPrivateCancelPreviewWallpaperFunction&) = delete;
+
protected:
~WallpaperPrivateCancelPreviewWallpaperFunction() override;
// ExtensionFunction:
ResponseAction Run() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateCancelPreviewWallpaperFunction);
};
class WallpaperPrivateGetCurrentWallpaperThumbnailFunction
@@ -396,6 +421,11 @@
WALLPAPERPRIVATE_GETCURRENTWALLPAPERTHUMBNAIL)
WallpaperPrivateGetCurrentWallpaperThumbnailFunction();
+ WallpaperPrivateGetCurrentWallpaperThumbnailFunction(
+ const WallpaperPrivateGetCurrentWallpaperThumbnailFunction&) = delete;
+ WallpaperPrivateGetCurrentWallpaperThumbnailFunction& operator=(
+ const WallpaperPrivateGetCurrentWallpaperThumbnailFunction&) = delete;
+
protected:
~WallpaperPrivateGetCurrentWallpaperThumbnailFunction() override;
@@ -405,9 +435,6 @@
private:
// WallpaperFunctionBase:
void OnWallpaperDecoded(const gfx::ImageSkia& wallpaper) override;
-
- DISALLOW_COPY_AND_ASSIGN(
- WallpaperPrivateGetCurrentWallpaperThumbnailFunction);
};
class WallpaperPrivateGetSurpriseMeImageFunction : public ExtensionFunction {
@@ -416,6 +443,11 @@
WALLPAPERPRIVATE_GETSURPRISEMEIMAGE)
WallpaperPrivateGetSurpriseMeImageFunction();
+ WallpaperPrivateGetSurpriseMeImageFunction(
+ const WallpaperPrivateGetSurpriseMeImageFunction&) = delete;
+ WallpaperPrivateGetSurpriseMeImageFunction& operator=(
+ const WallpaperPrivateGetSurpriseMeImageFunction&) = delete;
+
protected:
~WallpaperPrivateGetSurpriseMeImageFunction() override;
@@ -431,8 +463,6 @@
// Fetcher for the surprise me image info.
std::unique_ptr<backdrop_wallpaper_handlers::SurpriseMeImageFetcher>
surprise_me_image_fetcher_;
-
- DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateGetSurpriseMeImageFunction);
};
class WallpaperPrivateIsSwaEnabledFunction : public ExtensionFunction {
diff --git a/chrome/browser/chromeos/external_metrics.h b/chrome/browser/chromeos/external_metrics.h
index 9e2feae..db504441 100644
--- a/chrome/browser/chromeos/external_metrics.h
+++ b/chrome/browser/chromeos/external_metrics.h
@@ -32,6 +32,9 @@
ExternalMetrics();
+ ExternalMetrics(const ExternalMetrics&) = delete;
+ ExternalMetrics& operator=(const ExternalMetrics&) = delete;
+
// Begins the external data collection. This service is started and stopped
// by the chrome metrics service. Calls to RecordAction originate in the
// blocking pool but are executed in the UI thread.
@@ -96,8 +99,6 @@
// Interval between metrics being read from |uma_events_file_|.
base::TimeDelta collection_interval_;
-
- DISALLOW_COPY_AND_ASSIGN(ExternalMetrics);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/fileapi/external_file_resolver.cc b/chrome/browser/chromeos/fileapi/external_file_resolver.cc
index b22e7aed..00663ca 100644
--- a/chrome/browser/chromeos/fileapi/external_file_resolver.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_resolver.cc
@@ -52,6 +52,9 @@
std::move(lifetime), profile_id, url));
}
+ URLHelper(const URLHelper&) = delete;
+ URLHelper& operator=(const URLHelper&) = delete;
+
private:
void RunOnUIThread(Lifetime lifetime, void* profile_id, const GURL& url) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -119,8 +122,6 @@
scoped_refptr<storage::FileSystemContext> file_system_context_;
file_manager::util::FileSystemURLAndHandle isolated_file_system_;
std::string mime_type_;
-
- DISALLOW_COPY_AND_ASSIGN(URLHelper);
};
} // namespace
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.cc b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.cc
index b07554d..f8088d97 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.cc
@@ -51,14 +51,14 @@
explicit MojoPipeIOBuffer(void* data)
: net::IOBuffer(static_cast<char*>(data)) {}
+ MojoPipeIOBuffer(const MojoPipeIOBuffer&) = delete;
+ MojoPipeIOBuffer& operator=(const MojoPipeIOBuffer&) = delete;
+
protected:
~MojoPipeIOBuffer() override {
// Set data_ to null so ~IOBuffer won't try to delete it.
data_ = nullptr;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MojoPipeIOBuffer);
};
// A helper class to read data from a FileStreamReader, and write it to a
@@ -86,6 +86,11 @@
weak_ptr_factory_.GetWeakPtr()));
}
+ FileSystemReaderDataPipeProducer(const FileSystemReaderDataPipeProducer&) =
+ delete;
+ FileSystemReaderDataPipeProducer& operator=(
+ const FileSystemReaderDataPipeProducer&) = delete;
+
void Write() {
while (remaining_bytes_ > 0) {
if (!producer_handle_.is_valid())
@@ -193,8 +198,6 @@
base::OnceCallback<void(net::Error)> callback_;
base::WeakPtrFactory<FileSystemReaderDataPipeProducer> weak_ptr_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemReaderDataPipeProducer);
};
class ExternalFileURLLoader : public network::mojom::URLLoader {
@@ -212,6 +215,9 @@
external_file_url_loader->Start(request);
}
+ ExternalFileURLLoader(const ExternalFileURLLoader&) = delete;
+ ExternalFileURLLoader& operator=(const ExternalFileURLLoader&) = delete;
+
// network::mojom::URLLoader:
void FollowRedirect(
const std::vector<std::string>& removed_headers,
@@ -336,8 +342,6 @@
std::unique_ptr<FileSystemReaderDataPipeProducer> data_producer_;
base::WeakPtrFactory<ExternalFileURLLoader> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ExternalFileURLLoader);
};
} // namespace
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.h b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.h
index 93dc250..2d5353cb 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.h
+++ b/chrome/browser/chromeos/fileapi/external_file_url_loader_factory.h
@@ -32,6 +32,10 @@
void* profile_id,
int render_process_host_id);
+ ExternalFileURLLoaderFactory(const ExternalFileURLLoaderFactory&) = delete;
+ ExternalFileURLLoaderFactory& operator=(const ExternalFileURLLoaderFactory&) =
+ delete;
+
private:
ExternalFileURLLoaderFactory(
void* profile_id,
@@ -54,8 +58,6 @@
void* profile_id_;
const int render_process_host_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ExternalFileURLLoaderFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/fileapi/recent_model_factory.h b/chrome/browser/chromeos/fileapi/recent_model_factory.h
index fffb6ae..17ec318 100644
--- a/chrome/browser/chromeos/fileapi/recent_model_factory.h
+++ b/chrome/browser/chromeos/fileapi/recent_model_factory.h
@@ -23,6 +23,9 @@
// Returns the singleton RecentModelFactory instance.
static RecentModelFactory* GetInstance();
+ RecentModelFactory(const RecentModelFactory&) = delete;
+ RecentModelFactory& operator=(const RecentModelFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<RecentModelFactory>;
@@ -34,8 +37,6 @@
content::BrowserContext* context) const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(RecentModelFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/network_change_manager_client_unittest.cc b/chrome/browser/chromeos/network_change_manager_client_unittest.cc
index 8cebd79..669ee48c 100644
--- a/chrome/browser/chromeos/network_change_manager_client_unittest.cc
+++ b/chrome/browser/chromeos/network_change_manager_client_unittest.cc
@@ -137,6 +137,12 @@
}
class NetworkChangeManagerClientUpdateTest : public testing::Test {
+ public:
+ NetworkChangeManagerClientUpdateTest(
+ const NetworkChangeManagerClientUpdateTest&) = delete;
+ NetworkChangeManagerClientUpdateTest& operator=(
+ const NetworkChangeManagerClientUpdateTest&) = delete;
+
protected:
NetworkChangeManagerClientUpdateTest() : default_network_("") {}
~NetworkChangeManagerClientUpdateTest() override = default;
@@ -212,8 +218,6 @@
NetworkState default_network_;
std::unique_ptr<net::NetworkChangeNotifier> network_change_notifier_;
std::unique_ptr<NetworkChangeManagerClient> proxy_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkChangeManagerClientUpdateTest);
};
NotifierUpdateTestCase test_cases[] = {
diff --git a/chrome/browser/chromeos/note_taking_helper.h b/chrome/browser/chromeos/note_taking_helper.h
index 7296e6b..0c2fdcc 100644
--- a/chrome/browser/chromeos/note_taking_helper.h
+++ b/chrome/browser/chromeos/note_taking_helper.h
@@ -161,6 +161,9 @@
static void Shutdown();
static NoteTakingHelper* Get();
+ NoteTakingHelper(const NoteTakingHelper&) = delete;
+ NoteTakingHelper& operator=(const NoteTakingHelper&) = delete;
+
bool play_store_enabled() const { return play_store_enabled_; }
bool android_apps_received() const { return android_apps_received_; }
@@ -328,8 +331,6 @@
std::unique_ptr<NoteTakingControllerClient> note_taking_controller_client_;
base::WeakPtrFactory<NoteTakingHelper> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(NoteTakingHelper);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/platform_keys/key_permissions/key_permissions_policy_handler.h b/chrome/browser/chromeos/platform_keys/key_permissions/key_permissions_policy_handler.h
index 27c8389..bebc8c2 100644
--- a/chrome/browser/chromeos/platform_keys/key_permissions/key_permissions_policy_handler.h
+++ b/chrome/browser/chromeos/platform_keys/key_permissions/key_permissions_policy_handler.h
@@ -20,12 +20,13 @@
public:
explicit KeyPermissionsPolicyHandler(const policy::Schema& chrome_schema);
+ KeyPermissionsPolicyHandler(const KeyPermissionsPolicyHandler&) = delete;
+ KeyPermissionsPolicyHandler& operator=(const KeyPermissionsPolicyHandler&) =
+ delete;
+
// policy::ConfigurationPolicyHandler:
void ApplyPolicySettings(const policy::PolicyMap& policies,
PrefValueMap* prefs) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(KeyPermissionsPolicyHandler);
};
} // namespace platform_keys
diff --git a/chrome/browser/chromeos/preferences_chromeos_browsertest.cc b/chrome/browser/chromeos/preferences_chromeos_browsertest.cc
index 41cf1a4..506ac85 100644
--- a/chrome/browser/chromeos/preferences_chromeos_browsertest.cc
+++ b/chrome/browser/chromeos/preferences_chromeos_browsertest.cc
@@ -42,6 +42,9 @@
feature_list_.InitAndEnableFeature(features::kAllowScrollSettings);
}
+ PreferencesTest(const PreferencesTest&) = delete;
+ PreferencesTest& operator=(const PreferencesTest&) = delete;
+
void SetUpOnMainThread() override {
LoginManagerTest::SetUpOnMainThread();
input_settings_ = system::InputDeviceSettings::Get()->GetFakeInterface();
@@ -151,8 +154,6 @@
base::test::ScopedFeatureList feature_list_;
system::InputDeviceSettings::FakeInterface* input_settings_;
input_method::FakeImeKeyboard* keyboard_;
-
- DISALLOW_COPY_AND_ASSIGN(PreferencesTest);
};
IN_PROC_BROWSER_TEST_F(PreferencesTest, MultiProfiles) {
diff --git a/chrome/browser/chromeos/printing/cups_print_job_manager_factory.h b/chrome/browser/chromeos/printing/cups_print_job_manager_factory.h
index 62a6e58c..6c92749 100644
--- a/chrome/browser/chromeos/printing/cups_print_job_manager_factory.h
+++ b/chrome/browser/chromeos/printing/cups_print_job_manager_factory.h
@@ -22,6 +22,10 @@
static CupsPrintJobManager* GetForBrowserContext(
content::BrowserContext* context);
+ CupsPrintJobManagerFactory(const CupsPrintJobManagerFactory&) = delete;
+ CupsPrintJobManagerFactory& operator=(const CupsPrintJobManagerFactory&) =
+ delete;
+
protected:
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
@@ -34,8 +38,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(CupsPrintJobManagerFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/printing/cups_printers_manager_factory.h b/chrome/browser/chromeos/printing/cups_printers_manager_factory.h
index 54d67f6..2b183e3 100644
--- a/chrome/browser/chromeos/printing/cups_printers_manager_factory.h
+++ b/chrome/browser/chromeos/printing/cups_printers_manager_factory.h
@@ -28,6 +28,10 @@
static CupsPrintersManager* GetForBrowserContext(
content::BrowserContext* context);
+ CupsPrintersManagerFactory(const CupsPrintersManagerFactory&) = delete;
+ CupsPrintersManagerFactory& operator=(const CupsPrintersManagerFactory&) =
+ delete;
+
// Returns the CupsPrintersManagerProxy object which is always attached to the
// primary profile.
CupsPrintersManagerProxy* GetProxy();
@@ -49,8 +53,6 @@
// Proxy object always attached to the primary profile.
std::unique_ptr<CupsPrintersManagerProxy> proxy_;
-
- DISALLOW_COPY_AND_ASSIGN(CupsPrintersManagerFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/printing/cups_proxy_service_manager_factory.h b/chrome/browser/chromeos/printing/cups_proxy_service_manager_factory.h
index c9c3acf..73ea287e 100644
--- a/chrome/browser/chromeos/printing/cups_proxy_service_manager_factory.h
+++ b/chrome/browser/chromeos/printing/cups_proxy_service_manager_factory.h
@@ -23,6 +23,11 @@
static CupsProxyServiceManager* GetForBrowserContext(
content::BrowserContext* context);
+ CupsProxyServiceManagerFactory(const CupsProxyServiceManagerFactory&) =
+ delete;
+ CupsProxyServiceManagerFactory& operator=(
+ const CupsProxyServiceManagerFactory&) = delete;
+
private:
friend base::NoDestructor<CupsProxyServiceManagerFactory>;
@@ -36,8 +41,6 @@
content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(CupsProxyServiceManagerFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/printing/print_servers_provider_factory.h b/chrome/browser/chromeos/printing/print_servers_provider_factory.h
index b03aff3b..2db0ad5d 100644
--- a/chrome/browser/chromeos/printing/print_servers_provider_factory.h
+++ b/chrome/browser/chromeos/printing/print_servers_provider_factory.h
@@ -26,6 +26,10 @@
PrintServersProviderFactory();
+ PrintServersProviderFactory(const PrintServersProviderFactory&) = delete;
+ PrintServersProviderFactory& operator=(const PrintServersProviderFactory&) =
+ delete;
+
// Returns a WeakPtr to the PrintServersProvider registered for
// |account_id|. If an PrintServersProvider does not exist, one will be
// created for |account_id|. The returned object remains valid until
@@ -56,8 +60,6 @@
std::map<AccountId, std::unique_ptr<PrintServersProvider>> providers_by_user_;
std::unique_ptr<PrintServersProvider> device_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintServersProviderFactory);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/set_time_dialog.h b/chrome/browser/chromeos/set_time_dialog.h
index 72e49226..6cd179d2 100644
--- a/chrome/browser/chromeos/set_time_dialog.h
+++ b/chrome/browser/chromeos/set_time_dialog.h
@@ -14,6 +14,9 @@
// Set Time dialog for setting the system time, date and time zone.
class SetTimeDialog : public SystemWebDialogDelegate {
public:
+ SetTimeDialog(const SetTimeDialog&) = delete;
+ SetTimeDialog& operator=(const SetTimeDialog&) = delete;
+
// Shows the set time/date dialog. If |parent| is not null, shows the dialog
// as a child of |parent|, e.g. the Settings window.
static void ShowDialog(gfx::NativeWindow parent = nullptr);
@@ -27,8 +30,6 @@
// SystemWebDialogDelegate
void GetDialogSize(gfx::Size* size) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SetTimeDialog);
};
} // namespace chromeos
diff --git a/chrome/browser/chromeos/shutdown_policy_browsertest.cc b/chrome/browser/chromeos/shutdown_policy_browsertest.cc
index b98db1a..cbf805d 100644
--- a/chrome/browser/chromeos/shutdown_policy_browsertest.cc
+++ b/chrome/browser/chromeos/shutdown_policy_browsertest.cc
@@ -110,6 +110,11 @@
class ShutdownPolicyInSessionTest
: public ShutdownPolicyBaseTest {
+ public:
+ ShutdownPolicyInSessionTest(const ShutdownPolicyInSessionTest&) = delete;
+ ShutdownPolicyInSessionTest& operator=(const ShutdownPolicyInSessionTest&) =
+ delete;
+
protected:
ShutdownPolicyInSessionTest() {}
~ShutdownPolicyInSessionTest() override {}
@@ -126,9 +131,6 @@
tray_test_api_->GetBubbleViewTooltip(ash::VIEW_ID_POWER_BUTTON);
return base::UTF8ToUTF16(tooltip) == actual_tooltip;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShutdownPolicyInSessionTest);
};
// Tests that by default the shutdown button tooltip is "Shut down".
@@ -165,6 +167,10 @@
}
class ShutdownPolicyLockerTest : public ShutdownPolicyBaseTest {
+ public:
+ ShutdownPolicyLockerTest(const ShutdownPolicyLockerTest&) = delete;
+ ShutdownPolicyLockerTest& operator=(const ShutdownPolicyLockerTest&) = delete;
+
protected:
ShutdownPolicyLockerTest() = default;
~ShutdownPolicyLockerTest() override = default;
@@ -190,8 +196,6 @@
private:
std::unique_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
-
- DISALLOW_COPY_AND_ASSIGN(ShutdownPolicyLockerTest);
};
IN_PROC_BROWSER_TEST_F(ShutdownPolicyLockerTest, TestBasic) {
@@ -214,6 +218,10 @@
}
class ShutdownPolicyLoginTest : public ShutdownPolicyBaseTest {
+ public:
+ ShutdownPolicyLoginTest(const ShutdownPolicyLoginTest&) = delete;
+ ShutdownPolicyLoginTest& operator=(const ShutdownPolicyLoginTest&) = delete;
+
protected:
ShutdownPolicyLoginTest() = default;
~ShutdownPolicyLoginTest() override = default;
@@ -244,9 +252,6 @@
RunUntilBrowserProcessQuits();
}
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShutdownPolicyLoginTest);
};
IN_PROC_BROWSER_TEST_F(ShutdownPolicyLoginTest, PolicyNotSet) {
diff --git a/chrome/browser/chromeos/startup_settings_cache_unittest.cc b/chrome/browser/chromeos/startup_settings_cache_unittest.cc
index 716491e7..edc762c6 100644
--- a/chrome/browser/chromeos/startup_settings_cache_unittest.cc
+++ b/chrome/browser/chromeos/startup_settings_cache_unittest.cc
@@ -13,6 +13,10 @@
namespace chromeos {
class StartupSettingsCacheTest : public testing::Test {
+ public:
+ StartupSettingsCacheTest(const StartupSettingsCacheTest&) = delete;
+ StartupSettingsCacheTest& operator=(const StartupSettingsCacheTest&) = delete;
+
protected:
StartupSettingsCacheTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
~StartupSettingsCacheTest() override {}
@@ -20,8 +24,6 @@
private:
// Map DIR_USER_DATA to a temp dir.
base::ScopedPathOverride user_data_dir_override_;
-
- DISALLOW_COPY_AND_ASSIGN(StartupSettingsCacheTest);
};
TEST_F(StartupSettingsCacheTest, RoundTrip) {
diff --git a/chrome/browser/chromeos/throttle_observer_unittest.cc b/chrome/browser/chromeos/throttle_observer_unittest.cc
index 20b2d9e..2132fc6 100644
--- a/chrome/browser/chromeos/throttle_observer_unittest.cc
+++ b/chrome/browser/chromeos/throttle_observer_unittest.cc
@@ -23,6 +23,9 @@
AsWeakPtr()));
}
+ ThrottleObserverTest(const ThrottleObserverTest&) = delete;
+ ThrottleObserverTest& operator=(const ThrottleObserverTest&) = delete;
+
void OnObserverStateChanged() { notify_count_++; }
protected:
@@ -33,8 +36,6 @@
ThrottleObserver observer_{ThrottleObserver::PriorityLevel::LOW,
"TestObserver"};
size_t notify_count_{0};
-
- DISALLOW_COPY_AND_ASSIGN(ThrottleObserverTest);
};
// Tests that ThrottleObserver can be constructed and destructed.
diff --git a/chrome/browser/chromeos/throttle_service_unittest.cc b/chrome/browser/chromeos/throttle_service_unittest.cc
index 3bcdbcd..34ff560 100644
--- a/chrome/browser/chromeos/throttle_service_unittest.cc
+++ b/chrome/browser/chromeos/throttle_service_unittest.cc
@@ -88,6 +88,9 @@
service_.SetObserversForTesting(std::move(observers));
}
+ ThrottleServiceTest(const ThrottleServiceTest&) = delete;
+ ThrottleServiceTest& operator=(const ThrottleServiceTest&) = delete;
+
void set_critical_observer(ThrottleObserver* observer) {
critical_observer_ = observer;
}
@@ -135,8 +138,6 @@
TestThrottleService service_;
ThrottleObserver* critical_observer_{nullptr};
ThrottleObserver* low_observer_{nullptr};
-
- DISALLOW_COPY_AND_ASSIGN(ThrottleServiceTest);
};
TEST_F(ThrottleServiceTest, TestConstructDestruct) {}
diff --git a/chrome/browser/chromeos/tpm_firmware_update_notification.cc b/chrome/browser/chromeos/tpm_firmware_update_notification.cc
index b75b9c1b7..ea41167 100644
--- a/chrome/browser/chromeos/tpm_firmware_update_notification.cc
+++ b/chrome/browser/chromeos/tpm_firmware_update_notification.cc
@@ -37,6 +37,11 @@
explicit TPMFirmwareUpdateNotificationDelegate(Profile* profile)
: profile_(profile) {}
+ TPMFirmwareUpdateNotificationDelegate(
+ const TPMFirmwareUpdateNotificationDelegate&) = delete;
+ TPMFirmwareUpdateNotificationDelegate& operator=(
+ const TPMFirmwareUpdateNotificationDelegate&) = delete;
+
private:
~TPMFirmwareUpdateNotificationDelegate() override = default;
@@ -61,8 +66,6 @@
}
Profile* const profile_;
-
- DISALLOW_COPY_AND_ASSIGN(TPMFirmwareUpdateNotificationDelegate);
};
void OnAvailableUpdateModes(Profile* profile,
diff --git a/chrome/browser/client_hints/client_hints_factory.h b/chrome/browser/client_hints/client_hints_factory.h
index 6604afc5..16fa0c03 100644
--- a/chrome/browser/client_hints/client_hints_factory.h
+++ b/chrome/browser/client_hints/client_hints_factory.h
@@ -21,6 +21,9 @@
static ClientHintsFactory* GetInstance();
+ ClientHintsFactory(const ClientHintsFactory&) = delete;
+ ClientHintsFactory& operator=(const ClientHintsFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<ClientHintsFactory>;
@@ -33,8 +36,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(ClientHintsFactory);
};
#endif // CHROME_BROWSER_CLIENT_HINTS_CLIENT_HINTS_FACTORY_H_
diff --git a/chrome/browser/component_updater/component_patcher_operation_browsertest.cc b/chrome/browser/component_updater/component_patcher_operation_browsertest.cc
index f258985..7dbd67e 100644
--- a/chrome/browser/component_updater/component_patcher_operation_browsertest.cc
+++ b/chrome/browser/component_updater/component_patcher_operation_browsertest.cc
@@ -42,6 +42,9 @@
EXPECT_TRUE(unpack_dir_.CreateUniqueTempDir());
}
+ PatchTest(const PatchTest&) = delete;
+ PatchTest& operator=(const PatchTest&) = delete;
+
static base::FilePath TestFile(const char* name) {
base::FilePath path;
base::PathService::Get(base::DIR_SOURCE_ROOT, &path);
@@ -133,8 +136,6 @@
base::ScopedTempDir unpack_dir_;
base::OnceClosure quit_closure_;
bool done_called_;
-
- DISALLOW_COPY_AND_ASSIGN(PatchTest);
};
IN_PROC_BROWSER_TEST_F(PatchTest, CheckBsdiffOperation) {
diff --git a/chrome/browser/component_updater/crl_set_component_installer_unittest.cc b/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
index 050b41c..8288db10 100644
--- a/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/crl_set_component_installer_unittest.cc
@@ -33,6 +33,10 @@
test_server_(net::EmbeddedTestServer::TYPE_HTTPS),
network_service_(std::make_unique<network::NetworkService>(nullptr)) {}
+ CRLSetComponentInstallerTest(const CRLSetComponentInstallerTest&) = delete;
+ CRLSetComponentInstallerTest& operator=(const CRLSetComponentInstallerTest&) =
+ delete;
+
void SetUp() override {
PlatformTest::SetUp();
@@ -103,9 +107,6 @@
mojo::Remote<network::mojom::NetworkContext> network_context_;
mojo::Remote<network::mojom::URLLoader> loader_;
base::ScopedTempDir temp_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CRLSetComponentInstallerTest);
};
TEST_F(CRLSetComponentInstallerTest, ConfiguresOnInstall) {
diff --git a/chrome/browser/component_updater/cros_component_installer_chromeos.h b/chrome/browser/component_updater/cros_component_installer_chromeos.h
index bcf087c..c073839 100644
--- a/chrome/browser/component_updater/cros_component_installer_chromeos.h
+++ b/chrome/browser/component_updater/cros_component_installer_chromeos.h
@@ -131,6 +131,9 @@
CrOSComponentInstaller(std::unique_ptr<MetadataTable> metadata_table,
ComponentUpdateService* component_updater);
+ CrOSComponentInstaller(const CrOSComponentInstaller&) = delete;
+ CrOSComponentInstaller& operator=(const CrOSComponentInstaller&) = delete;
+
// CrOSComponentManager:
void SetDelegate(Delegate* delegate) override;
void Load(const std::string& name,
@@ -214,8 +217,6 @@
std::unique_ptr<MetadataTable> metadata_table_;
ComponentUpdateService* const component_updater_;
-
- DISALLOW_COPY_AND_ASSIGN(CrOSComponentInstaller);
};
} // namespace component_updater
diff --git a/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc b/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
index 2732bf0..f78c4ac 100644
--- a/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
+++ b/chrome/browser/component_updater/cros_component_installer_chromeos_unittest.cc
@@ -187,6 +187,10 @@
CrOSComponentInstallerTest()
: user_manager_(std::make_unique<ash::FakeChromeUserManager>()) {}
+ CrOSComponentInstallerTest(const CrOSComponentInstallerTest&) = delete;
+ CrOSComponentInstallerTest& operator=(const CrOSComponentInstallerTest&) =
+ delete;
+
void SetUp() override {
ASSERT_TRUE(base_component_paths_.CreateUniqueTempDir());
@@ -361,8 +365,6 @@
base::FilePath user_cros_components_;
base::FilePath tmp_unpack_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(CrOSComponentInstallerTest);
};
TEST_F(CrOSComponentInstallerTest, CompatibleCrOSComponent) {
diff --git a/chrome/browser/component_updater/fake_cros_component_manager.h b/chrome/browser/component_updater/fake_cros_component_manager.h
index 6465aa2..6e6daf2 100644
--- a/chrome/browser/component_updater/fake_cros_component_manager.h
+++ b/chrome/browser/component_updater/fake_cros_component_manager.h
@@ -45,6 +45,9 @@
FakeCrOSComponentManager();
+ FakeCrOSComponentManager(const FakeCrOSComponentManager&) = delete;
+ FakeCrOSComponentManager& operator=(const FakeCrOSComponentManager&) = delete;
+
void set_queue_load_requests(bool queue_load_requests) {
queue_load_requests_ = queue_load_requests;
}
@@ -157,8 +160,6 @@
// Maps the currently mounted components to their mount point path.
std::map<std::string, base::FilePath> mounted_components_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeCrOSComponentManager);
};
} // namespace component_updater
diff --git a/chrome/browser/component_updater/origin_trials_component_installer_unittest.cc b/chrome/browser/component_updater/origin_trials_component_installer_unittest.cc
index 4de3b0ca..1f4d51c 100644
--- a/chrome/browser/component_updater/origin_trials_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/origin_trials_component_installer_unittest.cc
@@ -36,6 +36,11 @@
OriginTrialsComponentInstallerTest()
: testing_local_state_(TestingBrowserProcess::GetGlobal()) {}
+ OriginTrialsComponentInstallerTest(
+ const OriginTrialsComponentInstallerTest&) = delete;
+ OriginTrialsComponentInstallerTest& operator=(
+ const OriginTrialsComponentInstallerTest&) = delete;
+
void SetUp() override {
PlatformTest::SetUp();
@@ -60,9 +65,6 @@
base::ScopedTempDir temp_dir_;
ScopedTestingLocalState testing_local_state_;
std::unique_ptr<ComponentInstallerPolicy> policy_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OriginTrialsComponentInstallerTest);
};
TEST_F(OriginTrialsComponentInstallerTest,
diff --git a/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc b/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
index 25cce496..4873865 100644
--- a/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
+++ b/chrome/browser/component_updater/subresource_filter_component_installer_unittest.cc
@@ -103,6 +103,11 @@
public:
SubresourceFilterComponentInstallerTest() = default;
+ SubresourceFilterComponentInstallerTest(
+ const SubresourceFilterComponentInstallerTest&) = delete;
+ SubresourceFilterComponentInstallerTest& operator=(
+ const SubresourceFilterComponentInstallerTest&) = delete;
+
void SetUp() override {
PlatformTest::SetUp();
@@ -181,8 +186,6 @@
TestingPrefServiceSimple pref_service_;
TestRulesetService* test_ruleset_service_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(SubresourceFilterComponentInstallerTest);
};
TEST_F(SubresourceFilterComponentInstallerTest,
diff --git a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
index cd2c079..4e593e9 100644
--- a/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
+++ b/chrome/browser/component_updater/sw_reporter_installer_win_unittest.cc
@@ -59,6 +59,9 @@
default_version_("1.2.3"),
default_path_(L"C:\\full\\path\\to\\download") {}
+ SwReporterInstallerTest(const SwReporterInstallerTest&) = delete;
+ SwReporterInstallerTest& operator=(const SwReporterInstallerTest&) = delete;
+
protected:
void SwReporterComponentReady(SwReporterInvocationSequence&& invocations) {
ASSERT_TRUE(extracted_invocations_.container().empty());
@@ -211,9 +214,6 @@
// Invocations captured by |SwReporterComponentReady|.
SwReporterInvocationSequence extracted_invocations_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SwReporterInstallerTest);
};
TEST_F(SwReporterInstallerTest, MissingManifest) {
@@ -643,6 +643,10 @@
public:
SwReporterOnDemandFetcherTest() = default;
+ SwReporterOnDemandFetcherTest(const SwReporterOnDemandFetcherTest&) = delete;
+ SwReporterOnDemandFetcherTest& operator=(
+ const SwReporterOnDemandFetcherTest&) = delete;
+
void SetUp() override {
EXPECT_CALL(mock_cus_, AddObserver(_)).Times(1);
EXPECT_CALL(mock_cus_, GetOnDemandUpdater()).WillOnce(ReturnRef(*this));
@@ -710,8 +714,6 @@
bool component_can_be_updated_ = false;
bool error_callback_called_ = false;
content::BrowserTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(SwReporterOnDemandFetcherTest);
};
TEST_F(SwReporterOnDemandFetcherTest, TestUpdateSuccess) {
diff --git a/chrome/browser/consent_auditor/consent_auditor_factory.h b/chrome/browser/consent_auditor/consent_auditor_factory.h
index 9663e27..4288341 100644
--- a/chrome/browser/consent_auditor/consent_auditor_factory.h
+++ b/chrome/browser/consent_auditor/consent_auditor_factory.h
@@ -31,6 +31,9 @@
// Returns the ContextAuditor associated with |profile|.
static consent_auditor::ConsentAuditor* GetForProfile(Profile* profile);
+ ConsentAuditorFactory(const ConsentAuditorFactory&) = delete;
+ ConsentAuditorFactory& operator=(const ConsentAuditorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ConsentAuditorFactory>;
@@ -42,8 +45,6 @@
content::BrowserContext* context) const override;
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
-
- DISALLOW_COPY_AND_ASSIGN(ConsentAuditorFactory);
};
#endif // CHROME_BROWSER_CONSENT_AUDITOR_CONSENT_AUDITOR_FACTORY_H_
diff --git a/chrome/browser/content_index/content_index_provider_factory.h b/chrome/browser/content_index/content_index_provider_factory.h
index c9f4d56..7ea45cb9 100644
--- a/chrome/browser/content_index/content_index_provider_factory.h
+++ b/chrome/browser/content_index/content_index_provider_factory.h
@@ -17,6 +17,10 @@
static ContentIndexProviderImpl* GetForProfile(Profile* profile);
static ContentIndexProviderFactory* GetInstance();
+ ContentIndexProviderFactory(const ContentIndexProviderFactory&) = delete;
+ ContentIndexProviderFactory& operator=(const ContentIndexProviderFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ContentIndexProviderFactory>;
@@ -28,8 +32,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ContentIndexProviderFactory);
};
#endif // CHROME_BROWSER_CONTENT_INDEX_CONTENT_INDEX_PROVIDER_FACTORY_H_
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index 7ce750f0..bca0cc3 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -51,11 +51,13 @@
explicit DeadlockCheckerThread(const ContentSettingsPref* pref)
: pref_(pref) {}
+ DeadlockCheckerThread(const DeadlockCheckerThread&) = delete;
+ DeadlockCheckerThread& operator=(const DeadlockCheckerThread&) = delete;
+
void ThreadMain() override { EXPECT_TRUE(pref_->TryLockForTesting()); }
private:
const ContentSettingsPref* pref_;
- DISALLOW_COPY_AND_ASSIGN(DeadlockCheckerThread);
};
// A helper for observing an preference changes and testing whether
diff --git a/chrome/browser/content_settings/cookie_settings_factory.h b/chrome/browser/content_settings/cookie_settings_factory.h
index 46661fd..86383cd 100644
--- a/chrome/browser/content_settings/cookie_settings_factory.h
+++ b/chrome/browser/content_settings/cookie_settings_factory.h
@@ -27,6 +27,9 @@
static CookieSettingsFactory* GetInstance();
+ CookieSettingsFactory(const CookieSettingsFactory&) = delete;
+ CookieSettingsFactory& operator=(const CookieSettingsFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<CookieSettingsFactory>;
@@ -40,8 +43,6 @@
content::BrowserContext* context) const override;
scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(CookieSettingsFactory);
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_COOKIE_SETTINGS_FACTORY_H_
diff --git a/chrome/browser/content_settings/host_content_settings_map_factory.h b/chrome/browser/content_settings/host_content_settings_map_factory.h
index 406e242..f8564d9 100644
--- a/chrome/browser/content_settings/host_content_settings_map_factory.h
+++ b/chrome/browser/content_settings/host_content_settings_map_factory.h
@@ -19,6 +19,10 @@
content::BrowserContext* browser_context);
static HostContentSettingsMapFactory* GetInstance();
+ HostContentSettingsMapFactory(const HostContentSettingsMapFactory&) = delete;
+ HostContentSettingsMapFactory& operator=(
+ const HostContentSettingsMapFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<HostContentSettingsMapFactory>;
@@ -30,8 +34,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(HostContentSettingsMapFactory);
};
#endif // CHROME_BROWSER_CONTENT_SETTINGS_HOST_CONTENT_SETTINGS_MAP_FACTORY_H_
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index 36ce2d25..9eb6e23 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -129,6 +129,9 @@
}
}
+ TesterForType(const TesterForType&) = delete;
+ TesterForType& operator=(const TesterForType&) = delete;
+
void ClearPolicyDefault() {
prefs_->RemoveManagedPref(policy_default_setting_);
}
@@ -163,8 +166,6 @@
HostContentSettingsMap* host_content_settings_map_;
ContentSettingsType content_type_;
const char* policy_default_setting_;
-
- DISALLOW_COPY_AND_ASSIGN(TesterForType);
};
TEST_F(HostContentSettingsMapTest, DefaultValues) {
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index cd985ae16..f1816228 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -62,6 +62,9 @@
explicit CacheMaxAgeHandler(const std::string& path)
: path_(path), request_count_(0) { }
+ CacheMaxAgeHandler(const CacheMaxAgeHandler&) = delete;
+ CacheMaxAgeHandler& operator=(const CacheMaxAgeHandler&) = delete;
+
std::unique_ptr<net::test_server::HttpResponse> HandleRequest(
const net::test_server::HttpRequest& request) {
if (request.relative_url != path_)
@@ -79,8 +82,6 @@
private:
std::string path_;
int request_count_;
-
- DISALLOW_COPY_AND_ASSIGN(CacheMaxAgeHandler);
};
class CrashRecoveryBrowserTest : public InProcessBrowserTest {
diff --git a/chrome/browser/crash_upload_list/crash_upload_list_android.h b/chrome/browser/crash_upload_list/crash_upload_list_android.h
index 5928635..982521a 100644
--- a/chrome/browser/crash_upload_list/crash_upload_list_android.h
+++ b/chrome/browser/crash_upload_list/crash_upload_list_android.h
@@ -19,6 +19,9 @@
public:
explicit CrashUploadListAndroid(const base::FilePath& upload_log_path);
+ CrashUploadListAndroid(const CrashUploadListAndroid&) = delete;
+ CrashUploadListAndroid& operator=(const CrashUploadListAndroid&) = delete;
+
// Returns true if the browser crash metrics were initialized, only happens
// when minidump service is started.
static bool BrowserCrashMetricsInitialized();
@@ -35,8 +38,6 @@
private:
void LoadUnsuccessfulUploadList(std::vector<UploadInfo>* uploads);
-
- DISALLOW_COPY_AND_ASSIGN(CrashUploadListAndroid);
};
#endif // CHROME_BROWSER_CRASH_UPLOAD_LIST_CRASH_UPLOAD_LIST_ANDROID_H_
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
index ad03addb..f8eb7844 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_factory.h
@@ -30,6 +30,11 @@
static ProtocolHandlerRegistry* GetForBrowserContext(
content::BrowserContext* context);
+ ProtocolHandlerRegistryFactory(const ProtocolHandlerRegistryFactory&) =
+ delete;
+ ProtocolHandlerRegistryFactory& operator=(
+ const ProtocolHandlerRegistryFactory&) = delete;
+
protected:
// BrowserContextKeyedServiceFactory implementation.
bool ServiceIsCreatedWithBrowserContext() const override;
@@ -46,8 +51,6 @@
// BrowserContextKeyedServiceFactory implementation.
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerRegistryFactory);
};
#endif // CHROME_BROWSER_CUSTOM_HANDLERS_PROTOCOL_HANDLER_REGISTRY_FACTORY_H_
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
index 8c5ffecf..847d2a8 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc
@@ -141,6 +141,10 @@
registry_observation_.Observe(registry);
}
+ QueryProtocolHandlerOnChange(const QueryProtocolHandlerOnChange&) = delete;
+ QueryProtocolHandlerOnChange& operator=(const QueryProtocolHandlerOnChange&) =
+ delete;
+
// ProtocolHandlerRegistry::Observer:
void OnProtocolHandlerRegistryChanged() override {
std::vector<std::string> output;
@@ -157,8 +161,6 @@
base::ScopedObservation<ProtocolHandlerRegistry,
ProtocolHandlerRegistry::Observer>
registry_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(QueryProtocolHandlerOnChange);
};
} // namespace
diff --git a/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h b/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h
index 48ed151..5785e30 100644
--- a/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h
+++ b/chrome/browser/data_reduction_proxy/data_reduction_proxy_chrome_settings_factory.h
@@ -28,6 +28,11 @@
// Returns an instance of this factory.
static DataReductionProxyChromeSettingsFactory* GetInstance();
+ DataReductionProxyChromeSettingsFactory(
+ const DataReductionProxyChromeSettingsFactory&) = delete;
+ DataReductionProxyChromeSettingsFactory& operator=(
+ const DataReductionProxyChromeSettingsFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
DataReductionProxyChromeSettingsFactory>;
@@ -39,8 +44,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DataReductionProxyChromeSettingsFactory);
};
#endif // CHROME_BROWSER_DATA_REDUCTION_PROXY_DATA_REDUCTION_PROXY_CHROME_SETTINGS_FACTORY_H_
diff --git a/chrome/browser/data_saver/subresource_redirect_browsertest.cc b/chrome/browser/data_saver/subresource_redirect_browsertest.cc
index 5ce1a0a0..a8af8631 100644
--- a/chrome/browser/data_saver/subresource_redirect_browsertest.cc
+++ b/chrome/browser/data_saver/subresource_redirect_browsertest.cc
@@ -90,6 +90,11 @@
https_server_(net::EmbeddedTestServer::TYPE_HTTPS),
compression_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
+ SubresourceRedirectBrowserTest(const SubresourceRedirectBrowserTest&) =
+ delete;
+ SubresourceRedirectBrowserTest& operator=(
+ const SubresourceRedirectBrowserTest&) = delete;
+
void SetUp() override {
// |http_server| setup.
http_server_.ServeFilesFromSourceDirectory("chrome/test/data");
@@ -424,8 +429,6 @@
bool https_server_image_fail_ = false;
CompressionServerFailureMode compression_server_failure_mode_ =
CompressionServerFailureMode::NONE;
-
- DISALLOW_COPY_AND_ASSIGN(SubresourceRedirectBrowserTest);
};
class RedirectDisabledSubresourceRedirectBrowserTest
diff --git a/chrome/browser/data_use_measurement/chrome_data_use_measurement.h b/chrome/browser/data_use_measurement/chrome_data_use_measurement.h
index 7ae5cc71..afb7d4b6 100644
--- a/chrome/browser/data_use_measurement/chrome_data_use_measurement.h
+++ b/chrome/browser/data_use_measurement/chrome_data_use_measurement.h
@@ -25,6 +25,9 @@
network::NetworkConnectionTracker* network_connection_tracker,
PrefService* local_state);
+ ChromeDataUseMeasurement(const ChromeDataUseMeasurement&) = delete;
+ ChromeDataUseMeasurement& operator=(const ChromeDataUseMeasurement&) = delete;
+
// Called when requests complete from NetworkService. Called for all requests
// (including service requests and user-initiated requests).
void ReportNetworkServiceDataUse(int32_t network_traffic_annotation_id_hash,
@@ -40,8 +43,6 @@
static void RegisterPrefs(PrefRegistrySimple* registry);
private:
- DISALLOW_COPY_AND_ASSIGN(ChromeDataUseMeasurement);
-
void UpdateMetricsUsagePrefs(int64_t total_bytes,
bool is_cellular,
bool is_metrics_service_usage);
diff --git a/chrome/browser/device_identity/device_oauth2_token_service.h b/chrome/browser/device_identity/device_oauth2_token_service.h
index 5369919..4167c51 100644
--- a/chrome/browser/device_identity/device_oauth2_token_service.h
+++ b/chrome/browser/device_identity/device_oauth2_token_service.h
@@ -37,6 +37,9 @@
using RefreshTokenAvailableCallback = base::RepeatingClosure;
using StatusCallback = base::OnceCallback<void(bool)>;
+ DeviceOAuth2TokenService(const DeviceOAuth2TokenService&) = delete;
+ DeviceOAuth2TokenService& operator=(const DeviceOAuth2TokenService&) = delete;
+
// Persist the given refresh token on the device. Overwrites any previous
// value. Should only be called during initial device setup. Signals
// completion via the given callback, passing true if the operation succeeded.
@@ -197,8 +200,6 @@
std::unique_ptr<DeviceOAuth2TokenStore> store_;
base::WeakPtrFactory<DeviceOAuth2TokenService> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenService);
};
#endif // CHROME_BROWSER_DEVICE_IDENTITY_DEVICE_OAUTH2_TOKEN_SERVICE_H_
diff --git a/chrome/browser/device_identity/device_oauth2_token_service_factory.h b/chrome/browser/device_identity/device_oauth2_token_service_factory.h
index a6e2985..03455b6 100644
--- a/chrome/browser/device_identity/device_oauth2_token_service_factory.h
+++ b/chrome/browser/device_identity/device_oauth2_token_service_factory.h
@@ -39,11 +39,14 @@
// and CrosSettings).
static void Shutdown();
+ DeviceOAuth2TokenServiceFactory(const DeviceOAuth2TokenServiceFactory&) =
+ delete;
+ DeviceOAuth2TokenServiceFactory& operator=(
+ const DeviceOAuth2TokenServiceFactory&) = delete;
+
private:
DeviceOAuth2TokenServiceFactory();
~DeviceOAuth2TokenServiceFactory();
-
- DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory);
};
#endif // CHROME_BROWSER_DEVICE_IDENTITY_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_
diff --git a/chrome/browser/devtools/device/adb/adb_client_socket.h b/chrome/browser/devtools/device/adb/adb_client_socket.h
index e53919d..ff7a972 100644
--- a/chrome/browser/devtools/device/adb/adb_client_socket.h
+++ b/chrome/browser/devtools/device/adb/adb_client_socket.h
@@ -27,6 +27,9 @@
const std::string& socket_name,
SocketCallback callback);
+ AdbClientSocket(const AdbClientSocket&) = delete;
+ AdbClientSocket& operator=(const AdbClientSocket&) = delete;
+
protected:
explicit AdbClientSocket(int port);
~AdbClientSocket();
@@ -59,8 +62,6 @@
std::string host_;
int port_;
-
- DISALLOW_COPY_AND_ASSIGN(AdbClientSocket);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_ADB_ADB_CLIENT_SOCKET_H_
diff --git a/chrome/browser/devtools/device/android_device_manager.h b/chrome/browser/devtools/device/android_device_manager.h
index 9e5b92f1..2e533b4 100644
--- a/chrome/browser/devtools/device/android_device_manager.h
+++ b/chrome/browser/devtools/device/android_device_manager.h
@@ -84,6 +84,9 @@
virtual ~Delegate() {}
};
+ AndroidWebSocket(const AndroidWebSocket&) = delete;
+ AndroidWebSocket& operator=(const AndroidWebSocket&) = delete;
+
~AndroidWebSocket();
void SendFrame(const std::string& message);
@@ -108,13 +111,15 @@
std::unique_ptr<WebSocketImpl, base::OnTaskRunnerDeleter> socket_impl_;
Delegate* delegate_;
base::WeakPtrFactory<AndroidWebSocket> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(AndroidWebSocket);
};
class DeviceProvider;
class Device final : public base::RefCountedDeleteOnSequence<Device> {
public:
+ Device(const Device&) = delete;
+ Device& operator=(const Device&) = delete;
+
void QueryDeviceInfo(DeviceInfoCallback callback);
void OpenSocket(const std::string& socket_name, SocketCallback callback);
@@ -150,8 +155,6 @@
const std::string serial_;
base::WeakPtrFactory<Device> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Device);
};
using Devices = std::vector<scoped_refptr<Device>>;
diff --git a/chrome/browser/devtools/device/android_web_socket.cc b/chrome/browser/devtools/device/android_web_socket.cc
index 24de3a6..51962b1e 100644
--- a/chrome/browser/devtools/device/android_web_socket.cc
+++ b/chrome/browser/devtools/device/android_web_socket.cc
@@ -69,6 +69,9 @@
thread_checker_.DetachFromThread();
}
+ WebSocketImpl(const WebSocketImpl&) = delete;
+ WebSocketImpl& operator=(const WebSocketImpl&) = delete;
+
void StartListening() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(socket_);
@@ -182,7 +185,6 @@
std::string response_buffer_;
std::string request_buffer_;
base::ThreadChecker thread_checker_;
- DISALLOW_COPY_AND_ASSIGN(WebSocketImpl);
base::WeakPtrFactory<WebSocketImpl> weak_factory_{this};
};
diff --git a/chrome/browser/devtools/device/cast_device_provider.h b/chrome/browser/devtools/device/cast_device_provider.h
index 50a97e0..22dada7 100644
--- a/chrome/browser/devtools/device/cast_device_provider.h
+++ b/chrome/browser/devtools/device/cast_device_provider.h
@@ -25,6 +25,9 @@
public:
CastDeviceProvider();
+ CastDeviceProvider(const CastDeviceProvider&) = delete;
+ CastDeviceProvider& operator=(const CastDeviceProvider&) = delete;
+
// DeviceProvider implementation:
void QueryDevices(SerialsCallback callback) override;
void QueryDeviceInfo(const std::string& serial,
@@ -58,8 +61,6 @@
std::map<std::string, std::string> service_hostname_map_;
base::WeakPtrFactory<CastDeviceProvider> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CastDeviceProvider);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_CAST_DEVICE_PROVIDER_H_
diff --git a/chrome/browser/devtools/device/devtools_android_bridge.h b/chrome/browser/devtools/device/devtools_android_bridge.h
index 57f297c..e130cd3 100644
--- a/chrome/browser/devtools/device/devtools_android_bridge.h
+++ b/chrome/browser/devtools/device/devtools_android_bridge.h
@@ -48,6 +48,9 @@
// Returns DevToolsAndroidBridge associated with |profile|.
static DevToolsAndroidBridge* GetForProfile(Profile* profile);
+ Factory(const Factory&) = delete;
+ Factory& operator=(const Factory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<Factory>;
@@ -57,7 +60,6 @@
// BrowserContextKeyedServiceFactory overrides:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
- DISALLOW_COPY_AND_ASSIGN(Factory);
};
using RemotePage = DevToolsDeviceDiscovery::RemotePage;
@@ -79,6 +81,10 @@
};
explicit DevToolsAndroidBridge(Profile* profile);
+
+ DevToolsAndroidBridge(const DevToolsAndroidBridge&) = delete;
+ DevToolsAndroidBridge& operator=(const DevToolsAndroidBridge&) = delete;
+
void AddDeviceListListener(DeviceListListener* listener);
void RemoveDeviceListListener(DeviceListListener* listener);
@@ -189,8 +195,6 @@
std::unique_ptr<DevToolsDeviceDiscovery> device_discovery_;
base::WeakPtrFactory<DevToolsAndroidBridge> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsAndroidBridge);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_ANDROID_BRIDGE_H_
diff --git a/chrome/browser/devtools/device/devtools_device_discovery.cc b/chrome/browser/devtools/device/devtools_device_discovery.cc
index c94bf73..987a4ce6 100644
--- a/chrome/browser/devtools/device/devtools_device_discovery.cc
+++ b/chrome/browser/devtools/device/devtools_device_discovery.cc
@@ -60,6 +60,9 @@
const std::string& target_path,
const std::string& command);
+ ProtocolCommand(const ProtocolCommand&) = delete;
+ ProtocolCommand& operator=(const ProtocolCommand&) = delete;
+
private:
void OnSocketOpened() override;
void OnFrameRead(const std::string& message) override;
@@ -68,8 +71,6 @@
const std::string command_;
std::unique_ptr<AndroidDeviceManager::AndroidWebSocket> web_socket_;
-
- DISALLOW_COPY_AND_ASSIGN(ProtocolCommand);
};
ProtocolCommand::ProtocolCommand(
@@ -102,6 +103,9 @@
explicit WebSocketProxy(content::DevToolsExternalAgentProxy* proxy)
: socket_opened_(false), proxy_(proxy) {}
+ WebSocketProxy(const WebSocketProxy&) = delete;
+ WebSocketProxy& operator=(const WebSocketProxy&) = delete;
+
void WebSocketCreated(AndroidDeviceManager::AndroidWebSocket* web_socket) {
web_socket_.reset(web_socket);
}
@@ -140,7 +144,6 @@
std::vector<std::string> pending_messages_;
std::unique_ptr<AndroidDeviceManager::AndroidWebSocket> web_socket_;
content::DevToolsExternalAgentProxy* proxy_;
- DISALLOW_COPY_AND_ASSIGN(WebSocketProxy);
};
class AgentHostDelegate : public content::DevToolsExternalAgentProxyDelegate {
diff --git a/chrome/browser/devtools/device/devtools_device_discovery.h b/chrome/browser/devtools/device/devtools_device_discovery.h
index 8dd53e1..abe1a88 100644
--- a/chrome/browser/devtools/device/devtools_device_discovery.h
+++ b/chrome/browser/devtools/device/devtools_device_discovery.h
@@ -21,6 +21,9 @@
public:
class RemotePage : public base::RefCountedThreadSafe<RemotePage> {
public:
+ RemotePage(const RemotePage&) = delete;
+ RemotePage& operator=(const RemotePage&) = delete;
+
scoped_refptr<AndroidDeviceManager::Device> device() { return device_; }
const std::string& socket() { return browser_id_; }
const std::string& frontend_url() { return frontend_url_; }
@@ -43,14 +46,15 @@
std::string frontend_url_;
base::Value dict_;
scoped_refptr<content::DevToolsAgentHost> agent_host_;
-
- DISALLOW_COPY_AND_ASSIGN(RemotePage);
};
using RemotePages = std::vector<scoped_refptr<RemotePage>>;
class RemoteBrowser : public base::RefCountedThreadSafe<RemoteBrowser> {
public:
+ RemoteBrowser(const RemoteBrowser&) = delete;
+ RemoteBrowser& operator=(const RemoteBrowser&) = delete;
+
const std::string& serial() { return serial_; }
const std::string& socket() { return browser_id_; }
const std::string& display_name() { return display_name_; }
@@ -82,14 +86,15 @@
std::string version_;
std::string browser_target_id_;
RemotePages pages_;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteBrowser);
};
using RemoteBrowsers = std::vector<scoped_refptr<RemoteBrowser>>;
class RemoteDevice : public base::RefCountedThreadSafe<RemoteDevice> {
public:
+ RemoteDevice(const RemoteDevice&) = delete;
+ RemoteDevice& operator=(const RemoteDevice&) = delete;
+
std::string serial() { return serial_; }
std::string model() { return model_; }
bool is_connected() { return connected_; }
@@ -110,8 +115,6 @@
bool connected_;
RemoteBrowsers browsers_;
gfx::Size screen_size_;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteDevice);
};
using RemoteDevices = std::vector<scoped_refptr<RemoteDevice>>;
@@ -125,6 +128,10 @@
DevToolsDeviceDiscovery(AndroidDeviceManager* device_manager,
DeviceListCallback callback);
+
+ DevToolsDeviceDiscovery(const DevToolsDeviceDiscovery&) = delete;
+ DevToolsDeviceDiscovery& operator=(const DevToolsDeviceDiscovery&) = delete;
+
~DevToolsDeviceDiscovery();
void SetScheduler(base::RepeatingCallback<void(base::OnceClosure)> scheduler);
@@ -143,8 +150,6 @@
const DeviceListCallback callback_;
base::RepeatingCallback<void(base::OnceClosure)> task_scheduler_;
base::WeakPtrFactory<DevToolsDeviceDiscovery> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsDeviceDiscovery);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_DEVTOOLS_DEVICE_DISCOVERY_H_
diff --git a/chrome/browser/devtools/device/port_forwarding_controller.cc b/chrome/browser/devtools/device/port_forwarding_controller.cc
index f016535..5dd90a1 100644
--- a/chrome/browser/devtools/device/port_forwarding_controller.cc
+++ b/chrome/browser/devtools/device/port_forwarding_controller.cc
@@ -171,6 +171,10 @@
net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt));
}
+ PortForwardingHostResolver(const PortForwardingHostResolver&) = delete;
+ PortForwardingHostResolver& operator=(const PortForwardingHostResolver&) =
+ delete;
+
private:
~PortForwardingHostResolver() override {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -195,8 +199,6 @@
mojo::Receiver<network::mojom::ResolveHostClient> receiver_{this};
ResolveHostCallback resolve_host_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(PortForwardingHostResolver);
};
static void ResolveHost(Profile* profile,
diff --git a/chrome/browser/devtools/device/usb/android_usb_device.h b/chrome/browser/devtools/device/usb/android_usb_device.h
index b3601da8..87d8f560c 100644
--- a/chrome/browser/devtools/device/usb/android_usb_device.h
+++ b/chrome/browser/devtools/device/usb/android_usb_device.h
@@ -85,6 +85,9 @@
const AndroidDeviceInfo& android_device_info,
mojo::Remote<device::mojom::UsbDevice> device);
+ AndroidUsbDevice(const AndroidUsbDevice&) = delete;
+ AndroidUsbDevice& operator=(const AndroidUsbDevice&) = delete;
+
void InitOnCallerThread();
net::StreamSocket* CreateSocket(const std::string& command);
@@ -156,8 +159,6 @@
PendingMessages pending_messages_;
base::WeakPtrFactory<AndroidUsbDevice> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(AndroidUsbDevice);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_DEVICE_H_
diff --git a/chrome/browser/devtools/devtools_browser_context_manager.h b/chrome/browser/devtools/devtools_browser_context_manager.h
index e962a19..dd878e7 100644
--- a/chrome/browser/devtools/devtools_browser_context_manager.h
+++ b/chrome/browser/devtools/devtools_browser_context_manager.h
@@ -17,6 +17,10 @@
public:
static DevToolsBrowserContextManager& GetInstance();
+ DevToolsBrowserContextManager(const DevToolsBrowserContextManager&) = delete;
+ DevToolsBrowserContextManager& operator=(
+ const DevToolsBrowserContextManager&) = delete;
+
Profile* GetProfileById(const std::string& browser_context_id);
std::vector<content::BrowserContext*> GetBrowserContexts();
content::BrowserContext* GetDefaultBrowserContext();
@@ -41,7 +45,6 @@
pending_context_disposals_;
base::WeakPtrFactory<DevToolsBrowserContextManager> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(DevToolsBrowserContextManager);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_BROWSER_CONTEXT_MANAGER_H_
diff --git a/chrome/browser/devtools/devtools_browsertest.cc b/chrome/browser/devtools/devtools_browsertest.cc
index e82fac2c..9ac5183 100644
--- a/chrome/browser/devtools/devtools_browsertest.cc
+++ b/chrome/browser/devtools/devtools_browsertest.cc
@@ -334,6 +334,12 @@
: public content::WebContentsObserver {
public:
explicit DevToolsWindowBeforeUnloadObserver(DevToolsWindow*);
+
+ DevToolsWindowBeforeUnloadObserver(
+ const DevToolsWindowBeforeUnloadObserver&) = delete;
+ DevToolsWindowBeforeUnloadObserver& operator=(
+ const DevToolsWindowBeforeUnloadObserver&) = delete;
+
void Wait();
private:
// Invoked when the beforeunload handler fires.
@@ -342,7 +348,6 @@
bool m_fired;
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
- DISALLOW_COPY_AND_ASSIGN(DevToolsWindowBeforeUnloadObserver);
};
DevToolsWindowBeforeUnloadObserver::DevToolsWindowBeforeUnloadObserver(
diff --git a/chrome/browser/devtools/devtools_contents_resizing_strategy.h b/chrome/browser/devtools/devtools_contents_resizing_strategy.h
index 9a8d22c..2bbb56a 100644
--- a/chrome/browser/devtools/devtools_contents_resizing_strategy.h
+++ b/chrome/browser/devtools/devtools_contents_resizing_strategy.h
@@ -18,6 +18,11 @@
explicit DevToolsContentsResizingStrategy(
const gfx::Rect& bounds);
+ DevToolsContentsResizingStrategy(const DevToolsContentsResizingStrategy&) =
+ delete;
+ DevToolsContentsResizingStrategy& operator=(
+ const DevToolsContentsResizingStrategy&) = delete;
+
void CopyFrom(const DevToolsContentsResizingStrategy& strategy);
bool Equals(const DevToolsContentsResizingStrategy& strategy);
@@ -30,8 +35,6 @@
// Determines whether inspected contents is visible.
bool hide_inspected_contents_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsContentsResizingStrategy);
};
// Applies contents resizing strategy, producing bounds for devtools and
diff --git a/chrome/browser/devtools/devtools_dock_tile.h b/chrome/browser/devtools/devtools_dock_tile.h
index f1c142b2..9d251ae 100644
--- a/chrome/browser/devtools/devtools_dock_tile.h
+++ b/chrome/browser/devtools/devtools_dock_tile.h
@@ -10,10 +10,10 @@
class DevToolsDockTile {
public:
- static void Update(const std::string& label, gfx::Image image);
+ DevToolsDockTile(const DevToolsDockTile&) = delete;
+ DevToolsDockTile& operator=(const DevToolsDockTile&) = delete;
- private:
- DISALLOW_COPY_AND_ASSIGN(DevToolsDockTile);
+ static void Update(const std::string& label, gfx::Image image);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_DOCK_TILE_H_
diff --git a/chrome/browser/devtools/devtools_file_helper.cc b/chrome/browser/devtools/devtools_file_helper.cc
index 491cd672..a1b0c15 100644
--- a/chrome/browser/devtools/devtools_file_helper.cc
+++ b/chrome/browser/devtools/devtools_file_helper.cc
@@ -66,6 +66,9 @@
class SelectFileDialog : public ui::SelectFileDialog::Listener {
public:
+ SelectFileDialog(const SelectFileDialog&) = delete;
+ SelectFileDialog& operator=(const SelectFileDialog&) = delete;
+
static void Show(SelectedCallback selected_callback,
CanceledCallback canceled_callback,
WebContents* web_contents,
@@ -126,8 +129,6 @@
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
SelectedCallback selected_callback_;
CanceledCallback canceled_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(SelectFileDialog);
};
void WriteToFile(const base::FilePath& path, const std::string& content) {
diff --git a/chrome/browser/devtools/devtools_file_system_indexer.h b/chrome/browser/devtools/devtools_file_system_indexer.h
index 58c03da..2df0605 100644
--- a/chrome/browser/devtools/devtools_file_system_indexer.h
+++ b/chrome/browser/devtools/devtools_file_system_indexer.h
@@ -83,6 +83,10 @@
DevToolsFileSystemIndexer();
+ DevToolsFileSystemIndexer(const DevToolsFileSystemIndexer&) = delete;
+ DevToolsFileSystemIndexer& operator=(const DevToolsFileSystemIndexer&) =
+ delete;
+
// Performs file system indexing for given |file_system_path| and sends
// progress callbacks.
scoped_refptr<FileSystemIndexingJob> IndexPath(
@@ -105,8 +109,6 @@
void SearchInPathOnImplSequence(const std::string& file_system_path,
const std::string& query,
SearchCallback callback);
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsFileSystemIndexer);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_SYSTEM_INDEXER_H_
diff --git a/chrome/browser/devtools/devtools_file_watcher.h b/chrome/browser/devtools/devtools_file_watcher.h
index cf03c73..d0b1a2b0a 100644
--- a/chrome/browser/devtools/devtools_file_watcher.h
+++ b/chrome/browser/devtools/devtools_file_watcher.h
@@ -29,6 +29,9 @@
WatchCallback callback,
scoped_refptr<base::SequencedTaskRunner> callback_task_runner);
+ DevToolsFileWatcher(const DevToolsFileWatcher&) = delete;
+ DevToolsFileWatcher& operator=(const DevToolsFileWatcher&) = delete;
+
void AddWatch(base::FilePath path);
void RemoveWatch(base::FilePath path);
@@ -45,8 +48,6 @@
scoped_refptr<SharedFileWatcher> shared_watcher_;
WatchCallback callback_;
scoped_refptr<base::SequencedTaskRunner> client_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsFileWatcher);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_FILE_WATCHER_H_
diff --git a/chrome/browser/devtools/devtools_infobar_delegate.h b/chrome/browser/devtools/devtools_infobar_delegate.h
index 5780ac6..5f529ce 100644
--- a/chrome/browser/devtools/devtools_infobar_delegate.h
+++ b/chrome/browser/devtools/devtools_infobar_delegate.h
@@ -16,6 +16,9 @@
static void Create(const std::u16string& message, Callback callback);
+ DevToolsInfoBarDelegate(const DevToolsInfoBarDelegate&) = delete;
+ DevToolsInfoBarDelegate& operator=(const DevToolsInfoBarDelegate&) = delete;
+
private:
DevToolsInfoBarDelegate(const std::u16string& message, Callback callback);
~DevToolsInfoBarDelegate() override;
@@ -28,8 +31,6 @@
const std::u16string message_;
Callback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsInfoBarDelegate);
};
#endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index 1a84416..5bae367 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -199,6 +199,9 @@
explicit DefaultBindingsDelegate(content::WebContents* web_contents)
: web_contents_(web_contents) {}
+ DefaultBindingsDelegate(const DefaultBindingsDelegate&) = delete;
+ DefaultBindingsDelegate& operator=(const DefaultBindingsDelegate&) = delete;
+
private:
~DefaultBindingsDelegate() override {}
@@ -224,7 +227,6 @@
void RenderProcessGone(bool crashed) override {}
void ShowCertificateViewer(const std::string& cert_chain) override {}
content::WebContents* web_contents_;
- DISALLOW_COPY_AND_ASSIGN(DefaultBindingsDelegate);
};
void DefaultBindingsDelegate::ActivateWindow() {
@@ -500,6 +502,9 @@
base::Unretained(this)));
}
+ NetworkResourceLoader(const NetworkResourceLoader&) = delete;
+ NetworkResourceLoader& operator=(const NetworkResourceLoader&) = delete;
+
private:
void DownloadAsStream() {
loader_->DownloadAsStream(url_loader_factory_.get(), this);
@@ -569,8 +574,6 @@
scoped_refptr<net::HttpResponseHeaders> response_headers_;
base::OneShotTimer timer_;
base::TimeDelta retry_delay_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkResourceLoader);
};
// DevToolsUIBindings::FrontendWebContentsObserver ----------------------------
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
index 8fd78ef..ff31db1 100644
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -256,6 +256,9 @@
explicit DevToolsEventForwarder(DevToolsWindow* window)
: devtools_window_(window) {}
+ DevToolsEventForwarder(const DevToolsEventForwarder&) = delete;
+ DevToolsEventForwarder& operator=(const DevToolsEventForwarder&) = delete;
+
// Registers whitelisted shortcuts with the forwarder.
// Only registered keys will be forwarded to the DevTools frontend.
void SetWhitelistedShortcuts(const std::string& message);
@@ -270,8 +273,6 @@
DevToolsWindow* devtools_window_;
std::set<int> whitelisted_keys_;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsEventForwarder);
};
void DevToolsEventForwarder::SetWhitelistedShortcuts(
diff --git a/chrome/browser/devtools/global_confirm_info_bar.h b/chrome/browser/devtools/global_confirm_info_bar.h
index d243f94..b8a6a9ce 100644
--- a/chrome/browser/devtools/global_confirm_info_bar.h
+++ b/chrome/browser/devtools/global_confirm_info_bar.h
@@ -40,6 +40,9 @@
static GlobalConfirmInfoBar* Show(
std::unique_ptr<ConfirmInfoBarDelegate> delegate);
+ GlobalConfirmInfoBar(const GlobalConfirmInfoBar&) = delete;
+ GlobalConfirmInfoBar& operator=(const GlobalConfirmInfoBar&) = delete;
+
// infobars::InfoBarManager::Observer:
void OnInfoBarRemoved(infobars::InfoBar* info_bar, bool animate) override;
void OnManagerShuttingDown(infobars::InfoBarManager* manager) override;
@@ -75,8 +78,6 @@
bool is_closing_ = false;
base::WeakPtrFactory<GlobalConfirmInfoBar> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GlobalConfirmInfoBar);
};
#endif // CHROME_BROWSER_DEVTOOLS_GLOBAL_CONFIRM_INFO_BAR_H_
diff --git a/chrome/browser/devtools/remote_debugging_server.cc b/chrome/browser/devtools/remote_debugging_server.cc
index 07e885c2..be26d2146 100644
--- a/chrome/browser/devtools/remote_debugging_server.cc
+++ b/chrome/browser/devtools/remote_debugging_server.cc
@@ -43,6 +43,9 @@
explicit TCPServerSocketFactory(uint16_t port)
: port_(port), last_tethering_port_(kMinTetheringPort) {}
+ TCPServerSocketFactory(const TCPServerSocketFactory&) = delete;
+ TCPServerSocketFactory& operator=(const TCPServerSocketFactory&) = delete;
+
private:
std::unique_ptr<net::ServerSocket> CreateLocalHostServerSocket(int port) {
std::unique_ptr<net::ServerSocket> socket(
@@ -77,8 +80,6 @@
std::string address_;
uint16_t port_;
uint16_t last_tethering_port_;
-
- DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
};
} // namespace
diff --git a/chrome/browser/diagnostics/diagnostics_controller.h b/chrome/browser/diagnostics/diagnostics_controller.h
index a98608b..a01674e1 100644
--- a/chrome/browser/diagnostics/diagnostics_controller.h
+++ b/chrome/browser/diagnostics/diagnostics_controller.h
@@ -23,6 +23,9 @@
public:
static DiagnosticsController* GetInstance();
+ DiagnosticsController(const DiagnosticsController&) = delete;
+ DiagnosticsController& operator=(const DiagnosticsController&) = delete;
+
// Entry point for the diagnostics mode. Returns zero if able to run
// diagnostics successfully, regardless of the results of the diagnostics.
int Run(const base::CommandLine& command_line, DiagnosticsWriter* writer);
@@ -56,8 +59,6 @@
std::unique_ptr<DiagnosticsModel> model_;
DiagnosticsWriter* writer_;
-
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsController);
};
} // namespace diagnostics
diff --git a/chrome/browser/diagnostics/diagnostics_controller_unittest.cc b/chrome/browser/diagnostics/diagnostics_controller_unittest.cc
index 9d3aad5..3753553 100644
--- a/chrome/browser/diagnostics/diagnostics_controller_unittest.cc
+++ b/chrome/browser/diagnostics/diagnostics_controller_unittest.cc
@@ -30,6 +30,11 @@
// Basic harness to acquire and release the required temporary environment to
// run a test in.
class DiagnosticsControllerTest : public testing::Test {
+ public:
+ DiagnosticsControllerTest(const DiagnosticsControllerTest&) = delete;
+ DiagnosticsControllerTest& operator=(const DiagnosticsControllerTest&) =
+ delete;
+
protected:
DiagnosticsControllerTest() : cmdline_(base::CommandLine::NO_PROGRAM) {}
@@ -85,8 +90,6 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
base::FilePath old_home_dir_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsControllerTest);
};
TEST_F(DiagnosticsControllerTest, Diagnostics) {
diff --git a/chrome/browser/diagnostics/diagnostics_model.cc b/chrome/browser/diagnostics/diagnostics_model.cc
index 9768575..3d14a7a 100644
--- a/chrome/browser/diagnostics/diagnostics_model.cc
+++ b/chrome/browser/diagnostics/diagnostics_model.cc
@@ -171,8 +171,8 @@
tests_.push_back(MakeSqliteWebDatabaseTrackerDbTest());
}
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelWin);
+ DiagnosticsModelWin(const DiagnosticsModelWin&) = delete;
+ DiagnosticsModelWin& operator=(const DiagnosticsModelWin&) = delete;
};
#elif defined(OS_MAC)
@@ -195,8 +195,8 @@
tests_.push_back(MakeSqliteWebDatabaseTrackerDbTest());
}
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelMac);
+ DiagnosticsModelMac(const DiagnosticsModelMac&) = delete;
+ DiagnosticsModelMac& operator=(const DiagnosticsModelMac&) = delete;
};
#elif defined(OS_POSIX)
@@ -225,8 +225,8 @@
#endif
}
- private:
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelPosix);
+ DiagnosticsModelPosix(const DiagnosticsModelPosix&) = delete;
+ DiagnosticsModelPosix& operator=(const DiagnosticsModelPosix&) = delete;
};
#elif defined(OS_FUCHSIA)
diff --git a/chrome/browser/diagnostics/diagnostics_model_unittest.cc b/chrome/browser/diagnostics/diagnostics_model_unittest.cc
index e6ab6e5..d003753 100644
--- a/chrome/browser/diagnostics/diagnostics_model_unittest.cc
+++ b/chrome/browser/diagnostics/diagnostics_model_unittest.cc
@@ -15,6 +15,10 @@
// Basic harness to acquire and release the Diagnostic model object.
class DiagnosticsModelTest : public testing::Test {
+ public:
+ DiagnosticsModelTest(const DiagnosticsModelTest&) = delete;
+ DiagnosticsModelTest& operator=(const DiagnosticsModelTest&) = delete;
+
protected:
DiagnosticsModelTest() : cmdline_(base::CommandLine::NO_PROGRAM) {}
@@ -29,8 +33,6 @@
std::unique_ptr<DiagnosticsModel> model_;
base::CommandLine cmdline_;
-
- DISALLOW_COPY_AND_ASSIGN(DiagnosticsModelTest);
};
// The test observer is used to know if the callbacks are being called.
@@ -43,6 +45,9 @@
num_recovered_(0) {
}
+ UTObserver(const UTObserver&) = delete;
+ UTObserver& operator=(const UTObserver&) = delete;
+
void OnTestFinished(int index, DiagnosticsModel* model) override {
EXPECT_TRUE(model != NULL);
++num_tested_;
@@ -80,8 +85,6 @@
bool recovery_done_;
int num_tested_;
int num_recovered_;
-
- DISALLOW_COPY_AND_ASSIGN(UTObserver);
};
// Test that the initial state is correct.
diff --git a/chrome/browser/diagnostics/diagnostics_writer.cc b/chrome/browser/diagnostics/diagnostics_writer.cc
index 443843a0..cc07766 100644
--- a/chrome/browser/diagnostics/diagnostics_writer.cc
+++ b/chrome/browser/diagnostics/diagnostics_writer.cc
@@ -139,6 +139,9 @@
public:
PosixConsole() : use_color_(false) {}
+ PosixConsole(const PosixConsole&) = delete;
+ PosixConsole& operator=(const PosixConsole&) = delete;
+
bool Init() override {
// Technically, we should also check the terminal capabilities before using
// color, but in practice this is unlikely to be an issue.
@@ -180,8 +183,6 @@
private:
bool use_color_;
-
- DISALLOW_COPY_AND_ASSIGN(PosixConsole);
};
} // namespace
diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc
index 36c5b93d..4194b8d 100644
--- a/chrome/browser/diagnostics/recon_diagnostics.cc
+++ b/chrome/browser/diagnostics/recon_diagnostics.cc
@@ -57,6 +57,9 @@
public:
DiskSpaceTest() : DiagnosticsTest(DIAGNOSTICS_DISK_SPACE_TEST) {}
+ DiskSpaceTest(const DiskSpaceTest&) = delete;
+ DiskSpaceTest& operator=(const DiskSpaceTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
base::FilePath data_dir;
if (!base::PathService::Get(chrome::DIR_USER_DATA, &data_dir))
@@ -75,9 +78,6 @@
RecordSuccess("Free space: " + printable_size);
return true;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiskSpaceTest);
};
// Check if it is system install or per-user install.
@@ -86,6 +86,9 @@
InstallTypeTest()
: DiagnosticsTest(DIAGNOSTICS_INSTALL_TYPE_TEST), user_level_(false) {}
+ InstallTypeTest(const InstallTypeTest&) = delete;
+ InstallTypeTest& operator=(const InstallTypeTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
#if defined(OS_WIN)
user_level_ = InstallUtil::IsPerUserInstall();
@@ -103,7 +106,6 @@
private:
bool user_level_;
- DISALLOW_COPY_AND_ASSIGN(InstallTypeTest);
};
// Checks that a given JSON file can be correctly parsed.
@@ -123,6 +125,9 @@
max_file_size_(max_file_size),
importance_(importance) {}
+ JSONTest(const JSONTest&) = delete;
+ JSONTest& operator=(const JSONTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
if (!base::PathExists(path_)) {
if (importance_ == CRITICAL) {
@@ -176,7 +181,6 @@
base::FilePath path_;
int64_t max_file_size_;
FileImportance importance_;
- DISALLOW_COPY_AND_ASSIGN(JSONTest);
};
// Check that the flavor of the operating system is supported.
@@ -185,6 +189,9 @@
OperatingSystemTest()
: DiagnosticsTest(DIAGNOSTICS_OPERATING_SYSTEM_TEST) {}
+ OperatingSystemTest(const OperatingSystemTest&) = delete;
+ OperatingSystemTest& operator=(const OperatingSystemTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
// TODO(port): define the OS criteria for Linux and Mac.
RecordSuccess(base::StringPrintf(
@@ -192,9 +199,6 @@
base::SysInfo::OperatingSystemVersion().c_str()));
return true;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OperatingSystemTest);
};
struct TestPathInfo {
@@ -224,6 +228,9 @@
: DiagnosticsTest(path_info.test_id),
path_info_(path_info) {}
+ PathTest(const PathTest&) = delete;
+ PathTest& operator=(const PathTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
if (!g_install_type) {
RecordStopFailure(DIAG_RECON_DEPENDENCY, "Install dependency failure");
@@ -280,7 +287,6 @@
private:
TestPathInfo path_info_;
- DISALLOW_COPY_AND_ASSIGN(PathTest);
};
// Check the version of Chrome.
@@ -288,6 +294,9 @@
public:
VersionTest() : DiagnosticsTest(DIAGNOSTICS_VERSION_TEST) {}
+ VersionTest(const VersionTest&) = delete;
+ VersionTest& operator=(const VersionTest&) = delete;
+
bool ExecuteImpl(DiagnosticsModel::Observer* observer) override {
std::string current_version = version_info::GetVersionNumber();
if (current_version.empty()) {
@@ -304,9 +313,6 @@
RecordSuccess(current_version);
return true;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(VersionTest);
};
} // namespace
diff --git a/chrome/browser/diagnostics/sqlite_diagnostics.cc b/chrome/browser/diagnostics/sqlite_diagnostics.cc
index 074bd2b..34f2622 100644
--- a/chrome/browser/diagnostics/sqlite_diagnostics.cc
+++ b/chrome/browser/diagnostics/sqlite_diagnostics.cc
@@ -54,6 +54,9 @@
const base::FilePath& db_path)
: DiagnosticsTest(id), flags_(flags), db_path_(db_path) {}
+ SqliteIntegrityTest(const SqliteIntegrityTest&) = delete;
+ SqliteIntegrityTest& operator=(const SqliteIntegrityTest&) = delete;
+
bool RecoveryImpl(DiagnosticsModel::Observer* observer) override {
int outcome_code = GetOutcomeCode();
if (flags_ & REMOVE_IF_CORRUPT) {
@@ -172,6 +175,9 @@
public:
ErrorRecorder() : has_error_(false), sqlite_error_(0), last_errno_(0) {}
+ ErrorRecorder(const ErrorRecorder&) = delete;
+ ErrorRecorder& operator=(const ErrorRecorder&) = delete;
+
void RecordSqliteError(sql::Database* connection,
int sqlite_error,
sql::Statement* statement) {
@@ -198,13 +204,10 @@
int sqlite_error_;
int last_errno_;
std::string message_;
-
- DISALLOW_COPY_AND_ASSIGN(ErrorRecorder);
};
uint32_t flags_;
base::FilePath db_path_;
- DISALLOW_COPY_AND_ASSIGN(SqliteIntegrityTest);
};
} // namespace
diff --git a/chrome/browser/domain_reliability/browsertest.cc b/chrome/browser/domain_reliability/browsertest.cc
index 5edcadb5..2491a39f 100644
--- a/chrome/browser/domain_reliability/browsertest.cc
+++ b/chrome/browser/domain_reliability/browsertest.cc
@@ -77,6 +77,12 @@
class DomainReliabilityDisabledBrowserTest
: public DomainReliabilityBrowserTest {
+ public:
+ DomainReliabilityDisabledBrowserTest(
+ const DomainReliabilityDisabledBrowserTest&) = delete;
+ DomainReliabilityDisabledBrowserTest& operator=(
+ const DomainReliabilityDisabledBrowserTest&) = delete;
+
protected:
DomainReliabilityDisabledBrowserTest() {}
@@ -85,9 +91,6 @@
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kDisableDomainReliability);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DomainReliabilityDisabledBrowserTest);
};
IN_PROC_BROWSER_TEST_F(DomainReliabilityDisabledBrowserTest,
diff --git a/chrome/browser/downgrade/user_data_downgrade_browsertest.cc b/chrome/browser/downgrade/user_data_downgrade_browsertest.cc
index ac71346..bc5d215 100644
--- a/chrome/browser/downgrade/user_data_downgrade_browsertest.cc
+++ b/chrome/browser/downgrade/user_data_downgrade_browsertest.cc
@@ -43,6 +43,12 @@
// is expected to be used in a PRE_ and a regular test, with IsPreTest used to
// distinguish these cases at runtime.
class UserDataDowngradeBrowserTestBase : public InProcessBrowserTest {
+ public:
+ UserDataDowngradeBrowserTestBase(const UserDataDowngradeBrowserTestBase&) =
+ delete;
+ UserDataDowngradeBrowserTestBase& operator=(
+ const UserDataDowngradeBrowserTestBase&) = delete;
+
protected:
// Returns true if the PRE_ test is running, meaning that the test is in the
// "before relaunch" stage.
@@ -120,8 +126,6 @@
base::FilePath other_file_;
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(UserDataDowngradeBrowserTestBase);
};
// A gMock matcher that is satisfied when its argument is a command line
@@ -134,6 +138,12 @@
// that User Data was moved and then subsequently deleted.
class UserDataDowngradeBrowserCopyAndCleanTest
: public UserDataDowngradeBrowserTestBase {
+ public:
+ UserDataDowngradeBrowserCopyAndCleanTest(
+ const UserDataDowngradeBrowserCopyAndCleanTest&) = delete;
+ UserDataDowngradeBrowserCopyAndCleanTest& operator=(
+ const UserDataDowngradeBrowserCopyAndCleanTest&) = delete;
+
protected:
using ParentClass = UserDataDowngradeBrowserTestBase;
@@ -224,8 +234,6 @@
std::unique_ptr<upgrade_util::ScopedRelaunchChromeBrowserOverride>
relaunch_chrome_override_;
std::unique_ptr<base::HistogramTester> histogram_tester_;
-
- DISALLOW_COPY_AND_ASSIGN(UserDataDowngradeBrowserCopyAndCleanTest);
};
// Verify the user data directory has been renamed and created again after
@@ -244,11 +252,14 @@
// driven downgrade and ensures that User Data is not moved aside and deleted.
class UserDataDowngradeBrowserNoResetTest
: public UserDataDowngradeBrowserTestBase {
+ public:
+ UserDataDowngradeBrowserNoResetTest(
+ const UserDataDowngradeBrowserNoResetTest&) = delete;
+ UserDataDowngradeBrowserNoResetTest& operator=(
+ const UserDataDowngradeBrowserNoResetTest&) = delete;
+
protected:
UserDataDowngradeBrowserNoResetTest() = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UserDataDowngradeBrowserNoResetTest);
};
// Verify the user data directory will not be reset without downgrade.
diff --git a/chrome/browser/download/android/available_offline_content_provider.cc b/chrome/browser/download/android/available_offline_content_provider.cc
index 2b3a6e0..aa1c68ba 100644
--- a/chrome/browser/download/android/available_offline_content_provider.cc
+++ b/chrome/browser/download/android/available_offline_content_provider.cc
@@ -108,6 +108,9 @@
GURL favicon;
};
+ ThumbnailFetch(const ThumbnailFetch&) = delete;
+ ThumbnailFetch& operator=(const ThumbnailFetch&) = delete;
+
// Gets visuals for a list of visuals. Calls |complete_callback| with
// a list of VisualsDataUris structs containing data URIs for thumbnails and
// favicons for |content_ids|, in the same order. If no thumbnail or favicon
@@ -199,8 +202,6 @@
std::vector<VisualsDataUris> visuals_;
base::OnceCallback<void(std::vector<VisualsDataUris>)> complete_callback_;
size_t callback_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(ThumbnailFetch);
};
chrome::mojom::AvailableOfflineContentPtr CreateAvailableOfflineContent(
diff --git a/chrome/browser/download/android/download_controller.h b/chrome/browser/download/android/download_controller.h
index 6b03235e..1203160 100644
--- a/chrome/browser/download/android/download_controller.h
+++ b/chrome/browser/download/android/download_controller.h
@@ -34,6 +34,9 @@
public:
static DownloadController* GetInstance();
+ DownloadController(const DownloadController&) = delete;
+ DownloadController& operator=(const DownloadController&) = delete;
+
// DownloadControllerBase implementation.
void AcquireFileAccessPermission(
const content::WebContents::Getter& wc_getter,
@@ -107,8 +110,6 @@
StrongValidatorsMap strong_validators_map_;
std::unique_ptr<DangerousDownloadDialogBridge> dangerous_download_bridge_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadController);
};
#endif // CHROME_BROWSER_DOWNLOAD_ANDROID_DOWNLOAD_CONTROLLER_H_
diff --git a/chrome/browser/download/android/download_manager_bridge.h b/chrome/browser/download/android/download_manager_bridge.h
index f4b18e0..48a8256 100644
--- a/chrome/browser/download/android/download_manager_bridge.h
+++ b/chrome/browser/download/android/download_manager_bridge.h
@@ -16,11 +16,12 @@
// static functions.
class DownloadManagerBridge {
public:
+ DownloadManagerBridge(const DownloadManagerBridge&) = delete;
+ DownloadManagerBridge& operator=(const DownloadManagerBridge&) = delete;
+
static void AddCompletedDownload(DownloadItem* download,
AddCompletedDownloadCallback callback);
static void RemoveCompletedDownload(DownloadItem* download);
-
- DISALLOW_COPY_AND_ASSIGN(DownloadManagerBridge);
};
#endif // CHROME_BROWSER_DOWNLOAD_ANDROID_DOWNLOAD_MANAGER_BRIDGE_H_
diff --git a/chrome/browser/download/android/download_manager_service_unittest.cc b/chrome/browser/download/android/download_manager_service_unittest.cc
index 6dcb521..1df0ac8 100644
--- a/chrome/browser/download/android/download_manager_service_unittest.cc
+++ b/chrome/browser/download/android/download_manager_service_unittest.cc
@@ -40,6 +40,10 @@
service_->UpdateCoordinator(&coordinator_, profile_.GetProfileKey());
}
+ DownloadManagerServiceTest(const DownloadManagerServiceTest&) = delete;
+ DownloadManagerServiceTest& operator=(const DownloadManagerServiceTest&) =
+ delete;
+
void OnResumptionDone(bool success) {
success_ = success;
run_loop_.Quit();
@@ -83,8 +87,6 @@
TestingProfile profile_;
bool success_;
base::RunLoop run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadManagerServiceTest);
};
// Test that resumption succeeds if the download item is found and can be
diff --git a/chrome/browser/download/android/download_startup_utils.h b/chrome/browser/download/android/download_startup_utils.h
index 9bfd68a2..bbc11cf 100644
--- a/chrome/browser/download/android/download_startup_utils.h
+++ b/chrome/browser/download/android/download_startup_utils.h
@@ -12,13 +12,14 @@
// Native side of DownloadStartupUtils.java.
class DownloadStartupUtils {
public:
+ DownloadStartupUtils() = delete;
+ DownloadStartupUtils(const DownloadStartupUtils&) = delete;
+ DownloadStartupUtils& operator=(const DownloadStartupUtils&) = delete;
+
// Ensures that the download system is initialized for the targeted profile.
// If |profile_key| is null, reduced mode will be assumed. The returned value
// is the ProfileKey that was used.
static ProfileKey* EnsureDownloadSystemInitialized(ProfileKey* profile_key);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(DownloadStartupUtils);
};
#endif // CHROME_BROWSER_DOWNLOAD_ANDROID_DOWNLOAD_STARTUP_UTILS_H_
diff --git a/chrome/browser/download/background_download_service_factory.h b/chrome/browser/download/background_download_service_factory.h
index afc1c674..b0be4695 100644
--- a/chrome/browser/download/background_download_service_factory.h
+++ b/chrome/browser/download/background_download_service_factory.h
@@ -31,6 +31,11 @@
// Returns the DownloadService associated with |key|.
static download::BackgroundDownloadService* GetForKey(SimpleFactoryKey* key);
+ BackgroundDownloadServiceFactory(const BackgroundDownloadServiceFactory&) =
+ delete;
+ BackgroundDownloadServiceFactory& operator=(
+ const BackgroundDownloadServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<BackgroundDownloadServiceFactory>;
@@ -41,8 +46,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundDownloadServiceFactory);
};
#endif // CHROME_BROWSER_DOWNLOAD_BACKGROUND_DOWNLOAD_SERVICE_FACTORY_H_
diff --git a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
index 48b8036..9e107c0 100644
--- a/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate_unittest.cc
@@ -1711,6 +1711,9 @@
public:
TestDownloadDialogBridge() = default;
+ TestDownloadDialogBridge(const TestDownloadDialogBridge&) = delete;
+ TestDownloadDialogBridge& operator=(const TestDownloadDialogBridge&) = delete;
+
// DownloadDialogBridge implementation.
void ShowDialog(gfx::NativeWindow native_window,
int64_t total_bytes,
@@ -1747,8 +1750,6 @@
DownloadLocationDialogType dialog_type_;
DownloadTargetDeterminerDelegate::ConfirmationCallback
dialog_complete_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDownloadDialogBridge);
};
} // namespace
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 9d57b4c..cdc3082 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -256,6 +256,10 @@
public:
OnCanDownloadDecidedObserver() = default;
+ OnCanDownloadDecidedObserver(const OnCanDownloadDecidedObserver&) = delete;
+ OnCanDownloadDecidedObserver& operator=(const OnCanDownloadDecidedObserver&) =
+ delete;
+
void WaitForNumberOfDecisions(size_t expected_num_of_decisions) {
if (expected_num_of_decisions <= decisions_.size())
return;
@@ -286,8 +290,6 @@
std::vector<bool> decisions_;
size_t expected_num_of_decisions_ = 0;
base::OnceClosure completion_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(OnCanDownloadDecidedObserver);
};
class PercentWaiter : public download::DownloadItem::Observer {
@@ -392,6 +394,10 @@
explicit DownloadsHistoryDataCollector(Profile* profile)
: profile_(profile) {}
+ DownloadsHistoryDataCollector(const DownloadsHistoryDataCollector&) = delete;
+ DownloadsHistoryDataCollector& operator=(
+ const DownloadsHistoryDataCollector&) = delete;
+
std::vector<history::DownloadRow> WaitForDownloadInfo() {
std::vector<history::DownloadRow> results;
HistoryServiceFactory::GetForProfile(profile_,
@@ -408,8 +414,6 @@
private:
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadsHistoryDataCollector);
};
static DownloadManager* DownloadManagerForBrowser(Browser* browser) {
@@ -1340,6 +1344,9 @@
public:
FakeSafeBrowsingService() : TestSafeBrowsingService() {}
+ FakeSafeBrowsingService(const FakeSafeBrowsingService&) = delete;
+ FakeSafeBrowsingService& operator=(const FakeSafeBrowsingService&) = delete;
+
protected:
~FakeSafeBrowsingService() override {}
@@ -1349,9 +1356,6 @@
override {
return new FakeDownloadProtectionService();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingService);
};
// Factory that creates FakeSafeBrowsingService instances.
@@ -1400,6 +1404,9 @@
public:
DownloadWakeLockTest() = default;
+ DownloadWakeLockTest(const DownloadWakeLockTest&) = delete;
+ DownloadWakeLockTest& operator=(const DownloadWakeLockTest&) = delete;
+
void Initialize() {
content::GetDeviceService().BindWakeLockProvider(
wake_lock_provider_.BindNewPipeAndPassReceiver());
@@ -1423,7 +1430,6 @@
protected:
mojo::Remote<device::mojom::WakeLockProvider> wake_lock_provider_;
- DISALLOW_COPY_AND_ASSIGN(DownloadWakeLockTest);
};
} // namespace
diff --git a/chrome/browser/download/download_commands.cc b/chrome/browser/download/download_commands.cc
index b00529f2..15944aac 100644
--- a/chrome/browser/download/download_commands.cc
+++ b/chrome/browser/download/download_commands.cc
@@ -47,6 +47,11 @@
class ImageClipboardCopyManager : public ImageDecoder::ImageRequest {
public:
+ ImageClipboardCopyManager() = delete;
+ ImageClipboardCopyManager(const ImageClipboardCopyManager&) = delete;
+ ImageClipboardCopyManager& operator=(const ImageClipboardCopyManager&) =
+ delete;
+
static void Start(const base::FilePath& file_path,
base::SequencedTaskRunner* task_runner) {
new ImageClipboardCopyManager(file_path, task_runner);
@@ -115,8 +120,6 @@
}
const base::FilePath file_path_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ImageClipboardCopyManager);
};
} // namespace
diff --git a/chrome/browser/download/download_danger_prompt_browsertest.cc b/chrome/browser/download/download_danger_prompt_browsertest.cc
index c32902a1..623fa5f 100644
--- a/chrome/browser/download/download_danger_prompt_browsertest.cc
+++ b/chrome/browser/download/download_danger_prompt_browsertest.cc
@@ -296,6 +296,11 @@
enum InvocationType { USER_INITIATED, FROM_DOWNLOAD_API };
DownloadDangerPromptBrowserTest() : download_url_(kTestDownloadUrl) {}
+ DownloadDangerPromptBrowserTest(const DownloadDangerPromptBrowserTest&) =
+ delete;
+ DownloadDangerPromptBrowserTest& operator=(
+ const DownloadDangerPromptBrowserTest&) = delete;
+
void RunTest(download::DownloadDangerType danger_type,
InvocationType invocation_type) {
danger_type_ = danger_type;
@@ -330,8 +335,6 @@
download::DownloadDangerType danger_type_;
InvocationType invocation_type_;
download::MockDownloadItem download_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadDangerPromptBrowserTest);
};
IN_PROC_BROWSER_TEST_F(DownloadDangerPromptBrowserTest,
diff --git a/chrome/browser/download/download_file_picker.h b/chrome/browser/download/download_file_picker.h
index 428e553..a2870d4 100644
--- a/chrome/browser/download/download_file_picker.h
+++ b/chrome/browser/download/download_file_picker.h
@@ -31,6 +31,9 @@
base::OnceCallback<void(DownloadConfirmationResult,
const base::FilePath& virtual_path)>;
+ DownloadFilePicker(const DownloadFilePicker&) = delete;
+ DownloadFilePicker& operator=(const DownloadFilePicker&) = delete;
+
// Display a file picker dialog for |item|. The |suggested_path| will be used
// as the initial path displayed to the user. |callback| will always be
// invoked even if |item| is destroyed prior to the file picker completing.
@@ -62,8 +65,6 @@
// For managing select file dialogs.
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadFilePicker);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_FILE_PICKER_H_
diff --git a/chrome/browser/download/download_frame_policy_browsertest.cc b/chrome/browser/download/download_frame_policy_browsertest.cc
index 36a8202..d38bc88f 100644
--- a/chrome/browser/download/download_frame_policy_browsertest.cc
+++ b/chrome/browser/download/download_frame_policy_browsertest.cc
@@ -103,6 +103,11 @@
tab_strip_model->AddObserver(this);
}
+ PopupPageLoadMetricsWaiterInitializer(
+ const PopupPageLoadMetricsWaiterInitializer&) = delete;
+ PopupPageLoadMetricsWaiterInitializer& operator=(
+ const PopupPageLoadMetricsWaiterInitializer&) = delete;
+
void OnTabStripModelChanged(
TabStripModel* tab_strip_model,
const TabStripModelChange& change,
@@ -117,8 +122,6 @@
private:
std::unique_ptr<page_load_metrics::PageLoadMetricsTestWaiter>* waiter_;
-
- DISALLOW_COPY_AND_ASSIGN(PopupPageLoadMetricsWaiterInitializer);
};
} // namespace
diff --git a/chrome/browser/download/download_manager_utils.h b/chrome/browser/download/download_manager_utils.h
index 7d23ad32..234e2a2 100644
--- a/chrome/browser/download/download_manager_utils.h
+++ b/chrome/browser/download/download_manager_utils.h
@@ -17,6 +17,9 @@
class DownloadManagerUtils {
public:
+ DownloadManagerUtils(const DownloadManagerUtils&) = delete;
+ DownloadManagerUtils& operator=(const DownloadManagerUtils&) = delete;
+
// Creates an InProgressDownloadManager from a profile.
static download::InProgressDownloadManager* RetrieveInProgressDownloadManager(
Profile* profile);
@@ -36,9 +39,6 @@
static void SetRetrieveInProgressDownloadManagerCallbackForTesting(
base::RepeatingCallback<void(download::InProgressDownloadManager*)>
callback);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DownloadManagerUtils);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_UTILS_H_
diff --git a/chrome/browser/download/download_offline_content_provider_factory.h b/chrome/browser/download/download_offline_content_provider_factory.h
index 055523c..af55629 100644
--- a/chrome/browser/download/download_offline_content_provider_factory.h
+++ b/chrome/browser/download/download_offline_content_provider_factory.h
@@ -29,6 +29,11 @@
// and associates one if it doesn't exist.
static DownloadOfflineContentProvider* GetForKey(SimpleFactoryKey* key);
+ DownloadOfflineContentProviderFactory(
+ const DownloadOfflineContentProviderFactory&) = delete;
+ DownloadOfflineContentProviderFactory& operator=(
+ const DownloadOfflineContentProviderFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
DownloadOfflineContentProviderFactory>;
@@ -40,8 +45,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadOfflineContentProviderFactory);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_OFFLINE_CONTENT_PROVIDER_FACTORY_H_
diff --git a/chrome/browser/download/download_open_prompt.h b/chrome/browser/download/download_open_prompt.h
index 5f82496..a2e14183 100644
--- a/chrome/browser/download/download_open_prompt.h
+++ b/chrome/browser/download/download_open_prompt.h
@@ -29,6 +29,9 @@
const base::FilePath& file_path,
OpenCallback open_callback);
+ DownloadOpenPrompt(const DownloadOpenPrompt&) = delete;
+ DownloadOpenPrompt& operator=(const DownloadOpenPrompt&) = delete;
+
// Called to accept the confirmation dialog for testing.
static void AcceptConfirmationDialogForTesting(
DownloadOpenPrompt* download_danger_prompt);
@@ -36,8 +39,6 @@
protected:
DownloadOpenPrompt();
~DownloadOpenPrompt();
-
- DISALLOW_COPY_AND_ASSIGN(DownloadOpenPrompt);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_OPEN_PROMPT_H_
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index 8f2e944..5f5f6cc2 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -100,6 +100,9 @@
class DefaultDownloadDirectory {
public:
+ DefaultDownloadDirectory(const DefaultDownloadDirectory&) = delete;
+ DefaultDownloadDirectory& operator=(const DefaultDownloadDirectory&) = delete;
+
const base::FilePath& path() const { return path_; }
void Initialize() {
@@ -121,8 +124,6 @@
DefaultDownloadDirectory() { Initialize(); }
base::FilePath path_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultDownloadDirectory);
};
DefaultDownloadDirectory& GetDefaultDownloadDirectorySingleton() {
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 3ed75f5..31a9591 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -229,6 +229,9 @@
DownloadRequestLimiter();
+ DownloadRequestLimiter(const DownloadRequestLimiter&) = delete;
+ DownloadRequestLimiter& operator=(const DownloadRequestLimiter&) = delete;
+
// Returns the download status for a page. This does not change the state in
// anyway.
DownloadStatus GetDownloadStatus(content::WebContents* web_contents);
@@ -331,8 +334,6 @@
// Weak ptr factory used when |CanDownload| asks the delegate asynchronously
// about the download.
base::WeakPtrFactory<DownloadRequestLimiter> factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_REQUEST_LIMITER_H_
diff --git a/chrome/browser/download/download_started_animation.h b/chrome/browser/download/download_started_animation.h
index fe31baf..045a754 100644
--- a/chrome/browser/download/download_started_animation.h
+++ b/chrome/browser/download/download_started_animation.h
@@ -13,12 +13,13 @@
class DownloadStartedAnimation {
public:
+ DownloadStartedAnimation(const DownloadStartedAnimation&) = delete;
+ DownloadStartedAnimation& operator=(const DownloadStartedAnimation&) = delete;
+
static void Show(content::WebContents* web_contents);
private:
DownloadStartedAnimation() { }
-
- DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimation);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STARTED_ANIMATION_H_
diff --git a/chrome/browser/download/download_started_animation_browsertest.cc b/chrome/browser/download/download_started_animation_browsertest.cc
index d5b1ef3..b61d811 100644
--- a/chrome/browser/download/download_started_animation_browsertest.cc
+++ b/chrome/browser/download/download_started_animation_browsertest.cc
@@ -15,8 +15,9 @@
DownloadStartedAnimationTest() {
}
- private:
- DISALLOW_COPY_AND_ASSIGN(DownloadStartedAnimationTest);
+ DownloadStartedAnimationTest(const DownloadStartedAnimationTest&) = delete;
+ DownloadStartedAnimationTest& operator=(const DownloadStartedAnimationTest&) =
+ delete;
};
IN_PROC_BROWSER_TEST_F(DownloadStartedAnimationTest,
diff --git a/chrome/browser/download/download_status_updater.cc b/chrome/browser/download/download_status_updater.cc
index 35cb496..99e507d 100644
--- a/chrome/browser/download/download_status_updater.cc
+++ b/chrome/browser/download/download_status_updater.cc
@@ -41,9 +41,11 @@
item->SetUserData(kKey, base::WrapUnique(this));
}
+ WasInProgressData(const WasInProgressData&) = delete;
+ WasInProgressData& operator=(const WasInProgressData&) = delete;
+
private:
static const char kKey[];
- DISALLOW_COPY_AND_ASSIGN(WasInProgressData);
};
const char WasInProgressData::kKey[] =
diff --git a/chrome/browser/download/download_target_determiner.h b/chrome/browser/download/download_target_determiner.h
index 190922c..7086759 100644
--- a/chrome/browser/download/download_target_determiner.h
+++ b/chrome/browser/download/download_target_determiner.h
@@ -55,6 +55,9 @@
using CompletionCallback =
base::OnceCallback<void(std::unique_ptr<DownloadTargetInfo>)>;
+ DownloadTargetDeterminer(const DownloadTargetDeterminer&) = delete;
+ DownloadTargetDeterminer& operator=(const DownloadTargetDeterminer&) = delete;
+
// Start the process of determing the target of |download|.
//
// |initial_virtual_path| if non-empty, defines the initial virtual path for
@@ -365,8 +368,6 @@
absl::optional<download::DownloadSchedule> download_schedule_;
base::WeakPtrFactory<DownloadTargetDeterminer> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DownloadTargetDeterminer);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_DETERMINER_H_
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc
index 332e6f7..55b6de7 100644
--- a/chrome/browser/download/download_target_determiner_unittest.cc
+++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -293,6 +293,10 @@
public:
DownloadTargetDeterminerTest() = default;
+ DownloadTargetDeterminerTest(const DownloadTargetDeterminerTest&) = delete;
+ DownloadTargetDeterminerTest& operator=(const DownloadTargetDeterminerTest&) =
+ delete;
+
// ::testing::Test
void SetUp() override;
void TearDown() override;
@@ -361,8 +365,6 @@
NullWebContentsDelegate web_contents_delegate_;
base::FilePath test_virtual_dir_;
safe_browsing::FileTypePoliciesTestOverlay file_type_configuration_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadTargetDeterminerTest);
};
void DownloadTargetDeterminerTest::SetUp() {
diff --git a/chrome/browser/download/notification/download_notification_browsertest.cc b/chrome/browser/download/notification/download_notification_browsertest.cc
index 63b937f1..0cdb849 100644
--- a/chrome/browser/download/notification/download_notification_browsertest.cc
+++ b/chrome/browser/download/notification/download_notification_browsertest.cc
@@ -134,6 +134,9 @@
: params_(std::move(params)),
task_runner_(base::SequencedTaskRunnerHandle::Get()) {}
+ PendingRequest(const PendingRequest&) = delete;
+ PendingRequest& operator=(const PendingRequest&) = delete;
+
void Complete(net::Error error_code) {
task_runner_->PostTask(
FROM_HERE, base::BindOnce(&PendingRequest::CompleteOnOriginalSequence,
@@ -150,8 +153,6 @@
content::URLLoaderInterceptor::RequestParams params_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(PendingRequest);
};
// Can be called on the UI or IO thread depending on which factory we hooked.
diff --git a/chrome/browser/download/offline_item_model_manager_factory.h b/chrome/browser/download/offline_item_model_manager_factory.h
index 9bddef1..8a845b5 100644
--- a/chrome/browser/download/offline_item_model_manager_factory.h
+++ b/chrome/browser/download/offline_item_model_manager_factory.h
@@ -33,6 +33,11 @@
static OfflineItemModelManager* GetForBrowserContext(
content::BrowserContext* context);
+ OfflineItemModelManagerFactory(const OfflineItemModelManagerFactory&) =
+ delete;
+ OfflineItemModelManagerFactory& operator=(
+ const OfflineItemModelManagerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<OfflineItemModelManagerFactory>;
@@ -44,8 +49,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(OfflineItemModelManagerFactory);
};
#endif // CHROME_BROWSER_DOWNLOAD_OFFLINE_ITEM_MODEL_MANAGER_FACTORY_H_
diff --git a/chrome/browser/download/offline_item_utils.h b/chrome/browser/download/offline_item_utils.h
index ad5c1f3..be61a1b22 100644
--- a/chrome/browser/download/offline_item_utils.h
+++ b/chrome/browser/download/offline_item_utils.h
@@ -20,6 +20,9 @@
using DownloadRenameResult = download::DownloadItem::DownloadRenameResult;
public:
+ OfflineItemUtils(const OfflineItemUtils&) = delete;
+ OfflineItemUtils& operator=(const OfflineItemUtils&) = delete;
+
static offline_items_collection::OfflineItem CreateOfflineItem(
const std::string& name_space,
download::DownloadItem* item);
@@ -56,9 +59,6 @@
static absl::optional<offline_items_collection::OfflineItemSchedule>
ToOfflineItemSchedule(
absl::optional<download::DownloadSchedule> download_schedule);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(OfflineItemUtils);
};
#endif // CHROME_BROWSER_DOWNLOAD_OFFLINE_ITEM_UTILS_H_
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 37c31af..f6d7197 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -294,6 +294,9 @@
public:
SavePageBrowserTest() {}
+ SavePageBrowserTest(const SavePageBrowserTest&) = delete;
+ SavePageBrowserTest& operator=(const SavePageBrowserTest&) = delete;
+
protected:
void SetUp() override {
ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
@@ -406,9 +409,6 @@
// Path to directory containing test data.
base::FilePath test_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SavePageBrowserTest);
};
IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SaveHTMLOnly) {
@@ -1011,6 +1011,11 @@
public:
SavePageSitePerProcessBrowserTest() {}
+ SavePageSitePerProcessBrowserTest(const SavePageSitePerProcessBrowserTest&) =
+ delete;
+ SavePageSitePerProcessBrowserTest& operator=(
+ const SavePageSitePerProcessBrowserTest&) = delete;
+
protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
SavePageBrowserTest::SetUpCommandLine(command_line);
@@ -1027,9 +1032,6 @@
host_resolver()->AddRule("no.such.host", "128.0.0.1");
host_resolver()->AddRule("*", "127.0.0.1");
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SavePageSitePerProcessBrowserTest);
};
// Test for crbug.com/526786.
diff --git a/chrome/browser/download/simple_download_manager_coordinator_factory.h b/chrome/browser/download/simple_download_manager_coordinator_factory.h
index 6bb06a3..72b0665 100644
--- a/chrome/browser/download/simple_download_manager_coordinator_factory.h
+++ b/chrome/browser/download/simple_download_manager_coordinator_factory.h
@@ -30,6 +30,11 @@
static download::SimpleDownloadManagerCoordinator* GetForKey(
SimpleFactoryKey* key);
+ SimpleDownloadManagerCoordinatorFactory(
+ const SimpleDownloadManagerCoordinatorFactory&) = delete;
+ SimpleDownloadManagerCoordinatorFactory& operator=(
+ const SimpleDownloadManagerCoordinatorFactory&) = delete;
+
private:
friend class base::NoDestructor<SimpleDownloadManagerCoordinatorFactory>;
@@ -40,8 +45,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleDownloadManagerCoordinatorFactory);
};
#endif // CHROME_BROWSER_DOWNLOAD_SIMPLE_DOWNLOAD_MANAGER_COORDINATOR_FACTORY_H_
diff --git a/chrome/browser/engagement/important_sites_util.h b/chrome/browser/engagement/important_sites_util.h
index a19b567..d73cb26 100644
--- a/chrome/browser/engagement/important_sites_util.h
+++ b/chrome/browser/engagement/important_sites_util.h
@@ -58,6 +58,10 @@
REASON_BOUNDARY
};
+ ImportantSitesUtil() = delete;
+ ImportantSitesUtil(const ImportantSitesUtil&) = delete;
+ ImportantSitesUtil& operator=(const ImportantSitesUtil&) = delete;
+
static std::string GetRegisterableDomainOrIP(const GURL& url);
static std::string GetRegisterableDomainOrIPFromHost(base::StringPiece host);
@@ -105,9 +109,6 @@
// testing.
static void MarkOriginAsImportantForTesting(Profile* profile,
const GURL& origin);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ImportantSitesUtil);
};
} // namespace site_engagement
diff --git a/chrome/browser/engagement/site_engagement_service_factory.h b/chrome/browser/engagement/site_engagement_service_factory.h
index a699263..1099c8cf 100644
--- a/chrome/browser/engagement/site_engagement_service_factory.h
+++ b/chrome/browser/engagement/site_engagement_service_factory.h
@@ -31,6 +31,10 @@
static SiteEngagementServiceFactory* GetInstance();
+ SiteEngagementServiceFactory(const SiteEngagementServiceFactory&) = delete;
+ SiteEngagementServiceFactory& operator=(const SiteEngagementServiceFactory&) =
+ delete;
+
// SiteEngagementService::ServiceProvider:
SiteEngagementService* GetSiteEngagementService(
content::BrowserContext* browser_context) override;
@@ -46,8 +50,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SiteEngagementServiceFactory);
};
} // namespace site_engagement
diff --git a/chrome/browser/engagement/site_engagement_service_unittest.cc b/chrome/browser/engagement/site_engagement_service_unittest.cc
index 96c0c1c..b40299b9 100644
--- a/chrome/browser/engagement/site_engagement_service_unittest.cc
+++ b/chrome/browser/engagement/site_engagement_service_unittest.cc
@@ -135,6 +135,9 @@
callback_called_(false),
run_loop_() {}
+ ObserverTester(const ObserverTester&) = delete;
+ ObserverTester& operator=(const ObserverTester&) = delete;
+
void OnEngagementEvent(content::WebContents* web_contents,
const GURL& url,
double score,
@@ -161,8 +164,6 @@
EngagementType type_;
bool callback_called_;
base::RunLoop run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(ObserverTester);
};
class SiteEngagementServiceTest : public ChromeRenderViewHostTestHarness {
diff --git a/chrome/browser/enterprise/connectors/file_system/access_token_fetcher_unittest.cc b/chrome/browser/enterprise/connectors/file_system/access_token_fetcher_unittest.cc
index 0787bae5..c449732 100644
--- a/chrome/browser/enterprise/connectors/file_system/access_token_fetcher_unittest.cc
+++ b/chrome/browser/enterprise/connectors/file_system/access_token_fetcher_unittest.cc
@@ -51,8 +51,9 @@
using AccessTokenFetcher::OnGetTokenFailure;
using AccessTokenFetcher::OnGetTokenSuccess;
- private:
- DISALLOW_COPY_AND_ASSIGN(AccessTokenFetcherForTest);
+ AccessTokenFetcherForTest(const AccessTokenFetcherForTest&) = delete;
+ AccessTokenFetcherForTest& operator=(const AccessTokenFetcherForTest&) =
+ delete;
};
class AccessTokenFetcherTest : public testing::Test {
diff --git a/chrome/browser/external_protocol/external_protocol_handler.h b/chrome/browser/external_protocol/external_protocol_handler.h
index 95b8ae7..65b710d 100644
--- a/chrome/browser/external_protocol/external_protocol_handler.h
+++ b/chrome/browser/external_protocol/external_protocol_handler.h
@@ -72,6 +72,9 @@
// UMA histogram metric names.
static const char kHandleStateMetric[];
+ ExternalProtocolHandler(const ExternalProtocolHandler&) = delete;
+ ExternalProtocolHandler& operator=(const ExternalProtocolHandler&) = delete;
+
// Called on the UI thread. Allows switching out the
// ExternalProtocolHandler::Delegate for testing code.
static void SetDelegateForTesting(Delegate* delegate);
@@ -163,9 +166,6 @@
// Clears the external protocol handling data.
static void ClearData(Profile* profile);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ExternalProtocolHandler);
};
#endif // CHROME_BROWSER_EXTERNAL_PROTOCOL_EXTERNAL_PROTOCOL_HANDLER_H_
diff --git a/chrome/browser/fast_shutdown_browsertest.cc b/chrome/browser/fast_shutdown_browsertest.cc
index c6970c1..640d624 100644
--- a/chrome/browser/fast_shutdown_browsertest.cc
+++ b/chrome/browser/fast_shutdown_browsertest.cc
@@ -26,6 +26,10 @@
using content::BrowserThread;
class FastShutdown : public InProcessBrowserTest {
+ public:
+ FastShutdown(const FastShutdown&) = delete;
+ FastShutdown& operator=(const FastShutdown&) = delete;
+
protected:
FastShutdown() {
}
@@ -33,9 +37,6 @@
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(embedder_support::kDisablePopupBlocking);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FastShutdown);
};
// This tests for a previous error where uninstalling an onbeforeunload handler
diff --git a/chrome/browser/favicon/content_favicon_driver_browsertest.cc b/chrome/browser/favicon/content_favicon_driver_browsertest.cc
index 3de1a40..1b139b58 100644
--- a/chrome/browser/favicon/content_favicon_driver_browsertest.cc
+++ b/chrome/browser/favicon/content_favicon_driver_browsertest.cc
@@ -75,6 +75,9 @@
base::BindRepeating(&TestURLLoaderInterceptor::InterceptURLRequest,
base::Unretained(this))) {}
+ TestURLLoaderInterceptor(const TestURLLoaderInterceptor&) = delete;
+ TestURLLoaderInterceptor& operator=(const TestURLLoaderInterceptor&) = delete;
+
bool was_loaded(const GURL& url) const {
return intercepted_urls_.find(url) != intercepted_urls_.end();
}
@@ -106,8 +109,6 @@
std::set<GURL> bypass_cache_urls_;
content::URLLoaderInterceptor interceptor_;
std::map<GURL, network::mojom::RequestDestination> destinations_;
-
- DISALLOW_COPY_AND_ASSIGN(TestURLLoaderInterceptor);
};
// Waits for the following the finish:
diff --git a/chrome/browser/favicon/favicon_service_factory.h b/chrome/browser/favicon/favicon_service_factory.h
index 4f44a1c..e5c4a4d 100644
--- a/chrome/browser/favicon/favicon_service_factory.h
+++ b/chrome/browser/favicon/favicon_service_factory.h
@@ -31,6 +31,9 @@
// Returns the FaviconServiceFactory singleton.
static FaviconServiceFactory* GetInstance();
+ FaviconServiceFactory(const FaviconServiceFactory&) = delete;
+ FaviconServiceFactory& operator=(const FaviconServiceFactory&) = delete;
+
// Returns the default factory used to build FaviconService. Can be registered
// with SetTestingFactory to use the FaviconService instance during testing.
static TestingFactory GetDefaultFactory();
@@ -45,8 +48,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(FaviconServiceFactory);
};
#endif // CHROME_BROWSER_FAVICON_FAVICON_SERVICE_FACTORY_H_
diff --git a/chrome/browser/favicon/history_ui_favicon_request_handler_factory.h b/chrome/browser/favicon/history_ui_favicon_request_handler_factory.h
index c9725d8..7d14168 100644
--- a/chrome/browser/favicon/history_ui_favicon_request_handler_factory.h
+++ b/chrome/browser/favicon/history_ui_favicon_request_handler_factory.h
@@ -28,6 +28,11 @@
static HistoryUiFaviconRequestHandlerFactory* GetInstance();
+ HistoryUiFaviconRequestHandlerFactory(
+ const HistoryUiFaviconRequestHandlerFactory&) = delete;
+ HistoryUiFaviconRequestHandlerFactory& operator=(
+ const HistoryUiFaviconRequestHandlerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
HistoryUiFaviconRequestHandlerFactory>;
@@ -41,8 +46,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(HistoryUiFaviconRequestHandlerFactory);
};
#endif // CHROME_BROWSER_FAVICON_HISTORY_UI_FAVICON_REQUEST_HANDLER_FACTORY_H_
diff --git a/chrome/browser/favicon/large_icon_service_factory.h b/chrome/browser/favicon/large_icon_service_factory.h
index b2583ce..7cc47b3 100644
--- a/chrome/browser/favicon/large_icon_service_factory.h
+++ b/chrome/browser/favicon/large_icon_service_factory.h
@@ -29,6 +29,9 @@
static LargeIconServiceFactory* GetInstance();
+ LargeIconServiceFactory(const LargeIconServiceFactory&) = delete;
+ LargeIconServiceFactory& operator=(const LargeIconServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<LargeIconServiceFactory>;
@@ -41,8 +44,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(LargeIconServiceFactory);
};
#endif // CHROME_BROWSER_FAVICON_LARGE_ICON_SERVICE_FACTORY_H_
diff --git a/chrome/browser/feature_engagement/tracker_factory.h b/chrome/browser/feature_engagement/tracker_factory.h
index 0cb8f0c..95aa864 100644
--- a/chrome/browser/feature_engagement/tracker_factory.h
+++ b/chrome/browser/feature_engagement/tracker_factory.h
@@ -31,6 +31,9 @@
static feature_engagement::Tracker* GetForBrowserContext(
content::BrowserContext* context);
+ TrackerFactory(const TrackerFactory&) = delete;
+ TrackerFactory& operator=(const TrackerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TrackerFactory>;
@@ -42,8 +45,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(TrackerFactory);
};
} // namespace feature_engagement
diff --git a/chrome/browser/federated_learning/floc_remote_permission_service.h b/chrome/browser/federated_learning/floc_remote_permission_service.h
index 422c9cee..5c6451d 100644
--- a/chrome/browser/federated_learning/floc_remote_permission_service.h
+++ b/chrome/browser/federated_learning/floc_remote_permission_service.h
@@ -58,6 +58,11 @@
FlocRemotePermissionService(
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);
+
+ FlocRemotePermissionService(const FlocRemotePermissionService&) = delete;
+ FlocRemotePermissionService& operator=(const FlocRemotePermissionService&) =
+ delete;
+
~FlocRemotePermissionService() override;
// Queries floc related permission settings - specifically the bit swaa, nac,
@@ -99,8 +104,6 @@
pending_floc_permission_requests_;
base::WeakPtrFactory<FlocRemotePermissionService> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FlocRemotePermissionService);
};
} // namespace federated_learning
diff --git a/chrome/browser/federated_learning/floc_remote_permission_service_factory.h b/chrome/browser/federated_learning/floc_remote_permission_service_factory.h
index 23b43db65..c7363a4 100644
--- a/chrome/browser/federated_learning/floc_remote_permission_service_factory.h
+++ b/chrome/browser/federated_learning/floc_remote_permission_service_factory.h
@@ -26,6 +26,11 @@
static federated_learning::FlocRemotePermissionService* GetForProfile(
Profile* profile);
+ FlocRemotePermissionServiceFactory(
+ const FlocRemotePermissionServiceFactory&) = delete;
+ FlocRemotePermissionServiceFactory& operator=(
+ const FlocRemotePermissionServiceFactory&) = delete;
+
protected:
// Overridden from BrowserContextKeyedServiceFactory.
KeyedService* BuildServiceInstanceFor(
@@ -37,8 +42,6 @@
FlocRemotePermissionServiceFactory();
~FlocRemotePermissionServiceFactory() override;
-
- DISALLOW_COPY_AND_ASSIGN(FlocRemotePermissionServiceFactory);
};
#endif // CHROME_BROWSER_FEDERATED_LEARNING_FLOC_REMOTE_PERMISSION_SERVICE_FACTORY_H_
diff --git a/chrome/browser/feedback/android/process_id_feedback_source.h b/chrome/browser/feedback/android/process_id_feedback_source.h
index c727149..ba858e0 100644
--- a/chrome/browser/feedback/android/process_id_feedback_source.h
+++ b/chrome/browser/feedback/android/process_id_feedback_source.h
@@ -23,6 +23,10 @@
public:
ProcessIdFeedbackSource(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
+
+ ProcessIdFeedbackSource(const ProcessIdFeedbackSource&) = delete;
+ ProcessIdFeedbackSource& operator=(const ProcessIdFeedbackSource&) = delete;
+
base::android::ScopedJavaLocalRef<jlongArray> GetProcessIdsForType(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
@@ -35,8 +39,6 @@
std::map<int, std::vector<base::ProcessHandle>> process_ids_;
JavaObjectWeakGlobalRef java_ref_;
-
- DISALLOW_COPY_AND_ASSIGN(ProcessIdFeedbackSource);
};
} // namespace android
diff --git a/chrome/browser/feedback/feedback_uploader_factory_chrome.h b/chrome/browser/feedback/feedback_uploader_factory_chrome.h
index 8d1bfd5..a658612 100644
--- a/chrome/browser/feedback/feedback_uploader_factory_chrome.h
+++ b/chrome/browser/feedback/feedback_uploader_factory_chrome.h
@@ -22,6 +22,10 @@
static FeedbackUploaderChrome* GetForBrowserContext(
content::BrowserContext* context);
+ FeedbackUploaderFactoryChrome(const FeedbackUploaderFactoryChrome&) = delete;
+ FeedbackUploaderFactoryChrome& operator=(
+ const FeedbackUploaderFactoryChrome&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<FeedbackUploaderFactoryChrome>;
@@ -35,8 +39,6 @@
bool ServiceIsNULLWhileTesting() const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(FeedbackUploaderFactoryChrome);
};
} // namespace feedback
diff --git a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc
index 086c1e1..b6efd8e 100644
--- a/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc
+++ b/chrome/browser/feedback/system_logs/log_sources/memory_details_log_source.cc
@@ -17,6 +17,9 @@
explicit SystemLogsMemoryHandler(SysLogsSourceCallback callback)
: callback_(std::move(callback)) {}
+ SystemLogsMemoryHandler(const SystemLogsMemoryHandler&) = delete;
+ SystemLogsMemoryHandler& operator=(const SystemLogsMemoryHandler&) = delete;
+
// Sends the data to the callback.
// MemoryDetails override.
void OnDetailsAvailable() override {
@@ -33,8 +36,6 @@
private:
~SystemLogsMemoryHandler() override {}
SysLogsSourceCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemLogsMemoryHandler);
};
MemoryDetailsLogSource::MemoryDetailsLogSource()
diff --git a/chrome/browser/file_select_helper.h b/chrome/browser/file_select_helper.h
index 5fa96d8f..84aae731 100644
--- a/chrome/browser/file_select_helper.h
+++ b/chrome/browser/file_select_helper.h
@@ -53,6 +53,9 @@
public content::RenderWidgetHostObserver,
private net::DirectoryLister::DirectoryListerDelegate {
public:
+ FileSelectHelper(const FileSelectHelper&) = delete;
+ FileSelectHelper& operator=(const FileSelectHelper&) = delete;
+
// Show the file chooser dialog.
static void RunFileChooser(
content::RenderFrameHost* render_frame_host,
@@ -311,8 +314,6 @@
// Set to false in unit tests since there is no WebContents.
bool abort_on_missing_web_contents_in_tests_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(FileSelectHelper);
};
#endif // CHROME_BROWSER_FILE_SELECT_HELPER_H_
diff --git a/chrome/browser/file_select_helper_contacts_android.h b/chrome/browser/file_select_helper_contacts_android.h
index 6a9d296..ae8c2bb 100644
--- a/chrome/browser/file_select_helper_contacts_android.h
+++ b/chrome/browser/file_select_helper_contacts_android.h
@@ -9,6 +9,11 @@
class FileSelectHelperContactsAndroid : public FileSelectHelper {
public:
+ FileSelectHelperContactsAndroid(const FileSelectHelperContactsAndroid&) =
+ delete;
+ FileSelectHelperContactsAndroid& operator=(
+ const FileSelectHelperContactsAndroid&) = delete;
+
// A SelectFileDialog::Listener override. |file| and |index| are unused in
// this override, since the file contents are passed in as string to |params|.
void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file,
@@ -23,8 +28,6 @@
void ProcessContactsForAndroid(const std::string& contacts);
void ProcessContactsForAndroidOnUIThread(const base::FilePath& temp_file);
-
- DISALLOW_COPY_AND_ASSIGN(FileSelectHelperContactsAndroid);
};
#endif // CHROME_BROWSER_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_
diff --git a/chrome/browser/file_select_helper_unittest.cc b/chrome/browser/file_select_helper_unittest.cc
index 47773b3..736f48ce 100644
--- a/chrome/browser/file_select_helper_unittest.cc
+++ b/chrome/browser/file_select_helper_unittest.cc
@@ -79,6 +79,9 @@
public:
FileSelectHelperTest() {}
+ FileSelectHelperTest(const FileSelectHelperTest&) = delete;
+ FileSelectHelperTest& operator=(const FileSelectHelperTest&) = delete;
+
protected:
void SetUp() override {
ASSERT_TRUE(base::PathService::Get(chrome::DIR_TEST_DATA, &data_dir_));
@@ -88,9 +91,6 @@
// The path to input data used in tests.
base::FilePath data_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FileSelectHelperTest);
};
TEST_F(FileSelectHelperTest, IsAcceptTypeValid) {
diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc
index c3bcc78..1257e4af 100644
--- a/chrome/browser/first_run/first_run_browsertest.cc
+++ b/chrome/browser/first_run/first_run_browsertest.cc
@@ -71,6 +71,11 @@
public:
FirstRunMasterPrefsBrowserTestBase() {}
+ FirstRunMasterPrefsBrowserTestBase(
+ const FirstRunMasterPrefsBrowserTestBase&) = delete;
+ FirstRunMasterPrefsBrowserTestBase& operator=(
+ const FirstRunMasterPrefsBrowserTestBase&) = delete;
+
protected:
void SetUp() override {
// All users of this test class need to call SetInitialPreferencesForTest()
@@ -112,8 +117,6 @@
private:
base::FilePath prefs_file_;
std::unique_ptr<std::string> text_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsBrowserTestBase);
};
template<const char Text[]>
@@ -122,14 +125,16 @@
public:
FirstRunMasterPrefsBrowserTestT() {}
+ FirstRunMasterPrefsBrowserTestT(const FirstRunMasterPrefsBrowserTestT&) =
+ delete;
+ FirstRunMasterPrefsBrowserTestT& operator=(
+ const FirstRunMasterPrefsBrowserTestT&) = delete;
+
protected:
void SetUp() override {
SetInitialPreferencesForTest(Text);
FirstRunMasterPrefsBrowserTestBase::SetUp();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsBrowserTestT);
};
// Returns the true expected import state, derived from the original
@@ -239,6 +244,11 @@
public:
FirstRunMasterPrefsWithTrackedPreferences() {}
+ FirstRunMasterPrefsWithTrackedPreferences(
+ const FirstRunMasterPrefsWithTrackedPreferences&) = delete;
+ FirstRunMasterPrefsWithTrackedPreferences& operator=(
+ const FirstRunMasterPrefsWithTrackedPreferences&) = delete;
+
protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
FirstRunMasterPrefsBrowserTestT::SetUpCommandLine(command_line);
@@ -255,9 +265,6 @@
// order to be able to test all SettingsEnforcement groups.
chrome_prefs::DisableDomainCheckForTesting();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FirstRunMasterPrefsWithTrackedPreferences);
};
IN_PROC_BROWSER_TEST_P(FirstRunMasterPrefsWithTrackedPreferences,
diff --git a/chrome/browser/first_run/first_run_internal_posix_browsertest.cc b/chrome/browser/first_run/first_run_internal_posix_browsertest.cc
index dad5eb0..617a83a4 100644
--- a/chrome/browser/first_run/first_run_internal_posix_browsertest.cc
+++ b/chrome/browser/first_run/first_run_internal_posix_browsertest.cc
@@ -23,6 +23,10 @@
protected:
FirstRunInternalPosixTest() = default;
+ FirstRunInternalPosixTest(const FirstRunInternalPosixTest&) = delete;
+ FirstRunInternalPosixTest& operator=(const FirstRunInternalPosixTest&) =
+ delete;
+
// InProcessBrowserTest:
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kForceFirstRun);
@@ -95,8 +99,6 @@
}
bool inspected_state_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunInternalPosixTest);
};
// Test the first run flow for showing the modal dialog that surfaces the first
diff --git a/chrome/browser/first_run/first_run_unittest.cc b/chrome/browser/first_run/first_run_unittest.cc
index cf60f8a..d2d72a06 100644
--- a/chrome/browser/first_run/first_run_unittest.cc
+++ b/chrome/browser/first_run/first_run_unittest.cc
@@ -29,6 +29,10 @@
} // namespace
class FirstRunTest : public testing::Test {
+ public:
+ FirstRunTest(const FirstRunTest&) = delete;
+ FirstRunTest& operator=(const FirstRunTest&) = delete;
+
protected:
FirstRunTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
~FirstRunTest() override {}
@@ -40,8 +44,6 @@
private:
base::ScopedPathOverride user_data_dir_override_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstRunTest);
};
TEST_F(FirstRunTest, SetupInitialPrefsFromInstallPrefs_NoVariationsSeed) {
diff --git a/chrome/browser/font_pref_change_notifier.h b/chrome/browser/font_pref_change_notifier.h
index 60664305..7b7cad3 100644
--- a/chrome/browser/font_pref_change_notifier.h
+++ b/chrome/browser/font_pref_change_notifier.h
@@ -60,6 +60,10 @@
// The pref service must outlive this class.
explicit FontPrefChangeNotifier(PrefService* pref_service);
+
+ FontPrefChangeNotifier(const FontPrefChangeNotifier&) = delete;
+ FontPrefChangeNotifier& operator=(const FontPrefChangeNotifier&) = delete;
+
~FontPrefChangeNotifier() override;
private:
@@ -77,8 +81,6 @@
// Non-owning pointers to the Registrars that have registered themselves
// with us. We expect few registrars.
base::ObserverList<Registrar>::Unchecked registrars_;
-
- DISALLOW_COPY_AND_ASSIGN(FontPrefChangeNotifier);
};
#endif // CHROME_BROWSER_FONT_PREF_CHANGE_NOTIFIER_H_
diff --git a/chrome/browser/gcm/gcm_profile_service_factory.h b/chrome/browser/gcm/gcm_profile_service_factory.h
index 988b792..050db10 100644
--- a/chrome/browser/gcm/gcm_profile_service_factory.h
+++ b/chrome/browser/gcm/gcm_profile_service_factory.h
@@ -38,6 +38,9 @@
~ScopedTestingFactoryInstaller();
};
+ GCMProfileServiceFactory(const GCMProfileServiceFactory&) = delete;
+ GCMProfileServiceFactory& operator=(const GCMProfileServiceFactory&) = delete;
+
private:
friend base::NoDestructor<GCMProfileServiceFactory>;
@@ -49,8 +52,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(GCMProfileServiceFactory);
};
} // namespace gcm
diff --git a/chrome/browser/gcm/gcm_profile_service_unittest.cc b/chrome/browser/gcm/gcm_profile_service_unittest.cc
index cd120f2..25154a2 100644
--- a/chrome/browser/gcm/gcm_profile_service_unittest.cc
+++ b/chrome/browser/gcm/gcm_profile_service_unittest.cc
@@ -97,6 +97,10 @@
} // namespace
class GCMProfileServiceTest : public testing::Test {
+ public:
+ GCMProfileServiceTest(const GCMProfileServiceTest&) = delete;
+ GCMProfileServiceTest& operator=(const GCMProfileServiceTest&) = delete;
+
protected:
GCMProfileServiceTest();
~GCMProfileServiceTest() override;
@@ -142,8 +146,6 @@
GCMClient::Result unregistration_result_;
std::string send_message_id_;
GCMClient::Result send_result_;
-
- DISALLOW_COPY_AND_ASSIGN(GCMProfileServiceTest);
};
GCMProfileServiceTest::GCMProfileServiceTest()
diff --git a/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.h b/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.h
index 8b2dd73..27c366a 100644
--- a/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.h
+++ b/chrome/browser/gcm/instance_id/instance_id_profile_service_factory.h
@@ -22,6 +22,11 @@
content::BrowserContext* profile);
static InstanceIDProfileServiceFactory* GetInstance();
+ InstanceIDProfileServiceFactory(const InstanceIDProfileServiceFactory&) =
+ delete;
+ InstanceIDProfileServiceFactory& operator=(
+ const InstanceIDProfileServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<InstanceIDProfileServiceFactory>;
@@ -33,8 +38,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(InstanceIDProfileServiceFactory);
};
} // namespace instance_id
diff --git a/chrome/browser/google/google_update_settings_unittest.cc b/chrome/browser/google/google_update_settings_unittest.cc
index e1ba86f..61de6c0 100644
--- a/chrome/browser/google/google_update_settings_unittest.cc
+++ b/chrome/browser/google/google_update_settings_unittest.cc
@@ -16,14 +16,16 @@
#include "testing/platform_test.h"
class GoogleUpdateTest : public PlatformTest {
+ public:
+ GoogleUpdateTest(const GoogleUpdateTest&) = delete;
+ GoogleUpdateTest& operator=(const GoogleUpdateTest&) = delete;
+
protected:
GoogleUpdateTest() : user_data_dir_override_(chrome::DIR_USER_DATA) {}
~GoogleUpdateTest() override {}
private:
base::ScopedPathOverride user_data_dir_override_;
-
- DISALLOW_COPY_AND_ASSIGN(GoogleUpdateTest);
};
TEST_F(GoogleUpdateTest, StatsConsent) {
diff --git a/chrome/browser/google/google_update_win.cc b/chrome/browser/google/google_update_win.cc
index af94a0f..68b950c4 100644
--- a/chrome/browser/google/google_update_win.cc
+++ b/chrome/browser/google/google_update_win.cc
@@ -242,6 +242,9 @@
// Google Update on another.
class UpdateCheckDriver {
public:
+ UpdateCheckDriver(const UpdateCheckDriver&) = delete;
+ UpdateCheckDriver& operator=(const UpdateCheckDriver&) = delete;
+
// Runs an update check, invoking methods of |delegate| on the caller's thread
// to report progress and final results.
static void RunUpdateCheck(
@@ -391,8 +394,6 @@
GoogleUpdateUpgradeStatus status_;
UpdateState update_state_;
std::u16string html_error_message_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateCheckDriver);
};
UpdateCheckDriver* UpdateCheckDriver::driver_ = nullptr;
diff --git a/chrome/browser/google/google_update_win_unittest.cc b/chrome/browser/google/google_update_win_unittest.cc
index 4598014..ac067bf 100644
--- a/chrome/browser/google/google_update_win_unittest.cc
+++ b/chrome/browser/google/google_update_win_unittest.cc
@@ -62,6 +62,9 @@
public:
MockUpdateCheckDelegate() : weak_ptr_factory_(this) {}
+ MockUpdateCheckDelegate(const MockUpdateCheckDelegate&) = delete;
+ MockUpdateCheckDelegate& operator=(const MockUpdateCheckDelegate&) = delete;
+
base::WeakPtr<UpdateCheckDelegate> AsWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
@@ -76,8 +79,6 @@
private:
base::WeakPtrFactory<UpdateCheckDelegate> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(MockUpdateCheckDelegate);
};
// An interface that exposes a factory method for creating an IGoogleUpdate3Web
@@ -98,6 +99,9 @@
MockCurrentState() {}
+ MockCurrentState(const MockCurrentState&) = delete;
+ MockCurrentState& operator=(const MockCurrentState&) = delete;
+
// Adds an expectation for get_completionMessage that will return the given
// message any number of times.
void ExpectCompletionMessage(const std::u16string& completion_message) {
@@ -197,8 +201,6 @@
private:
std::u16string completion_message_;
std::u16string available_version_;
-
- DISALLOW_COPY_AND_ASSIGN(MockCurrentState);
};
// A mock IAppWeb that can run callers of get_currentState through a sequence of
@@ -215,6 +217,9 @@
.WillByDefault(::testing::Invoke(this, &MockApp::GetNextState));
}
+ MockApp(const MockApp&) = delete;
+ MockApp& operator=(const MockApp&) = delete;
+
// IAppWeb:
MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE,
get_appId,
@@ -340,8 +345,6 @@
// A gmock sequence under which a series of get_CurrentState expectations are
// evaluated.
Sequence state_sequence_;
-
- DISALLOW_COPY_AND_ASSIGN(MockApp);
};
// A mock IAppBundleWeb that can handle a single call to createInstalledApp
@@ -355,6 +358,9 @@
MockAppBundle() {}
+ MockAppBundle(const MockAppBundle&) = delete;
+ MockAppBundle& operator=(const MockAppBundle&) = delete;
+
// IAppBundleWeb:
MOCK_METHOD4_WITH_CALLTYPE(STDMETHODCALLTYPE,
createApp,
@@ -445,9 +451,6 @@
return mock_app;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockAppBundle);
};
// A mock IGoogleUpdate3Web that can handle a call to initialize and
@@ -461,6 +464,9 @@
MockGoogleUpdate() {}
+ MockGoogleUpdate(const MockGoogleUpdate&) = delete;
+ MockGoogleUpdate& operator=(const MockGoogleUpdate&) = delete;
+
// IGoogleUpdate3Web:
MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE,
createAppBundleWeb,
@@ -497,15 +503,16 @@
.WillOnce(DoAll(SetArgPointee<0>(mock_app_bundle), Return(S_OK)));
return mock_app_bundle;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockGoogleUpdate);
};
// A mock factory for creating an IGoogleUpdate3Web instance.
class MockGoogleUpdateFactory : public GoogleUpdateFactory {
public:
MockGoogleUpdateFactory() {}
+
+ MockGoogleUpdateFactory(const MockGoogleUpdateFactory&) = delete;
+ MockGoogleUpdateFactory& operator=(const MockGoogleUpdateFactory&) = delete;
+
MOCK_METHOD1(Create, HRESULT(Microsoft::WRL::ComPtr<IGoogleUpdate3Web>*));
// Returns a mock IGoogleUpdate3Web object that will be returned by the
@@ -524,8 +531,6 @@
private:
Sequence sequence_;
-
- DISALLOW_COPY_AND_ASSIGN(MockGoogleUpdateFactory);
};
} // namespace
@@ -536,6 +541,9 @@
// configure the set of states to be simulated.
class GoogleUpdateWinTest : public ::testing::TestWithParam<bool> {
public:
+ GoogleUpdateWinTest(const GoogleUpdateWinTest&) = delete;
+ GoogleUpdateWinTest& operator=(const GoogleUpdateWinTest&) = delete;
+
static void SetUpTestCase() {
ui::win::CreateATLModuleIfNeeded();
// Configure all mock functions that return HRESULT to return failure.
@@ -662,9 +670,6 @@
// The new version that the fixture will pretend is available.
std::u16string new_version_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GoogleUpdateWinTest);
};
// static
diff --git a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
index ce439e06..d2239dc 100644
--- a/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
+++ b/chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h
@@ -22,6 +22,11 @@
class ChromeWebViewGuestDelegate : public WebViewGuestDelegate {
public :
explicit ChromeWebViewGuestDelegate(WebViewGuest* web_view_guest);
+
+ ChromeWebViewGuestDelegate(const ChromeWebViewGuestDelegate&) = delete;
+ ChromeWebViewGuestDelegate& operator=(const ChromeWebViewGuestDelegate&) =
+ delete;
+
~ChromeWebViewGuestDelegate() override;
// WebViewGuestDelegate implementation.
@@ -52,8 +57,6 @@
// This is used to ensure pending tasks will not fire after this object is
// destroyed.
base::WeakPtrFactory<ChromeWebViewGuestDelegate> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChromeWebViewGuestDelegate);
};
} // namespace extensions
diff --git a/chrome/browser/heavy_ad_intervention/heavy_ad_service_factory.h b/chrome/browser/heavy_ad_intervention/heavy_ad_service_factory.h
index 71f67b87..5abaf4b 100644
--- a/chrome/browser/heavy_ad_intervention/heavy_ad_service_factory.h
+++ b/chrome/browser/heavy_ad_intervention/heavy_ad_service_factory.h
@@ -28,6 +28,9 @@
// Gets the LazyInstance that owns all HeavyAdServices.
static HeavyAdServiceFactory* GetInstance();
+ HeavyAdServiceFactory(const HeavyAdServiceFactory&) = delete;
+ HeavyAdServiceFactory& operator=(const HeavyAdServiceFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<HeavyAdServiceFactory>;
@@ -39,8 +42,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(HeavyAdServiceFactory);
};
#endif // CHROME_BROWSER_HEAVY_AD_INTERVENTION_HEAVY_AD_SERVICE_FACTORY_H_
diff --git a/chrome/browser/hid/hid_chooser_context_factory.h b/chrome/browser/hid/hid_chooser_context_factory.h
index 6d0f92e..ac87a62c 100644
--- a/chrome/browser/hid/hid_chooser_context_factory.h
+++ b/chrome/browser/hid/hid_chooser_context_factory.h
@@ -18,6 +18,9 @@
static HidChooserContext* GetForProfileIfExists(Profile* profile);
static HidChooserContextFactory* GetInstance();
+ HidChooserContextFactory(const HidChooserContextFactory&) = delete;
+ HidChooserContextFactory& operator=(const HidChooserContextFactory&) = delete;
+
private:
friend base::NoDestructor<HidChooserContextFactory>;
@@ -30,8 +33,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
void BrowserContextShutdown(content::BrowserContext* context) override;
-
- DISALLOW_COPY_AND_ASSIGN(HidChooserContextFactory);
};
#endif // CHROME_BROWSER_HID_HID_CHOOSER_CONTEXT_FACTORY_H_
diff --git a/chrome/browser/history/domain_diversity_reporter_factory.h b/chrome/browser/history/domain_diversity_reporter_factory.h
index cdaa6f95..8b6a454 100644
--- a/chrome/browser/history/domain_diversity_reporter_factory.h
+++ b/chrome/browser/history/domain_diversity_reporter_factory.h
@@ -27,6 +27,11 @@
static std::unique_ptr<KeyedService> BuildInstanceFor(
content::BrowserContext* profile);
+ DomainDiversityReporterFactory(const DomainDiversityReporterFactory&) =
+ delete;
+ DomainDiversityReporterFactory& operator=(
+ const DomainDiversityReporterFactory&) = delete;
+
private:
friend class base::NoDestructor<DomainDiversityReporterFactory>;
@@ -44,8 +49,6 @@
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(DomainDiversityReporterFactory);
};
#endif // CHROME_BROWSER_HISTORY_DOMAIN_DIVERSITY_REPORTER_FACTORY_H_
diff --git a/chrome/browser/history/history_tab_helper_unittest.cc b/chrome/browser/history/history_tab_helper_unittest.cc
index ec6ffde..ac0586bc 100644
--- a/chrome/browser/history/history_tab_helper_unittest.cc
+++ b/chrome/browser/history/history_tab_helper_unittest.cc
@@ -54,6 +54,9 @@
protected:
HistoryTabHelperTest() = default;
+ HistoryTabHelperTest(const HistoryTabHelperTest&) = delete;
+ HistoryTabHelperTest& operator=(const HistoryTabHelperTest&) = delete;
+
// ChromeRenderViewHostTestHarness:
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
@@ -133,8 +136,6 @@
#if defined(OS_ANDROID)
TestFeedApi test_feed_api_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(HistoryTabHelperTest);
};
TEST_F(HistoryTabHelperTest, ShouldUpdateTitleInHistory) {
diff --git a/chrome/browser/history/history_test_utils.cc b/chrome/browser/history/history_test_utils.cc
index 7d83f8e..8b9a6bf 100644
--- a/chrome/browser/history/history_test_utils.cc
+++ b/chrome/browser/history/history_test_utils.cc
@@ -27,6 +27,9 @@
public:
WaitForHistoryTask() {}
+ WaitForHistoryTask(const WaitForHistoryTask&) = delete;
+ WaitForHistoryTask& operator=(const WaitForHistoryTask&) = delete;
+
bool RunOnDBThread(history::HistoryBackend* backend,
history::HistoryDatabase* db) override {
return true;
@@ -38,8 +41,6 @@
private:
~WaitForHistoryTask() override {}
-
- DISALLOW_COPY_AND_ASSIGN(WaitForHistoryTask);
};
} // namespace
diff --git a/chrome/browser/history/profile_based_browsing_history_driver.h b/chrome/browser/history/profile_based_browsing_history_driver.h
index 99b7555..b0a3047 100644
--- a/chrome/browser/history/profile_based_browsing_history_driver.h
+++ b/chrome/browser/history/profile_based_browsing_history_driver.h
@@ -16,6 +16,11 @@
class ProfileBasedBrowsingHistoryDriver
: public history::BrowsingHistoryDriver {
public:
+ ProfileBasedBrowsingHistoryDriver(const ProfileBasedBrowsingHistoryDriver&) =
+ delete;
+ ProfileBasedBrowsingHistoryDriver& operator=(
+ const ProfileBasedBrowsingHistoryDriver&) = delete;
+
// BrowsingHistoryDriver implementation.
void OnRemoveVisits(
const std::vector<history::ExpireHistoryArgs>& expire_list) override;
@@ -31,9 +36,6 @@
protected:
ProfileBasedBrowsingHistoryDriver() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProfileBasedBrowsingHistoryDriver);
};
#endif // CHROME_BROWSER_HISTORY_PROFILE_BASED_BROWSING_HISTORY_DRIVER_H_
diff --git a/chrome/browser/history/top_sites_factory.h b/chrome/browser/history/top_sites_factory.h
index e4316b4..dba5bddd 100644
--- a/chrome/browser/history/top_sites_factory.h
+++ b/chrome/browser/history/top_sites_factory.h
@@ -40,6 +40,9 @@
content::BrowserContext* context,
const std::vector<history::PrepopulatedPage>& prepopulated_page_list);
+ TopSitesFactory(const TopSitesFactory&) = delete;
+ TopSitesFactory& operator=(const TopSitesFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TopSitesFactory>;
@@ -52,8 +55,6 @@
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(TopSitesFactory);
};
#endif // CHROME_BROWSER_HISTORY_TOP_SITES_FACTORY_H_
diff --git a/chrome/browser/history/web_history_service_factory.h b/chrome/browser/history/web_history_service_factory.h
index 88ae583d..172212b 100644
--- a/chrome/browser/history/web_history_service_factory.h
+++ b/chrome/browser/history/web_history_service_factory.h
@@ -24,6 +24,9 @@
// Get the WebHistoryService for |profile|, creating one if needed.
static history::WebHistoryService* GetForProfile(Profile* profile);
+ WebHistoryServiceFactory(const WebHistoryServiceFactory&) = delete;
+ WebHistoryServiceFactory& operator=(const WebHistoryServiceFactory&) = delete;
+
protected:
// Overridden from BrowserContextKeyedServiceFactory.
KeyedService* BuildServiceInstanceFor(
@@ -34,8 +37,6 @@
WebHistoryServiceFactory();
~WebHistoryServiceFactory() override;
-
- DISALLOW_COPY_AND_ASSIGN(WebHistoryServiceFactory);
};
#endif // CHROME_BROWSER_HISTORY_WEB_HISTORY_SERVICE_FACTORY_H_
diff --git a/chrome/browser/history_clusters/history_clusters_tab_helper_unittest.cc b/chrome/browser/history_clusters/history_clusters_tab_helper_unittest.cc
index 64c69f7..40bb8a83 100644
--- a/chrome/browser/history_clusters/history_clusters_tab_helper_unittest.cc
+++ b/chrome/browser/history_clusters/history_clusters_tab_helper_unittest.cc
@@ -48,6 +48,11 @@
};
class HistoryClustersTabHelperTest : public ChromeRenderViewHostTestHarness {
+ public:
+ HistoryClustersTabHelperTest(const HistoryClustersTabHelperTest&) = delete;
+ HistoryClustersTabHelperTest& operator=(const HistoryClustersTabHelperTest&) =
+ delete;
+
protected:
HistoryClustersTabHelperTest() = default;
@@ -115,8 +120,6 @@
// Used to verify the async callback is invoked.
base::RunLoop run_loop_;
base::RepeatingClosure run_loop_quit_;
-
- DISALLOW_COPY_AND_ASSIGN(HistoryClustersTabHelperTest);
};
// There are multiple events that occur with nondeterministic order:
diff --git a/chrome/browser/icon_loader.h b/chrome/browser/icon_loader.h
index ce6baa8f..806ac21b 100644
--- a/chrome/browser/icon_loader.h
+++ b/chrome/browser/icon_loader.h
@@ -50,6 +50,9 @@
float scale,
IconLoadedCallback callback);
+ IconLoader(const IconLoader&) = delete;
+ IconLoader& operator=(const IconLoader&) = delete;
+
// Starts the process of reading the icon. When the reading of the icon is
// complete, the IconLoadedCallback callback will be fulfilled, and the
// IconLoader will delete itself.
@@ -98,8 +101,6 @@
#endif // !defined(OS_ANDROID)
const float scale_;
IconLoadedCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(IconLoader);
};
#endif // CHROME_BROWSER_ICON_LOADER_H_
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index 2653589..83228b4 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -40,6 +40,9 @@
float scale,
gfx::Image default_icon);
+ IconLoaderHelper(const IconLoaderHelper&) = delete;
+ IconLoaderHelper& operator=(const IconLoaderHelper&) = delete;
+
private:
void StartReadIconRequest();
void OnConnectionError();
@@ -63,8 +66,6 @@
gfx::Image default_icon_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(IconLoaderHelper);
};
void IconLoaderHelper::ExecuteLoadIcon(
diff --git a/chrome/browser/image_decoder/image_decoder.h b/chrome/browser/image_decoder/image_decoder.h
index 56c52f0..d8542bfc 100644
--- a/chrome/browser/image_decoder/image_decoder.h
+++ b/chrome/browser/image_decoder/image_decoder.h
@@ -88,6 +88,9 @@
static ImageDecoder* GetInstance();
+ ImageDecoder(const ImageDecoder&) = delete;
+ ImageDecoder& operator=(const ImageDecoder&) = delete;
+
// Calls StartWithOptions() with ImageCodec::DEFAULT_CODEC and
// shrink_to_fit = false.
static void Start(ImageRequest* image_request,
@@ -143,8 +146,6 @@
// Protects |image_request_id_map_| and |image_request_id_counter_|.
base::Lock map_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};
#endif // CHROME_BROWSER_IMAGE_DECODER_IMAGE_DECODER_H_
diff --git a/chrome/browser/image_fetcher/image_fetcher_impl_browsertest.cc b/chrome/browser/image_fetcher/image_fetcher_impl_browsertest.cc
index 9391a584..4c38c26b 100644
--- a/chrome/browser/image_fetcher/image_fetcher_impl_browsertest.cc
+++ b/chrome/browser/image_fetcher/image_fetcher_impl_browsertest.cc
@@ -43,6 +43,10 @@
test_server_.ServeFilesFromSourceDirectory(GetChromeTestDataDir());
}
+ ImageFetcherImplBrowserTest(const ImageFetcherImplBrowserTest&) = delete;
+ ImageFetcherImplBrowserTest& operator=(const ImageFetcherImplBrowserTest&) =
+ delete;
+
void SetUpInProcessBrowserTestFixture() override {
ASSERT_TRUE(test_server_.Start());
}
@@ -100,9 +104,6 @@
int num_data_callback_null_called_;
net::EmbeddedTestServer test_server_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ImageFetcherImplBrowserTest);
};
IN_PROC_BROWSER_TEST_F(ImageFetcherImplBrowserTest, NormalFetch) {
diff --git a/chrome/browser/image_fetcher/image_fetcher_service_factory.h b/chrome/browser/image_fetcher/image_fetcher_service_factory.h
index 179af555..f048f5c 100644
--- a/chrome/browser/image_fetcher/image_fetcher_service_factory.h
+++ b/chrome/browser/image_fetcher/image_fetcher_service_factory.h
@@ -24,6 +24,10 @@
static image_fetcher::ImageFetcherService* GetForKey(SimpleFactoryKey* key);
static ImageFetcherServiceFactory* GetInstance();
+ ImageFetcherServiceFactory(const ImageFetcherServiceFactory&) = delete;
+ ImageFetcherServiceFactory& operator=(const ImageFetcherServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ImageFetcherServiceFactory>;
@@ -35,8 +39,6 @@
SimpleFactoryKey* key) const override;
SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ImageFetcherServiceFactory);
};
#endif // CHROME_BROWSER_IMAGE_FETCHER_IMAGE_FETCHER_SERVICE_FACTORY_H_
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h
index 27c85d4..e6c9ccb 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -48,6 +48,10 @@
uint16_t items,
InProcessImporterBridge* bridge);
+ ExternalProcessImporterClient(const ExternalProcessImporterClient&) = delete;
+ ExternalProcessImporterClient& operator=(
+ const ExternalProcessImporterClient&) = delete;
+
// Launches the task to start the external process.
void Start();
@@ -146,8 +150,6 @@
// Used to receive progress updates from the importer.
mojo::Receiver<chrome::mojom::ProfileImportObserver> receiver_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient);
};
#endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_CLIENT_H_
diff --git a/chrome/browser/importer/external_process_importer_host.h b/chrome/browser/importer/external_process_importer_host.h
index d6d2ad0..c3c717d 100644
--- a/chrome/browser/importer/external_process_importer_host.h
+++ b/chrome/browser/importer/external_process_importer_host.h
@@ -35,6 +35,10 @@
public:
ExternalProcessImporterHost();
+ ExternalProcessImporterHost(const ExternalProcessImporterHost&) = delete;
+ ExternalProcessImporterHost& operator=(const ExternalProcessImporterHost&) =
+ delete;
+
void Cancel();
// Starts the process of importing the settings and data depending on what the
@@ -158,8 +162,6 @@
// Vends weak pointers for the importer to call us back.
base::WeakPtrFactory<ExternalProcessImporterHost> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterHost);
};
#endif // CHROME_BROWSER_IMPORTER_EXTERNAL_PROCESS_IMPORTER_HOST_H_
diff --git a/chrome/browser/importer/in_process_importer_bridge.h b/chrome/browser/importer/in_process_importer_bridge.h
index 0e4514bc..3d3e8028 100644
--- a/chrome/browser/importer/in_process_importer_bridge.h
+++ b/chrome/browser/importer/in_process_importer_bridge.h
@@ -28,6 +28,9 @@
InProcessImporterBridge(ProfileWriter* writer,
base::WeakPtr<ExternalProcessImporterHost> host);
+ InProcessImporterBridge(const InProcessImporterBridge&) = delete;
+ InProcessImporterBridge& operator=(const InProcessImporterBridge&) = delete;
+
// Begin ImporterBridge implementation:
void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
const std::u16string& first_folder_name) override;
@@ -61,8 +64,6 @@
ProfileWriter* const writer_; // weak
const base::WeakPtr<ExternalProcessImporterHost> host_;
-
- DISALLOW_COPY_AND_ASSIGN(InProcessImporterBridge);
};
#endif // CHROME_BROWSER_IMPORTER_IN_PROCESS_IMPORTER_BRIDGE_H_
diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h
index 02024192..5914792 100644
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -33,6 +33,9 @@
public:
explicit ProfileWriter(Profile* profile);
+ ProfileWriter(const ProfileWriter&) = delete;
+ ProfileWriter& operator=(const ProfileWriter&) = delete;
+
// These functions return true if the corresponding model has been loaded.
// If the models haven't been loaded, the importer waits to run until they've
// completed.
@@ -92,8 +95,6 @@
private:
Profile* const profile_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileWriter);
};
#endif // CHROME_BROWSER_IMPORTER_PROFILE_WRITER_H_
diff --git a/chrome/browser/infobars/infobars_browsertest.cc b/chrome/browser/infobars/infobars_browsertest.cc
index f0bb4e6f..66f4878 100644
--- a/chrome/browser/infobars/infobars_browsertest.cc
+++ b/chrome/browser/infobars/infobars_browsertest.cc
@@ -158,13 +158,14 @@
public:
InfoBarUiTest() = default;
+ InfoBarUiTest(const InfoBarUiTest&) = delete;
+ InfoBarUiTest& operator=(const InfoBarUiTest&) = delete;
+
// TestInfoBar:
void ShowUi(const std::string& name) override;
private:
using IBD = infobars::InfoBarDelegate;
-
- DISALLOW_COPY_AND_ASSIGN(InfoBarUiTest);
};
void InfoBarUiTest::ShowUi(const std::string& name) {
diff --git a/chrome/browser/installable/installed_webapp_bridge.h b/chrome/browser/installable/installed_webapp_bridge.h
index dc17390..832dc99c 100644
--- a/chrome/browser/installable/installed_webapp_bridge.h
+++ b/chrome/browser/installable/installed_webapp_bridge.h
@@ -18,6 +18,10 @@
using PermissionResponseCallback =
base::OnceCallback<void(ContentSetting, bool)>;
+ InstalledWebappBridge() = delete;
+ InstalledWebappBridge(const InstalledWebappBridge&) = delete;
+ InstalledWebappBridge& operator=(const InstalledWebappBridge&) = delete;
+
static InstalledWebappProvider::RuleList GetInstalledWebappPermissions(
ContentSettingsType content_type);
@@ -25,9 +29,6 @@
static void DecidePermission(const GURL& origin_url,
PermissionResponseCallback callback);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(InstalledWebappBridge);
};
#endif // CHROME_BROWSER_INSTALLABLE_INSTALLED_WEBAPP_BRIDGE_H_
diff --git a/chrome/browser/internal_auth.cc b/chrome/browser/internal_auth.cc
index e41d88e0..3d57778 100644
--- a/chrome/browser/internal_auth.cc
+++ b/chrome/browser/internal_auth.cc
@@ -201,6 +201,11 @@
dark_tick_(0) {
}
+ InternalAuthVerificationService(const InternalAuthVerificationService&) =
+ delete;
+ InternalAuthVerificationService& operator=(
+ const InternalAuthVerificationService&) = delete;
+
bool VerifyPassport(
const std::string& passport,
const std::string& domain,
@@ -316,8 +321,6 @@
// Some ticks before |dark_tick_| were purged from |used_ticks_| container.
// That means that we must not trust any tick less than or equal to dark tick.
int64_t dark_tick_;
-
- DISALLOW_COPY_AND_ASSIGN(InternalAuthVerificationService);
};
namespace {
@@ -335,6 +338,10 @@
GenerateNewKey();
}
+ InternalAuthGenerationService(const InternalAuthGenerationService&) = delete;
+ InternalAuthGenerationService& operator=(
+ const InternalAuthGenerationService&) = delete;
+
void GenerateNewKey() {
DCHECK(CalledOnValidThread());
std::unique_ptr<crypto::HMAC> new_engine(
@@ -419,8 +426,6 @@
std::unique_ptr<crypto::HMAC> engine_;
int64_t key_regeneration_tick_;
base::circular_deque<int64_t> used_ticks_;
-
- DISALLOW_COPY_AND_ASSIGN(InternalAuthGenerationService);
};
namespace {
diff --git a/chrome/browser/internal_auth.h b/chrome/browser/internal_auth.h
index 23e2ee8e..cbcb5876 100644
--- a/chrome/browser/internal_auth.h
+++ b/chrome/browser/internal_auth.h
@@ -14,6 +14,10 @@
// Call InternalAuthVerification methods on any thread.
class InternalAuthVerification {
public:
+ InternalAuthVerification() = delete;
+ InternalAuthVerification(const InternalAuthVerification&) = delete;
+ InternalAuthVerification& operator=(const InternalAuthVerification&) = delete;
+
// Used by consumer of passport in order to verify credentials.
static bool VerifyPassport(
const std::string& passport,
@@ -40,8 +44,6 @@
static int get_verification_window_ticks();
static int verification_window_seconds_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(InternalAuthVerification);
};
// Not thread-safe. Make all calls on the same thread (UI thread).
diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory.h b/chrome/browser/invalidation/profile_invalidation_provider_factory.h
index 936f239..0982b68a 100644
--- a/chrome/browser/invalidation/profile_invalidation_provider_factory.h
+++ b/chrome/browser/invalidation/profile_invalidation_provider_factory.h
@@ -34,6 +34,11 @@
static ProfileInvalidationProviderFactory* GetInstance();
+ ProfileInvalidationProviderFactory(
+ const ProfileInvalidationProviderFactory&) = delete;
+ ProfileInvalidationProviderFactory& operator=(
+ const ProfileInvalidationProviderFactory&) = delete;
+
// Switches service creation to go through |testing_factory| for all browser
// contexts.
void RegisterTestingFactory(TestingFactory testing_factory);
@@ -54,8 +59,6 @@
user_prefs::PrefRegistrySyncable* registry) override;
TestingFactory testing_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProviderFactory);
};
} // namespace invalidation
diff --git a/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc b/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc
index 9164b620..b6a9012 100644
--- a/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc
+++ b/chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc
@@ -22,14 +22,17 @@
namespace invalidation {
class ProfileInvalidationProviderFactoryTestBase : public InProcessBrowserTest {
+ public:
+ ProfileInvalidationProviderFactoryTestBase(
+ const ProfileInvalidationProviderFactoryTestBase&) = delete;
+ ProfileInvalidationProviderFactoryTestBase& operator=(
+ const ProfileInvalidationProviderFactoryTestBase&) = delete;
+
protected:
ProfileInvalidationProviderFactoryTestBase();
~ProfileInvalidationProviderFactoryTestBase() override;
bool CanConstructProfileInvalidationProvider(Profile* profile);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProviderFactoryTestBase);
};
ProfileInvalidationProviderFactoryTestBase::
@@ -46,15 +49,17 @@
class ProfileInvalidationProviderFactoryLoginScreenBrowserTest
: public ProfileInvalidationProviderFactoryTestBase {
+ public:
+ ProfileInvalidationProviderFactoryLoginScreenBrowserTest(
+ const ProfileInvalidationProviderFactoryLoginScreenBrowserTest&) = delete;
+ ProfileInvalidationProviderFactoryLoginScreenBrowserTest& operator=(
+ const ProfileInvalidationProviderFactoryLoginScreenBrowserTest&) = delete;
+
protected:
ProfileInvalidationProviderFactoryLoginScreenBrowserTest();
~ProfileInvalidationProviderFactoryLoginScreenBrowserTest() override;
void SetUpCommandLine(base::CommandLine* command_line) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(
- ProfileInvalidationProviderFactoryLoginScreenBrowserTest);
};
ProfileInvalidationProviderFactoryLoginScreenBrowserTest::
@@ -80,14 +85,17 @@
class ProfileInvalidationProviderFactoryGuestBrowserTest
: public ProfileInvalidationProviderFactoryTestBase {
+ public:
+ ProfileInvalidationProviderFactoryGuestBrowserTest(
+ const ProfileInvalidationProviderFactoryGuestBrowserTest&) = delete;
+ ProfileInvalidationProviderFactoryGuestBrowserTest& operator=(
+ const ProfileInvalidationProviderFactoryGuestBrowserTest&) = delete;
+
protected:
ProfileInvalidationProviderFactoryGuestBrowserTest();
~ProfileInvalidationProviderFactoryGuestBrowserTest() override;
void SetUpCommandLine(base::CommandLine* command_line) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProfileInvalidationProviderFactoryGuestBrowserTest);
};
ProfileInvalidationProviderFactoryGuestBrowserTest::
diff --git a/chrome/browser/language/language_model_manager_factory.h b/chrome/browser/language/language_model_manager_factory.h
index d0c18632..f09084d 100644
--- a/chrome/browser/language/language_model_manager_factory.h
+++ b/chrome/browser/language/language_model_manager_factory.h
@@ -25,6 +25,10 @@
static language::LanguageModelManager* GetForBrowserContext(
content::BrowserContext* browser_context);
+ LanguageModelManagerFactory(const LanguageModelManagerFactory&) = delete;
+ LanguageModelManagerFactory& operator=(const LanguageModelManagerFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<LanguageModelManagerFactory>;
@@ -36,8 +40,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(LanguageModelManagerFactory);
};
#endif // CHROME_BROWSER_LANGUAGE_LANGUAGE_MODEL_MANAGER_FACTORY_H_
diff --git a/chrome/browser/language/url_language_histogram_factory.h b/chrome/browser/language/url_language_histogram_factory.h
index a9670c0..758e892 100644
--- a/chrome/browser/language/url_language_histogram_factory.h
+++ b/chrome/browser/language/url_language_histogram_factory.h
@@ -27,6 +27,10 @@
static language::UrlLanguageHistogram* GetForBrowserContext(
content::BrowserContext* browser_context);
+ UrlLanguageHistogramFactory(const UrlLanguageHistogramFactory&) = delete;
+ UrlLanguageHistogramFactory& operator=(const UrlLanguageHistogramFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<UrlLanguageHistogramFactory>;
@@ -38,8 +42,6 @@
content::BrowserContext* context) const override;
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
-
- DISALLOW_COPY_AND_ASSIGN(UrlLanguageHistogramFactory);
};
#endif // CHROME_BROWSER_LANGUAGE_URL_LANGUAGE_HISTOGRAM_FACTORY_H_
diff --git a/chrome/browser/lifetime/browser_close_manager.h b/chrome/browser/lifetime/browser_close_manager.h
index 93ab0fb..86848c2 100644
--- a/chrome/browser/lifetime/browser_close_manager.h
+++ b/chrome/browser/lifetime/browser_close_manager.h
@@ -17,6 +17,9 @@
public:
BrowserCloseManager();
+ BrowserCloseManager(const BrowserCloseManager&) = delete;
+ BrowserCloseManager& operator=(const BrowserCloseManager&) = delete;
+
// Starts closing all browser windows.
void StartClosingBrowsers();
@@ -57,8 +60,6 @@
// The browser for which we are waiting for a callback to
// OnBrowserReportCloseable.
Browser* current_browser_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowserCloseManager);
};
#endif // CHROME_BROWSER_LIFETIME_BROWSER_CLOSE_MANAGER_H_
diff --git a/chrome/browser/lifetime/browser_close_manager_browsertest.cc b/chrome/browser/lifetime/browser_close_manager_browsertest.cc
index 9675471..2c52a72 100644
--- a/chrome/browser/lifetime/browser_close_manager_browsertest.cc
+++ b/chrome/browser/lifetime/browser_close_manager_browsertest.cc
@@ -164,6 +164,9 @@
NO_USER_CHOICE
};
+ TestBrowserCloseManager(const TestBrowserCloseManager&) = delete;
+ TestBrowserCloseManager& operator=(const TestBrowserCloseManager&) = delete;
+
static void AttemptClose(UserChoice user_choice) {
scoped_refptr<BrowserCloseManager> browser_close_manager =
new TestBrowserCloseManager(user_choice);
@@ -196,8 +199,6 @@
: user_choice_(user_choice) {}
UserChoice user_choice_;
-
- DISALLOW_COPY_AND_ASSIGN(TestBrowserCloseManager);
};
class TestDownloadManagerDelegate : public ChromeDownloadManagerDelegate {
@@ -246,6 +247,10 @@
->GetProfileAttributesStorage()),
suspended_(false) {}
+ FakeBackgroundModeManager(const FakeBackgroundModeManager&) = delete;
+ FakeBackgroundModeManager& operator=(const FakeBackgroundModeManager&) =
+ delete;
+
void SuspendBackgroundMode() override {
BackgroundModeManager::SuspendBackgroundMode();
suspended_ = true;
@@ -262,8 +267,6 @@
private:
bool suspended_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBackgroundModeManager);
};
#endif // BUILDFLAG(ENABLE_BACKGROUND_MODE)
@@ -1156,6 +1159,11 @@
public:
BrowserCloseManagerWithBackgroundModeBrowserTest() {}
+ BrowserCloseManagerWithBackgroundModeBrowserTest(
+ const BrowserCloseManagerWithBackgroundModeBrowserTest&) = delete;
+ BrowserCloseManagerWithBackgroundModeBrowserTest& operator=(
+ const BrowserCloseManagerWithBackgroundModeBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
BrowserCloseManagerBrowserTest::SetUpOnMainThread();
g_browser_process->set_background_mode_manager_for_test(
@@ -1167,9 +1175,6 @@
g_browser_process->background_mode_manager())
->IsBackgroundModeSuspended();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BrowserCloseManagerWithBackgroundModeBrowserTest);
};
// Check that background mode is suspended when closing all browsers unless we
diff --git a/chrome/browser/lifetime/browser_shutdown_browsertest.cc b/chrome/browser/lifetime/browser_shutdown_browsertest.cc
index aa200b9..74a9b0cb 100644
--- a/chrome/browser/lifetime/browser_shutdown_browsertest.cc
+++ b/chrome/browser/lifetime/browser_shutdown_browsertest.cc
@@ -46,10 +46,11 @@
class BrowserClosingObserver : public BrowserListObserver {
public:
BrowserClosingObserver() {}
- MOCK_METHOD1(OnBrowserClosing, void(Browser* browser));
- private:
- DISALLOW_COPY_AND_ASSIGN(BrowserClosingObserver);
+ BrowserClosingObserver(const BrowserClosingObserver&) = delete;
+ BrowserClosingObserver& operator=(const BrowserClosingObserver&) = delete;
+
+ MOCK_METHOD1(OnBrowserClosing, void(Browser* browser));
};
// ChromeOS has the different shutdown flow on user initiated exit process.
diff --git a/chrome/browser/local_discovery/service_discovery_client_mac.h b/chrome/browser/local_discovery/service_discovery_client_mac.h
index 1fd8e4f..5c9e2fd 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mac.h
+++ b/chrome/browser/local_discovery/service_discovery_client_mac.h
@@ -32,6 +32,10 @@
public:
ServiceDiscoveryClientMac();
+ ServiceDiscoveryClientMac(const ServiceDiscoveryClientMac&) = delete;
+ ServiceDiscoveryClientMac& operator=(const ServiceDiscoveryClientMac&) =
+ delete;
+
private:
friend class ServiceDiscoveryClientMacTest;
@@ -52,8 +56,6 @@
void StartThreadIfNotStarted();
std::unique_ptr<base::Thread> service_discovery_thread_;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceDiscoveryClientMac);
};
class ServiceWatcherImplMac : public ServiceWatcher {
diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.cc b/chrome/browser/local_discovery/service_discovery_client_mdns.cc
index e8978f5..6d18c856 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mdns.cc
+++ b/chrome/browser/local_discovery/service_discovery_client_mdns.cc
@@ -127,6 +127,9 @@
explicit SocketFactory(const net::InterfaceIndexFamilyList& interfaces)
: interfaces_(interfaces) {}
+ SocketFactory(const SocketFactory&) = delete;
+ SocketFactory& operator=(const SocketFactory&) = delete;
+
// net::MDnsSocketFactory implementation:
void CreateSockets(std::vector<std::unique_ptr<net::DatagramServerSocket>>*
sockets) override {
@@ -142,8 +145,6 @@
private:
net::InterfaceIndexFamilyList interfaces_;
-
- DISALLOW_COPY_AND_ASSIGN(SocketFactory);
};
void InitMdns(MdnsInitCallback on_initialized,
@@ -207,6 +208,9 @@
GetWeakPtr(), std::move(callback))));
}
+ ServiceWatcherProxy(const ServiceWatcherProxy&) = delete;
+ ServiceWatcherProxy& operator=(const ServiceWatcherProxy&) = delete;
+
// ServiceWatcher methods.
void Start() override {
if (implementation()) {
@@ -249,8 +253,6 @@
}
std::string service_type_;
ServiceWatcher::UpdatedCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceWatcherProxy);
};
class ServiceResolverProxy : public ProxyBase<ServiceResolver> {
@@ -266,6 +268,9 @@
GetWeakPtr(), std::move(callback))));
}
+ ServiceResolverProxy(const ServiceResolverProxy&) = delete;
+ ServiceResolverProxy& operator=(const ServiceResolverProxy&) = delete;
+
// ServiceResolver methods.
void StartResolving() override {
if (implementation()) {
@@ -287,8 +292,6 @@
}
std::string service_name_;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceResolverProxy);
};
class LocalDomainResolverProxy : public ProxyBase<LocalDomainResolver> {
@@ -306,6 +309,9 @@
std::move(callback))));
}
+ LocalDomainResolverProxy(const LocalDomainResolverProxy&) = delete;
+ LocalDomainResolverProxy& operator=(const LocalDomainResolverProxy&) = delete;
+
// LocalDomainResolver methods.
void Start() override {
if (implementation()) {
@@ -325,8 +331,6 @@
base::BindOnce(&Base::RunCallback, proxy,
base::BindOnce(std::move(callback), a1, a2, a3)));
}
-
- DISALLOW_COPY_AND_ASSIGN(LocalDomainResolverProxy);
};
} // namespace
diff --git a/chrome/browser/local_discovery/service_discovery_client_mdns.h b/chrome/browser/local_discovery/service_discovery_client_mdns.h
index cdccf05..2e00dcec 100644
--- a/chrome/browser/local_discovery/service_discovery_client_mdns.h
+++ b/chrome/browser/local_discovery/service_discovery_client_mdns.h
@@ -27,6 +27,10 @@
ServiceDiscoveryClientMdns();
+ ServiceDiscoveryClientMdns(const ServiceDiscoveryClientMdns&) = delete;
+ ServiceDiscoveryClientMdns& operator=(const ServiceDiscoveryClientMdns&) =
+ delete;
+
// ServiceDiscoveryClient:
std::unique_ptr<ServiceWatcher> CreateServiceWatcher(
const std::string& service_type,
@@ -70,8 +74,6 @@
bool need_delay_mdns_tasks_ = true;
base::WeakPtrFactory<ServiceDiscoveryClientMdns> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ServiceDiscoveryClientMdns);
};
} // namespace local_discovery
diff --git a/chrome/browser/local_discovery/service_discovery_shared_client.h b/chrome/browser/local_discovery/service_discovery_shared_client.h
index 30e3615b..43cfd53 100644
--- a/chrome/browser/local_discovery/service_discovery_shared_client.h
+++ b/chrome/browser/local_discovery/service_discovery_shared_client.h
@@ -19,6 +19,10 @@
public:
static scoped_refptr<ServiceDiscoverySharedClient> GetInstance();
+ ServiceDiscoverySharedClient(const ServiceDiscoverySharedClient&) = delete;
+ ServiceDiscoverySharedClient& operator=(const ServiceDiscoverySharedClient&) =
+ delete;
+
protected:
ServiceDiscoverySharedClient();
~ServiceDiscoverySharedClient() override;
@@ -27,8 +31,6 @@
friend struct content::BrowserThread::DeleteOnThread<
content::BrowserThread::UI>;
friend class base::DeleteHelper<ServiceDiscoverySharedClient>;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceDiscoverySharedClient);
};
} // namespace local_discovery
diff --git a/chrome/browser/lookalikes/lookalike_url_service.cc b/chrome/browser/lookalikes/lookalike_url_service.cc
index 409cc748..bb8d1b2 100644
--- a/chrome/browser/lookalikes/lookalike_url_service.cc
+++ b/chrome/browser/lookalikes/lookalike_url_service.cc
@@ -47,6 +47,10 @@
return base::Singleton<LookalikeUrlServiceFactory>::get();
}
+ LookalikeUrlServiceFactory(const LookalikeUrlServiceFactory&) = delete;
+ LookalikeUrlServiceFactory& operator=(const LookalikeUrlServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<LookalikeUrlServiceFactory>;
@@ -70,8 +74,6 @@
content::BrowserContext* context) const override {
return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}
-
- DISALLOW_COPY_AND_ASSIGN(LookalikeUrlServiceFactory);
};
// static
diff --git a/chrome/browser/mac/install_from_dmg.mm b/chrome/browser/mac/install_from_dmg.mm
index f50a808..8d55925 100644
--- a/chrome/browser/mac/install_from_dmg.mm
+++ b/chrome/browser/mac/install_from_dmg.mm
@@ -573,13 +573,14 @@
can_log(true) {
}
+ SynchronousDACallbackData(const SynchronousDACallbackData&) = delete;
+ SynchronousDACallbackData& operator=(const SynchronousDACallbackData&) =
+ delete;
+
base::ScopedCFTypeRef<DADissenterRef> dissenter;
bool callback_called;
bool run_loop_running;
bool can_log;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SynchronousDACallbackData);
};
// The callback target for SynchronousDAOperation. Set the fields in
diff --git a/chrome/browser/media/android/cdm/per_device_provisioning_permission.cc b/chrome/browser/media/android/cdm/per_device_provisioning_permission.cc
index 2b7f5ce..e8d82d9a 100644
--- a/chrome/browser/media/android/cdm/per_device_provisioning_permission.cc
+++ b/chrome/browser/media/android/cdm/per_device_provisioning_permission.cc
@@ -90,6 +90,11 @@
origin_(origin),
callback_(std::move(callback)) {}
+ PerDeviceProvisioningPermissionRequest(
+ const PerDeviceProvisioningPermissionRequest&) = delete;
+ PerDeviceProvisioningPermissionRequest& operator=(
+ const PerDeviceProvisioningPermissionRequest&) = delete;
+
void PermissionDecided(ContentSetting result, bool is_one_time) {
DCHECK(!is_one_time);
const bool granted = result == ContentSetting::CONTENT_SETTING_ALLOW;
@@ -117,8 +122,6 @@
const url::Origin origin_;
base::OnceCallback<void(bool)> callback_;
-
- DISALLOW_COPY_AND_ASSIGN(PerDeviceProvisioningPermissionRequest);
};
} // namespace
diff --git a/chrome/browser/media/cast_mirroring_performance_browsertest.cc b/chrome/browser/media/cast_mirroring_performance_browsertest.cc
index 1a31496..c865853 100644
--- a/chrome/browser/media/cast_mirroring_performance_browsertest.cc
+++ b/chrome/browser/media/cast_mirroring_performance_browsertest.cc
@@ -418,6 +418,9 @@
configs.video)),
is_full_performance_run_(is_full_performance_run) {}
+ TestPatternReceiver(const TestPatternReceiver&) = delete;
+ TestPatternReceiver& operator=(const TestPatternReceiver&) = delete;
+
typedef std::map<uint16_t, base::TimeTicks> TimeMap;
// Build a map from frame ID (as encoded in the audio and video data)
@@ -567,8 +570,6 @@
// The height (number of lines) of each video frame received.
std::vector<int> video_frame_lines_;
-
- DISALLOW_COPY_AND_ASSIGN(TestPatternReceiver);
};
class TestCompleteObserver {
diff --git a/chrome/browser/media/cast_mirroring_service_host_browsertest.cc b/chrome/browser/media/cast_mirroring_service_host_browsertest.cc
index 69b2a24c..64db160 100644
--- a/chrome/browser/media/cast_mirroring_service_host_browsertest.cc
+++ b/chrome/browser/media/cast_mirroring_service_host_browsertest.cc
@@ -73,6 +73,10 @@
explicit MockVideoCaptureObserver(
mojo::PendingRemote<media::mojom::VideoCaptureHost> host)
: host_(std::move(host)) {}
+
+ MockVideoCaptureObserver(const MockVideoCaptureObserver&) = delete;
+ MockVideoCaptureObserver& operator=(const MockVideoCaptureObserver&) = delete;
+
MOCK_METHOD1(OnBufferCreatedCall, void(int buffer_id));
MOCK_METHOD1(OnBufferReadyCall, void(int buffer_id));
MOCK_METHOD1(OnBufferDestroyedCall, void(int buffer_id));
@@ -122,8 +126,6 @@
base::flat_map<int, media::mojom::VideoFrameInfoPtr> frame_infos_;
const base::UnguessableToken device_id_ = base::UnguessableToken::Create();
const base::UnguessableToken session_id_ = base::UnguessableToken::Create();
-
- DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureObserver);
};
} // namespace
diff --git a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
index dbc5e5f..81121e8f 100644
--- a/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_supported_types_browsertest.cc
@@ -434,6 +434,12 @@
// For ExternalClearKey tests, ensure that the ClearKey adapter is loaded.
class EncryptedMediaSupportedTypesExternalClearKeyTest
: public EncryptedMediaSupportedTypesTest {
+ public:
+ EncryptedMediaSupportedTypesExternalClearKeyTest(
+ const EncryptedMediaSupportedTypesExternalClearKeyTest&) = delete;
+ EncryptedMediaSupportedTypesExternalClearKeyTest& operator=(
+ const EncryptedMediaSupportedTypesExternalClearKeyTest&) = delete;
+
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
protected:
EncryptedMediaSupportedTypesExternalClearKeyTest() {
@@ -447,9 +453,6 @@
RegisterClearKeyCdm(command_line);
}
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupportedTypesExternalClearKeyTest);
};
// By default, the External Clear Key (ECK) key system is not supported even if
@@ -469,6 +472,12 @@
class EncryptedMediaSupportedTypesWidevineTest
: public EncryptedMediaSupportedTypesTest {
+ public:
+ EncryptedMediaSupportedTypesWidevineTest(
+ const EncryptedMediaSupportedTypesWidevineTest&) = delete;
+ EncryptedMediaSupportedTypesWidevineTest& operator=(
+ const EncryptedMediaSupportedTypesWidevineTest&) = delete;
+
protected:
EncryptedMediaSupportedTypesWidevineTest() = default;
@@ -481,13 +490,16 @@
command_line->AppendSwitchASCII(
switches::kUnsafelyAllowProtectedMediaIdentifierForDomain, "127.0.0.1");
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupportedTypesWidevineTest);
};
class EncryptedMediaSupportedTypesWidevineHwSecureTest
: public EncryptedMediaSupportedTypesWidevineTest {
+ public:
+ EncryptedMediaSupportedTypesWidevineHwSecureTest(
+ const EncryptedMediaSupportedTypesWidevineHwSecureTest&) = delete;
+ EncryptedMediaSupportedTypesWidevineHwSecureTest& operator=(
+ const EncryptedMediaSupportedTypesWidevineHwSecureTest&) = delete;
+
protected:
EncryptedMediaSupportedTypesWidevineHwSecureTest() {
enabled_features_.push_back(media::kHardwareSecureDecryption);
@@ -501,15 +513,20 @@
command_line->AppendSwitchASCII(
switches::kOverrideHardwareSecureCodecsForTesting, "vp8,vp9,vorbis");
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EncryptedMediaSupportedTypesWidevineHwSecureTest);
};
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
// Registers ClearKey CDM with the wrong path (filename).
class EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest
: public EncryptedMediaSupportedTypesTest {
+ public:
+ EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest(
+ const EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest&) =
+ delete;
+ EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest& operator=(
+ const EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest&) =
+ delete;
+
protected:
EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest() {
enabled_features_.push_back(media::kExternalClearKeyForTesting);
@@ -522,10 +539,6 @@
EncryptedMediaSupportedTypesTest::SetUpCommandLine(command_line);
RegisterClearKeyCdm(command_line, true /* use_wrong_cdm_path */);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(
- EncryptedMediaSupportedTypesClearKeyCdmRegisteredWithWrongPathTest);
};
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
diff --git a/chrome/browser/media/history/media_history_keyed_service_factory.h b/chrome/browser/media/history/media_history_keyed_service_factory.h
index cf7bfbc..6d82a51 100644
--- a/chrome/browser/media/history/media_history_keyed_service_factory.h
+++ b/chrome/browser/media/history/media_history_keyed_service_factory.h
@@ -25,6 +25,11 @@
static MediaHistoryKeyedService* GetForProfile(Profile* profile);
static MediaHistoryKeyedServiceFactory* GetInstance();
+ MediaHistoryKeyedServiceFactory(const MediaHistoryKeyedServiceFactory&) =
+ delete;
+ MediaHistoryKeyedServiceFactory& operator=(
+ const MediaHistoryKeyedServiceFactory&) = delete;
+
protected:
bool ServiceIsCreatedWithBrowserContext() const override;
@@ -39,8 +44,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(MediaHistoryKeyedServiceFactory);
};
} // namespace media_history
diff --git a/chrome/browser/media/history/media_history_origin_table.h b/chrome/browser/media/history/media_history_origin_table.h
index 32e1757..f12cfb8 100644
--- a/chrome/browser/media/history/media_history_origin_table.h
+++ b/chrome/browser/media/history/media_history_origin_table.h
@@ -22,6 +22,9 @@
public:
static const char kTableName[];
+ MediaHistoryOriginTable(const MediaHistoryOriginTable&) = delete;
+ MediaHistoryOriginTable& operator=(const MediaHistoryOriginTable&) = delete;
+
// Returns the origin as a string for storage.
static std::string GetOriginForStorage(const url::Origin& origin);
@@ -53,8 +56,6 @@
// Gets the origins which have watchtime above the given threshold.
std::vector<url::Origin> GetHighWatchTimeOrigins(
const base::TimeDelta& audio_video_watchtime_min);
-
- DISALLOW_COPY_AND_ASSIGN(MediaHistoryOriginTable);
};
} // namespace media_history
diff --git a/chrome/browser/media/history/media_history_playback_table.h b/chrome/browser/media/history/media_history_playback_table.h
index b7ce848..4000b44 100644
--- a/chrome/browser/media/history/media_history_playback_table.h
+++ b/chrome/browser/media/history/media_history_playback_table.h
@@ -36,6 +36,10 @@
using MediaHistoryPlaybacks = std::vector<MediaHistoryPlayback>;
+ MediaHistoryPlaybackTable(const MediaHistoryPlaybackTable&) = delete;
+ MediaHistoryPlaybackTable& operator=(const MediaHistoryPlaybackTable&) =
+ delete;
+
bool DeleteURL(const GURL& url) override;
private:
@@ -53,8 +57,6 @@
// Returns the playback rows in the database.
std::vector<mojom::MediaHistoryPlaybackRowPtr> GetPlaybackRows();
-
- DISALLOW_COPY_AND_ASSIGN(MediaHistoryPlaybackTable);
};
} // namespace media_history
diff --git a/chrome/browser/media/history/media_history_table_base.h b/chrome/browser/media/history/media_history_table_base.h
index 4e60cb6..498dc6a 100644
--- a/chrome/browser/media/history/media_history_table_base.h
+++ b/chrome/browser/media/history/media_history_table_base.h
@@ -32,6 +32,9 @@
class MediaHistoryTableBase
: public base::RefCountedThreadSafe<MediaHistoryTableBase> {
public:
+ MediaHistoryTableBase(const MediaHistoryTableBase&) = delete;
+ MediaHistoryTableBase& operator=(const MediaHistoryTableBase&) = delete;
+
// Deletes any row with the |url| and returns a bool whether it was
// successful.
virtual bool DeleteURL(const GURL& url);
@@ -72,8 +75,6 @@
scoped_refptr<base::UpdateableSequencedTaskRunner> db_task_runner_;
sql::Database* db_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaHistoryTableBase);
};
} // namespace media_history
diff --git a/chrome/browser/media/media_device_id_salt.h b/chrome/browser/media/media_device_id_salt.h
index 698f398..cea1b59 100644
--- a/chrome/browser/media/media_device_id_salt.h
+++ b/chrome/browser/media/media_device_id_salt.h
@@ -24,6 +24,9 @@
public:
explicit MediaDeviceIDSalt(PrefService* pref_service);
+ MediaDeviceIDSalt(const MediaDeviceIDSalt&) = delete;
+ MediaDeviceIDSalt& operator=(const MediaDeviceIDSalt&) = delete;
+
std::string GetSalt() const;
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -34,8 +37,6 @@
~MediaDeviceIDSalt();
mutable StringPrefMember media_device_id_salt_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaDeviceIDSalt);
};
#endif // CHROME_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_
diff --git a/chrome/browser/media/media_engagement_contents_observer.h b/chrome/browser/media/media_engagement_contents_observer.h
index d49f6c5..d629336d 100644
--- a/chrome/browser/media/media_engagement_contents_observer.h
+++ b/chrome/browser/media/media_engagement_contents_observer.h
@@ -147,14 +147,15 @@
public:
explicit PlaybackTimer(base::Clock*);
+ PlaybackTimer(const PlaybackTimer&) = delete;
+ PlaybackTimer& operator=(const PlaybackTimer&) = delete;
+
void Start();
void Stop();
bool IsRunning() const;
base::TimeDelta Elapsed() const;
void Reset();
- DISALLOW_COPY_AND_ASSIGN(PlaybackTimer);
-
private:
// The clock is owned by |service_| which already owns |this|.
base::Clock* clock_;
@@ -166,9 +167,14 @@
// A structure containing all the information we have about a player's state.
struct PlayerState {
explicit PlayerState(base::Clock*);
- ~PlayerState();
+
+ PlayerState(const PlayerState&) = delete;
+ PlayerState& operator=(const PlayerState&) = delete;
+
PlayerState(PlayerState&&);
+ ~PlayerState();
+
absl::optional<bool> muted;
absl::optional<bool> playing; // Currently playing.
absl::optional<bool> significant_size; // The video track has at least
@@ -186,8 +192,6 @@
bool reached_end_of_stream = false;
std::unique_ptr<PlaybackTimer> playback_timer;
-
- DISALLOW_COPY_AND_ASSIGN(PlayerState);
};
std::map<content::MediaPlayerId, PlayerState> player_states_;
PlayerState& GetPlayerState(const content::MediaPlayerId& id);
diff --git a/chrome/browser/media/media_engagement_service_factory.h b/chrome/browser/media/media_engagement_service_factory.h
index 84755ab9..8ed318c 100644
--- a/chrome/browser/media/media_engagement_service_factory.h
+++ b/chrome/browser/media/media_engagement_service_factory.h
@@ -17,6 +17,10 @@
static MediaEngagementService* GetForProfile(Profile* profile);
static MediaEngagementServiceFactory* GetInstance();
+ MediaEngagementServiceFactory(const MediaEngagementServiceFactory&) = delete;
+ MediaEngagementServiceFactory& operator=(
+ const MediaEngagementServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<MediaEngagementServiceFactory>;
@@ -28,8 +32,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(MediaEngagementServiceFactory);
};
#endif // CHROME_BROWSER_MEDIA_MEDIA_ENGAGEMENT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/media/media_engagement_session.h b/chrome/browser/media/media_engagement_session.h
index 5bd38b2..38fbbe7 100644
--- a/chrome/browser/media/media_engagement_session.h
+++ b/chrome/browser/media/media_engagement_session.h
@@ -32,6 +32,9 @@
RestoreType restore_status,
ukm::SourceId ukm_source_id);
+ MediaEngagementSession(const MediaEngagementSession&) = delete;
+ MediaEngagementSession& operator=(const MediaEngagementSession&) = delete;
+
// Returns whether the session's origin is same origin with |origin|.
bool IsSameOriginWith(const url::Origin& origin) const;
@@ -119,8 +122,6 @@
// If the |is_high_| bit has changed since this object was created.
bool high_score_changed_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(MediaEngagementSession);
};
#endif // CHROME_BROWSER_MEDIA_MEDIA_ENGAGEMENT_SESSION_H_
diff --git a/chrome/browser/media/media_storage_id_salt.h b/chrome/browser/media/media_storage_id_salt.h
index 7b7e1dd..13383c4 100644
--- a/chrome/browser/media/media_storage_id_salt.h
+++ b/chrome/browser/media/media_storage_id_salt.h
@@ -20,13 +20,14 @@
public:
enum { kSaltLength = 32 };
+ MediaStorageIdSalt() = delete;
+ MediaStorageIdSalt(const MediaStorageIdSalt&) = delete;
+ MediaStorageIdSalt& operator=(const MediaStorageIdSalt&) = delete;
+
// Retrieves the current salt. If one does not currently exist it is created.
static std::vector<uint8_t> GetSalt(PrefService* pref_service);
static void RegisterProfilePrefs(PrefRegistrySimple* registry);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(MediaStorageIdSalt);
};
#endif // CHROME_BROWSER_MEDIA_MEDIA_STORAGE_ID_SALT_H_
diff --git a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc b/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
index 6b653e0..2dc4a36 100644
--- a/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/dial_media_sink_service_impl_unittest.cc
@@ -53,6 +53,10 @@
mock_sink_discovered_cb_.Get(),
base::SequencedTaskRunnerHandle::Get())) {}
+ DialMediaSinkServiceImplTest(const DialMediaSinkServiceImplTest&) = delete;
+ DialMediaSinkServiceImplTest& operator=(const DialMediaSinkServiceImplTest&) =
+ delete;
+
void SetUp() override {
media_sink_service_->SetDialRegistryForTest(&test_dial_registry_);
@@ -118,8 +122,6 @@
MediaSinkInternal dial_sink_1_ = CreateDialSink(1);
MediaSinkInternal dial_sink_2_ = CreateDialSink(2);
-
- DISALLOW_COPY_AND_ASSIGN(DialMediaSinkServiceImplTest);
};
TEST_F(DialMediaSinkServiceImplTest, OnDeviceDescriptionAvailable) {
diff --git a/chrome/browser/media/router/discovery/dial/dial_registry.h b/chrome/browser/media/router/discovery/dial/dial_registry.h
index 0d3658a3..15cb19a8 100644
--- a/chrome/browser/media/router/discovery/dial/dial_registry.h
+++ b/chrome/browser/media/router/discovery/dial/dial_registry.h
@@ -63,6 +63,9 @@
static DialRegistry* GetInstance();
+ DialRegistry(const DialRegistry&) = delete;
+ DialRegistry& operator=(const DialRegistry&) = delete;
+
// Sets the NetLog object used for logging. Should be called right after
// GetInstance(). If the registry already has a NetLog, does nothing. The
// NetLog should live at least as long as the IO Thread.
@@ -224,7 +227,6 @@
FRIEND_TEST_ALL_PREFIXES(DialRegistryTest, TestNetworkEventConnectionLost);
FRIEND_TEST_ALL_PREFIXES(DialRegistryTest,
TestNetworkEventConnectionRestored);
- DISALLOW_COPY_AND_ASSIGN(DialRegistry);
};
} // namespace media_router
diff --git a/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc b/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
index b763ebf..fb7f12a 100644
--- a/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/safe_dial_app_info_parser_unittest.cc
@@ -149,6 +149,10 @@
public:
SafeDialAppInfoParserTest() = default;
+ SafeDialAppInfoParserTest(const SafeDialAppInfoParserTest&) = delete;
+ SafeDialAppInfoParserTest& operator=(const SafeDialAppInfoParserTest&) =
+ delete;
+
std::unique_ptr<ParsedDialAppInfo> Parse(
const std::string& xml,
SafeDialAppInfoParser::ParsingResult expected_result) {
@@ -172,7 +176,6 @@
content::BrowserTaskEnvironment task_environment_;
data_decoder::test::InProcessDataDecoder in_process_data_decoder_;
std::unique_ptr<ParsedDialAppInfo> app_info_;
- DISALLOW_COPY_AND_ASSIGN(SafeDialAppInfoParserTest);
};
TEST_F(SafeDialAppInfoParserTest, TestInvalidXmlNoService) {
diff --git a/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc b/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
index 89cb1d2..eba8401 100644
--- a/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
+++ b/chrome/browser/media/router/discovery/dial/safe_dial_device_description_parser_unittest.cc
@@ -78,6 +78,11 @@
public:
SafeDialDeviceDescriptionParserTest() = default;
+ SafeDialDeviceDescriptionParserTest(
+ const SafeDialDeviceDescriptionParserTest&) = delete;
+ SafeDialDeviceDescriptionParserTest& operator=(
+ const SafeDialDeviceDescriptionParserTest&) = delete;
+
ParsedDialDeviceDescription Parse(
const std::string& xml,
const GURL& app_url,
@@ -107,8 +112,6 @@
private:
content::BrowserTaskEnvironment task_environment_;
data_decoder::test::InProcessDataDecoder in_process_data_decoder_;
-
- DISALLOW_COPY_AND_ASSIGN(SafeDialDeviceDescriptionParserTest);
};
TEST_F(SafeDialDeviceDescriptionParserTest, TestInvalidXml) {
diff --git a/chrome/browser/media/router/discovery/discovery_network_monitor.h b/chrome/browser/media/router/discovery/discovery_network_monitor.h
index 2dcb1f9..b1009b9 100644
--- a/chrome/browser/media/router/discovery/discovery_network_monitor.h
+++ b/chrome/browser/media/router/discovery/discovery_network_monitor.h
@@ -55,6 +55,9 @@
static std::unique_ptr<DiscoveryNetworkMonitor> CreateInstanceForTest(
NetworkInfoFunction strategy);
+ DiscoveryNetworkMonitor(const DiscoveryNetworkMonitor&) = delete;
+ DiscoveryNetworkMonitor& operator=(const DiscoveryNetworkMonitor&) = delete;
+
void AddObserver(Observer* const observer);
void RemoveObserver(Observer* const observer);
@@ -106,8 +109,6 @@
// SequenceChecker for |task_runner_|.
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(DiscoveryNetworkMonitor);
};
} // namespace media_router
diff --git a/chrome/browser/media/router/discovery/mdns/dns_sd_registry.h b/chrome/browser/media/router/discovery/mdns/dns_sd_registry.h
index 23d9f61a..4c9e8a5 100644
--- a/chrome/browser/media/router/discovery/mdns/dns_sd_registry.h
+++ b/chrome/browser/media/router/discovery/mdns/dns_sd_registry.h
@@ -42,6 +42,9 @@
static DnsSdRegistry* GetInstance();
+ DnsSdRegistry(const DnsSdRegistry&) = delete;
+ DnsSdRegistry& operator=(const DnsSdRegistry&) = delete;
+
// Publishes the current device list for |service_type| to event listeners
// whose event filter matches the service type.
virtual void Publish(const std::string& service_type);
@@ -127,8 +130,6 @@
service_discovery_client_;
base::ObserverList<DnsSdObserver>::Unchecked observers_;
base::ThreadChecker thread_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(DnsSdRegistry);
};
} // namespace media_router
diff --git a/chrome/browser/media/router/presentation/chrome_local_presentation_manager_factory.h b/chrome/browser/media/router/presentation/chrome_local_presentation_manager_factory.h
index d2704ff..1f36371 100644
--- a/chrome/browser/media/router/presentation/chrome_local_presentation_manager_factory.h
+++ b/chrome/browser/media/router/presentation/chrome_local_presentation_manager_factory.h
@@ -22,6 +22,11 @@
// For test use only.
static ChromeLocalPresentationManagerFactory* GetInstance();
+ ChromeLocalPresentationManagerFactory(
+ const ChromeLocalPresentationManagerFactory&) = delete;
+ ChromeLocalPresentationManagerFactory& operator=(
+ const ChromeLocalPresentationManagerFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<
ChromeLocalPresentationManagerFactory>;
@@ -32,8 +37,6 @@
// BrowserContextKeyedServiceFactory interface.
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeLocalPresentationManagerFactory);
};
} // namespace media_router
diff --git a/chrome/browser/media/router/providers/cast/dual_media_sink_service.h b/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
index 0da0330..1c18e38 100644
--- a/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
+++ b/chrome/browser/media/router/providers/cast/dual_media_sink_service.h
@@ -48,6 +48,9 @@
static DualMediaSinkService* GetInstance();
static void SetInstanceForTest(DualMediaSinkService* instance_for_test);
+ DualMediaSinkService(const DualMediaSinkService&) = delete;
+ DualMediaSinkService& operator=(const DualMediaSinkService&) = delete;
+
// Used by DialMediaRouteProvider only.
DialMediaSinkServiceImpl* GetDialMediaSinkServiceImpl();
@@ -118,7 +121,6 @@
base::flat_map<std::string, std::vector<MediaSinkInternal>> current_sinks_;
SEQUENCE_CHECKER(sequence_checker_);
- DISALLOW_COPY_AND_ASSIGN(DualMediaSinkService);
};
} // namespace media_router
diff --git a/chrome/browser/media/router/providers/dial/dial_activity_manager.h b/chrome/browser/media/router/providers/dial/dial_activity_manager.h
index 587a0d5..e7af46d 100644
--- a/chrome/browser/media/router/providers/dial/dial_activity_manager.h
+++ b/chrome/browser/media/router/providers/dial/dial_activity_manager.h
@@ -173,6 +173,10 @@
// Represents the state of a launch activity.
struct Record {
explicit Record(const DialActivity& activity);
+
+ Record(const Record&) = delete;
+ Record& operator=(const Record&) = delete;
+
~Record();
enum State { kLaunching, kLaunched };
@@ -182,8 +186,6 @@
std::unique_ptr<DialLaunchRequest> pending_launch_request;
std::unique_ptr<DialStopRequest> pending_stop_request;
State state = kLaunching;
-
- DISALLOW_COPY_AND_ASSIGN(Record);
};
// Marked virtual for tests.
diff --git a/chrome/browser/media/router/providers/dial/dial_internal_message_util.h b/chrome/browser/media/router/providers/dial/dial_internal_message_util.h
index ac5c9ff..a37e09b5 100644
--- a/chrome/browser/media/router/providers/dial/dial_internal_message_util.h
+++ b/chrome/browser/media/router/providers/dial/dial_internal_message_util.h
@@ -58,14 +58,16 @@
absl::optional<base::Value> body,
const std::string& client_id,
int sequence_number);
+
+ DialInternalMessage(const DialInternalMessage&) = delete;
+ DialInternalMessage& operator=(const DialInternalMessage&) = delete;
+
~DialInternalMessage();
DialInternalMessageType type;
absl::optional<base::Value> body;
std::string client_id;
int sequence_number;
-
- DISALLOW_COPY_AND_ASSIGN(DialInternalMessage);
};
// Parsed CUSTOM_DIAL_LAUNCH response from the Cast SDK client.
diff --git a/chrome/browser/media/router/providers/dial/dial_media_route_provider.h b/chrome/browser/media/router/providers/dial/dial_media_route_provider.h
index fd830d3..c691d44 100644
--- a/chrome/browser/media/router/providers/dial/dial_media_route_provider.h
+++ b/chrome/browser/media/router/providers/dial/dial_media_route_provider.h
@@ -128,13 +128,15 @@
struct MediaSinkQuery {
MediaSinkQuery();
+
+ MediaSinkQuery(const MediaSinkQuery&) = delete;
+ MediaSinkQuery& operator=(const MediaSinkQuery&) = delete;
+
~MediaSinkQuery();
// Set of registered media sources for current sink query.
base::flat_set<MediaSource> media_sources;
base::CallbackListSubscription subscription;
-
- DISALLOW_COPY_AND_ASSIGN(MediaSinkQuery);
};
// MediaSinkServiceBase::Observer:
diff --git a/chrome/browser/media/router/providers/wired_display/wired_display_presentation_receiver_factory.h b/chrome/browser/media/router/providers/wired_display/wired_display_presentation_receiver_factory.h
index b3fb69f..092b6e21 100644
--- a/chrome/browser/media/router/providers/wired_display/wired_display_presentation_receiver_factory.h
+++ b/chrome/browser/media/router/providers/wired_display/wired_display_presentation_receiver_factory.h
@@ -37,6 +37,11 @@
base::OnceClosure termination_callback,
base::RepeatingCallback<void(const std::string&)> title_change_callback);
+ WiredDisplayPresentationReceiverFactory(
+ const WiredDisplayPresentationReceiverFactory&) = delete;
+ WiredDisplayPresentationReceiverFactory& operator=(
+ const WiredDisplayPresentationReceiverFactory&) = delete;
+
// Sets the callback used to instantiate a presentation receiver. Used only in
// tests.
static void SetCreateReceiverCallbackForTest(CreateReceiverCallback callback);
@@ -52,8 +57,6 @@
// Used in tests. When this is set, it is used for creating a receiver.
CreateReceiverCallback create_receiver_for_testing_;
-
- DISALLOW_COPY_AND_ASSIGN(WiredDisplayPresentationReceiverFactory);
};
} // namespace media_router
diff --git a/chrome/browser/media/unified_autoplay_config.h b/chrome/browser/media/unified_autoplay_config.h
index de74569..e253d8c 100644
--- a/chrome/browser/media/unified_autoplay_config.h
+++ b/chrome/browser/media/unified_autoplay_config.h
@@ -15,6 +15,10 @@
class UnifiedAutoplayConfig {
public:
+ UnifiedAutoplayConfig() = delete;
+ UnifiedAutoplayConfig(const UnifiedAutoplayConfig&) = delete;
+ UnifiedAutoplayConfig& operator=(const UnifiedAutoplayConfig&) = delete;
+
// Register profile prefs in the pref registry.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable*);
@@ -26,9 +30,6 @@
// Checks whether the block autoplay toggle button should be enabled. If it is
// false it will still be visible but will be disabled.
static bool IsBlockAutoplayUserModifiable(Profile*);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(UnifiedAutoplayConfig);
};
#endif // CHROME_BROWSER_MEDIA_UNIFIED_AUTOPLAY_CONFIG_H_
diff --git a/chrome/browser/media/webrtc/audio_debug_recordings_handler.h b/chrome/browser/media/webrtc/audio_debug_recordings_handler.h
index 4e1093f4..bb3d488 100644
--- a/chrome/browser/media/webrtc/audio_debug_recordings_handler.h
+++ b/chrome/browser/media/webrtc/audio_debug_recordings_handler.h
@@ -42,6 +42,10 @@
explicit AudioDebugRecordingsHandler(
content::BrowserContext* browser_context);
+ AudioDebugRecordingsHandler(const AudioDebugRecordingsHandler&) = delete;
+ AudioDebugRecordingsHandler& operator=(const AudioDebugRecordingsHandler&) =
+ delete;
+
// Starts an audio debug recording. The recording lasts the given |delay|,
// unless |delay| is zero, in which case recording will continue until
// StopAudioDebugRecordings() is explicitly invoked.
@@ -90,8 +94,6 @@
// Used for controlling debug recordings.
std::unique_ptr<media::AudioDebugRecordingSession>
audio_debug_recording_session_;
-
- DISALLOW_COPY_AND_ASSIGN(AudioDebugRecordingsHandler);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_AUDIO_DEBUG_RECORDINGS_HANDLER_H_
diff --git a/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc
index 4118616..9e21b36 100644
--- a/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/webrtc/current_tab_desktop_media_list_unittest.cc
@@ -64,6 +64,11 @@
CurrentTabDesktopMediaListTest()
: local_state_(TestingBrowserProcess::GetGlobal()) {}
+ CurrentTabDesktopMediaListTest(const CurrentTabDesktopMediaListTest&) =
+ delete;
+ CurrentTabDesktopMediaListTest& operator=(
+ const CurrentTabDesktopMediaListTest&) = delete;
+
void SetUp() override {
rvh_test_enabler_ = std::make_unique<content::RenderViewHostTestEnabler>();
@@ -173,8 +178,6 @@
ash::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
ash::ScopedTestUserManager test_user_manager_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(CurrentTabDesktopMediaListTest);
};
TEST_F(CurrentTabDesktopMediaListTest, UpdateSourcesListCalledWithCurrentTab) {
diff --git a/chrome/browser/media/webrtc/desktop_media_picker_manager.h b/chrome/browser/media/webrtc/desktop_media_picker_manager.h
index b51b51f..b4b3196 100644
--- a/chrome/browser/media/webrtc/desktop_media_picker_manager.h
+++ b/chrome/browser/media/webrtc/desktop_media_picker_manager.h
@@ -25,6 +25,10 @@
static DesktopMediaPickerManager* Get();
+ DesktopMediaPickerManager(const DesktopMediaPickerManager&) = delete;
+ DesktopMediaPickerManager& operator=(const DesktopMediaPickerManager&) =
+ delete;
+
// For the observers
void AddObserver(DialogObserver* observer);
void RemoveObserver(DialogObserver* observer);
@@ -40,8 +44,6 @@
~DesktopMediaPickerManager(); // Never called.
base::ObserverList<DesktopMediaPickerManager::DialogObserver> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopMediaPickerManager);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_DESKTOP_MEDIA_PICKER_MANAGER_H_
diff --git a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
index 11eb3e5..a916678 100644
--- a/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
+++ b/chrome/browser/media/webrtc/media_capture_devices_dispatcher.h
@@ -66,6 +66,10 @@
static MediaCaptureDevicesDispatcher* GetInstance();
+ MediaCaptureDevicesDispatcher(const MediaCaptureDevicesDispatcher&) = delete;
+ MediaCaptureDevicesDispatcher& operator=(
+ const MediaCaptureDevicesDispatcher&) = delete;
+
// Registers the preferences related to Media Stream default devices.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -191,8 +195,6 @@
// Handlers for processing media access requests.
std::vector<std::unique_ptr<MediaAccessHandler>> media_access_handlers_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
diff --git a/chrome/browser/media/webrtc/media_stream_capture_indicator.h b/chrome/browser/media/webrtc/media_stream_capture_indicator.h
index 15e5aad..a61d0b0 100644
--- a/chrome/browser/media/webrtc/media_stream_capture_indicator.h
+++ b/chrome/browser/media/webrtc/media_stream_capture_indicator.h
@@ -73,6 +73,10 @@
MediaStreamCaptureIndicator();
+ MediaStreamCaptureIndicator(const MediaStreamCaptureIndicator&) = delete;
+ MediaStreamCaptureIndicator& operator=(const MediaStreamCaptureIndicator&) =
+ delete;
+
// Registers a new media stream for |web_contents| and returns an object used
// by the content layer to notify about the state of the stream. Optionally,
// |ui| is used to display custom UI while the stream is captured.
@@ -166,8 +170,6 @@
CommandTargets command_targets_;
base::ObserverList<Observer, /* check_empty =*/true> observers_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaStreamCaptureIndicator);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_MEDIA_STREAM_CAPTURE_INDICATOR_H_
diff --git a/chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc b/chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
index aef2c710..1955d114 100644
--- a/chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
+++ b/chrome/browser/media/webrtc/media_stream_device_permission_context_unittest.cc
@@ -41,6 +41,12 @@
// converted to tests in this file.
class MediaStreamDevicePermissionContextTests
: public ChromeRenderViewHostTestHarness {
+ public:
+ MediaStreamDevicePermissionContextTests(
+ const MediaStreamDevicePermissionContextTests&) = delete;
+ MediaStreamDevicePermissionContextTests& operator=(
+ const MediaStreamDevicePermissionContextTests&) = delete;
+
protected:
MediaStreamDevicePermissionContextTests() = default;
@@ -107,8 +113,6 @@
permissions::PermissionRequestManager::CreateForWebContents(web_contents());
#endif
}
-
- DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicePermissionContextTests);
};
// MEDIASTREAM_MIC permission status should be ask for insecure origin to
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc
index 3c2e4d2..b30e779a 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list_unittest.cc
@@ -172,6 +172,10 @@
public:
NativeDesktopMediaListTest() = default;
+ NativeDesktopMediaListTest(const NativeDesktopMediaListTest&) = delete;
+ NativeDesktopMediaListTest& operator=(const NativeDesktopMediaListTest&) =
+ delete;
+
void TearDown() override {
for (size_t i = 0; i < desktop_widgets_.size(); i++)
desktop_widgets_[i].reset();
@@ -331,8 +335,6 @@
std::vector<std::unique_ptr<views::Widget>> desktop_widgets_;
std::map<DesktopMediaID::Id, DesktopMediaID::Id> native_aura_id_map_;
std::unique_ptr<NativeDesktopMediaList> model_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeDesktopMediaListTest);
};
TEST_F(NativeDesktopMediaListTest, Windows) {
diff --git a/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h b/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
index 312bf9b..1cd81a71 100644
--- a/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
+++ b/chrome/browser/media/webrtc/screen_capture_infobar_delegate_android.h
@@ -22,6 +22,11 @@
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback);
+ ScreenCaptureInfoBarDelegateAndroid(
+ const ScreenCaptureInfoBarDelegateAndroid&) = delete;
+ ScreenCaptureInfoBarDelegateAndroid& operator=(
+ const ScreenCaptureInfoBarDelegateAndroid&) = delete;
+
private:
ScreenCaptureInfoBarDelegateAndroid(
content::WebContents* web_contents,
@@ -45,8 +50,6 @@
content::WebContents* web_contents_;
const content::MediaStreamRequest request_;
content::MediaResponseCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ScreenCaptureInfoBarDelegateAndroid);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_SCREEN_CAPTURE_INFOBAR_DELEGATE_ANDROID_H_
diff --git a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
index 7235a69..d689286 100644
--- a/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
+++ b/chrome/browser/media/webrtc/tab_desktop_media_list_unittest.cc
@@ -147,6 +147,10 @@
};
class TabDesktopMediaListTest : public testing::Test {
+ public:
+ TabDesktopMediaListTest(const TabDesktopMediaListTest&) = delete;
+ TabDesktopMediaListTest& operator=(const TabDesktopMediaListTest&) = delete;
+
protected:
TabDesktopMediaListTest()
: local_state_(TestingBrowserProcess::GetGlobal()) {}
@@ -329,8 +333,6 @@
ash::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
ash::ScopedTestUserManager test_user_manager_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(TabDesktopMediaListTest);
};
TEST_F(TabDesktopMediaListTest, AddTab) {
diff --git a/chrome/browser/media/webrtc/webrtc_browsertest_base.h b/chrome/browser/media/webrtc/webrtc_browsertest_base.h
index f66b9d9..9cb4dc1 100644
--- a/chrome/browser/media/webrtc/webrtc_browsertest_base.h
+++ b/chrome/browser/media/webrtc/webrtc_browsertest_base.h
@@ -61,6 +61,9 @@
INDIVIDUAL_STREAMS
};
+ WebRtcTestBase(const WebRtcTestBase&) = delete;
+ WebRtcTestBase& operator=(const WebRtcTestBase&) = delete;
+
protected:
WebRtcTestBase();
~WebRtcTestBase() override;
@@ -257,8 +260,6 @@
bool detect_errors_in_javascript_;
scoped_refptr<const extensions::Extension> desktop_capture_extension_;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_history.h b/chrome/browser/media/webrtc/webrtc_event_log_history.h
index 96180ec..c08686da 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_history.h
+++ b/chrome/browser/media/webrtc/webrtc_event_log_history.h
@@ -28,6 +28,11 @@
static std::unique_ptr<WebRtcEventLogHistoryFileWriter> Create(
const base::FilePath& path);
+ WebRtcEventLogHistoryFileWriter(const WebRtcEventLogHistoryFileWriter&) =
+ delete;
+ WebRtcEventLogHistoryFileWriter& operator=(
+ const WebRtcEventLogHistoryFileWriter&) = delete;
+
// The capture time must be later than UNIX epoch start.
bool WriteCaptureTime(base::Time capture_time);
@@ -60,8 +65,6 @@
const base::FilePath path_;
base::File file_;
bool valid_;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcEventLogHistoryFileWriter);
};
// Reads from disk a small history file and recovers the data from it.
@@ -73,6 +76,11 @@
static std::unique_ptr<WebRtcEventLogHistoryFileReader> Create(
const base::FilePath& path);
+ WebRtcEventLogHistoryFileReader(const WebRtcEventLogHistoryFileReader&) =
+ delete;
+ WebRtcEventLogHistoryFileReader& operator=(
+ const WebRtcEventLogHistoryFileReader&) = delete;
+
WebRtcEventLogHistoryFileReader(WebRtcEventLogHistoryFileReader&& other);
// Mandatory fields.
@@ -112,8 +120,6 @@
std::string upload_id_; // Empty string indicates "unset".
bool valid_;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcEventLogHistoryFileReader);
};
} // namespace webrtc_event_logging
diff --git a/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h b/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h
index 6e719575..e9bf07d0 100644
--- a/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h
+++ b/chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h
@@ -23,6 +23,11 @@
public:
static WebRtcEventLogManagerKeyedServiceFactory* GetInstance();
+ WebRtcEventLogManagerKeyedServiceFactory(
+ const WebRtcEventLogManagerKeyedServiceFactory&) = delete;
+ WebRtcEventLogManagerKeyedServiceFactory& operator=(
+ const WebRtcEventLogManagerKeyedServiceFactory&) = delete;
+
protected:
bool ServiceIsCreatedWithBrowserContext() const override;
@@ -35,8 +40,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcEventLogManagerKeyedServiceFactory);
};
} // namespace webrtc_event_logging
diff --git a/chrome/browser/media/webrtc/webrtc_logging_controller.h b/chrome/browser/media/webrtc/webrtc_logging_controller.h
index 2fa9e46..8594a0e 100644
--- a/chrome/browser/media/webrtc/webrtc_logging_controller.h
+++ b/chrome/browser/media/webrtc/webrtc_logging_controller.h
@@ -63,6 +63,9 @@
static WebRtcLoggingController* FromRenderProcessHost(
content::RenderProcessHost* host);
+ WebRtcLoggingController(const WebRtcLoggingController&) = delete;
+ WebRtcLoggingController& operator=(const WebRtcLoggingController&) = delete;
+
// Sets meta data that will be uploaded along with the log and also written
// in the beginning of the log. Must be called on the IO thread before calling
// StartLogging.
@@ -234,8 +237,6 @@
// "client" meta data key, if exists. 0 means undefined, and is the hash of
// the empty string.
int web_app_id_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingController);
};
#endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_LOGGING_CONTROLLER_H_
diff --git a/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.h b/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.h
index 583ae4cd..bd1ace7 100644
--- a/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.h
+++ b/chrome/browser/media_galleries/chromeos/mtp_device_delegate_impl_chromeos.h
@@ -81,6 +81,10 @@
MTPDeviceDelegateImplLinux(const std::string& device_location,
const bool read_only);
+ MTPDeviceDelegateImplLinux(const MTPDeviceDelegateImplLinux&) = delete;
+ MTPDeviceDelegateImplLinux& operator=(const MTPDeviceDelegateImplLinux&) =
+ delete;
+
// Destructed via CancelPendingTasksAndDeleteDelegate().
~MTPDeviceDelegateImplLinux() override;
@@ -512,8 +516,6 @@
// For callbacks that may run after destruction.
base::WeakPtrFactory<MTPDeviceDelegateImplLinux> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplLinux);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_DEVICE_DELEGATE_IMPL_CHROMEOS_H_
diff --git a/chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_service.h b/chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_service.h
index b0957b0..d63a59a3 100644
--- a/chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_service.h
+++ b/chrome/browser/media_galleries/chromeos/mtp_device_task_helper_map_service.h
@@ -19,6 +19,10 @@
public:
static MTPDeviceTaskHelperMapService* GetInstance();
+ MTPDeviceTaskHelperMapService(const MTPDeviceTaskHelperMapService&) = delete;
+ MTPDeviceTaskHelperMapService& operator=(
+ const MTPDeviceTaskHelperMapService&) = delete;
+
// Creates and returns the MTPDeviceTaskHelper object for the storage device
// specified by the |storage_name|.
MTPDeviceTaskHelper* CreateDeviceTaskHelper(const std::string& storage_name,
@@ -59,8 +63,6 @@
// Mapping of |storage_name| and MTPDeviceTaskHelper*.
// TaskHelperMap owns MTPDeviceTaskHelper objects.
TaskHelperMap task_helper_map_;
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceTaskHelperMapService);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_CHROMEOS_MTP_DEVICE_TASK_HELPER_MAP_SERVICE_H_
diff --git a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
index 11c180b..490447cd 100644
--- a/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
+++ b/chrome/browser/media_galleries/fileapi/device_media_async_file_util.cc
@@ -238,6 +238,9 @@
public:
MediaPathFilterWrapper();
+ MediaPathFilterWrapper(const MediaPathFilterWrapper&) = delete;
+ MediaPathFilterWrapper& operator=(const MediaPathFilterWrapper&) = delete;
+
// Check if entries in |file_list| look like media files.
// Append the ones that look like media files to |results|.
// Should run on a media task runner.
@@ -253,8 +256,6 @@
virtual ~MediaPathFilterWrapper();
std::unique_ptr<MediaPathFilter> media_path_filter_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaPathFilterWrapper);
};
DeviceMediaAsyncFileUtil::MediaPathFilterWrapper::MediaPathFilterWrapper()
diff --git a/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h b/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h
index 87a3b0a..20139f5b 100644
--- a/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h
+++ b/chrome/browser/media_galleries/fileapi/mtp_device_map_service.h
@@ -26,6 +26,9 @@
public:
static MTPDeviceMapService* GetInstance();
+ MTPDeviceMapService(const MTPDeviceMapService&) = delete;
+ MTPDeviceMapService& operator=(const MTPDeviceMapService&) = delete;
+
// Gets the media device delegate associated with |url|'s filesystem
// id. Return NULL if |url| is no longer valid (e.g. because the
// corresponding device is detached, etc).
@@ -89,8 +92,6 @@
MTPDeviceFileSystemMap mtp_device_map_;
MTPDeviceUsageMap mtp_device_usage_map_;
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceMapService);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MTP_DEVICE_MAP_SERVICE_H_
diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
index e33a9d29..a11dc6b7 100644
--- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
+++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc
@@ -125,6 +125,9 @@
public:
NativeMediaFileUtilTest() = default;
+ NativeMediaFileUtilTest(const NativeMediaFileUtilTest&) = delete;
+ NativeMediaFileUtilTest& operator=(const NativeMediaFileUtilTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
ASSERT_TRUE(base::CreateDirectory(root_path()));
@@ -196,8 +199,6 @@
std::string filesystem_id_;
storage::IsolatedContext::ScopedFSHandle filesystem_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtilTest);
};
TEST_F(NativeMediaFileUtilTest, DirectoryExistsAndFileExistsFiltering) {
diff --git a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc
index 872a29a..3559ea2 100644
--- a/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc
+++ b/chrome/browser/media_galleries/fileapi/supported_audio_video_checker.cc
@@ -45,14 +45,16 @@
}
}
+ SupportedAudioVideoExtensions(const SupportedAudioVideoExtensions&) = delete;
+ SupportedAudioVideoExtensions& operator=(
+ const SupportedAudioVideoExtensions&) = delete;
+
bool HasSupportedAudioVideoExtension(const base::FilePath& file) {
return base::Contains(audio_video_extensions_, file.Extension());
}
private:
std::set<base::FilePath::StringType> audio_video_extensions_;
-
- DISALLOW_COPY_AND_ASSIGN(SupportedAudioVideoExtensions);
};
base::LazyInstance<SupportedAudioVideoExtensions>::DestructorAtExit
diff --git a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc
index 11ba45b..62d634f6d 100644
--- a/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc
+++ b/chrome/browser/media_galleries/fileapi/supported_image_type_validator.cc
@@ -62,6 +62,10 @@
DCHECK(data_);
}
+ ImageDecoderDelegateAdapter(const ImageDecoderDelegateAdapter&) = delete;
+ ImageDecoderDelegateAdapter& operator=(const ImageDecoderDelegateAdapter&) =
+ delete;
+
const std::string& data() {
return *data_;
}
@@ -80,8 +84,6 @@
private:
std::unique_ptr<std::string> data_;
storage::CopyOrMoveFileValidator::ResultCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ImageDecoderDelegateAdapter);
};
} // namespace
diff --git a/chrome/browser/media_galleries/gallery_watch_manager.cc b/chrome/browser/media_galleries/gallery_watch_manager.cc
index 80d78c4..ef6669b 100644
--- a/chrome/browser/media_galleries/gallery_watch_manager.cc
+++ b/chrome/browser/media_galleries/gallery_watch_manager.cc
@@ -43,6 +43,11 @@
return base::Singleton<GalleryWatchManagerShutdownNotifierFactory>::get();
}
+ GalleryWatchManagerShutdownNotifierFactory(
+ const GalleryWatchManagerShutdownNotifierFactory&) = delete;
+ GalleryWatchManagerShutdownNotifierFactory& operator=(
+ const GalleryWatchManagerShutdownNotifierFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
GalleryWatchManagerShutdownNotifierFactory>;
@@ -53,8 +58,6 @@
DependsOn(MediaGalleriesPreferencesFactory::GetInstance());
}
~GalleryWatchManagerShutdownNotifierFactory() override {}
-
- DISALLOW_COPY_AND_ASSIGN(GalleryWatchManagerShutdownNotifierFactory);
};
} // namespace.
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
index 084abd7..6c7fbca 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac.h
@@ -32,6 +32,9 @@
MTPDeviceDelegateImplMac(const std::string& device_id,
const base::FilePath::StringType& synthetic_path);
+ MTPDeviceDelegateImplMac(const MTPDeviceDelegateImplMac&) = delete;
+ MTPDeviceDelegateImplMac& operator=(const MTPDeviceDelegateImplMac&) = delete;
+
// MTPDeviceAsyncDelegate implementation. These functions are called on the
// IO thread by the async filesystem file util. They forward to
// similarly-named methods on the UI thread.
@@ -189,8 +192,6 @@
ReadDirTransactionList read_dir_transactions_;
base::WeakPtrFactory<MTPDeviceDelegateImplMac> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMac);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_MAC_MTP_DEVICE_DELEGATE_IMPL_MAC_H_
diff --git a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
index dd9cac2..55e2a70 100644
--- a/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
+++ b/chrome/browser/media_galleries/mac/mtp_device_delegate_impl_mac_unittest.mm
@@ -156,6 +156,10 @@
public:
MTPDeviceDelegateImplMacTest() : camera_(NULL), delegate_(NULL) {}
+ MTPDeviceDelegateImplMacTest(const MTPDeviceDelegateImplMacTest&) = delete;
+ MTPDeviceDelegateImplMacTest& operator=(const MTPDeviceDelegateImplMacTest&) =
+ delete;
+
void SetUp() override {
storage_monitor::TestStorageMonitor* monitor =
storage_monitor::TestStorageMonitor::CreateAndInstall();
@@ -286,9 +290,6 @@
base::File::Error overlapped_error_;
storage::AsyncFileUtil::EntryList overlapped_file_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplMacTest);
};
TEST_F(MTPDeviceDelegateImplMacTest, TestGetRootFileInfo) {
diff --git a/chrome/browser/media_galleries/media_file_system_registry.cc b/chrome/browser/media_galleries/media_file_system_registry.cc
index 9809a3b..6ce3293 100644
--- a/chrome/browser/media_galleries/media_file_system_registry.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry.cc
@@ -71,6 +71,11 @@
MediaFileSystemRegistryShutdownNotifierFactory>::get();
}
+ MediaFileSystemRegistryShutdownNotifierFactory(
+ const MediaFileSystemRegistryShutdownNotifierFactory&) = delete;
+ MediaFileSystemRegistryShutdownNotifierFactory& operator=(
+ const MediaFileSystemRegistryShutdownNotifierFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
MediaFileSystemRegistryShutdownNotifierFactory>;
@@ -81,8 +86,6 @@
DependsOn(MediaGalleriesPreferencesFactory::GetInstance());
}
~MediaFileSystemRegistryShutdownNotifierFactory() override {}
-
- DISALLOW_COPY_AND_ASSIGN(MediaFileSystemRegistryShutdownNotifierFactory);
};
struct InvalidatedGalleriesInfo {
@@ -296,6 +299,9 @@
rph_refs_(base::BindRepeating(&ExtensionGalleriesHost::CleanUp,
base::Unretained(this))) {}
+ ExtensionGalleriesHost(const ExtensionGalleriesHost&) = delete;
+ ExtensionGalleriesHost& operator=(const ExtensionGalleriesHost&) = delete;
+
// For each gallery in the list of permitted |galleries|, checks if the
// device is attached and if so looks up or creates a file system name and
// passes the information needed for the renderer to create those file
@@ -507,8 +513,6 @@
// The set of render processes and web contents that may have references to
// the file system ids this instance manages.
RPHReferenceManager rph_refs_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionGalleriesHost);
};
/******************
diff --git a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
index b35a8b2..0423af92 100644
--- a/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
+++ b/chrome/browser/media_galleries/media_file_system_registry_unittest.cc
@@ -221,13 +221,14 @@
content::BrowserContext* browser_context)
: content::MockRenderProcessHost(browser_context) {}
+ SharedMockRenderProcessHost(const SharedMockRenderProcessHost&) = delete;
+ SharedMockRenderProcessHost& operator=(const SharedMockRenderProcessHost&) =
+ delete;
+
// This test class lies that the process has not been used to allow
// testing of process sharing/reuse inherent in the unit tests that depend
// on the MockProfileSharedRenderProcessHostFactory.
bool HostHasNotBeenUsed() override { return true; }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SharedMockRenderProcessHost);
};
mutable std::map<content::BrowserContext*,
diff --git a/chrome/browser/media_galleries/media_galleries_dialog_controller.h b/chrome/browser/media_galleries/media_galleries_dialog_controller.h
index 3f6990c..b2c5e83 100644
--- a/chrome/browser/media_galleries/media_galleries_dialog_controller.h
+++ b/chrome/browser/media_galleries/media_galleries_dialog_controller.h
@@ -60,6 +60,11 @@
typedef std::vector<Entry> Entries;
+ MediaGalleriesDialogController(const MediaGalleriesDialogController&) =
+ delete;
+ MediaGalleriesDialogController& operator=(
+ const MediaGalleriesDialogController&) = delete;
+
// The title of the dialog view. Note that this is only guaranteed to be
// called once, and once called there is no way to update the title text.
virtual std::u16string GetHeader() const = 0;
@@ -102,8 +107,6 @@
protected:
MediaGalleriesDialogController();
virtual ~MediaGalleriesDialogController();
-
- DISALLOW_COPY_AND_ASSIGN(MediaGalleriesDialogController);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_DIALOG_CONTROLLER_H_
diff --git a/chrome/browser/media_galleries/media_galleries_permission_controller.h b/chrome/browser/media_galleries/media_galleries_permission_controller.h
index caa835643..9577197 100644
--- a/chrome/browser/media_galleries/media_galleries_permission_controller.h
+++ b/chrome/browser/media_galleries/media_galleries_permission_controller.h
@@ -56,6 +56,11 @@
const extensions::Extension& extension,
base::OnceClosure on_finish);
+ MediaGalleriesPermissionController(
+ const MediaGalleriesPermissionController&) = delete;
+ MediaGalleriesPermissionController& operator=(
+ const MediaGalleriesPermissionController&) = delete;
+
// MediaGalleriesDialogController implementation.
std::u16string GetHeader() const override;
std::u16string GetSubtext() const override;
@@ -216,8 +221,6 @@
// Creates the dialog. Only changed for unit tests.
CreateDialogCallback create_dialog_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPermissionController);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PERMISSION_CONTROLLER_H_
diff --git a/chrome/browser/media_galleries/media_galleries_preferences.h b/chrome/browser/media_galleries/media_galleries_preferences.h
index 0a123c6..8b73126 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences.h
+++ b/chrome/browser/media_galleries/media_galleries_preferences.h
@@ -177,6 +177,11 @@
};
explicit MediaGalleriesPreferences(Profile* profile);
+
+ MediaGalleriesPreferences(const MediaGalleriesPreferences&) = delete;
+ MediaGalleriesPreferences& operator=(const MediaGalleriesPreferences&) =
+ delete;
+
~MediaGalleriesPreferences() override;
// Ensures that the preferences is initialized. The provided callback, if
@@ -368,8 +373,6 @@
gallery_change_observers_;
base::WeakPtrFactory<MediaGalleriesPreferences> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferences);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_H_
diff --git a/chrome/browser/media_galleries/media_galleries_preferences_factory.h b/chrome/browser/media_galleries/media_galleries_preferences_factory.h
index a971d2c..1c6a6ce 100644
--- a/chrome/browser/media_galleries/media_galleries_preferences_factory.h
+++ b/chrome/browser/media_galleries/media_galleries_preferences_factory.h
@@ -23,6 +23,11 @@
static MediaGalleriesPreferencesFactory* GetInstance();
+ MediaGalleriesPreferencesFactory(const MediaGalleriesPreferencesFactory&) =
+ delete;
+ MediaGalleriesPreferencesFactory& operator=(
+ const MediaGalleriesPreferencesFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<MediaGalleriesPreferencesFactory>;
@@ -36,8 +41,6 @@
user_prefs::PrefRegistrySyncable* registry) override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(MediaGalleriesPreferencesFactory);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_MEDIA_GALLERIES_PREFERENCES_FACTORY_H_
diff --git a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h
index 450cd10..7e27a6e 100644
--- a/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h
+++ b/chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h
@@ -57,6 +57,9 @@
const std::wstring storage_object_id;
};
+ MTPDeviceDelegateImplWin(const MTPDeviceDelegateImplWin&) = delete;
+ MTPDeviceDelegateImplWin& operator=(const MTPDeviceDelegateImplWin&) = delete;
+
private:
friend void OnGetStorageInfoCreateDelegate(
const std::wstring& device_location,
@@ -254,8 +257,6 @@
// For callbacks that may run after destruction.
base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_
diff --git a/chrome/browser/media_galleries/win/portable_device_map_service.h b/chrome/browser/media_galleries/win/portable_device_map_service.h
index 4f54f02..e100db1 100644
--- a/chrome/browser/media_galleries/win/portable_device_map_service.h
+++ b/chrome/browser/media_galleries/win/portable_device_map_service.h
@@ -21,6 +21,9 @@
public:
static PortableDeviceMapService* GetInstance();
+ PortableDeviceMapService(const PortableDeviceMapService&) = delete;
+ PortableDeviceMapService& operator=(const PortableDeviceMapService&) = delete;
+
// Adds the portable |device| interface to the map service for the device
// specified by the |device_location|. Called on a blocking pool thread.
void AddPortableDevice(const std::wstring& device_location,
@@ -72,8 +75,6 @@
// Mapping of |device_location| and IPortableDevice* object.
PortableDeviceMap device_map_;
base::Lock lock_;
-
- DISALLOW_COPY_AND_ASSIGN(PortableDeviceMapService);
};
#endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_PORTABLE_DEVICE_MAP_SERVICE_H_
diff --git a/chrome/browser/memory/oom_memory_details.h b/chrome/browser/memory/oom_memory_details.h
index af745fb0..b930039 100644
--- a/chrome/browser/memory/oom_memory_details.h
+++ b/chrome/browser/memory/oom_memory_details.h
@@ -18,6 +18,9 @@
// memory event in an attempt to identify the culprit.
class OomMemoryDetails : public MemoryDetails {
public:
+ OomMemoryDetails(const OomMemoryDetails&) = delete;
+ OomMemoryDetails& operator=(const OomMemoryDetails&) = delete;
+
// Logs the memory details asynchronously.
// The |title| is printed at the beginning of the message.
static void Log(const std::string& title);
@@ -31,8 +34,6 @@
std::string title_;
base::TimeTicks start_time_;
-
- DISALLOW_COPY_AND_ASSIGN(OomMemoryDetails);
};
} // namespace memory
diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h
index d494029..f2611ee 100644
--- a/chrome/browser/memory_details.h
+++ b/chrome/browser/memory_details.h
@@ -115,6 +115,9 @@
// Constructor.
MemoryDetails();
+ MemoryDetails(const MemoryDetails&) = delete;
+ MemoryDetails& operator=(const MemoryDetails&) = delete;
+
// Initiate updating the current memory details. These are fetched
// asynchronously because data must be collected from multiple threads.
// OnDetailsAvailable will be called when this process is complete.
@@ -167,8 +170,6 @@
#if BUILDFLAG(IS_CHROMEOS_ASH)
base::SwapInfo swap_info_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(MemoryDetails);
};
#endif // CHROME_BROWSER_MEMORY_DETAILS_H_
diff --git a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
index 585de44..7287a90 100644
--- a/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
+++ b/chrome/browser/metrics/antivirus_metrics_provider_win_unittest.cc
@@ -73,6 +73,10 @@
provider_.SetRemoteUtilWinForTesting(std::move(remote));
}
+ AntiVirusMetricsProviderTest(const AntiVirusMetricsProviderTest&) = delete;
+ AntiVirusMetricsProviderTest& operator=(const AntiVirusMetricsProviderTest&) =
+ delete;
+
void GetMetricsCallback() {
// Check that the callback runs on the main loop.
ASSERT_TRUE(thread_checker_.CalledOnValidThread());
@@ -110,9 +114,6 @@
AntiVirusMetricsProvider provider_;
base::test::ScopedFeatureList scoped_feature_list_;
base::ThreadCheckerImpl thread_checker_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AntiVirusMetricsProviderTest);
};
// TODO(crbug.com/682286): Flaky on Windows 10.
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor.h b/chrome/browser/metrics/chrome_metrics_service_accessor.h
index 4da4c523..98cd20a 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor.h
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor.h
@@ -94,6 +94,11 @@
// as a 'friend' below.
class ChromeMetricsServiceAccessor : public metrics::MetricsServiceAccessor {
public:
+ ChromeMetricsServiceAccessor() = delete;
+ ChromeMetricsServiceAccessor(const ChromeMetricsServiceAccessor&) = delete;
+ ChromeMetricsServiceAccessor& operator=(const ChromeMetricsServiceAccessor&) =
+ delete;
+
// This test method is public so tests don't need to befriend this class.
// If arg is non-null, the value will be returned from future calls to
@@ -192,8 +197,6 @@
static void BindMetricsServiceReceiver(
mojo::PendingReceiver<chrome::mojom::MetricsService> receiver);
#endif // BUILDFLAG(ENABLE_PLUGINS)
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeMetricsServiceAccessor);
};
#endif // CHROME_BROWSER_METRICS_CHROME_METRICS_SERVICE_ACCESSOR_H_
diff --git a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
index d78bb59..c88a886 100644
--- a/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_accessor_unittest.cc
@@ -20,6 +20,11 @@
: testing_local_state_(TestingBrowserProcess::GetGlobal()) {
}
+ ChromeMetricsServiceAccessorTest(const ChromeMetricsServiceAccessorTest&) =
+ delete;
+ ChromeMetricsServiceAccessorTest& operator=(
+ const ChromeMetricsServiceAccessorTest&) = delete;
+
PrefService* GetLocalState() {
return testing_local_state_.Get();
}
@@ -27,8 +32,6 @@
private:
content::BrowserTaskEnvironment task_environment_;
ScopedTestingLocalState testing_local_state_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceAccessorTest);
};
TEST_F(ChromeMetricsServiceAccessorTest, MetricsReportingEnabled) {
diff --git a/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc b/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
index 2ed2e334..f60287e 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client_unittest.cc
@@ -50,6 +50,11 @@
: profile_manager_(TestingBrowserProcess::GetGlobal()),
enabled_state_provider_(false /* consent */, false /* enabled */) {}
+ ChromeMetricsServiceClientTest(const ChromeMetricsServiceClientTest&) =
+ delete;
+ ChromeMetricsServiceClientTest& operator=(
+ const ChromeMetricsServiceClientTest&) = delete;
+
void SetUp() override {
testing::Test::SetUp();
metrics::MetricsService::RegisterPrefs(prefs_.registry());
@@ -85,9 +90,6 @@
std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_;
metrics::TestEnabledStateProvider enabled_state_provider_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeMetricsServiceClientTest);
};
namespace {
diff --git a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
index 0cfd11c..62798ad 100644
--- a/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/chromeos_metrics_provider_unittest.cc
@@ -86,6 +86,10 @@
public:
ChromeOSMetricsProviderTest() {}
+ ChromeOSMetricsProviderTest(const ChromeOSMetricsProviderTest&) = delete;
+ ChromeOSMetricsProviderTest& operator=(const ChromeOSMetricsProviderTest&) =
+ delete;
+
protected:
void SetUp() override {
// Set up a PowerManagerClient instance for PerfProvider.
@@ -137,8 +141,6 @@
private:
content::BrowserTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeOSMetricsProviderTest);
};
TEST_F(ChromeOSMetricsProviderTest, MultiProfileUserCount) {
diff --git a/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc b/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc
index 87a6527..0fe57d9 100644
--- a/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc
+++ b/chrome/browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc
@@ -24,6 +24,10 @@
public:
MockAudibleContentsObserver() {}
+ MockAudibleContentsObserver(const MockAudibleContentsObserver&) = delete;
+ MockAudibleContentsObserver& operator=(const MockAudibleContentsObserver&) =
+ delete;
+
// AudibleContentsTracker::Observer:
void OnAudioStart() override { is_audio_playing_ = true; }
void OnAudioEnd() override { is_audio_playing_ = false; }
@@ -32,8 +36,6 @@
private:
bool is_audio_playing_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(MockAudibleContentsObserver);
};
} // namespace
@@ -42,6 +44,10 @@
public:
AudibleContentsTrackerTest() {}
+ AudibleContentsTrackerTest(const AudibleContentsTrackerTest&) = delete;
+ AudibleContentsTrackerTest& operator=(const AudibleContentsTrackerTest&) =
+ delete;
+
void SetUp() override {
observer_ = std::make_unique<MockAudibleContentsObserver>();
tracker_ = std::make_unique<metrics::AudibleContentsTracker>(observer());
@@ -65,8 +71,6 @@
private:
std::unique_ptr<MockAudibleContentsObserver> observer_;
std::unique_ptr<metrics::AudibleContentsTracker> tracker_;
-
- DISALLOW_COPY_AND_ASSIGN(AudibleContentsTrackerTest);
};
// TODO(crbug.com/1124845): Flaky on Win7 32-bit.
diff --git a/chrome/browser/metrics/desktop_session_duration/chrome_visibility_observer_interactive_uitest.cc b/chrome/browser/metrics/desktop_session_duration/chrome_visibility_observer_interactive_uitest.cc
index 5f22cb6c..c3e6e28c 100644
--- a/chrome/browser/metrics/desktop_session_duration/chrome_visibility_observer_interactive_uitest.cc
+++ b/chrome/browser/metrics/desktop_session_duration/chrome_visibility_observer_interactive_uitest.cc
@@ -24,6 +24,11 @@
SetVisibilityGapTimeoutForTesting(base::TimeDelta());
}
+ ChromeVisibilityObserverInteractiveTest(
+ const ChromeVisibilityObserverInteractiveTest&) = delete;
+ ChromeVisibilityObserverInteractiveTest& operator=(
+ const ChromeVisibilityObserverInteractiveTest&) = delete;
+
bool is_active() const { return is_active_; }
private:
@@ -34,8 +39,6 @@
}
bool is_active_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeVisibilityObserverInteractiveTest);
};
// This test doesn't check whether switching between browser windows results in
diff --git a/chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h b/chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h
index ec8fb32..2178565 100644
--- a/chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h
+++ b/chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h
@@ -26,6 +26,11 @@
static DesktopProfileSessionDurationsServiceFactory* GetInstance();
+ DesktopProfileSessionDurationsServiceFactory(
+ const DesktopProfileSessionDurationsServiceFactory&) = delete;
+ DesktopProfileSessionDurationsServiceFactory& operator=(
+ const DesktopProfileSessionDurationsServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
DesktopProfileSessionDurationsServiceFactory>;
@@ -38,8 +43,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopProfileSessionDurationsServiceFactory);
};
} // namespace metrics
diff --git a/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h b/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h
index 3764284..ef8a66f 100644
--- a/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h
+++ b/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h
@@ -39,6 +39,10 @@
// Returns the |DesktopSessionDurationTracker| instance.
static DesktopSessionDurationTracker* Get();
+ DesktopSessionDurationTracker(const DesktopSessionDurationTracker&) = delete;
+ DesktopSessionDurationTracker& operator=(
+ const DesktopSessionDurationTracker&) = delete;
+
// Called when user interaction with the browser is caught.
void OnUserEvent();
@@ -112,8 +116,6 @@
AudibleContentsTracker audio_tracker_;
base::WeakPtrFactory<DesktopSessionDurationTracker> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DesktopSessionDurationTracker);
};
} // namespace metrics
diff --git a/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker_unittest.cc b/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker_unittest.cc
index 2824ed8..8586778 100644
--- a/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker_unittest.cc
+++ b/chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker_unittest.cc
@@ -21,6 +21,11 @@
public:
MockDesktopSessionDurationTracker() {}
+ MockDesktopSessionDurationTracker(const MockDesktopSessionDurationTracker&) =
+ delete;
+ MockDesktopSessionDurationTracker& operator=(
+ const MockDesktopSessionDurationTracker&) = delete;
+
bool is_timeout() const { return time_out_; }
using DesktopSessionDurationTracker::OnAudioStart;
@@ -34,8 +39,6 @@
private:
bool time_out_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(MockDesktopSessionDurationTracker);
};
// Mock class for |DesktopSessionDurationTracker::Observer| for testing.
@@ -44,6 +47,10 @@
public:
MockDesktopSessionObserver() {}
+ MockDesktopSessionObserver(const MockDesktopSessionObserver&) = delete;
+ MockDesktopSessionObserver& operator=(const MockDesktopSessionObserver&) =
+ delete;
+
int session_started_count() const { return session_started_count_; }
int session_ended_count() const { return session_ended_count_; }
@@ -60,14 +67,17 @@
private:
int session_started_count_ = false;
int session_ended_count_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(MockDesktopSessionObserver);
};
class DesktopSessionDurationTrackerTest : public testing::Test {
public:
DesktopSessionDurationTrackerTest() {}
+ DesktopSessionDurationTrackerTest(const DesktopSessionDurationTrackerTest&) =
+ delete;
+ DesktopSessionDurationTrackerTest& operator=(
+ const DesktopSessionDurationTrackerTest&) = delete;
+
void SetUp() override {
metrics::DesktopSessionDurationTracker::Initialize();
instance_.SetInactivityTimeoutForTesting(kInactivityTimeoutForTesting);
@@ -91,8 +101,6 @@
private:
base::test::SingleThreadTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(DesktopSessionDurationTrackerTest);
};
} // namespace
diff --git a/chrome/browser/metrics/first_web_contents_profiler.cc b/chrome/browser/metrics/first_web_contents_profiler.cc
index 73d22f2f..b0cd8cf 100644
--- a/chrome/browser/metrics/first_web_contents_profiler.cc
+++ b/chrome/browser/metrics/first_web_contents_profiler.cc
@@ -66,6 +66,9 @@
public:
explicit FirstWebContentsProfiler(content::WebContents* web_contents);
+ FirstWebContentsProfiler(const FirstWebContentsProfiler&) = delete;
+ FirstWebContentsProfiler& operator=(const FirstWebContentsProfiler&) = delete;
+
private:
~FirstWebContentsProfiler() override = default;
@@ -87,8 +90,6 @@
// Memory pressure listener that will be used to check if memory pressure has
// an impact on startup.
base::MemoryPressureListener memory_pressure_listener_;
-
- DISALLOW_COPY_AND_ASSIGN(FirstWebContentsProfiler);
};
FirstWebContentsProfiler::FirstWebContentsProfiler(
diff --git a/chrome/browser/metrics/metrics_memory_details.h b/chrome/browser/metrics/metrics_memory_details.h
index 72ab2ec..4c1bb5f5 100644
--- a/chrome/browser/metrics/metrics_memory_details.h
+++ b/chrome/browser/metrics/metrics_memory_details.h
@@ -17,6 +17,9 @@
public:
explicit MetricsMemoryDetails(base::OnceClosure callback);
+ MetricsMemoryDetails(const MetricsMemoryDetails&) = delete;
+ MetricsMemoryDetails& operator=(const MetricsMemoryDetails&) = delete;
+
protected:
~MetricsMemoryDetails() override;
@@ -30,8 +33,6 @@
void UpdateSiteIsolationMetrics();
base::OnceClosure callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsMemoryDetails);
};
#endif // CHROME_BROWSER_METRICS_METRICS_MEMORY_DETAILS_H_
diff --git a/chrome/browser/metrics/metrics_reporting_state_browsertest.cc b/chrome/browser/metrics/metrics_reporting_state_browsertest.cc
index b2affff..abb4d66 100644
--- a/chrome/browser/metrics/metrics_reporting_state_browsertest.cc
+++ b/chrome/browser/metrics/metrics_reporting_state_browsertest.cc
@@ -42,14 +42,17 @@
: expected_metrics_reporting_enabled_(
expected_metrics_reporting_enabled) {}
+ ChromeBrowserMainExtraPartsChecker(
+ const ChromeBrowserMainExtraPartsChecker&) = delete;
+ ChromeBrowserMainExtraPartsChecker& operator=(
+ const ChromeBrowserMainExtraPartsChecker&) = delete;
+
// ChromeBrowserMainExtraParts:
void PostEarlyInitialization() override;
private:
// Expected value of reporting state.
const bool expected_metrics_reporting_enabled_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsChecker);
};
// This class is used to verify the value for
diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc
index bc3dc76..e500221 100644
--- a/chrome/browser/metrics/metrics_service_browsertest.cc
+++ b/chrome/browser/metrics/metrics_service_browsertest.cc
@@ -87,6 +87,10 @@
public:
MetricsServiceBrowserTest() {}
+ MetricsServiceBrowserTest(const MetricsServiceBrowserTest&) = delete;
+ MetricsServiceBrowserTest& operator=(const MetricsServiceBrowserTest&) =
+ delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
// Enable the metrics service for testing (in recording-only mode).
command_line->AppendSwitch(metrics::switches::kMetricsRecordingOnly);
@@ -151,8 +155,6 @@
private:
bool metrics_consent_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceBrowserTest);
};
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, CloseRenderersNormally) {
@@ -308,6 +310,11 @@
public:
MetricsServiceBrowserFilesTest() {}
+ MetricsServiceBrowserFilesTest(const MetricsServiceBrowserFilesTest&) =
+ delete;
+ MetricsServiceBrowserFilesTest& operator=(
+ const MetricsServiceBrowserFilesTest&) = delete;
+
bool SetUpUserDataDirectory() override {
if (!super::SetUpUserDataDirectory())
return false;
@@ -379,8 +386,6 @@
private:
bool metrics_consent_ = true;
base::FilePath upload_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceBrowserFilesTest);
};
// Specific class for testing when metrics upload is fully enabled.
@@ -389,6 +394,11 @@
public:
MetricsServiceBrowserDoUploadTest() {}
+ MetricsServiceBrowserDoUploadTest(const MetricsServiceBrowserDoUploadTest&) =
+ delete;
+ MetricsServiceBrowserDoUploadTest& operator=(
+ const MetricsServiceBrowserDoUploadTest&) = delete;
+
void SetUp() override {
set_metrics_consent(true);
feature_list_.InitAndEnableFeature(
@@ -398,8 +408,6 @@
private:
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceBrowserDoUploadTest);
};
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserDoUploadTest, FilesRemain) {
@@ -413,6 +421,11 @@
public:
MetricsServiceBrowserNoUploadTest() {}
+ MetricsServiceBrowserNoUploadTest(const MetricsServiceBrowserNoUploadTest&) =
+ delete;
+ MetricsServiceBrowserNoUploadTest& operator=(
+ const MetricsServiceBrowserNoUploadTest&) = delete;
+
void SetUp() override {
set_metrics_consent(false);
feature_list_.InitAndEnableFeature(
@@ -422,8 +435,6 @@
private:
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceBrowserNoUploadTest);
};
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserNoUploadTest, FilesRemoved) {
@@ -437,6 +448,11 @@
public:
MetricsServiceBrowserSampledOutTest() {}
+ MetricsServiceBrowserSampledOutTest(
+ const MetricsServiceBrowserSampledOutTest&) = delete;
+ MetricsServiceBrowserSampledOutTest& operator=(
+ const MetricsServiceBrowserSampledOutTest&) = delete;
+
void SetUp() override {
set_metrics_consent(true);
feature_list_.InitAndDisableFeature(
@@ -446,8 +462,6 @@
private:
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceBrowserSampledOutTest);
};
IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserSampledOutTest, FilesRemoved) {
diff --git a/chrome/browser/metrics/metrics_service_user_demographics_browsertest.cc b/chrome/browser/metrics/metrics_service_user_demographics_browsertest.cc
index 321e0e7..24f552e 100644
--- a/chrome/browser/metrics/metrics_service_user_demographics_browsertest.cc
+++ b/chrome/browser/metrics/metrics_service_user_demographics_browsertest.cc
@@ -60,6 +60,11 @@
}
}
+ MetricsServiceUserDemographicsBrowserTest(
+ const MetricsServiceUserDemographicsBrowserTest&) = delete;
+ MetricsServiceUserDemographicsBrowserTest& operator=(
+ const MetricsServiceUserDemographicsBrowserTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
SyncTest::SetUpCommandLine(command_line);
// Enable the metrics service for testing (in recording-only mode).
@@ -89,8 +94,6 @@
bool metrics_consent_ = true;
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsServiceUserDemographicsBrowserTest);
};
// TODO(crbug/1016118): Add the remaining test cases.
diff --git a/chrome/browser/metrics/perf/metric_collector_unittest.cc b/chrome/browser/metrics/perf/metric_collector_unittest.cc
index f423103..bab07f6 100644
--- a/chrome/browser/metrics/perf/metric_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/metric_collector_unittest.cc
@@ -81,6 +81,9 @@
explicit TestMetricCollector(const CollectionParams& collection_params)
: MetricCollector("Test", collection_params) {}
+ TestMetricCollector(const TestMetricCollector&) = delete;
+ TestMetricCollector& operator=(const TestMetricCollector&) = delete;
+
const char* ToolName() const override { return "Test"; }
base::WeakPtr<MetricCollector> GetWeakPtr() override {
return weak_factory_.GetWeakPtr();
@@ -109,8 +112,6 @@
private:
base::WeakPtrFactory<TestMetricCollector> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TestMetricCollector);
};
const base::TimeDelta kPeriodicCollectionInterval =
@@ -125,6 +126,9 @@
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
perf_data_proto_(GetExamplePerfDataProto()) {}
+ MetricCollectorTest(const MetricCollectorTest&) = delete;
+ MetricCollectorTest& operator=(const MetricCollectorTest&) = delete;
+
void SaveProfile(std::unique_ptr<SampledProfile> sampled_profile) {
cached_profile_data_.resize(cached_profile_data_.size() + 1);
cached_profile_data_.back().Swap(sampled_profile.get());
@@ -166,8 +170,6 @@
// Store sample perf data protobuf for testing.
PerfDataProto perf_data_proto_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricCollectorTest);
};
TEST_F(MetricCollectorTest, CheckSetup) {
diff --git a/chrome/browser/metrics/perf/metric_provider_unittest.cc b/chrome/browser/metrics/perf/metric_provider_unittest.cc
index d7f5c40..9133aeb 100644
--- a/chrome/browser/metrics/perf/metric_provider_unittest.cc
+++ b/chrome/browser/metrics/perf/metric_provider_unittest.cc
@@ -105,6 +105,9 @@
: internal::MetricCollector("UMA.CWP.TestData", collection_params),
weak_factory_(this) {}
+ TestMetricCollector(const TestMetricCollector&) = delete;
+ TestMetricCollector& operator=(const TestMetricCollector&) = delete;
+
const char* ToolName() const override { return "Test"; }
base::WeakPtr<internal::MetricCollector> GetWeakPtr() override {
return weak_factory_.GetWeakPtr();
@@ -119,8 +122,6 @@
private:
base::WeakPtrFactory<TestMetricCollector> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(TestMetricCollector);
};
const base::TimeDelta kPeriodicCollectionInterval =
@@ -134,6 +135,9 @@
MetricProviderTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ MetricProviderTest(const MetricProviderTest&) = delete;
+ MetricProviderTest& operator=(const MetricProviderTest&) = delete;
+
void SetUp() override {
CollectionParams test_params;
// Set the sampling factors for the triggers to 1, so we always trigger
@@ -160,8 +164,6 @@
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestMetricProvider> metric_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricProviderTest);
};
TEST_F(MetricProviderTest, CheckSetup) {
@@ -300,6 +302,11 @@
MetricProviderSyncSettingsTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ MetricProviderSyncSettingsTest(const MetricProviderSyncSettingsTest&) =
+ delete;
+ MetricProviderSyncSettingsTest& operator=(
+ const MetricProviderSyncSettingsTest&) = delete;
+
void SetUp() override {
CollectionParams test_params;
test_params.periodic_interval = kPeriodicCollectionInterval;
@@ -378,8 +385,6 @@
PerfDataProto perf_data_unchanged_;
PerfDataProto perf_data_redacted_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricProviderSyncSettingsTest);
};
TEST_F(MetricProviderSyncSettingsTest, NoLoadedUserProfile) {
diff --git a/chrome/browser/metrics/perf/perf_events_collector_unittest.cc b/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
index 8cce00c..b58c6da 100644
--- a/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/perf_events_collector_unittest.cc
@@ -153,6 +153,9 @@
return base::WrapUnique(new TestIncognitoObserver(incognito_launched));
}
+ TestIncognitoObserver(const TestIncognitoObserver&) = delete;
+ TestIncognitoObserver& operator=(const TestIncognitoObserver&) = delete;
+
bool IncognitoLaunched() const override { return incognito_launched_; }
private:
@@ -161,8 +164,6 @@
incognito_launched_(incognito_launched) {}
bool incognito_launched_;
-
- DISALLOW_COPY_AND_ASSIGN(TestIncognitoObserver);
};
// Allows access to some private methods for testing.
@@ -170,6 +171,9 @@
public:
TestPerfCollector() = default;
+ TestPerfCollector(const TestPerfCollector&) = delete;
+ TestPerfCollector& operator=(const TestPerfCollector&) = delete;
+
using MetricCollector::CollectionAttemptStatus;
using MetricCollector::CollectPerfDataAfterSessionRestore;
using MetricCollector::OnJankStarted;
@@ -214,8 +218,6 @@
PerfOutputCall::DoneCallback real_callback_;
bool collection_stopped_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(TestPerfCollector);
};
const base::TimeDelta kPeriodicCollectionInterval =
@@ -239,6 +241,9 @@
PerfCollectorTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ PerfCollectorTest(const PerfCollectorTest&) = delete;
+ PerfCollectorTest& operator=(const PerfCollectorTest&) = delete;
+
void SaveProfile(std::unique_ptr<SampledProfile> sampled_profile) {
cached_profile_data_.resize(cached_profile_data_.size() + 1);
cached_profile_data_.back().Swap(sampled_profile.get());
@@ -278,8 +283,6 @@
std::unique_ptr<TestPerfCollector> perf_collector_;
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(PerfCollectorTest);
};
TEST_F(PerfCollectorTest, CheckSetup) {
@@ -1107,14 +1110,17 @@
public:
PerfCollectorCollectionParamsTest() {}
+ PerfCollectorCollectionParamsTest(const PerfCollectorCollectionParamsTest&) =
+ delete;
+ PerfCollectorCollectionParamsTest& operator=(
+ const PerfCollectorCollectionParamsTest&) = delete;
+
void TearDown() override {
variations::testing::ClearAllVariationParams();
}
protected:
content::BrowserTaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(PerfCollectorCollectionParamsTest);
};
TEST_F(PerfCollectorCollectionParamsTest, Commands_InitializedAfterVariations) {
diff --git a/chrome/browser/metrics/perf/perf_output_unittest.cc b/chrome/browser/metrics/perf/perf_output_unittest.cc
index ae4162b..a004b65 100644
--- a/chrome/browser/metrics/perf/perf_output_unittest.cc
+++ b/chrome/browser/metrics/perf/perf_output_unittest.cc
@@ -131,6 +131,9 @@
public:
PerfOutputCallTest() = default;
+ PerfOutputCallTest(const PerfOutputCallTest&) = delete;
+ PerfOutputCallTest& operator=(const PerfOutputCallTest&) = delete;
+
void SetUp() override {
debug_daemon_client_ = std::make_unique<FakeDebugDaemonClient>();
}
@@ -151,8 +154,6 @@
std::unique_ptr<PerfOutputCall> perf_output_call_;
std::string perf_output_;
-
- DISALLOW_COPY_AND_ASSIGN(PerfOutputCallTest);
};
// Test getting perf output after profile duration elapses.
diff --git a/chrome/browser/metrics/perf/process_type_collector_unittest.cc b/chrome/browser/metrics/perf/process_type_collector_unittest.cc
index 50c289f..803f5b75 100644
--- a/chrome/browser/metrics/perf/process_type_collector_unittest.cc
+++ b/chrome/browser/metrics/perf/process_type_collector_unittest.cc
@@ -195,8 +195,8 @@
using ProcessTypeCollector::ParseProcessTypes;
using ProcessTypeCollector::ParseThreadTypes;
- private:
- DISALLOW_COPY_AND_ASSIGN(TestProcessTypeCollector);
+ TestProcessTypeCollector(const TestProcessTypeCollector&) = delete;
+ TestProcessTypeCollector& operator=(const TestProcessTypeCollector&) = delete;
};
} // namespace
diff --git a/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc b/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
index 357a7d0..2b9161a8 100644
--- a/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
+++ b/chrome/browser/metrics/perf/profile_provider_chromeos_unittest.cc
@@ -67,6 +67,9 @@
explicit TestMetricCollector(const CollectionParams& collection_params)
: internal::MetricCollector("UMA.CWP.TestData", collection_params) {}
+ TestMetricCollector(const TestMetricCollector&) = delete;
+ TestMetricCollector& operator=(const TestMetricCollector&) = delete;
+
const char* ToolName() const override { return "test"; }
base::WeakPtr<internal::MetricCollector> GetWeakPtr() override {
return weak_factory_.GetWeakPtr();
@@ -85,8 +88,6 @@
private:
base::WeakPtrFactory<TestMetricCollector> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TestMetricCollector);
};
const base::TimeDelta kPeriodicCollectionInterval =
@@ -122,8 +123,8 @@
using ProfileProvider::OnSessionRestoreDone;
using ProfileProvider::SuspendDone;
- private:
- DISALLOW_COPY_AND_ASSIGN(TestProfileProvider);
+ TestProfileProvider(const TestProfileProvider&) = delete;
+ TestProfileProvider& operator=(const TestProfileProvider&) = delete;
};
template <SampledProfile_TriggerEvent TRIGGER_TYPE>
@@ -150,6 +151,9 @@
ProfileProviderTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ ProfileProviderTest(const ProfileProviderTest&) = delete;
+ ProfileProviderTest& operator=(const ProfileProviderTest&) = delete;
+
void SetUp() override {
// ProfileProvider requires chromeos::LoginState and
// chromeos::PowerManagerClient to be initialized.
@@ -173,8 +177,6 @@
content::BrowserTaskEnvironment task_environment_;
std::unique_ptr<TestProfileProvider> profile_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileProviderTest);
};
TEST_F(ProfileProviderTest, CheckSetup) {
@@ -486,8 +488,8 @@
using ProfileProvider::collectors_;
- private:
- DISALLOW_COPY_AND_ASSIGN(TestStockProfileProvider);
+ TestStockProfileProvider(const TestStockProfileProvider&) = delete;
+ TestStockProfileProvider& operator=(const TestStockProfileProvider&) = delete;
};
} // namespace
@@ -496,6 +498,9 @@
public:
ProfileProviderStockTest() = default;
+ ProfileProviderStockTest(const ProfileProviderStockTest&) = delete;
+ ProfileProviderStockTest& operator=(const ProfileProviderStockTest&) = delete;
+
void SetUp() override {
// ProfileProvider requires chromeos::LoginState and
// chromeos::PowerManagerClient to be initialized.
@@ -510,9 +515,6 @@
protected:
content::BrowserTaskEnvironment task_environment_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProfileProviderStockTest);
};
TEST_F(ProfileProviderStockTest, CheckSetup) {
diff --git a/chrome/browser/metrics/perf/profile_provider_unittest_main.cc b/chrome/browser/metrics/perf/profile_provider_unittest_main.cc
index 0d4e4b2..9111872 100644
--- a/chrome/browser/metrics/perf/profile_provider_unittest_main.cc
+++ b/chrome/browser/metrics/perf/profile_provider_unittest_main.cc
@@ -81,6 +81,9 @@
collectors_.push_back(std::move(metric_provider));
}
+ TestProfileProvider(const TestProfileProvider&) = delete;
+ TestProfileProvider& operator=(const TestProfileProvider&) = delete;
+
void WaitUntilCollectionDone() {
// Collection shouldn't be done when this method is called, or the test will
// waste time in |run_loop_| for the duration of |timeout|.
@@ -121,8 +124,6 @@
base::OneShotTimer timeout_timer_;
base::RunLoop run_loop_;
bool collection_done_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(TestProfileProvider);
};
// This test doesn't mock any class used indirectly by ProfileProvider to make
@@ -131,6 +132,11 @@
public:
ProfileProviderRealCollectionTest() {}
+ ProfileProviderRealCollectionTest(const ProfileProviderRealCollectionTest&) =
+ delete;
+ ProfileProviderRealCollectionTest& operator=(
+ const ProfileProviderRealCollectionTest&) = delete;
+
void SetUp() override {
chromeos::DBusThreadManager::Initialize();
// ProfileProvider requires chromeos::LoginState and
@@ -260,8 +266,6 @@
base::WaitableEvent spin_cpu_done_;
std::unique_ptr<TestProfileProvider> profile_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileProviderRealCollectionTest);
};
// Flaky on chromeos: crbug.com/1184119
diff --git a/chrome/browser/metrics/perf/random_selector_unittest.cc b/chrome/browser/metrics/perf/random_selector_unittest.cc
index 7749f50..aad4dbd 100644
--- a/chrome/browser/metrics/perf/random_selector_unittest.cc
+++ b/chrome/browser/metrics/perf/random_selector_unittest.cc
@@ -27,6 +27,10 @@
explicit RandomSelectorWithCustomRNG(unsigned int random_period)
: random_period_(random_period), current_index_(0) {}
+ RandomSelectorWithCustomRNG(const RandomSelectorWithCustomRNG&) = delete;
+ RandomSelectorWithCustomRNG& operator=(const RandomSelectorWithCustomRNG&) =
+ delete;
+
private:
// This function returns floats between 0.0 and |max| in an increasing
// fashion at regular intervals.
@@ -41,8 +45,6 @@
// Stores the current position we are at in the interval between 0.0 and
// |max|. See the function RandDoubleUpTo for details on how this is used.
int current_index_;
-
- DISALLOW_COPY_AND_ASSIGN(RandomSelectorWithCustomRNG);
};
// Use the random_selector to generate some values. The number of values to
diff --git a/chrome/browser/metrics/perf/windowed_incognito_observer.h b/chrome/browser/metrics/perf/windowed_incognito_observer.h
index 2203360..f856386 100644
--- a/chrome/browser/metrics/perf/windowed_incognito_observer.h
+++ b/chrome/browser/metrics/perf/windowed_incognito_observer.h
@@ -71,6 +71,9 @@
// request for monitoring any incognito window launches from now on.
static std::unique_ptr<WindowedIncognitoObserver> CreateObserver();
+ WindowedIncognitoMonitor(const WindowedIncognitoMonitor&) = delete;
+ WindowedIncognitoMonitor& operator=(const WindowedIncognitoMonitor&) = delete;
+
protected:
static WindowedIncognitoMonitor* Get();
@@ -120,8 +123,6 @@
uint64_t num_incognito_window_opened_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(WindowedIncognitoMonitor);
};
} // namespace metrics
diff --git a/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc b/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
index 3706d53..06449030 100644
--- a/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
+++ b/chrome/browser/metrics/perf/windowed_incognito_observer_unittest.cc
@@ -20,6 +20,10 @@
public:
TestWindowedIncognitoMonitor() : WindowedIncognitoMonitor() {}
+ TestWindowedIncognitoMonitor(const TestWindowedIncognitoMonitor&) = delete;
+ TestWindowedIncognitoMonitor& operator=(const TestWindowedIncognitoMonitor&) =
+ delete;
+
int num_on_browser_added() { return num_on_browser_added_; }
int num_on_browser_removed() { return num_on_browser_removed_; }
@@ -40,8 +44,6 @@
int num_on_browser_added_ = 0;
int num_on_browser_removed_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(TestWindowedIncognitoMonitor);
};
} // namespace
@@ -50,6 +52,10 @@
public:
WindowedIncognitoMonitorTest() = default;
+ WindowedIncognitoMonitorTest(const WindowedIncognitoMonitorTest&) = delete;
+ WindowedIncognitoMonitorTest& operator=(const WindowedIncognitoMonitorTest&) =
+ delete;
+
void SetUp() override {
// Instantiate a testing profile.
TestingProfile::Builder profile_builder;
@@ -99,8 +105,6 @@
static size_t next_browser_id;
std::unique_ptr<TestWindowedIncognitoMonitor> incognito_monitor_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowedIncognitoMonitorTest);
};
size_t WindowedIncognitoMonitorTest::next_browser_id = 1;
diff --git a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
index d68727d..aa9b217 100644
--- a/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/plugin_metrics_provider_unittest.cc
@@ -38,6 +38,11 @@
}
class PluginMetricsProviderTest : public ::testing::Test {
+ public:
+ PluginMetricsProviderTest(const PluginMetricsProviderTest&) = delete;
+ PluginMetricsProviderTest& operator=(const PluginMetricsProviderTest&) =
+ delete;
+
protected:
PluginMetricsProviderTest()
: prefs_(new TestingPrefServiceSimple) {
@@ -50,8 +55,6 @@
private:
std::unique_ptr<TestingPrefServiceSimple> prefs_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginMetricsProviderTest);
};
} // namespace
diff --git a/chrome/browser/metrics/power/power_metrics_provider_mac.mm b/chrome/browser/metrics/power/power_metrics_provider_mac.mm
index 233a21a..30f70d1e 100644
--- a/chrome/browser/metrics/power/power_metrics_provider_mac.mm
+++ b/chrome/browser/metrics/power/power_metrics_provider_mac.mm
@@ -206,6 +206,9 @@
return impl;
}
+ Impl(const Impl&) = delete;
+ Impl& operator=(const Impl&) = delete;
+
private:
friend class base::RefCountedThreadSafe<Impl>;
Impl(base::mac::ScopedIOObject<io_object_t> connect)
@@ -289,8 +292,6 @@
SMCKey cpu_package_gpu_power_key_;
SMCKey gpu_0_power_key_;
SMCKey gpu_1_power_key_;
-
- DISALLOW_COPY_AND_ASSIGN(Impl);
};
PowerMetricsProvider::PowerMetricsProvider() = default;
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter.h b/chrome/browser/metrics/process_memory_metrics_emitter.h
index 59523f01..6447963 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter.h
+++ b/chrome/browser/metrics/process_memory_metrics_emitter.h
@@ -45,6 +45,10 @@
// Use this constructor to emit UKM from only a specified renderer's.
explicit ProcessMemoryMetricsEmitter(base::ProcessId pid_scope);
+ ProcessMemoryMetricsEmitter(const ProcessMemoryMetricsEmitter&) = delete;
+ ProcessMemoryMetricsEmitter& operator=(const ProcessMemoryMetricsEmitter&) =
+ delete;
+
// This must be called on the main thread of the browser process.
void FetchAndEmitProcessMemoryMetrics();
@@ -103,8 +107,6 @@
base::ProcessId pid_scope_ = base::kNullProcessId;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMetricsEmitter);
};
// A |PageInfo| describes some metrics about a particular page with respect to
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
index 4d2004f..e9a2a67 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter_browsertest.cc
@@ -103,6 +103,11 @@
ukm::TestUkmRecorder* recorder)
: run_loop_(run_loop), recorder_(recorder) {}
+ ProcessMemoryMetricsEmitterFake(const ProcessMemoryMetricsEmitterFake&) =
+ delete;
+ ProcessMemoryMetricsEmitterFake& operator=(
+ const ProcessMemoryMetricsEmitterFake&) = delete;
+
private:
~ProcessMemoryMetricsEmitterFake() override {}
@@ -133,8 +138,6 @@
bool finished_memory_dump_ = false;
bool finished_process_info_ = false;
ukm::TestUkmRecorder* recorder_;
-
- DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMetricsEmitterFake);
};
void CheckMemoryMetric(const std::string& name,
diff --git a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
index 356efb1..412dfdf 100644
--- a/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
+++ b/chrome/browser/metrics/process_memory_metrics_emitter_unittest.cc
@@ -59,6 +59,11 @@
MarkServiceRequestsInProgress();
}
+ ProcessMemoryMetricsEmitterFake(const ProcessMemoryMetricsEmitterFake&) =
+ delete;
+ ProcessMemoryMetricsEmitterFake& operator=(
+ const ProcessMemoryMetricsEmitterFake&) = delete;
+
void ReceivedMemoryDump(bool success,
std::unique_ptr<GlobalMemoryDump> ptr) override {
ProcessMemoryMetricsEmitter::ReceivedMemoryDump(success, std::move(ptr));
@@ -94,7 +99,6 @@
~ProcessMemoryMetricsEmitterFake() override {}
ukm::UkmRecorder* ukm_recorder_;
- DISALLOW_COPY_AND_ASSIGN(ProcessMemoryMetricsEmitterFake);
};
void SetAllocatorDumpMetric(ProcessMemoryDumpPtr& pmd,
diff --git a/chrome/browser/metrics/tab_stats/tab_stats_tracker.cc b/chrome/browser/metrics/tab_stats/tab_stats_tracker.cc
index db6e30917..d231bdf 100644
--- a/chrome/browser/metrics/tab_stats/tab_stats_tracker.cc
+++ b/chrome/browser/metrics/tab_stats/tab_stats_tracker.cc
@@ -274,6 +274,9 @@
tab_stats_tracker_(tab_stats_tracker),
ukm_source_id_(ukm::GetSourceIdForWebContentsDocument(web_contents)) {}
+ WebContentsUsageObserver(const WebContentsUsageObserver&) = delete;
+ WebContentsUsageObserver& operator=(const WebContentsUsageObserver&) = delete;
+
// content::WebContentsObserver:
void DidStartNavigation(
content::NavigationHandle* navigation_handle) override {
@@ -387,8 +390,6 @@
ukm::SourceId ukm_source_id_ = 0;
// The number of video currently playing in this tab.
size_t video_playing_count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(WebContentsUsageObserver);
};
void TabStatsTracker::OnBrowserAdded(Browser* browser) {
diff --git a/chrome/browser/metrics/tab_stats/tab_stats_tracker_browsertest.cc b/chrome/browser/metrics/tab_stats/tab_stats_tracker_browsertest.cc
index 46c05bf3..c728156 100644
--- a/chrome/browser/metrics/tab_stats/tab_stats_tracker_browsertest.cc
+++ b/chrome/browser/metrics/tab_stats/tab_stats_tracker_browsertest.cc
@@ -106,6 +106,10 @@
public:
TabStatsTrackerBrowserTest() = default;
+ TabStatsTrackerBrowserTest(const TabStatsTrackerBrowserTest&) = delete;
+ TabStatsTrackerBrowserTest& operator=(const TabStatsTrackerBrowserTest&) =
+ delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitchASCII(
switches::kAutoplayPolicy,
@@ -123,8 +127,6 @@
TabStatsTracker* tab_stats_tracker_{nullptr};
std::vector<std::unique_ptr<TestTabStatsObserver>> test_tab_stats_observers_;
-
- DISALLOW_COPY_AND_ASSIGN(TabStatsTrackerBrowserTest);
};
IN_PROC_BROWSER_TEST_F(TabStatsTrackerBrowserTest,
diff --git a/chrome/browser/metrics/tab_stats/tab_stats_tracker_unittest.cc b/chrome/browser/metrics/tab_stats/tab_stats_tracker_unittest.cc
index 50933aa6..9f203f5 100644
--- a/chrome/browser/metrics/tab_stats/tab_stats_tracker_unittest.cc
+++ b/chrome/browser/metrics/tab_stats/tab_stats_tracker_unittest.cc
@@ -146,13 +146,14 @@
GetIntervalHistogramName;
TestUmaStatsReportingDelegate() {}
+ TestUmaStatsReportingDelegate(const TestUmaStatsReportingDelegate&) = delete;
+ TestUmaStatsReportingDelegate& operator=(
+ const TestUmaStatsReportingDelegate&) = delete;
+
protected:
// Skip the check that ensures that there's at least one visible window as
// there's no window in the context of these tests.
bool IsChromeBackgroundedWithoutWindows() override { return false; }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestUmaStatsReportingDelegate);
};
class TabStatsTrackerTest : public ChromeRenderViewHostTestHarness {
@@ -168,6 +169,9 @@
tab_stats_tracker_ = std::make_unique<TestTabStatsTracker>(&pref_service_);
}
+ TabStatsTrackerTest(const TabStatsTrackerTest&) = delete;
+ TabStatsTrackerTest& operator=(const TabStatsTrackerTest&) = delete;
+
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
browser_ = CreateBrowserWithTestWindowForParams(
@@ -197,9 +201,6 @@
std::unique_ptr<Browser> browser_;
TabStripModel* tab_strip_model_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TabStatsTrackerTest);
};
TestTabStatsTracker::TestTabStatsTracker(PrefService* pref_service)
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc
index 76b1861..9b3f854 100644
--- a/chrome/browser/metrics/thread_watcher.cc
+++ b/chrome/browser/metrics/thread_watcher.cc
@@ -51,6 +51,9 @@
// one instance of this class exists.
class ThreadWatcherObserver : public content::NotificationObserver {
public:
+ ThreadWatcherObserver(const ThreadWatcherObserver&) = delete;
+ ThreadWatcherObserver& operator=(const ThreadWatcherObserver&) = delete;
+
// |wakeup_interval| specifies how often to wake up thread watchers due to
// new user activity.
static void Start(const base::TimeDelta& wakeup_interval);
@@ -86,8 +89,6 @@
// Subscription for receiving callbacks that a URL was opened from the
// omnibox.
base::CallbackListSubscription omnibox_url_opened_subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(ThreadWatcherObserver);
};
ThreadWatcherObserver* g_thread_watcher_observer_ = nullptr;
@@ -848,6 +849,9 @@
: base::Watchdog(duration, "Startup watchdog thread", true) {
}
+ StartupWatchDogThread(const StartupWatchDogThread&) = delete;
+ StartupWatchDogThread& operator=(const StartupWatchDogThread&) = delete;
+
// Alarm is called if the time expires after an Arm() without someone calling
// Disarm(). When Alarm goes off, in release mode we get the crash dump
// without crashing and in debug mode we break into the debugger.
@@ -858,9 +862,6 @@
WatchDogThread::PostTask(FROM_HERE, base::BindOnce(&metrics::StartupHang));
#endif
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StartupWatchDogThread);
};
// ShutdownWatchDogThread methods and members.
@@ -874,12 +875,12 @@
: base::Watchdog(duration, "Shutdown watchdog thread", true) {
}
+ ShutdownWatchDogThread(const ShutdownWatchDogThread&) = delete;
+ ShutdownWatchDogThread& operator=(const ShutdownWatchDogThread&) = delete;
+
// Alarm is called if the time expires after an Arm() without someone calling
// Disarm(). We crash the browser if this method is called.
void Alarm() override { metrics::ShutdownHang(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShutdownWatchDogThread);
};
} // namespace
diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h
index cefa583..91e3403 100644
--- a/chrome/browser/metrics/thread_watcher.h
+++ b/chrome/browser/metrics/thread_watcher.h
@@ -335,6 +335,9 @@
typedef std::map<std::string, UnresponsiveCountThreshold>
CrashOnHangThreadMap;
+ ThreadWatcherList(const ThreadWatcherList&) = delete;
+ ThreadWatcherList& operator=(const ThreadWatcherList&) = delete;
+
// This method posts a task on WatchDogThread to start watching all browser
// threads.
// This method is accessible on UI thread.
@@ -452,8 +455,6 @@
// Map of all registered watched threads, from thread_id to ThreadWatcher.
RegistrationList registered_;
-
- DISALLOW_COPY_AND_ASSIGN(ThreadWatcherList);
};
// Class for WatchDogThread and in its Init method, we start watching UI, IO,
diff --git a/chrome/browser/metrics/thread_watcher_android.h b/chrome/browser/metrics/thread_watcher_android.h
index c13bd84e..02d4f96 100644
--- a/chrome/browser/metrics/thread_watcher_android.h
+++ b/chrome/browser/metrics/thread_watcher_android.h
@@ -16,10 +16,11 @@
class ThreadWatcherAndroid {
public:
- static void RegisterApplicationStatusListener();
+ ThreadWatcherAndroid() = delete;
+ ThreadWatcherAndroid(const ThreadWatcherAndroid&) = delete;
+ ThreadWatcherAndroid& operator=(const ThreadWatcherAndroid&) = delete;
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadWatcherAndroid);
+ static void RegisterApplicationStatusListener();
};
#endif // CHROME_BROWSER_METRICS_THREAD_WATCHER_ANDROID_H_
diff --git a/chrome/browser/metrics/ukm_browsertest.cc b/chrome/browser/metrics/ukm_browsertest.cc
index e1be23e..1a5f0401 100644
--- a/chrome/browser/metrics/ukm_browsertest.cc
+++ b/chrome/browser/metrics/ukm_browsertest.cc
@@ -205,6 +205,9 @@
{internal::kMetricsReportingFeature});
}
+ UkmBrowserTestBase(const UkmBrowserTestBase&) = delete;
+ UkmBrowserTestBase& operator=(const UkmBrowserTestBase&) = delete;
+
#if !defined(OS_ANDROID)
ukm::UkmSource* NavigateAndGetSource(const GURL& url,
Browser* browser,
@@ -288,14 +291,15 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(UkmBrowserTestBase);
};
class UkmBrowserTest : public UkmBrowserTestBase {
public:
UkmBrowserTest() : UkmBrowserTestBase() {}
+ UkmBrowserTest(const UkmBrowserTest&) = delete;
+ UkmBrowserTest& operator=(const UkmBrowserTest&) = delete;
+
#if defined(OS_ANDROID)
void PreRunTestOnMainThread() override {
// At some point during set-up, Android's TabModelList is populated with a
@@ -311,15 +315,17 @@
EXPECT_EQ(0U, TabModelList::models().size());
}
#endif // defined(OS_ANDROID)
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UkmBrowserTest);
};
class UkmBrowserTestWithSyncTransport : public UkmBrowserTestBase {
public:
UkmBrowserTestWithSyncTransport() {}
+ UkmBrowserTestWithSyncTransport(const UkmBrowserTestWithSyncTransport&) =
+ delete;
+ UkmBrowserTestWithSyncTransport& operator=(
+ const UkmBrowserTestWithSyncTransport&) = delete;
+
void SetUpInProcessBrowserTestFixture() override {
// This is required to support (fake) secondary-account-signin (based on
// cookies) in tests. Without this, the real GaiaCookieManagerService would
@@ -338,8 +344,6 @@
private:
base::CallbackListSubscription test_signin_client_subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(UkmBrowserTestWithSyncTransport);
};
// This tests if UKM service is enabled/disabled appropriately based on an
@@ -351,6 +355,10 @@
public:
UkmConsentParamBrowserTest() : UkmBrowserTestBase() {}
+ UkmConsentParamBrowserTest(const UkmConsentParamBrowserTest&) = delete;
+ UkmConsentParamBrowserTest& operator=(const UkmConsentParamBrowserTest&) =
+ delete;
+
static bool IsMetricsAndCrashReportingEnabled() {
return ChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled();
}
@@ -377,8 +385,6 @@
private:
base::FilePath local_state_path_;
-
- DISALLOW_COPY_AND_ASSIGN(UkmConsentParamBrowserTest);
};
#endif // !defined(OS_ANDROID)
@@ -406,10 +412,13 @@
}
}
+ UkmBrowserTestWithDemographics(const UkmBrowserTestWithDemographics&) =
+ delete;
+ UkmBrowserTestWithDemographics& operator=(
+ const UkmBrowserTestWithDemographics&) = delete;
+
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(UkmBrowserTestWithDemographics);
};
// Make sure that UKM is disabled while an incognito window is open.
diff --git a/chrome/browser/metrics/upgrade_metrics_provider_unittest.cc b/chrome/browser/metrics/upgrade_metrics_provider_unittest.cc
index 15df427..c360558 100644
--- a/chrome/browser/metrics/upgrade_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/upgrade_metrics_provider_unittest.cc
@@ -13,6 +13,10 @@
public:
UpgradeMetricsProviderTest() {}
+ UpgradeMetricsProviderTest(const UpgradeMetricsProviderTest&) = delete;
+ UpgradeMetricsProviderTest& operator=(const UpgradeMetricsProviderTest&) =
+ delete;
+
void TestHistogramLevel(
UpgradeDetector::UpgradeNotificationAnnoyanceLevel level) {
UpgradeDetector::GetInstance()->set_upgrade_notification_stage(level);
@@ -24,8 +28,6 @@
private:
UpgradeMetricsProvider metrics_provider_;
-
- DISALLOW_COPY_AND_ASSIGN(UpgradeMetricsProviderTest);
};
TEST_F(UpgradeMetricsProviderTest, HistogramCheck) {
diff --git a/chrome/browser/metrics/variations/variations_http_headers_browsertest.cc b/chrome/browser/metrics/variations/variations_http_headers_browsertest.cc
index 0dd7c2ce..2259124 100644
--- a/chrome/browser/metrics/variations/variations_http_headers_browsertest.cc
+++ b/chrome/browser/metrics/variations/variations_http_headers_browsertest.cc
@@ -335,11 +335,13 @@
}
}
+ VariationsHttpHeadersBrowserTestWithRestrictedVisibility(
+ const VariationsHttpHeadersBrowserTestWithRestrictedVisibility&) = delete;
+ VariationsHttpHeadersBrowserTestWithRestrictedVisibility& operator=(
+ const VariationsHttpHeadersBrowserTestWithRestrictedVisibility&) = delete;
+
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(
- VariationsHttpHeadersBrowserTestWithRestrictedVisibility);
};
std::unique_ptr<net::test_server::HttpResponse>
diff --git a/chrome/browser/mouse_events_interactive_uitest.cc b/chrome/browser/mouse_events_interactive_uitest.cc
index 956f54b..cea5fbc 100644
--- a/chrome/browser/mouse_events_interactive_uitest.cc
+++ b/chrome/browser/mouse_events_interactive_uitest.cc
@@ -30,6 +30,9 @@
public:
MouseEventsTest() {}
+ MouseEventsTest(const MouseEventsTest&) = delete;
+ MouseEventsTest& operator=(const MouseEventsTest&) = delete;
+
// InProcessBrowserTest:
void SetUpOnMainThread() override {
ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
@@ -77,8 +80,6 @@
ui_controls::SendMouseMove(bounds.CenterPoint().x(), bounds.y() - 10);
WaitForTitle("onmouseout");
}
-
- DISALLOW_COPY_AND_ASSIGN(MouseEventsTest);
};
#if defined(OS_MAC)
diff --git a/chrome/browser/nacl_host/nacl_infobar_delegate.h b/chrome/browser/nacl_host/nacl_infobar_delegate.h
index 94e9642..30e0fed 100644
--- a/chrome/browser/nacl_host/nacl_infobar_delegate.h
+++ b/chrome/browser/nacl_host/nacl_infobar_delegate.h
@@ -17,6 +17,9 @@
// |infobar_manager|.
static void Create(infobars::ContentInfoBarManager* infobar_manager);
+ NaClInfoBarDelegate(const NaClInfoBarDelegate&) = delete;
+ NaClInfoBarDelegate& operator=(const NaClInfoBarDelegate&) = delete;
+
private:
NaClInfoBarDelegate();
~NaClInfoBarDelegate() override;
@@ -26,8 +29,6 @@
GURL GetLinkURL() const override;
std::u16string GetMessageText() const override;
int GetButtons() const override;
-
- DISALLOW_COPY_AND_ASSIGN(NaClInfoBarDelegate);
};
#endif // CHROME_BROWSER_NACL_HOST_NACL_INFOBAR_DELEGATE_H_
diff --git a/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc b/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc
index 7d1f8f52..59fb371 100644
--- a/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc
+++ b/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc
@@ -54,6 +54,11 @@
blink::features::kNavigationPredictor, params);
}
+ NavigationPredictorBrowserTest(const NavigationPredictorBrowserTest&) =
+ delete;
+ NavigationPredictorBrowserTest& operator=(
+ const NavigationPredictorBrowserTest&) = delete;
+
void SetUp() override {
https_server_ = std::make_unique<net::EmbeddedTestServer>(
net::EmbeddedTestServer::TYPE_HTTPS);
@@ -110,8 +115,6 @@
std::unique_ptr<net::EmbeddedTestServer> https_server_;
std::unique_ptr<ukm::TestAutoSetUkmRecorder> ukm_recorder_;
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationPredictorBrowserTest);
};
class TestObserver : public NavigationPredictorKeyedService::Observer {
diff --git a/chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h b/chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h
index 85eaea0..b49cf90 100644
--- a/chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h
+++ b/chrome/browser/navigation_predictor/navigation_predictor_keyed_service.h
@@ -95,6 +95,12 @@
explicit NavigationPredictorKeyedService(
content::BrowserContext* browser_context);
+
+ NavigationPredictorKeyedService(const NavigationPredictorKeyedService&) =
+ delete;
+ NavigationPredictorKeyedService& operator=(
+ const NavigationPredictorKeyedService&) = delete;
+
~NavigationPredictorKeyedService() override;
SearchEnginePreconnector* search_engine_preconnector();
@@ -149,8 +155,6 @@
base::TimeTicks last_web_contents_state_change_time_;
const base::TickClock* tick_clock_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationPredictorKeyedService);
};
#endif // CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_KEYED_SERVICE_H_
diff --git a/chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h b/chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h
index 89a4c9a..0aa7073 100644
--- a/chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h
+++ b/chrome/browser/navigation_predictor/navigation_predictor_keyed_service_factory.h
@@ -27,6 +27,11 @@
// Gets the LazyInstance that owns all NavigationPredictorKeyedServices.
static NavigationPredictorKeyedServiceFactory* GetInstance();
+ NavigationPredictorKeyedServiceFactory(
+ const NavigationPredictorKeyedServiceFactory&) = delete;
+ NavigationPredictorKeyedServiceFactory& operator=(
+ const NavigationPredictorKeyedServiceFactory&) = delete;
+
private:
friend struct base::LazyInstanceTraitsBase<
NavigationPredictorKeyedServiceFactory>;
@@ -37,8 +42,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationPredictorKeyedServiceFactory);
};
#endif // CHROME_BROWSER_NAVIGATION_PREDICTOR_NAVIGATION_PREDICTOR_KEYED_SERVICE_FACTORY_H_
diff --git a/chrome/browser/navigation_predictor/navigation_predictor_preconnect_client_browsertest.cc b/chrome/browser/navigation_predictor/navigation_predictor_preconnect_client_browsertest.cc
index 8e3ff37..6ab3ef5c 100644
--- a/chrome/browser/navigation_predictor/navigation_predictor_preconnect_client_browsertest.cc
+++ b/chrome/browser/navigation_predictor/navigation_predictor_preconnect_client_browsertest.cc
@@ -48,6 +48,11 @@
net::EmbeddedTestServer::TYPE_HTTPS);
}
+ NavigationPredictorPreconnectClientBrowserTest(
+ const NavigationPredictorPreconnectClientBrowserTest&) = delete;
+ NavigationPredictorPreconnectClientBrowserTest& operator=(
+ const NavigationPredictorPreconnectClientBrowserTest&) = delete;
+
void SetUp() override {
https_server_->ServeFilesFromSourceDirectory(
"chrome/test/data/navigation_predictor");
@@ -104,8 +109,6 @@
private:
base::test::ScopedFeatureList feature_list_;
std::unique_ptr<base::RunLoop> run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationPredictorPreconnectClientBrowserTest);
};
IN_PROC_BROWSER_TEST_F(NavigationPredictorPreconnectClientBrowserTest,
@@ -422,15 +425,17 @@
public:
NavigationPredictorPreconnectClientLocalURLBrowserTest() = default;
+ NavigationPredictorPreconnectClientLocalURLBrowserTest(
+ const NavigationPredictorPreconnectClientLocalURLBrowserTest&) = delete;
+ NavigationPredictorPreconnectClientLocalURLBrowserTest& operator=(
+ const NavigationPredictorPreconnectClientLocalURLBrowserTest&) = delete;
+
private:
void SetUpOnMainThread() override {
NavigationPredictorPreconnectClientBrowserTest::SetUpOnMainThread();
NavigationPredictorPreconnectClient::EnablePreconnectsForLocalIPsForTesting(
false);
}
-
- DISALLOW_COPY_AND_ASSIGN(
- NavigationPredictorPreconnectClientLocalURLBrowserTest);
};
IN_PROC_BROWSER_TEST_F(NavigationPredictorPreconnectClientLocalURLBrowserTest,
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index 12c8c49..e27db8b 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -11,6 +11,9 @@
// TODO(jam): rename this class.
class ChromeNetworkDelegate {
public:
+ ChromeNetworkDelegate(const ChromeNetworkDelegate&) = delete;
+ ChromeNetworkDelegate& operator=(const ChromeNetworkDelegate&) = delete;
+
// Returns true if access to |path| is allowed. |profile_path| is used to
// locate certain paths on Chrome OS. See set_profile_path() for details.
static bool IsAccessAllowed(const base::FilePath& path,
@@ -26,8 +29,6 @@
// to bypass the access control for file: scheme. Calling this function
// with false brings back the original (production) behaviors.
static void EnableAccessToAllFilesForTesting(bool enabled);
-
- DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
};
#endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
diff --git a/chrome/browser/net/chrome_network_delegate_browsertest.cc b/chrome/browser/net/chrome_network_delegate_browsertest.cc
index 26305130..28689ab 100644
--- a/chrome/browser/net/chrome_network_delegate_browsertest.cc
+++ b/chrome/browser/net/chrome_network_delegate_browsertest.cc
@@ -25,6 +25,12 @@
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
class ChromeNetworkDelegateBrowserTest : public InProcessBrowserTest {
+ public:
+ ChromeNetworkDelegateBrowserTest(const ChromeNetworkDelegateBrowserTest&) =
+ delete;
+ ChromeNetworkDelegateBrowserTest& operator=(
+ const ChromeNetworkDelegateBrowserTest&) = delete;
+
protected:
ChromeNetworkDelegateBrowserTest() {}
@@ -41,9 +47,6 @@
}
base::ScopedTempDir scoped_temp_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegateBrowserTest);
};
// Ensure that access to a test file, that is not in an accessible location,
diff --git a/chrome/browser/net/chrome_network_service_browsertest.cc b/chrome/browser/net/chrome_network_service_browsertest.cc
index 9e3ce94..b809aca 100644
--- a/chrome/browser/net/chrome_network_service_browsertest.cc
+++ b/chrome/browser/net/chrome_network_service_browsertest.cc
@@ -91,6 +91,11 @@
features::kNetworkServiceInProcess);
}
+ ChromeNetworkServiceBrowserTest(const ChromeNetworkServiceBrowserTest&) =
+ delete;
+ ChromeNetworkServiceBrowserTest& operator=(
+ const ChromeNetworkServiceBrowserTest&) = delete;
+
protected:
mojo::PendingRemote<network::mojom::NetworkContext> CreateNetworkContext(
bool enable_encrypted_cookies) {
@@ -112,8 +117,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeNetworkServiceBrowserTest);
};
IN_PROC_BROWSER_TEST_P(ChromeNetworkServiceBrowserTest, PRE_EncryptedCookies) {
diff --git a/chrome/browser/net/chrome_network_service_restart_browsertest.cc b/chrome/browser/net/chrome_network_service_restart_browsertest.cc
index 7726afe..15cfc64 100644
--- a/chrome/browser/net/chrome_network_service_restart_browsertest.cc
+++ b/chrome/browser/net/chrome_network_service_restart_browsertest.cc
@@ -26,14 +26,16 @@
EXPECT_TRUE(embedded_test_server()->Start());
}
+ ChromeNetworkServiceRestartBrowserTest(
+ const ChromeNetworkServiceRestartBrowserTest&) = delete;
+ ChromeNetworkServiceRestartBrowserTest& operator=(
+ const ChromeNetworkServiceRestartBrowserTest&) = delete;
+
GURL GetTestURL() const {
// Use '/echoheader' instead of '/echo' to avoid a disk_cache bug.
// See https://crbug.com/792255.
return embedded_test_server()->GetURL("/echoheader");
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeNetworkServiceRestartBrowserTest);
};
// Make sure |StoragePartition::GetNetworkContext()| returns valid interface
diff --git a/chrome/browser/net/cookie_policy_browsertest.cc b/chrome/browser/net/cookie_policy_browsertest.cc
index 5f6a834..d353c4df 100644
--- a/chrome/browser/net/cookie_policy_browsertest.cc
+++ b/chrome/browser/net/cookie_policy_browsertest.cc
@@ -50,6 +50,9 @@
class CookiePolicyBrowserTest : public InProcessBrowserTest {
public:
+ CookiePolicyBrowserTest(const CookiePolicyBrowserTest&) = delete;
+ CookiePolicyBrowserTest& operator=(const CookiePolicyBrowserTest&) = delete;
+
void SetBlockThirdPartyCookies(bool value) {
browser()->profile()->GetPrefs()->SetInteger(
prefs::kCookieControlsMode,
@@ -306,8 +309,6 @@
return;
}
}
-
- DISALLOW_COPY_AND_ASSIGN(CookiePolicyBrowserTest);
};
// Visits a page that sets a first-party cookie.
diff --git a/chrome/browser/net/cookie_store_samesite_browsertest.cc b/chrome/browser/net/cookie_store_samesite_browsertest.cc
index 0d1f198..b02299e 100644
--- a/chrome/browser/net/cookie_store_samesite_browsertest.cc
+++ b/chrome/browser/net/cookie_store_samesite_browsertest.cc
@@ -30,6 +30,9 @@
CookieStoreSameSiteTest()
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
+ CookieStoreSameSiteTest(const CookieStoreSameSiteTest&) = delete;
+ CookieStoreSameSiteTest& operator=(const CookieStoreSameSiteTest&) = delete;
+
void SetUpOnMainThread() override {
host_resolver()->AddRule("*", "127.0.0.1");
base::FilePath path;
@@ -85,9 +88,6 @@
mojo::Remote<network::mojom::CookieManager> cookie_manager_remote_;
net::test_server::EmbeddedTestServer https_server_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CookieStoreSameSiteTest);
};
IN_PROC_BROWSER_TEST_P(CookieStoreSameSiteTest,
diff --git a/chrome/browser/net/dns_probe_service_factory.h b/chrome/browser/net/dns_probe_service_factory.h
index f884fce..9c4e3a5 100644
--- a/chrome/browser/net/dns_probe_service_factory.h
+++ b/chrome/browser/net/dns_probe_service_factory.h
@@ -45,6 +45,9 @@
// Returns the NetworkContextServiceFactory singleton.
static DnsProbeServiceFactory* GetInstance();
+ DnsProbeServiceFactory(const DnsProbeServiceFactory&) = delete;
+ DnsProbeServiceFactory& operator=(const DnsProbeServiceFactory&) = delete;
+
// Creates a DnsProbeService which will use the supplied
// |network_context_getter| and |dns_config_change_manager_getter| instead of
// getting them from a BrowserContext, and uses |tick_clock| for cache
@@ -65,8 +68,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DnsProbeServiceFactory);
};
} // namespace chrome_browser_net
diff --git a/chrome/browser/net/network_context_configuration_browsertest.cc b/chrome/browser/net/network_context_configuration_browsertest.cc
index 6784f55..6451691 100644
--- a/chrome/browser/net/network_context_configuration_browsertest.cc
+++ b/chrome/browser/net/network_context_configuration_browsertest.cc
@@ -1917,6 +1917,14 @@
const size_t kTestMaxConnectionsPerProxy = 37;
NetworkContextConfigurationManagedProxySettingsBrowserTest() = default;
+
+ NetworkContextConfigurationManagedProxySettingsBrowserTest(
+ const NetworkContextConfigurationManagedProxySettingsBrowserTest&) =
+ delete;
+ NetworkContextConfigurationManagedProxySettingsBrowserTest& operator=(
+ const NetworkContextConfigurationManagedProxySettingsBrowserTest&) =
+ delete;
+
~NetworkContextConfigurationManagedProxySettingsBrowserTest() override =
default;
@@ -1935,10 +1943,6 @@
size_t GetExpectedMaxConnectionsPerProxy() const override {
return kTestMaxConnectionsPerProxy;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(
- NetworkContextConfigurationManagedProxySettingsBrowserTest);
};
IN_PROC_BROWSER_TEST_P(
diff --git a/chrome/browser/net/probe_message.h b/chrome/browser/net/probe_message.h
index 6fa0466..cd398ca 100644
--- a/chrome/browser/net/probe_message.h
+++ b/chrome/browser/net/probe_message.h
@@ -20,6 +20,9 @@
public:
ProbeMessage();
+ ProbeMessage(const ProbeMessage&) = delete;
+ ProbeMessage& operator=(const ProbeMessage&) = delete;
+
// Generate a ProbeRequest packet.
void GenerateProbeRequest(const ProbePacket_Token& received_token,
uint32_t group_id,
@@ -56,8 +59,6 @@
static const uint32_t kMaxNumberProbePackets;
static const uint32_t kMaxPacingIntervalMicros;
static const char kEncodingString[];
-
- DISALLOW_COPY_AND_ASSIGN(ProbeMessage);
};
} // namespace chrome_browser_net
#endif // CHROME_BROWSER_NET_PROBE_MESSAGE_H_
diff --git a/chrome/browser/net/profile_network_context_service_factory.h b/chrome/browser/net/profile_network_context_service_factory.h
index ebde79f..28e45bda 100644
--- a/chrome/browser/net/profile_network_context_service_factory.h
+++ b/chrome/browser/net/profile_network_context_service_factory.h
@@ -27,6 +27,11 @@
// Returns the NetworkContextServiceFactory singleton.
static ProfileNetworkContextServiceFactory* GetInstance();
+ ProfileNetworkContextServiceFactory(
+ const ProfileNetworkContextServiceFactory&) = delete;
+ ProfileNetworkContextServiceFactory& operator=(
+ const ProfileNetworkContextServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
ProfileNetworkContextServiceFactory>;
@@ -40,8 +45,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileNetworkContextServiceFactory);
};
#endif // CHROME_BROWSER_NET_PROFILE_NETWORK_CONTEXT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/net/proxy_browsertest.cc b/chrome/browser/net/proxy_browsertest.cc
index 0ab4c2a..5a69af97 100644
--- a/chrome/browser/net/proxy_browsertest.cc
+++ b/chrome/browser/net/proxy_browsertest.cc
@@ -69,6 +69,9 @@
public:
LoginPromptObserver() : auth_handled_(false) {}
+ LoginPromptObserver(const LoginPromptObserver&) = delete;
+ LoginPromptObserver& operator=(const LoginPromptObserver&) = delete;
+
void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) override {
@@ -86,8 +89,6 @@
private:
bool auth_handled_;
-
- DISALLOW_COPY_AND_ASSIGN(LoginPromptObserver);
};
// Test that the browser can establish a WebSocket connection via a proxy
diff --git a/chrome/browser/net/proxy_service_factory.h b/chrome/browser/net/proxy_service_factory.h
index 82b26f2..7731b0d 100644
--- a/chrome/browser/net/proxy_service_factory.h
+++ b/chrome/browser/net/proxy_service_factory.h
@@ -19,6 +19,10 @@
class ProxyServiceFactory {
public:
+ ProxyServiceFactory() = delete;
+ ProxyServiceFactory(const ProxyServiceFactory&) = delete;
+ ProxyServiceFactory& operator=(const ProxyServiceFactory&) = delete;
+
// Creates a ProxyConfigService that delivers the system preferences
// (or the respective Ash-Chrome equivalent).
static std::unique_ptr<net::ProxyConfigService> CreateProxyConfigService(
@@ -38,9 +42,6 @@
// (ChromeOS only).
static std::unique_ptr<PrefProxyConfigTracker>
CreatePrefProxyConfigTrackerOfLocalState(PrefService* local_state_prefs);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ProxyServiceFactory);
};
#endif // CHROME_BROWSER_NET_PROXY_SERVICE_FACTORY_H_
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
index d44290c..8b4d6be 100644
--- a/chrome/browser/net/system_network_context_manager.cc
+++ b/chrome/browser/net/system_network_context_manager.cc
@@ -221,6 +221,10 @@
DETACH_FROM_SEQUENCE(sequence_checker_);
}
+ URLLoaderFactoryForSystem(const URLLoaderFactoryForSystem&) = delete;
+ URLLoaderFactoryForSystem& operator=(const URLLoaderFactoryForSystem&) =
+ delete;
+
// mojom::URLLoaderFactory implementation:
void CreateLoaderAndStart(
@@ -261,8 +265,6 @@
SEQUENCE_CHECKER(sequence_checker_);
SystemNetworkContextManager* manager_;
-
- DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryForSystem);
};
network::mojom::NetworkContext* SystemNetworkContextManager::GetContext() {
diff --git a/chrome/browser/net/websocket_browsertest.cc b/chrome/browser/net/websocket_browsertest.cc
index de48b97b..74faae5 100644
--- a/chrome/browser/net/websocket_browsertest.cc
+++ b/chrome/browser/net/websocket_browsertest.cc
@@ -73,6 +73,9 @@
SSLOptions(cert),
net::GetWebSocketTestDataDirectory()) {}
+ WebSocketBrowserTest(const WebSocketBrowserTest&) = delete;
+ WebSocketBrowserTest& operator=(const WebSocketBrowserTest&) = delete;
+
protected:
void NavigateToHTTP(const std::string& path) {
// Visit a HTTP page for testing.
@@ -153,8 +156,6 @@
private:
std::unique_ptr<content::TitleWatcher> watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(WebSocketBrowserTest);
};
class WebSocketBrowserTestWithAllowFileAccessFromFiles
@@ -250,6 +251,9 @@
content::Source<content::NavigationController>(navigation_controller));
}
+ AutoLogin(const AutoLogin&) = delete;
+ AutoLogin& operator=(const AutoLogin&) = delete;
+
// NotificationObserver implementation
void Observe(int type,
const content::NotificationSource& source,
@@ -269,8 +273,6 @@
bool logged_in_;
content::NotificationRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoLogin);
};
// Test that the browser can handle a WebSocket frame split into multiple TCP
diff --git a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_service_factory.h b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_service_factory.h
index 8823225..0f11751c 100644
--- a/chrome/browser/new_tab_page/one_google_bar/one_google_bar_service_factory.h
+++ b/chrome/browser/new_tab_page/one_google_bar/one_google_bar_service_factory.h
@@ -19,6 +19,10 @@
static OneGoogleBarServiceFactory* GetInstance();
+ OneGoogleBarServiceFactory(const OneGoogleBarServiceFactory&) = delete;
+ OneGoogleBarServiceFactory& operator=(const OneGoogleBarServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<OneGoogleBarServiceFactory>;
@@ -28,8 +32,6 @@
// Overridden from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(OneGoogleBarServiceFactory);
};
#endif // CHROME_BROWSER_NEW_TAB_PAGE_ONE_GOOGLE_BAR_ONE_GOOGLE_BAR_SERVICE_FACTORY_H_
diff --git a/chrome/browser/new_tab_page/promos/promo_service_factory.h b/chrome/browser/new_tab_page/promos/promo_service_factory.h
index 3451e27b..ebe01a6 100644
--- a/chrome/browser/new_tab_page/promos/promo_service_factory.h
+++ b/chrome/browser/new_tab_page/promos/promo_service_factory.h
@@ -19,6 +19,9 @@
static PromoServiceFactory* GetInstance();
+ PromoServiceFactory(const PromoServiceFactory&) = delete;
+ PromoServiceFactory& operator=(const PromoServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<PromoServiceFactory>;
@@ -28,8 +31,6 @@
// Overridden from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PromoServiceFactory);
};
#endif // CHROME_BROWSER_NEW_TAB_PAGE_PROMOS_PROMO_SERVICE_FACTORY_H_
diff --git a/chrome/browser/no_best_effort_tasks_browsertest.cc b/chrome/browser/no_best_effort_tasks_browsertest.cc
index 43750433..3946fd2 100644
--- a/chrome/browser/no_best_effort_tasks_browsertest.cc
+++ b/chrome/browser/no_best_effort_tasks_browsertest.cc
@@ -79,6 +79,10 @@
};
class NoBestEffortTasksTest : public InProcessBrowserTest {
+ public:
+ NoBestEffortTasksTest(const NoBestEffortTasksTest&) = delete;
+ NoBestEffortTasksTest& operator=(const NoBestEffortTasksTest&) = delete;
+
protected:
NoBestEffortTasksTest() = default;
~NoBestEffortTasksTest() override = default;
@@ -94,8 +98,6 @@
host_resolver()->AddRule("*", "127.0.0.1");
InProcessBrowserTest::SetUpOnMainThread();
}
-
- DISALLOW_COPY_AND_ASSIGN(NoBestEffortTasksTest);
};
#if BUILDFLAG(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/obsolete_system/obsolete_system.h b/chrome/browser/obsolete_system/obsolete_system.h
index 195432d5..9200d94 100644
--- a/chrome/browser/obsolete_system/obsolete_system.h
+++ b/chrome/browser/obsolete_system/obsolete_system.h
@@ -11,6 +11,10 @@
class ObsoleteSystem {
public:
+ ObsoleteSystem() = delete;
+ ObsoleteSystem(const ObsoleteSystem&) = delete;
+ ObsoleteSystem& operator=(const ObsoleteSystem&) = delete;
+
// true if the system is already considered obsolete, or if it'll be
// considered obsolete soon. Used to control whether to show messaging about
// deprecation within the app.
@@ -30,9 +34,6 @@
// A help URL to explain the deprecation. Do not use the returned string
// unless IsObsoleteNowOrSoon() returns true.
static const char* GetLinkURL();
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ObsoleteSystem);
};
#endif // CHROME_BROWSER_OBSOLETE_SYSTEM_OBSOLETE_SYSTEM_H_
diff --git a/chrome/browser/offline_items_collection/offline_content_aggregator_factory.h b/chrome/browser/offline_items_collection/offline_content_aggregator_factory.h
index ca5eeb8..d3fdb37 100644
--- a/chrome/browser/offline_items_collection/offline_content_aggregator_factory.h
+++ b/chrome/browser/offline_items_collection/offline_content_aggregator_factory.h
@@ -34,6 +34,11 @@
static offline_items_collection::OfflineContentAggregator* GetForKey(
SimpleFactoryKey* key);
+ OfflineContentAggregatorFactory(const OfflineContentAggregatorFactory&) =
+ delete;
+ OfflineContentAggregatorFactory& operator=(
+ const OfflineContentAggregatorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<OfflineContentAggregatorFactory>;
@@ -44,8 +49,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(OfflineContentAggregatorFactory);
};
#endif // CHROME_BROWSER_OFFLINE_ITEMS_COLLECTION_OFFLINE_CONTENT_AGGREGATOR_FACTORY_H_
diff --git a/chrome/browser/offline_pages/android/auto_fetch_page_load_watcher.cc b/chrome/browser/offline_pages/android/auto_fetch_page_load_watcher.cc
index ac42921d..b4a4a784 100644
--- a/chrome/browser/offline_pages/android/auto_fetch_page_load_watcher.cc
+++ b/chrome/browser/offline_pages/android/auto_fetch_page_load_watcher.cc
@@ -88,6 +88,9 @@
DCHECK(page_load_watcher_);
}
+ NavigationObserver(const NavigationObserver&) = delete;
+ NavigationObserver& operator=(const NavigationObserver&) = delete;
+
// content::WebContentsObserver implementation.
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override {
@@ -101,8 +104,6 @@
friend class content::WebContentsUserData<
AutoFetchPageLoadWatcher::NavigationObserver>;
AutoFetchPageLoadWatcher* page_load_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationObserver);
WEB_CONTENTS_USER_DATA_KEY_DECL();
};
diff --git a/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_factory.h b/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_factory.h
index 14a7bbf..3390f6cc 100644
--- a/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_factory.h
+++ b/chrome/browser/offline_pages/android/offline_page_auto_fetcher_service_factory.h
@@ -26,6 +26,11 @@
static OfflinePageAutoFetcherService* GetForBrowserContext(
content::BrowserContext* context);
+ OfflinePageAutoFetcherServiceFactory(
+ const OfflinePageAutoFetcherServiceFactory&) = delete;
+ OfflinePageAutoFetcherServiceFactory& operator=(
+ const OfflinePageAutoFetcherServiceFactory&) = delete;
+
private:
class ServiceDelegate;
friend struct base::DefaultSingletonTraits<
@@ -38,7 +43,6 @@
content::BrowserContext* context) const override;
std::unique_ptr<ServiceDelegate> service_delegate_;
- DISALLOW_COPY_AND_ASSIGN(OfflinePageAutoFetcherServiceFactory);
};
} // namespace offline_pages
diff --git a/chrome/browser/offline_pages/offline_page_model_factory.h b/chrome/browser/offline_pages/offline_page_model_factory.h
index e44f68c56..3d32a70b 100644
--- a/chrome/browser/offline_pages/offline_page_model_factory.h
+++ b/chrome/browser/offline_pages/offline_page_model_factory.h
@@ -38,6 +38,9 @@
static OfflinePageModel* GetForBrowserContext(
content::BrowserContext* browser_context);
+ OfflinePageModelFactory(const OfflinePageModelFactory&) = delete;
+ OfflinePageModelFactory& operator=(const OfflinePageModelFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<OfflinePageModelFactory>;
@@ -46,8 +49,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(OfflinePageModelFactory);
};
} // namespace offline_pages
diff --git a/chrome/browser/offline_pages/offline_page_request_handler.h b/chrome/browser/offline_pages/offline_page_request_handler.h
index befca28..a6f53c7 100644
--- a/chrome/browser/offline_pages/offline_page_request_handler.h
+++ b/chrome/browser/offline_pages/offline_page_request_handler.h
@@ -206,6 +206,10 @@
const net::HttpRequestHeaders& extra_request_headers,
Delegate* delegate);
+ OfflinePageRequestHandler(const OfflinePageRequestHandler&) = delete;
+ OfflinePageRequestHandler& operator=(const OfflinePageRequestHandler&) =
+ delete;
+
~OfflinePageRequestHandler();
void Start();
@@ -298,8 +302,6 @@
std::unique_ptr<net::FileStream> stream_;
base::WeakPtrFactory<OfflinePageRequestHandler> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(OfflinePageRequestHandler);
};
} // namespace offline_pages
diff --git a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
index 8433c27..56b90ca 100644
--- a/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
+++ b/chrome/browser/offline_pages/offline_page_request_handler_unittest.cc
@@ -162,6 +162,10 @@
};
explicit TestURLLoaderClient(Observer* observer) : observer_(observer) {}
+
+ TestURLLoaderClient(const TestURLLoaderClient&) = delete;
+ TestURLLoaderClient& operator=(const TestURLLoaderClient&) = delete;
+
~TestURLLoaderClient() override {}
void OnReceiveEarlyHints(network::mojom::EarlyHintsPtr early_hints) override {
@@ -218,8 +222,6 @@
mojo::Receiver<network::mojom::URLLoaderClient> receiver_{this};
mojo::ScopedDataPipeConsumerHandle response_body_;
network::URLLoaderCompletionStatus completion_status_;
-
- DISALLOW_COPY_AND_ASSIGN(TestURLLoaderClient);
};
// Helper function to make a character array filled with |size| bytes of
diff --git a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.h b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.h
index 4cd64c6..a7a3c8a 100644
--- a/chrome/browser/offline_pages/prefetch/prefetch_service_factory.h
+++ b/chrome/browser/offline_pages/prefetch/prefetch_service_factory.h
@@ -27,6 +27,9 @@
static PrefetchServiceFactory* GetInstance();
static PrefetchService* GetForKey(SimpleFactoryKey* key);
+ PrefetchServiceFactory(const PrefetchServiceFactory&) = delete;
+ PrefetchServiceFactory& operator=(const PrefetchServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<PrefetchServiceFactory>;
@@ -35,8 +38,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PrefetchServiceFactory);
};
} // namespace offline_pages
diff --git a/chrome/browser/offline_pages/request_coordinator_factory.h b/chrome/browser/offline_pages/request_coordinator_factory.h
index 1ac0c45..8c23c00e 100644
--- a/chrome/browser/offline_pages/request_coordinator_factory.h
+++ b/chrome/browser/offline_pages/request_coordinator_factory.h
@@ -25,6 +25,10 @@
static RequestCoordinator* GetForBrowserContext(
content::BrowserContext* context);
+ RequestCoordinatorFactory(const RequestCoordinatorFactory&) = delete;
+ RequestCoordinatorFactory& operator=(const RequestCoordinatorFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<RequestCoordinatorFactory>;
@@ -33,8 +37,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(RequestCoordinatorFactory);
};
} // namespace offline_pages
diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h b/chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h
index dfda4a29..2cccb98 100644
--- a/chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h
+++ b/chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h
@@ -30,6 +30,11 @@
// Gets the LazyInstance that owns all OptimizationGuideKeyedService(s).
static OptimizationGuideKeyedServiceFactory* GetInstance();
+ OptimizationGuideKeyedServiceFactory(
+ const OptimizationGuideKeyedServiceFactory&) = delete;
+ OptimizationGuideKeyedServiceFactory& operator=(
+ const OptimizationGuideKeyedServiceFactory&) = delete;
+
private:
friend base::NoDestructor<OptimizationGuideKeyedServiceFactory>;
@@ -43,8 +48,6 @@
content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(OptimizationGuideKeyedServiceFactory);
};
#endif // CHROME_BROWSER_OPTIMIZATION_GUIDE_OPTIMIZATION_GUIDE_KEYED_SERVICE_FACTORY_H_
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc b/chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc
index 069a204..570383f 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer_unittest.cc
@@ -36,6 +36,11 @@
public:
MetricsWebContentsObserverTest() = default;
+ MetricsWebContentsObserverTest(const MetricsWebContentsObserverTest&) =
+ delete;
+ MetricsWebContentsObserverTest& operator=(
+ const MetricsWebContentsObserverTest&) = delete;
+
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
AttachObserver();
@@ -62,8 +67,6 @@
}
TestMetricsWebContentsObserverEmbedder* embedder_interface_;
-
- DISALLOW_COPY_AND_ASSIGN(MetricsWebContentsObserverTest);
};
#if BUILDFLAG(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.h
index c7b6821..b2e946d 100644
--- a/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/aborts_page_load_metrics_observer.h
@@ -31,15 +31,16 @@
public:
AbortsPageLoadMetricsObserver();
+ AbortsPageLoadMetricsObserver(const AbortsPageLoadMetricsObserver&) = delete;
+ AbortsPageLoadMetricsObserver& operator=(
+ const AbortsPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver:
void OnComplete(
const page_load_metrics::mojom::PageLoadTiming& timing) override;
void OnFailedProvisionalLoad(
const page_load_metrics::FailedProvisionalLoadInfo& failed_load_info)
override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AbortsPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ABORTS_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/android_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/android_page_load_metrics_observer.h
index 98cddf6..3d67a77d 100644
--- a/chrome/browser/page_load_metrics/observers/android_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/android_page_load_metrics_observer.h
@@ -22,6 +22,11 @@
public:
AndroidPageLoadMetricsObserver();
+ AndroidPageLoadMetricsObserver(const AndroidPageLoadMetricsObserver&) =
+ delete;
+ AndroidPageLoadMetricsObserver& operator=(
+ const AndroidPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver:
// PageLoadMetricsObserver lifecycle callbacks
ObservePolicy OnStart(content::NavigationHandle* navigation_handle,
@@ -86,8 +91,6 @@
int64_t navigation_id_ = -1;
network::NetworkQualityTracker* network_quality_tracker_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(AndroidPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_ANDROID_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc
index 1b12dce..af3b5cb 100644
--- a/chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/core/amp_page_load_metrics_observer_unittest.cc
@@ -30,6 +30,11 @@
public:
AMPPageLoadMetricsObserverTest() {}
+ AMPPageLoadMetricsObserverTest(const AMPPageLoadMetricsObserverTest&) =
+ delete;
+ AMPPageLoadMetricsObserverTest& operator=(
+ const AMPPageLoadMetricsObserverTest&) = delete;
+
void SetUp() override {
PageLoadMetricsObserverTestHarness::SetUp();
ResetTest();
@@ -101,9 +106,6 @@
}
page_load_metrics::mojom::PageLoadTiming timing_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AMPPageLoadMetricsObserverTest);
};
TEST_F(AMPPageLoadMetricsObserverTest, AMPCachePage) {
diff --git a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h
index 764265d..1795204 100644
--- a/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/document_write_page_load_metrics_observer.h
@@ -23,6 +23,11 @@
public:
DocumentWritePageLoadMetricsObserver() = default;
+ DocumentWritePageLoadMetricsObserver(
+ const DocumentWritePageLoadMetricsObserver&) = delete;
+ DocumentWritePageLoadMetricsObserver& operator=(
+ const DocumentWritePageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
void OnFirstContentfulPaintInPage(
const page_load_metrics::mojom::PageLoadTiming& timing) override;
@@ -59,8 +64,6 @@
bool doc_write_same_site_diff_scheme_ = false;
bool doc_write_block_observed_ = false;
bool doc_write_block_reload_observed_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(DocumentWritePageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_DOCUMENT_WRITE_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h
index 2b1a6a3..0b43f51 100644
--- a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/from_gws_page_load_metrics_observer.h
@@ -144,6 +144,11 @@
public:
FromGWSPageLoadMetricsObserver();
+ FromGWSPageLoadMetricsObserver(const FromGWSPageLoadMetricsObserver&) =
+ delete;
+ FromGWSPageLoadMetricsObserver& operator=(
+ const FromGWSPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
ObservePolicy OnStart(content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url,
@@ -183,8 +188,6 @@
private:
FromGWSPageLoadMetricsLogger logger_;
-
- DISALLOW_COPY_AND_ASSIGN(FromGWSPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_FROM_GWS_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.h
index 991c91a..50a50d20 100644
--- a/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_page_load_metrics_observer.h
@@ -25,14 +25,17 @@
explicit HttpsEngagementPageLoadMetricsObserver(
content::BrowserContext* context);
+ HttpsEngagementPageLoadMetricsObserver(
+ const HttpsEngagementPageLoadMetricsObserver&) = delete;
+ HttpsEngagementPageLoadMetricsObserver& operator=(
+ const HttpsEngagementPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver:
void OnComplete(
const page_load_metrics::mojom::PageLoadTiming& timing) override;
private:
HttpsEngagementService* engagement_service_;
-
- DISALLOW_COPY_AND_ASSIGN(HttpsEngagementPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_HTTPS_ENGAGEMENT_METRICS_HTTPS_ENGAGEMENT_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_service_factory.h b/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_service_factory.h
index 2cf24e0..22290e08 100644
--- a/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_service_factory.h
+++ b/chrome/browser/page_load_metrics/observers/https_engagement_metrics/https_engagement_service_factory.h
@@ -27,6 +27,10 @@
content::BrowserContext* context);
static HttpsEngagementServiceFactory* GetInstance();
+ HttpsEngagementServiceFactory(const HttpsEngagementServiceFactory&) = delete;
+ HttpsEngagementServiceFactory& operator=(
+ const HttpsEngagementServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<HttpsEngagementServiceFactory>;
@@ -39,8 +43,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(HttpsEngagementServiceFactory);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_HTTPS_ENGAGEMENT_METRICS_HTTPS_ENGAGEMENT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/page_load_metrics/observers/live_tab_count_page_load_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/live_tab_count_page_load_metrics_observer_browsertest.cc
index 4dfaed6..e067c485 100644
--- a/chrome/browser/page_load_metrics/observers/live_tab_count_page_load_metrics_observer_browsertest.cc
+++ b/chrome/browser/page_load_metrics/observers/live_tab_count_page_load_metrics_observer_browsertest.cc
@@ -29,6 +29,11 @@
public:
LiveTabCountPageLoadMetricsBrowserTest() = default;
+ LiveTabCountPageLoadMetricsBrowserTest(
+ const LiveTabCountPageLoadMetricsBrowserTest&) = delete;
+ LiveTabCountPageLoadMetricsBrowserTest& operator=(
+ const LiveTabCountPageLoadMetricsBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
ASSERT_TRUE(embedded_test_server()->Start());
}
@@ -57,8 +62,6 @@
}
base::HistogramTester histogram_tester_;
-
- DISALLOW_COPY_AND_ASSIGN(LiveTabCountPageLoadMetricsBrowserTest);
};
IN_PROC_BROWSER_TEST_F(LiveTabCountPageLoadMetricsBrowserTest,
diff --git a/chrome/browser/page_load_metrics/observers/prefetch_proxy_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/prefetch_proxy_page_load_metrics_observer_unittest.cc
index 1b7689c..6f1d5c1 100644
--- a/chrome/browser/page_load_metrics/observers/prefetch_proxy_page_load_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/prefetch_proxy_page_load_metrics_observer_unittest.cc
@@ -42,6 +42,11 @@
public:
PrefetchProxyPageLoadMetricsObserverTest() = default;
+ PrefetchProxyPageLoadMetricsObserverTest(
+ const PrefetchProxyPageLoadMetricsObserverTest&) = delete;
+ PrefetchProxyPageLoadMetricsObserverTest& operator=(
+ const PrefetchProxyPageLoadMetricsObserverTest&) = delete;
+
TestPrefetchProxyPageLoadMetricsObserver* plm_observer() {
return plm_observer_;
}
@@ -147,8 +152,6 @@
GURL navigation_url_{"https://chromium.org"};
bool in_main_frame_ = true;
-
- DISALLOW_COPY_AND_ASSIGN(PrefetchProxyPageLoadMetricsObserverTest);
};
TEST_F(PrefetchProxyPageLoadMetricsObserverTest, BeforeFCP_CSS) {
diff --git a/chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_observer.h
index b5be974..8d11204 100644
--- a/chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/protocol_page_load_metrics_observer.h
@@ -16,6 +16,11 @@
public:
ProtocolPageLoadMetricsObserver() = default;
+ ProtocolPageLoadMetricsObserver(const ProtocolPageLoadMetricsObserver&) =
+ delete;
+ ProtocolPageLoadMetricsObserver& operator=(
+ const ProtocolPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
ObservePolicy OnStart(content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url,
@@ -41,8 +46,6 @@
// The protocol for the committed navigation.
page_load_metrics::NetworkProtocol protocol_ =
page_load_metrics::NetworkProtocol::kOther;
-
- DISALLOW_COPY_AND_ASSIGN(ProtocolPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_PROTOCOL_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/scheme_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/scheme_page_load_metrics_observer.h
index 48bd85f..f7b09b1 100644
--- a/chrome/browser/page_load_metrics/observers/scheme_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/scheme_page_load_metrics_observer.h
@@ -15,6 +15,10 @@
public:
SchemePageLoadMetricsObserver() = default;
+ SchemePageLoadMetricsObserver(const SchemePageLoadMetricsObserver&) = delete;
+ SchemePageLoadMetricsObserver& operator=(
+ const SchemePageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
ObservePolicy OnStart(content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url,
@@ -33,8 +37,6 @@
private:
// The ui transition for the committed navigation.
ui::PageTransition transition_ = ui::PAGE_TRANSITION_FIRST;
-
- DISALLOW_COPY_AND_ASSIGN(SchemePageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_SCHEME_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.h
index 2e009ef..0c6ecff2 100644
--- a/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/service_worker_page_load_metrics_observer.h
@@ -49,6 +49,12 @@
: public page_load_metrics::PageLoadMetricsObserver {
public:
ServiceWorkerPageLoadMetricsObserver();
+
+ ServiceWorkerPageLoadMetricsObserver(
+ const ServiceWorkerPageLoadMetricsObserver&) = delete;
+ ServiceWorkerPageLoadMetricsObserver& operator=(
+ const ServiceWorkerPageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
ObservePolicy OnCommit(content::NavigationHandle* navigation_handle,
ukm::SourceId source_id) override;
@@ -79,8 +85,6 @@
ui::PageTransition transition_ = ui::PAGE_TRANSITION_LINK;
bool was_no_store_main_resource_ = false;
bool logged_ukm_event_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_SERVICE_WORKER_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer.h
index 37094b26..da945ff 100644
--- a/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer.h
@@ -24,6 +24,11 @@
public:
SessionRestorePageLoadMetricsObserver();
+ SessionRestorePageLoadMetricsObserver(
+ const SessionRestorePageLoadMetricsObserver&) = delete;
+ SessionRestorePageLoadMetricsObserver& operator=(
+ const SessionRestorePageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver:
ObservePolicy OnStart(content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url,
@@ -36,9 +41,6 @@
const page_load_metrics::mojom::PageLoadTiming& timing) override;
void OnFirstMeaningfulPaintInMainFrameDocument(
const page_load_metrics::mojom::PageLoadTiming& timing) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionRestorePageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_SESSION_RESTORE_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer_unittest.cc
index 232572b..92203d9 100644
--- a/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/session_restore_page_load_metrics_observer_unittest.cc
@@ -43,6 +43,11 @@
class SessionRestorePageLoadMetricsObserverTest
: public page_load_metrics::PageLoadMetricsObserverTestHarness {
public:
+ SessionRestorePageLoadMetricsObserverTest(
+ const SessionRestorePageLoadMetricsObserverTest&) = delete;
+ SessionRestorePageLoadMetricsObserverTest& operator=(
+ const SessionRestorePageLoadMetricsObserverTest&) = delete;
+
void RegisterObservers(page_load_metrics::PageLoadTracker* tracker) override {
tracker->AddObserver(
std::make_unique<SessionRestorePageLoadMetricsObserver>());
@@ -156,8 +161,6 @@
WebContents*,
std::unique_ptr<page_load_metrics::PageLoadMetricsObserverTester>>
testers_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionRestorePageLoadMetricsObserverTest);
};
TEST_F(SessionRestorePageLoadMetricsObserverTest, NoMetrics) {
diff --git a/chrome/browser/page_load_metrics/observers/signed_exchange_page_load_metrics_observer.h b/chrome/browser/page_load_metrics/observers/signed_exchange_page_load_metrics_observer.h
index d8aaf7e..0e3d01a 100644
--- a/chrome/browser/page_load_metrics/observers/signed_exchange_page_load_metrics_observer.h
+++ b/chrome/browser/page_load_metrics/observers/signed_exchange_page_load_metrics_observer.h
@@ -67,6 +67,12 @@
: public page_load_metrics::PageLoadMetricsObserver {
public:
SignedExchangePageLoadMetricsObserver();
+
+ SignedExchangePageLoadMetricsObserver(
+ const SignedExchangePageLoadMetricsObserver&) = delete;
+ SignedExchangePageLoadMetricsObserver& operator=(
+ const SignedExchangePageLoadMetricsObserver&) = delete;
+
// page_load_metrics::PageLoadMetricsObserver implementation:
ObservePolicy OnCommit(content::NavigationHandle* navigation_handle,
ukm::SourceId source_id) override;
@@ -92,8 +98,6 @@
// True iff prefetched alternative signed exchange was sent to the renderer
// process.
bool had_prefetched_alt_sxg_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(SignedExchangePageLoadMetricsObserver);
};
#endif // CHROME_BROWSER_PAGE_LOAD_METRICS_OBSERVERS_SIGNED_EXCHANGE_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/chrome/browser/page_load_metrics/observers/tab_restore_page_load_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/tab_restore_page_load_metrics_observer_unittest.cc
index ad484c4..e467beb24 100644
--- a/chrome/browser/page_load_metrics/observers/tab_restore_page_load_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/tab_restore_page_load_metrics_observer_unittest.cc
@@ -54,6 +54,11 @@
public:
TabRestorePageLoadMetricsObserverTest() {}
+ TabRestorePageLoadMetricsObserverTest(
+ const TabRestorePageLoadMetricsObserverTest&) = delete;
+ TabRestorePageLoadMetricsObserverTest& operator=(
+ const TabRestorePageLoadMetricsObserverTest&) = delete;
+
void ResetTest() {
page_load_metrics::InitPageLoadTimingForTest(&timing_);
// Reset to the default testing state. Does not reset histogram state.
@@ -108,8 +113,6 @@
private:
absl::optional<bool> is_restore_;
page_load_metrics::mojom::PageLoadTiming timing_;
-
- DISALLOW_COPY_AND_ASSIGN(TabRestorePageLoadMetricsObserverTest);
};
TEST_F(TabRestorePageLoadMetricsObserverTest, NotRestored) {
diff --git a/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_browsertest.cc
index 69405ae..5a51f8d4 100644
--- a/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_browsertest.cc
+++ b/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_browsertest.cc
@@ -90,6 +90,12 @@
protected:
ThirdPartyMetricsObserverBrowserTest()
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
+
+ ThirdPartyMetricsObserverBrowserTest(
+ const ThirdPartyMetricsObserverBrowserTest&) = delete;
+ ThirdPartyMetricsObserverBrowserTest& operator=(
+ const ThirdPartyMetricsObserverBrowserTest&) = delete;
+
~ThirdPartyMetricsObserverBrowserTest() override = default;
void SetUpOnMainThread() override {
@@ -170,8 +176,6 @@
// This is needed because third party cookies must be marked SameSite=None and
// Secure, so they must be accessed over HTTPS.
net::EmbeddedTestServer https_server_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyMetricsObserverBrowserTest);
};
IN_PROC_BROWSER_TEST_F(ThirdPartyMetricsObserverBrowserTest,
diff --git a/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_unittest.cc b/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_unittest.cc
index e5aa410..59e66ce 100644
--- a/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_unittest.cc
+++ b/chrome/browser/page_load_metrics/observers/third_party_metrics_observer_unittest.cc
@@ -36,6 +36,10 @@
protected:
ThirdPartyMetricsObserverTest() {}
+ ThirdPartyMetricsObserverTest(const ThirdPartyMetricsObserverTest&) = delete;
+ ThirdPartyMetricsObserverTest& operator=(
+ const ThirdPartyMetricsObserverTest&) = delete;
+
void RegisterObservers(page_load_metrics::PageLoadTracker* tracker) override {
tracker->AddObserver(base::WrapUnique(new ThirdPartyMetricsObserver()));
}
@@ -65,9 +69,6 @@
return navigation_simulator->GetFinalRenderFrameHost();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyMetricsObserverTest);
};
TEST_F(ThirdPartyMetricsObserverTest, NoThirdPartyFrame_NoneRecorded) {
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc b/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
index da6e2545..6b8c042 100644
--- a/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
+++ b/chrome/browser/page_load_metrics/page_load_metrics_browsertest.cc
@@ -1893,6 +1893,11 @@
public:
SessionRestorePageLoadMetricsBrowserTest() {}
+ SessionRestorePageLoadMetricsBrowserTest(
+ const SessionRestorePageLoadMetricsBrowserTest&) = delete;
+ SessionRestorePageLoadMetricsBrowserTest& operator=(
+ const SessionRestorePageLoadMetricsBrowserTest&) = delete;
+
// PageLoadMetricsBrowserTest:
void SetUpOnMainThread() override {
PageLoadMetricsBrowserTest::SetUpOnMainThread();
@@ -1952,9 +1957,6 @@
internal::kHistogramSessionRestoreForegroundTabFirstMeaningfulPaint,
expected_total_count);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionRestorePageLoadMetricsBrowserTest);
};
class SessionRestorePaintWaiter : public SessionRestoreObserver {
diff --git a/chrome/browser/password_manager/account_password_store_factory.h b/chrome/browser/password_manager/account_password_store_factory.h
index 07e9cb3..b8d1ebf 100644
--- a/chrome/browser/password_manager/account_password_store_factory.h
+++ b/chrome/browser/password_manager/account_password_store_factory.h
@@ -31,6 +31,10 @@
static AccountPasswordStoreFactory* GetInstance();
+ AccountPasswordStoreFactory(const AccountPasswordStoreFactory&) = delete;
+ AccountPasswordStoreFactory& operator=(const AccountPasswordStoreFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<AccountPasswordStoreFactory>;
@@ -43,8 +47,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(AccountPasswordStoreFactory);
};
#endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_PASSWORD_STORE_FACTORY_H_
diff --git a/chrome/browser/password_manager/android/account_chooser_dialog_android.cc b/chrome/browser/password_manager/android/account_chooser_dialog_android.cc
index 7d07e8b..573420c 100644
--- a/chrome/browser/password_manager/android/account_chooser_dialog_android.cc
+++ b/chrome/browser/password_manager/android/account_chooser_dialog_android.cc
@@ -57,6 +57,9 @@
int index,
const base::android::ScopedJavaGlobalRef<jobject>& java_dialog);
+ AvatarFetcherAndroid(const AvatarFetcherAndroid&) = delete;
+ AvatarFetcherAndroid& operator=(const AvatarFetcherAndroid&) = delete;
+
private:
~AvatarFetcherAndroid() override = default;
@@ -65,8 +68,6 @@
int index_;
base::android::ScopedJavaGlobalRef<jobject> java_dialog_;
-
- DISALLOW_COPY_AND_ASSIGN(AvatarFetcherAndroid);
};
AvatarFetcherAndroid::AvatarFetcherAndroid(
diff --git a/chrome/browser/password_manager/android/auto_signin_first_run_dialog_android.h b/chrome/browser/password_manager/android/auto_signin_first_run_dialog_android.h
index 9437f2b..b9f81f2 100644
--- a/chrome/browser/password_manager/android/auto_signin_first_run_dialog_android.h
+++ b/chrome/browser/password_manager/android/auto_signin_first_run_dialog_android.h
@@ -23,6 +23,11 @@
void Destroy(JNIEnv* env, jobject obj);
+ AutoSigninFirstRunDialogAndroid(const AutoSigninFirstRunDialogAndroid&) =
+ delete;
+ AutoSigninFirstRunDialogAndroid& operator=(
+ const AutoSigninFirstRunDialogAndroid&) = delete;
+
void ShowDialog();
// Closes the dialog and propagates that no credentials was chosen.
@@ -47,8 +52,6 @@
content::WebContents* web_contents_;
base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoSigninFirstRunDialogAndroid);
};
#endif // CHROME_BROWSER_PASSWORD_MANAGER_ANDROID_AUTO_SIGNIN_FIRST_RUN_DIALOG_ANDROID_H_
diff --git a/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc b/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc
index 63d7252f..86eab642 100644
--- a/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc
+++ b/chrome/browser/password_manager/android/password_generation_controller_impl_unittest.cc
@@ -76,20 +76,25 @@
public:
MockPasswordManagerDriver() = default;
+ MockPasswordManagerDriver(const MockPasswordManagerDriver&) = delete;
+ MockPasswordManagerDriver& operator=(const MockPasswordManagerDriver&) =
+ delete;
+
MOCK_METHOD1(GeneratedPasswordAccepted, void(const std::u16string&));
MOCK_METHOD0(GetPasswordGenerationHelper,
password_manager::PasswordGenerationFrameHelper*());
MOCK_METHOD0(GetPasswordManager, password_manager::PasswordManager*());
MOCK_METHOD0(GetPasswordAutofillManager,
password_manager::PasswordAutofillManager*());
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockPasswordManagerDriver);
};
class MockPasswordGenerationHelper
: public password_manager::PasswordGenerationFrameHelper {
public:
+ MockPasswordGenerationHelper(const MockPasswordGenerationHelper&) = delete;
+ MockPasswordGenerationHelper& operator=(const MockPasswordGenerationHelper&) =
+ delete;
+
MockPasswordGenerationHelper(password_manager::PasswordManagerClient* client,
password_manager::PasswordManagerDriver* driver)
: password_manager::PasswordGenerationFrameHelper(client, driver) {}
@@ -99,9 +104,6 @@
autofill::FormSignature,
autofill::FieldSignature,
uint32_t));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockPasswordGenerationHelper);
};
// Mock modal dialog view used to bypass the need of a valid top level window.
diff --git a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
index 55330dbb..4c5c0c8 100644
--- a/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
+++ b/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
@@ -121,6 +121,11 @@
#endif
}
+ MockChromePasswordManagerClient(const MockChromePasswordManagerClient&) =
+ delete;
+ MockChromePasswordManagerClient& operator=(
+ const MockChromePasswordManagerClient&) = delete;
+
#if BUILDFLAG(FULL_SAFE_BROWSING)
safe_browsing::PasswordProtectionService* GetPasswordProtectionService()
const override {
@@ -137,17 +142,16 @@
std::unique_ptr<safe_browsing::MockPasswordProtectionService>
password_protection_service_;
#endif
- DISALLOW_COPY_AND_ASSIGN(MockChromePasswordManagerClient);
};
class DummyLogReceiver : public autofill::LogReceiver {
public:
DummyLogReceiver() = default;
- void LogEntry(const base::Value& entry) override {}
+ DummyLogReceiver(const DummyLogReceiver&) = delete;
+ DummyLogReceiver& operator=(const DummyLogReceiver&) = delete;
- private:
- DISALLOW_COPY_AND_ASSIGN(DummyLogReceiver);
+ void LogEntry(const base::Value& entry) override {}
};
class FakePasswordAutofillAgent
diff --git a/chrome/browser/password_manager/credential_manager_browsertest.cc b/chrome/browser/password_manager/credential_manager_browsertest.cc
index 15998c4..d1466e0 100644
--- a/chrome/browser/password_manager/credential_manager_browsertest.cc
+++ b/chrome/browser/password_manager/credential_manager_browsertest.cc
@@ -36,6 +36,10 @@
public:
CredentialManagerBrowserTest() = default;
+ CredentialManagerBrowserTest(const CredentialManagerBrowserTest&) = delete;
+ CredentialManagerBrowserTest& operator=(const CredentialManagerBrowserTest&) =
+ delete;
+
void SetUpOnMainThread() override {
PasswordManagerBrowserTestBase::SetUpOnMainThread();
// Redirect all requests to localhost.
@@ -258,8 +262,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(CredentialManagerBrowserTest);
};
// Tests.
diff --git a/chrome/browser/password_manager/password_manager_browsertest.cc b/chrome/browser/password_manager/password_manager_browsertest.cc
index 58c2f3d3..7c2268f 100644
--- a/chrome/browser/password_manager/password_manager_browsertest.cc
+++ b/chrome/browser/password_manager/password_manager_browsertest.cc
@@ -203,6 +203,9 @@
: public autofill::TestAutofillClient,
public content::WebContentsUserData<ObservingAutofillClient> {
public:
+ ObservingAutofillClient(const ObservingAutofillClient&) = delete;
+ ObservingAutofillClient& operator=(const ObservingAutofillClient&) = delete;
+
// Wait until the autofill popup is shown.
void WaitForAutofillPopup() {
base::RunLoop run_loop;
@@ -230,8 +233,6 @@
bool popup_shown_ = false;
WEB_CONTENTS_USER_DATA_KEY_DECL();
-
- DISALLOW_COPY_AND_ASSIGN(ObservingAutofillClient);
};
WEB_CONTENTS_USER_DATA_KEY_IMPL(ObservingAutofillClient)
@@ -3289,6 +3290,11 @@
public:
PasswordManagerDialogBrowserTest() = default;
+ PasswordManagerDialogBrowserTest(const PasswordManagerDialogBrowserTest&) =
+ delete;
+ PasswordManagerDialogBrowserTest& operator=(
+ const PasswordManagerDialogBrowserTest&) = delete;
+
void ShowUi(const std::string& name) override {
// Note regarding flakiness: LocationBarBubbleDelegateView::ShowForReason()
// uses ShowInactive() unless the bubble is invoked with reason ==
@@ -3311,9 +3317,6 @@
ASSERT_TRUE(content::ExecuteScript(WebContents(), fill_and_submit));
observer.Wait();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PasswordManagerDialogBrowserTest);
};
IN_PROC_BROWSER_TEST_F(PasswordManagerDialogBrowserTest, InvokeUi_normal) {
diff --git a/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc b/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc
index 91df485..50dcbda0 100644
--- a/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc
+++ b/chrome/browser/password_manager/password_manager_captured_sites_interactive_uitest.cc
@@ -77,6 +77,11 @@
TestRecipeReplayChromeFeatureActionExecutor,
public ::testing::WithParamInterface<CapturedSiteParams> {
public:
+ CapturedSitesPasswordManagerBrowserTest(
+ const CapturedSitesPasswordManagerBrowserTest&) = delete;
+ CapturedSitesPasswordManagerBrowserTest& operator=(
+ const CapturedSitesPasswordManagerBrowserTest&) = delete;
+
// TestRecipeReplayChromeFeatureActionExecutor:
bool AddCredential(const std::string& origin,
const std::string& username,
@@ -254,8 +259,6 @@
std::unique_ptr<ServerUrlLoader> server_url_loader_;
base::CallbackListSubscription create_services_subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(CapturedSitesPasswordManagerBrowserTest);
};
IN_PROC_BROWSER_TEST_P(CapturedSitesPasswordManagerBrowserTest, Recipe) {
diff --git a/chrome/browser/password_manager/password_manager_test_base.cc b/chrome/browser/password_manager/password_manager_test_base.cc
index 6c1d363..c4cf9664 100644
--- a/chrome/browser/password_manager/password_manager_test_base.cc
+++ b/chrome/browser/password_manager/password_manager_test_base.cc
@@ -58,6 +58,11 @@
explicit CustomManagePasswordsUIController(
content::WebContents* web_contents);
+ CustomManagePasswordsUIController(const CustomManagePasswordsUIController&) =
+ delete;
+ CustomManagePasswordsUIController& operator=(
+ const CustomManagePasswordsUIController&) = delete;
+
void WaitForState(password_manager::ui::State target_state);
void WaitForFallbackForSaving();
@@ -121,8 +126,6 @@
// True iff a prompt was automatically shown.
bool was_prompt_automatically_shown_;
-
- DISALLOW_COPY_AND_ASSIGN(CustomManagePasswordsUIController);
};
CustomManagePasswordsUIController::CustomManagePasswordsUIController(
diff --git a/chrome/browser/password_manager/password_manager_test_base.h b/chrome/browser/password_manager/password_manager_test_base.h
index f423aeeb..d5e897a 100644
--- a/chrome/browser/password_manager/password_manager_test_base.h
+++ b/chrome/browser/password_manager/password_manager_test_base.h
@@ -69,6 +69,9 @@
// of the prompt one can even construct a temporary BubbleObserver.
explicit BubbleObserver(content::WebContents* web_contents);
+ BubbleObserver(const BubbleObserver&) = delete;
+ BubbleObserver& operator=(const BubbleObserver&) = delete;
+
// Checks if the save prompt is being currently available due to either manual
// fallback or successful login.
bool IsSavePromptAvailable() const;
@@ -136,8 +139,6 @@
private:
ManagePasswordsUIController* const passwords_ui_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(BubbleObserver);
};
// A helper class that synchronously waits until the password store handles a
diff --git a/chrome/browser/password_manager/password_store_factory.h b/chrome/browser/password_manager/password_store_factory.h
index cd92b85..1474c7a 100644
--- a/chrome/browser/password_manager/password_store_factory.h
+++ b/chrome/browser/password_manager/password_store_factory.h
@@ -32,6 +32,9 @@
static PasswordStoreFactory* GetInstance();
+ PasswordStoreFactory(const PasswordStoreFactory&) = delete;
+ PasswordStoreFactory& operator=(const PasswordStoreFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<PasswordStoreFactory>;
@@ -44,8 +47,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(PasswordStoreFactory);
};
#endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_FACTORY_H_
diff --git a/chrome/browser/payments/payment_handler_permission_context_unittest.cc b/chrome/browser/payments/payment_handler_permission_context_unittest.cc
index cd826730..89cef67 100644
--- a/chrome/browser/payments/payment_handler_permission_context_unittest.cc
+++ b/chrome/browser/payments/payment_handler_permission_context_unittest.cc
@@ -56,6 +56,12 @@
class PaymentHandlerPermissionContextTests
: public ChromeRenderViewHostTestHarness {
+ public:
+ PaymentHandlerPermissionContextTests(
+ const PaymentHandlerPermissionContextTests&) = delete;
+ PaymentHandlerPermissionContextTests& operator=(
+ const PaymentHandlerPermissionContextTests&) = delete;
+
protected:
PaymentHandlerPermissionContextTests() = default;
@@ -69,8 +75,6 @@
permissions::PermissionRequestManager::CreateForWebContents(web_contents());
#endif
}
-
- DISALLOW_COPY_AND_ASSIGN(PaymentHandlerPermissionContextTests);
};
// PaymentHandler permission should be denied for insecure origin.
diff --git a/chrome/browser/payments/payment_request_can_make_payment_browsertest.cc b/chrome/browser/payments/payment_request_can_make_payment_browsertest.cc
index 99654255..f8cdb08 100644
--- a/chrome/browser/payments/payment_request_can_make_payment_browsertest.cc
+++ b/chrome/browser/payments/payment_request_can_make_payment_browsertest.cc
@@ -28,6 +28,12 @@
class PaymentRequestCanMakePaymentTestBase
: public PaymentRequestPlatformBrowserTestBase {
+ public:
+ PaymentRequestCanMakePaymentTestBase(
+ const PaymentRequestCanMakePaymentTestBase&) = delete;
+ PaymentRequestCanMakePaymentTestBase& operator=(
+ const PaymentRequestCanMakePaymentTestBase&) = delete;
+
protected:
PaymentRequestCanMakePaymentTestBase() = default;
@@ -46,8 +52,6 @@
private:
syncer::TestSyncService sync_service_;
-
- DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentTestBase);
};
class PaymentRequestCanMakePaymentQueryTest
@@ -55,6 +59,11 @@
protected:
PaymentRequestCanMakePaymentQueryTest() = default;
+ PaymentRequestCanMakePaymentQueryTest(
+ const PaymentRequestCanMakePaymentQueryTest&) = delete;
+ PaymentRequestCanMakePaymentQueryTest& operator=(
+ const PaymentRequestCanMakePaymentQueryTest&) = delete;
+
void CallCanMakePayment() {
ResetEventWaiterForEventSequence(
{TestEvent::kCanMakePaymentCalled, TestEvent::kCanMakePaymentReturned});
@@ -70,9 +79,6 @@
"hasEnrolledInstrument();"));
WaitForObservedEvent();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentQueryTest);
};
// Visa is required, and user has a visa instrument.
@@ -204,6 +210,12 @@
class PaymentRequestCanMakePaymentQueryCCTest
: public PaymentRequestCanMakePaymentTestBase {
+ public:
+ PaymentRequestCanMakePaymentQueryCCTest(
+ const PaymentRequestCanMakePaymentQueryCCTest&) = delete;
+ PaymentRequestCanMakePaymentQueryCCTest& operator=(
+ const PaymentRequestCanMakePaymentQueryCCTest&) = delete;
+
protected:
PaymentRequestCanMakePaymentQueryCCTest() = default;
@@ -231,9 +243,6 @@
: "hasEnrolledInstrument('mastercard');"));
WaitForObservedEvent();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentQueryCCTest);
};
// Test that repeated canMakePayment and hasEnrolledInstrument queries are
@@ -366,6 +375,11 @@
script_[CheckFor::BOB_PAY_AND_VISA] = "[bobPayMethod, basicVisaMethod]";
}
+ PaymentRequestCanMakePaymentQueryPMITest(
+ const PaymentRequestCanMakePaymentQueryPMITest&) = delete;
+ PaymentRequestCanMakePaymentQueryPMITest& operator=(
+ const PaymentRequestCanMakePaymentQueryPMITest&) = delete;
+
void CallCanMakePayment(CheckFor check_for) {
ResetEventWaiterForEventSequence(
{TestEvent::kCanMakePaymentCalled, TestEvent::kCanMakePaymentReturned});
@@ -387,8 +401,6 @@
private:
base::flat_map<CheckFor, std::string> script_;
-
- DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentQueryPMITest);
};
IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryPMITest,
diff --git a/chrome/browser/payments/payment_request_display_manager_factory.h b/chrome/browser/payments/payment_request_display_manager_factory.h
index 5f993ccb..49ca3da 100644
--- a/chrome/browser/payments/payment_request_display_manager_factory.h
+++ b/chrome/browser/payments/payment_request_display_manager_factory.h
@@ -20,6 +20,11 @@
static PaymentRequestDisplayManager* GetForBrowserContext(
content::BrowserContext* context);
+ PaymentRequestDisplayManagerFactory(
+ const PaymentRequestDisplayManagerFactory&) = delete;
+ PaymentRequestDisplayManagerFactory& operator=(
+ const PaymentRequestDisplayManagerFactory&) = delete;
+
private:
PaymentRequestDisplayManagerFactory();
~PaymentRequestDisplayManagerFactory() override;
@@ -30,7 +35,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
- DISALLOW_COPY_AND_ASSIGN(PaymentRequestDisplayManagerFactory);
};
} // namespace payments
diff --git a/chrome/browser/performance_manager/decorators/frozen_frame_aggregator_unittest.cc b/chrome/browser/performance_manager/decorators/frozen_frame_aggregator_unittest.cc
index 24bb467..09d2c520 100644
--- a/chrome/browser/performance_manager/decorators/frozen_frame_aggregator_unittest.cc
+++ b/chrome/browser/performance_manager/decorators/frozen_frame_aggregator_unittest.cc
@@ -40,6 +40,11 @@
} // namespace
class FrozenFrameAggregatorTest : public GraphTestHarness {
+ public:
+ FrozenFrameAggregatorTest(const FrozenFrameAggregatorTest&) = delete;
+ FrozenFrameAggregatorTest& operator=(const FrozenFrameAggregatorTest&) =
+ delete;
+
protected:
using Super = GraphTestHarness;
@@ -95,9 +100,6 @@
FrozenFrameAggregator* ffa_;
TestNodeWrapper<ProcessNodeImpl> process_node_;
TestNodeWrapper<PageNodeImpl> page_node_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrozenFrameAggregatorTest);
};
TEST_F(FrozenFrameAggregatorTest, ProcessAggregation) {
diff --git a/chrome/browser/performance_manager/decorators/process_metrics_decorator_unittest.cc b/chrome/browser/performance_manager/decorators/process_metrics_decorator_unittest.cc
index ab5638b..597e718 100644
--- a/chrome/browser/performance_manager/decorators/process_metrics_decorator_unittest.cc
+++ b/chrome/browser/performance_manager/decorators/process_metrics_decorator_unittest.cc
@@ -102,6 +102,11 @@
} // namespace
class ProcessMetricsDecoratorTest : public GraphTestHarness {
+ public:
+ ProcessMetricsDecoratorTest(const ProcessMetricsDecoratorTest&) = delete;
+ ProcessMetricsDecoratorTest& operator=(const ProcessMetricsDecoratorTest&) =
+ delete;
+
protected:
using Super = GraphTestHarness;
@@ -138,8 +143,6 @@
std::unique_ptr<ProcessMetricsDecorator::ScopedMetricsInterestToken>
metrics_interest_token_;
-
- DISALLOW_COPY_AND_ASSIGN(ProcessMetricsDecoratorTest);
};
TEST_F(ProcessMetricsDecoratorTest, RefreshTimer) {
diff --git a/chrome/browser/performance_manager/mechanisms/working_set_trimmer_win_unittest.cc b/chrome/browser/performance_manager/mechanisms/working_set_trimmer_win_unittest.cc
index 6b77b23..66aa382 100644
--- a/chrome/browser/performance_manager/mechanisms/working_set_trimmer_win_unittest.cc
+++ b/chrome/browser/performance_manager/mechanisms/working_set_trimmer_win_unittest.cc
@@ -73,6 +73,10 @@
}
class WorkingSetTrimmerTest : public GraphTestHarness {
+ public:
+ WorkingSetTrimmerTest(const WorkingSetTrimmerTest&) = delete;
+ WorkingSetTrimmerTest& operator=(const WorkingSetTrimmerTest&) = delete;
+
protected:
WorkingSetTrimmerTest() = default;
@@ -110,9 +114,6 @@
base::Process child_process_;
TestNodeWrapper<ProcessNodeImpl> process_node_ =
CreateNode<ProcessNodeImpl>();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WorkingSetTrimmerTest);
};
} // namespace
diff --git a/chrome/browser/performance_manager/observers/isolation_context_metrics.cc b/chrome/browser/performance_manager/observers/isolation_context_metrics.cc
index d9c1852..7e58698 100644
--- a/chrome/browser/performance_manager/observers/isolation_context_metrics.cc
+++ b/chrome/browser/performance_manager/observers/isolation_context_metrics.cc
@@ -60,11 +60,15 @@
IsolationContextMetricsProcessDataImpl> {
explicit IsolationContextMetricsProcessDataImpl(
const ProcessNode* process_node) {}
+
+ IsolationContextMetricsProcessDataImpl(
+ const IsolationContextMetricsProcessDataImpl&) = delete;
+ IsolationContextMetricsProcessDataImpl& operator=(
+ const IsolationContextMetricsProcessDataImpl&) = delete;
+
~IsolationContextMetricsProcessDataImpl() override = default;
IsolationContextMetrics::ProcessData process_data;
-
- DISALLOW_COPY_AND_ASSIGN(IsolationContextMetricsProcessDataImpl);
};
// static
diff --git a/chrome/browser/performance_manager/observers/metrics_collector_unittest.cc b/chrome/browser/performance_manager/observers/metrics_collector_unittest.cc
index 33f6ab0..95fccbb 100644
--- a/chrome/browser/performance_manager/observers/metrics_collector_unittest.cc
+++ b/chrome/browser/performance_manager/observers/metrics_collector_unittest.cc
@@ -32,6 +32,10 @@
MAYBE_MetricsCollectorTest() : GraphTestHarness() {}
+ MAYBE_MetricsCollectorTest(const MAYBE_MetricsCollectorTest&) = delete;
+ MAYBE_MetricsCollectorTest& operator=(const MAYBE_MetricsCollectorTest&) =
+ delete;
+
void SetUp() override {
Super::SetUp();
metrics_collector_ = new MetricsCollector();
@@ -52,8 +56,6 @@
private:
MetricsCollector* metrics_collector_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(MAYBE_MetricsCollectorTest);
};
TEST_F(MAYBE_MetricsCollectorTest, FromBackgroundedToFirstTitleUpdatedUMA) {
diff --git a/chrome/browser/performance_monitor/system_monitor_unittest.cc b/chrome/browser/performance_monitor/system_monitor_unittest.cc
index 4d388c62..5b9ea6f 100644
--- a/chrome/browser/performance_monitor/system_monitor_unittest.cc
+++ b/chrome/browser/performance_monitor/system_monitor_unittest.cc
@@ -54,6 +54,9 @@
SystemMonitorTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ SystemMonitorTest(const SystemMonitorTest&) = delete;
+ SystemMonitorTest& operator=(const SystemMonitorTest&) = delete;
+
void SetUp() override {
EXPECT_EQ(nullptr, SystemMonitor::Get());
system_monitor_ = base::WrapUnique(
@@ -83,8 +86,6 @@
protected:
base::test::TaskEnvironment task_environment_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemMonitorTest);
};
TEST_F(SystemMonitorTest, GetReturnsSingleInstance) {
diff --git a/chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h b/chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h
index 03234371..12c263ec 100644
--- a/chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h
+++ b/chrome/browser/permissions/adaptive_quiet_notification_permission_ui_enabler.h
@@ -45,6 +45,12 @@
static AdaptiveQuietNotificationPermissionUiEnabler* GetForProfile(
Profile* profile);
+ AdaptiveQuietNotificationPermissionUiEnabler() = delete;
+ AdaptiveQuietNotificationPermissionUiEnabler(
+ const AdaptiveQuietNotificationPermissionUiEnabler&) = delete;
+ AdaptiveQuietNotificationPermissionUiEnabler& operator=(
+ const AdaptiveQuietNotificationPermissionUiEnabler&) = delete;
+
// Called after a notification permission prompt was resolved.
void PermissionPromptResolved();
@@ -67,8 +73,6 @@
Profile* profile_;
std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
bool is_enabling_adaptively_ = false;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(AdaptiveQuietNotificationPermissionUiEnabler);
};
#endif // CHROME_BROWSER_PERMISSIONS_ADAPTIVE_QUIET_NOTIFICATION_PERMISSION_UI_ENABLER_H_
diff --git a/chrome/browser/permissions/crowd_deny_fake_safe_browsing_database_manager.h b/chrome/browser/permissions/crowd_deny_fake_safe_browsing_database_manager.h
index a55d11c..4fe2e31a 100644
--- a/chrome/browser/permissions/crowd_deny_fake_safe_browsing_database_manager.h
+++ b/chrome/browser/permissions/crowd_deny_fake_safe_browsing_database_manager.h
@@ -20,6 +20,11 @@
public:
CrowdDenyFakeSafeBrowsingDatabaseManager();
+ CrowdDenyFakeSafeBrowsingDatabaseManager(
+ const CrowdDenyFakeSafeBrowsingDatabaseManager&) = delete;
+ CrowdDenyFakeSafeBrowsingDatabaseManager& operator=(
+ const CrowdDenyFakeSafeBrowsingDatabaseManager&) = delete;
+
void SetSimulatedMetadataForUrl(
const GURL& url,
const safe_browsing::ThreatMetadata& metadata);
@@ -54,8 +59,6 @@
base::WeakPtrFactory<CrowdDenyFakeSafeBrowsingDatabaseManager> weak_factory_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(CrowdDenyFakeSafeBrowsingDatabaseManager);
};
#endif // CHROME_BROWSER_PERMISSIONS_CROWD_DENY_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_
diff --git a/chrome/browser/permissions/permission_decision_auto_blocker_factory.h b/chrome/browser/permissions/permission_decision_auto_blocker_factory.h
index 14e8c00..08439f0 100644
--- a/chrome/browser/permissions/permission_decision_auto_blocker_factory.h
+++ b/chrome/browser/permissions/permission_decision_auto_blocker_factory.h
@@ -22,6 +22,11 @@
Profile* profile);
static PermissionDecisionAutoBlockerFactory* GetInstance();
+ PermissionDecisionAutoBlockerFactory(
+ const PermissionDecisionAutoBlockerFactory&) = delete;
+ PermissionDecisionAutoBlockerFactory& operator=(
+ const PermissionDecisionAutoBlockerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
PermissionDecisionAutoBlockerFactory>;
@@ -35,8 +40,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PermissionDecisionAutoBlockerFactory);
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_DECISION_AUTO_BLOCKER_FACTORY_H_
diff --git a/chrome/browser/permissions/permission_manager_factory.h b/chrome/browser/permissions/permission_manager_factory.h
index 30c26ff..f72e941 100644
--- a/chrome/browser/permissions/permission_manager_factory.h
+++ b/chrome/browser/permissions/permission_manager_factory.h
@@ -24,6 +24,9 @@
static permissions::PermissionManager* GetForProfile(Profile* profile);
static PermissionManagerFactory* GetInstance();
+ PermissionManagerFactory(const PermissionManagerFactory&) = delete;
+ PermissionManagerFactory& operator=(const PermissionManagerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<PermissionManagerFactory>;
@@ -35,8 +38,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PermissionManagerFactory);
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_MANAGER_FACTORY_H_
diff --git a/chrome/browser/permissions/permission_update_infobar_delegate_android.h b/chrome/browser/permissions/permission_update_infobar_delegate_android.h
index 7b3649f..f4316938 100644
--- a/chrome/browser/permissions/permission_update_infobar_delegate_android.h
+++ b/chrome/browser/permissions/permission_update_infobar_delegate_android.h
@@ -53,6 +53,11 @@
int permission_msg_id,
PermissionUpdatedCallback callback);
+ PermissionUpdateInfoBarDelegate(const PermissionUpdateInfoBarDelegate&) =
+ delete;
+ PermissionUpdateInfoBarDelegate& operator=(
+ const PermissionUpdateInfoBarDelegate&) = delete;
+
void OnPermissionResult(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj,
jboolean all_permissions_granted);
@@ -95,8 +100,6 @@
std::vector<ContentSettingsType> content_settings_types_;
int permission_msg_id_;
PermissionUpdatedCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(PermissionUpdateInfoBarDelegate);
};
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_UPDATE_INFOBAR_DELEGATE_ANDROID_H_
diff --git a/chrome/browser/permissions/pref_notification_permission_ui_selector_unittest.cc b/chrome/browser/permissions/pref_notification_permission_ui_selector_unittest.cc
index 41a726d..a8bda1f 100644
--- a/chrome/browser/permissions/pref_notification_permission_ui_selector_unittest.cc
+++ b/chrome/browser/permissions/pref_notification_permission_ui_selector_unittest.cc
@@ -40,6 +40,11 @@
: testing_profile_(std::make_unique<TestingProfile>()),
pref_selector_(testing_profile_.get()) {}
+ PrefNotificationPermissionUiSelectorTest(
+ const PrefNotificationPermissionUiSelectorTest&) = delete;
+ PrefNotificationPermissionUiSelectorTest& operator=(
+ const PrefNotificationPermissionUiSelectorTest&) = delete;
+
PrefNotificationPermissionUiSelector* pref_selector() {
return &pref_selector_;
}
@@ -52,8 +57,6 @@
std::unique_ptr<TestingProfile> testing_profile_;
PrefNotificationPermissionUiSelector pref_selector_;
-
- DISALLOW_COPY_AND_ASSIGN(PrefNotificationPermissionUiSelectorTest);
};
TEST_F(PrefNotificationPermissionUiSelectorTest, FeatureAndPrefCombinations) {
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
index 19f457a..6f08b1d4 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
@@ -80,6 +80,11 @@
public:
MockPictureInPictureWindowController() = default;
+ MockPictureInPictureWindowController(
+ const MockPictureInPictureWindowController&) = delete;
+ MockPictureInPictureWindowController& operator=(
+ const MockPictureInPictureWindowController&) = delete;
+
// PictureInPictureWindowController:
MOCK_METHOD0(Show, void());
MOCK_METHOD0(FocusInitiator, void());
@@ -97,9 +102,6 @@
MOCK_METHOD0(ToggleMicrophone, void());
MOCK_METHOD0(ToggleCamera, void());
MOCK_METHOD0(HangUp, void());
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockPictureInPictureWindowController);
};
const base::FilePath::CharType kPictureInPictureWindowSizePage[] =
@@ -199,6 +201,11 @@
public:
PictureInPictureWindowControllerBrowserTest() = default;
+ PictureInPictureWindowControllerBrowserTest(
+ const PictureInPictureWindowControllerBrowserTest&) = delete;
+ PictureInPictureWindowControllerBrowserTest& operator=(
+ const PictureInPictureWindowControllerBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
host_resolver()->AddRule("*", "127.0.0.1");
embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data");
@@ -298,8 +305,6 @@
private:
content::PictureInPictureWindowController* pip_window_controller_ = nullptr;
MockPictureInPictureWindowController mock_controller_;
-
- DISALLOW_COPY_AND_ASSIGN(PictureInPictureWindowControllerBrowserTest);
};
// Checks the creation of the window controller, as well as basic window
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
index c019db4..5b5379c 100644
--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
+++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
@@ -30,6 +30,10 @@
// Returns the singleton instance.
static PictureInPictureWindowManager* GetInstance();
+ PictureInPictureWindowManager(const PictureInPictureWindowManager&) = delete;
+ PictureInPictureWindowManager& operator=(
+ const PictureInPictureWindowManager&) = delete;
+
// Some PIP windows (e.g. from ARC) may not have a WebContents as the source
// of the PIP content. This function lets them provide their own window
// controller directly.
@@ -62,8 +66,6 @@
std::unique_ptr<ContentsObserver> contents_observer_;
content::PictureInPictureWindowController* pip_window_controller_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(PictureInPictureWindowManager);
};
#endif // CHROME_BROWSER_PICTURE_IN_PICTURE_PICTURE_IN_PICTURE_WINDOW_MANAGER_H_
diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.cc b/chrome/browser/plugins/chrome_plugin_service_filter.cc
index b39e6801..2faefc2 100644
--- a/chrome/browser/plugins/chrome_plugin_service_filter.cc
+++ b/chrome/browser/plugins/chrome_plugin_service_filter.cc
@@ -37,14 +37,15 @@
scoped_refptr<HostContentSettingsMap> hcsm,
scoped_refptr<FlashTemporaryPermissionTracker> ftpm,
Profile* profile);
+
+ ContextInfo(const ContextInfo&) = delete;
+ ContextInfo& operator=(const ContextInfo&) = delete;
+
~ContextInfo();
scoped_refptr<PluginPrefs> plugin_prefs;
scoped_refptr<HostContentSettingsMap> host_content_settings_map;
scoped_refptr<FlashTemporaryPermissionTracker> permission_tracker;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ContextInfo);
};
ChromePluginServiceFilter::ContextInfo::ContextInfo(
diff --git a/chrome/browser/plugins/flash_temporary_permission_tracker.cc b/chrome/browser/plugins/flash_temporary_permission_tracker.cc
index 73b383c..a1a2bea 100644
--- a/chrome/browser/plugins/flash_temporary_permission_tracker.cc
+++ b/chrome/browser/plugins/flash_temporary_permission_tracker.cc
@@ -25,6 +25,9 @@
const GURL& origin,
FlashTemporaryPermissionTracker* owner);
+ GrantObserver(const GrantObserver&) = delete;
+ GrantObserver& operator=(const GrantObserver&) = delete;
+
const GURL& origin() { return origin_; }
private:
@@ -33,8 +36,6 @@
GURL origin_;
FlashTemporaryPermissionTracker* owner_;
-
- DISALLOW_COPY_AND_ASSIGN(GrantObserver);
};
// static
diff --git a/chrome/browser/plugins/flash_temporary_permission_tracker.h b/chrome/browser/plugins/flash_temporary_permission_tracker.h
index 23b056f7..b24bc7f 100644
--- a/chrome/browser/plugins/flash_temporary_permission_tracker.h
+++ b/chrome/browser/plugins/flash_temporary_permission_tracker.h
@@ -27,6 +27,11 @@
static scoped_refptr<FlashTemporaryPermissionTracker> Get(
content::BrowserContext* browser_context);
+ FlashTemporaryPermissionTracker(const FlashTemporaryPermissionTracker&) =
+ delete;
+ FlashTemporaryPermissionTracker& operator=(
+ const FlashTemporaryPermissionTracker&) = delete;
+
// Returns true if Flash is enabled for a given |url|. Can be called from any
// thread.
bool IsFlashEnabled(const GURL& url);
@@ -62,8 +67,6 @@
// Lock to protect |granted_origins_|. This is needed because IsFlashEnabled
// may be called from any thread via the ChromePluginServiceFilter.
base::Lock granted_origins_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(FlashTemporaryPermissionTracker);
};
#endif // CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_H_
diff --git a/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h b/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
index bb397314..49b93f5 100644
--- a/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
+++ b/chrome/browser/plugins/flash_temporary_permission_tracker_factory.h
@@ -24,6 +24,11 @@
content::BrowserContext* browser_context);
static FlashTemporaryPermissionTrackerFactory* GetInstance();
+ FlashTemporaryPermissionTrackerFactory(
+ const FlashTemporaryPermissionTrackerFactory&) = delete;
+ FlashTemporaryPermissionTrackerFactory& operator=(
+ const FlashTemporaryPermissionTrackerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
FlashTemporaryPermissionTrackerFactory>;
@@ -36,8 +41,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(FlashTemporaryPermissionTrackerFactory);
};
#endif // CHROME_BROWSER_PLUGINS_FLASH_TEMPORARY_PERMISSION_TRACKER_FACTORY_H_
diff --git a/chrome/browser/plugins/plugin_finder.h b/chrome/browser/plugins/plugin_finder.h
index f4c5b11..d70fc71 100644
--- a/chrome/browser/plugins/plugin_finder.h
+++ b/chrome/browser/plugins/plugin_finder.h
@@ -38,6 +38,9 @@
public:
static PluginFinder* GetInstance();
+ PluginFinder(const PluginFinder&) = delete;
+ PluginFinder& operator=(const PluginFinder&) = delete;
+
// It should be called on the UI thread.
void Init();
@@ -80,8 +83,6 @@
// Synchronization for the above member variables is required since multiple
// threads can be accessing them concurrently.
base::Lock mutex_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginFinder);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_FINDER_H_
diff --git a/chrome/browser/plugins/plugin_info_host_impl.cc b/chrome/browser/plugins/plugin_info_host_impl.cc
index 51db2e3..30017a72 100644
--- a/chrome/browser/plugins/plugin_info_host_impl.cc
+++ b/chrome/browser/plugins/plugin_info_host_impl.cc
@@ -78,6 +78,11 @@
return base::Singleton<PluginInfoHostImplShutdownNotifierFactory>::get();
}
+ PluginInfoHostImplShutdownNotifierFactory(
+ const PluginInfoHostImplShutdownNotifierFactory&) = delete;
+ PluginInfoHostImplShutdownNotifierFactory& operator=(
+ const PluginInfoHostImplShutdownNotifierFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
PluginInfoHostImplShutdownNotifierFactory>;
@@ -87,8 +92,6 @@
"PluginInfoHostImpl") {}
~PluginInfoHostImplShutdownNotifierFactory() override {}
-
- DISALLOW_COPY_AND_ASSIGN(PluginInfoHostImplShutdownNotifierFactory);
};
#if BUILDFLAG(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/plugins/plugin_info_host_impl.h b/chrome/browser/plugins/plugin_info_host_impl.h
index 8b8662d..389d4cd 100644
--- a/chrome/browser/plugins/plugin_info_host_impl.h
+++ b/chrome/browser/plugins/plugin_info_host_impl.h
@@ -92,6 +92,10 @@
};
PluginInfoHostImpl(int render_process_id, Profile* profile);
+
+ PluginInfoHostImpl(const PluginInfoHostImpl&) = delete;
+ PluginInfoHostImpl& operator=(const PluginInfoHostImpl&) = delete;
+
~PluginInfoHostImpl() override;
static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -121,8 +125,6 @@
base::CallbackListSubscription shutdown_subscription_;
base::WeakPtrFactory<PluginInfoHostImpl> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PluginInfoHostImpl);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFO_HOST_IMPL_H_
diff --git a/chrome/browser/plugins/plugin_infobar_delegates.h b/chrome/browser/plugins/plugin_infobar_delegates.h
index af45c94..607f693 100644
--- a/chrome/browser/plugins/plugin_infobar_delegates.h
+++ b/chrome/browser/plugins/plugin_infobar_delegates.h
@@ -33,6 +33,10 @@
PluginInstaller* installer,
std::unique_ptr<PluginMetadata> metadata);
+ OutdatedPluginInfoBarDelegate(const OutdatedPluginInfoBarDelegate&) = delete;
+ OutdatedPluginInfoBarDelegate& operator=(
+ const OutdatedPluginInfoBarDelegate&) = delete;
+
private:
OutdatedPluginInfoBarDelegate(
PluginInstaller* installer,
@@ -67,8 +71,6 @@
std::unique_ptr<PluginMetadata> plugin_metadata_;
std::u16string message_;
-
- DISALLOW_COPY_AND_ASSIGN(OutdatedPluginInfoBarDelegate);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_INFOBAR_DELEGATES_H_
diff --git a/chrome/browser/plugins/plugin_prefs.h b/chrome/browser/plugins/plugin_prefs.h
index 21bcf0b..322ecd1 100644
--- a/chrome/browser/plugins/plugin_prefs.h
+++ b/chrome/browser/plugins/plugin_prefs.h
@@ -43,6 +43,9 @@
// created PluginPrefs object.
static scoped_refptr<PluginPrefs> GetForTestingProfile(Profile* profile);
+ PluginPrefs(const PluginPrefs&) = delete;
+ PluginPrefs& operator=(const PluginPrefs&) = delete;
+
// Creates a new instance. This method should only be used for testing.
PluginPrefs();
@@ -85,8 +88,6 @@
PrefService* prefs_ = nullptr;
PrefChangeRegistrar registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginPrefs);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_
diff --git a/chrome/browser/plugins/plugin_test_utils.h b/chrome/browser/plugins/plugin_test_utils.h
index 5bb11a6..1ef6c8a 100644
--- a/chrome/browser/plugins/plugin_test_utils.h
+++ b/chrome/browser/plugins/plugin_test_utils.h
@@ -16,6 +16,10 @@
class PluginTestUtils {
public:
+ PluginTestUtils() = delete;
+ PluginTestUtils(const PluginTestUtils&) = delete;
+ PluginTestUtils& operator=(const PluginTestUtils&) = delete;
+
// Runs the JavaScript |test_script|, which is provided 'plugin' as a variable
// referencing the |element_id| element. Returns the string extracted from
// window.domAutomationController.
@@ -26,9 +30,6 @@
// Blocks until the placeholder is ready.
static void WaitForPlaceholderReady(content::WebContents* contents,
const std::string& element_id);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(PluginTestUtils);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_TEST_UTILS_H_
diff --git a/chrome/browser/plugins/plugin_utils.h b/chrome/browser/plugins/plugin_utils.h
index c82fa22c..594a36d 100644
--- a/chrome/browser/plugins/plugin_utils.h
+++ b/chrome/browser/plugins/plugin_utils.h
@@ -25,6 +25,10 @@
class PluginUtils {
public:
+ PluginUtils() = delete;
+ PluginUtils(const PluginUtils&) = delete;
+ PluginUtils& operator=(const PluginUtils&) = delete;
+
// |is_default| and |is_managed| may be nullptr. In that case, they aren't
// set.
static void GetPluginContentSetting(
@@ -47,9 +51,6 @@
// keys and the corresponding extensions Ids as values.
static base::flat_map<std::string, std::string> GetMimeTypeToExtensionIdMap(
content::BrowserContext* browser_context);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(PluginUtils);
};
#endif // CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_H_
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_factory.h b/chrome/browser/predictors/autocomplete_action_predictor_factory.h
index 3dfcbb8c..78f5730 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_factory.h
+++ b/chrome/browser/predictors/autocomplete_action_predictor_factory.h
@@ -25,6 +25,11 @@
static AutocompleteActionPredictorFactory* GetInstance();
+ AutocompleteActionPredictorFactory(
+ const AutocompleteActionPredictorFactory&) = delete;
+ AutocompleteActionPredictorFactory& operator=(
+ const AutocompleteActionPredictorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
AutocompleteActionPredictorFactory>;
@@ -37,8 +42,6 @@
content::BrowserContext* context) const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorFactory);
};
} // namespace predictors
diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table.h b/chrome/browser/predictors/autocomplete_action_predictor_table.h
index f446cba..0b1229b 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor_table.h
+++ b/chrome/browser/predictors/autocomplete_action_predictor_table.h
@@ -61,6 +61,11 @@
typedef std::vector<Row> Rows;
+ AutocompleteActionPredictorTable(const AutocompleteActionPredictorTable&) =
+ delete;
+ AutocompleteActionPredictorTable& operator=(
+ const AutocompleteActionPredictorTable&) = delete;
+
// DB sequence functions.
void GetRow(const Row::Id& id, Row* row);
void GetAllRows(Rows* row_buffer);
@@ -80,8 +85,6 @@
// TableManager methods (DB sequence).
void CreateOrClearTablesIfNecessary() override;
void LogDatabaseStats() override;
-
- DISALLOW_COPY_AND_ASSIGN(AutocompleteActionPredictorTable);
};
} // namespace predictors
diff --git a/chrome/browser/predictors/loading_predictor_browsertest.cc b/chrome/browser/predictors/loading_predictor_browsertest.cc
index 53423bb..fde6aa6 100644
--- a/chrome/browser/predictors/loading_predictor_browsertest.cc
+++ b/chrome/browser/predictors/loading_predictor_browsertest.cc
@@ -115,6 +115,9 @@
explicit PredictorInitializer(ResourcePrefetchPredictor* predictor)
: TestObserver(predictor), predictor_(predictor) {}
+ PredictorInitializer(const PredictorInitializer&) = delete;
+ PredictorInitializer& operator=(const PredictorInitializer&) = delete;
+
void EnsurePredictorInitialized() {
if (predictor_->initialization_state_ ==
ResourcePrefetchPredictor::INITIALIZED) {
@@ -134,7 +137,6 @@
private:
ResourcePrefetchPredictor* predictor_;
base::RunLoop run_loop_;
- DISALLOW_COPY_AND_ASSIGN(PredictorInitializer);
};
class TestPreconnectManagerObserver : public PreconnectManager::Observer {
diff --git a/chrome/browser/predictors/loading_predictor_factory.h b/chrome/browser/predictors/loading_predictor_factory.h
index b78c650..c781a444 100644
--- a/chrome/browser/predictors/loading_predictor_factory.h
+++ b/chrome/browser/predictors/loading_predictor_factory.h
@@ -20,6 +20,9 @@
static LoadingPredictor* GetForProfile(Profile* profile);
static LoadingPredictorFactory* GetInstance();
+ LoadingPredictorFactory(const LoadingPredictorFactory&) = delete;
+ LoadingPredictorFactory& operator=(const LoadingPredictorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<LoadingPredictorFactory>;
@@ -29,8 +32,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(LoadingPredictorFactory);
};
} // namespace predictors
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
index 840c0cd..943722b 100644
--- a/chrome/browser/predictors/preconnect_manager.h
+++ b/chrome/browser/predictors/preconnect_manager.h
@@ -45,19 +45,25 @@
struct PreconnectStats {
explicit PreconnectStats(const GURL& url);
+
+ // Stats must be moved only.
+ PreconnectStats(const PreconnectStats&) = delete;
+ PreconnectStats& operator=(const PreconnectStats&) = delete;
+
~PreconnectStats();
GURL url;
base::TimeTicks start_time;
std::vector<PreconnectedRequestStats> requests_stats;
-
- // Stats must be moved only.
- DISALLOW_COPY_AND_ASSIGN(PreconnectStats);
};
// Stores the status of all preconnects associated with a given |url|.
struct PreresolveInfo {
PreresolveInfo(const GURL& url, size_t count);
+
+ PreresolveInfo(const PreresolveInfo&) = delete;
+ PreresolveInfo& operator=(const PreresolveInfo&) = delete;
+
~PreresolveInfo();
bool is_done() const { return queued_count == 0 && inflight_count == 0; }
@@ -67,8 +73,6 @@
size_t inflight_count = 0;
bool was_canceled = false;
std::unique_ptr<PreconnectStats> stats;
-
- DISALLOW_COPY_AND_ASSIGN(PreresolveInfo);
};
// Stores all data need for running a preresolve and a subsequent optional
@@ -79,9 +83,15 @@
bool allow_credentials,
net::NetworkIsolationKey network_isolation_key,
PreresolveInfo* info);
+
+ PreresolveJob(const PreresolveJob&) = delete;
+ PreresolveJob& operator=(const PreresolveJob&) = delete;
+
PreresolveJob(PreconnectRequest preconnect_request, PreresolveInfo* info);
PreresolveJob(PreresolveJob&& other);
+
~PreresolveJob();
+
bool need_preconnect() const {
return num_sockets > 0 && !(info && info->was_canceled);
}
@@ -97,8 +107,6 @@
PreresolveInfo* info;
std::unique_ptr<ResolveHostClientImpl> resolve_host_client;
std::unique_ptr<ProxyLookupClientImpl> proxy_lookup_client;
-
- DISALLOW_COPY_AND_ASSIGN(PreresolveJob);
};
// PreconnectManager is responsible for preresolving and preconnecting to
diff --git a/chrome/browser/predictors/predictor_database.cc b/chrome/browser/predictors/predictor_database.cc
index 09adf38..e4fd115 100644
--- a/chrome/browser/predictors/predictor_database.cc
+++ b/chrome/browser/predictors/predictor_database.cc
@@ -38,6 +38,11 @@
// for all methods performing database access.
class PredictorDatabaseInternal
: public base::RefCountedThreadSafe<PredictorDatabaseInternal> {
+ public:
+ PredictorDatabaseInternal(const PredictorDatabaseInternal&) = delete;
+ PredictorDatabaseInternal& operator=(const PredictorDatabaseInternal&) =
+ delete;
+
private:
friend class base::RefCountedThreadSafe<PredictorDatabaseInternal>;
friend class PredictorDatabase;
@@ -65,8 +70,6 @@
// to using a WeakPtr instead.
scoped_refptr<AutocompleteActionPredictorTable> autocomplete_table_;
scoped_refptr<ResourcePrefetchPredictorTables> resource_prefetch_tables_;
-
- DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseInternal);
};
PredictorDatabaseInternal::PredictorDatabaseInternal(
diff --git a/chrome/browser/predictors/predictor_database_factory.h b/chrome/browser/predictors/predictor_database_factory.h
index 82c1e98e..5309a2d 100644
--- a/chrome/browser/predictors/predictor_database_factory.h
+++ b/chrome/browser/predictors/predictor_database_factory.h
@@ -23,6 +23,9 @@
static PredictorDatabaseFactory* GetInstance();
+ PredictorDatabaseFactory(const PredictorDatabaseFactory&) = delete;
+ PredictorDatabaseFactory& operator=(const PredictorDatabaseFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<PredictorDatabaseFactory>;
@@ -32,8 +35,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PredictorDatabaseFactory);
};
} // namespace predictors
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_tables.h b/chrome/browser/predictors/resource_prefetch_predictor_tables.h
index aea242a..63e8b5f 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_tables.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor_tables.h
@@ -29,6 +29,11 @@
// - OriginTable - key: host, value: OriginData
class ResourcePrefetchPredictorTables : public sqlite_proto::TableManager {
public:
+ ResourcePrefetchPredictorTables(const ResourcePrefetchPredictorTables&) =
+ delete;
+ ResourcePrefetchPredictorTables& operator=(
+ const ResourcePrefetchPredictorTables&) = delete;
+
virtual sqlite_proto::KeyValueTable<RedirectData>* host_redirect_table();
virtual sqlite_proto::KeyValueTable<OriginData>* origin_table();
@@ -80,8 +85,6 @@
std::unique_ptr<sqlite_proto::KeyValueTable<RedirectData>>
host_redirect_table_;
std::unique_ptr<sqlite_proto::KeyValueTable<OriginData>> origin_table_;
-
- DISALLOW_COPY_AND_ASSIGN(ResourcePrefetchPredictorTables);
};
} // namespace predictors
diff --git a/chrome/browser/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc b/chrome/browser/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc
index 2e28833..f8aaba91 100644
--- a/chrome/browser/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc
+++ b/chrome/browser/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc
@@ -269,6 +269,10 @@
public:
NoStatePrefetchBrowserTest() {}
+ NoStatePrefetchBrowserTest(const NoStatePrefetchBrowserTest&) = delete;
+ NoStatePrefetchBrowserTest& operator=(const NoStatePrefetchBrowserTest&) =
+ delete;
+
void SetUpDefaultCommandLine(base::CommandLine* command_line) override {
test_utils::PrerenderInProcessBrowserTest::SetUpDefaultCommandLine(
command_line);
@@ -422,8 +426,6 @@
private:
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(NoStatePrefetchBrowserTest);
};
class NoStatePrefetchBrowserTestHttpCache
diff --git a/chrome/browser/prefetch/no_state_prefetch/prerender_unittest.cc b/chrome/browser/prefetch/no_state_prefetch/prerender_unittest.cc
index e2c59dbb..80f69d8 100644
--- a/chrome/browser/prefetch/no_state_prefetch/prerender_unittest.cc
+++ b/chrome/browser/prefetch/no_state_prefetch/prerender_unittest.cc
@@ -102,6 +102,11 @@
public:
TestNetworkBytesChangedObserver() : network_bytes_changed_(false) {}
+ TestNetworkBytesChangedObserver(const TestNetworkBytesChangedObserver&) =
+ delete;
+ TestNetworkBytesChangedObserver& operator=(
+ const TestNetworkBytesChangedObserver&) = delete;
+
// prerender::NoStatePrefetchHandle::Observer
void OnPrefetchStop(
NoStatePrefetchHandle* no_state_prefetch_handle) override {}
@@ -114,8 +119,6 @@
private:
bool network_bytes_changed_;
-
- DISALLOW_COPY_AND_ASSIGN(TestNetworkBytesChangedObserver);
};
int DummyNoStatePrefetchContents::g_next_route_id_ = 0;
diff --git a/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_prefetch_metrics_collector.h b/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_prefetch_metrics_collector.h
index 5c963d0..516b9c4 100644
--- a/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_prefetch_metrics_collector.h
+++ b/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_prefetch_metrics_collector.h
@@ -29,6 +29,11 @@
PrefetchProxyPrefetchMetricsCollector(base::TimeTicks navigation_start_time,
ukm::SourceId ukm_source_id);
+ PrefetchProxyPrefetchMetricsCollector(
+ const PrefetchProxyPrefetchMetricsCollector&) = delete;
+ PrefetchProxyPrefetchMetricsCollector& operator=(
+ const PrefetchProxyPrefetchMetricsCollector&) = delete;
+
// Called when a mainframe resource is not eligible for prefetching. Note that
// if a mainframe is given here, |OnSubresourceNotEligible| is not expected to
// be called.
@@ -135,8 +140,6 @@
// Holds all the metrics that will be recorded, indexed by their url.
std::map<GURL, PrefetchMetric> resources_by_url_;
-
- DISALLOW_COPY_AND_ASSIGN(PrefetchProxyPrefetchMetricsCollector);
};
#endif // CHROME_BROWSER_PREFETCH_PREFETCH_PROXY_PREFETCH_PROXY_PREFETCH_METRICS_COLLECTOR_H_
diff --git a/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_proxying_url_loader_factory.cc b/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_proxying_url_loader_factory.cc
index 4368fcf..fbe8100 100644
--- a/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_proxying_url_loader_factory.cc
+++ b/chrome/browser/prefetch/prefetch_proxy/prefetch_proxy_proxying_url_loader_factory.cc
@@ -42,6 +42,9 @@
public:
SuccessCount() = default;
+ SuccessCount(const SuccessCount&) = delete;
+ SuccessCount& operator=(const SuccessCount&) = delete;
+
void Increment() { count_++; }
size_t count() const { return count_; }
@@ -50,8 +53,6 @@
~SuccessCount() = default;
size_t count_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(SuccessCount);
};
// This is the eligibility callback for
diff --git a/chrome/browser/prefetch/search_prefetch/search_prefetch_service_factory.h b/chrome/browser/prefetch/search_prefetch/search_prefetch_service_factory.h
index c8bdbac..7d2d9012 100644
--- a/chrome/browser/prefetch/search_prefetch/search_prefetch_service_factory.h
+++ b/chrome/browser/prefetch/search_prefetch/search_prefetch_service_factory.h
@@ -28,6 +28,10 @@
// Gets the LazyInstance that owns all SearchPrefetchService(s).
static SearchPrefetchServiceFactory* GetInstance();
+ SearchPrefetchServiceFactory(const SearchPrefetchServiceFactory&) = delete;
+ SearchPrefetchServiceFactory& operator=(const SearchPrefetchServiceFactory&) =
+ delete;
+
private:
friend base::NoDestructor<SearchPrefetchServiceFactory>;
@@ -37,8 +41,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SearchPrefetchServiceFactory);
};
#endif // CHROME_BROWSER_PREFETCH_SEARCH_PREFETCH_SEARCH_PREFETCH_SERVICE_FACTORY_H_
diff --git a/chrome/browser/prefs/chrome_command_line_pref_store.h b/chrome/browser/prefs/chrome_command_line_pref_store.h
index aa42b5a..2adf0ce 100644
--- a/chrome/browser/prefs/chrome_command_line_pref_store.h
+++ b/chrome/browser/prefs/chrome_command_line_pref_store.h
@@ -15,6 +15,10 @@
public:
explicit ChromeCommandLinePrefStore(const base::CommandLine* command_line);
+ ChromeCommandLinePrefStore(const ChromeCommandLinePrefStore&) = delete;
+ ChromeCommandLinePrefStore& operator=(const ChromeCommandLinePrefStore&) =
+ delete;
+
protected:
~ChromeCommandLinePrefStore() override;
@@ -48,8 +52,6 @@
static const SwitchToPreferenceMapEntry string_switch_map_[];
static const SwitchToPreferenceMapEntry path_switch_map_[];
static const SwitchToPreferenceMapEntry integer_switch_map_[];
-
- DISALLOW_COPY_AND_ASSIGN(ChromeCommandLinePrefStore);
};
#endif // CHROME_BROWSER_PREFS_CHROME_COMMAND_LINE_PREF_STORE_H_
diff --git a/chrome/browser/prefs/chrome_pref_model_associator_client.h b/chrome/browser/prefs/chrome_pref_model_associator_client.h
index d11606a6..c73e729 100644
--- a/chrome/browser/prefs/chrome_pref_model_associator_client.h
+++ b/chrome/browser/prefs/chrome_pref_model_associator_client.h
@@ -21,6 +21,11 @@
// Returns the global instance.
static ChromePrefModelAssociatorClient* GetInstance();
+ ChromePrefModelAssociatorClient(const ChromePrefModelAssociatorClient&) =
+ delete;
+ ChromePrefModelAssociatorClient& operator=(
+ const ChromePrefModelAssociatorClient&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ChromePrefModelAssociatorClient>;
@@ -35,8 +40,6 @@
const std::string& pref_name,
const base::Value& local_value,
const base::Value& server_value) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromePrefModelAssociatorClient);
};
#endif // CHROME_BROWSER_PREFS_CHROME_PREF_MODEL_ASSOCIATOR_CLIENT_H_
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.cc b/chrome/browser/prefs/chrome_pref_service_factory.cc
index 2eeb569a..43e1f8ed 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.cc
+++ b/chrome/browser/prefs/chrome_pref_service_factory.cc
@@ -330,6 +330,9 @@
explicit ResetOnLoadObserverImpl(const base::FilePath& profile_path)
: profile_path_(profile_path) {}
+ ResetOnLoadObserverImpl(const ResetOnLoadObserverImpl&) = delete;
+ ResetOnLoadObserverImpl& operator=(const ResetOnLoadObserverImpl&) = delete;
+
void OnResetOnLoad() override {
// A StartSyncFlare used to kick sync early in case of a reset event. This
// is done since sync may bring back the user's server value post-reset
@@ -343,8 +346,6 @@
private:
const base::FilePath profile_path_;
-
- DISALLOW_COPY_AND_ASSIGN(ResetOnLoadObserverImpl);
};
} // namespace
diff --git a/chrome/browser/prefs/incognito_mode_prefs.h b/chrome/browser/prefs/incognito_mode_prefs.h
index 50123c0..3455574 100644
--- a/chrome/browser/prefs/incognito_mode_prefs.h
+++ b/chrome/browser/prefs/incognito_mode_prefs.h
@@ -40,6 +40,10 @@
static constexpr Availability kDefaultAvailability = Availability::kEnabled;
+ IncognitoModePrefs() = delete;
+ IncognitoModePrefs(const IncognitoModePrefs&) = delete;
+ IncognitoModePrefs& operator=(const IncognitoModePrefs&) = delete;
+
// Register incognito related preferences.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -84,8 +88,6 @@
// to do - such as when checking for FORCED state).
static Availability GetAvailabilityInternal(const PrefService* pref_service,
GetAvailabilityMode mode);
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(IncognitoModePrefs);
};
#endif // CHROME_BROWSER_PREFS_INCOGNITO_MODE_PREFS_H_
diff --git a/chrome/browser/printing/background_printing_manager.h b/chrome/browser/printing/background_printing_manager.h
index d04d601e..e6f19fd 100644
--- a/chrome/browser/printing/background_printing_manager.h
+++ b/chrome/browser/printing/background_printing_manager.h
@@ -63,15 +63,17 @@
// version of the WebContents.
struct PrintingContents {
PrintingContents();
- ~PrintingContents();
+
+ PrintingContents(const PrintingContents&) = delete;
+ PrintingContents& operator=(const PrintingContents&) = delete;
+
PrintingContents(PrintingContents&&);
PrintingContents& operator=(PrintingContents&&);
+ ~PrintingContents();
+
std::unique_ptr<content::WebContents> contents;
std::unique_ptr<Observer> observer;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PrintingContents);
};
std::map<content::WebContents*, PrintingContents> printing_contents_map_;
diff --git a/chrome/browser/printing/pdf_to_emf_converter.cc b/chrome/browser/printing/pdf_to_emf_converter.cc
index 26668f8..61432502 100644
--- a/chrome/browser/printing/pdf_to_emf_converter.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter.cc
@@ -144,6 +144,9 @@
PdfConverter::GetPageCallback callback)
: page_number_(page_number), callback_(callback) {}
+ GetPageCallbackData(const GetPageCallbackData&) = delete;
+ GetPageCallbackData& operator=(const GetPageCallbackData&) = delete;
+
GetPageCallbackData(GetPageCallbackData&& other) {
*this = std::move(other);
}
@@ -162,8 +165,6 @@
uint32_t page_number_;
PdfConverter::GetPageCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(GetPageCallbackData);
};
void Initialize(scoped_refptr<base::RefCountedMemory> data);
diff --git a/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc b/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
index 4be8ebf..898d495 100644
--- a/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
+++ b/chrome/browser/printing/pdf_to_emf_converter_browsertest.cc
@@ -106,6 +106,11 @@
}
class PdfToEmfConverterBrowserTest : public InProcessBrowserTest {
+ public:
+ PdfToEmfConverterBrowserTest(const PdfToEmfConverterBrowserTest&) = delete;
+ PdfToEmfConverterBrowserTest& operator=(const PdfToEmfConverterBrowserTest&) =
+ delete;
+
protected:
PdfToEmfConverterBrowserTest() : test_data_dir_(GetTestDataDir()) {}
~PdfToEmfConverterBrowserTest() override = default;
@@ -226,8 +231,6 @@
std::unique_ptr<MetafilePlayer> current_emf_file_;
std::string expected_current_emf_data_;
std::string actual_current_emf_data_;
-
- DISALLOW_COPY_AND_ASSIGN(PdfToEmfConverterBrowserTest);
};
} // namespace
diff --git a/chrome/browser/printing/print_dialog_cloud_win.cc b/chrome/browser/printing/print_dialog_cloud_win.cc
index 3d6a58f..6e3e4b7 100644
--- a/chrome/browser/printing/print_dialog_cloud_win.cc
+++ b/chrome/browser/printing/print_dialog_cloud_win.cc
@@ -68,6 +68,9 @@
message_data_.append(base::UTF8ToUTF16(json_data));
}
+ PrintDataSetter(const PrintDataSetter&) = delete;
+ PrintDataSetter& operator=(const PrintDataSetter&) = delete;
+
private:
// Overridden from content::WebContentsObserver:
void DOMContentLoaded(content::RenderFrameHost* render_frame_host) override {
@@ -82,7 +85,6 @@
void WebContentsDestroyed() override { delete this; }
std::u16string message_data_;
- DISALLOW_COPY_AND_ASSIGN(PrintDataSetter);
};
void CreatePrintDialog(content::BrowserContext* browser_context,
diff --git a/chrome/browser/printing/print_job.h b/chrome/browser/printing/print_job.h
index b8b8352..5914354 100644
--- a/chrome/browser/printing/print_job.h
+++ b/chrome/browser/printing/print_job.h
@@ -62,6 +62,9 @@
// component initiated this print job.
PrintJob();
+ PrintJob(const PrintJob&) = delete;
+ PrintJob& operator=(const PrintJob&) = delete;
+
// Grabs the ownership of the PrintJobWorker from a PrinterQuery along with
// the print settings. Sets the expected page count of the print job based on
// the settings.
@@ -233,8 +236,6 @@
// Holds the quit closure while running a nested RunLoop to flush tasks.
base::OnceClosure quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintJob);
};
// Details for a NOTIFY_PRINT_JOB_EVENT notification. The members may be NULL.
@@ -270,6 +271,9 @@
#endif
JobEventDetails(Type type, int job_id, PrintedDocument* document);
+ JobEventDetails(const JobEventDetails&) = delete;
+ JobEventDetails& operator=(const JobEventDetails&) = delete;
+
// Getters.
PrintedDocument* document() const;
#if defined(OS_WIN)
@@ -291,8 +295,6 @@
#endif
const Type type_;
int job_id_;
-
- DISALLOW_COPY_AND_ASSIGN(JobEventDetails);
};
} // namespace printing
diff --git a/chrome/browser/printing/print_job_manager.h b/chrome/browser/printing/print_job_manager.h
index 6e3322a2..e65263a 100644
--- a/chrome/browser/printing/print_job_manager.h
+++ b/chrome/browser/printing/print_job_manager.h
@@ -25,6 +25,9 @@
public:
PrintQueriesQueue();
+ PrintQueriesQueue(const PrintQueriesQueue&) = delete;
+ PrintQueriesQueue& operator=(const PrintQueriesQueue&) = delete;
+
// Queues a semi-initialized worker thread. Can be called from any thread.
// Current use case is queuing from the I/O thread.
// TODO(maruel): Have them vanish after a timeout (~5 minutes?)
@@ -53,8 +56,6 @@
base::Lock lock_;
PrinterQueries queued_queries_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintQueriesQueue);
};
class PrintJobManager : public content::NotificationObserver {
diff --git a/chrome/browser/printing/print_preview_data_service.h b/chrome/browser/printing/print_preview_data_service.h
index 13d2585..1a88a8b 100644
--- a/chrome/browser/printing/print_preview_data_service.h
+++ b/chrome/browser/printing/print_preview_data_service.h
@@ -27,6 +27,9 @@
public:
static PrintPreviewDataService* GetInstance();
+ PrintPreviewDataService(const PrintPreviewDataService&) = delete;
+ PrintPreviewDataService& operator=(const PrintPreviewDataService&) = delete;
+
// Get the data entry from PrintPreviewDataStore. |index| is zero-based or
// |printing::COMPLETE_PREVIEW_DOCUMENT_INDEX| to represent complete preview
// data. Use |index| to retrieve a specific preview page data. |data| is set
@@ -60,8 +63,6 @@
~PrintPreviewDataService();
PreviewDataStoreMap data_store_map_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintPreviewDataService);
};
#endif // CHROME_BROWSER_PRINTING_PRINT_PREVIEW_DATA_SERVICE_H_
diff --git a/chrome/browser/printing/print_preview_dialog_controller.h b/chrome/browser/printing/print_preview_dialog_controller.h
index e24e4ac..1ee0a11 100644
--- a/chrome/browser/printing/print_preview_dialog_controller.h
+++ b/chrome/browser/printing/print_preview_dialog_controller.h
@@ -32,6 +32,10 @@
public:
PrintPreviewDialogController();
+ PrintPreviewDialogController(const PrintPreviewDialogController&) = delete;
+ PrintPreviewDialogController& operator=(const PrintPreviewDialogController&) =
+ delete;
+
static PrintPreviewDialogController* GetInstance();
// Initiate print preview for |initiator|.
@@ -124,8 +128,6 @@
// Whether the PrintPreviewDialogController is in the middle of creating a
// print preview dialog.
bool is_creating_print_preview_dialog_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(PrintPreviewDialogController);
};
} // namespace printing
diff --git a/chrome/browser/printing/printer_manager_dialog.h b/chrome/browser/printing/printer_manager_dialog.h
index a8df6f3..4579ea5b 100644
--- a/chrome/browser/printing/printer_manager_dialog.h
+++ b/chrome/browser/printing/printer_manager_dialog.h
@@ -21,11 +21,12 @@
// This includes the OS-dependent UI to manage the network and local printers.
class PrinterManagerDialog {
public:
+ PrinterManagerDialog() = delete;
+ PrinterManagerDialog(const PrinterManagerDialog&) = delete;
+ PrinterManagerDialog& operator=(const PrinterManagerDialog&) = delete;
+
// Displays the native printer manager dialog.
static void ShowPrinterManagerDialog(Profile* profile);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(PrinterManagerDialog);
};
} // namespace printing
diff --git a/chrome/browser/printing/pwg_raster_converter.cc b/chrome/browser/printing/pwg_raster_converter.cc
index 7fb148e..63bfa48 100644
--- a/chrome/browser/printing/pwg_raster_converter.cc
+++ b/chrome/browser/printing/pwg_raster_converter.cc
@@ -45,6 +45,9 @@
PwgRasterConverterHelper(const PdfRenderSettings& settings,
const PwgRasterSettings& bitmap_settings);
+ PwgRasterConverterHelper(const PwgRasterConverterHelper&) = delete;
+ PwgRasterConverterHelper& operator=(const PwgRasterConverterHelper&) = delete;
+
void Convert(const base::RefCountedMemory* data,
PwgRasterConverter::ResultCallback callback);
@@ -61,8 +64,6 @@
mojo::Remote<printing::mojom::PdfToPwgRasterConverter>
pdf_to_pwg_raster_converter_remote_;
PwgRasterConverter::ResultCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(PwgRasterConverterHelper);
};
PwgRasterConverterHelper::PwgRasterConverterHelper(
diff --git a/chrome/browser/process_singleton_browsertest.cc b/chrome/browser/process_singleton_browsertest.cc
index 5f60029..2b44cfd 100644
--- a/chrome/browser/process_singleton_browsertest.cc
+++ b/chrome/browser/process_singleton_browsertest.cc
@@ -62,6 +62,9 @@
user_data_dir_(user_data_dir),
initial_command_line_for_relaunch_(initial_command_line_for_relaunch) {}
+ ChromeStarter(const ChromeStarter&) = delete;
+ ChromeStarter& operator=(const ChromeStarter&) = delete;
+
// We must reset some data members since we reuse the same ChromeStarter
// object and start/stop it a few times. We must start fresh! :-)
void Reset() {
@@ -127,8 +130,6 @@
base::TimeDelta timeout_;
base::FilePath user_data_dir_;
base::CommandLine initial_command_line_for_relaunch_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeStarter);
};
} // namespace
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
index 6ae3d8b..249a0cb 100644
--- a/chrome/browser/process_singleton_posix.cc
+++ b/chrome/browser/process_singleton_posix.cc
@@ -533,6 +533,9 @@
explicit LinuxWatcher(ProcessSingleton* parent)
: ui_task_runner_(base::ThreadTaskRunnerHandle::Get()), parent_(parent) {}
+ LinuxWatcher(const LinuxWatcher&) = delete;
+ LinuxWatcher& operator=(const LinuxWatcher&) = delete;
+
// Start listening for connections on the socket. This method should be
// called from the IO thread.
void StartListening(int socket);
@@ -567,8 +570,6 @@
ProcessSingleton* const parent_;
std::set<std::unique_ptr<SocketReader>, base::UniquePtrComparator> readers_;
-
- DISALLOW_COPY_AND_ASSIGN(LinuxWatcher);
};
void ProcessSingleton::LinuxWatcher::OnSocketCanReadWithoutBlocking(
diff --git a/chrome/browser/process_singleton_win_unittest.cc b/chrome/browser/process_singleton_win_unittest.cc
index 1865d98..8677589 100644
--- a/chrome/browser/process_singleton_win_unittest.cc
+++ b/chrome/browser/process_singleton_win_unittest.cc
@@ -148,6 +148,10 @@
// of rendezvous, specifically the ones where the singleton-owning process
// is hung.
class ProcessSingletonTest : public base::MultiProcessTest {
+ public:
+ ProcessSingletonTest(const ProcessSingletonTest&) = delete;
+ ProcessSingletonTest& operator=(const ProcessSingletonTest&) = delete;
+
protected:
enum WindowOption { WITH_WINDOW, NO_WINDOW };
@@ -262,8 +266,6 @@
base::TimeDelta old_notification_timeout_;
bool should_kill_called_;
base::HistogramTester histogram_tester_;
-
- DISALLOW_COPY_AND_ASSIGN(ProcessSingletonTest);
};
} // namespace
diff --git a/chrome/browser/profile_resetter/reset_report_uploader_factory.h b/chrome/browser/profile_resetter/reset_report_uploader_factory.h
index dd4a01b..db9a055 100644
--- a/chrome/browser/profile_resetter/reset_report_uploader_factory.h
+++ b/chrome/browser/profile_resetter/reset_report_uploader_factory.h
@@ -28,6 +28,10 @@
static ResetReportUploader* GetForBrowserContext(
content::BrowserContext* context);
+ ResetReportUploaderFactory(const ResetReportUploaderFactory&) = delete;
+ ResetReportUploaderFactory& operator=(const ResetReportUploaderFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ResetReportUploaderFactory>;
@@ -37,8 +41,6 @@
// BrowserContextKeyedServiceFactory overrides:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ResetReportUploaderFactory);
};
#endif // CHROME_BROWSER_PROFILE_RESETTER_RESET_REPORT_UPLOADER_FACTORY_H_
diff --git a/chrome/browser/profile_resetter/triggered_profile_resetter_factory.h b/chrome/browser/profile_resetter/triggered_profile_resetter_factory.h
index 84877e8..3d60f86c 100644
--- a/chrome/browser/profile_resetter/triggered_profile_resetter_factory.h
+++ b/chrome/browser/profile_resetter/triggered_profile_resetter_factory.h
@@ -30,6 +30,11 @@
content::BrowserContext* context);
static TriggeredProfileResetterFactory* GetInstance();
+ TriggeredProfileResetterFactory(const TriggeredProfileResetterFactory&) =
+ delete;
+ TriggeredProfileResetterFactory& operator=(
+ const TriggeredProfileResetterFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TriggeredProfileResetterFactory>;
friend class TriggeredProfileResetterTest;
@@ -43,8 +48,6 @@
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(TriggeredProfileResetterFactory);
};
#endif // CHROME_BROWSER_PROFILE_RESETTER_TRIGGERED_PROFILE_RESETTER_FACTORY_H_
diff --git a/chrome/browser/profiles/bookmark_model_loaded_observer.h b/chrome/browser/profiles/bookmark_model_loaded_observer.h
index b4ef0d2a..bb0fffa 100644
--- a/chrome/browser/profiles/bookmark_model_loaded_observer.h
+++ b/chrome/browser/profiles/bookmark_model_loaded_observer.h
@@ -16,6 +16,10 @@
public:
explicit BookmarkModelLoadedObserver(Profile* profile);
+ BookmarkModelLoadedObserver(const BookmarkModelLoadedObserver&) = delete;
+ BookmarkModelLoadedObserver& operator=(const BookmarkModelLoadedObserver&) =
+ delete;
+
private:
void BookmarkModelChanged() override;
void BookmarkModelLoaded(bookmarks::BookmarkModel* model,
@@ -23,8 +27,6 @@
void BookmarkModelBeingDeleted(bookmarks::BookmarkModel* model) override;
Profile* profile_;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkModelLoadedObserver);
};
#endif // CHROME_BROWSER_PROFILES_BOOKMARK_MODEL_LOADED_OBSERVER_H_
diff --git a/chrome/browser/profiles/chrome_version_service.h b/chrome/browser/profiles/chrome_version_service.h
index 5384e08..dd743bd 100644
--- a/chrome/browser/profiles/chrome_version_service.h
+++ b/chrome/browser/profiles/chrome_version_service.h
@@ -19,6 +19,10 @@
// Chrome by which the profile was created.
class ChromeVersionService {
public:
+ ChromeVersionService() = delete;
+ ChromeVersionService(const ChromeVersionService&) = delete;
+ ChromeVersionService& operator=(const ChromeVersionService&) = delete;
+
// Register the user pref we use.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -30,9 +34,6 @@
// Handles setting the profile.created_by_version Pref
static void OnProfileLoaded(PrefService* prefs, bool is_new_profile);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ChromeVersionService);
};
#endif // CHROME_BROWSER_PROFILES_CHROME_VERSION_SERVICE_H_
diff --git a/chrome/browser/profiles/gaia_info_update_service_factory.h b/chrome/browser/profiles/gaia_info_update_service_factory.h
index 2e29a54..f8f008d 100644
--- a/chrome/browser/profiles/gaia_info_update_service_factory.h
+++ b/chrome/browser/profiles/gaia_info_update_service_factory.h
@@ -25,6 +25,10 @@
// Returns an instance of the GAIAInfoUpdateServiceFactory singleton.
static GAIAInfoUpdateServiceFactory* GetInstance();
+ GAIAInfoUpdateServiceFactory(const GAIAInfoUpdateServiceFactory&) = delete;
+ GAIAInfoUpdateServiceFactory& operator=(const GAIAInfoUpdateServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<GAIAInfoUpdateServiceFactory>;
@@ -36,8 +40,6 @@
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceFactory);
};
#endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_FACTORY_H_
diff --git a/chrome/browser/profiles/gaia_info_update_service_unittest.cc b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
index 6ab0116..c8129a7 100644
--- a/chrome/browser/profiles/gaia_info_update_service_unittest.cc
+++ b/chrome/browser/profiles/gaia_info_update_service_unittest.cc
@@ -70,6 +70,11 @@
/*pref_service=*/nullptr,
account_consistency,
/*test_signin_client=*/nullptr) {}
+
+ GAIAInfoUpdateServiceTestBase(const GAIAInfoUpdateServiceTestBase&) = delete;
+ GAIAInfoUpdateServiceTestBase& operator=(
+ const GAIAInfoUpdateServiceTestBase&) = delete;
+
~GAIAInfoUpdateServiceTestBase() override = default;
void SetUp() override {
@@ -123,20 +128,19 @@
TestingProfile* profile_ = nullptr;
signin::IdentityTestEnvironment identity_test_env_;
std::unique_ptr<GAIAInfoUpdateService> service_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceTestBase);
};
class GAIAInfoUpdateServiceTest : public GAIAInfoUpdateServiceTestBase {
+ public:
+ GAIAInfoUpdateServiceTest(const GAIAInfoUpdateServiceTest&) = delete;
+ GAIAInfoUpdateServiceTest& operator=(const GAIAInfoUpdateServiceTest&) =
+ delete;
+
protected:
GAIAInfoUpdateServiceTest()
: GAIAInfoUpdateServiceTestBase(
signin::AccountConsistencyMethod::kDisabled) {}
~GAIAInfoUpdateServiceTest() override = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceTest);
};
} // namespace
@@ -177,14 +181,16 @@
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
namespace {
class GAIAInfoUpdateServiceDiceTest : public GAIAInfoUpdateServiceTestBase {
+ public:
+ GAIAInfoUpdateServiceDiceTest(const GAIAInfoUpdateServiceDiceTest&) = delete;
+ GAIAInfoUpdateServiceDiceTest& operator=(
+ const GAIAInfoUpdateServiceDiceTest&) = delete;
+
protected:
GAIAInfoUpdateServiceDiceTest()
: GAIAInfoUpdateServiceTestBase(signin::AccountConsistencyMethod::kDice) {
}
~GAIAInfoUpdateServiceDiceTest() override = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateServiceDiceTest);
};
} // namespace
diff --git a/chrome/browser/profiles/host_zoom_map_browsertest.cc b/chrome/browser/profiles/host_zoom_map_browsertest.cc
index 29b7ade..5852d7a 100644
--- a/chrome/browser/profiles/host_zoom_map_browsertest.cc
+++ b/chrome/browser/profiles/host_zoom_map_browsertest.cc
@@ -62,6 +62,9 @@
base::Unretained(this)));
}
+ ZoomLevelChangeObserver(const ZoomLevelChangeObserver&) = delete;
+ ZoomLevelChangeObserver& operator=(const ZoomLevelChangeObserver&) = delete;
+
void BlockUntilZoomLevelForHostHasChanged(const std::string& host) {
while (!std::count(changed_hosts_.begin(), changed_hosts_.end(), host)) {
message_loop_runner_->Run();
@@ -79,8 +82,6 @@
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
std::vector<std::string> changed_hosts_;
base::CallbackListSubscription subscription_;
-
- DISALLOW_COPY_AND_ASSIGN(ZoomLevelChangeObserver);
};
} // namespace
@@ -89,6 +90,9 @@
public:
HostZoomMapBrowserTest() {}
+ HostZoomMapBrowserTest(const HostZoomMapBrowserTest&) = delete;
+ HostZoomMapBrowserTest& operator=(const HostZoomMapBrowserTest&) = delete;
+
protected:
void SetDefaultZoomLevel(double level) {
browser()->profile()->GetZoomLevelPrefs()->SetDefaultZoomLevelPref(level);
@@ -152,8 +156,6 @@
ASSERT_TRUE(embedded_test_server()->Start());
host_resolver()->AddRule("*", "127.0.0.1");
}
-
- DISALLOW_COPY_AND_ASSIGN(HostZoomMapBrowserTest);
};
#define PARTITION_KEY_PLACEHOLDER "NNN"
@@ -163,6 +165,11 @@
explicit HostZoomMapBrowserTestWithPrefs(const std::string& prefs_data)
: prefs_data_(prefs_data) {}
+ HostZoomMapBrowserTestWithPrefs(const HostZoomMapBrowserTestWithPrefs&) =
+ delete;
+ HostZoomMapBrowserTestWithPrefs& operator=(
+ const HostZoomMapBrowserTestWithPrefs&) = delete;
+
private:
// InProcessBrowserTest:
bool SetUpUserDataDirectory() override {
@@ -191,8 +198,6 @@
}
std::string prefs_data_;
-
- DISALLOW_COPY_AND_ASSIGN(HostZoomMapBrowserTestWithPrefs);
};
// Zoom-related preferences demonstrating the two problems that
@@ -217,8 +222,10 @@
HostZoomMapSanitizationBrowserTest()
: HostZoomMapBrowserTestWithPrefs(kSanitizationTestPrefs) {}
- private:
- DISALLOW_COPY_AND_ASSIGN(HostZoomMapSanitizationBrowserTest);
+ HostZoomMapSanitizationBrowserTest(
+ const HostZoomMapSanitizationBrowserTest&) = delete;
+ HostZoomMapSanitizationBrowserTest& operator=(
+ const HostZoomMapSanitizationBrowserTest&) = delete;
};
// Regression test for crbug.com/437392
diff --git a/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc b/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
index 31bb47a..1548e237 100644
--- a/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
+++ b/chrome/browser/profiles/profile_activity_metrics_recorder_unittest.cc
@@ -38,6 +38,11 @@
task_environment_.GetMainThreadTaskRunner());
}
+ ProfileActivityMetricsRecorderTest(
+ const ProfileActivityMetricsRecorderTest&) = delete;
+ ProfileActivityMetricsRecorderTest& operator=(
+ const ProfileActivityMetricsRecorderTest&) = delete;
+
void SetUp() override {
Test::SetUp();
ASSERT_TRUE(profile_manager_.SetUp());
@@ -100,8 +105,6 @@
base::HistogramTester histogram_tester_;
std::vector<std::unique_ptr<Browser>> browsers_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileActivityMetricsRecorderTest);
};
TEST_F(ProfileActivityMetricsRecorderTest, GuestProfile) {
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
index 95955b6..6b6a3d5 100644
--- a/chrome/browser/profiles/profile_browsertest.cc
+++ b/chrome/browser/profiles/profile_browsertest.cc
@@ -132,6 +132,9 @@
base::Unretained(this)));
}
+ SimpleURLLoaderHelper(const SimpleURLLoaderHelper&) = delete;
+ SimpleURLLoaderHelper& operator=(const SimpleURLLoaderHelper&) = delete;
+
void OnSimpleLoaderComplete(std::unique_ptr<std::string> response_body) {
EXPECT_EQ(expected_error_code_, loader_->NetError());
is_complete_ = true;
@@ -148,8 +151,6 @@
bool is_complete_;
std::unique_ptr<network::SimpleURLLoader> loader_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleURLLoaderHelper);
};
class MockProfileDelegate : public Profile::Delegate {
diff --git a/chrome/browser/profiles/profile_browsertest_android.cc b/chrome/browser/profiles/profile_browsertest_android.cc
index e02d442..f6e01115 100644
--- a/chrome/browser/profiles/profile_browsertest_android.cc
+++ b/chrome/browser/profiles/profile_browsertest_android.cc
@@ -68,6 +68,9 @@
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
}
+ FileDestructionWatcher(const FileDestructionWatcher&) = delete;
+ FileDestructionWatcher& operator=(const FileDestructionWatcher&) = delete;
+
void WaitForDestruction() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
DCHECK(!watcher_);
@@ -123,8 +126,6 @@
// Created and destroyed off of the UI thread, on the sequence used to watch
// for changes.
std::unique_ptr<base::FilePathWatcher> watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(FileDestructionWatcher);
};
} // namespace
diff --git a/chrome/browser/profiles/profile_destroyer_unittest.cc b/chrome/browser/profiles/profile_destroyer_unittest.cc
index b9b0707..64cb3ed 100644
--- a/chrome/browser/profiles/profile_destroyer_unittest.cc
+++ b/chrome/browser/profiles/profile_destroyer_unittest.cc
@@ -16,6 +16,9 @@
public:
ProfileDestroyerTest() : is_primary_otr_(GetParam()) {}
+ ProfileDestroyerTest(const ProfileDestroyerTest&) = delete;
+ ProfileDestroyerTest& operator=(const ProfileDestroyerTest&) = delete;
+
void SetUp() override {
BrowserWithTestWindowTest::SetUp();
GetOriginalProfile()->SetProfileDestructionObserver(
@@ -67,8 +70,6 @@
TestingProfile* otr_profile_{nullptr};
std::vector<scoped_refptr<content::SiteInstance>> site_instances_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileDestroyerTest);
};
// Expect immediate OTR profile destruction when no pending renderer
diff --git a/chrome/browser/profiles/profile_list_desktop_browsertest.cc b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
index 34f5d71..999e653 100644
--- a/chrome/browser/profiles/profile_list_desktop_browsertest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_browsertest.cc
@@ -43,6 +43,10 @@
public:
ProfileListDesktopBrowserTest() {}
+ ProfileListDesktopBrowserTest(const ProfileListDesktopBrowserTest&) = delete;
+ ProfileListDesktopBrowserTest& operator=(
+ const ProfileListDesktopBrowserTest&) = delete;
+
std::unique_ptr<AvatarMenu> CreateAvatarMenu(
ProfileAttributesStorage* storage) {
return std::unique_ptr<AvatarMenu>(
@@ -51,8 +55,6 @@
private:
std::unique_ptr<AvatarMenu> avatar_menu_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileListDesktopBrowserTest);
};
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/browser/profiles/profile_list_desktop_unittest.cc b/chrome/browser/profiles/profile_list_desktop_unittest.cc
index 0092491..e63e363d 100644
--- a/chrome/browser/profiles/profile_list_desktop_unittest.cc
+++ b/chrome/browser/profiles/profile_list_desktop_unittest.cc
@@ -55,6 +55,9 @@
: manager_(TestingBrowserProcess::GetGlobal()) {
}
+ ProfileListDesktopTest(const ProfileListDesktopTest&) = delete;
+ ProfileListDesktopTest& operator=(const ProfileListDesktopTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(manager_.SetUp());
}
@@ -94,8 +97,6 @@
TestingProfileManager manager_;
std::unique_ptr<MockObserver> mock_observer_;
std::unique_ptr<AvatarMenu> avatar_menu_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfileListDesktopTest);
};
TEST_F(ProfileListDesktopTest, InitialCreation) {
diff --git a/chrome/browser/profiling_host/chrome_client_connection_manager.h b/chrome/browser/profiling_host/chrome_client_connection_manager.h
index 0669e47..eb437639 100644
--- a/chrome/browser/profiling_host/chrome_client_connection_manager.h
+++ b/chrome/browser/profiling_host/chrome_client_connection_manager.h
@@ -17,10 +17,12 @@
public:
ChromeClientConnectionManager(base::WeakPtr<Controller> controller,
Mode mode);
- bool AllowedToProfileRenderer(content::RenderProcessHost* host) override;
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeClientConnectionManager);
+ ChromeClientConnectionManager(const ChromeClientConnectionManager&) = delete;
+ ChromeClientConnectionManager& operator=(
+ const ChromeClientConnectionManager&) = delete;
+
+ bool AllowedToProfileRenderer(content::RenderProcessHost* host) override;
};
} // namespace heap_profiling
diff --git a/chrome/browser/profiling_host/profiling_process_host.h b/chrome/browser/profiling_host/profiling_process_host.h
index 1167eda..cf8dbf4a5 100644
--- a/chrome/browser/profiling_host/profiling_process_host.h
+++ b/chrome/browser/profiling_host/profiling_process_host.h
@@ -31,6 +31,9 @@
// Returns a pointer to the current global profiling process host.
static ProfilingProcessHost* GetInstance();
+ ProfilingProcessHost(const ProfilingProcessHost&) = delete;
+ ProfilingProcessHost& operator=(const ProfilingProcessHost&) = delete;
+
// Starts background profiling and metrics, if appropriate.
void Start();
@@ -61,8 +64,6 @@
// Every 24-hours, reports the profiling mode.
base::RepeatingTimer metrics_timer_;
-
- DISALLOW_COPY_AND_ASSIGN(ProfilingProcessHost);
};
} // namespace heap_profiling
diff --git a/chrome/browser/push_messaging/budget_database.h b/chrome/browser/push_messaging/budget_database.h
index 3af2cc3a..6bc4840 100644
--- a/chrome/browser/push_messaging/budget_database.h
+++ b/chrome/browser/push_messaging/budget_database.h
@@ -106,13 +106,16 @@
// which have been awarded.
struct BudgetInfo {
BudgetInfo();
+
+ BudgetInfo(const BudgetInfo&) = delete;
+ BudgetInfo& operator=(const BudgetInfo&) = delete;
+
BudgetInfo(const BudgetInfo&& other);
+
~BudgetInfo();
base::Time last_engagement_award;
BudgetChunks chunks;
-
- DISALLOW_COPY_AND_ASSIGN(BudgetInfo);
};
// Callback for writing budget values to the database.
diff --git a/chrome/browser/push_messaging/push_messaging_service_factory.h b/chrome/browser/push_messaging/push_messaging_service_factory.h
index 27591f0..61f305c2 100644
--- a/chrome/browser/push_messaging/push_messaging_service_factory.h
+++ b/chrome/browser/push_messaging/push_messaging_service_factory.h
@@ -18,6 +18,10 @@
content::BrowserContext* profile);
static PushMessagingServiceFactory* GetInstance();
+ PushMessagingServiceFactory(const PushMessagingServiceFactory&) = delete;
+ PushMessagingServiceFactory& operator=(const PushMessagingServiceFactory&) =
+ delete;
+
// Undo a previous call to SetTestingFactory, such that subsequent calls to
// GetForProfile get a real push service.
void RestoreFactoryForTests(content::BrowserContext* context);
@@ -33,8 +37,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceFactory);
};
#endif // CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_FACTORY_H_
diff --git a/chrome/browser/query_tiles/tile_service_factory.h b/chrome/browser/query_tiles/tile_service_factory.h
index df01abf..752a9d6 100644
--- a/chrome/browser/query_tiles/tile_service_factory.h
+++ b/chrome/browser/query_tiles/tile_service_factory.h
@@ -26,6 +26,9 @@
static TileServiceFactory* GetInstance();
static TileService* GetForKey(SimpleFactoryKey* key);
+ TileServiceFactory(const TileServiceFactory&) = delete;
+ TileServiceFactory& operator=(const TileServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TileServiceFactory>;
@@ -34,8 +37,6 @@
std::unique_ptr<KeyedService> BuildServiceInstanceFor(
SimpleFactoryKey* key) const override;
-
- DISALLOW_COPY_AND_ASSIGN(TileServiceFactory);
};
} // namespace query_tiles
diff --git a/chrome/browser/recovery/recovery_install_global_error_factory.h b/chrome/browser/recovery/recovery_install_global_error_factory.h
index dbc40503..5a14a050 100644
--- a/chrome/browser/recovery/recovery_install_global_error_factory.h
+++ b/chrome/browser/recovery/recovery_install_global_error_factory.h
@@ -25,6 +25,11 @@
// Returns an instance of the RecoveryInstallGlobalErrorFactory singleton.
static RecoveryInstallGlobalErrorFactory* GetInstance();
+ RecoveryInstallGlobalErrorFactory(const RecoveryInstallGlobalErrorFactory&) =
+ delete;
+ RecoveryInstallGlobalErrorFactory& operator=(
+ const RecoveryInstallGlobalErrorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<RecoveryInstallGlobalErrorFactory>;
@@ -34,8 +39,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(RecoveryInstallGlobalErrorFactory);
};
#endif // CHROME_BROWSER_RECOVERY_RECOVERY_INSTALL_GLOBAL_ERROR_FACTORY_H_
diff --git a/chrome/browser/renderer_context_menu/context_menu_content_type_factory.h b/chrome/browser/renderer_context_menu/context_menu_content_type_factory.h
index 76e5940..9f36fed 100644
--- a/chrome/browser/renderer_context_menu/context_menu_content_type_factory.h
+++ b/chrome/browser/renderer_context_menu/context_menu_content_type_factory.h
@@ -22,6 +22,10 @@
content::WebContents* web_contents,
const content::ContextMenuParams& params);
+ ContextMenuContentTypeFactory(const ContextMenuContentTypeFactory&) = delete;
+ ContextMenuContentTypeFactory& operator=(
+ const ContextMenuContentTypeFactory&) = delete;
+
private:
ContextMenuContentTypeFactory();
virtual ~ContextMenuContentTypeFactory();
@@ -29,8 +33,6 @@
static std::unique_ptr<ContextMenuContentType> CreateInternal(
content::WebContents* web_contents,
const content::ContextMenuParams& params);
-
- DISALLOW_COPY_AND_ASSIGN(ContextMenuContentTypeFactory);
};
#endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_CONTEXT_MENU_CONTENT_TYPE_FACTORY_H_
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
index 516bd0f..c29a16e 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_unittest.cc
@@ -163,6 +163,10 @@
// TODO(mgiuca): Add tests with DesktopPWAs enabled.
}
+ RenderViewContextMenuTest(const RenderViewContextMenuTest&) = delete;
+ RenderViewContextMenuTest& operator=(const RenderViewContextMenuTest&) =
+ delete;
+
// Proxy defined here to minimize friend classes in RenderViewContextMenu
static bool ExtensionContextAndPatternMatch(
const content::ContextMenuParams& params,
@@ -190,8 +194,6 @@
private:
content::RenderViewHostTestEnabler rvh_test_enabler_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuTest);
};
// Generates a URLPatternSet with a single pattern
@@ -369,6 +371,11 @@
: RenderViewContextMenuTest(
std::make_unique<extensions::TestExtensionEnvironment>()) {}
+ RenderViewContextMenuExtensionsTest(
+ const RenderViewContextMenuExtensionsTest&) = delete;
+ RenderViewContextMenuExtensionsTest& operator=(
+ const RenderViewContextMenuExtensionsTest&) = delete;
+
void SetUp() override {
RenderViewContextMenuTest::SetUp();
// TestingProfile does not provide a protocol registry.
@@ -386,8 +393,6 @@
protected:
std::unique_ptr<ProtocolHandlerRegistry> registry_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuExtensionsTest);
};
TEST_F(RenderViewContextMenuExtensionsTest,
@@ -430,6 +435,11 @@
public:
RenderViewContextMenuPrefsTest() = default;
+ RenderViewContextMenuPrefsTest(const RenderViewContextMenuPrefsTest&) =
+ delete;
+ RenderViewContextMenuPrefsTest& operator=(
+ const RenderViewContextMenuPrefsTest&) = delete;
+
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
registry_ = std::make_unique<ProtocolHandlerRegistry>(profile(), nullptr);
@@ -479,8 +489,6 @@
private:
std::unique_ptr<ProtocolHandlerRegistry> registry_;
TemplateURLService* template_url_service_;
-
- DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuPrefsTest);
};
// Verifies when Incognito Mode is not available (disabled by policy),
diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h
index 67d6754..526bc7c 100644
--- a/chrome/browser/renderer_host/chrome_extension_message_filter.h
+++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h
@@ -32,6 +32,10 @@
public:
explicit ChromeExtensionMessageFilter(Profile* profile);
+ ChromeExtensionMessageFilter(const ChromeExtensionMessageFilter&) = delete;
+ ChromeExtensionMessageFilter& operator=(const ChromeExtensionMessageFilter&) =
+ delete;
+
// content::BrowserMessageFilter methods:
bool OnMessageReceived(const IPC::Message& message) override;
void OverrideThreadForMessage(const IPC::Message& message,
@@ -86,8 +90,6 @@
extensions::ActivityLog* activity_log_;
base::ScopedObservation<Profile, ProfileObserver> observed_profile_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChromeExtensionMessageFilter);
};
#endif // CHROME_BROWSER_RENDERER_HOST_CHROME_EXTENSION_MESSAGE_FILTER_H_
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm
index c2e369a7..6ce197e 100644
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_browsertest.mm
@@ -88,6 +88,11 @@
base_path, base::FilePath(FILE_PATH_LITERAL("iframe.html")));
}
+ ChromeRenderWidgetHostViewMacHistorySwiperTest(
+ const ChromeRenderWidgetHostViewMacHistorySwiperTest&) = delete;
+ ChromeRenderWidgetHostViewMacHistorySwiperTest& operator=(
+ const ChromeRenderWidgetHostViewMacHistorySwiperTest&) = delete;
+
void SetUpOnMainThread() override {
event_queue_.reset([[NSMutableArray alloc] init]);
touch_ = CGPointMake(0.5, 0.5);
@@ -395,9 +400,6 @@
base::scoped_nsobject<NSMutableArray> event_queue_;
// The current location of the user's fingers on the track pad.
CGPoint touch_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeRenderWidgetHostViewMacHistorySwiperTest);
};
// The ordering, timing, and parameters of the events was determined by
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
index 56a23e8..b94f514 100644
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h
@@ -39,6 +39,11 @@
PP_Instance instance,
content::BrowserPpapiHost* host);
+ PepperIsolatedFileSystemMessageFilter(
+ const PepperIsolatedFileSystemMessageFilter&) = delete;
+ PepperIsolatedFileSystemMessageFilter& operator=(
+ const PepperIsolatedFileSystemMessageFilter&) = delete;
+
// ppapi::host::ResourceMessageFilter implementation.
scoped_refptr<base::SequencedTaskRunner> OverrideTaskRunnerForMessage(
const IPC::Message& msg) override;
@@ -77,8 +82,6 @@
// Set of origins that can use CrxFs private APIs from NaCl.
std::set<std::string> allowed_crxfs_origins_;
-
- DISALLOW_COPY_AND_ASSIGN(PepperIsolatedFileSystemMessageFilter);
};
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_
diff --git a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
index ba6178e9..6580531 100644
--- a/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
+++ b/chrome/browser/renderer_host/render_process_host_chrome_browsertest.cc
@@ -93,6 +93,10 @@
public:
ChromeRenderProcessHostTest() {}
+ ChromeRenderProcessHostTest(const ChromeRenderProcessHostTest&) = delete;
+ ChromeRenderProcessHostTest& operator=(const ChromeRenderProcessHostTest&) =
+ delete;
+
// Show a tab, activating the current one if there is one, and wait for
// the renderer process to be created or foregrounded, returning the
// WebContents associated with the tab.
@@ -244,9 +248,6 @@
EXPECT_NE(rph1, rph3);
EXPECT_NE(rph2, rph3);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessHostTest);
};
class ChromeRenderProcessHostTestWithCommandLine
@@ -582,6 +583,9 @@
WindowDestroyer(content::WebContents* web_contents, TabStripModel* model)
: content::WebContentsObserver(web_contents), tab_strip_model_(model) {}
+ WindowDestroyer(const WindowDestroyer&) = delete;
+ WindowDestroyer& operator=(const WindowDestroyer&) = delete;
+
// Wait for the browser window to be destroyed.
void Wait() { ui_test_utils::WaitForBrowserToClose(); }
@@ -591,8 +595,6 @@
private:
TabStripModel* tab_strip_model_;
-
- DISALLOW_COPY_AND_ASSIGN(WindowDestroyer);
};
// Test to ensure that while iterating through all listeners in
@@ -647,6 +649,11 @@
public:
ChromeRenderProcessHostBackgroundingTestWithAudio() {}
+ ChromeRenderProcessHostBackgroundingTestWithAudio(
+ const ChromeRenderProcessHostBackgroundingTestWithAudio&) = delete;
+ ChromeRenderProcessHostBackgroundingTestWithAudio& operator=(
+ const ChromeRenderProcessHostBackgroundingTestWithAudio&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
ChromeRenderProcessHostTest::SetUpCommandLine(command_line);
command_line->AppendSwitch(switches::kProcessPerTab);
@@ -724,8 +731,6 @@
#if defined(OS_MAC)
base::PortProvider* port_provider_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(ChromeRenderProcessHostBackgroundingTestWithAudio);
};
// Test to make sure that a process is backgrounded when the audio stops playing
diff --git a/chrome/browser/reputation/reputation_service.cc b/chrome/browser/reputation/reputation_service.cc
index 69a20d7..6427196 100644
--- a/chrome/browser/reputation/reputation_service.cc
+++ b/chrome/browser/reputation/reputation_service.cc
@@ -46,6 +46,9 @@
return base::Singleton<ReputationServiceFactory>::get();
}
+ ReputationServiceFactory(const ReputationServiceFactory&) = delete;
+ ReputationServiceFactory& operator=(const ReputationServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ReputationServiceFactory>;
@@ -66,8 +69,6 @@
content::BrowserContext* context) const override {
return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}
-
- DISALLOW_COPY_AND_ASSIGN(ReputationServiceFactory);
};
// Returns whether or not the Safety Tip should be suppressed for the given URL.
diff --git a/chrome/browser/reputation/reputation_service_unittest.cc b/chrome/browser/reputation/reputation_service_unittest.cc
index 6b7dd49..212bc956 100644
--- a/chrome/browser/reputation/reputation_service_unittest.cc
+++ b/chrome/browser/reputation/reputation_service_unittest.cc
@@ -16,12 +16,13 @@
#include "testing/gtest/include/gtest/gtest.h"
class ReputationServiceTest : public ChromeRenderViewHostTestHarness {
+ public:
+ ReputationServiceTest(const ReputationServiceTest&) = delete;
+ ReputationServiceTest& operator=(const ReputationServiceTest&) = delete;
+
protected:
ReputationServiceTest() {}
~ReputationServiceTest() override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReputationServiceTest);
};
// Test that the blocklist blocks patterns as expected.
diff --git a/chrome/browser/resource_coordinator/decision_details.h b/chrome/browser/resource_coordinator/decision_details.h
index 4b6e1185..629ea6b 100644
--- a/chrome/browser/resource_coordinator/decision_details.h
+++ b/chrome/browser/resource_coordinator/decision_details.h
@@ -176,6 +176,10 @@
};
DecisionDetails();
+
+ DecisionDetails(const DecisionDetails&) = delete;
+ DecisionDetails& operator=(const DecisionDetails&) = delete;
+
~DecisionDetails();
// Allow move assignment.
@@ -225,8 +229,6 @@
// reasons after this toggle isn't very informative.
bool toggled_;
std::vector<Reason> reasons_;
-
- DISALLOW_COPY_AND_ASSIGN(DecisionDetails);
};
} // namespace resource_coordinator
diff --git a/chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer_unittest.cc b/chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer_unittest.cc
index c0d6011..dcda3e0 100644
--- a/chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer_unittest.cc
+++ b/chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer_unittest.cc
@@ -30,6 +30,12 @@
"TabManager.Discarding.ReloadToCloseTime";
class DiscardMetricsLifecycleUnitObserverTest : public testing::Test {
+ public:
+ DiscardMetricsLifecycleUnitObserverTest(
+ const DiscardMetricsLifecycleUnitObserverTest&) = delete;
+ DiscardMetricsLifecycleUnitObserverTest& operator=(
+ const DiscardMetricsLifecycleUnitObserverTest&) = delete;
+
protected:
DiscardMetricsLifecycleUnitObserverTest()
: scoped_set_tick_clock_for_testing_(&test_clock_) {
@@ -47,9 +53,6 @@
base::HistogramTester histograms_;
base::SimpleTestTickClock test_clock_;
ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DiscardMetricsLifecycleUnitObserverTest);
};
} // namespace
diff --git a/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc b/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc
index a8c75b3..6a227d3 100644
--- a/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc
+++ b/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc
@@ -24,6 +24,10 @@
public:
MockLifecycleUnitObserver() = default;
+ MockLifecycleUnitObserver(const MockLifecycleUnitObserver&) = delete;
+ MockLifecycleUnitObserver& operator=(const MockLifecycleUnitObserver&) =
+ delete;
+
MOCK_METHOD3(OnLifecycleUnitStateChanged,
void(LifecycleUnit*,
LifecycleUnitState,
@@ -31,12 +35,13 @@
MOCK_METHOD2(OnLifecycleUnitVisibilityChanged,
void(LifecycleUnit*, content::Visibility));
MOCK_METHOD1(OnLifecycleUnitDestroyed, void(LifecycleUnit*));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockLifecycleUnitObserver);
};
class LifecycleUnitBaseTest : public testing::Test {
+ public:
+ LifecycleUnitBaseTest(const LifecycleUnitBaseTest&) = delete;
+ LifecycleUnitBaseTest& operator=(const LifecycleUnitBaseTest&) = delete;
+
protected:
LifecycleUnitBaseTest() {
metrics::DesktopSessionDurationTracker::Initialize();
@@ -52,9 +57,6 @@
ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_{&test_clock_};
testing::StrictMock<MockLifecycleUnitObserver> observer_;
std::unique_ptr<UsageClock> usage_clock_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LifecycleUnitBaseTest);
};
} // namespace
diff --git a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
index 503412c..e1e1e9b 100644
--- a/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
+++ b/chrome/browser/resource_coordinator/tab_activity_watcher_browsertest.cc
@@ -68,6 +68,10 @@
// that window and browser commands are really triggering the paths that lead
// to UKM logs.
class TabActivityWatcherTest : public InProcessBrowserTest {
+ public:
+ TabActivityWatcherTest(const TabActivityWatcherTest&) = delete;
+ TabActivityWatcherTest& operator=(const TabActivityWatcherTest&) = delete;
+
protected:
TabActivityWatcherTest() {
scoped_feature_list_.InitAndEnableFeatureWithParameters(
@@ -180,8 +184,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(TabActivityWatcherTest);
};
class TabActivityWatcherTestWithBackgroundLogDisabled
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
index a11a65c..0c54a7a 100644
--- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_source_unittest.cc
@@ -50,31 +50,37 @@
public:
MockLifecycleUnitSourceObserver() = default;
- MOCK_METHOD1(OnLifecycleUnitCreated, void(LifecycleUnit*));
+ MockLifecycleUnitSourceObserver(const MockLifecycleUnitSourceObserver&) =
+ delete;
+ MockLifecycleUnitSourceObserver& operator=(
+ const MockLifecycleUnitSourceObserver&) = delete;
- private:
- DISALLOW_COPY_AND_ASSIGN(MockLifecycleUnitSourceObserver);
+ MOCK_METHOD1(OnLifecycleUnitCreated, void(LifecycleUnit*));
};
class MockTabLifecycleObserver : public TabLifecycleObserver {
public:
MockTabLifecycleObserver() = default;
+ MockTabLifecycleObserver(const MockTabLifecycleObserver&) = delete;
+ MockTabLifecycleObserver& operator=(const MockTabLifecycleObserver&) = delete;
+
MOCK_METHOD3(OnDiscardedStateChange,
void(content::WebContents* contents,
LifecycleUnitDiscardReason reason,
bool is_discarded));
MOCK_METHOD2(OnAutoDiscardableStateChange,
void(content::WebContents* contents, bool is_auto_discardable));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockTabLifecycleObserver);
};
class MockLifecycleUnitObserver : public LifecycleUnitObserver {
public:
MockLifecycleUnitObserver() = default;
+ MockLifecycleUnitObserver(const MockLifecycleUnitObserver&) = delete;
+ MockLifecycleUnitObserver& operator=(const MockLifecycleUnitObserver&) =
+ delete;
+
MOCK_METHOD3(OnLifecycleUnitStateChanged,
void(LifecycleUnit* lifecycle_unit,
LifecycleUnitState,
@@ -83,9 +89,6 @@
void(LifecycleUnit* lifecycle_unit,
content::Visibility visibility));
MOCK_METHOD1(OnLifecycleUnitDestroyed, void(LifecycleUnit* lifecycle_unit));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockLifecycleUnitObserver);
};
bool IsFocused(LifecycleUnit* lifecycle_unit) {
@@ -93,6 +96,11 @@
}
class TabLifecycleUnitSourceTest : public ChromeRenderViewHostTestHarness {
+ public:
+ TabLifecycleUnitSourceTest(const TabLifecycleUnitSourceTest&) = delete;
+ TabLifecycleUnitSourceTest& operator=(const TabLifecycleUnitSourceTest&) =
+ delete;
+
protected:
TabLifecycleUnitSourceTest()
: ChromeRenderViewHostTestHarness(
@@ -417,8 +425,6 @@
private:
TestTabStripModelDelegate tab_strip_model_delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(TabLifecycleUnitSourceTest);
};
} // namespace
diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
index b69594d..29ac7afc 100644
--- a/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit_unittest.cc
@@ -64,15 +64,15 @@
public:
MockTabLifecycleObserver() = default;
+ MockTabLifecycleObserver(const MockTabLifecycleObserver&) = delete;
+ MockTabLifecycleObserver& operator=(const MockTabLifecycleObserver&) = delete;
+
MOCK_METHOD3(OnDiscardedStateChange,
void(content::WebContents* contents,
LifecycleUnitDiscardReason reason,
bool is_discarded));
MOCK_METHOD2(OnAutoDiscardableStateChange,
void(content::WebContents* contents, bool is_auto_discardable));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockTabLifecycleObserver);
};
} // namespace
@@ -81,6 +81,10 @@
public:
MockLifecycleUnitObserver() = default;
+ MockLifecycleUnitObserver(const MockLifecycleUnitObserver&) = delete;
+ MockLifecycleUnitObserver& operator=(const MockLifecycleUnitObserver&) =
+ delete;
+
MOCK_METHOD3(OnLifecycleUnitStateChanged,
void(LifecycleUnit*,
LifecycleUnitState,
@@ -88,9 +92,6 @@
MOCK_METHOD1(OnLifecycleUnitDestroyed, void(LifecycleUnit*));
MOCK_METHOD2(OnLifecycleUnitVisibilityChanged,
void(LifecycleUnit*, content::Visibility));
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockLifecycleUnitObserver);
};
class TabLifecycleUnitTest : public ChromeRenderViewHostTestHarness {
@@ -107,6 +108,9 @@
observers_.AddObserver(&observer_);
}
+ TabLifecycleUnitTest(const TabLifecycleUnitTest&) = delete;
+ TabLifecycleUnitTest& operator=(const TabLifecycleUnitTest&) = delete;
+
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
@@ -174,8 +178,6 @@
// So that the main thread looks like the UI thread as expected.
TestTabStripModelDelegate tab_strip_model_delegate_;
ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_;
-
- DISALLOW_COPY_AND_ASSIGN(TabLifecycleUnitTest);
};
class TabLifecycleUnitTest::ScopedEnterpriseOptOut {
diff --git a/chrome/browser/resource_coordinator/tab_manager_browsertest.cc b/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
index 5e0fca7d..b0b7d0e 100644
--- a/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
+++ b/chrome/browser/resource_coordinator/tab_manager_browsertest.cc
@@ -201,6 +201,10 @@
public:
TabManagerTestWithTwoTabs() = default;
+ TabManagerTestWithTwoTabs(const TabManagerTestWithTwoTabs&) = delete;
+ TabManagerTestWithTwoTabs& operator=(const TabManagerTestWithTwoTabs&) =
+ delete;
+
void SetUpOnMainThread() override {
TabManagerTest::SetUpOnMainThread();
@@ -210,9 +214,6 @@
OpenTwoTabs(embedded_test_server()->GetURL("/title2.html"),
embedded_test_server()->GetURL("/title3.html"));
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TabManagerTestWithTwoTabs);
};
IN_PROC_BROWSER_TEST_F(TabManagerTest, TabManagerBasics) {
diff --git a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h
index 035b8a49..a0b136f 100644
--- a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h
+++ b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h
@@ -243,6 +243,9 @@
// tabs.
explicit Candidate(const arc::ArcProcess* app) : app_(app) { DCHECK(app_); }
+ Candidate(const Candidate&) = delete;
+ Candidate& operator=(const Candidate&) = delete;
+
// Move-only class.
Candidate(Candidate&&) = default;
Candidate& operator=(Candidate&& other);
@@ -266,7 +269,6 @@
LifecycleUnit* lifecycle_unit_ = nullptr;
const arc::ArcProcess* app_ = nullptr;
ProcessType process_type_ = GetProcessTypeInternal();
- DISALLOW_COPY_AND_ASSIGN(Candidate);
};
// A thin wrapper over library process_metric.h to get memory status so unit
diff --git a/chrome/browser/resource_coordinator/tab_manager_stats_collector_unittest.cc b/chrome/browser/resource_coordinator/tab_manager_stats_collector_unittest.cc
index 259b320..b4720cf 100644
--- a/chrome/browser/resource_coordinator/tab_manager_stats_collector_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_manager_stats_collector_unittest.cc
@@ -62,6 +62,10 @@
task_runner_->FastForwardBy(base::TimeDelta::FromSeconds(42));
}
+ TabManagerStatsCollectorTest(const TabManagerStatsCollectorTest&) = delete;
+ TabManagerStatsCollectorTest& operator=(const TabManagerStatsCollectorTest&) =
+ delete;
+
~TabManagerStatsCollectorTest() override = default;
TabManagerStatsCollector* tab_manager_stats_collector() {
@@ -104,12 +108,16 @@
private:
TabManager* tab_manager() const { return g_browser_process->GetTabManager(); }
-
- DISALLOW_COPY_AND_ASSIGN(TabManagerStatsCollectorTest);
};
class TabManagerStatsCollectorTabSwitchTest
: public TabManagerStatsCollectorTest {
+ public:
+ TabManagerStatsCollectorTabSwitchTest(
+ const TabManagerStatsCollectorTabSwitchTest&) = delete;
+ TabManagerStatsCollectorTabSwitchTest& operator=(
+ const TabManagerStatsCollectorTabSwitchTest&) = delete;
+
protected:
TabManagerStatsCollectorTabSwitchTest() = default;
~TabManagerStatsCollectorTabSwitchTest() override = default;
@@ -151,8 +159,6 @@
private:
WebContents* foreground_tab_;
WebContents* background_tab_;
-
- DISALLOW_COPY_AND_ASSIGN(TabManagerStatsCollectorTabSwitchTest);
};
TEST_F(TabManagerStatsCollectorTabSwitchTest, HistogramsSwitchToTab) {
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger_interactive_uitest.cc b/chrome/browser/resource_coordinator/tab_metrics_logger_interactive_uitest.cc
index 9f9b17aae5..1680441f 100644
--- a/chrome/browser/resource_coordinator/tab_metrics_logger_interactive_uitest.cc
+++ b/chrome/browser/resource_coordinator/tab_metrics_logger_interactive_uitest.cc
@@ -33,6 +33,10 @@
// Tests WindowFeatures generated by TabMetricsLogger::CreateWindowFeatures due
// to interactive changes to window state.
class TabMetricsLoggerTest : public InProcessBrowserTest {
+ public:
+ TabMetricsLoggerTest(const TabMetricsLoggerTest&) = delete;
+ TabMetricsLoggerTest& operator=(const TabMetricsLoggerTest&) = delete;
+
protected:
TabMetricsLoggerTest() = default;
@@ -71,9 +75,6 @@
}
base::test::ScopedFeatureList scoped_feature_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TabMetricsLoggerTest);
};
// Tests before unload handler is calculated correctly.
diff --git a/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc b/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc
index a2bae442..c03e0b9 100644
--- a/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc
+++ b/chrome/browser/resource_coordinator/tab_metrics_logger_unittest.cc
@@ -295,6 +295,10 @@
// Checks that ForegroundedOrClosed event is logged correctly.
// TODO(charleszhao): add checks for TabMetrics event.
class TabMetricsLoggerUKMTest : public ::testing::Test {
+ public:
+ TabMetricsLoggerUKMTest(const TabMetricsLoggerUKMTest&) = delete;
+ TabMetricsLoggerUKMTest& operator=(const TabMetricsLoggerUKMTest&) = delete;
+
protected:
TabMetricsLoggerUKMTest() = default;
@@ -329,8 +333,6 @@
ukm::TestAutoSetUkmRecorder test_ukm_recorder_;
// The object being tested:
TabMetricsLogger logger_;
-
- DISALLOW_COPY_AND_ASSIGN(TabMetricsLoggerUKMTest);
};
// Checks TabFeature is logged correctly with TabMetricsLogger::LogTabMetrics.
diff --git a/chrome/browser/resources_util.h b/chrome/browser/resources_util.h
index c52add2..b845a0d 100644
--- a/chrome/browser/resources_util.h
+++ b/chrome/browser/resources_util.h
@@ -11,13 +11,14 @@
class ResourcesUtil {
public:
+ ResourcesUtil(const ResourcesUtil&) = delete;
+ ResourcesUtil& operator=(const ResourcesUtil&) = delete;
+
// Returns the theme resource id or -1 if no resource with the name exists.
static int GetThemeResourceId(const std::string& resource_name);
private:
ResourcesUtil() {}
-
- DISALLOW_COPY_AND_ASSIGN(ResourcesUtil);
};
#endif // CHROME_BROWSER_RESOURCES_UTIL_H_
diff --git a/chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h b/chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h
index 3463240..3c62fc7 100644
--- a/chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h
+++ b/chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h
@@ -23,6 +23,11 @@
static AdvancedProtectionStatusManagerFactory* GetInstance();
+ AdvancedProtectionStatusManagerFactory(
+ const AdvancedProtectionStatusManagerFactory&) = delete;
+ AdvancedProtectionStatusManagerFactory& operator=(
+ const AdvancedProtectionStatusManagerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
AdvancedProtectionStatusManagerFactory>;
@@ -36,8 +41,6 @@
bool ServiceIsCreatedWithBrowserContext() const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(AdvancedProtectionStatusManagerFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service.h b/chrome/browser/safe_browsing/certificate_reporting_service.h
index c24693e..8a7c516 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service.h
@@ -188,6 +188,10 @@
base::Clock* clock,
const base::RepeatingClosure& reset_callback);
+ CertificateReportingService(const CertificateReportingService&) = delete;
+ CertificateReportingService& operator=(const CertificateReportingService&) =
+ delete;
+
~CertificateReportingService() override;
// KeyedService implementation:
@@ -243,8 +247,6 @@
// Encryption parameters.
uint8_t* server_public_key_;
uint32_t server_public_key_version_;
-
- DISALLOW_COPY_AND_ASSIGN(CertificateReportingService);
};
#endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_H_
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc b/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc
index e306a58..bc97967 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc
@@ -71,6 +71,11 @@
CertReportHelper::SetFakeOfficialBuildForTesting();
}
+ CertificateReportingServiceBrowserTest(
+ const CertificateReportingServiceBrowserTest&) = delete;
+ CertificateReportingServiceBrowserTest& operator=(
+ const CertificateReportingServiceBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
host_resolver()->AddRule("*", "127.0.0.1");
@@ -233,8 +238,6 @@
std::unique_ptr<EventHistogramTester> event_histogram_tester_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(CertificateReportingServiceBrowserTest);
};
// Tests that report send attempt should be cancelled when extended
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_factory.h b/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
index 8d746ff..c68e6da 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_factory.h
@@ -29,6 +29,11 @@
static CertificateReportingService* GetForBrowserContext(
content::BrowserContext* context);
+ CertificateReportingServiceFactory(
+ const CertificateReportingServiceFactory&) = delete;
+ CertificateReportingServiceFactory& operator=(
+ const CertificateReportingServiceFactory&) = delete;
+
// Setters for testing.
void SetReportEncryptionParamsForTesting(uint8_t* server_public_key,
uint32_t server_public_key_version);
@@ -62,8 +67,6 @@
size_t max_queued_report_count_;
base::RepeatingClosure service_reset_callback_;
scoped_refptr<network::SharedURLLoaderFactory> test_url_loader_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(CertificateReportingServiceFactory);
};
#endif // CHROME_BROWSER_SAFE_BROWSING_CERTIFICATE_REPORTING_SERVICE_FACTORY_H_
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
index e3b64233..ab46692 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
@@ -126,6 +126,11 @@
public:
CertificateReportingServiceTestHelper();
+ CertificateReportingServiceTestHelper(
+ const CertificateReportingServiceTestHelper&) = delete;
+ CertificateReportingServiceTestHelper& operator=(
+ const CertificateReportingServiceTestHelper&) = delete;
+
// Changes the behavior of report uploads to fail, succeed or hang.
void SetFailureMode(ReportSendingResult expected_report_result);
@@ -183,8 +188,6 @@
uint8_t server_public_key_[32];
uint8_t server_private_key_[32];
-
- DISALLOW_COPY_AND_ASSIGN(CertificateReportingServiceTestHelper);
};
// Class to test reporting events histogram for CertificateReportingService.
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.h
index 51cb14c..4db28b9 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.h
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_impl_win.h
@@ -55,6 +55,10 @@
// Returns the global controller object.
static ChromeCleanerControllerImpl* GetInstance();
+ ChromeCleanerControllerImpl(const ChromeCleanerControllerImpl&) = delete;
+ ChromeCleanerControllerImpl& operator=(const ChromeCleanerControllerImpl&) =
+ delete;
+
// ChromeCleanerController overrides.
State state() const override;
IdleReason idle_reason() const override;
@@ -155,8 +159,6 @@
THREAD_CHECKER(thread_checker_);
base::WeakPtrFactory<ChromeCleanerControllerImpl> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChromeCleanerControllerImpl);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
index b0b9e7e..d473871 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_controller_win.h
@@ -112,6 +112,9 @@
// Returns the global controller object.
static ChromeCleanerController* GetInstance();
+ ChromeCleanerController(const ChromeCleanerController&) = delete;
+ ChromeCleanerController& operator=(const ChromeCleanerController&) = delete;
+
virtual State state() const = 0;
virtual IdleReason idle_reason() const = 0;
@@ -211,9 +214,6 @@
protected:
ChromeCleanerController();
virtual ~ChromeCleanerController();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeCleanerController);
};
// Registers the reporter scan completion time preference.
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.h b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.h
index b01364ad9..4f3a060 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.h
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_dialog_controller_impl_win.h
@@ -36,6 +36,11 @@
explicit ChromeCleanerDialogControllerImpl(
ChromeCleanerController* cleaner_controller);
+ ChromeCleanerDialogControllerImpl(const ChromeCleanerDialogControllerImpl&) =
+ delete;
+ ChromeCleanerDialogControllerImpl& operator=(
+ const ChromeCleanerDialogControllerImpl&) = delete;
+
// ChromeCleanerDialogController overrides.
void DialogShown() override;
void Accept(bool logs_enabled) override;
@@ -78,8 +83,6 @@
Browser* browser_ = nullptr;
std::unique_ptr<ChromeCleanerPromptDelegate> prompt_delegate_impl_;
ChromeCleanerPromptDelegate* prompt_delegate_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeCleanerDialogControllerImpl);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc
index 0b3dec9..1326e63f 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/chrome_cleaner_fetcher_win.cc
@@ -110,6 +110,9 @@
ChromeCleanerFetcher(ChromeCleanerFetchedCallback fetched_callback,
network::mojom::URLLoaderFactory* url_loader_factory);
+ ChromeCleanerFetcher(const ChromeCleanerFetcher&) = delete;
+ ChromeCleanerFetcher& operator=(const ChromeCleanerFetcher&) = delete;
+
private:
// Must be called on a sequence where IO is allowed.
bool CreateTemporaryDirectory();
@@ -136,8 +139,6 @@
// allowed.
std::unique_ptr<base::ScopedTempDir, base::OnTaskRunnerDeleter>
scoped_temp_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeCleanerFetcher);
};
ChromeCleanerFetcher::ChromeCleanerFetcher(
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc
index 85c16960..9a312f71 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/reporter_runner_browsertest_win.cc
@@ -109,6 +109,9 @@
base::Unretained(this)));
}
+ ReporterRunnerPolicyTest(const ReporterRunnerPolicyTest&) = delete;
+ ReporterRunnerPolicyTest& operator=(const ReporterRunnerPolicyTest&) = delete;
+
void WaitForComponentRegistration() { waiter_.Wait(); }
protected:
@@ -148,8 +151,6 @@
testing::NiceMock<policy::MockConfigurationPolicyProvider> policy_provider_;
Waiter waiter_;
-
- DISALLOW_COPY_AND_ASSIGN(ReporterRunnerPolicyTest);
};
IN_PROC_BROWSER_TEST_P(ReporterRunnerPolicyTest, CheckComponent) {
@@ -197,6 +198,9 @@
GetParam();
}
+ ReporterRunnerTest(const ReporterRunnerTest&) = delete;
+ ReporterRunnerTest& operator=(const ReporterRunnerTest&) = delete;
+
void SetUpInProcessBrowserTestFixture() override {
internal::SetSwReporterTestingDelegate(this);
EXPECT_CALL(policy_provider_, IsInitializationComplete(_))
@@ -600,9 +604,6 @@
base::OnceClosure first_launch_callback_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ReporterRunnerTest);
};
} // namespace
diff --git a/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc
index a86551cb..c10c598e 100644
--- a/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc
+++ b/chrome/browser/safe_browsing/chrome_cleaner/settings_resetter_win.cc
@@ -75,6 +75,9 @@
std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate,
base::OnceClosure done_callback);
+ SettingsResetter(const SettingsResetter&) = delete;
+ SettingsResetter& operator=(const SettingsResetter&) = delete;
+
// Resets settings for all profiles in |profiles_to_reset_| and invokes
// |done_callback_| when done.
void Run();
@@ -114,8 +117,6 @@
base::OnceClosure done_callback_;
std::unique_ptr<PostCleanupSettingsResetter::Delegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(SettingsResetter);
};
SettingsResetter::SettingsResetter(
diff --git a/chrome/browser/safe_browsing/chrome_client_side_detection_host_delegate_unittest.cc b/chrome/browser/safe_browsing/chrome_client_side_detection_host_delegate_unittest.cc
index 9c309bf8..5824e25b 100644
--- a/chrome/browser/safe_browsing/chrome_client_side_detection_host_delegate_unittest.cc
+++ b/chrome/browser/safe_browsing/chrome_client_side_detection_host_delegate_unittest.cc
@@ -23,6 +23,12 @@
: public BrowserWithTestWindowTest {
public:
ChromeClientSideDetectionHostDelegateTest() = default;
+
+ ChromeClientSideDetectionHostDelegateTest(
+ const ChromeClientSideDetectionHostDelegateTest&) = delete;
+ ChromeClientSideDetectionHostDelegateTest& operator=(
+ const ChromeClientSideDetectionHostDelegateTest&) = delete;
+
void SetUp() override {
BrowserWithTestWindowTest::SetUp();
AddTab(browser(), GURL("http://foo/0"));
@@ -52,9 +58,6 @@
SafeBrowsingNavigationObserverManager* navigation_observer_manager_;
SafeBrowsingNavigationObserver* navigation_observer_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeClientSideDetectionHostDelegateTest);
};
TEST_F(ChromeClientSideDetectionHostDelegateTest, GetReferrerChain) {
diff --git a/chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service_factory.h b/chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service_factory.h
index 56d7cdc..850458d 100644
--- a/chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service_factory.h
+++ b/chrome/browser/safe_browsing/chrome_enterprise_url_lookup_service_factory.h
@@ -34,6 +34,11 @@
// Get the singleton instance.
static ChromeEnterpriseRealTimeUrlLookupServiceFactory* GetInstance();
+ ChromeEnterpriseRealTimeUrlLookupServiceFactory(
+ const ChromeEnterpriseRealTimeUrlLookupServiceFactory&) = delete;
+ ChromeEnterpriseRealTimeUrlLookupServiceFactory& operator=(
+ const ChromeEnterpriseRealTimeUrlLookupServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
ChromeEnterpriseRealTimeUrlLookupServiceFactory>;
@@ -44,8 +49,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeEnterpriseRealTimeUrlLookupServiceFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service.h b/chrome/browser/safe_browsing/chrome_password_protection_service.h
index 84d126a..12e9bf8c 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service.h
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service.h
@@ -100,6 +100,12 @@
ChromePasswordProtectionService(SafeBrowsingService* sb_service,
Profile* profile);
+
+ ChromePasswordProtectionService(const ChromePasswordProtectionService&) =
+ delete;
+ ChromePasswordProtectionService& operator=(
+ const ChromePasswordProtectionService&) = delete;
+
~ChromePasswordProtectionService() override;
static ChromePasswordProtectionService* GetPasswordProtectionService(
@@ -577,8 +583,6 @@
// member callback rather than a virtual function because it's needed in the
// constructor.
StringProvider sync_password_hash_provider_for_testing_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionService);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc b/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
index 29cafdd..4c9c84e 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_browsertest.cc
@@ -101,6 +101,11 @@
public:
ChromePasswordProtectionServiceBrowserTest() {}
+ ChromePasswordProtectionServiceBrowserTest(
+ const ChromePasswordProtectionServiceBrowserTest&) = delete;
+ ChromePasswordProtectionServiceBrowserTest& operator=(
+ const ChromePasswordProtectionServiceBrowserTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(embedded_test_server()->Start());
InProcessBrowserTest::SetUp();
@@ -201,7 +206,6 @@
std::unique_ptr<IdentityTestEnvironmentProfileAdaptor>
identity_test_env_adaptor_;
base::CallbackListSubscription create_services_subscription_;
- DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionServiceBrowserTest);
};
IN_PROC_BROWSER_TEST_F(ChromePasswordProtectionServiceBrowserTest,
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_factory.h b/chrome/browser/safe_browsing/chrome_password_protection_service_factory.h
index cb57b30..9709cb9 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service_factory.h
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_factory.h
@@ -33,6 +33,11 @@
// Get the singleton instance.
static ChromePasswordProtectionServiceFactory* GetInstance();
+ ChromePasswordProtectionServiceFactory(
+ const ChromePasswordProtectionServiceFactory&) = delete;
+ ChromePasswordProtectionServiceFactory& operator=(
+ const ChromePasswordProtectionServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
ChromePasswordProtectionServiceFactory>;
@@ -45,8 +50,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionServiceFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc b/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc
index 92bbd51..3ebba738 100644
--- a/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc
+++ b/chrome/browser/safe_browsing/chrome_password_protection_service_sync_browsertest.cc
@@ -61,6 +61,11 @@
public:
ChromePasswordProtectionServiceSyncBrowserTest() : SyncTest(SINGLE_CLIENT) {}
+ ChromePasswordProtectionServiceSyncBrowserTest(
+ const ChromePasswordProtectionServiceSyncBrowserTest&) = delete;
+ ChromePasswordProtectionServiceSyncBrowserTest& operator=(
+ const ChromePasswordProtectionServiceSyncBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
SyncTest::SetUpOnMainThread();
@@ -119,8 +124,6 @@
prefs::kPasswordProtectionChangePasswordURL,
embedded_test_server()->GetURL(kChangePasswordUrl).spec());
}
-
- DISALLOW_COPY_AND_ASSIGN(ChromePasswordProtectionServiceSyncBrowserTest);
};
IN_PROC_BROWSER_TEST_F(ChromePasswordProtectionServiceSyncBrowserTest,
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc b/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc
index a70958f..656b628 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_browsertest.cc
@@ -84,13 +84,14 @@
std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(),
GURL(chrome::kChromeUINewTabURL)) {}
+ MockSafeBrowsingUIManager(const MockSafeBrowsingUIManager&) = delete;
+ MockSafeBrowsingUIManager& operator=(const MockSafeBrowsingUIManager&) =
+ delete;
+
MOCK_METHOD1(DisplayBlockingPage, void(const UnsafeResource& resource));
protected:
~MockSafeBrowsingUIManager() override = default;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingUIManager);
};
} // namespace
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index d0fbbff..7a97e8a9 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -162,6 +162,10 @@
std::make_unique<ChromeSafeBrowsingBlockingPageFactory>(),
GURL(chrome::kChromeUINewTabURL)) {}
+ MockSafeBrowsingUIManager(const MockSafeBrowsingUIManager&) = delete;
+ MockSafeBrowsingUIManager& operator=(const MockSafeBrowsingUIManager&) =
+ delete;
+
MOCK_METHOD1(DisplayBlockingPage, void(const UnsafeResource& resource));
// Helper function which calls OnBlockingPageComplete for this client
@@ -177,9 +181,6 @@
protected:
~MockSafeBrowsingUIManager() override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingUIManager);
};
class MockSafeBrowsingDatabaseManager : public TestSafeBrowsingDatabaseManager {
@@ -189,14 +190,16 @@
content::GetUIThreadTaskRunner({}),
content::GetIOThreadTaskRunner({})) {}
+ MockSafeBrowsingDatabaseManager(const MockSafeBrowsingDatabaseManager&) =
+ delete;
+ MockSafeBrowsingDatabaseManager& operator=(
+ const MockSafeBrowsingDatabaseManager&) = delete;
+
MOCK_METHOD2(CheckCsdAllowlistUrl,
AsyncMatch(const GURL&, SafeBrowsingDatabaseManager::Client*));
protected:
~MockSafeBrowsingDatabaseManager() override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingDatabaseManager);
};
} // namespace
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_factory.h b/chrome/browser/safe_browsing/client_side_detection_service_factory.h
index ba8cdb0e..c5473f2 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service_factory.h
+++ b/chrome/browser/safe_browsing/client_side_detection_service_factory.h
@@ -28,6 +28,11 @@
// Get the singleton instance.
static ClientSideDetectionServiceFactory* GetInstance();
+ ClientSideDetectionServiceFactory(const ClientSideDetectionServiceFactory&) =
+ delete;
+ ClientSideDetectionServiceFactory& operator=(
+ const ClientSideDetectionServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ClientSideDetectionServiceFactory>;
@@ -39,8 +44,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionServiceFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h b/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h
index 7627edec..fb6f7b7 100644
--- a/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h
+++ b/chrome/browser/safe_browsing/cloud_content_scanning/binary_upload_service_factory.h
@@ -27,6 +27,10 @@
// Get the singleton instance.
static BinaryUploadServiceFactory* GetInstance();
+ BinaryUploadServiceFactory(const BinaryUploadServiceFactory&) = delete;
+ BinaryUploadServiceFactory& operator=(const BinaryUploadServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<BinaryUploadServiceFactory>;
@@ -38,8 +42,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BinaryUploadServiceFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/download_protection/download_protection_service.h b/chrome/browser/safe_browsing/download_protection/download_protection_service.h
index bc6c3aa..cd2d174 100644
--- a/chrome/browser/safe_browsing/download_protection/download_protection_service.h
+++ b/chrome/browser/safe_browsing/download_protection/download_protection_service.h
@@ -247,12 +247,13 @@
explicit DownloadPingToken(const std::string& token)
: token_string_(token) {}
+ DownloadPingToken(const DownloadPingToken&) = delete;
+ DownloadPingToken& operator=(const DownloadPingToken&) = delete;
+
std::string token_string() { return token_string_; }
private:
std::string token_string_;
-
- DISALLOW_COPY_AND_ASSIGN(DownloadPingToken);
};
// Cancels all requests in |download_requests_|, and empties it, releasing
diff --git a/chrome/browser/safe_browsing/download_protection/download_url_sb_client.h b/chrome/browser/safe_browsing/download_protection/download_url_sb_client.h
index fc37d43e..a5794ab 100644
--- a/chrome/browser/safe_browsing/download_protection/download_url_sb_client.h
+++ b/chrome/browser/safe_browsing/download_protection/download_url_sb_client.h
@@ -36,6 +36,9 @@
const scoped_refptr<SafeBrowsingUIManager>& ui_manager,
const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager);
+ DownloadUrlSBClient(const DownloadUrlSBClient&) = delete;
+ DownloadUrlSBClient& operator=(const DownloadUrlSBClient&) = delete;
+
// Implements DownloadItem::Observer.
void OnDownloadDestroyed(download::DownloadItem* download) override;
@@ -84,8 +87,6 @@
base::ScopedObservation<download::DownloadItem,
download::DownloadItem::Observer>
download_item_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DownloadUrlSBClient);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/download_protection/path_sanitizer.h b/chrome/browser/safe_browsing/download_protection/path_sanitizer.h
index 5a57a59f..f3e107bf 100644
--- a/chrome/browser/safe_browsing/download_protection/path_sanitizer.h
+++ b/chrome/browser/safe_browsing/download_protection/path_sanitizer.h
@@ -16,14 +16,15 @@
public:
PathSanitizer();
+ PathSanitizer(const PathSanitizer&) = delete;
+ PathSanitizer& operator=(const PathSanitizer&) = delete;
+
const base::FilePath& GetHomeDirectory() const;
void StripHomeDirectory(base::FilePath* file_path) const;
private:
base::FilePath home_path_;
-
- DISALLOW_COPY_AND_ASSIGN(PathSanitizer);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager.cc b/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager.cc
index 05b7e1de..a1266ca 100644
--- a/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/download_metadata_manager.cc
@@ -223,6 +223,9 @@
ManagerContext(scoped_refptr<base::SequencedTaskRunner> task_runner,
content::DownloadManager* download_manager);
+ ManagerContext(const ManagerContext&) = delete;
+ ManagerContext& operator=(const ManagerContext&) = delete;
+
// Detaches this context from its owner. The owner must not access the context
// following this call. The context will be deleted immediately if it is not
// waiting for a metadata load with either recorded operations or pending
@@ -335,8 +338,6 @@
std::list<GetDownloadDetailsCallback> get_details_callbacks_;
base::WeakPtrFactory<ManagerContext> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ManagerContext);
};
diff --git a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
index 172aa23..d2f84d90d 100644
--- a/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
@@ -137,6 +137,10 @@
struct IncidentReportingService::ProfileContext {
ProfileContext();
+
+ ProfileContext(const ProfileContext&) = delete;
+ ProfileContext& operator=(const ProfileContext&) = delete;
+
~ProfileContext();
// Returns true if the profile has incidents to be uploaded or cleared.
@@ -154,9 +158,6 @@
// False until OnProfileAdded is called.
bool added;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ProfileContext);
};
class IncidentReportingService::UploadContext {
diff --git a/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.cc b/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.cc
index 9391d9b..0b8cd02 100644
--- a/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/module_integrity_verifier_win.cc
@@ -46,6 +46,10 @@
struct ModuleVerificationState {
explicit ModuleVerificationState(HMODULE hModule);
+
+ ModuleVerificationState(const ModuleVerificationState&) = delete;
+ ModuleVerificationState& operator=(const ModuleVerificationState&) = delete;
+
~ModuleVerificationState();
base::win::PEImageAsData disk_peimage;
@@ -88,9 +92,6 @@
// The module state protobuf object that |VerifyModule| will populate.
ClientIncidentReport_EnvironmentData_Process_ModuleState* module_state;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ModuleVerificationState);
};
ModuleVerificationState::ModuleVerificationState(HMODULE hModule)
diff --git a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
index 3fd9d90..1f0b4c6 100644
--- a/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/platform_state_store_win_unittest.cc
@@ -39,6 +39,10 @@
: profile_(nullptr),
profile_manager_(TestingBrowserProcess::GetGlobal()) {}
+ PlatformStateStoreWinTest(const PlatformStateStoreWinTest&) = delete;
+ PlatformStateStoreWinTest& operator=(const PlatformStateStoreWinTest&) =
+ delete;
+
void SetUp() override {
::testing::Test::SetUp();
ASSERT_NO_FATAL_FAILURE(
@@ -106,8 +110,6 @@
content::BrowserTaskEnvironment task_environment_;
registry_util::RegistryOverrideManager registry_override_manager_;
TestingProfileManager profile_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(PlatformStateStoreWinTest);
};
// static
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store.h b/chrome/browser/safe_browsing/incident_reporting/state_store.h
index 03a4ce5..601cf27 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store.h
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store.h
@@ -85,6 +85,10 @@
};
explicit StateStore(Profile* profile);
+
+ StateStore(const StateStore&) = delete;
+ StateStore& operator=(const StateStore&) = delete;
+
~StateStore();
// Returns true if the described incident has already been reported.
@@ -106,8 +110,6 @@
// True when a Transaction instance is outstanding.
bool has_transaction_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(StateStore);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
index 1e03cd9..b0d985f 100644
--- a/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
+++ b/chrome/browser/safe_browsing/incident_reporting/state_store_unittest.cc
@@ -43,6 +43,10 @@
protected:
PlatformStateStoreTestBase() {}
+ PlatformStateStoreTestBase(const PlatformStateStoreTestBase&) = delete;
+ PlatformStateStoreTestBase& operator=(const PlatformStateStoreTestBase&) =
+ delete;
+
void SetUp() override {
::testing::Test::SetUp();
ASSERT_NO_FATAL_FAILURE(
@@ -51,8 +55,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(PlatformStateStoreTestBase);
};
#else // OS_WIN
@@ -76,6 +78,9 @@
task_runner_(new base::TestSimpleTaskRunner()),
profile_manager_(TestingBrowserProcess::GetGlobal()) {}
+ StateStoreTest(const StateStoreTest&) = delete;
+ StateStoreTest& operator=(const StateStoreTest&) = delete;
+
void SetUp() override {
PlatformStateStoreTestBase::SetUp();
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
@@ -140,8 +145,6 @@
disable_purge_for_testing_;
base::ScopedTempDir temp_dir_;
TestingProfileManager profile_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(StateStoreTest);
};
// static
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index 62cd5fb..56db7e1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -257,6 +257,10 @@
std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory)
: TestSafeBrowsingUIManager(std::move(blocking_page_factory)) {}
+ FakeSafeBrowsingUIManager(const FakeSafeBrowsingUIManager&) = delete;
+ FakeSafeBrowsingUIManager& operator=(const FakeSafeBrowsingUIManager&) =
+ delete;
+
// Overrides SafeBrowsingUIManager
void SendSerializedThreatDetails(content::BrowserContext* browser_context,
const std::string& serialized) override {
@@ -307,8 +311,6 @@
base::OnceClosure threat_details_done_callback_;
bool threat_details_done_ = false;
bool hit_report_sent_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingUIManager);
};
class TestThreatDetailsFactory : public ThreatDetailsFactory {
@@ -1494,6 +1496,10 @@
latest_security_style_(blink::SecurityStyle::kUnknown),
latest_security_style_explanations_() {}
+ SecurityStyleTestObserver(const SecurityStyleTestObserver&) = delete;
+ SecurityStyleTestObserver& operator=(const SecurityStyleTestObserver&) =
+ delete;
+
blink::SecurityStyle latest_security_style() const {
return latest_security_style_;
}
@@ -1512,7 +1518,6 @@
private:
blink::SecurityStyle latest_security_style_;
content::SecurityStyleExplanations latest_security_style_explanations_;
- DISALLOW_COPY_AND_ASSIGN(SecurityStyleTestObserver);
};
} // namespace
@@ -1819,6 +1824,11 @@
public:
SafeBrowsingBlockingPageDelayedWarningBrowserTest() = default;
+ SafeBrowsingBlockingPageDelayedWarningBrowserTest(
+ const SafeBrowsingBlockingPageDelayedWarningBrowserTest&) = delete;
+ SafeBrowsingBlockingPageDelayedWarningBrowserTest& operator=(
+ const SafeBrowsingBlockingPageDelayedWarningBrowserTest&) = delete;
+
void SetUp() override {
std::vector<FeatureAndParams> enabled_features{
FeatureAndParams(blink::features::kPortals, {}),
@@ -2018,8 +2028,6 @@
private:
TestSafeBrowsingServiceFactory factory_;
TestThreatDetailsFactory details_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageDelayedWarningBrowserTest);
};
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
@@ -2861,6 +2869,11 @@
public:
SafeBrowsingBlockingPageEnhancedProtectionMessageTest() = default;
+ SafeBrowsingBlockingPageEnhancedProtectionMessageTest(
+ const SafeBrowsingBlockingPageEnhancedProtectionMessageTest&) = delete;
+ SafeBrowsingBlockingPageEnhancedProtectionMessageTest& operator=(
+ const SafeBrowsingBlockingPageEnhancedProtectionMessageTest&) = delete;
+
void SetUp() override {
InProcessBrowserTest::SetUp();
}
@@ -2901,9 +2914,6 @@
TestSafeBrowsingServiceFactory factory_;
TestThreatDetailsFactory details_factory_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(
- SafeBrowsingBlockingPageEnhancedProtectionMessageTest);
};
IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageEnhancedProtectionMessageTest,
@@ -3000,6 +3010,11 @@
public:
SafeBrowsingBlockingPageRealTimeUrlCheckTest() = default;
+ SafeBrowsingBlockingPageRealTimeUrlCheckTest(
+ const SafeBrowsingBlockingPageRealTimeUrlCheckTest&) = delete;
+ SafeBrowsingBlockingPageRealTimeUrlCheckTest& operator=(
+ const SafeBrowsingBlockingPageRealTimeUrlCheckTest&) = delete;
+
void SetUp() override {
scoped_feature_list_.InitWithFeatures(
/*enabled_features=*/{},
@@ -3038,8 +3053,6 @@
private:
TestSafeBrowsingServiceFactory factory_;
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPageRealTimeUrlCheckTest);
};
IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageRealTimeUrlCheckTest,
diff --git a/chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h b/chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h
index 62667f4..23df56c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h
+++ b/chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h
@@ -32,6 +32,11 @@
// Get the singleton instance.
static SafeBrowsingMetricsCollectorFactory* GetInstance();
+ SafeBrowsingMetricsCollectorFactory(
+ const SafeBrowsingMetricsCollectorFactory&) = delete;
+ SafeBrowsingMetricsCollectorFactory& operator=(
+ const SafeBrowsingMetricsCollectorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
SafeBrowsingMetricsCollectorFactory>;
@@ -42,8 +47,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingMetricsCollectorFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 2a6e2b3..c5c8487 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -529,12 +529,15 @@
return new SafeBrowsingService();
}
+ SafeBrowsingServiceFactoryImpl(const SafeBrowsingServiceFactoryImpl&) =
+ delete;
+ SafeBrowsingServiceFactoryImpl& operator=(
+ const SafeBrowsingServiceFactoryImpl&) = delete;
+
private:
friend class base::NoDestructor<SafeBrowsingServiceFactoryImpl>;
SafeBrowsingServiceFactoryImpl() {}
-
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactoryImpl);
};
SafeBrowsingServiceFactory* GetSafeBrowsingServiceFactory() {
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 8cd8737..eb8b2a4 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -84,6 +84,9 @@
public ProfileManagerObserver,
public ProfileObserver {
public:
+ SafeBrowsingService(const SafeBrowsingService&) = delete;
+ SafeBrowsingService& operator=(const SafeBrowsingService&) = delete;
+
static base::FilePath GetCookieFilePathForTesting();
static base::FilePath GetBaseFilename();
@@ -322,8 +325,6 @@
observed_profiles_{this};
std::unique_ptr<TriggerManager> trigger_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingService);
};
SafeBrowsingServiceFactory* GetSafeBrowsingServiceFactory();
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 833d876c..cf50fe1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -335,6 +335,9 @@
: threat_type_(SB_THREAT_TYPE_SAFE),
safe_browsing_service_(g_browser_process->safe_browsing_service()) {}
+ TestSBClient(const TestSBClient&) = delete;
+ TestSBClient& operator=(const TestSBClient&) = delete;
+
SBThreatType GetThreatType() const { return threat_type_; }
std::string GetThreatHash() const { return threat_hash_; }
@@ -434,8 +437,6 @@
SBThreatType threat_type_;
std::string threat_hash_;
SafeBrowsingService* safe_browsing_service_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSBClient);
};
} // namespace
@@ -445,6 +446,10 @@
public:
V4SafeBrowsingServiceTest() {}
+ V4SafeBrowsingServiceTest(const V4SafeBrowsingServiceTest&) = delete;
+ V4SafeBrowsingServiceTest& operator=(const V4SafeBrowsingServiceTest&) =
+ delete;
+
void SetUp() override {
sb_factory_ = std::make_unique<TestSafeBrowsingServiceFactory>();
sb_factory_->SetTestUIManager(new FakeSafeBrowsingUIManager());
@@ -596,8 +601,6 @@
// bug is fixed.
content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(V4SafeBrowsingServiceTest);
};
// Ensures that if an image is marked as UwS, the main page doesn't show an
@@ -1242,8 +1245,10 @@
public:
V4SafeBrowsingServiceMetadataTest() {}
- private:
- DISALLOW_COPY_AND_ASSIGN(V4SafeBrowsingServiceMetadataTest);
+ V4SafeBrowsingServiceMetadataTest(const V4SafeBrowsingServiceMetadataTest&) =
+ delete;
+ V4SafeBrowsingServiceMetadataTest& operator=(
+ const V4SafeBrowsingServiceMetadataTest&) = delete;
};
// Irrespective of the threat_type classification, if the main frame URL is
diff --git a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h
index 40afa8df..676ee12 100644
--- a/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h
+++ b/chrome/browser/safe_browsing/settings_reset_prompt/settings_reset_prompt_controller.h
@@ -30,6 +30,10 @@
std::unique_ptr<SettingsResetPromptModel> model,
std::unique_ptr<BrandcodedDefaultSettings> default_settings);
+ SettingsResetPromptController(const SettingsResetPromptController&) = delete;
+ SettingsResetPromptController& operator=(
+ const SettingsResetPromptController&) = delete;
+
std::u16string GetWindowTitle() const;
std::u16string GetMainText() const;
// Returns the offset into the main text string where a URL was inserted. To
@@ -65,8 +69,6 @@
// Used for metrics reporting.
base::Time time_dialog_shown_;
-
- DISALLOW_COPY_AND_ASSIGN(SettingsResetPromptController);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/test_safe_browsing_database_helper.cc b/chrome/browser/safe_browsing/test_safe_browsing_database_helper.cc
index 36ee58f..02a30b4 100644
--- a/chrome/browser/safe_browsing/test_safe_browsing_database_helper.cc
+++ b/chrome/browser/safe_browsing/test_safe_browsing_database_helper.cc
@@ -29,6 +29,10 @@
public:
FakeSafeBrowsingUIManager() {}
+ FakeSafeBrowsingUIManager(const FakeSafeBrowsingUIManager&) = delete;
+ FakeSafeBrowsingUIManager& operator=(const FakeSafeBrowsingUIManager&) =
+ delete;
+
protected:
~FakeSafeBrowsingUIManager() override {}
@@ -36,9 +40,6 @@
resource.DispatchCallback(FROM_HERE, true /* proceed */,
true /* showed_interstitial */);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeSafeBrowsingUIManager);
};
} // namespace
diff --git a/chrome/browser/safe_browsing/test_safe_browsing_service.h b/chrome/browser/safe_browsing/test_safe_browsing_service.h
index 378b571..5799f758 100644
--- a/chrome/browser/safe_browsing/test_safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/test_safe_browsing_service.h
@@ -44,6 +44,10 @@
public ServicesDelegate::ServicesCreator {
public:
TestSafeBrowsingService();
+
+ TestSafeBrowsingService(const TestSafeBrowsingService&) = delete;
+ TestSafeBrowsingService& operator=(const TestSafeBrowsingService&) = delete;
+
// SafeBrowsingService overrides
V4ProtocolConfig GetV4ProtocolConfig() const override;
@@ -105,8 +109,6 @@
bool use_test_url_loader_factory_ = false;
network::TestURLLoaderFactory test_url_loader_factory_;
scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSafeBrowsingService);
};
class TestSafeBrowsingServiceFactory : public SafeBrowsingServiceFactory {
@@ -152,6 +154,11 @@
TestSafeBrowsingUIManager();
explicit TestSafeBrowsingUIManager(
std::unique_ptr<SafeBrowsingBlockingPageFactory> blocking_page_factory);
+
+ TestSafeBrowsingUIManager(const TestSafeBrowsingUIManager&) = delete;
+ TestSafeBrowsingUIManager& operator=(const TestSafeBrowsingUIManager&) =
+ delete;
+
void SendSerializedThreatDetails(content::BrowserContext* browser_context,
const std::string& serialized) override;
std::list<std::string>* GetThreatDetails();
@@ -159,8 +166,6 @@
protected:
~TestSafeBrowsingUIManager() override;
std::list<std::string> details_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSafeBrowsingUIManager);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/threat_details_unittest.cc b/chrome/browser/safe_browsing/threat_details_unittest.cc
index 036d493a..20884e05 100644
--- a/chrome/browser/safe_browsing/threat_details_unittest.cc
+++ b/chrome/browser/safe_browsing/threat_details_unittest.cc
@@ -171,6 +171,10 @@
GURL(chrome::kChromeUINewTabURL)),
report_sent_(false) {}
+ MockSafeBrowsingUIManager(const MockSafeBrowsingUIManager&) = delete;
+ MockSafeBrowsingUIManager& operator=(const MockSafeBrowsingUIManager&) =
+ delete;
+
// When the serialized report is sent, this is called.
void SendSerializedThreatDetails(content::BrowserContext* browser_context,
const std::string& serialized) override {
@@ -186,7 +190,6 @@
std::string serialized_;
bool report_sent_;
- DISALLOW_COPY_AND_ASSIGN(MockSafeBrowsingUIManager);
};
class MockReferrerChainProvider : public ReferrerChainProvider {
diff --git a/chrome/browser/safe_browsing/url_checker_delegate_impl.h b/chrome/browser/safe_browsing/url_checker_delegate_impl.h
index 1de46646d..5f2074c 100644
--- a/chrome/browser/safe_browsing/url_checker_delegate_impl.h
+++ b/chrome/browser/safe_browsing/url_checker_delegate_impl.h
@@ -20,6 +20,9 @@
scoped_refptr<SafeBrowsingDatabaseManager> database_manager,
scoped_refptr<SafeBrowsingUIManager> ui_manager);
+ UrlCheckerDelegateImpl(const UrlCheckerDelegateImpl&) = delete;
+ UrlCheckerDelegateImpl& operator=(const UrlCheckerDelegateImpl&) = delete;
+
private:
~UrlCheckerDelegateImpl() override;
@@ -57,8 +60,6 @@
// A list of domains allowlisted by the enterprise policy.
std::vector<std::string> allowlist_domains_;
SBThreatTypeSet threat_types_;
-
- DISALLOW_COPY_AND_ASSIGN(UrlCheckerDelegateImpl);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/url_lookup_service_factory.h b/chrome/browser/safe_browsing/url_lookup_service_factory.h
index 8d870caf..af221c3d 100644
--- a/chrome/browser/safe_browsing/url_lookup_service_factory.h
+++ b/chrome/browser/safe_browsing/url_lookup_service_factory.h
@@ -32,6 +32,11 @@
// Get the singleton instance.
static RealTimeUrlLookupServiceFactory* GetInstance();
+ RealTimeUrlLookupServiceFactory(const RealTimeUrlLookupServiceFactory&) =
+ delete;
+ RealTimeUrlLookupServiceFactory& operator=(
+ const RealTimeUrlLookupServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<RealTimeUrlLookupServiceFactory>;
@@ -41,8 +46,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(RealTimeUrlLookupServiceFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/safe_browsing/verdict_cache_manager_factory.h b/chrome/browser/safe_browsing/verdict_cache_manager_factory.h
index f622e33..481a613 100644
--- a/chrome/browser/safe_browsing/verdict_cache_manager_factory.h
+++ b/chrome/browser/safe_browsing/verdict_cache_manager_factory.h
@@ -32,6 +32,10 @@
// Get the singleton instance.
static VerdictCacheManagerFactory* GetInstance();
+ VerdictCacheManagerFactory(const VerdictCacheManagerFactory&) = delete;
+ VerdictCacheManagerFactory& operator=(const VerdictCacheManagerFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<VerdictCacheManagerFactory>;
@@ -43,8 +47,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(VerdictCacheManagerFactory);
};
} // namespace safe_browsing
diff --git a/chrome/browser/search/background/ntp_background_service_factory.h b/chrome/browser/search/background/ntp_background_service_factory.h
index d5aeef4..8105a01e 100644
--- a/chrome/browser/search/background/ntp_background_service_factory.h
+++ b/chrome/browser/search/background/ntp_background_service_factory.h
@@ -19,6 +19,10 @@
static NtpBackgroundServiceFactory* GetInstance();
+ NtpBackgroundServiceFactory(const NtpBackgroundServiceFactory&) = delete;
+ NtpBackgroundServiceFactory& operator=(const NtpBackgroundServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<NtpBackgroundServiceFactory>;
@@ -28,8 +32,6 @@
// Overridden from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(NtpBackgroundServiceFactory);
};
#endif // CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUND_SERVICE_FACTORY_H_
diff --git a/chrome/browser/search/chrome_colors/chrome_colors_factory.h b/chrome/browser/search/chrome_colors/chrome_colors_factory.h
index ef45ca5b..4dee83fc 100644
--- a/chrome/browser/search/chrome_colors/chrome_colors_factory.h
+++ b/chrome/browser/search/chrome_colors/chrome_colors_factory.h
@@ -24,6 +24,9 @@
static ChromeColorsFactory* GetInstance();
+ ChromeColorsFactory(const ChromeColorsFactory&) = delete;
+ ChromeColorsFactory& operator=(const ChromeColorsFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ChromeColorsFactory>;
@@ -33,8 +36,6 @@
// Overrides from BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeColorsFactory);
};
} // namespace chrome_colors
diff --git a/chrome/browser/search/instant_service_factory.h b/chrome/browser/search/instant_service_factory.h
index 2db314b9..16d74fe 100644
--- a/chrome/browser/search/instant_service_factory.h
+++ b/chrome/browser/search/instant_service_factory.h
@@ -25,6 +25,9 @@
static InstantServiceFactory* GetInstance();
+ InstantServiceFactory(const InstantServiceFactory&) = delete;
+ InstantServiceFactory& operator=(const InstantServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<InstantServiceFactory>;
@@ -36,8 +39,6 @@
content::BrowserContext* context) const override;
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(InstantServiceFactory);
};
#endif // CHROME_BROWSER_SEARCH_INSTANT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/search_engines/template_url_fetcher_factory.h b/chrome/browser/search_engines/template_url_fetcher_factory.h
index 77f2fad..c2c9fa4 100644
--- a/chrome/browser/search_engines/template_url_fetcher_factory.h
+++ b/chrome/browser/search_engines/template_url_fetcher_factory.h
@@ -20,6 +20,10 @@
static TemplateURLFetcherFactory* GetInstance();
+ TemplateURLFetcherFactory(const TemplateURLFetcherFactory&) = delete;
+ TemplateURLFetcherFactory& operator=(const TemplateURLFetcherFactory&) =
+ delete;
+
// In some tests, the template url fetcher needs to be shutdown to
// remove any dangling url requests before the io_thread is shutdown
// to prevent leaks.
@@ -36,8 +40,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcherFactory);
};
#endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_FACTORY_H_
diff --git a/chrome/browser/search_engines/template_url_fetcher_unittest.cc b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
index 69f8f3f..6eaf419 100644
--- a/chrome/browser/search_engines/template_url_fetcher_unittest.cc
+++ b/chrome/browser/search_engines/template_url_fetcher_unittest.cc
@@ -73,6 +73,9 @@
public:
TemplateURLFetcherTest();
+ TemplateURLFetcherTest(const TemplateURLFetcherTest&) = delete;
+ TemplateURLFetcherTest& operator=(const TemplateURLFetcherTest&) = delete;
+
void SetUp() override {
template_url_fetcher_ = std::make_unique<TestTemplateUrlFetcher>(
test_util_.model(),
@@ -119,9 +122,6 @@
// Is the code in WaitForDownloadToFinish in a message loop waiting for a
// callback to finish?
bool waiting_for_download_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcherTest);
};
TemplateURLFetcherTest::TemplateURLFetcherTest()
diff --git a/chrome/browser/search_engines/template_url_scraper_browsertest.cc b/chrome/browser/search_engines/template_url_scraper_browsertest.cc
index 104f9d9..2bd6916 100644
--- a/chrome/browser/search_engines/template_url_scraper_browsertest.cc
+++ b/chrome/browser/search_engines/template_url_scraper_browsertest.cc
@@ -52,10 +52,11 @@
message_loop_runner->Run();
}
+ TemplateURLServiceLoader(const TemplateURLServiceLoader&) = delete;
+ TemplateURLServiceLoader& operator=(const TemplateURLServiceLoader&) = delete;
+
private:
TemplateURLService* model_;
-
- DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceLoader);
};
std::unique_ptr<net::test_server::HttpResponse> SendResponse(
diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
index 42e5c79..3e41557 100644
--- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
@@ -170,6 +170,10 @@
TemplateURLServiceSyncTest();
+ TemplateURLServiceSyncTest(const TemplateURLServiceSyncTest&) = delete;
+ TemplateURLServiceSyncTest& operator=(const TemplateURLServiceSyncTest&) =
+ delete;
+
void SetUp() override;
void TearDown() override;
@@ -238,8 +242,6 @@
std::unique_ptr<TestChangeProcessor> sync_processor_;
std::unique_ptr<syncer::SyncChangeProcessorWrapperForTest>
sync_processor_wrapper_;
-
- DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceSyncTest);
};
TemplateURLServiceSyncTest::TemplateURLServiceSyncTest()
diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc
index e77049ae..0060881 100644
--- a/chrome/browser/search_engines/template_url_service_test_util.cc
+++ b/chrome/browser/search_engines/template_url_service_test_util.cc
@@ -35,6 +35,11 @@
: ChromeTemplateURLServiceClient(history_service),
search_term_(search_term) {}
+ TestingTemplateURLServiceClient(const TestingTemplateURLServiceClient&) =
+ delete;
+ TestingTemplateURLServiceClient& operator=(
+ const TestingTemplateURLServiceClient&) = delete;
+
void SetKeywordSearchTermsForURL(const GURL& url,
TemplateURLID id,
const std::u16string& term) override {
@@ -43,8 +48,6 @@
private:
std::u16string* search_term_;
-
- DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient);
};
} // namespace
diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc
index c9ac73b..79b6151 100644
--- a/chrome/browser/search_engines/template_url_service_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_unittest.cc
@@ -133,6 +133,9 @@
public:
TemplateURLServiceTest();
+ TemplateURLServiceTest(const TemplateURLServiceTest&) = delete;
+ TemplateURLServiceTest& operator=(const TemplateURLServiceTest&) = delete;
+
// testing::Test:
void SetUp() override;
void TearDown() override;
@@ -185,8 +188,6 @@
content::BrowserTaskEnvironment
task_environment_; // To set up BrowserThreads.
std::unique_ptr<TemplateURLServiceTestUtil> test_util_;
-
- DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTest);
};
class TemplateURLServiceWithoutFallbackTest : public TemplateURLServiceTest {
diff --git a/chrome/browser/search_engines/ui_thread_search_terms_data.h b/chrome/browser/search_engines/ui_thread_search_terms_data.h
index 2ab4d5a..fe6a2a55 100644
--- a/chrome/browser/search_engines/ui_thread_search_terms_data.h
+++ b/chrome/browser/search_engines/ui_thread_search_terms_data.h
@@ -16,6 +16,9 @@
public:
UIThreadSearchTermsData();
+ UIThreadSearchTermsData(const UIThreadSearchTermsData&) = delete;
+ UIThreadSearchTermsData& operator=(const UIThreadSearchTermsData&) = delete;
+
std::string GoogleBaseURLValue() const override;
std::string GetApplicationLocale() const override;
std::u16string GetRlzParameterValue(bool from_app_list) const override;
@@ -32,9 +35,6 @@
// Estimates dynamic memory usage.
// See base/trace_event/memory_usage_estimator.h for more info.
size_t EstimateMemoryUsage() const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UIThreadSearchTermsData);
};
#endif // CHROME_BROWSER_SEARCH_ENGINES_UI_THREAD_SEARCH_TERMS_DATA_H_
diff --git a/chrome/browser/search_provider_logos/logo_service_factory.h b/chrome/browser/search_provider_logos/logo_service_factory.h
index 09114ec..b55126c 100644
--- a/chrome/browser/search_provider_logos/logo_service_factory.h
+++ b/chrome/browser/search_provider_logos/logo_service_factory.h
@@ -22,6 +22,9 @@
static LogoServiceFactory* GetInstance();
+ LogoServiceFactory(const LogoServiceFactory&) = delete;
+ LogoServiceFactory& operator=(const LogoServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<LogoServiceFactory>;
@@ -31,8 +34,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(LogoServiceFactory);
};
#endif // CHROME_BROWSER_SEARCH_PROVIDER_LOGOS_LOGO_SERVICE_FACTORY_H_
diff --git a/chrome/browser/security_events/security_event_recorder_factory.h b/chrome/browser/security_events/security_event_recorder_factory.h
index 7187342c..1faf8c5 100644
--- a/chrome/browser/security_events/security_event_recorder_factory.h
+++ b/chrome/browser/security_events/security_event_recorder_factory.h
@@ -24,6 +24,10 @@
// Returns the SecurityEventRecorder associated with |profile|.
static SecurityEventRecorder* GetForProfile(Profile* profile);
+ SecurityEventRecorderFactory(const SecurityEventRecorderFactory&) = delete;
+ SecurityEventRecorderFactory& operator=(const SecurityEventRecorderFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<SecurityEventRecorderFactory>;
@@ -33,7 +37,5 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SecurityEventRecorderFactory);
};
#endif // CHROME_BROWSER_SECURITY_EVENTS_SECURITY_EVENT_RECORDER_FACTORY_H_
diff --git a/chrome/browser/send_tab_to_self/receiving_ui_handler_registry.h b/chrome/browser/send_tab_to_self/receiving_ui_handler_registry.h
index c488b300..124c4a6 100644
--- a/chrome/browser/send_tab_to_self/receiving_ui_handler_registry.h
+++ b/chrome/browser/send_tab_to_self/receiving_ui_handler_registry.h
@@ -31,6 +31,11 @@
public:
// Returns the singleton instance of this class.
static ReceivingUiHandlerRegistry* GetInstance();
+
+ ReceivingUiHandlerRegistry(const ReceivingUiHandlerRegistry&) = delete;
+ ReceivingUiHandlerRegistry& operator=(const ReceivingUiHandlerRegistry&) =
+ delete;
+
void InstantiatePlatformSpecificHandlers(Profile* profile_);
// Returns all the handlers to perform UI updates for the platform.
@@ -51,7 +56,6 @@
ReceivingUiHandlerRegistry();
~ReceivingUiHandlerRegistry();
std::vector<std::unique_ptr<ReceivingUiHandler>> applicable_handlers_;
- DISALLOW_COPY_AND_ASSIGN(ReceivingUiHandlerRegistry);
};
} // namespace send_tab_to_self
diff --git a/chrome/browser/send_tab_to_self/send_tab_to_self_client_service.h b/chrome/browser/send_tab_to_self/send_tab_to_self_client_service.h
index 372c8f2..eecc2ef 100644
--- a/chrome/browser/send_tab_to_self/send_tab_to_self_client_service.h
+++ b/chrome/browser/send_tab_to_self/send_tab_to_self_client_service.h
@@ -28,6 +28,10 @@
public:
SendTabToSelfClientService(Profile* profile, SendTabToSelfModel* model);
+ SendTabToSelfClientService(const SendTabToSelfClientService&) = delete;
+ SendTabToSelfClientService& operator=(const SendTabToSelfClientService&) =
+ delete;
+
// Keeps track of when the model is loaded so that updates to the
// model can be pushed afterwards.
void SendTabToSelfModelLoaded() override;
@@ -56,7 +60,6 @@
ReceivingUiHandlerRegistry* registry_;
// Profile for which this service is associated.
Profile* profile_;
- DISALLOW_COPY_AND_ASSIGN(SendTabToSelfClientService);
};
} // namespace send_tab_to_self
diff --git a/chrome/browser/send_tab_to_self/send_tab_to_self_client_service_factory.h b/chrome/browser/send_tab_to_self/send_tab_to_self_client_service_factory.h
index 09c7442..dfe024b3 100644
--- a/chrome/browser/send_tab_to_self/send_tab_to_self_client_service_factory.h
+++ b/chrome/browser/send_tab_to_self/send_tab_to_self_client_service_factory.h
@@ -27,6 +27,11 @@
Profile* profile);
static SendTabToSelfClientServiceFactory* GetInstance();
+ SendTabToSelfClientServiceFactory(const SendTabToSelfClientServiceFactory&) =
+ delete;
+ SendTabToSelfClientServiceFactory& operator=(
+ const SendTabToSelfClientServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SendTabToSelfClientServiceFactory>;
@@ -40,8 +45,6 @@
bool ServiceIsCreatedWithBrowserContext() const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(SendTabToSelfClientServiceFactory);
};
} // namespace send_tab_to_self
diff --git a/chrome/browser/serial/serial_chooser_context_factory.h b/chrome/browser/serial/serial_chooser_context_factory.h
index b38c0e5..74b5fec 100644
--- a/chrome/browser/serial/serial_chooser_context_factory.h
+++ b/chrome/browser/serial/serial_chooser_context_factory.h
@@ -18,6 +18,10 @@
static SerialChooserContext* GetForProfileIfExists(Profile* profile);
static SerialChooserContextFactory* GetInstance();
+ SerialChooserContextFactory(const SerialChooserContextFactory&) = delete;
+ SerialChooserContextFactory& operator=(const SerialChooserContextFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<SerialChooserContextFactory>;
@@ -30,8 +34,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
void BrowserContextShutdown(content::BrowserContext* context) override;
-
- DISALLOW_COPY_AND_ASSIGN(SerialChooserContextFactory);
};
#endif // CHROME_BROWSER_SERIAL_SERIAL_CHOOSER_CONTEXT_FACTORY_H_
diff --git a/chrome/browser/service_process/service_process_control.h b/chrome/browser/service_process/service_process_control.h
index 72c5cb3..e82157d 100644
--- a/chrome/browser/service_process/service_process_control.h
+++ b/chrome/browser/service_process/service_process_control.h
@@ -52,6 +52,9 @@
// Returns the singleton instance of this class.
static ServiceProcessControl* GetInstance();
+ ServiceProcessControl(const ServiceProcessControl&) = delete;
+ ServiceProcessControl& operator=(const ServiceProcessControl&) = delete;
+
// Return true if this object is connected to the service.
// Virtual for testing.
virtual bool IsConnected() const;
@@ -179,8 +182,6 @@
base::ProcessId saved_pid_;
base::WeakPtrFactory<ServiceProcessControl> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ServiceProcessControl);
};
#endif // CHROME_BROWSER_SERVICE_PROCESS_SERVICE_PROCESS_CONTROL_H_
diff --git a/chrome/browser/services_unittest.cc b/chrome/browser/services_unittest.cc
index 3f29c66..17a9d2a 100644
--- a/chrome/browser/services_unittest.cc
+++ b/chrome/browser/services_unittest.cc
@@ -23,6 +23,9 @@
: task_environment_(content::BrowserTaskEnvironment::MainThreadType::IO) {
}
+ ServicesTest(const ServicesTest&) = delete;
+ ServicesTest& operator=(const ServicesTest&) = delete;
+
template <typename Interface>
bool IsConnected(mojo::Remote<Interface>* remote) {
bool connected = true;
@@ -35,8 +38,6 @@
private:
content::BrowserTaskEnvironment task_environment_;
content::InProcessUtilityThreadHelper in_process_utility_thread_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(ServicesTest);
};
} // namespace
diff --git a/chrome/browser/sessions/better_session_restore_browsertest.cc b/chrome/browser/sessions/better_session_restore_browsertest.cc
index 2e3a75f..70f99b2 100644
--- a/chrome/browser/sessions/better_session_restore_browsertest.cc
+++ b/chrome/browser/sessions/better_session_restore_browsertest.cc
@@ -154,6 +154,9 @@
}));
}
+ BetterSessionRestoreTest(const BetterSessionRestoreTest&) = delete;
+ BetterSessionRestoreTest& operator=(const BetterSessionRestoreTest&) = delete;
+
protected:
void SetUpOnMainThread() override {
SessionServiceTestHelper helper(browser()->profile());
@@ -344,14 +347,16 @@
const std::u16string title_error_empty_;
std::unique_ptr<content::URLLoaderInterceptor> url_loader_interceptor_;
-
- DISALLOW_COPY_AND_ASSIGN(BetterSessionRestoreTest);
};
class ContinueWhereILeftOffTest : public BetterSessionRestoreTest {
public:
ContinueWhereILeftOffTest() = default;
+ ContinueWhereILeftOffTest(const ContinueWhereILeftOffTest&) = delete;
+ ContinueWhereILeftOffTest& operator=(const ContinueWhereILeftOffTest&) =
+ delete;
+
void SetUpOnMainThread() override {
BetterSessionRestoreTest::SetUpOnMainThread();
SessionStartupPref::SetStartupPref(
@@ -367,8 +372,6 @@
session_restore_observer.Wait();
return new_browser;
}
-
- DISALLOW_COPY_AND_ASSIGN(ContinueWhereILeftOffTest);
};
IN_PROC_BROWSER_TEST_F(ContinueWhereILeftOffTest, PRE_SessionCookies) {
@@ -642,14 +645,14 @@
public:
NoSessionRestoreTest() = default;
+ NoSessionRestoreTest(const NoSessionRestoreTest&) = delete;
+ NoSessionRestoreTest& operator=(const NoSessionRestoreTest&) = delete;
+
void SetUpOnMainThread() override {
BetterSessionRestoreTest::SetUpOnMainThread();
SessionStartupPref::SetStartupPref(
browser()->profile(), SessionStartupPref(SessionStartupPref::DEFAULT));
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NoSessionRestoreTest);
};
IN_PROC_BROWSER_TEST_F(NoSessionRestoreTest, PRE_SessionCookies) {
diff --git a/chrome/browser/sessions/session_data_deleter.cc b/chrome/browser/sessions/session_data_deleter.cc
index 09e41f7..fb8f267 100644
--- a/chrome/browser/sessions/session_data_deleter.cc
+++ b/chrome/browser/sessions/session_data_deleter.cc
@@ -52,6 +52,10 @@
bool delete_only_by_session_only_policy,
base::OnceClosure callback);
+ SessionDataDeleterInternal(const SessionDataDeleterInternal&) = delete;
+ SessionDataDeleterInternal& operator=(const SessionDataDeleterInternal&) =
+ delete;
+
void Run(content::StoragePartition* storage_partition,
HostContentSettingsMap* host_content_settings_map);
@@ -71,8 +75,6 @@
mojo::Remote<network::mojom::CookieManager> cookie_manager_;
scoped_refptr<storage::SpecialStoragePolicy> storage_policy_;
const bool delete_only_by_session_only_policy_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionDataDeleterInternal);
};
SessionDataDeleterInternal::SessionDataDeleterInternal(
diff --git a/chrome/browser/sessions/session_restore.h b/chrome/browser/sessions/session_restore.h
index 1c4d162..6c17d7c 100644
--- a/chrome/browser/sessions/session_restore.h
+++ b/chrome/browser/sessions/session_restore.h
@@ -59,6 +59,9 @@
using CallbackList = base::RepeatingCallbackList<void(Profile*, int)>;
using RestoredCallback = base::RepeatingCallback<void(Profile*, int)>;
+ SessionRestore(const SessionRestore&) = delete;
+ SessionRestore& operator=(const SessionRestore&) = delete;
+
// Restores the last session. |behavior| is a bitmask of Behaviors, see it
// for details. If |browser| is non-null the tabs for the first window are
// added to it. Returns the last active browser.
@@ -166,8 +169,6 @@
// Whether session restore started or not.
static bool session_restore_started_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionRestore);
};
#endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_H_
diff --git a/chrome/browser/sessions/session_restore_browsertest.cc b/chrome/browser/sessions/session_restore_browsertest.cc
index 7785ab9..065c583 100644
--- a/chrome/browser/sessions/session_restore_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_browsertest.cc
@@ -297,6 +297,9 @@
public:
SmartSessionRestoreTest() = default;
+ SmartSessionRestoreTest(const SmartSessionRestoreTest&) = delete;
+ SmartSessionRestoreTest& operator=(const SmartSessionRestoreTest&) = delete;
+
void StartObserving(size_t num_tabs) {
// Start by clearing everything so it can be reused in the same test.
web_contents_.clear();
@@ -339,8 +342,6 @@
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
size_t num_tabs_;
testing::ScopedAlwaysLoadSessionRestoreTestPolicy test_policy_;
-
- DISALLOW_COPY_AND_ASSIGN(SmartSessionRestoreTest);
};
// static
@@ -359,6 +360,11 @@
public:
SessionRestoreWithURLInCommandLineTest() = default;
+ SessionRestoreWithURLInCommandLineTest(
+ const SessionRestoreWithURLInCommandLineTest&) = delete;
+ SessionRestoreWithURLInCommandLineTest& operator=(
+ const SessionRestoreWithURLInCommandLineTest&) = delete;
+
protected:
void SetUpCommandLine(base::CommandLine* command_line) override {
SessionRestoreTest::SetUpCommandLine(command_line);
@@ -369,9 +375,6 @@
}
GURL command_line_url_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionRestoreWithURLInCommandLineTest);
};
// Verifies that restored tabs have a root window. This is important
@@ -2307,6 +2310,10 @@
MultiOriginSessionRestoreTest()
: https_test_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
+ MultiOriginSessionRestoreTest(const MultiOriginSessionRestoreTest&) = delete;
+ MultiOriginSessionRestoreTest& operator=(
+ const MultiOriginSessionRestoreTest&) = delete;
+
void SetUpOnMainThread() override {
SessionRestoreTest::SetUpOnMainThread();
@@ -2340,8 +2347,6 @@
private:
net::EmbeddedTestServer https_test_server_;
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(MultiOriginSessionRestoreTest);
};
// Test that Sec-Fetch-Site http request header is correctly replayed during
diff --git a/chrome/browser/sessions/session_restore_delegate.h b/chrome/browser/sessions/session_restore_delegate.h
index d6eb02f..5c963af 100644
--- a/chrome/browser/sessions/session_restore_delegate.h
+++ b/chrome/browser/sessions/session_restore_delegate.h
@@ -54,11 +54,12 @@
absl::optional<tab_groups::TabGroupId> group_;
};
+ SessionRestoreDelegate() = delete;
+ SessionRestoreDelegate(const SessionRestoreDelegate&) = delete;
+ SessionRestoreDelegate& operator=(const SessionRestoreDelegate&) = delete;
+
static void RestoreTabs(const std::vector<RestoredTab>& tabs,
const base::TimeTicks& restore_started);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(SessionRestoreDelegate);
};
#endif // CHROME_BROWSER_SESSIONS_SESSION_RESTORE_DELEGATE_H_
diff --git a/chrome/browser/sessions/session_restore_observer_browsertest.cc b/chrome/browser/sessions/session_restore_observer_browsertest.cc
index 1613826..0fa6dcb2 100644
--- a/chrome/browser/sessions/session_restore_observer_browsertest.cc
+++ b/chrome/browser/sessions/session_restore_observer_browsertest.cc
@@ -45,6 +45,11 @@
explicit NavigationStartWebContentsObserver(WebContents* contents)
: WebContentsObserver(contents) {}
+ NavigationStartWebContentsObserver(
+ const NavigationStartWebContentsObserver&) = delete;
+ NavigationStartWebContentsObserver& operator=(
+ const NavigationStartWebContentsObserver&) = delete;
+
// content::WebContentsObserver implementation:
void DidStartNavigation(NavigationHandle* navigation_handle) override {
WebContents* contents = navigation_handle->GetWebContents();
@@ -64,8 +69,6 @@
private:
bool is_session_restored_ = false;
bool is_restored_in_foreground_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationStartWebContentsObserver);
};
class MockSessionRestoreObserver : public SessionRestoreObserver {
@@ -114,6 +117,10 @@
protected:
SessionRestoreObserverTest() {}
+ SessionRestoreObserverTest(const SessionRestoreObserverTest&) = delete;
+ SessionRestoreObserverTest& operator=(const SessionRestoreObserverTest&) =
+ delete;
+
void SetUpOnMainThread() override {
SessionStartupPref pref(SessionStartupPref::LAST);
SessionStartupPref::SetStartupPref(browser()->profile(), pref);
@@ -167,8 +174,6 @@
private:
MockSessionRestoreObserver mock_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionRestoreObserverTest);
};
#if defined(OS_LINUX) || defined(OS_CHROMEOS)
diff --git a/chrome/browser/sessions/session_restore_observer_unittest.cc b/chrome/browser/sessions/session_restore_observer_unittest.cc
index c469ad6..5ad557cac 100644
--- a/chrome/browser/sessions/session_restore_observer_unittest.cc
+++ b/chrome/browser/sessions/session_restore_observer_unittest.cc
@@ -81,6 +81,10 @@
SessionRestoreObserverTest() {}
+ SessionRestoreObserverTest(const SessionRestoreObserverTest&) = delete;
+ SessionRestoreObserverTest& operator=(const SessionRestoreObserverTest&) =
+ delete;
+
// testing::Test:
void SetUp() override {
ChromeRenderViewHostTestHarness::SetUp();
@@ -144,8 +148,6 @@
private:
MockSessionRestoreObserver mock_observer_;
std::vector<RestoredTab> restored_tabs_;
-
- DISALLOW_COPY_AND_ASSIGN(SessionRestoreObserverTest);
};
TEST_F(SessionRestoreObserverTest, SingleSessionRestore) {
diff --git a/chrome/browser/sessions/session_restore_stats_collector.h b/chrome/browser/sessions/session_restore_stats_collector.h
index 2c8c8f79..9bb70aa 100644
--- a/chrome/browser/sessions/session_restore_stats_collector.h
+++ b/chrome/browser/sessions/session_restore_stats_collector.h
@@ -84,6 +84,10 @@
base::TimeTicks restore_started,
std::unique_ptr<StatsReportingDelegate> reporting_delegate);
+ SessionRestoreStatsCollector(const SessionRestoreStatsCollector&) = delete;
+ SessionRestoreStatsCollector& operator=(const SessionRestoreStatsCollector&) =
+ delete;
+
// Tracks stats for restored tabs. Tabs from overlapping session restores can
// be tracked by the same SessionRestoreStatsCollector.
void TrackTabs(const std::vector<SessionRestoreDelegate::RestoredTab>& tabs);
@@ -136,8 +140,6 @@
base::ScopedMultiSourceObservation<content::RenderWidgetHost,
content::RenderWidgetHostObserver>
render_widget_host_observations_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SessionRestoreStatsCollector);
};
// An abstract reporting delegate is used as a testing seam.
diff --git a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
index 7689283..4eafb591 100644
--- a/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
+++ b/chrome/browser/sessions/session_restore_stats_collector_unittest.cc
@@ -141,6 +141,11 @@
SessionRestoreStatsCollectorTest()
: task_environment_{base::test::TaskEnvironment::TimeSource::MOCK_TIME} {}
+ SessionRestoreStatsCollectorTest(const SessionRestoreStatsCollectorTest&) =
+ delete;
+ SessionRestoreStatsCollectorTest& operator=(
+ const SessionRestoreStatsCollectorTest&) = delete;
+
void SetUp() override {
test_web_contents_factory_ =
std::make_unique<content::TestWebContentsFactory>();
@@ -235,9 +240,6 @@
// to observe the behaviour of the SessionRestoreStatsCollector under test.
PassthroughStatsReportingDelegate* passthrough_reporting_delegate_;
SessionRestoreStatsCollector* stats_collector_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SessionRestoreStatsCollectorTest);
};
TEST_F(SessionRestoreStatsCollectorTest, MultipleTabsLoadSerially) {
diff --git a/chrome/browser/sessions/tab_loader.h b/chrome/browser/sessions/tab_loader.h
index 04a2eb7..f4577cd 100644
--- a/chrome/browser/sessions/tab_loader.h
+++ b/chrome/browser/sessions/tab_loader.h
@@ -63,6 +63,9 @@
using RestoredTab = SessionRestoreDelegate::RestoredTab;
+ TabLoader(const TabLoader&) = delete;
+ TabLoader& operator=(const TabLoader&) = delete;
+
// Called to start restoring tabs.
static void RestoreTabs(const std::vector<RestoredTab>& tabs,
const base::TimeTicks& restore_started);
@@ -308,8 +311,6 @@
// Callback that is invoked by calls to SetTabLoadingEnabled.
base::RepeatingCallback<void(bool)>* tab_loading_enabled_callback_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(TabLoader);
};
#endif // CHROME_BROWSER_SESSIONS_TAB_LOADER_H_
diff --git a/chrome/browser/sessions/tab_loader_unittest.cc b/chrome/browser/sessions/tab_loader_unittest.cc
index fb619b6..5093da5 100644
--- a/chrome/browser/sessions/tab_loader_unittest.cc
+++ b/chrome/browser/sessions/tab_loader_unittest.cc
@@ -36,6 +36,9 @@
TabLoaderTest() : max_simultaneous_loads_(1) {}
+ TabLoaderTest(const TabLoaderTest&) = delete;
+ TabLoaderTest& operator=(const TabLoaderTest&) = delete;
+
void OnTabLoaderCreated(TabLoader* tab_loader) {
tab_loader_.SetTabLoader(tab_loader);
tab_loader_.SetTickClockForTesting(&clock_);
@@ -195,9 +198,6 @@
std::unique_ptr<testing::ScopedAlwaysLoadSessionRestoreTestPolicy>
test_policy_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TabLoaderTest);
};
TEST_F(TabLoaderTest, AllLoadingSlotsUsed) {
diff --git a/chrome/browser/sessions/tab_restore_browsertest.cc b/chrome/browser/sessions/tab_restore_browsertest.cc
index 4f7ae2a..0ef0ab2 100644
--- a/chrome/browser/sessions/tab_restore_browsertest.cc
+++ b/chrome/browser/sessions/tab_restore_browsertest.cc
@@ -79,6 +79,9 @@
base::FilePath().AppendASCII("bot2.html"));
}
+ TabRestoreTest(const TabRestoreTest&) = delete;
+ TabRestoreTest& operator=(const TabRestoreTest&) = delete;
+
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
void SetMaxSimultaneousLoadsForTesting(TabLoader* tab_loader) {
TabLoaderTester tester(tab_loader);
@@ -293,8 +296,6 @@
private:
std::unique_ptr<base::AutoReset<gfx::Animation::RichAnimationRenderMode>>
animation_mode_reset_;
-
- DISALLOW_COPY_AND_ASSIGN(TabRestoreTest);
};
// Close the end tab in the current window, then restore it. The tab should be
diff --git a/chrome/browser/share/qr_code_generation_request.h b/chrome/browser/share/qr_code_generation_request.h
index cbde9ab..0afdc17f 100644
--- a/chrome/browser/share/qr_code_generation_request.h
+++ b/chrome/browser/share/qr_code_generation_request.h
@@ -23,6 +23,9 @@
const base::android::JavaParamRef<jstring>& j_data_string);
void Destroy(JNIEnv* env);
+ QRCodeGenerationRequest(const QRCodeGenerationRequest&) = delete;
+ QRCodeGenerationRequest& operator=(const QRCodeGenerationRequest&) = delete;
+
private:
virtual ~QRCodeGenerationRequest();
@@ -34,8 +37,6 @@
base::android::ScopedJavaGlobalRef<jobject> java_qr_code_generation_request_;
mojo::Remote<qrcode_generator::mojom::QRCodeGeneratorService> remote_;
-
- DISALLOW_COPY_AND_ASSIGN(QRCodeGenerationRequest);
};
#endif // CHROME_BROWSER_SHARE_QR_CODE_GENERATION_REQUEST_H_
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h
index 851b9269..2d7a54ee 100644
--- a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h
+++ b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.h
@@ -43,6 +43,12 @@
};
explicit ClickToCallContextMenuObserver(RenderViewContextMenuProxy* proxy);
+
+ ClickToCallContextMenuObserver(const ClickToCallContextMenuObserver&) =
+ delete;
+ ClickToCallContextMenuObserver& operator=(
+ const ClickToCallContextMenuObserver&) = delete;
+
~ClickToCallContextMenuObserver() override;
// RenderViewContextMenuObserver implementation.
@@ -79,8 +85,6 @@
absl::optional<SharingClickToCallEntryPoint> entry_point_;
std::unique_ptr<ui::SimpleMenuModel> sub_menu_model_;
-
- DISALLOW_COPY_AND_ASSIGN(ClickToCallContextMenuObserver);
};
#endif // CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_CONTEXT_MENU_OBSERVER_H_
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.h b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.h
index e6a12161..bfbd017 100644
--- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.h
+++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_context_menu_observer.h
@@ -42,6 +42,12 @@
explicit SharedClipboardContextMenuObserver(
RenderViewContextMenuProxy* proxy);
+
+ SharedClipboardContextMenuObserver(
+ const SharedClipboardContextMenuObserver&) = delete;
+ SharedClipboardContextMenuObserver& operator=(
+ const SharedClipboardContextMenuObserver&) = delete;
+
~SharedClipboardContextMenuObserver() override;
// RenderViewContextMenuObserver implementation.
@@ -73,8 +79,6 @@
std::u16string text_;
std::unique_ptr<ui::SimpleMenuModel> sub_menu_model_;
-
- DISALLOW_COPY_AND_ASSIGN(SharedClipboardContextMenuObserver);
};
#endif // CHROME_BROWSER_SHARING_SHARED_CLIPBOARD_SHARED_CLIPBOARD_CONTEXT_MENU_OBSERVER_H_
diff --git a/chrome/browser/sharing/sharing_service_factory.h b/chrome/browser/sharing/sharing_service_factory.h
index ac6a008..c45c83e 100644
--- a/chrome/browser/sharing/sharing_service_factory.h
+++ b/chrome/browser/sharing/sharing_service_factory.h
@@ -27,6 +27,9 @@
// Returns the SharingService associated with |context|.
static SharingService* GetForBrowserContext(content::BrowserContext* context);
+ SharingServiceFactory(const SharingServiceFactory&) = delete;
+ SharingServiceFactory& operator=(const SharingServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SharingServiceFactory>;
@@ -39,8 +42,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(SharingServiceFactory);
};
#endif // CHROME_BROWSER_SHARING_SHARING_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sharing_hub/sharing_hub_service_factory.h b/chrome/browser/sharing_hub/sharing_hub_service_factory.h
index 0fdb1ba..8f0fd1e 100644
--- a/chrome/browser/sharing_hub/sharing_hub_service_factory.h
+++ b/chrome/browser/sharing_hub/sharing_hub_service_factory.h
@@ -20,6 +20,9 @@
static SharingHubService* GetForProfile(Profile* profile);
static SharingHubServiceFactory* GetInstance();
+ SharingHubServiceFactory(const SharingHubServiceFactory&) = delete;
+ SharingHubServiceFactory& operator=(const SharingHubServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SharingHubServiceFactory>;
@@ -29,8 +32,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SharingHubServiceFactory);
};
} // namespace sharing_hub
diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h
index 22a7c46..29e98f5 100644
--- a/chrome/browser/shell_integration.h
+++ b/chrome/browser/shell_integration.h
@@ -158,6 +158,9 @@
class DefaultWebClientWorker
: public base::RefCountedThreadSafe<DefaultWebClientWorker> {
public:
+ DefaultWebClientWorker(const DefaultWebClientWorker&) = delete;
+ DefaultWebClientWorker& operator=(const DefaultWebClientWorker&) = delete;
+
// Controls whether the worker can use user interaction to set the default
// web client. If false, the set-as-default operation will fail on OS where
// it is required.
@@ -219,8 +222,6 @@
// setting the default protocol client. The pointer must be valid for the
// lifetime of the worker.
const char* worker_name_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultWebClientWorker);
};
// Worker for checking and setting the default browser.
@@ -228,6 +229,9 @@
public:
DefaultBrowserWorker();
+ DefaultBrowserWorker(const DefaultBrowserWorker&) = delete;
+ DefaultBrowserWorker& operator=(const DefaultBrowserWorker&) = delete;
+
protected:
~DefaultBrowserWorker() override;
@@ -237,8 +241,6 @@
// Set Chrome as the default browser.
void SetAsDefaultImpl(base::OnceClosure on_finished_callback) override;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultBrowserWorker);
};
// Worker for checking and setting the default client application
@@ -249,6 +251,10 @@
public:
explicit DefaultProtocolClientWorker(const std::string& protocol);
+ DefaultProtocolClientWorker(const DefaultProtocolClientWorker&) = delete;
+ DefaultProtocolClientWorker& operator=(const DefaultProtocolClientWorker&) =
+ delete;
+
const std::string& protocol() const { return protocol_; }
protected:
@@ -262,8 +268,6 @@
void SetAsDefaultImpl(base::OnceClosure on_finished_callback) override;
std::string protocol_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultProtocolClientWorker);
};
} // namespace shell_integration
diff --git a/chrome/browser/shell_integration_linux_unittest.cc b/chrome/browser/shell_integration_linux_unittest.cc
index cac3cab..03b0322 100644
--- a/chrome/browser/shell_integration_linux_unittest.cc
+++ b/chrome/browser/shell_integration_linux_unittest.cc
@@ -47,6 +47,9 @@
public:
MockEnvironment() {}
+ MockEnvironment(const MockEnvironment&) = delete;
+ MockEnvironment& operator=(const MockEnvironment&) = delete;
+
void Set(base::StringPiece name, const std::string& value) {
variables_[std::string(name)] = value;
}
@@ -73,8 +76,6 @@
private:
std::map<std::string, std::string> variables_;
-
- DISALLOW_COPY_AND_ASSIGN(MockEnvironment);
};
// This helps EXPECT_THAT(..., ElementsAre(...)) print out more meaningful
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index be44917..5467dbe 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -240,6 +240,10 @@
explicit DefaultBrowserActionRecorder(base::OnceClosure continuation)
: continuation_(std::move(continuation)), settings_app_monitor_(this) {}
+ DefaultBrowserActionRecorder(const DefaultBrowserActionRecorder&) = delete;
+ DefaultBrowserActionRecorder& operator=(const DefaultBrowserActionRecorder&) =
+ delete;
+
private:
// win::SettingsAppMonitor::Delegate:
void OnInitialized(HRESULT result) override {
@@ -292,8 +296,6 @@
// Monitors user interaction with the Windows Settings app for the sake of
// reporting user actions.
SettingsAppMonitor settings_app_monitor_;
-
- DISALLOW_COPY_AND_ASSIGN(DefaultBrowserActionRecorder);
};
// A function bound up in a callback with a DefaultBrowserActionRecorder and
@@ -317,6 +319,9 @@
// This class also manages its own lifetime.
class OpenSystemSettingsHelper {
public:
+ OpenSystemSettingsHelper(const OpenSystemSettingsHelper&) = delete;
+ OpenSystemSettingsHelper& operator=(const OpenSystemSettingsHelper&) = delete;
+
// Begin the monitoring and will call |on_finished_callback| when done.
// Takes in a null-terminated array of |protocols| whose registry keys must be
// watched. The array must contain at least one element.
@@ -435,8 +440,6 @@
// registry watcher. This makes it possible to self-delete after one of the
// callbacks is executed to cancel the remaining ones.
base::WeakPtrFactory<OpenSystemSettingsHelper> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(OpenSystemSettingsHelper);
};
OpenSystemSettingsHelper* OpenSystemSettingsHelper::instance_ = nullptr;
@@ -448,6 +451,10 @@
public:
using ResultCallback = win::IsPinnedToTaskbarCallback;
using ErrorCallback = win::ConnectionErrorCallback;
+
+ IsPinnedToTaskbarHelper(const IsPinnedToTaskbarHelper&) = delete;
+ IsPinnedToTaskbarHelper& operator=(const IsPinnedToTaskbarHelper&) = delete;
+
static void GetState(ErrorCallback error_callback,
ResultCallback result_callback);
@@ -466,8 +473,6 @@
ResultCallback result_callback_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(IsPinnedToTaskbarHelper);
};
// static
diff --git a/chrome/browser/shell_integration_win_unittest.cc b/chrome/browser/shell_integration_win_unittest.cc
index 54337c6..c3bf937 100644
--- a/chrome/browser/shell_integration_win_unittest.cc
+++ b/chrome/browser/shell_integration_win_unittest.cc
@@ -40,6 +40,12 @@
};
class ShellIntegrationWinMigrateShortcutTest : public testing::Test {
+ public:
+ ShellIntegrationWinMigrateShortcutTest(
+ const ShellIntegrationWinMigrateShortcutTest&) = delete;
+ ShellIntegrationWinMigrateShortcutTest& operator=(
+ const ShellIntegrationWinMigrateShortcutTest&) = delete;
+
protected:
ShellIntegrationWinMigrateShortcutTest() {}
@@ -263,9 +269,6 @@
// The app id of the example app for the non-default profile.
std::wstring non_default_profile_extension_app_id_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShellIntegrationWinMigrateShortcutTest);
};
} // namespace
diff --git a/chrome/browser/signin/account_investigator_factory.h b/chrome/browser/signin/account_investigator_factory.h
index 3b4c4d25..ad08d56 100644
--- a/chrome/browser/signin/account_investigator_factory.h
+++ b/chrome/browser/signin/account_investigator_factory.h
@@ -23,6 +23,10 @@
static AccountInvestigatorFactory* GetInstance();
+ AccountInvestigatorFactory(const AccountInvestigatorFactory&) = delete;
+ AccountInvestigatorFactory& operator=(const AccountInvestigatorFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<AccountInvestigatorFactory>;
@@ -36,8 +40,6 @@
user_prefs::PrefRegistrySyncable* registry) override;
bool ServiceIsCreatedWithBrowserContext() const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(AccountInvestigatorFactory);
};
#endif // CHROME_BROWSER_SIGNIN_ACCOUNT_INVESTIGATOR_FACTORY_H_
diff --git a/chrome/browser/signin/chrome_signin_helper.cc b/chrome/browser/signin/chrome_signin_helper.cc
index 11f6fe7..4303dd5 100644
--- a/chrome/browser/signin/chrome_signin_helper.cc
+++ b/chrome/browser/signin/chrome_signin_helper.cc
@@ -117,6 +117,10 @@
std::make_unique<AccountReconcilor::Lock>(account_reconcilor);
}
+ AccountReconcilorLockWrapper(const AccountReconcilorLockWrapper&) = delete;
+ AccountReconcilorLockWrapper& operator=(const AccountReconcilorLockWrapper&) =
+ delete;
+
void DestroyAfterDelay() {
// TODO(dcheng): Should ReleaseSoon() support this use case?
content::GetUIThreadTaskRunner({})->PostDelayedTask(
@@ -134,8 +138,6 @@
}
std::unique_ptr<AccountReconcilor::Lock> account_reconcilor_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(AccountReconcilorLockWrapper);
};
// Returns true if the account reconcilor needs be be blocked while a Gaia
diff --git a/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc b/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc
index dac98dc..b5b9b6a 100644
--- a/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc
+++ b/chrome/browser/signin/chromeos_mirror_account_consistency_browsertest.cc
@@ -66,6 +66,12 @@
// This is a Chrome OS-only test ensuring that mirror account consistency is
// enabled for child accounts, but not enabled for other account types.
class ChromeOsMirrorAccountConsistencyTest : public ash::LoginManagerTest {
+ public:
+ ChromeOsMirrorAccountConsistencyTest(
+ const ChromeOsMirrorAccountConsistencyTest&) = delete;
+ ChromeOsMirrorAccountConsistencyTest& operator=(
+ const ChromeOsMirrorAccountConsistencyTest&) = delete;
+
protected:
~ChromeOsMirrorAccountConsistencyTest() override {}
@@ -102,9 +108,6 @@
protected:
std::unique_ptr<net::EmbeddedTestServer> test_server_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeOsMirrorAccountConsistencyTest);
};
// Mirror is enabled for child accounts.
diff --git a/chrome/browser/signin/dice_browsertest.cc b/chrome/browser/signin/dice_browsertest.cc
index 6d8daef..4ad16bc8 100644
--- a/chrome/browser/signin/dice_browsertest.cc
+++ b/chrome/browser/signin/dice_browsertest.cc
@@ -339,6 +339,10 @@
class DiceBrowserTest : public InProcessBrowserTest,
public AccountReconcilor::Observer,
public signin::IdentityManager::Observer {
+ public:
+ DiceBrowserTest(const DiceBrowserTest&) = delete;
+ DiceBrowserTest& operator=(const DiceBrowserTest&) = delete;
+
protected:
~DiceBrowserTest() override {}
@@ -664,8 +668,6 @@
base::OnceClosure tokens_loaded_quit_closure_;
base::OnceClosure on_primary_account_set_quit_closure_;
base::OnceClosure signin_requested_quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(DiceBrowserTest);
};
// Checks that signin on Gaia triggers the fetch for a refresh token.
diff --git a/chrome/browser/signin/identity_manager_factory.h b/chrome/browser/signin/identity_manager_factory.h
index 264fec4..a2e0590 100644
--- a/chrome/browser/signin/identity_manager_factory.h
+++ b/chrome/browser/signin/identity_manager_factory.h
@@ -35,6 +35,9 @@
// Returns an instance of the IdentityManagerFactory singleton.
static IdentityManagerFactory* GetInstance();
+ IdentityManagerFactory(const IdentityManagerFactory&) = delete;
+ IdentityManagerFactory& operator=(const IdentityManagerFactory&) = delete;
+
// Ensures that IdentityManagerFactory and the factories on which it depends
// are built.
static void EnsureFactoryAndDependeeFactoriesBuilt();
@@ -59,8 +62,6 @@
// List of observers. Checks that list is empty on destruction.
base::ObserverList<Observer, /*check_empty=*/true, /*allow_reentrancy=*/false>
observer_list_;
-
- DISALLOW_COPY_AND_ASSIGN(IdentityManagerFactory);
};
#endif // CHROME_BROWSER_SIGNIN_IDENTITY_MANAGER_FACTORY_H_
diff --git a/chrome/browser/signin/signin_global_error_factory.h b/chrome/browser/signin/signin_global_error_factory.h
index 50046c8..91e3fc20 100644
--- a/chrome/browser/signin/signin_global_error_factory.h
+++ b/chrome/browser/signin/signin_global_error_factory.h
@@ -24,6 +24,9 @@
// Returns an instance of the SigninGlobalErrorFactory singleton.
static SigninGlobalErrorFactory* GetInstance();
+ SigninGlobalErrorFactory(const SigninGlobalErrorFactory&) = delete;
+ SigninGlobalErrorFactory& operator=(const SigninGlobalErrorFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SigninGlobalErrorFactory>;
@@ -33,8 +36,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SigninGlobalErrorFactory);
};
#endif // CHROME_BROWSER_SIGNIN_SIGNIN_GLOBAL_ERROR_FACTORY_H_
diff --git a/chrome/browser/signin/signin_manager_unittest.cc b/chrome/browser/signin/signin_manager_unittest.cc
index 4749d61..3963949 100644
--- a/chrome/browser/signin/signin_manager_unittest.cc
+++ b/chrome/browser/signin/signin_manager_unittest.cc
@@ -57,6 +57,9 @@
/*test_signin_client=*/nullptr),
observer_(identity_test_env_.identity_manager()) {}
+ SigninManagerTest(const SigninManagerTest&) = delete;
+ SigninManagerTest& operator=(const SigninManagerTest&) = delete;
+
void SetUp() override {
testing::Test::SetUp();
RecreateSigninManager();
@@ -155,8 +158,6 @@
IdentityTestEnvironment identity_test_env_;
std::unique_ptr<SigninManager> signin_manger_;
FakeIdentityManagerObserver observer_;
-
- DISALLOW_COPY_AND_ASSIGN(SigninManagerTest);
};
TEST_F(
diff --git a/chrome/browser/signin/signin_profile_attributes_updater_factory.h b/chrome/browser/signin/signin_profile_attributes_updater_factory.h
index 0d67c842..09aedf4 100644
--- a/chrome/browser/signin/signin_profile_attributes_updater_factory.h
+++ b/chrome/browser/signin/signin_profile_attributes_updater_factory.h
@@ -22,6 +22,11 @@
// Returns an instance of the factory singleton.
static SigninProfileAttributesUpdaterFactory* GetInstance();
+ SigninProfileAttributesUpdaterFactory(
+ const SigninProfileAttributesUpdaterFactory&) = delete;
+ SigninProfileAttributesUpdaterFactory& operator=(
+ const SigninProfileAttributesUpdaterFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
SigninProfileAttributesUpdaterFactory>;
@@ -33,8 +38,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(SigninProfileAttributesUpdaterFactory);
};
#endif // CHROME_BROWSER_SIGNIN_SIGNIN_PROFILE_ATTRIBUTES_UPDATER_FACTORY_H_
diff --git a/chrome/browser/site_isolation/chrome_site_isolation_policy_unittest.cc b/chrome/browser/site_isolation/chrome_site_isolation_policy_unittest.cc
index 67794bc..4ddf347 100644
--- a/chrome/browser/site_isolation/chrome_site_isolation_policy_unittest.cc
+++ b/chrome/browser/site_isolation/chrome_site_isolation_policy_unittest.cc
@@ -48,6 +48,10 @@
public:
ChromeSiteIsolationPolicyTest() = default;
+ ChromeSiteIsolationPolicyTest(const ChromeSiteIsolationPolicyTest&) = delete;
+ ChromeSiteIsolationPolicyTest& operator=(
+ const ChromeSiteIsolationPolicyTest&) = delete;
+
void SetUp() override {
// This way the test always sees the same amount of physical memory
// (kLowMemoryDeviceThresholdMB = 512MB), regardless of how much memory is
@@ -73,8 +77,6 @@
content::BrowserTaskEnvironment task_environment_;
base::test::ScopedFeatureList mode_feature_;
base::test::ScopedFeatureList threshold_feature_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeSiteIsolationPolicyTest);
};
TEST_F(ChromeSiteIsolationPolicyTest, NoIsolationBelowMemoryThreshold) {
diff --git a/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc b/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc
index aa0d455..35ca82b 100644
--- a/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc
+++ b/chrome/browser/site_isolation/chrome_site_per_process_browsertest.cc
@@ -78,6 +78,9 @@
: WebContentsObserver(web_contents),
transition_(ui::PageTransition::PAGE_TRANSITION_LINK) {}
+ RedirectObserver(const RedirectObserver&) = delete;
+ RedirectObserver& operator=(const RedirectObserver&) = delete;
+
void DidFinishNavigation(
content::NavigationHandle* navigation_handle) override {
if (!navigation_handle->HasCommitted())
@@ -98,8 +101,6 @@
private:
ui::PageTransition transition_;
std::vector<GURL> redirects_;
-
- DISALLOW_COPY_AND_ASSIGN(RedirectObserver);
};
} // namespace
diff --git a/chrome/browser/site_isolation/prefs_observer.h b/chrome/browser/site_isolation/prefs_observer.h
index 7a21e83..f79e778 100644
--- a/chrome/browser/site_isolation/prefs_observer.h
+++ b/chrome/browser/site_isolation/prefs_observer.h
@@ -16,12 +16,14 @@
public:
explicit SiteIsolationPrefsObserver(PrefService* pref_service);
+ SiteIsolationPrefsObserver(const SiteIsolationPrefsObserver&) = delete;
+ SiteIsolationPrefsObserver& operator=(const SiteIsolationPrefsObserver&) =
+ delete;
+
private:
void OnChangeInIsolatedOriginsPref();
PrefChangeRegistrar pref_change_registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(SiteIsolationPrefsObserver);
};
#endif // CHROME_BROWSER_SITE_ISOLATION_PREFS_OBSERVER_H_
diff --git a/chrome/browser/site_isolation/site_details.h b/chrome/browser/site_isolation/site_details.h
index 036db256..c13dc9ff 100644
--- a/chrome/browser/site_isolation/site_details.h
+++ b/chrome/browser/site_isolation/site_details.h
@@ -49,6 +49,9 @@
class SiteDetails {
public:
+ SiteDetails(const SiteDetails&) = delete;
+ SiteDetails& operator=(const SiteDetails&) = delete;
+
// Collect information about all committed sites in the given WebContents
// on the UI thread.
static void CollectSiteInfo(content::WebContents* contents,
@@ -61,8 +64,6 @@
// Only static methods - never needs to be constructed.
SiteDetails() = delete;
~SiteDetails() = delete;
-
- DISALLOW_COPY_AND_ASSIGN(SiteDetails);
};
#endif // CHROME_BROWSER_SITE_ISOLATION_SITE_DETAILS_H_
diff --git a/chrome/browser/site_isolation/site_details_browsertest.cc b/chrome/browser/site_isolation/site_details_browsertest.cc
index d86d7a6..22f972d 100644
--- a/chrome/browser/site_isolation/site_details_browsertest.cc
+++ b/chrome/browser/site_isolation/site_details_browsertest.cc
@@ -57,6 +57,9 @@
public:
TestMemoryDetails() : MetricsMemoryDetails(base::DoNothing()) {}
+ TestMemoryDetails(const TestMemoryDetails&) = delete;
+ TestMemoryDetails& operator=(const TestMemoryDetails&) = delete;
+
void StartFetchAndWait() {
uma_ = std::make_unique<base::HistogramTester>();
StartFetch();
@@ -94,8 +97,6 @@
}
std::unique_ptr<base::HistogramTester> uma_;
-
- DISALLOW_COPY_AND_ASSIGN(TestMemoryDetails);
};
// This matcher takes three other matchers as arguments, and applies one of them
diff --git a/chrome/browser/site_isolation/site_per_process_interactive_browsertest.cc b/chrome/browser/site_isolation/site_per_process_interactive_browsertest.cc
index 268d082..db594e43a 100644
--- a/chrome/browser/site_isolation/site_per_process_interactive_browsertest.cc
+++ b/chrome/browser/site_isolation/site_per_process_interactive_browsertest.cc
@@ -1175,6 +1175,11 @@
extension_loaded_(contents->GetLastCommittedURL().SchemeIs(
extensions::kExtensionScheme)) {}
+ NavigationToExtensionSchemeObserver(
+ const NavigationToExtensionSchemeObserver&) = delete;
+ NavigationToExtensionSchemeObserver& operator=(
+ const NavigationToExtensionSchemeObserver&) = delete;
+
void Wait() {
if (extension_loaded_)
return;
@@ -1193,8 +1198,6 @@
bool extension_loaded_;
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationToExtensionSchemeObserver);
};
// This test loads a PDF inside an OOPIF and then verifies that context menu
diff --git a/chrome/browser/site_isolation/site_per_process_text_input_browsertest.cc b/chrome/browser/site_isolation/site_per_process_text_input_browsertest.cc
index daddbbb..52c2d17 100644
--- a/chrome/browser/site_isolation/site_per_process_text_input_browsertest.cc
+++ b/chrome/browser/site_isolation/site_per_process_text_input_browsertest.cc
@@ -73,13 +73,16 @@
&TextInputManagerChangeObserver::VerifyChange, base::Unretained(this)));
}
+ TextInputManagerChangeObserver(const TextInputManagerChangeObserver&) =
+ delete;
+ TextInputManagerChangeObserver& operator=(
+ const TextInputManagerChangeObserver&) = delete;
+
private:
void VerifyChange() {
if (tester()->IsTextInputStateChanged())
OnSuccess();
}
-
- DISALLOW_COPY_AND_ASSIGN(TextInputManagerChangeObserver);
};
// This class observes |TextInputState.type| for a specific RWHV.
@@ -96,6 +99,10 @@
&ViewTextInputTypeObserver::VerifyType, base::Unretained(this)));
}
+ ViewTextInputTypeObserver(const ViewTextInputTypeObserver&) = delete;
+ ViewTextInputTypeObserver& operator=(const ViewTextInputTypeObserver&) =
+ delete;
+
private:
void VerifyType() {
ui::TextInputType type;
@@ -108,8 +115,6 @@
content::WebContents* web_contents_;
content::RenderWidgetHostView* view_;
const ui::TextInputType expected_type_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewTextInputTypeObserver);
};
// This class observes the |expected_view| for the first change in its
@@ -127,6 +132,11 @@
base::Unretained(this)));
}
+ ViewSelectionBoundsChangedObserver(
+ const ViewSelectionBoundsChangedObserver&) = delete;
+ ViewSelectionBoundsChangedObserver& operator=(
+ const ViewSelectionBoundsChangedObserver&) = delete;
+
private:
void VerifyChange() {
if (expected_view_ == tester()->GetUpdatedView())
@@ -134,8 +144,6 @@
}
const content::RenderWidgetHostView* const expected_view_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewSelectionBoundsChangedObserver);
};
// This class observes the |expected_view| for the first change in its
@@ -153,6 +161,11 @@
base::Unretained(this)));
}
+ ViewCompositionRangeChangedObserver(
+ const ViewCompositionRangeChangedObserver&) = delete;
+ ViewCompositionRangeChangedObserver& operator=(
+ const ViewCompositionRangeChangedObserver&) = delete;
+
private:
void VerifyChange() {
if (expected_view_ == tester()->GetUpdatedView())
@@ -160,8 +173,6 @@
}
const content::RenderWidgetHostView* const expected_view_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewCompositionRangeChangedObserver);
};
// This class observes the |expected_view| for a change in the text selection.
@@ -177,6 +188,10 @@
&ViewTextSelectionObserver::VerifyChange, base::Unretained(this)));
}
+ ViewTextSelectionObserver(const ViewTextSelectionObserver&) = delete;
+ ViewTextSelectionObserver& operator=(const ViewTextSelectionObserver&) =
+ delete;
+
private:
void VerifyChange() {
if (expected_view_ == tester()->GetUpdatedView()) {
@@ -189,8 +204,6 @@
const content::RenderWidgetHostView* const expected_view_;
const size_t expected_length_;
-
- DISALLOW_COPY_AND_ASSIGN(ViewTextSelectionObserver);
};
// This class observes all the text selection updates within a WebContents.
@@ -202,6 +215,9 @@
&TextSelectionObserver::VerifyChange, base::Unretained(this)));
}
+ TextSelectionObserver(const TextSelectionObserver&) = delete;
+ TextSelectionObserver& operator=(const TextSelectionObserver&) = delete;
+
void WaitForSelectedText(const std::string& text) {
selected_text_ = text;
Wait();
@@ -216,8 +232,6 @@
}
std::string selected_text_;
-
- DISALLOW_COPY_AND_ASSIGN(TextSelectionObserver);
};
// This class monitors all the changes in TextInputState and keeps a record of
@@ -231,6 +245,10 @@
&RecordActiveViewsObserver::RecordActiveView, base::Unretained(this)));
}
+ RecordActiveViewsObserver(const RecordActiveViewsObserver&) = delete;
+ RecordActiveViewsObserver& operator=(const RecordActiveViewsObserver&) =
+ delete;
+
const std::vector<const content::RenderWidgetHostView*>* active_views()
const {
return &active_views_;
@@ -245,8 +263,6 @@
std::unique_ptr<content::TextInputManagerTester> tester_;
std::vector<const content::RenderWidgetHostView*> active_views_;
-
- DISALLOW_COPY_AND_ASSIGN(RecordActiveViewsObserver);
};
} // namespace
@@ -1006,6 +1022,9 @@
test_observer_(content::TestInputMethodObserver::Create(web_contents)) {
}
+ InputMethodObserverBase(const InputMethodObserverBase&) = delete;
+ InputMethodObserverBase& operator=(const InputMethodObserverBase&) = delete;
+
void Wait() {
if (success_)
return;
@@ -1035,8 +1054,6 @@
bool success_;
std::unique_ptr<content::TestInputMethodObserver> test_observer_;
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(InputMethodObserverBase);
};
class InputMethodObserverForShowIme : public InputMethodObserverBase {
@@ -1047,8 +1064,9 @@
success_closure());
}
- private:
- DISALLOW_COPY_AND_ASSIGN(InputMethodObserverForShowIme);
+ InputMethodObserverForShowIme(const InputMethodObserverForShowIme&) = delete;
+ InputMethodObserverForShowIme& operator=(
+ const InputMethodObserverForShowIme&) = delete;
};
// TODO(ekaramad): This test is actually a unit test and should be moved to
diff --git a/chrome/browser/speech/extension_api/tts_engine_extension_observer_chromeos.h b/chrome/browser/speech/extension_api/tts_engine_extension_observer_chromeos.h
index bc94efe..6c934b5 100644
--- a/chrome/browser/speech/extension_api/tts_engine_extension_observer_chromeos.h
+++ b/chrome/browser/speech/extension_api/tts_engine_extension_observer_chromeos.h
@@ -26,6 +26,11 @@
public:
static TtsEngineExtensionObserverChromeOS* GetInstance(Profile* profile);
+ TtsEngineExtensionObserverChromeOS(
+ const TtsEngineExtensionObserverChromeOS&) = delete;
+ TtsEngineExtensionObserverChromeOS& operator=(
+ const TtsEngineExtensionObserverChromeOS&) = delete;
+
// Gets the currently loaded TTS extension ids.
const std::set<std::string>& engine_extension_ids() {
return engine_extension_ids_;
@@ -81,8 +86,6 @@
mojo::Remote<chromeos::tts::mojom::TtsService> tts_service_;
friend class TtsEngineExtensionObserverChromeOSFactory;
-
- DISALLOW_COPY_AND_ASSIGN(TtsEngineExtensionObserverChromeOS);
};
#endif // CHROME_BROWSER_SPEECH_EXTENSION_API_TTS_ENGINE_EXTENSION_OBSERVER_CHROMEOS_H_
diff --git a/chrome/browser/speech/network_speech_recognizer.cc b/chrome/browser/speech/network_speech_recognizer.cc
index c76068a..09a1207 100644
--- a/chrome/browser/speech/network_speech_recognizer.cc
+++ b/chrome/browser/speech/network_speech_recognizer.cc
@@ -46,6 +46,9 @@
const std::string& accept_language,
const std::string& locale);
+ EventListener(const EventListener&) = delete;
+ EventListener& operator=(const EventListener&) = delete;
+
void StartOnIOThread(
const std::string& auth_scope,
const std::string& auth_token,
@@ -94,8 +97,6 @@
std::u16string last_result_str_;
base::WeakPtrFactory<EventListener> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(EventListener);
};
NetworkSpeechRecognizer::EventListener::EventListener(
diff --git a/chrome/browser/speech/tts_controller_delegate_impl.h b/chrome/browser/speech/tts_controller_delegate_impl.h
index d8e3d9cd..228f2e8 100644
--- a/chrome/browser/speech/tts_controller_delegate_impl.h
+++ b/chrome/browser/speech/tts_controller_delegate_impl.h
@@ -23,6 +23,10 @@
// Get the single instance of this class.
static TtsControllerDelegateImpl* GetInstance();
+ TtsControllerDelegateImpl(const TtsControllerDelegateImpl&) = delete;
+ TtsControllerDelegateImpl& operator=(const TtsControllerDelegateImpl&) =
+ delete;
+
// TtsControllerDelegate overrides.
std::unique_ptr<content::TtsControllerDelegate::PreferredVoiceIds>
GetPreferredVoiceIdsForUtterance(content::TtsUtterance* utterance) override;
@@ -45,8 +49,6 @@
content::TtsUtterance* utterance);
friend struct base::DefaultSingletonTraits<TtsControllerDelegateImpl>;
-
- DISALLOW_COPY_AND_ASSIGN(TtsControllerDelegateImpl);
};
#endif // CHROME_BROWSER_SPEECH_TTS_CONTROLLER_DELEGATE_IMPL_H_
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
index 3712d2e9c..14ffe17 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl_unittest.cc
@@ -23,6 +23,10 @@
TestSpellCheckHostChromeImpl()
: spellcheck_(std::make_unique<SpellcheckService>(&testing_profile_)) {}
+ TestSpellCheckHostChromeImpl(const TestSpellCheckHostChromeImpl&) = delete;
+ TestSpellCheckHostChromeImpl& operator=(const TestSpellCheckHostChromeImpl&) =
+ delete;
+
SpellcheckCustomDictionary& GetCustomDictionary() const {
EXPECT_NE(nullptr, spellcheck_.get());
SpellcheckCustomDictionary* custom_dictionary =
@@ -41,8 +45,6 @@
content::BrowserTaskEnvironment task_environment_;
TestingProfile testing_profile_;
std::unique_ptr<SpellcheckService> spellcheck_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSpellCheckHostChromeImpl);
};
// Spelling corrections of custom dictionary words should be removed from the
diff --git a/chrome/browser/spellchecker/spellcheck_factory.h b/chrome/browser/spellchecker/spellcheck_factory.h
index 66e05d4..b6b13a6 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.h
+++ b/chrome/browser/spellchecker/spellcheck_factory.h
@@ -24,6 +24,9 @@
static SpellcheckServiceFactory* GetInstance();
+ SpellcheckServiceFactory(const SpellcheckServiceFactory&) = delete;
+ SpellcheckServiceFactory& operator=(const SpellcheckServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SpellcheckServiceFactory>;
@@ -46,8 +49,6 @@
FRIEND_TEST_ALL_PREFIXES(SpellcheckServiceWindowsHybridBrowserTestDelayInit,
WindowsHybridSpellcheckDelayInit);
#endif // defined(OS_WIN)
-
- DISALLOW_COPY_AND_ASSIGN(SpellcheckServiceFactory);
};
#endif // CHROME_BROWSER_SPELLCHECKER_SPELLCHECK_FACTORY_H_
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index 22c3ea4..d748ca6 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -68,6 +68,10 @@
public:
SpellcheckServiceBrowserTest() = default;
+ SpellcheckServiceBrowserTest(const SpellcheckServiceBrowserTest&) = delete;
+ SpellcheckServiceBrowserTest& operator=(const SpellcheckServiceBrowserTest&) =
+ delete;
+
#if defined(OS_WIN)
void SetUp() override {
// Tests were designed assuming Hunspell dictionary used and many fail when
@@ -276,14 +280,17 @@
bool custom_dictionary_changed_called_;
bool initialize_spellcheck_called_;
bool spellcheck_enabled_state_;
-
- DISALLOW_COPY_AND_ASSIGN(SpellcheckServiceBrowserTest);
};
class SpellcheckServiceHostBrowserTest : public SpellcheckServiceBrowserTest {
public:
SpellcheckServiceHostBrowserTest() = default;
+ SpellcheckServiceHostBrowserTest(const SpellcheckServiceHostBrowserTest&) =
+ delete;
+ SpellcheckServiceHostBrowserTest& operator=(
+ const SpellcheckServiceHostBrowserTest&) = delete;
+
void RequestDictionary() {
mojo::Remote<spellcheck::mojom::SpellCheckHost> interface;
RequestSpellCheckHost(&interface);
@@ -334,8 +341,6 @@
bool spelling_service_done_called_ = false;
std::u16string word_;
-
- DISALLOW_COPY_AND_ASSIGN(SpellcheckServiceHostBrowserTest);
};
// Disable spell check should disable spelling service
diff --git a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
index 47e5151..b1c3f44 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
@@ -187,6 +187,10 @@
CertReportHelper::SetFakeOfficialBuildForTesting();
}
+ CaptivePortalBlockingPageTest(const CaptivePortalBlockingPageTest&) = delete;
+ CaptivePortalBlockingPageTest& operator=(
+ const CaptivePortalBlockingPageTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
// Setting the sending threshold to 1.0 ensures reporting is enabled.
variations::testing::VariationParamsManager::AppendVariationParams(
@@ -223,7 +227,6 @@
private:
std::unique_ptr<TestingThrottleInstaller> testing_throttle_installer_;
base::test::ScopedFeatureList scoped_feature_list_;
- DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPageTest);
};
void CaptivePortalBlockingPageTest::TestInterstitial(
diff --git a/chrome/browser/ssl/connection_help_tab_helper_browsertest.cc b/chrome/browser/ssl/connection_help_tab_helper_browsertest.cc
index ced6a5f..38cfa5d 100644
--- a/chrome/browser/ssl/connection_help_tab_helper_browsertest.cc
+++ b/chrome/browser/ssl/connection_help_tab_helper_browsertest.cc
@@ -25,6 +25,10 @@
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS),
https_expired_server_(net::EmbeddedTestServer::TYPE_HTTPS) {}
+ ConnectionHelpTabHelperTest(const ConnectionHelpTabHelperTest&) = delete;
+ ConnectionHelpTabHelperTest& operator=(const ConnectionHelpTabHelperTest&) =
+ delete;
+
void SetUpOnMainThread() override {
https_server_.SetSSLConfig(net::EmbeddedTestServer::CERT_OK);
https_expired_server_.SetSSLConfig(net::EmbeddedTestServer::CERT_EXPIRED);
@@ -50,7 +54,6 @@
private:
net::EmbeddedTestServer https_server_;
net::EmbeddedTestServer https_expired_server_;
- DISALLOW_COPY_AND_ASSIGN(ConnectionHelpTabHelperTest);
};
// Tests that the chrome://connection-help redirect is not triggered for an
diff --git a/chrome/browser/ssl/secure_origin_prefs_observer.h b/chrome/browser/ssl/secure_origin_prefs_observer.h
index 9b4afe66..5d72580 100644
--- a/chrome/browser/ssl/secure_origin_prefs_observer.h
+++ b/chrome/browser/ssl/secure_origin_prefs_observer.h
@@ -17,12 +17,14 @@
public:
explicit SecureOriginPrefsObserver(PrefService* pref_service);
+ SecureOriginPrefsObserver(const SecureOriginPrefsObserver&) = delete;
+ SecureOriginPrefsObserver& operator=(const SecureOriginPrefsObserver&) =
+ delete;
+
private:
void OnChangeInSecureOriginPref();
PrefChangeRegistrar pref_change_registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(SecureOriginPrefsObserver);
};
#endif // CHROME_BROWSER_SSL_SECURE_ORIGIN_PREFS_OBSERVER_H_
diff --git a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
index 2b8a07ad..01aad8b 100644
--- a/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
+++ b/chrome/browser/ssl/security_state_tab_helper_browsertest.cc
@@ -496,6 +496,11 @@
public:
SecurityStateTabHelperIncognitoTest() : SecurityStateTabHelperTest() {}
+ SecurityStateTabHelperIncognitoTest(
+ const SecurityStateTabHelperIncognitoTest&) = delete;
+ SecurityStateTabHelperIncognitoTest& operator=(
+ const SecurityStateTabHelperIncognitoTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
SecurityStateTabHelperTest::SetUpCommandLine(command_line);
// Test should run Incognito.
@@ -506,7 +511,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
- DISALLOW_COPY_AND_ASSIGN(SecurityStateTabHelperIncognitoTest);
};
class DidChangeVisibleSecurityStateTest
@@ -518,6 +522,11 @@
https_server_.ServeFilesFromSourceDirectory(GetChromeTestDataDir());
}
+ DidChangeVisibleSecurityStateTest(const DidChangeVisibleSecurityStateTest&) =
+ delete;
+ DidChangeVisibleSecurityStateTest& operator=(
+ const DidChangeVisibleSecurityStateTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
// Browser will both run and display insecure content.
command_line->AppendSwitch(switches::kAllowRunningInsecureContent);
@@ -529,9 +538,6 @@
protected:
net::EmbeddedTestServer https_server_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DidChangeVisibleSecurityStateTest);
};
IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTest, HttpPage) {
@@ -1619,6 +1625,11 @@
public:
BrowserTestNonsecureURLRequestWithLegacyTLSWarnings() {}
+ BrowserTestNonsecureURLRequestWithLegacyTLSWarnings(
+ const BrowserTestNonsecureURLRequestWithLegacyTLSWarnings&) = delete;
+ BrowserTestNonsecureURLRequestWithLegacyTLSWarnings& operator=(
+ const BrowserTestNonsecureURLRequestWithLegacyTLSWarnings&) = delete;
+
void SetUpOnMainThread() override {
net::SSLServerConfig config;
config.version_max = net::SSL_PROTOCOL_VERSION_TLS1_1;
@@ -1633,8 +1644,6 @@
private:
net::EmbeddedTestServer https_server_{
net::test_server::EmbeddedTestServer::TYPE_HTTPS};
-
- DISALLOW_COPY_AND_ASSIGN(BrowserTestNonsecureURLRequestWithLegacyTLSWarnings);
};
// Tests that a connection with obsolete TLS settings does not get a
diff --git a/chrome/browser/ssl/ssl_browsertest.cc b/chrome/browser/ssl/ssl_browsertest.cc
index 0d0a823..9b61a83 100644
--- a/chrome/browser/ssl/ssl_browsertest.cc
+++ b/chrome/browser/ssl/ssl_browsertest.cc
@@ -287,6 +287,12 @@
: public ChromeContentBrowserClient {
public:
ChromeContentBrowserClientForMixedContentTest() {}
+
+ ChromeContentBrowserClientForMixedContentTest(
+ const ChromeContentBrowserClientForMixedContentTest&) = delete;
+ ChromeContentBrowserClientForMixedContentTest& operator=(
+ const ChromeContentBrowserClientForMixedContentTest&) = delete;
+
void OverrideWebkitPrefs(
content::WebContents* web_contents,
blink::web_pref::WebPreferences* web_prefs) override {
@@ -308,8 +314,6 @@
bool allow_running_insecure_content_ = false;
bool strict_mixed_content_checking_ = false;
bool strictly_block_blockable_mixed_content_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientForMixedContentTest);
};
// Wrapper around content::SetBrowserClientForTesting() that ensures the
@@ -454,6 +458,9 @@
https_server_common_name_only_.AddDefaultHandlers(GetChromeTestDataDir());
}
+ SSLUITestBase(const SSLUITestBase&) = delete;
+ SSLUITestBase& operator=(const SSLUITestBase&) = delete;
+
void SetUp() override {
policy_provider_.SetDefaultReturns(
/*is_initialization_complete_return=*/true,
@@ -898,9 +905,6 @@
network::mojom::SSLConfig last_ssl_config_;
mojo::Receiver<network::mojom::SSLConfigClient> receiver_{this};
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SSLUITestBase);
};
class SSLUITest : public SSLUITestBase {
@@ -911,6 +915,9 @@
/* disabled_features */ {blink::features::kMixedContentAutoupgrade});
}
+ SSLUITest(const SSLUITest&) = delete;
+ SSLUITest& operator=(const SSLUITest&) = delete;
+
protected:
void DontProceedThroughInterstitial(WebContents* tab) override {
content::TestNavigationObserver nav_observer(tab, 1);
@@ -920,7 +927,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
- DISALLOW_COPY_AND_ASSIGN(SSLUITest);
};
class SSLUITestBlock : public SSLUITest {
@@ -7898,10 +7904,12 @@
feature_list_.InitAndEnableFeature(net::features::kLegacyTLSEnforced);
}
+ LegacyTLSInterstitialTest(const LegacyTLSInterstitialTest&) = delete;
+ LegacyTLSInterstitialTest& operator=(const LegacyTLSInterstitialTest&) =
+ delete;
+
private:
base::test::ScopedFeatureList feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(LegacyTLSInterstitialTest);
};
// When kLegacyTLSEnforcement is enabled, visiting a legacy TLS page should
diff --git a/chrome/browser/ssl/stateful_ssl_host_state_delegate_factory.h b/chrome/browser/ssl/stateful_ssl_host_state_delegate_factory.h
index 188730d..c5f3507 100644
--- a/chrome/browser/ssl/stateful_ssl_host_state_delegate_factory.h
+++ b/chrome/browser/ssl/stateful_ssl_host_state_delegate_factory.h
@@ -22,6 +22,11 @@
static StatefulSSLHostStateDelegateFactory* GetInstance();
+ StatefulSSLHostStateDelegateFactory(
+ const StatefulSSLHostStateDelegateFactory&) = delete;
+ StatefulSSLHostStateDelegateFactory& operator=(
+ const StatefulSSLHostStateDelegateFactory&) = delete;
+
// Returns the default factory, useful in tests where it's null by default.
static TestingFactory GetDefaultFactoryForTesting();
@@ -38,8 +43,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(StatefulSSLHostStateDelegateFactory);
};
#endif // CHROME_BROWSER_SSL_STATEFUL_SSL_HOST_STATE_DELEGATE_FACTORY_H_
diff --git a/chrome/browser/status_icons/status_icon_menu_model.h b/chrome/browser/status_icons/status_icon_menu_model.h
index 9341003..d68e709 100644
--- a/chrome/browser/status_icons/status_icon_menu_model.h
+++ b/chrome/browser/status_icons/status_icon_menu_model.h
@@ -49,6 +49,10 @@
// The Delegate can be NULL.
explicit StatusIconMenuModel(Delegate* delegate);
+
+ StatusIconMenuModel(const StatusIconMenuModel&) = delete;
+ StatusIconMenuModel& operator=(const StatusIconMenuModel&) = delete;
+
~StatusIconMenuModel() override;
// Methods for seting the state of specific command ids.
@@ -103,8 +107,6 @@
base::ObserverList<Observer>::Unchecked observer_list_;
Delegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(StatusIconMenuModel);
};
#endif // CHROME_BROWSER_STATUS_ICONS_STATUS_ICON_MENU_MODEL_H_
diff --git a/chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h b/chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h
index ef1c289..52f47f8 100644
--- a/chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h
+++ b/chrome/browser/subresource_filter/subresource_filter_profile_context_factory.h
@@ -27,14 +27,17 @@
SubresourceFilterProfileContextFactory();
+ SubresourceFilterProfileContextFactory(
+ const SubresourceFilterProfileContextFactory&) = delete;
+ SubresourceFilterProfileContextFactory& operator=(
+ const SubresourceFilterProfileContextFactory&) = delete;
+
private:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContextFactory);
};
#endif // CHROME_BROWSER_SUBRESOURCE_FILTER_SUBRESOURCE_FILTER_PROFILE_CONTEXT_FACTORY_H_
diff --git a/chrome/browser/subresource_filter/subresource_filter_web_socket_browsertest.cc b/chrome/browser/subresource_filter/subresource_filter_web_socket_browsertest.cc
index a3c40120..85aa814 100644
--- a/chrome/browser/subresource_filter/subresource_filter_web_socket_browsertest.cc
+++ b/chrome/browser/subresource_filter/subresource_filter_web_socket_browsertest.cc
@@ -31,6 +31,11 @@
public:
SubresourceFilterWebSocketBrowserTest() {}
+ SubresourceFilterWebSocketBrowserTest(
+ const SubresourceFilterWebSocketBrowserTest&) = delete;
+ SubresourceFilterWebSocketBrowserTest& operator=(
+ const SubresourceFilterWebSocketBrowserTest&) = delete;
+
void SetUpOnMainThread() override {
SubresourceFilterBrowserTest::SetUpOnMainThread();
websocket_test_server_ = std::make_unique<net::SpawnedTestServer>(
@@ -60,8 +65,6 @@
private:
std::unique_ptr<net::SpawnedTestServer> websocket_test_server_;
-
- DISALLOW_COPY_AND_ASSIGN(SubresourceFilterWebSocketBrowserTest);
};
IN_PROC_BROWSER_TEST_P(SubresourceFilterWebSocketBrowserTest, BlockWebSocket) {
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_factory.h b/chrome/browser/supervised_user/child_accounts/child_account_service_factory.h
index 00dfddb..95e486e 100644
--- a/chrome/browser/supervised_user/child_accounts/child_account_service_factory.h
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service_factory.h
@@ -18,6 +18,10 @@
static ChildAccountServiceFactory* GetInstance();
+ ChildAccountServiceFactory(const ChildAccountServiceFactory&) = delete;
+ ChildAccountServiceFactory& operator=(const ChildAccountServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ChildAccountServiceFactory>;
@@ -27,8 +31,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ChildAccountServiceFactory);
};
#endif // CHROME_BROWSER_SUPERVISED_USER_CHILD_ACCOUNTS_CHILD_ACCOUNT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/supervised_user/kids_chrome_management/kids_chrome_management_client_factory.h b/chrome/browser/supervised_user/kids_chrome_management/kids_chrome_management_client_factory.h
index 7d836db..f70d8fc 100644
--- a/chrome/browser/supervised_user/kids_chrome_management/kids_chrome_management_client_factory.h
+++ b/chrome/browser/supervised_user/kids_chrome_management/kids_chrome_management_client_factory.h
@@ -26,6 +26,11 @@
static KidsChromeManagementClientFactory* GetInstance();
+ KidsChromeManagementClientFactory(const KidsChromeManagementClientFactory&) =
+ delete;
+ KidsChromeManagementClientFactory& operator=(
+ const KidsChromeManagementClientFactory&) = delete;
+
private:
friend class base::NoDestructor<KidsChromeManagementClientFactory>;
@@ -37,8 +42,6 @@
// because this method is overriding another one from the parent class.
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(KidsChromeManagementClientFactory);
};
#endif // CHROME_BROWSER_SUPERVISED_USER_KIDS_CHROME_MANAGEMENT_KIDS_CHROME_MANAGEMENT_CLIENT_FACTORY_H_
diff --git a/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc b/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
index c0c27ec..370a44c 100644
--- a/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
+++ b/chrome/browser/supervised_user/kids_management_url_checker_client_unittest.cc
@@ -101,6 +101,12 @@
class KidsManagementURLCheckerClientTest : public testing::Test {
public:
KidsManagementURLCheckerClientTest() = default;
+
+ KidsManagementURLCheckerClientTest(
+ const KidsManagementURLCheckerClientTest&) = delete;
+ KidsManagementURLCheckerClientTest& operator=(
+ const KidsManagementURLCheckerClientTest&) = delete;
+
void SetUp() override {
test_profile_manager_ = std::make_unique<TestingProfileManager>(
TestingBrowserProcess::GetGlobal());
@@ -169,8 +175,6 @@
url, base::BindOnce(&KidsManagementURLCheckerClientTest::OnCheckDone,
base::Unretained(this)));
}
-
- DISALLOW_COPY_AND_ASSIGN(KidsManagementURLCheckerClientTest);
};
TEST_F(KidsManagementURLCheckerClientTest, Simple) {
diff --git a/chrome/browser/supervised_user/supervised_user_service_unittest.cc b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
index 3db8b9e..abc246b 100644
--- a/chrome/browser/supervised_user/supervised_user_service_unittest.cc
+++ b/chrome/browser/supervised_user/supervised_user_service_unittest.cc
@@ -54,6 +54,9 @@
// are balanced with Wait() calls.
class AsyncTestHelper {
public:
+ AsyncTestHelper(const AsyncTestHelper&) = delete;
+ AsyncTestHelper& operator=(const AsyncTestHelper&) = delete;
+
void Wait() {
run_loop_->Run();
Reset();
@@ -84,8 +87,6 @@
std::unique_ptr<base::RunLoop> run_loop_;
bool quit_called_;
-
- DISALLOW_COPY_AND_ASSIGN(AsyncTestHelper);
};
class SupervisedUserURLFilterObserver
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc b/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
index cc5bf0b..ab55b51 100644
--- a/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
+++ b/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
@@ -160,6 +160,9 @@
tab_strip_->AddObserver(this);
}
+ TabClosingObserver(const TabClosingObserver&) = delete;
+ TabClosingObserver& operator=(const TabClosingObserver&) = delete;
+
void WaitForContentsClosing() {
if (!contents_)
return;
@@ -194,8 +197,6 @@
// Contents to wait for.
content::WebContents* contents_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(TabClosingObserver);
};
// Navigates to a blocked URL.
diff --git a/chrome/browser/sync/bookmark_sync_service_factory.h b/chrome/browser/sync/bookmark_sync_service_factory.h
index 4a9e2ef..66368c6 100644
--- a/chrome/browser/sync/bookmark_sync_service_factory.h
+++ b/chrome/browser/sync/bookmark_sync_service_factory.h
@@ -24,6 +24,10 @@
// Returns an instance of the BookmarkSyncServiceFactory singleton.
static BookmarkSyncServiceFactory* GetInstance();
+ BookmarkSyncServiceFactory(const BookmarkSyncServiceFactory&) = delete;
+ BookmarkSyncServiceFactory& operator=(const BookmarkSyncServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<BookmarkSyncServiceFactory>;
@@ -35,8 +39,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkSyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_BOOKMARK_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/device_info_sync_service_factory.h b/chrome/browser/sync/device_info_sync_service_factory.h
index 32ae21f..8ba5cd9 100644
--- a/chrome/browser/sync/device_info_sync_service_factory.h
+++ b/chrome/browser/sync/device_info_sync_service_factory.h
@@ -27,6 +27,10 @@
static syncer::DeviceInfoSyncService* GetForProfile(Profile* profile);
static DeviceInfoSyncServiceFactory* GetInstance();
+ DeviceInfoSyncServiceFactory(const DeviceInfoSyncServiceFactory&) = delete;
+ DeviceInfoSyncServiceFactory& operator=(const DeviceInfoSyncServiceFactory&) =
+ delete;
+
// Iterates over all of the profiles that have been loaded so far, and
// extracts their tracker if present. If some profiles don't have trackers, no
// indication is given in the passed vector.
@@ -42,8 +46,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_DEVICE_INFO_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/model_type_store_service_factory.h b/chrome/browser/sync/model_type_store_service_factory.h
index 6e881f2..be181df 100644
--- a/chrome/browser/sync/model_type_store_service_factory.h
+++ b/chrome/browser/sync/model_type_store_service_factory.h
@@ -20,6 +20,10 @@
static syncer::ModelTypeStoreService* GetForProfile(Profile* profile);
static ModelTypeStoreServiceFactory* GetInstance();
+ ModelTypeStoreServiceFactory(const ModelTypeStoreServiceFactory&) = delete;
+ ModelTypeStoreServiceFactory& operator=(const ModelTypeStoreServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<ModelTypeStoreServiceFactory>;
@@ -31,8 +35,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(ModelTypeStoreServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_MODEL_TYPE_STORE_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/send_tab_to_self_sync_service_factory.h b/chrome/browser/sync/send_tab_to_self_sync_service_factory.h
index d0ab618..1b7bd3c 100644
--- a/chrome/browser/sync/send_tab_to_self_sync_service_factory.h
+++ b/chrome/browser/sync/send_tab_to_self_sync_service_factory.h
@@ -26,6 +26,11 @@
Profile* profile);
static SendTabToSelfSyncServiceFactory* GetInstance();
+ SendTabToSelfSyncServiceFactory(const SendTabToSelfSyncServiceFactory&) =
+ delete;
+ SendTabToSelfSyncServiceFactory& operator=(
+ const SendTabToSelfSyncServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SendTabToSelfSyncServiceFactory>;
@@ -35,8 +40,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SendTabToSelfSyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_SEND_TAB_TO_SELF_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/session_sync_service_factory.h b/chrome/browser/sync/session_sync_service_factory.h
index 68cdadb2..39c74920 100644
--- a/chrome/browser/sync/session_sync_service_factory.h
+++ b/chrome/browser/sync/session_sync_service_factory.h
@@ -25,6 +25,10 @@
static sync_sessions::SessionSyncService* GetForProfile(Profile* profile);
static SessionSyncServiceFactory* GetInstance();
+ SessionSyncServiceFactory(const SessionSyncServiceFactory&) = delete;
+ SessionSyncServiceFactory& operator=(const SessionSyncServiceFactory&) =
+ delete;
+
static bool ShouldSyncURLForTesting(const GURL& url);
private:
@@ -36,8 +40,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SessionSyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_SESSION_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/sessions/sync_sessions_web_contents_router.h b/chrome/browser/sync/sessions/sync_sessions_web_contents_router.h
index 94d5e20..c083e94 100644
--- a/chrome/browser/sync/sessions/sync_sessions_web_contents_router.h
+++ b/chrome/browser/sync/sessions/sync_sessions_web_contents_router.h
@@ -37,6 +37,10 @@
public:
explicit SyncSessionsWebContentsRouter(Profile* profile);
+ SyncSessionsWebContentsRouter(const SyncSessionsWebContentsRouter&) = delete;
+ SyncSessionsWebContentsRouter& operator=(
+ const SyncSessionsWebContentsRouter&) = delete;
+
// Notify the router that the tab corresponding to |web_contents| has been
// modified in some way.
void NotifyTabModified(content::WebContents* web_contents,
@@ -64,8 +68,6 @@
#if !defined(OS_ANDROID)
std::unique_ptr<BrowserListRouterHelper> browser_list_helper_;
#endif // !defined(OS_ANDROID)
-
- DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouter);
};
} // namespace sync_sessions
diff --git a/chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h b/chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h
index 8f8ec5d..a45f1b0 100644
--- a/chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h
+++ b/chrome/browser/sync/sessions/sync_sessions_web_contents_router_factory.h
@@ -29,6 +29,11 @@
// Get the singleton instance of the factory.
static SyncSessionsWebContentsRouterFactory* GetInstance();
+ SyncSessionsWebContentsRouterFactory(
+ const SyncSessionsWebContentsRouterFactory&) = delete;
+ SyncSessionsWebContentsRouterFactory& operator=(
+ const SyncSessionsWebContentsRouterFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<
SyncSessionsWebContentsRouterFactory>;
@@ -39,8 +44,6 @@
// Overridden from BrowserContextKeyedServiceFactory.
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouterFactory);
};
} // namespace sync_sessions
diff --git a/chrome/browser/sync/sessions/sync_sessions_web_contents_router_unittest.cc b/chrome/browser/sync/sessions/sync_sessions_web_contents_router_unittest.cc
index 5cecab8..8bd336b 100644
--- a/chrome/browser/sync/sessions/sync_sessions_web_contents_router_unittest.cc
+++ b/chrome/browser/sync/sessions/sync_sessions_web_contents_router_unittest.cc
@@ -28,6 +28,12 @@
class SyncSessionsWebContentsRouterTest
: public ChromeRenderViewHostTestHarness {
+ public:
+ SyncSessionsWebContentsRouterTest(const SyncSessionsWebContentsRouterTest&) =
+ delete;
+ SyncSessionsWebContentsRouterTest& operator=(
+ const SyncSessionsWebContentsRouterTest&) = delete;
+
protected:
SyncSessionsWebContentsRouterTest() = default;
~SyncSessionsWebContentsRouterTest() override = default;
@@ -43,8 +49,6 @@
private:
SyncSessionsWebContentsRouter* router_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncSessionsWebContentsRouterTest);
};
// Disabled on android due to complexity of creating a full TabAndroid object
diff --git a/chrome/browser/sync/sync_encryption_keys_tab_helper.cc b/chrome/browser/sync/sync_encryption_keys_tab_helper.cc
index dff58bd..d5122d4c 100644
--- a/chrome/browser/sync/sync_encryption_keys_tab_helper.cc
+++ b/chrome/browser/sync/sync_encryption_keys_tab_helper.cc
@@ -54,6 +54,9 @@
DCHECK(sync_service);
}
+ EncryptionKeyApi(const EncryptionKeyApi&) = delete;
+ EncryptionKeyApi& operator=(const EncryptionKeyApi&) = delete;
+
void BindReceiver(mojo::PendingAssociatedReceiver<
chrome::mojom::SyncEncryptionKeysExtension> receiver,
content::RenderFrameHost* rfh) {
@@ -103,8 +106,6 @@
content::RenderFrameHostReceiverSet<
chrome::mojom::SyncEncryptionKeysExtension>
receivers_;
-
- DISALLOW_COPY_AND_ASSIGN(EncryptionKeyApi);
};
// static
diff --git a/chrome/browser/sync/sync_encryption_keys_tab_helper_unittest.cc b/chrome/browser/sync/sync_encryption_keys_tab_helper_unittest.cc
index eabbbb9..52ed9c0 100644
--- a/chrome/browser/sync/sync_encryption_keys_tab_helper_unittest.cc
+++ b/chrome/browser/sync/sync_encryption_keys_tab_helper_unittest.cc
@@ -27,6 +27,12 @@
using testing::NotNull;
class SyncEncryptionKeysTabHelperTest : public ChromeRenderViewHostTestHarness {
+ public:
+ SyncEncryptionKeysTabHelperTest(const SyncEncryptionKeysTabHelperTest&) =
+ delete;
+ SyncEncryptionKeysTabHelperTest& operator=(
+ const SyncEncryptionKeysTabHelperTest&) = delete;
+
protected:
SyncEncryptionKeysTabHelperTest() = default;
@@ -54,9 +60,6 @@
{ChromeSigninClientFactory::GetInstance(),
base::BindRepeating(&signin::BuildTestSigninClient)}};
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SyncEncryptionKeysTabHelperTest);
};
TEST_F(SyncEncryptionKeysTabHelperTest, ShouldExposeMojoApiToAllowedOrigin) {
diff --git a/chrome/browser/sync/sync_error_notifier_factory_ash.h b/chrome/browser/sync/sync_error_notifier_factory_ash.h
index 995679e..501a8c5 100644
--- a/chrome/browser/sync/sync_error_notifier_factory_ash.h
+++ b/chrome/browser/sync/sync_error_notifier_factory_ash.h
@@ -24,6 +24,9 @@
// Returns an instance of the SyncErrorNotifierFactory singleton.
static SyncErrorNotifierFactory* GetInstance();
+ SyncErrorNotifierFactory(const SyncErrorNotifierFactory&) = delete;
+ SyncErrorNotifierFactory& operator=(const SyncErrorNotifierFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<SyncErrorNotifierFactory>;
@@ -33,8 +36,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
-
- DISALLOW_COPY_AND_ASSIGN(SyncErrorNotifierFactory);
};
#endif // CHROME_BROWSER_SYNC_SYNC_ERROR_NOTIFIER_FACTORY_ASH_H_
diff --git a/chrome/browser/sync/sync_service_factory.h b/chrome/browser/sync/sync_service_factory.h
index bcf02669..1c596899 100644
--- a/chrome/browser/sync/sync_service_factory.h
+++ b/chrome/browser/sync/sync_service_factory.h
@@ -32,6 +32,9 @@
static syncer::SyncServiceImpl* GetAsSyncServiceImplForProfile(
Profile* profile);
+ SyncServiceFactory(const SyncServiceFactory&) = delete;
+ SyncServiceFactory& operator=(const SyncServiceFactory&) = delete;
+
// Returns whether a SyncService has already been created for the profile.
// Note that GetForProfile will create the service if it doesn't exist yet.
static bool HasSyncService(Profile* profile);
@@ -62,8 +65,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(SyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync/test/integration/dictionary_helper.cc b/chrome/browser/sync/test/integration/dictionary_helper.cc
index 03a7cb2..cffff79e 100644
--- a/chrome/browser/sync/test/integration/dictionary_helper.cc
+++ b/chrome/browser/sync/test/integration/dictionary_helper.cc
@@ -22,6 +22,11 @@
class DictionarySyncIntegrationTestHelper {
public:
+ DictionarySyncIntegrationTestHelper(
+ const DictionarySyncIntegrationTestHelper&) = delete;
+ DictionarySyncIntegrationTestHelper& operator=(
+ const DictionarySyncIntegrationTestHelper&) = delete;
+
// Same as SpellcheckCustomDictionary::AddWord/RemoveWord, except does not
// write to disk.
static bool ApplyChange(SpellcheckCustomDictionary* dictionary,
@@ -32,9 +37,6 @@
dictionary->Sync(*change);
return !result;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DictionarySyncIntegrationTestHelper);
};
namespace dictionary_helper {
diff --git a/chrome/browser/sync/test/integration/local_sync_test.cc b/chrome/browser/sync/test/integration/local_sync_test.cc
index d8de780..38651c6b 100644
--- a/chrome/browser/sync/test/integration/local_sync_test.cc
+++ b/chrome/browser/sync/test/integration/local_sync_test.cc
@@ -44,6 +44,10 @@
// This test verifies some basic functionality of local sync, used for roaming
// profiles (enterprise use-case).
class LocalSyncTest : public InProcessBrowserTest {
+ public:
+ LocalSyncTest(const LocalSyncTest&) = delete;
+ LocalSyncTest& operator=(const LocalSyncTest&) = delete;
+
protected:
LocalSyncTest() {
EXPECT_TRUE(local_sync_backend_dir_.CreateUniqueTempDir());
@@ -66,7 +70,6 @@
private:
base::ScopedTempDir local_sync_backend_dir_;
- DISALLOW_COPY_AND_ASSIGN(LocalSyncTest);
};
// The local sync backend is currently only supported on Windows, Mac and Linux.
diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc
index 45c662e9..56de6571 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.cc
+++ b/chrome/browser/sync/test/integration/passwords_helper.cc
@@ -47,6 +47,10 @@
public:
PasswordStoreConsumerHelper() {}
+ PasswordStoreConsumerHelper(const PasswordStoreConsumerHelper&) = delete;
+ PasswordStoreConsumerHelper& operator=(const PasswordStoreConsumerHelper&) =
+ delete;
+
void OnGetPasswordStoreResults(
std::vector<std::unique_ptr<PasswordForm>> results) override {
result_.swap(results);
@@ -62,8 +66,6 @@
private:
base::RunLoop run_loop_;
std::vector<std::unique_ptr<PasswordForm>> result_;
-
- DISALLOW_COPY_AND_ASSIGN(PasswordStoreConsumerHelper);
};
sync_pb::EntitySpecifics EncryptPasswordSpecifics(
diff --git a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
index a458b9fb..2aeb697 100644
--- a/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/autofill_sync_perf_test.cc
@@ -74,6 +74,10 @@
AutofillProfileSyncPerfTest()
: SyncTest(TWO_CLIENT), guid_number_(0), name_number_(0) {}
+ AutofillProfileSyncPerfTest(const AutofillProfileSyncPerfTest&) = delete;
+ AutofillProfileSyncPerfTest& operator=(const AutofillProfileSyncPerfTest&) =
+ delete;
+
// Adds |num_profiles| new autofill profiles to the sync profile |profile|.
void AddProfiles(int profile, int num_profiles);
@@ -98,7 +102,6 @@
int guid_number_;
int name_number_;
- DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncPerfTest);
};
void AutofillProfileSyncPerfTest::AddProfiles(int profile, int num_profiles) {
@@ -176,6 +179,9 @@
public:
AutocompleteSyncPerfTest() : SyncTest(TWO_CLIENT), name_number_(0) {}
+ AutocompleteSyncPerfTest(const AutocompleteSyncPerfTest&) = delete;
+ AutocompleteSyncPerfTest& operator=(const AutocompleteSyncPerfTest&) = delete;
+
// Adds |num_keys| new autofill keys to the sync profile |profile|.
void AddKeys(int profile, int num_keys);
@@ -187,7 +193,6 @@
const std::string NextName();
int name_number_;
- DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncPerfTest);
};
void AutocompleteSyncPerfTest::AddKeys(int profile, int num_keys) {
diff --git a/chrome/browser/sync/test/integration/performance/bookmarks_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/bookmarks_sync_perf_test.cc
index 2ac6fc9..84a2ebff 100644
--- a/chrome/browser/sync/test/integration/performance/bookmarks_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/bookmarks_sync_perf_test.cc
@@ -43,6 +43,9 @@
public:
BookmarksSyncPerfTest() : SyncTest(TWO_CLIENT) {}
+ BookmarksSyncPerfTest(const BookmarksSyncPerfTest&) = delete;
+ BookmarksSyncPerfTest& operator=(const BookmarksSyncPerfTest&) = delete;
+
// Adds |num_urls| new unique bookmarks to the bookmark bar for |profile|.
void AddURLs(int profile, size_t num_urls);
@@ -64,7 +67,6 @@
size_t url_number_ = 0;
size_t url_title_number_ = 0;
- DISALLOW_COPY_AND_ASSIGN(BookmarksSyncPerfTest);
};
void BookmarksSyncPerfTest::AddURLs(int profile, size_t num_urls) {
diff --git a/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
index 4bff145f..26833849 100644
--- a/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/extensions_sync_perf_test.cc
@@ -48,6 +48,9 @@
public:
ExtensionsSyncPerfTest() : SyncTest(TWO_CLIENT), extension_number_(0) {}
+ ExtensionsSyncPerfTest(const ExtensionsSyncPerfTest&) = delete;
+ ExtensionsSyncPerfTest& operator=(const ExtensionsSyncPerfTest&) = delete;
+
// Adds |num_extensions| new unique extensions to |profile|.
void AddExtensions(int profile, int num_extensions);
@@ -62,7 +65,6 @@
private:
int extension_number_;
- DISALLOW_COPY_AND_ASSIGN(ExtensionsSyncPerfTest);
};
void ExtensionsSyncPerfTest::AddExtensions(int profile, int num_extensions) {
diff --git a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
index 08c5b79..1cb1473 100644
--- a/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/passwords_sync_perf_test.cc
@@ -41,6 +41,9 @@
public:
PasswordsSyncPerfTest() : SyncTest(TWO_CLIENT), password_number_(0) {}
+ PasswordsSyncPerfTest(const PasswordsSyncPerfTest&) = delete;
+ PasswordsSyncPerfTest& operator=(const PasswordsSyncPerfTest&) = delete;
+
// Adds |num_logins| new unique passwords to |profile|.
void AddLogins(int profile, int num_logins);
@@ -58,7 +61,6 @@
std::string NextPassword();
int password_number_;
- DISALLOW_COPY_AND_ASSIGN(PasswordsSyncPerfTest);
};
void PasswordsSyncPerfTest::AddLogins(int profile, int num_logins) {
diff --git a/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc
index 55629d5..a6dcb82e0 100644
--- a/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/sessions_sync_perf_test.cc
@@ -46,6 +46,9 @@
public:
SessionsSyncPerfTest() : SyncTest(TWO_CLIENT), url_number_(0) {}
+ SessionsSyncPerfTest(const SessionsSyncPerfTest&) = delete;
+ SessionsSyncPerfTest& operator=(const SessionsSyncPerfTest&) = delete;
+
// Opens |num_tabs| new tabs on |profile|.
void AddTabs(int profile, int num_tabs);
@@ -67,7 +70,6 @@
GURL IntToURL(int n);
int url_number_;
- DISALLOW_COPY_AND_ASSIGN(SessionsSyncPerfTest);
};
void SessionsSyncPerfTest::AddTabs(int profile, int num_tabs) {
diff --git a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
index 986d854..7ec5c31 100644
--- a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
@@ -51,6 +51,9 @@
public:
TypedUrlsSyncPerfTest() : SyncTest(TWO_CLIENT), url_number_(0) {}
+ TypedUrlsSyncPerfTest(const TypedUrlsSyncPerfTest&) = delete;
+ TypedUrlsSyncPerfTest& operator=(const TypedUrlsSyncPerfTest&) = delete;
+
// Adds |num_urls| new unique typed urls to |profile|.
void AddURLs(int profile, int num_urls);
@@ -71,7 +74,6 @@
GURL IntToURL(int n);
int url_number_;
- DISALLOW_COPY_AND_ASSIGN(TypedUrlsSyncPerfTest);
};
void TypedUrlsSyncPerfTest::AddURLs(int profile, int num_urls) {
diff --git a/chrome/browser/sync/test/integration/single_client_history_delete_directives_sync_test.cc b/chrome/browser/sync/test/integration/single_client_history_delete_directives_sync_test.cc
index bfa14d5..cb2899b2 100644
--- a/chrome/browser/sync/test/integration/single_client_history_delete_directives_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_history_delete_directives_sync_test.cc
@@ -43,6 +43,11 @@
fake_server_(fake_server),
num_expected_directives_(num_expected_directives) {}
+ HistoryDeleteDirectivesEqualityChecker(
+ const HistoryDeleteDirectivesEqualityChecker&) = delete;
+ HistoryDeleteDirectivesEqualityChecker& operator=(
+ const HistoryDeleteDirectivesEqualityChecker&) = delete;
+
bool IsExitConditionSatisfied(std::ostream* os) override {
*os << "Waiting server side HISTORY_DELETE_DIRECTIVES to match expected.";
const std::vector<sync_pb::SyncEntity> entities =
@@ -63,8 +68,6 @@
private:
fake_server::FakeServer* const fake_server_;
const size_t num_expected_directives_;
-
- DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesEqualityChecker);
};
class SingleClientHistoryDeleteDirectivesSyncTest : public SyncTest {
diff --git a/chrome/browser/sync/test/integration/single_client_sync_invalidations_test.cc b/chrome/browser/sync/test/integration/single_client_sync_invalidations_test.cc
index 2cd97a7..c87398c 100644
--- a/chrome/browser/sync/test/integration/single_client_sync_invalidations_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_sync_invalidations_test.cc
@@ -398,6 +398,14 @@
switches::kUseSyncInvalidationsForWalletAndOffer},
/*disabled_features=*/{});
}
+
+ SingleClientWithUseSyncInvalidationsForWalletAndOfferTest(
+ const SingleClientWithUseSyncInvalidationsForWalletAndOfferTest&) =
+ delete;
+ SingleClientWithUseSyncInvalidationsForWalletAndOfferTest& operator=(
+ const SingleClientWithUseSyncInvalidationsForWalletAndOfferTest&) =
+ delete;
+
~SingleClientWithUseSyncInvalidationsForWalletAndOfferTest() override =
default;
@@ -411,9 +419,6 @@
private:
base::test::ScopedFeatureList override_features_;
fake_server::EntityBuilderFactory entity_builder_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(
- SingleClientWithUseSyncInvalidationsForWalletAndOfferTest);
};
IN_PROC_BROWSER_TEST_F(
diff --git a/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc b/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc
index 33c1e97a..9ce59d2 100644
--- a/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc
@@ -44,6 +44,10 @@
}
}
+ UserConsentEqualityChecker(const UserConsentEqualityChecker&) = delete;
+ UserConsentEqualityChecker& operator=(const UserConsentEqualityChecker&) =
+ delete;
+
bool IsExitConditionSatisfied(std::ostream* os) override {
*os << "Waiting server side USER_CONSENTS to match expected.";
std::vector<SyncEntity> entities =
@@ -80,8 +84,6 @@
// int. The requires creating better expectations with a proper creation
// time.
std::multimap<int64_t, UserConsentSpecifics> expected_specifics_;
-
- DISALLOW_COPY_AND_ASSIGN(UserConsentEqualityChecker);
};
class SingleClientUserConsentsSyncTest : public SyncTest {
diff --git a/chrome/browser/sync/test/integration/sync_app_helper.h b/chrome/browser/sync/test/integration/sync_app_helper.h
index 2219d446..38a6d2c 100644
--- a/chrome/browser/sync/test/integration/sync_app_helper.h
+++ b/chrome/browser/sync/test/integration/sync_app_helper.h
@@ -19,6 +19,9 @@
// Singleton implementation.
static SyncAppHelper* GetInstance();
+ SyncAppHelper(const SyncAppHelper&) = delete;
+ SyncAppHelper& operator=(const SyncAppHelper&) = delete;
+
// Initializes the profiles in |test| and registers them with
// internal data structures.
void SetupIfNecessary(SyncTest* test);
@@ -59,8 +62,6 @@
~SyncAppHelper();
bool setup_completed_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncAppHelper);
};
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_HELPER_H_
diff --git a/chrome/browser/sync/test/integration/sync_app_list_helper.h b/chrome/browser/sync/test/integration/sync_app_list_helper.h
index 3fbf1a4..572e08d 100644
--- a/chrome/browser/sync/test/integration/sync_app_list_helper.h
+++ b/chrome/browser/sync/test/integration/sync_app_list_helper.h
@@ -22,6 +22,9 @@
// Singleton implementation.
static SyncAppListHelper* GetInstance();
+ SyncAppListHelper(const SyncAppListHelper&) = delete;
+ SyncAppListHelper& operator=(const SyncAppListHelper&) = delete;
+
// Initializes the profiles in |test| and registers them with
// internal data structures.
void SetupIfNecessary(SyncTest* test);
@@ -63,8 +66,6 @@
SyncTest* test_;
bool setup_completed_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncAppListHelper);
};
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_APP_LIST_HELPER_H_
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.h b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
index a7dc4d5..add8ccc 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.h
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.h
@@ -30,6 +30,9 @@
public:
static SyncArcPackageHelper* GetInstance();
+ SyncArcPackageHelper(const SyncArcPackageHelper&) = delete;
+ SyncArcPackageHelper& operator=(const SyncArcPackageHelper&) = delete;
+
static sync_pb::EntitySpecifics GetTestSpecifics(size_t id);
void SetupTest(SyncTest* test);
@@ -71,8 +74,6 @@
bool setup_completed_;
std::unordered_map<Profile*, std::unique_ptr<FakeAppInstance>> instance_map_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncArcPackageHelper);
};
} // namespace arc
diff --git a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
index c02a67c..7834806a 100644
--- a/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
+++ b/chrome/browser/sync/test/integration/sync_exponential_backoff_test.cc
@@ -50,6 +50,10 @@
retry_verifier_.Initialize(snap);
}
+ ExponentialBackoffChecker(const ExponentialBackoffChecker&) = delete;
+ ExponentialBackoffChecker& operator=(const ExponentialBackoffChecker&) =
+ delete;
+
// Checks if backoff is complete. Called repeatedly each time SyncServiceImpl
// notifies observers of a state change.
bool IsExitConditionSatisfied(std::ostream* os) override {
@@ -66,8 +70,6 @@
// Keeps track of the number of attempts at exponential backoff and its
// related bookkeeping information for verification.
RetryVerifier retry_verifier_;
-
- DISALLOW_COPY_AND_ASSIGN(ExponentialBackoffChecker);
};
// Flaky on ChromeOS, crbug.com/1170609
diff --git a/chrome/browser/sync/test/integration/sync_extension_helper.h b/chrome/browser/sync/test/integration/sync_extension_helper.h
index f9b29bbe..20e9ace4 100644
--- a/chrome/browser/sync/test/integration/sync_extension_helper.h
+++ b/chrome/browser/sync/test/integration/sync_extension_helper.h
@@ -27,6 +27,9 @@
// Singleton implementation.
static SyncExtensionHelper* GetInstance();
+ SyncExtensionHelper(const SyncExtensionHelper&) = delete;
+ SyncExtensionHelper& operator=(const SyncExtensionHelper&) = delete;
+
// Initializes the profiles in |test| and registers them with
// internal data structures.
void SetupIfNecessary(SyncTest* test);
@@ -126,8 +129,6 @@
StringMap id_to_name_;
TypeMap id_to_type_;
bool setup_completed_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncExtensionHelper);
};
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_EXTENSION_HELPER_H_
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index f739b795..0fb19c3 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -190,6 +190,9 @@
// A SyncTest must be associated with a particular test type.
explicit SyncTest(TestType test_type);
+ SyncTest(const SyncTest&) = delete;
+ SyncTest& operator=(const SyncTest&) = delete;
+
~SyncTest() override;
void SetUp() override;
@@ -556,8 +559,6 @@
std::vector<syncer::FCMHandler*> sync_invalidations_fcm_handlers_;
std::unique_ptr<fake_server::FakeServerSyncInvalidationSender>
fake_server_sync_invalidation_sender_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncTest);
};
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
diff --git a/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc b/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
index 9de6e2d..a1fa543c 100644
--- a/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
@@ -70,13 +70,15 @@
}
}
+ TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest(
+ const TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest&) = delete;
+ TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest& operator=(
+ const TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest&) = delete;
+
~TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest() override = default;
private:
base::test::ScopedFeatureList override_features_;
-
- DISALLOW_COPY_AND_ASSIGN(
- TwoClientCustomPassphraseSyncTestScryptEnabledInPreTest);
};
IN_PROC_BROWSER_TEST_F(TwoClientCustomPassphraseSyncTest,
@@ -163,12 +165,18 @@
TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled()
: toggler_(/*force_disabled=*/false,
/*use_for_new_passphrases=*/false) {}
+
+ TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled(
+ const TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled&) =
+ delete;
+ TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled& operator=(
+ const TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled&) =
+ delete;
+
~TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled() override {}
private:
ScopedScryptFeatureToggler toggler_;
- DISALLOW_COPY_AND_ASSIGN(
- TwoClientCustomPassphraseSyncTestWithScryptEncryptionNotEnabled);
};
IN_PROC_BROWSER_TEST_F(
@@ -201,12 +209,18 @@
TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled()
: toggler_(/*force_disabled=*/false,
/*use_for_new_passphrases=*/true) {}
+
+ TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled(
+ const TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled&) =
+ delete;
+ TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled& operator=(
+ const TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled&) =
+ delete;
+
~TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled() override {}
private:
ScopedScryptFeatureToggler toggler_;
- DISALLOW_COPY_AND_ASSIGN(
- TwoClientCustomPassphraseSyncTestWithScryptEncryptionEnabled);
};
IN_PROC_BROWSER_TEST_F(
diff --git a/chrome/browser/sync/user_event_service_factory.h b/chrome/browser/sync/user_event_service_factory.h
index 26d2b444..f490e7be 100644
--- a/chrome/browser/sync/user_event_service_factory.h
+++ b/chrome/browser/sync/user_event_service_factory.h
@@ -22,6 +22,9 @@
static syncer::UserEventService* GetForProfile(Profile* profile);
static UserEventServiceFactory* GetInstance();
+ UserEventServiceFactory(const UserEventServiceFactory&) = delete;
+ UserEventServiceFactory& operator=(const UserEventServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<UserEventServiceFactory>;
@@ -33,8 +36,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(UserEventServiceFactory);
};
} // namespace browser_sync
diff --git a/chrome/browser/sync/wifi_configuration_sync_service_factory.h b/chrome/browser/sync/wifi_configuration_sync_service_factory.h
index 7933a98..8a6e5af 100644
--- a/chrome/browser/sync/wifi_configuration_sync_service_factory.h
+++ b/chrome/browser/sync/wifi_configuration_sync_service_factory.h
@@ -28,6 +28,12 @@
Profile* profile,
bool create);
static WifiConfigurationSyncServiceFactory* GetInstance();
+
+ WifiConfigurationSyncServiceFactory(
+ const WifiConfigurationSyncServiceFactory&) = delete;
+ WifiConfigurationSyncServiceFactory& operator=(
+ const WifiConfigurationSyncServiceFactory&) = delete;
+
static bool ShouldRunInProfile(const Profile* profile);
private:
@@ -42,8 +48,6 @@
content::BrowserContext* context) const override;
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
-
- DISALLOW_COPY_AND_ASSIGN(WifiConfigurationSyncServiceFactory);
};
#endif // CHROME_BROWSER_SYNC_WIFI_CONFIGURATION_SYNC_SERVICE_FACTORY_H_
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h b/chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h
index e7c3a65..871431b 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_service_wrapper.h
@@ -25,6 +25,9 @@
public:
explicit DriveServiceWrapper(drive::DriveServiceInterface* drive_service);
+ DriveServiceWrapper(const DriveServiceWrapper&) = delete;
+ DriveServiceWrapper& operator=(const DriveServiceWrapper&) = delete;
+
void AddNewDirectory(const std::string& parent_resource_id,
const std::string& directory_title,
const drive::AddNewDirectoryOptions& options,
@@ -79,8 +82,6 @@
private:
drive::DriveServiceInterface* drive_service_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(DriveServiceWrapper);
};
} // namespace drive_backend
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h b/chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h
index c024cbf..a490dd5 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h
+++ b/chrome/browser/sync_file_system/drive_backend/drive_uploader_wrapper.h
@@ -22,6 +22,9 @@
public:
explicit DriveUploaderWrapper(drive::DriveUploaderInterface* drive_uploader);
+ DriveUploaderWrapper(const DriveUploaderWrapper&) = delete;
+ DriveUploaderWrapper& operator=(const DriveUploaderWrapper&) = delete;
+
void UploadExistingFile(const std::string& resource_id,
const base::FilePath& local_file_path,
const std::string& content_type,
@@ -38,8 +41,6 @@
private:
drive::DriveUploaderInterface* drive_uploader_;
base::SequenceChecker sequence_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveUploaderWrapper);
};
} // namespace drive_backend
diff --git a/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h b/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h
index 27568b2..cf0e5800 100644
--- a/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h
+++ b/chrome/browser/sync_file_system/drive_backend/leveldb_wrapper.h
@@ -76,6 +76,10 @@
};
explicit LevelDBWrapper(std::unique_ptr<leveldb::DB> db);
+
+ LevelDBWrapper(const LevelDBWrapper&) = delete;
+ LevelDBWrapper& operator=(const LevelDBWrapper&) = delete;
+
~LevelDBWrapper();
// Wrapping methods of leveldb::WriteBatch
@@ -110,8 +114,6 @@
PendingOperationMap pending_;
int64_t num_puts_;
int64_t num_deletes_;
-
- DISALLOW_COPY_AND_ASSIGN(LevelDBWrapper);
};
} // namespace drive_backend
diff --git a/chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h b/chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h
index 28533ae..e9675cc 100644
--- a/chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h
+++ b/chrome/browser/sync_file_system/drive_backend/remote_change_processor_wrapper.h
@@ -23,6 +23,10 @@
explicit RemoteChangeProcessorWrapper(
RemoteChangeProcessor* remote_change_processor);
+ RemoteChangeProcessorWrapper(const RemoteChangeProcessorWrapper&) = delete;
+ RemoteChangeProcessorWrapper& operator=(const RemoteChangeProcessorWrapper&) =
+ delete;
+
void PrepareForProcessRemoteChange(
const storage::FileSystemURL& url,
RemoteChangeProcessor::PrepareChangeCallback callback);
@@ -43,8 +47,6 @@
private:
RemoteChangeProcessor* remote_change_processor_;
base::SequenceChecker sequence_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(RemoteChangeProcessorWrapper);
};
} // namespace drive_backend
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h b/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
index c664984..6aa88f8 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
+++ b/chrome/browser/sync_file_system/drive_backend/sync_worker_interface.h
@@ -54,6 +54,10 @@
};
SyncWorkerInterface() {}
+
+ SyncWorkerInterface(const SyncWorkerInterface&) = delete;
+ SyncWorkerInterface& operator=(const SyncWorkerInterface&) = delete;
+
virtual ~SyncWorkerInterface() {}
// Initializes SyncWorkerInterface after constructions of some member classes.
@@ -98,8 +102,6 @@
private:
friend class SyncEngineTest;
-
- DISALLOW_COPY_AND_ASSIGN(SyncWorkerInterface);
};
} // namespace drive_backend
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
index e525e7a..108f6d99 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker.cc
@@ -45,6 +45,9 @@
TrackerDB(const base::FilePath& base_path,
leveldb::Env* env_override);
+ TrackerDB(const TrackerDB&) = delete;
+ TrackerDB& operator=(const TrackerDB&) = delete;
+
SyncStatusCode MarkDirty(const std::string& url);
SyncStatusCode ClearDirty(const std::string& url);
SyncStatusCode GetDirtyEntries(base::queue<FileSystemURL>* dirty_files);
@@ -65,8 +68,6 @@
leveldb::Env* env_override_;
std::unique_ptr<leveldb::DB> db_;
SyncStatusCode db_status_;
-
- DISALLOW_COPY_AND_ASSIGN(TrackerDB);
};
LocalFileChangeTracker::ChangeInfo::ChangeInfo() : change_seq(-1) {}
diff --git a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
index 1241e71..d092d62 100644
--- a/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
+++ b/chrome/browser/sync_file_system/local/local_file_change_tracker_unittest.cc
@@ -47,6 +47,10 @@
base::ThreadTaskRunnerHandle::Get().get(),
base::ThreadTaskRunnerHandle::Get().get()) {}
+ LocalFileChangeTrackerTest(const LocalFileChangeTrackerTest&) = delete;
+ LocalFileChangeTrackerTest& operator=(const LocalFileChangeTrackerTest&) =
+ delete;
+
void SetUp() override {
file_system_.SetUp(CannedSyncableFileSystem::QUOTA_ENABLED);
@@ -121,8 +125,6 @@
private:
scoped_refptr<LocalFileSyncContext> sync_context_;
-
- DISALLOW_COPY_AND_ASSIGN(LocalFileChangeTrackerTest);
};
TEST_F(LocalFileChangeTrackerTest, DemoteAndPromote) {
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_context.h b/chrome/browser/sync_file_system/local/local_file_sync_context.h
index c3db0d2..0efa14ca 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_context.h
+++ b/chrome/browser/sync_file_system/local/local_file_sync_context.h
@@ -79,6 +79,9 @@
base::SingleThreadTaskRunner* ui_task_runner,
base::SingleThreadTaskRunner* io_task_runner);
+ LocalFileSyncContext(const LocalFileSyncContext&) = delete;
+ LocalFileSyncContext& operator=(const LocalFileSyncContext&) = delete;
+
// Initializes |file_system_context| for syncable file operations
// and registers the it into the internal map.
// Calling this multiple times for the same file_system_context is valid.
@@ -369,8 +372,6 @@
origin_change_observers_;
int mock_notify_changes_duration_in_sec_;
-
- DISALLOW_COPY_AND_ASSIGN(LocalFileSyncContext);
};
} // namespace sync_file_system
diff --git a/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h b/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
index be447a3..2c4bcc7 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
+++ b/chrome/browser/sync_file_system/local/syncable_file_operation_runner.h
@@ -55,6 +55,11 @@
SyncableFileOperationRunner(int64_t max_inflight_tasks,
LocalFileSyncStatus* sync_status);
+
+ SyncableFileOperationRunner(const SyncableFileOperationRunner&) = delete;
+ SyncableFileOperationRunner& operator=(const SyncableFileOperationRunner&) =
+ delete;
+
~SyncableFileOperationRunner() override;
// LocalFileSyncStatus::Observer overrides.
@@ -96,8 +101,6 @@
const int64_t max_inflight_tasks_;
int64_t num_inflight_tasks_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncableFileOperationRunner);
};
} // namespace sync_file_system
diff --git a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
index 18907e6..7628616 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_operation_runner_unittest.cc
@@ -68,6 +68,11 @@
write_bytes_(0),
write_complete_(false) {}
+ SyncableFileOperationRunnerTest(const SyncableFileOperationRunnerTest&) =
+ delete;
+ SyncableFileOperationRunnerTest& operator=(
+ const SyncableFileOperationRunnerTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
@@ -161,8 +166,6 @@
private:
base::WeakPtrFactory<SyncableFileOperationRunnerTest> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SyncableFileOperationRunnerTest);
};
TEST_F(SyncableFileOperationRunnerTest, SimpleQueue) {
diff --git a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
index cfef1b2..cff6398 100644
--- a/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
+++ b/chrome/browser/sync_file_system/local/syncable_file_system_unittest.cc
@@ -41,6 +41,9 @@
base::ThreadTaskRunnerHandle::Get().get(),
base::ThreadTaskRunnerHandle::Get().get()) {}
+ SyncableFileSystemTest(const SyncableFileSystemTest&) = delete;
+ SyncableFileSystemTest& operator=(const SyncableFileSystemTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(data_dir_.CreateUniqueTempDir());
file_system_.SetUp(CannedSyncableFileSystem::QUOTA_ENABLED);
@@ -105,8 +108,6 @@
scoped_refptr<LocalFileSyncContext> sync_context_;
base::WeakPtrFactory<SyncableFileSystemTest> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SyncableFileSystemTest);
};
// Brief combined testing. Just see if all the sandbox feature works.
diff --git a/chrome/browser/sync_file_system/logger_unittest.cc b/chrome/browser/sync_file_system/logger_unittest.cc
index a8fc3b97..f9f4134 100644
--- a/chrome/browser/sync_file_system/logger_unittest.cc
+++ b/chrome/browser/sync_file_system/logger_unittest.cc
@@ -30,12 +30,12 @@
public:
LoggerTest() {}
+ LoggerTest(const LoggerTest&) = delete;
+ LoggerTest& operator=(const LoggerTest&) = delete;
+
void SetUp() override {
util::ClearLog();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(LoggerTest);
};
TEST_F(LoggerTest, GetLogHistory) {
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc
index 65393ea..421feee 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -158,6 +158,9 @@
nullptr, /* timer_helper */
1 /* max_parallel_task */) {}
+ LocalSyncRunner(const LocalSyncRunner&) = delete;
+ LocalSyncRunner& operator=(const LocalSyncRunner&) = delete;
+
void StartSync(SyncStatusCallback callback) override {
GetSyncService()->local_service_->ProcessLocalChange(
base::BindOnce(&LocalSyncRunner::DidProcessLocalChange,
@@ -186,7 +189,6 @@
}
base::WeakPtrFactory<LocalSyncRunner> factory_{this};
- DISALLOW_COPY_AND_ASSIGN(LocalSyncRunner);
};
// SyncProcessRunner implementation for RemoteSync.
@@ -203,6 +205,9 @@
remote_service_(remote_service),
last_state_(REMOTE_SERVICE_OK) {}
+ RemoteSyncRunner(const RemoteSyncRunner&) = delete;
+ RemoteSyncRunner& operator=(const RemoteSyncRunner&) = delete;
+
void StartSync(SyncStatusCallback callback) override {
remote_service_->ProcessRemoteChange(
base::BindOnce(&RemoteSyncRunner::DidProcessRemoteChange,
@@ -250,7 +255,6 @@
RemoteFileSyncService* remote_service_;
RemoteServiceState last_state_;
base::WeakPtrFactory<RemoteSyncRunner> factory_{this};
- DISALLOW_COPY_AND_ASSIGN(RemoteSyncRunner);
};
//-----------------------------------------------------------------------------
diff --git a/chrome/browser/sync_file_system/sync_file_system_service.h b/chrome/browser/sync_file_system/sync_file_system_service.h
index deea939..29b894f 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.h
+++ b/chrome/browser/sync_file_system/sync_file_system_service.h
@@ -55,6 +55,9 @@
using ExtensionStatusMapCallback =
base::OnceCallback<void(const RemoteFileSyncService::OriginStatusMap&)>;
+ SyncFileSystemService(const SyncFileSystemService&) = delete;
+ SyncFileSystemService& operator=(const SyncFileSystemService&) = delete;
+
// KeyedService implementation.
void Shutdown() override;
@@ -182,8 +185,6 @@
bool promoting_demoted_changes_;
base::OnceClosure idle_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncFileSystemService);
};
} // namespace sync_file_system
diff --git a/chrome/browser/sync_file_system/sync_process_runner.h b/chrome/browser/sync_file_system/sync_process_runner.h
index 0639aaf..2aec14d48 100644
--- a/chrome/browser/sync_file_system/sync_process_runner.h
+++ b/chrome/browser/sync_file_system/sync_process_runner.h
@@ -72,6 +72,10 @@
Client* client,
std::unique_ptr<TimerHelper> timer_helper,
size_t max_parallel_task);
+
+ SyncProcessRunner(const SyncProcessRunner&) = delete;
+ SyncProcessRunner& operator=(const SyncProcessRunner&) = delete;
+
virtual ~SyncProcessRunner();
// Subclass must implement this.
@@ -119,8 +123,6 @@
int64_t pending_changes_;
base::WeakPtrFactory<SyncProcessRunner> factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SyncProcessRunner);
};
} // namespace sync_file_system
diff --git a/chrome/browser/sync_file_system/task_logger.h b/chrome/browser/sync_file_system/task_logger.h
index e16e8ed..2498243 100644
--- a/chrome/browser/sync_file_system/task_logger.h
+++ b/chrome/browser/sync_file_system/task_logger.h
@@ -35,17 +35,21 @@
class Observer {
public:
+ Observer(const Observer&) = delete;
+ Observer& operator=(const Observer&) = delete;
+
virtual void OnLogRecorded(const TaskLog& task_log) = 0;
protected:
Observer() {}
virtual ~Observer() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Observer);
};
TaskLogger();
+
+ TaskLogger(const TaskLogger&) = delete;
+ TaskLogger& operator=(const TaskLogger&) = delete;
+
~TaskLogger();
void RecordLog(std::unique_ptr<TaskLog> log);
@@ -60,8 +64,6 @@
LogList log_history_;
base::ObserverList<Observer>::Unchecked observers_;
-
- DISALLOW_COPY_AND_ASSIGN(TaskLogger);
};
} // namespace sync_file_system
diff --git a/chrome/browser/tab_contents/view_source_browsertest.cc b/chrome/browser/tab_contents/view_source_browsertest.cc
index 81ccdab5..1c9cb85 100644
--- a/chrome/browser/tab_contents/view_source_browsertest.cc
+++ b/chrome/browser/tab_contents/view_source_browsertest.cc
@@ -54,20 +54,25 @@
public:
ViewSourceTest() {}
+ ViewSourceTest(const ViewSourceTest&) = delete;
+ ViewSourceTest& operator=(const ViewSourceTest&) = delete;
+
protected:
void SetUpOnMainThread() override {
InProcessBrowserTest::SetUpOnMainThread();
host_resolver()->AddRule("*", "127.0.0.1");
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ViewSourceTest);
};
class ViewSourcePermissionsPolicyTest : public ViewSourceTest {
public:
ViewSourcePermissionsPolicyTest() : ViewSourceTest() {}
+ ViewSourcePermissionsPolicyTest(const ViewSourcePermissionsPolicyTest&) =
+ delete;
+ ViewSourcePermissionsPolicyTest& operator=(
+ const ViewSourcePermissionsPolicyTest&) = delete;
+
protected:
void SetUpOnMainThread() override {
InProcessBrowserTest::SetUpOnMainThread();
@@ -78,9 +83,6 @@
command_line->AppendSwitch(
switches::kEnableExperimentalWebPlatformFeatures);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ViewSourcePermissionsPolicyTest);
};
// This test renders a page in view-source and then checks to see if the title
diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h
index 66f4f9c8..42218e9 100644
--- a/chrome/browser/themes/browser_theme_pack.h
+++ b/chrome/browser/themes/browser_theme_pack.h
@@ -87,6 +87,9 @@
// Default. Everything is empty.
explicit BrowserThemePack(ThemeType theme_type);
+ BrowserThemePack(const BrowserThemePack&) = delete;
+ BrowserThemePack& operator=(const BrowserThemePack&) = delete;
+
bool is_valid() const { return is_valid_; }
// Builds a data pack on disk at |path| for future quick loading by
@@ -355,8 +358,6 @@
// Whether the theme pack has been succesfully initialized and is ready to
// use.
bool is_valid_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BrowserThemePack);
};
#endif // CHROME_BROWSER_THEMES_BROWSER_THEME_PACK_H_
diff --git a/chrome/browser/themes/custom_theme_supplier.h b/chrome/browser/themes/custom_theme_supplier.h
index c7bb84ed3..4d076f8 100644
--- a/chrome/browser/themes/custom_theme_supplier.h
+++ b/chrome/browser/themes/custom_theme_supplier.h
@@ -37,6 +37,9 @@
explicit CustomThemeSupplier(ThemeType type);
+ CustomThemeSupplier(const CustomThemeSupplier&) = delete;
+ CustomThemeSupplier& operator=(const CustomThemeSupplier&) = delete;
+
ThemeType get_theme_type() const {
return theme_type_;
}
@@ -91,8 +94,6 @@
ThemeType theme_type_;
std::string extension_id_;
-
- DISALLOW_COPY_AND_ASSIGN(CustomThemeSupplier);
};
#endif // CHROME_BROWSER_THEMES_CUSTOM_THEME_SUPPLIER_H_
diff --git a/chrome/browser/themes/increased_contrast_theme_supplier.h b/chrome/browser/themes/increased_contrast_theme_supplier.h
index 975d018f..39497c3 100644
--- a/chrome/browser/themes/increased_contrast_theme_supplier.h
+++ b/chrome/browser/themes/increased_contrast_theme_supplier.h
@@ -20,6 +20,11 @@
public:
explicit IncreasedContrastThemeSupplier(ui::NativeTheme* theme);
+ IncreasedContrastThemeSupplier(const IncreasedContrastThemeSupplier&) =
+ delete;
+ IncreasedContrastThemeSupplier& operator=(
+ const IncreasedContrastThemeSupplier&) = delete;
+
bool GetColor(int id, SkColor* color) const override;
bool CanUseIncognitoColors() const override;
@@ -31,8 +36,6 @@
ui::NativeTheme* native_theme_;
bool is_dark_mode_;
-
- DISALLOW_COPY_AND_ASSIGN(IncreasedContrastThemeSupplier);
};
#endif // CHROME_BROWSER_THEMES_INCREASED_CONTRAST_THEME_SUPPLIER_H_
diff --git a/chrome/browser/themes/theme_properties.h b/chrome/browser/themes/theme_properties.h
index f048066..e2d1882 100644
--- a/chrome/browser/themes/theme_properties.h
+++ b/chrome/browser/themes/theme_properties.h
@@ -247,6 +247,10 @@
// than this).
static constexpr int kFrameHeightAboveTabs = 16;
+ ThemeProperties() = delete;
+ ThemeProperties(const ThemeProperties&) = delete;
+ ThemeProperties& operator=(const ThemeProperties&) = delete;
+
// Used by the browser theme pack to parse alignments from something like
// "top left" into a bitmask of Alignment.
static int StringToAlignment(const std::string& alignment);
@@ -274,9 +278,6 @@
static SkColor GetDefaultColor(int id,
bool incognito,
bool dark_mode = false);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ThemeProperties);
};
#endif // CHROME_BROWSER_THEMES_THEME_PROPERTIES_H_
diff --git a/chrome/browser/themes/theme_service_aura_linux.cc b/chrome/browser/themes/theme_service_aura_linux.cc
index ab1788d..20c31db 100644
--- a/chrome/browser/themes/theme_service_aura_linux.cc
+++ b/chrome/browser/themes/theme_service_aura_linux.cc
@@ -20,6 +20,9 @@
public:
explicit SystemThemeX11(PrefService* pref_service);
+ SystemThemeX11(const SystemThemeX11&) = delete;
+ SystemThemeX11& operator=(const SystemThemeX11&) = delete;
+
// Overridden from CustomThemeSupplier:
void StartUsingTheme() override;
void StopUsingTheme() override;
@@ -35,8 +38,6 @@
// These pointers are not owned by us.
views::LinuxUI* const linux_ui_;
PrefService* const pref_service_;
-
- DISALLOW_COPY_AND_ASSIGN(SystemThemeX11);
};
SystemThemeX11::SystemThemeX11(PrefService* pref_service)
diff --git a/chrome/browser/themes/theme_service_factory.h b/chrome/browser/themes/theme_service_factory.h
index bbe8738..83032578 100644
--- a/chrome/browser/themes/theme_service_factory.h
+++ b/chrome/browser/themes/theme_service_factory.h
@@ -33,6 +33,9 @@
static ThemeServiceFactory* GetInstance();
+ ThemeServiceFactory(const ThemeServiceFactory&) = delete;
+ ThemeServiceFactory& operator=(const ThemeServiceFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<ThemeServiceFactory>;
@@ -47,8 +50,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
bool ServiceIsCreatedWithBrowserContext() const override;
-
- DISALLOW_COPY_AND_ASSIGN(ThemeServiceFactory);
};
#endif // CHROME_BROWSER_THEMES_THEME_SERVICE_FACTORY_H_
diff --git a/chrome/browser/thumbnail/cc/scoped_ptr_expiring_cache_unittest.cc b/chrome/browser/thumbnail/cc/scoped_ptr_expiring_cache_unittest.cc
index d2a3b5c..ce30820e0 100644
--- a/chrome/browser/thumbnail/cc/scoped_ptr_expiring_cache_unittest.cc
+++ b/chrome/browser/thumbnail/cc/scoped_ptr_expiring_cache_unittest.cc
@@ -30,13 +30,14 @@
return base::WrapUnique(new MockObject(key));
}
+ MockObject(const MockObject&) = delete;
+ MockObject& operator=(const MockObject&) = delete;
+
unsigned int value() const { return value_; }
private:
explicit MockObject(unsigned int key) : value_(GenerateValue(key)) {}
unsigned int value_;
-
- DISALLOW_COPY_AND_ASSIGN(MockObject);
};
} // namespace
diff --git a/chrome/browser/thumbnail/generator/android/thumbnail_generator.h b/chrome/browser/thumbnail/generator/android/thumbnail_generator.h
index 0978ac1..8ae7c5eb 100644
--- a/chrome/browser/thumbnail/generator/android/thumbnail_generator.h
+++ b/chrome/browser/thumbnail/generator/android/thumbnail_generator.h
@@ -25,6 +25,9 @@
// delete itself when it has completed.
void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& jobj);
+ ThumbnailGenerator(const ThumbnailGenerator&) = delete;
+ ThumbnailGenerator& operator=(const ThumbnailGenerator&) = delete;
+
// Kicks off an asynchronous process to retrieve the thumbnail for the file
// located at |file_path| with a max size of |icon_size| in each dimension.
// Invokes the Java #onthumbnailRetrieved(String, int, Bitmap, boolean) method
@@ -60,8 +63,6 @@
// This is a {@link ThumbnailGenerator} Java object.
base::android::ScopedJavaGlobalRef<jobject> java_delegate_;
base::WeakPtrFactory<ThumbnailGenerator> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ThumbnailGenerator);
};
#endif // CHROME_BROWSER_THUMBNAIL_GENERATOR_ANDROID_THUMBNAIL_GENERATOR_H_
diff --git a/chrome/browser/transition_manager/full_browser_transition_manager.h b/chrome/browser/transition_manager/full_browser_transition_manager.h
index 8e10624..8bef67dd 100644
--- a/chrome/browser/transition_manager/full_browser_transition_manager.h
+++ b/chrome/browser/transition_manager/full_browser_transition_manager.h
@@ -28,6 +28,10 @@
// Return the singleton instance of the class
static FullBrowserTransitionManager* Get();
+ FullBrowserTransitionManager(const FullBrowserTransitionManager&) = delete;
+ FullBrowserTransitionManager& operator=(const FullBrowserTransitionManager&) =
+ delete;
+
// Register a |callback| to be called on profile creation. If a profile
// matching the |key| has already been created (i.e. full browser has been
// loaded), the |callback| is run immediately and this method returns true.
@@ -51,7 +55,6 @@
std::map<SimpleFactoryKey*, std::vector<OnProfileCreationCallback>>
on_profile_creation_callbacks_;
SEQUENCE_CHECKER(sequence_checker_);
- DISALLOW_COPY_AND_ASSIGN(FullBrowserTransitionManager);
};
#endif // CHROME_BROWSER_TRANSITION_MANAGER_FULL_BROWSER_TRANSITION_MANAGER_H_
diff --git a/chrome/browser/translate/translate_accept_languages_factory.h b/chrome/browser/translate/translate_accept_languages_factory.h
index 65adcf1..e67f197b 100644
--- a/chrome/browser/translate/translate_accept_languages_factory.h
+++ b/chrome/browser/translate/translate_accept_languages_factory.h
@@ -22,6 +22,11 @@
content::BrowserContext* browser_context);
static TranslateAcceptLanguagesFactory* GetInstance();
+ TranslateAcceptLanguagesFactory(const TranslateAcceptLanguagesFactory&) =
+ delete;
+ TranslateAcceptLanguagesFactory& operator=(
+ const TranslateAcceptLanguagesFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TranslateAcceptLanguagesFactory>;
@@ -33,8 +38,6 @@
content::BrowserContext* profile) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(TranslateAcceptLanguagesFactory);
};
#endif // CHROME_BROWSER_TRANSLATE_TRANSLATE_ACCEPT_LANGUAGES_FACTORY_H_
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index cff6538..6ab5f0b 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -1353,6 +1353,12 @@
class TranslateManagerWithSubFrameSupportBrowserTest
: public TranslateManagerBrowserTest {
+ public:
+ TranslateManagerWithSubFrameSupportBrowserTest(
+ const TranslateManagerWithSubFrameSupportBrowserTest&) = delete;
+ TranslateManagerWithSubFrameSupportBrowserTest& operator=(
+ const TranslateManagerWithSubFrameSupportBrowserTest&) = delete;
+
protected:
TranslateManagerWithSubFrameSupportBrowserTest() {
scoped_feature_list_.InitAndEnableFeature(translate::kTranslateSubFrames);
@@ -1360,8 +1366,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(TranslateManagerWithSubFrameSupportBrowserTest);
};
// Tests that the CLD (Compact Language Detection) works properly.
@@ -2115,6 +2119,14 @@
class TranslateManagerWithMainFrameLanguageDetectionBrowserTest
: public TranslateManagerBrowserTest {
+ public:
+ TranslateManagerWithMainFrameLanguageDetectionBrowserTest(
+ const TranslateManagerWithMainFrameLanguageDetectionBrowserTest&) =
+ delete;
+ TranslateManagerWithMainFrameLanguageDetectionBrowserTest& operator=(
+ const TranslateManagerWithMainFrameLanguageDetectionBrowserTest&) =
+ delete;
+
protected:
TranslateManagerWithMainFrameLanguageDetectionBrowserTest() {
// Enable sub frame translation but with sub frame language
@@ -2126,9 +2138,6 @@
private:
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(
- TranslateManagerWithMainFrameLanguageDetectionBrowserTest);
};
// Test that iframes can be translated.
diff --git a/chrome/browser/translate/translate_manager_render_view_host_android_unittest.cc b/chrome/browser/translate/translate_manager_render_view_host_android_unittest.cc
index c9c3df6..4b60c36 100644
--- a/chrome/browser/translate/translate_manager_render_view_host_android_unittest.cc
+++ b/chrome/browser/translate/translate_manager_render_view_host_android_unittest.cc
@@ -42,6 +42,11 @@
public:
TranslateManagerRenderViewHostAndroidTest() {}
+ TranslateManagerRenderViewHostAndroidTest(
+ const TranslateManagerRenderViewHostAndroidTest&) = delete;
+ TranslateManagerRenderViewHostAndroidTest& operator=(
+ const TranslateManagerRenderViewHostAndroidTest&) = delete;
+
// Simulates navigating to a page and getting the page contents and language
// for that navigation.
void SimulateNavigation(const GURL& url,
@@ -121,8 +126,6 @@
std::set<infobars::InfoBarDelegate*> removed_infobars_;
FakeTranslateAgent fake_agent_;
-
- DISALLOW_COPY_AND_ASSIGN(TranslateManagerRenderViewHostAndroidTest);
};
TEST_F(TranslateManagerRenderViewHostAndroidTest,
diff --git a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
index e383b4a..5e860fe 100644
--- a/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
+++ b/chrome/browser/translate/translate_manager_render_view_host_unittest.cc
@@ -77,6 +77,10 @@
public:
MockTranslateBubbleFactory() {}
+ MockTranslateBubbleFactory(const MockTranslateBubbleFactory&) = delete;
+ MockTranslateBubbleFactory& operator=(const MockTranslateBubbleFactory&) =
+ delete;
+
ShowTranslateBubbleResult ShowImplementation(
BrowserWindow* window,
content::WebContents* web_contents,
@@ -115,8 +119,6 @@
private:
std::unique_ptr<TranslateBubbleModel> model_;
-
- DISALLOW_COPY_AND_ASSIGN(MockTranslateBubbleFactory);
};
class TranslateManagerRenderViewHostTest
@@ -131,6 +133,11 @@
base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
&test_url_loader_factory_)) {}
+ TranslateManagerRenderViewHostTest(
+ const TranslateManagerRenderViewHostTest&) = delete;
+ TranslateManagerRenderViewHostTest& operator=(
+ const TranslateManagerRenderViewHostTest&) = delete;
+
#if !defined(USE_AURA) && !defined(OS_MAC)
// Ensure that we are testing under the bubble UI.
// TODO(groby): Remove once the bubble is enabled by default everywhere.
@@ -461,8 +468,6 @@
base::ScopedObservation<infobars::InfoBarManager,
infobars::InfoBarManager::Observer>
infobar_observation_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TranslateManagerRenderViewHostTest);
};
// A variant of the above test class that sets the UI language to an invalid
diff --git a/chrome/browser/translate/translate_ranker_factory.h b/chrome/browser/translate/translate_ranker_factory.h
index 99c4bb7..4488435 100644
--- a/chrome/browser/translate/translate_ranker_factory.h
+++ b/chrome/browser/translate/translate_ranker_factory.h
@@ -23,6 +23,9 @@
static translate::TranslateRanker* GetForBrowserContext(
content::BrowserContext* browser_context);
+ TranslateRankerFactory(const TranslateRankerFactory&) = delete;
+ TranslateRankerFactory& operator=(const TranslateRankerFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<TranslateRankerFactory>;
@@ -34,8 +37,6 @@
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(TranslateRankerFactory);
};
} // namespace translate
diff --git a/chrome/browser/undo/bookmark_undo_service_factory.h b/chrome/browser/undo/bookmark_undo_service_factory.h
index 88d8fbc..4add66fc 100644
--- a/chrome/browser/undo/bookmark_undo_service_factory.h
+++ b/chrome/browser/undo/bookmark_undo_service_factory.h
@@ -20,6 +20,10 @@
static BookmarkUndoServiceFactory* GetInstance();
+ BookmarkUndoServiceFactory(const BookmarkUndoServiceFactory&) = delete;
+ BookmarkUndoServiceFactory& operator=(const BookmarkUndoServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<BookmarkUndoServiceFactory>;
@@ -29,8 +33,6 @@
// BrowserContextKeyedServiceFactory:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkUndoServiceFactory);
};
#endif // CHROME_BROWSER_UNDO_BOOKMARK_UNDO_SERVICE_FACTORY_H_
diff --git a/chrome/browser/unified_consent/unified_consent_service_factory.h b/chrome/browser/unified_consent/unified_consent_service_factory.h
index 1f51e3d..f021d20 100644
--- a/chrome/browser/unified_consent/unified_consent_service_factory.h
+++ b/chrome/browser/unified_consent/unified_consent_service_factory.h
@@ -26,6 +26,10 @@
// Returns an instance of the factory singleton.
static UnifiedConsentServiceFactory* GetInstance();
+ UnifiedConsentServiceFactory(const UnifiedConsentServiceFactory&) = delete;
+ UnifiedConsentServiceFactory& operator=(const UnifiedConsentServiceFactory&) =
+ delete;
+
private:
friend struct base::DefaultSingletonTraits<UnifiedConsentServiceFactory>;
@@ -37,8 +41,6 @@
content::BrowserContext* profile) const override;
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) override;
-
- DISALLOW_COPY_AND_ASSIGN(UnifiedConsentServiceFactory);
};
#endif // CHROME_BROWSER_UNIFIED_CONSENT_UNIFIED_CONSENT_SERVICE_FACTORY_H_
diff --git a/chrome/browser/updates/announcement_notification/announcement_notification_service_factory.h b/chrome/browser/updates/announcement_notification/announcement_notification_service_factory.h
index aba902ea..f79e6ae0 100644
--- a/chrome/browser/updates/announcement_notification/announcement_notification_service_factory.h
+++ b/chrome/browser/updates/announcement_notification/announcement_notification_service_factory.h
@@ -19,6 +19,11 @@
static AnnouncementNotificationServiceFactory* GetInstance();
static AnnouncementNotificationService* GetForProfile(Profile* profile);
+ AnnouncementNotificationServiceFactory(
+ const AnnouncementNotificationServiceFactory&) = delete;
+ AnnouncementNotificationServiceFactory& operator=(
+ const AnnouncementNotificationServiceFactory&) = delete;
+
private:
friend class base::NoDestructor<AnnouncementNotificationServiceFactory>;
@@ -30,8 +35,6 @@
AnnouncementNotificationServiceFactory();
~AnnouncementNotificationServiceFactory() override;
-
- DISALLOW_COPY_AND_ASSIGN(AnnouncementNotificationServiceFactory);
};
#endif // CHROME_BROWSER_UPDATES_ANNOUNCEMENT_NOTIFICATION_ANNOUNCEMENT_NOTIFICATION_SERVICE_FACTORY_H_
diff --git a/chrome/browser/upgrade_detector/upgrade_detector_chromeos_unittest.cc b/chrome/browser/upgrade_detector/upgrade_detector_chromeos_unittest.cc
index b17fbd5..908cd884 100644
--- a/chrome/browser/upgrade_detector/upgrade_detector_chromeos_unittest.cc
+++ b/chrome/browser/upgrade_detector/upgrade_detector_chromeos_unittest.cc
@@ -79,6 +79,11 @@
} // namespace
class UpgradeDetectorChromeosTest : public ::testing::Test {
+ public:
+ UpgradeDetectorChromeosTest(const UpgradeDetectorChromeosTest&) = delete;
+ UpgradeDetectorChromeosTest& operator=(const UpgradeDetectorChromeosTest&) =
+ delete;
+
protected:
UpgradeDetectorChromeosTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME),
@@ -205,8 +210,6 @@
absl::optional<std::string> original_tz_;
chromeos::FakeUpdateEngineClient* fake_update_engine_client_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorChromeosTest);
};
TEST_F(UpgradeDetectorChromeosTest, PolicyNotEnabled) {
diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl.h b/chrome/browser/upgrade_detector/upgrade_detector_impl.h
index 483b97d..454dfce 100644
--- a/chrome/browser/upgrade_detector/upgrade_detector_impl.h
+++ b/chrome/browser/upgrade_detector/upgrade_detector_impl.h
@@ -31,6 +31,9 @@
// Returns the global instance.
static UpgradeDetectorImpl* GetInstance();
+ UpgradeDetectorImpl(const UpgradeDetectorImpl&) = delete;
+ UpgradeDetectorImpl& operator=(const UpgradeDetectorImpl&) = delete;
+
// UpgradeDetector:
void Init() override;
void Shutdown() override;
@@ -130,8 +133,6 @@
base::Time build_date_;
base::WeakPtrFactory<UpgradeDetectorImpl> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorImpl);
};
#endif // CHROME_BROWSER_UPGRADE_DETECTOR_UPGRADE_DETECTOR_IMPL_H_
diff --git a/chrome/browser/upgrade_detector/upgrade_detector_impl_unittest.cc b/chrome/browser/upgrade_detector/upgrade_detector_impl_unittest.cc
index 63ac9210..f10b82a3 100644
--- a/chrome/browser/upgrade_detector/upgrade_detector_impl_unittest.cc
+++ b/chrome/browser/upgrade_detector/upgrade_detector_impl_unittest.cc
@@ -146,6 +146,9 @@
UpgradeDetector::GetInstance()->Init();
}
+ UpgradeDetectorImplTest(const UpgradeDetectorImplTest&) = delete;
+ UpgradeDetectorImplTest& operator=(const UpgradeDetectorImplTest&) = delete;
+
~UpgradeDetectorImplTest() override {
UpgradeDetector::GetInstance()->Shutdown();
}
@@ -208,8 +211,6 @@
#if !BUILDFLAG(IS_CHROMEOS_ASH)
policy::FakeBrowserDMTokenStorage dm_token_storage_;
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
-
- DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorImplTest);
};
TEST_F(UpgradeDetectorImplTest, VariationsChanges) {
@@ -476,6 +477,11 @@
// RelaunchNotificationPeriod settings.
class UpgradeDetectorImplTimerTest : public UpgradeDetectorImplTest,
public ::testing::WithParamInterface<int> {
+ public:
+ UpgradeDetectorImplTimerTest(const UpgradeDetectorImplTimerTest&) = delete;
+ UpgradeDetectorImplTimerTest& operator=(const UpgradeDetectorImplTimerTest&) =
+ delete;
+
protected:
UpgradeDetectorImplTimerTest() {
const int period_ms = GetParam();
@@ -487,8 +493,6 @@
#if !BUILDFLAG(IS_CHROMEOS_ASH)
policy::FakeBrowserDMTokenStorage dm_token_storage_;
#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
-
- DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorImplTimerTest);
};
INSTANTIATE_TEST_SUITE_P(All,
diff --git a/chrome/browser/usb/usb_chooser_context_factory.h b/chrome/browser/usb/usb_chooser_context_factory.h
index 948968f..46b3b9bc 100644
--- a/chrome/browser/usb/usb_chooser_context_factory.h
+++ b/chrome/browser/usb/usb_chooser_context_factory.h
@@ -18,6 +18,9 @@
static UsbChooserContext* GetForProfileIfExists(Profile* profile);
static UsbChooserContextFactory* GetInstance();
+ UsbChooserContextFactory(const UsbChooserContextFactory&) = delete;
+ UsbChooserContextFactory& operator=(const UsbChooserContextFactory&) = delete;
+
private:
friend struct base::DefaultSingletonTraits<UsbChooserContextFactory>;
@@ -30,8 +33,6 @@
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;
void BrowserContextShutdown(content::BrowserContext* context) override;
-
- DISALLOW_COPY_AND_ASSIGN(UsbChooserContextFactory);
};
#endif // CHROME_BROWSER_USB_USB_CHOOSER_CONTEXT_FACTORY_H_
diff --git a/chrome/browser/vr/elements/ui_element_unittest.cc b/chrome/browser/vr/elements/ui_element_unittest.cc
index 47d3bcf..5b0d228 100644
--- a/chrome/browser/vr/elements/ui_element_unittest.cc
+++ b/chrome/browser/vr/elements/ui_element_unittest.cc
@@ -404,6 +404,10 @@
&ElementEventHandlers::HandleButtonUp, base::Unretained(this));
element->set_event_handlers(event_handlers);
}
+
+ ElementEventHandlers(const ElementEventHandlers&) = delete;
+ ElementEventHandlers& operator=(const ElementEventHandlers&) = delete;
+
void HandleHoverEnter() { hover_enter_ = true; }
bool hover_enter_called() { return hover_enter_; }
@@ -433,8 +437,6 @@
bool hover_leave_ = false;
bool button_up_ = false;
bool button_down_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ElementEventHandlers);
};
TEST(UiElement, CoordinatedVisibilityTransitions) {
diff --git a/chrome/browser/vr/speech_recognizer_unittest.cc b/chrome/browser/vr/speech_recognizer_unittest.cc
index 973990dd..7c68956 100644
--- a/chrome/browser/vr/speech_recognizer_unittest.cc
+++ b/chrome/browser/vr/speech_recognizer_unittest.cc
@@ -54,6 +54,10 @@
public:
FakeSharedURLLoaderFactory() {}
+ FakeSharedURLLoaderFactory(const FakeSharedURLLoaderFactory&) = delete;
+ FakeSharedURLLoaderFactory& operator=(const FakeSharedURLLoaderFactory&) =
+ delete;
+
// network::mojom::URLLoaderFactory:
void Clone(mojo::PendingReceiver<network::mojom::URLLoaderFactory> receiver)
@@ -86,8 +90,6 @@
~FakeSharedURLLoaderFactory() override {}
network::TestURLLoaderFactory test_url_loader_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeSharedURLLoaderFactory);
};
// Returns a SharedURLLoaderFactory that hangs.
diff --git a/chrome/browser/vr/ui_element_renderer.h b/chrome/browser/vr/ui_element_renderer.h
index 2b9c530..268461d 100644
--- a/chrome/browser/vr/ui_element_renderer.h
+++ b/chrome/browser/vr/ui_element_renderer.h
@@ -51,6 +51,10 @@
class UiElementRenderer {
public:
UiElementRenderer();
+
+ UiElementRenderer(const UiElementRenderer&) = delete;
+ UiElementRenderer& operator=(const UiElementRenderer&) = delete;
+
VIRTUAL_FOR_MOCKS ~UiElementRenderer();
VIRTUAL_FOR_MOCKS void DrawTexturedQuad(
@@ -146,8 +150,6 @@
std::unique_ptr<Stars::Renderer> stars_renderer_;
std::unique_ptr<Background::Renderer> background_renderer_;
std::unique_ptr<Keyboard::Renderer> keyboard_renderer_;
-
- DISALLOW_COPY_AND_ASSIGN(UiElementRenderer);
};
} // namespace vr
diff --git a/chrome/browser/web_applications/file_utils_wrapper.h b/chrome/browser/web_applications/file_utils_wrapper.h
index f0251da9..f8502021 100644
--- a/chrome/browser/web_applications/file_utils_wrapper.h
+++ b/chrome/browser/web_applications/file_utils_wrapper.h
@@ -31,6 +31,9 @@
class FileUtilsWrapper {
public:
FileUtilsWrapper() = default;
+
+ FileUtilsWrapper& operator=(const FileUtilsWrapper&) = delete;
+
virtual ~FileUtilsWrapper() = default;
// Create a copy to use in IO task.
@@ -60,8 +63,6 @@
bool DeleteFile(const base::FilePath& path, bool recursive);
virtual bool DeleteFileRecursively(const base::FilePath& path);
-
- DISALLOW_ASSIGN(FileUtilsWrapper);
};
} // namespace web_app
diff --git a/chrome/browser/web_applications/test/test_file_utils.h b/chrome/browser/web_applications/test/test_file_utils.h
index 689ef58..45332394 100644
--- a/chrome/browser/web_applications/test/test_file_utils.h
+++ b/chrome/browser/web_applications/test/test_file_utils.h
@@ -25,6 +25,7 @@
explicit TestFileUtils(
std::map<base::FilePath, base::FilePath> read_file_rerouting = {});
TestFileUtils(const TestFileUtils&);
+ TestFileUtils& operator=(const TestFileUtils&) = delete;
~TestFileUtils() override;
// FileUtilsWrapper:
@@ -47,8 +48,6 @@
std::map<base::FilePath, base::FilePath> read_file_rerouting_;
absl::optional<bool> delete_file_recursively_result_;
int remaining_disk_space_ = kNoLimit;
-
- DISALLOW_ASSIGN(TestFileUtils);
};
} // namespace web_app
diff --git a/chrome/browser/web_data_service_factory.h b/chrome/browser/web_data_service_factory.h
index 22e67cd..c83b0c95 100644
--- a/chrome/browser/web_data_service_factory.h
+++ b/chrome/browser/web_data_service_factory.h
@@ -38,6 +38,9 @@
Profile* profile,
ServiceAccessType access_type);
+ WebDataServiceFactory(const WebDataServiceFactory&) = delete;
+ WebDataServiceFactory& operator=(const WebDataServiceFactory&) = delete;
+
// Returns the AutofillWebDataService associated with the |profile|.
static scoped_refptr<autofill::AutofillWebDataService>
GetAutofillWebDataForProfile(Profile* profile, ServiceAccessType access_type);
@@ -71,8 +74,6 @@
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* profile) const override;
bool ServiceIsNULLWhileTesting() const override;
-
- DISALLOW_COPY_AND_ASSIGN(WebDataServiceFactory);
};
#endif // CHROME_BROWSER_WEB_DATA_SERVICE_FACTORY_H_
diff --git a/chrome/browser/webauth_interactive_uitest.cc b/chrome/browser/webauth_interactive_uitest.cc
index 674b5c6..9f909116 100644
--- a/chrome/browser/webauth_interactive_uitest.cc
+++ b/chrome/browser/webauth_interactive_uitest.cc
@@ -32,6 +32,9 @@
: https_server_(net::EmbeddedTestServer::TYPE_HTTPS),
permission_requested_(false) {}
+ WebAuthFocusTest(const WebAuthFocusTest&) = delete;
+ WebAuthFocusTest& operator=(const WebAuthFocusTest&) = delete;
+
void SetUpOnMainThread() override {
host_resolver()->AddRule("*", "127.0.0.1");
https_server_.ServeFilesFromSourceDirectory("content/test/data");
@@ -69,8 +72,6 @@
// Set to true when the permission sheet is triggered.
bool permission_requested_;
-
- DISALLOW_COPY_AND_ASSIGN(WebAuthFocusTest);
};
// TODO(crbug.com/1222768): Disabled for being flaky.
diff --git a/chrome/browser/webauthn/authenticator_reference.h b/chrome/browser/webauthn/authenticator_reference.h
index 369e5d7..eadf7d3 100644
--- a/chrome/browser/webauthn/authenticator_reference.h
+++ b/chrome/browser/webauthn/authenticator_reference.h
@@ -17,16 +17,18 @@
struct AuthenticatorReference {
AuthenticatorReference(base::StringPiece device_id,
device::FidoTransportProtocol transport);
+
+ AuthenticatorReference(const AuthenticatorReference&) = delete;
+ AuthenticatorReference& operator=(const AuthenticatorReference&) = delete;
+
AuthenticatorReference(AuthenticatorReference&& data);
AuthenticatorReference& operator=(AuthenticatorReference&& other);
+
~AuthenticatorReference();
std::string authenticator_id;
device::FidoTransportProtocol transport;
bool dispatched = false;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AuthenticatorReference);
};
#endif // CHROME_BROWSER_WEBAUTHN_AUTHENTICATOR_REFERENCE_H_
diff --git a/chrome/browser/webauthn/authenticator_request_dialog_model_unittest.cc b/chrome/browser/webauthn/authenticator_request_dialog_model_unittest.cc
index 6ae5b10..ebb21f0 100644
--- a/chrome/browser/webauthn/authenticator_request_dialog_model_unittest.cc
+++ b/chrome/browser/webauthn/authenticator_request_dialog_model_unittest.cc
@@ -53,19 +53,24 @@
public:
MockDialogModelObserver() = default;
+ MockDialogModelObserver(const MockDialogModelObserver&) = delete;
+ MockDialogModelObserver& operator=(const MockDialogModelObserver&) = delete;
+
MOCK_METHOD1(OnModelDestroyed, void(AuthenticatorRequestDialogModel*));
MOCK_METHOD0(OnStepTransition, void());
MOCK_METHOD0(OnCancelRequest, void());
MOCK_METHOD0(OnBluetoothPoweredStateChanged, void());
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockDialogModelObserver);
};
class BluetoothAdapterPowerOnCallbackReceiver {
public:
BluetoothAdapterPowerOnCallbackReceiver() = default;
+ BluetoothAdapterPowerOnCallbackReceiver(
+ const BluetoothAdapterPowerOnCallbackReceiver&) = delete;
+ BluetoothAdapterPowerOnCallbackReceiver& operator=(
+ const BluetoothAdapterPowerOnCallbackReceiver&) = delete;
+
base::RepeatingClosure GetCallback() {
return base::BindRepeating(
&BluetoothAdapterPowerOnCallbackReceiver::CallbackTarget,
@@ -81,8 +86,6 @@
}
bool was_called_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterPowerOnCallbackReceiver);
};
base::StringPiece RequestTypeToString(RequestType req_type) {
@@ -130,12 +133,14 @@
AuthenticatorRequestDialogModelTest() = default;
+ AuthenticatorRequestDialogModelTest(
+ const AuthenticatorRequestDialogModelTest&) = delete;
+ AuthenticatorRequestDialogModelTest& operator=(
+ const AuthenticatorRequestDialogModelTest&) = delete;
+
protected:
base::test::TaskEnvironment task_environment_{
base::test::TaskEnvironment::TimeSource::MOCK_TIME};
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AuthenticatorRequestDialogModelTest);
};
TEST_F(AuthenticatorRequestDialogModelTest, Mechanisms) {
diff --git a/chrome/browser/webauthn/chrome_webauthn_browsertest.cc b/chrome/browser/webauthn/chrome_webauthn_browsertest.cc
index c0f3ee1..fa7f2f5 100644
--- a/chrome/browser/webauthn/chrome_webauthn_browsertest.cc
+++ b/chrome/browser/webauthn/chrome_webauthn_browsertest.cc
@@ -45,6 +45,9 @@
public:
WebAuthnBrowserTest() = default;
+ WebAuthnBrowserTest(const WebAuthnBrowserTest&) = delete;
+ WebAuthnBrowserTest& operator=(const WebAuthnBrowserTest&) = delete;
+
void SetUpCommandLine(base::CommandLine* command_line) override {
command_line->AppendSwitch(switches::kIgnoreCertificateErrors);
}
@@ -59,9 +62,6 @@
protected:
net::EmbeddedTestServer https_server_{net::EmbeddedTestServer::TYPE_HTTPS};
-
- private:
- DISALLOW_COPY_AND_ASSIGN(WebAuthnBrowserTest);
};
static constexpr char kGetAssertionCredID1234[] = R"((() => {
diff --git a/chrome/browser/win/automation_controller.cc b/chrome/browser/win/automation_controller.cc
index 80e7b7d..c105e44 100644
--- a/chrome/browser/win/automation_controller.cc
+++ b/chrome/browser/win/automation_controller.cc
@@ -48,6 +48,9 @@
explicit RefCountedDelegate(
std::unique_ptr<AutomationController::Delegate> delegate);
+ RefCountedDelegate(const RefCountedDelegate&) = delete;
+ RefCountedDelegate& operator=(const RefCountedDelegate&) = delete;
+
// These are forwarded to |delegate_|.
void OnInitialized(HRESULT result);
void ConfigureCacheRequest(IUIAutomationCacheRequest* cache_request);
@@ -62,8 +65,6 @@
~RefCountedDelegate();
const std::unique_ptr<AutomationController::Delegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(RefCountedDelegate);
};
RefCountedDelegate::RefCountedDelegate(
@@ -102,6 +103,9 @@
// sequence.
static base::WeakPtr<Context> Create();
+ Context(const Context&) = delete;
+ Context& operator=(const Context&) = delete;
+
// Deletes the instance.
void DeleteInAutomationSequence();
@@ -145,8 +149,6 @@
// Weak pointers to the context are given to event handlers.
base::WeakPtrFactory<Context> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Context);
};
class AutomationController::Context::EventHandler
diff --git a/chrome/browser/win/chrome_elf_init_unittest.cc b/chrome/browser/win/chrome_elf_init_unittest.cc
index c62db05..7910789 100644
--- a/chrome/browser/win/chrome_elf_init_unittest.cc
+++ b/chrome/browser/win/chrome_elf_init_unittest.cc
@@ -22,6 +22,10 @@
namespace {
class ChromeBlacklistTrialTest : public testing::Test {
+ public:
+ ChromeBlacklistTrialTest(const ChromeBlacklistTrialTest&) = delete;
+ ChromeBlacklistTrialTest& operator=(const ChromeBlacklistTrialTest&) = delete;
+
protected:
ChromeBlacklistTrialTest() {}
~ChromeBlacklistTrialTest() override {}
@@ -59,9 +63,6 @@
std::unique_ptr<base::win::RegKey> blacklist_registry_key_;
registry_util::RegistryOverrideManager override_manager_;
content::BrowserTaskEnvironment task_environment_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ChromeBlacklistTrialTest);
};
// Ensure that the default trial sets up the blacklist beacons.
diff --git a/chrome/browser/win/chrome_select_file_dialog_factory.cc b/chrome/browser/win/chrome_select_file_dialog_factory.cc
index 10aae198..2465680 100644
--- a/chrome/browser/win/chrome_select_file_dialog_factory.cc
+++ b/chrome/browser/win/chrome_select_file_dialog_factory.cc
@@ -25,6 +25,9 @@
// UtilWin service.
class UtilWinHelper {
public:
+ UtilWinHelper(const UtilWinHelper&) = delete;
+ UtilWinHelper& operator=(const UtilWinHelper&) = delete;
+
// Executes the select file operation and returns the result via
// |on_select_file_executed_callback|.
static void ExecuteSelectFile(
@@ -64,8 +67,6 @@
ui::OnSelectFileExecutedCallback on_select_file_executed_callback_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(UtilWinHelper);
};
// static
diff --git a/chrome/browser/win/conflicts/enumerate_input_method_editors_unittest.cc b/chrome/browser/win/conflicts/enumerate_input_method_editors_unittest.cc
index f41932be..47c3fe8 100644
--- a/chrome/browser/win/conflicts/enumerate_input_method_editors_unittest.cc
+++ b/chrome/browser/win/conflicts/enumerate_input_method_editors_unittest.cc
@@ -19,6 +19,12 @@
namespace {
class EnumerateInputMethodEditorsTest : public testing::Test {
+ public:
+ EnumerateInputMethodEditorsTest(const EnumerateInputMethodEditorsTest&) =
+ delete;
+ EnumerateInputMethodEditorsTest& operator=(
+ const EnumerateInputMethodEditorsTest&) = delete;
+
protected:
EnumerateInputMethodEditorsTest() = default;
~EnumerateInputMethodEditorsTest() override = default;
@@ -39,8 +45,6 @@
base::test::TaskEnvironment task_environment_;
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(EnumerateInputMethodEditorsTest);
};
// Adds a fake IME entry to the registry that should be found by the
diff --git a/chrome/browser/win/conflicts/incompatible_applications_browsertest.cc b/chrome/browser/win/conflicts/incompatible_applications_browsertest.cc
index cc70b36..3c76c050 100644
--- a/chrome/browser/win/conflicts/incompatible_applications_browsertest.cc
+++ b/chrome/browser/win/conflicts/incompatible_applications_browsertest.cc
@@ -82,6 +82,12 @@
};
class IncompatibleApplicationsBrowserTest : public InProcessBrowserTest {
+ public:
+ IncompatibleApplicationsBrowserTest(
+ const IncompatibleApplicationsBrowserTest&) = delete;
+ IncompatibleApplicationsBrowserTest& operator=(
+ const IncompatibleApplicationsBrowserTest&) = delete;
+
protected:
// The name of the application deemed incompatible.
static constexpr wchar_t kApplicationName[] = L"FooBar123";
@@ -186,8 +192,6 @@
// Enables the IncompatibleApplicationsWarning feature.
base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(IncompatibleApplicationsBrowserTest);
};
// static
diff --git a/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc b/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
index 1f9ab59..284bcc8 100644
--- a/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
+++ b/chrome/browser/win/conflicts/incompatible_applications_updater_unittest.cc
@@ -31,6 +31,9 @@
public:
MockModuleListFilter() = default;
+ MockModuleListFilter(const MockModuleListFilter&) = delete;
+ MockModuleListFilter& operator=(const MockModuleListFilter&) = delete;
+
bool IsAllowlisted(base::StringPiece module_basename_hash,
base::StringPiece module_code_id_hash) const override {
return false;
@@ -44,8 +47,6 @@
private:
~MockModuleListFilter() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(MockModuleListFilter);
};
class MockInstalledApplications : public InstalledApplications {
@@ -114,6 +115,12 @@
class IncompatibleApplicationsUpdaterTest : public testing::Test,
public ModuleDatabaseEventSource {
+ public:
+ IncompatibleApplicationsUpdaterTest(
+ const IncompatibleApplicationsUpdaterTest&) = delete;
+ IncompatibleApplicationsUpdaterTest& operator=(
+ const IncompatibleApplicationsUpdaterTest&) = delete;
+
protected:
IncompatibleApplicationsUpdaterTest()
: dll1_(kDllPath1),
@@ -181,8 +188,6 @@
CertificateInfo exe_certificate_info_;
scoped_refptr<MockModuleListFilter> module_list_filter_;
MockInstalledApplications installed_applications_;
-
- DISALLOW_COPY_AND_ASSIGN(IncompatibleApplicationsUpdaterTest);
};
// Tests that when the Local State cache is empty, no incompatible applications
diff --git a/chrome/browser/win/conflicts/inspection_results_cache_unittest.cc b/chrome/browser/win/conflicts/inspection_results_cache_unittest.cc
index b15bfca..b1d124a 100644
--- a/chrome/browser/win/conflicts/inspection_results_cache_unittest.cc
+++ b/chrome/browser/win/conflicts/inspection_results_cache_unittest.cc
@@ -50,6 +50,10 @@
InspectionResultsCacheTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ InspectionResultsCacheTest(const InspectionResultsCacheTest&) = delete;
+ InspectionResultsCacheTest& operator=(const InspectionResultsCacheTest&) =
+ delete;
+
void SetUp() override {
ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
scoped_feature_list_.InitAndEnableFeature(kInspectionResultsCache);
@@ -67,8 +71,6 @@
base::test::TaskEnvironment task_environment_;
base::ScopedTempDir scoped_temp_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(InspectionResultsCacheTest);
};
TEST_F(InspectionResultsCacheTest, ReadMissingCache) {
diff --git a/chrome/browser/win/conflicts/module_blocklist_cache_updater_unittest.cc b/chrome/browser/win/conflicts/module_blocklist_cache_updater_unittest.cc
index 2277eed..7c1d1a7b 100644
--- a/chrome/browser/win/conflicts/module_blocklist_cache_updater_unittest.cc
+++ b/chrome/browser/win/conflicts/module_blocklist_cache_updater_unittest.cc
@@ -93,6 +93,12 @@
class ModuleBlocklistCacheUpdaterTest : public testing::Test,
public ModuleDatabaseEventSource {
+ public:
+ ModuleBlocklistCacheUpdaterTest(const ModuleBlocklistCacheUpdaterTest&) =
+ delete;
+ ModuleBlocklistCacheUpdaterTest& operator=(
+ const ModuleBlocklistCacheUpdaterTest&) = delete;
+
protected:
ModuleBlocklistCacheUpdaterTest()
: dll1_(kDllPath1),
@@ -191,8 +197,6 @@
base::FilePath module_blocklist_cache_path_;
bool on_cache_updated_callback_invoked_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleBlocklistCacheUpdaterTest);
};
TEST_F(ModuleBlocklistCacheUpdaterTest, OneThirdPartyModule) {
diff --git a/chrome/browser/win/conflicts/module_blocklist_cache_util_unittest.cc b/chrome/browser/win/conflicts/module_blocklist_cache_util_unittest.cc
index e280dc6..8127b58 100644
--- a/chrome/browser/win/conflicts/module_blocklist_cache_util_unittest.cc
+++ b/chrome/browser/win/conflicts/module_blocklist_cache_util_unittest.cc
@@ -72,6 +72,11 @@
} // namespace
class ModuleBlocklistCacheUtilTest : public testing::Test {
+ public:
+ ModuleBlocklistCacheUtilTest(const ModuleBlocklistCacheUtilTest&) = delete;
+ ModuleBlocklistCacheUtilTest& operator=(const ModuleBlocklistCacheUtilTest&) =
+ delete;
+
protected:
ModuleBlocklistCacheUtilTest() = default;
~ModuleBlocklistCacheUtilTest() override = default;
@@ -93,8 +98,6 @@
base::ScopedTempDir scoped_temp_dir_;
base::FilePath module_blocklist_cache_path_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleBlocklistCacheUtilTest);
};
TEST_F(ModuleBlocklistCacheUtilTest, CalculateTimeDateStamp) {
@@ -184,6 +187,9 @@
public:
FakeModuleListFilter() = default;
+ FakeModuleListFilter(const FakeModuleListFilter&) = delete;
+ FakeModuleListFilter& operator=(const FakeModuleListFilter&) = delete;
+
void AddAllowlistedModule(const third_party_dlls::PackedListModule& module) {
allowlisted_modules_.emplace(
base::StringPiece(
@@ -213,8 +219,6 @@
std::set<std::pair<base::StringPiece, base::StringPiece>>
allowlisted_modules_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeModuleListFilter);
};
TEST_F(ModuleBlocklistCacheUtilTest, RemoveAllowlistedEntries) {
diff --git a/chrome/browser/win/conflicts/module_database_unittest.cc b/chrome/browser/win/conflicts/module_database_unittest.cc
index d29fdc4a..8b34ae3 100644
--- a/chrome/browser/win/conflicts/module_database_unittest.cc
+++ b/chrome/browser/win/conflicts/module_database_unittest.cc
@@ -35,6 +35,10 @@
} // namespace
class ModuleDatabaseTest : public testing::Test {
+ public:
+ ModuleDatabaseTest(const ModuleDatabaseTest&) = delete;
+ ModuleDatabaseTest& operator=(const ModuleDatabaseTest&) = delete;
+
protected:
ModuleDatabaseTest()
: dll1_(kDll1),
@@ -88,8 +92,6 @@
absl::optional<UtilWinImpl> util_win_impl_;
std::unique_ptr<ModuleDatabase> module_database_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleDatabaseTest);
};
TEST_F(ModuleDatabaseTest, DatabaseIsConsistent) {
diff --git a/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc b/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
index 2a219cc..b1401ab 100644
--- a/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
+++ b/chrome/browser/win/conflicts/module_event_sink_impl_unittest.cc
@@ -23,6 +23,10 @@
} // namespace
class ModuleEventSinkImplTest : public testing::Test {
+ public:
+ ModuleEventSinkImplTest(const ModuleEventSinkImplTest&) = delete;
+ ModuleEventSinkImplTest& operator=(const ModuleEventSinkImplTest&) = delete;
+
protected:
ModuleEventSinkImplTest() = default;
~ModuleEventSinkImplTest() override = default;
@@ -57,9 +61,6 @@
std::unique_ptr<ModuleEventSinkImpl> module_event_sink_impl_;
int module_event_count_ = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ModuleEventSinkImplTest);
};
TEST_F(ModuleEventSinkImplTest, CallsForwardedAsExpected) {
diff --git a/chrome/browser/win/conflicts/module_inspector_unittest.cc b/chrome/browser/win/conflicts/module_inspector_unittest.cc
index d5b5ec94..9cd61cb 100644
--- a/chrome/browser/win/conflicts/module_inspector_unittest.cc
+++ b/chrome/browser/win/conflicts/module_inspector_unittest.cc
@@ -85,6 +85,9 @@
ModuleInspectorTest()
: task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {}
+ ModuleInspectorTest(const ModuleInspectorTest&) = delete;
+ ModuleInspectorTest& operator=(const ModuleInspectorTest&) = delete;
+
std::unique_ptr<ModuleInspector> CreateModuleInspector() {
auto module_inspector =
std::make_unique<ModuleInspector>(base::BindRepeating(
@@ -152,8 +155,6 @@
}
std::vector<ModuleInspectionResult> inspected_modules_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleInspectorTest);
};
} // namespace
diff --git a/chrome/browser/win/conflicts/module_list_filter.h b/chrome/browser/win/conflicts/module_list_filter.h
index d33ac6c..ebafb743 100644
--- a/chrome/browser/win/conflicts/module_list_filter.h
+++ b/chrome/browser/win/conflicts/module_list_filter.h
@@ -25,6 +25,9 @@
public:
ModuleListFilter();
+ ModuleListFilter(const ModuleListFilter&) = delete;
+ ModuleListFilter& operator=(const ModuleListFilter&) = delete;
+
bool Initialize(const base::FilePath& module_list_path);
// Returns true if a module is allowlisted based on the hash of its basename
@@ -67,8 +70,6 @@
// Indicates if Initalize() has been succesfully called.
bool initialized_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleListFilter);
};
#endif // CHROME_BROWSER_WIN_CONFLICTS_MODULE_LIST_FILTER_H_
diff --git a/chrome/browser/win/conflicts/module_list_filter_unittest.cc b/chrome/browser/win/conflicts/module_list_filter_unittest.cc
index 633df6e..7f8fa16 100644
--- a/chrome/browser/win/conflicts/module_list_filter_unittest.cc
+++ b/chrome/browser/win/conflicts/module_list_filter_unittest.cc
@@ -46,6 +46,9 @@
module_list_.mutable_allowlist();
}
+ ModuleListBuilder(const ModuleListBuilder&) = delete;
+ ModuleListBuilder& operator=(const ModuleListBuilder&) = delete;
+
// Adds a module to the allowlist.
void AddAllowlistedModule(absl::optional<std::u16string> basename,
absl::optional<std::string> code_id) {
@@ -112,8 +115,6 @@
const base::FilePath module_list_path_;
chrome::conflicts::ModuleList module_list_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleListBuilder);
};
// Creates a pair of ModuleInfoKey and ModuleInfoData with the necessary
@@ -140,6 +141,10 @@
} // namespace
class ModuleListFilterTest : public ::testing::Test {
+ public:
+ ModuleListFilterTest(const ModuleListFilterTest&) = delete;
+ ModuleListFilterTest& operator=(const ModuleListFilterTest&) = delete;
+
protected:
ModuleListFilterTest()
: dll1_(kDllPath1),
@@ -165,8 +170,6 @@
base::FilePath module_list_path_;
scoped_refptr<ModuleListFilter> module_list_filter_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleListFilterTest);
};
TEST_F(ModuleListFilterTest, IsAllowlistedStringPieceVersion) {
diff --git a/chrome/browser/win/conflicts/module_load_attempt_log_listener_unittest.cc b/chrome/browser/win/conflicts/module_load_attempt_log_listener_unittest.cc
index c21ce4d..2d356f3 100644
--- a/chrome/browser/win/conflicts/module_load_attempt_log_listener_unittest.cc
+++ b/chrome/browser/win/conflicts/module_load_attempt_log_listener_unittest.cc
@@ -18,6 +18,12 @@
namespace {
class ModuleLoadAttemptLogListenerTest : public testing::Test {
+ public:
+ ModuleLoadAttemptLogListenerTest(const ModuleLoadAttemptLogListenerTest&) =
+ delete;
+ ModuleLoadAttemptLogListenerTest& operator=(
+ const ModuleLoadAttemptLogListenerTest&) = delete;
+
protected:
ModuleLoadAttemptLogListenerTest() = default;
~ModuleLoadAttemptLogListenerTest() override = default;
@@ -64,8 +70,6 @@
base::OnceClosure quit_closure_;
std::vector<std::tuple<base::FilePath, uint32_t, uint32_t>> blocked_modules_;
-
- DISALLOW_COPY_AND_ASSIGN(ModuleLoadAttemptLogListenerTest);
};
} // namespace
diff --git a/chrome/browser/win/conflicts/registry_key_watcher_unittest.cc b/chrome/browser/win/conflicts/registry_key_watcher_unittest.cc
index 113572f..fb4b3f4 100644
--- a/chrome/browser/win/conflicts/registry_key_watcher_unittest.cc
+++ b/chrome/browser/win/conflicts/registry_key_watcher_unittest.cc
@@ -10,6 +10,10 @@
#include "testing/gtest/include/gtest/gtest.h"
class RegistryKeyWatcherTest : public testing::Test {
+ public:
+ RegistryKeyWatcherTest(const RegistryKeyWatcherTest&) = delete;
+ RegistryKeyWatcherTest& operator=(const RegistryKeyWatcherTest&) = delete;
+
protected:
RegistryKeyWatcherTest() = default;
~RegistryKeyWatcherTest() override = default;
@@ -34,8 +38,6 @@
private:
base::test::TaskEnvironment task_environment_;
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(RegistryKeyWatcherTest);
};
TEST_F(RegistryKeyWatcherTest, InvalidKey) {
diff --git a/chrome/browser/win/conflicts/third_party_blocking_browsertest.cc b/chrome/browser/win/conflicts/third_party_blocking_browsertest.cc
index 4c32516..b7ebda2 100644
--- a/chrome/browser/win/conflicts/third_party_blocking_browsertest.cc
+++ b/chrome/browser/win/conflicts/third_party_blocking_browsertest.cc
@@ -38,6 +38,10 @@
GetRegistryKeyPath().c_str(),
KEY_CREATE_SUB_KEY | KEY_READ | KEY_NOTIFY) {}
+ ThirdPartyRegistryKeyObserver(const ThirdPartyRegistryKeyObserver&) = delete;
+ ThirdPartyRegistryKeyObserver& operator=(
+ const ThirdPartyRegistryKeyObserver&) = delete;
+
bool StartWatching() {
return registry_key_.StartWatching(base::BindOnce(
&ThirdPartyRegistryKeyObserver::OnChange, base::Unretained(this)));
@@ -75,8 +79,6 @@
bool path_written_ = false;
base::OnceClosure run_loop_quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyRegistryKeyObserver);
};
// Creates an empty serialized ModuleList proto in the module list component
@@ -103,6 +105,11 @@
}
class ThirdPartyBlockingBrowserTest : public InProcessBrowserTest {
+ public:
+ ThirdPartyBlockingBrowserTest(const ThirdPartyBlockingBrowserTest&) = delete;
+ ThirdPartyBlockingBrowserTest& operator=(
+ const ThirdPartyBlockingBrowserTest&) = delete;
+
protected:
ThirdPartyBlockingBrowserTest() = default;
~ThirdPartyBlockingBrowserTest() override = default;
@@ -142,8 +149,6 @@
// Temp directory where the third-party module is located.
base::ScopedTempDir scoped_temp_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyBlockingBrowserTest);
};
} // namespace
diff --git a/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc b/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
index 61618a59..9c4e32a0 100644
--- a/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
+++ b/chrome/browser/win/conflicts/third_party_conflicts_manager_unittest.cc
@@ -31,6 +31,11 @@
ThirdPartyConflictsManagerTest()
: scoped_testing_local_state_(TestingBrowserProcess::GetGlobal()) {}
+ ThirdPartyConflictsManagerTest(const ThirdPartyConflictsManagerTest&) =
+ delete;
+ ThirdPartyConflictsManagerTest& operator=(
+ const ThirdPartyConflictsManagerTest&) = delete;
+
void SetUp() override {
ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
@@ -86,8 +91,6 @@
base::test::ScopedFeatureList scoped_feature_list_;
absl::optional<ThirdPartyConflictsManager::State> final_state_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyConflictsManagerTest);
};
std::pair<ModuleInfoKey, ModuleInfoData> CreateExeModuleInfo() {
diff --git a/chrome/browser/win/conflicts/uninstall_application.cc b/chrome/browser/win/conflicts/uninstall_application.cc
index 159269e0..d7f1d22 100644
--- a/chrome/browser/win/conflicts/uninstall_application.cc
+++ b/chrome/browser/win/conflicts/uninstall_application.cc
@@ -66,6 +66,9 @@
class UninstallAppController {
public:
+ UninstallAppController(const UninstallAppController&) = delete;
+ UninstallAppController& operator=(const UninstallAppController&) = delete;
+
// Launches the Apps & Features page, ensuring the |application_name| is
// written into the search box.
static void Launch(const std::wstring& application_name);
@@ -85,8 +88,6 @@
std::unique_ptr<AutomationController> automation_controller_;
base::WeakPtrFactory<UninstallAppController> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(UninstallAppController);
};
// static
diff --git a/chrome/browser/win/jumplist.h b/chrome/browser/win/jumplist.h
index 69e2302..4b102135 100644
--- a/chrome/browser/win/jumplist.h
+++ b/chrome/browser/win/jumplist.h
@@ -90,6 +90,9 @@
public history::TopSitesObserver,
public KeyedService {
public:
+ JumpList(const JumpList&) = delete;
+ JumpList& operator=(const JumpList&) = delete;
+
// Returns true if the custom JumpList is enabled.
static bool Enabled();
@@ -354,8 +357,6 @@
// For callbacks may run after destruction.
base::WeakPtrFactory<JumpList> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(JumpList);
};
#endif // CHROME_BROWSER_WIN_JUMPLIST_H_
diff --git a/chrome/browser/win/jumplist_updater.h b/chrome/browser/win/jumplist_updater.h
index 2117b74..99ce5cce 100644
--- a/chrome/browser/win/jumplist_updater.h
+++ b/chrome/browser/win/jumplist_updater.h
@@ -27,6 +27,9 @@
public:
ShellLinkItem();
+ ShellLinkItem(const ShellLinkItem&) = delete;
+ ShellLinkItem& operator=(const ShellLinkItem&) = delete;
+
const std::u16string& title() const { return title_; }
const base::FilePath& icon_path() const { return icon_path_; }
const std::string& url() const { return url_; }
@@ -72,8 +75,6 @@
// Note that an icon path must be supplied to IShellLink, so users of this
// class must save icon data to disk.
gfx::ImageSkia icon_image_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellLinkItem);
};
typedef std::vector<scoped_refptr<ShellLinkItem> > ShellLinkItemList;
diff --git a/chrome/browser/win/taskbar_icon_finder.cc b/chrome/browser/win/taskbar_icon_finder.cc
index 79df8b8..463a7e4 100644
--- a/chrome/browser/win/taskbar_icon_finder.cc
+++ b/chrome/browser/win/taskbar_icon_finder.cc
@@ -42,6 +42,9 @@
// automation task in a multi-threaded COM apartment.
explicit TaskbarIconFinder(TaskbarIconFinderResultCallback result_callback);
+ TaskbarIconFinder(const TaskbarIconFinder&) = delete;
+ TaskbarIconFinder& operator=(const TaskbarIconFinder&) = delete;
+
private:
// Receives the result computed on the automation task, passes the results to
// the caller, then self-destructs.
@@ -75,8 +78,6 @@
// The caller's callback.
TaskbarIconFinderResultCallback result_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(TaskbarIconFinder);
};
TaskbarIconFinder::TaskbarIconFinder(
diff --git a/chrome/chrome_cleaner/chrome_utils/extensions_util.h b/chrome/chrome_cleaner/chrome_utils/extensions_util.h
index 9fe3885..fd2fb48 100644
--- a/chrome/chrome_cleaner/chrome_utils/extensions_util.h
+++ b/chrome/chrome_cleaner/chrome_utils/extensions_util.h
@@ -38,11 +38,15 @@
const std::wstring& name,
ContentType content_type,
scoped_refptr<RefValue>);
+
+ ExtensionPolicyRegistryEntry(const ExtensionPolicyRegistryEntry&) = delete;
+ ExtensionPolicyRegistryEntry& operator=(const ExtensionPolicyRegistryEntry&) =
+ delete;
+
ExtensionPolicyRegistryEntry(ExtensionPolicyRegistryEntry&&);
- ~ExtensionPolicyRegistryEntry();
ExtensionPolicyRegistryEntry& operator=(ExtensionPolicyRegistryEntry&&);
- DISALLOW_COPY_AND_ASSIGN(ExtensionPolicyRegistryEntry);
+ ~ExtensionPolicyRegistryEntry();
};
// A file that holds some form of policy for |extension_id|.
@@ -55,10 +59,13 @@
const base::FilePath& path,
scoped_refptr<RefValue> json);
ExtensionPolicyFile(ExtensionPolicyFile&&);
- ~ExtensionPolicyFile();
+
+ ExtensionPolicyFile(const ExtensionPolicyFile&) = delete;
+ ExtensionPolicyFile& operator=(const ExtensionPolicyFile&) = delete;
+
ExtensionPolicyFile& operator=(ExtensionPolicyFile&&);
- DISALLOW_COPY_AND_ASSIGN(ExtensionPolicyFile);
+ ~ExtensionPolicyFile();
};
// Find all extension forcelist registry policies and append to |policies|.
diff --git a/chrome/chrome_cleaner/engines/broker/engine_client.h b/chrome/chrome_cleaner/engines/broker/engine_client.h
index 2e9c0eb..56f0add 100644
--- a/chrome/chrome_cleaner/engines/broker/engine_client.h
+++ b/chrome/chrome_cleaner/engines/broker/engine_client.h
@@ -82,6 +82,9 @@
std::unique_ptr<InterfaceMetadataObserver> interface_metadata_observer =
nullptr);
+ EngineClient(const EngineClient&) = delete;
+ EngineClient& operator=(const EngineClient&) = delete;
+
// Return the watchdog timeout that should be used for scanning using this
// client.
uint32_t ScanningWatchdogTimeoutInSeconds() const;
@@ -239,8 +242,6 @@
// Keeps track of the calls of both EngineRequestsImpl and
// CleanerEngineRequestsImpl.
std::unique_ptr<InterfaceMetadataObserver> interface_metadata_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(EngineClient);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/http/http_agent_impl.cc b/chrome/chrome_cleaner/http/http_agent_impl.cc
index 573ba4b..344e1025 100644
--- a/chrome/chrome_cleaner/http/http_agent_impl.cc
+++ b/chrome/chrome_cleaner/http/http_agent_impl.cc
@@ -70,14 +70,16 @@
class WinHttpHandleTraits {
public:
typedef HINTERNET Handle;
+
+ WinHttpHandleTraits() = delete;
+ WinHttpHandleTraits(const WinHttpHandleTraits&) = delete;
+ WinHttpHandleTraits& operator=(const WinHttpHandleTraits&) = delete;
+
static bool CloseHandle(HINTERNET handle) {
return ::WinHttpCloseHandle(handle) == TRUE;
}
static bool IsHandleValid(HINTERNET handle) { return handle != nullptr; }
static HINTERNET NullHandle() { return nullptr; }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(WinHttpHandleTraits);
};
typedef base::win::GenericScopedHandle<WinHttpHandleTraits,
diff --git a/chrome/chrome_cleaner/http/mock_http_agent_factory.h b/chrome/chrome_cleaner/http/mock_http_agent_factory.h
index 699f08f..2665a8df 100644
--- a/chrome/chrome_cleaner/http/mock_http_agent_factory.h
+++ b/chrome/chrome_cleaner/http/mock_http_agent_factory.h
@@ -127,13 +127,14 @@
public:
explicit MockHttpAgentFactory(MockHttpAgentConfig* config);
+ MockHttpAgentFactory(const MockHttpAgentFactory&) = delete;
+ MockHttpAgentFactory& operator=(const MockHttpAgentFactory&) = delete;
+
// HttpAgentFactory:
std::unique_ptr<chrome_cleaner::HttpAgent> CreateHttpAgent() const override;
private:
MockHttpAgentConfig* config_{nullptr};
-
- DISALLOW_COPY_AND_ASSIGN(MockHttpAgentFactory);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/logging/cleaner_logging_service.h b/chrome/chrome_cleaner/logging/cleaner_logging_service.h
index 1f04f217..40fff29 100644
--- a/chrome/chrome_cleaner/logging/cleaner_logging_service.h
+++ b/chrome/chrome_cleaner/logging/cleaner_logging_service.h
@@ -50,6 +50,9 @@
// Return the singleton instance which will get destroyed by the AtExitMgr.
static CleanerLoggingService* GetInstance();
+ CleanerLoggingService(const CleanerLoggingService&) = delete;
+ CleanerLoggingService& operator=(const CleanerLoggingService&) = delete;
+
// LoggingServiceAPI:
void Initialize(RegistryLogger* registry_logger) override;
void Terminate() override;
@@ -198,8 +201,6 @@
// Sampler to choose which files to log detailed info for.
DetailedInfoSampler sampler_;
-
- DISALLOW_COPY_AND_ASSIGN(CleanerLoggingService);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/logging/message_builder.h b/chrome/chrome_cleaner/logging/message_builder.h
index 76d34a2..44579377 100644
--- a/chrome/chrome_cleaner/logging/message_builder.h
+++ b/chrome/chrome_cleaner/logging/message_builder.h
@@ -76,6 +76,9 @@
MessageBuilder() = default;
+ MessageBuilder(const MessageBuilder&) = delete;
+ MessageBuilder& operator=(const MessageBuilder&) = delete;
+
// Appends an EOL character to the result string.
MessageBuilder& NewLine();
@@ -143,8 +146,6 @@
std::wstring content_;
int indentation_level_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(MessageBuilder);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/logging/noop_logging_service.h b/chrome/chrome_cleaner/logging/noop_logging_service.h
index 2b1e3d9..4dcbde7 100644
--- a/chrome/chrome_cleaner/logging/noop_logging_service.h
+++ b/chrome/chrome_cleaner/logging/noop_logging_service.h
@@ -28,6 +28,9 @@
// Return the singleton instance which will get destroyed by the AtExitMgr.
static NoOpLoggingService* GetInstance();
+ NoOpLoggingService(const NoOpLoggingService&) = delete;
+ NoOpLoggingService& operator=(const NoOpLoggingService&) = delete;
+
// LoggingServiceAPI.
void Initialize(RegistryLogger* registry_logger) override;
void Terminate() override;
@@ -95,8 +98,6 @@
private:
friend struct base::DefaultSingletonTraits<NoOpLoggingService>;
NoOpLoggingService();
-
- DISALLOW_COPY_AND_ASSIGN(NoOpLoggingService);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/logging/reporter_logging_service.h b/chrome/chrome_cleaner/logging/reporter_logging_service.h
index 7bccfae..39cc5736 100644
--- a/chrome/chrome_cleaner/logging/reporter_logging_service.h
+++ b/chrome/chrome_cleaner/logging/reporter_logging_service.h
@@ -32,6 +32,9 @@
// Return the singleton instance which will get destroyed by the AtExitMgr.
static ReporterLoggingService* GetInstance();
+ ReporterLoggingService(const ReporterLoggingService&) = delete;
+ ReporterLoggingService& operator=(const ReporterLoggingService&) = delete;
+
// LoggingServiceAPI.
void Initialize(RegistryLogger* registry_logger) override;
void Terminate() override;
@@ -134,8 +137,6 @@
// Sampler to choose which files to log detailed info for.
DetailedInfoSampler sampler_;
-
- DISALLOW_COPY_AND_ASSIGN(ReporterLoggingService);
};
} // namespace chrome_cleaner
diff --git a/chrome/chrome_cleaner/logging/safe_browsing_reporter_unittest.cc b/chrome/chrome_cleaner/logging/safe_browsing_reporter_unittest.cc
index f0ba6ef..055d0d6 100644
--- a/chrome/chrome_cleaner/logging/safe_browsing_reporter_unittest.cc
+++ b/chrome/chrome_cleaner/logging/safe_browsing_reporter_unittest.cc
@@ -33,6 +33,9 @@
class SafeBrowsingReporterTest : public testing::Test {
public:
+ SafeBrowsingReporterTest(const SafeBrowsingReporterTest&) = delete;
+ SafeBrowsingReporterTest& operator=(const SafeBrowsingReporterTest&) = delete;
+
// SafeBrowsingReporter::OnResultCallback:
void OnReportUploadResult(base::OnceClosure run_loop_quit,
SafeBrowsingReporter::Result result,
@@ -89,9 +92,6 @@
// Confirm the execution of |OnReportUploadResult| and that |result_| and
// |response_string_| are valid.
bool report_upload_result_called_{false};
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SafeBrowsingReporterTest);
};
TEST_F(SafeBrowsingReporterTest, Success) {
diff --git a/chrome/chrome_cleaner/os/scoped_disable_wow64_redirection.cc b/chrome/chrome_cleaner/os/scoped_disable_wow64_redirection.cc
index 29a5908..135584e 100644
--- a/chrome/chrome_cleaner/os/scoped_disable_wow64_redirection.cc
+++ b/chrome/chrome_cleaner/os/scoped_disable_wow64_redirection.cc
@@ -36,6 +36,9 @@
}
}
+ Wow64Functions(const Wow64Functions&) = delete;
+ Wow64Functions& operator=(const Wow64Functions&) = delete;
+
bool is_valid() const {
return is_wow_64_process_ && wow_64_disable_wow_64_fs_redirection_ &&
wow_64_revert_wow_64_fs_redirection_;
@@ -66,8 +69,6 @@
IsWow64Process is_wow_64_process_;
Wow64DisableWow64FSRedirection wow_64_disable_wow_64_fs_redirection_;
Wow64RevertWow64FSRedirection wow_64_revert_wow_64_fs_redirection_;
-
- DISALLOW_COPY_AND_ASSIGN(Wow64Functions);
};
// Global Wow64Function instance used by ScopedDisableWow64Redirection below.
diff --git a/chrome/chrome_cleaner/os/scoped_service_handle.h b/chrome/chrome_cleaner/os/scoped_service_handle.h
index 2f96931cc..bb8ad43 100644
--- a/chrome/chrome_cleaner/os/scoped_service_handle.h
+++ b/chrome/chrome_cleaner/os/scoped_service_handle.h
@@ -16,6 +16,10 @@
public:
typedef SC_HANDLE Handle;
+ ScHandleTraits() = delete;
+ ScHandleTraits(const ScHandleTraits&) = delete;
+ ScHandleTraits& operator=(const ScHandleTraits&) = delete;
+
// Closes the handle.
static bool CloseHandle(SC_HANDLE handle) {
return ::CloseServiceHandle(handle) != FALSE;
@@ -26,9 +30,6 @@
// Returns null handle value.
static SC_HANDLE NullHandle() { return nullptr; }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScHandleTraits);
};
typedef base::win::GenericScopedHandle<ScHandleTraits,
diff --git a/chrome/chrome_cleaner/os/task_scheduler.cc b/chrome/chrome_cleaner/os/task_scheduler.cc
index c8280af..dc370c79 100644
--- a/chrome/chrome_cleaner/os/task_scheduler.cc
+++ b/chrome/chrome_cleaner/os/task_scheduler.cc
@@ -126,6 +126,9 @@
// scheduler for Vista+.
class TaskSchedulerV2 : public TaskScheduler {
public:
+ TaskSchedulerV2(const TaskSchedulerV2&) = delete;
+ TaskSchedulerV2& operator=(const TaskSchedulerV2&) = delete;
+
static bool Initialize() {
DCHECK(!task_service_);
DCHECK(!root_task_folder_);
@@ -944,8 +947,6 @@
static Microsoft::WRL::ComPtr<ITaskService> task_service_;
static Microsoft::WRL::ComPtr<ITaskFolder> root_task_folder_;
-
- DISALLOW_COPY_AND_ASSIGN(TaskSchedulerV2);
};
Microsoft::WRL::ComPtr<ITaskService> TaskSchedulerV2::task_service_;
diff --git a/chrome/chrome_cleaner/pup_data/pup_data.h b/chrome/chrome_cleaner/pup_data/pup_data.h
index 30c722f..bc03f2d 100644
--- a/chrome/chrome_cleaner/pup_data/pup_data.h
+++ b/chrome/chrome_cleaner/pup_data/pup_data.h
@@ -331,6 +331,10 @@
};
PUPData();
+
+ PUPData(const PUPData&) = delete;
+ PUPData& operator=(const PUPData&) = delete;
+
~PUPData();
using UwSCatalogs = std::vector<const UwSCatalog*>;
@@ -453,8 +457,6 @@
static std::vector<UwSId>* cached_uws_ids_;
static UwSCatalogs* last_uws_catalogs_;
-
- DISALLOW_COPY_AND_ASSIGN(PUPData);
};
// This macro makes it easier to create strings with the
diff --git a/chrome/chrome_cleaner/test/test_registry_util.h b/chrome/chrome_cleaner/test/test_registry_util.h
index 2aa84f6..6a93f14 100644
--- a/chrome/chrome_cleaner/test/test_registry_util.h
+++ b/chrome/chrome_cleaner/test/test_registry_util.h
@@ -19,6 +19,8 @@
class ScopedRegistryValue {
public:
+ ScopedRegistryValue() = delete;
+
ScopedRegistryValue(HKEY rootkey,
const wchar_t* subkey,
REGSAM access,
@@ -26,6 +28,9 @@
const wchar_t* content,
uint32_t value_type);
+ ScopedRegistryValue(const ScopedRegistryValue&) = delete;
+ ScopedRegistryValue& operator=(const ScopedRegistryValue&) = delete;
+
~ScopedRegistryValue();
private:
@@ -35,13 +40,17 @@
std::vector<wchar_t> old_value_;
DWORD old_value_size_ = 0;
bool has_value_ = false;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedRegistryValue);
};
class ScopedTempRegistryKey {
public:
+ ScopedTempRegistryKey() = delete;
+
ScopedTempRegistryKey(HKEY key, const wchar_t* key_path, REGSAM access);
+
+ ScopedTempRegistryKey(const ScopedTempRegistryKey&) = delete;
+ ScopedTempRegistryKey& operator=(const ScopedTempRegistryKey&) = delete;
+
~ScopedTempRegistryKey();
bool Valid() const { return key_.Valid(); }
@@ -49,7 +58,6 @@
private:
base::win::RegKey key_;
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTempRegistryKey);
};
// Expect the registry footprint to be found in |pup|.
diff --git a/chrome/chrome_elf/third_party_dlls/logs.cc b/chrome/chrome_elf/third_party_dlls/logs.cc
index cccf74af..d23bad8d 100644
--- a/chrome/chrome_elf/third_party_dlls/logs.cc
+++ b/chrome/chrome_elf/third_party_dlls/logs.cc
@@ -68,6 +68,9 @@
// Constructor - |log_type| indicates what LogType this instance holds.
explicit Log(LogType log_type) : log_type_(log_type) {}
+ Log(const Log&) = delete;
+ Log& operator=(const Log&) = delete;
+
// Returns the size in bytes of the full log, in terms of LogEntry structs.
// I.e. how many bytes would a provided buffer need to be to DrainLog().
uint32_t GetFullLogSize() const {
@@ -177,10 +180,6 @@
LogType log_type_;
std::vector<LogEntryInternal> entries_;
-
- // DISALLOW_COPY_AND_ASSIGN(Log);
- Log(const Log&) = delete;
- Log& operator=(const Log&) = delete;
};
//------------------------------------------------------------------------------
diff --git a/chrome/chrome_elf/third_party_dlls/main_unittest.cc b/chrome/chrome_elf/third_party_dlls/main_unittest.cc
index 261d2652..92f1946 100644
--- a/chrome/chrome_elf/third_party_dlls/main_unittest.cc
+++ b/chrome/chrome_elf/third_party_dlls/main_unittest.cc
@@ -173,6 +173,10 @@
//------------------------------------------------------------------------------
class ThirdPartyTest : public testing::Test {
+ public:
+ ThirdPartyTest(const ThirdPartyTest&) = delete;
+ ThirdPartyTest& operator=(const ThirdPartyTest&) = delete;
+
protected:
ThirdPartyTest() = default;
@@ -236,8 +240,6 @@
base::File bl_file_;
std::wstring bl_test_file_path_;
std::wstring exe_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyTest);
};
//------------------------------------------------------------------------------
diff --git a/chrome/chrome_elf/third_party_dlls/packed_list_file_unittest.cc b/chrome/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
index 7c45aa47..3e244b7 100644
--- a/chrome/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
+++ b/chrome/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
@@ -119,6 +119,10 @@
//------------------------------------------------------------------------------
class ThirdPartyFileTest : public testing::Test {
+ public:
+ ThirdPartyFileTest(const ThirdPartyFileTest&) = delete;
+ ThirdPartyFileTest& operator=(const ThirdPartyFileTest&) = delete;
+
protected:
ThirdPartyFileTest() = default;
@@ -175,8 +179,6 @@
std::wstring bl_test_file_path_;
std::vector<TestModule> test_array_;
std::vector<PackedListModule> test_packed_array_;
-
- DISALLOW_COPY_AND_ASSIGN(ThirdPartyFileTest);
};
//------------------------------------------------------------------------------
diff --git a/chrome/common/auto_start_linux.h b/chrome/common/auto_start_linux.h
index 600c6ad4..a386136 100644
--- a/chrome/common/auto_start_linux.h
+++ b/chrome/common/auto_start_linux.h
@@ -16,6 +16,10 @@
class AutoStart {
public:
+ AutoStart() = delete;
+ AutoStart(const AutoStart&) = delete;
+ AutoStart& operator=(const AutoStart&) = delete;
+
// Registers an application to autostart on user login. |is_terminal_app|
// specifies whether the app will run in a terminal window.
static bool AddApplication(const std::string& autostart_filename,
@@ -33,9 +37,6 @@
std::string* value);
// Gets the path to the autostart directory.
static base::FilePath GetAutostartDirectory(base::Environment* environment);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(AutoStart);
};
#endif // CHROME_COMMON_AUTO_START_LINUX_H_
diff --git a/chrome/common/chrome_content_client_unittest.cc b/chrome/common/chrome_content_client_unittest.cc
index 2a0c12b..1130020 100644
--- a/chrome/common/chrome_content_client_unittest.cc
+++ b/chrome/common/chrome_content_client_unittest.cc
@@ -142,6 +142,11 @@
ChromeContentClient* chrome_client)
: chrome_client_(chrome_client) {}
+ OriginTrialInitializationTestThread(
+ const OriginTrialInitializationTestThread&) = delete;
+ OriginTrialInitializationTestThread& operator=(
+ const OriginTrialInitializationTestThread&) = delete;
+
void ThreadMain() override { AccessPolicy(chrome_client_, &policy_objects_); }
// Static helper which can also be called from the main thread.
@@ -163,8 +168,6 @@
private:
ChromeContentClient* chrome_client_;
std::vector<blink::OriginTrialPolicy*> policy_objects_;
-
- DISALLOW_COPY_AND_ASSIGN(OriginTrialInitializationTestThread);
};
// Test that the lazy initialization of Origin Trial policy is resistant to
diff --git a/chrome/common/conflicts/module_watcher_win_unittest.cc b/chrome/common/conflicts/module_watcher_win_unittest.cc
index bdc0646..295a7b4 100644
--- a/chrome/common/conflicts/module_watcher_win_unittest.cc
+++ b/chrome/common/conflicts/module_watcher_win_unittest.cc
@@ -13,6 +13,10 @@
#include <windows.h>
class ModuleWatcherTest : public testing::Test {
+ public:
+ ModuleWatcherTest(const ModuleWatcherTest&) = delete;
+ ModuleWatcherTest& operator=(const ModuleWatcherTest&) = delete;
+
protected:
ModuleWatcherTest()
: module_(nullptr),
@@ -72,9 +76,6 @@
int module_already_loaded_event_count_;
// Total number of MODULE_LOADED events seen.
int module_loaded_event_count_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ModuleWatcherTest);
};
TEST_F(ModuleWatcherTest, SingleModuleWatcherOnly) {
diff --git a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
index dbf34a1..7b142e7 100644
--- a/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
+++ b/chrome/common/extensions/api/system_indicator/system_indicator_handler.cc
@@ -20,11 +20,13 @@
struct SystemIndicatorInfo : public Extension::ManifestData {
SystemIndicatorInfo();
+
+ SystemIndicatorInfo(const SystemIndicatorInfo&) = delete;
+ SystemIndicatorInfo& operator=(const SystemIndicatorInfo&) = delete;
+
~SystemIndicatorInfo() override;
ExtensionIconSet icon_set;
-
- DISALLOW_COPY_AND_ASSIGN(SystemIndicatorInfo);
};
SystemIndicatorInfo::SystemIndicatorInfo() {}
diff --git a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h
index 3c8efaf3..1a3c549c 100644
--- a/chrome/common/extensions/api/url_handlers/url_handlers_parser.h
+++ b/chrome/common/extensions/api/url_handlers/url_handlers_parser.h
@@ -19,7 +19,12 @@
struct UrlHandlerInfo {
UrlHandlerInfo();
+
+ UrlHandlerInfo(const UrlHandlerInfo&) = delete;
+ UrlHandlerInfo& operator=(const UrlHandlerInfo&) = delete;
+
UrlHandlerInfo(UrlHandlerInfo&& other);
+
~UrlHandlerInfo();
// ID identifying this handler in the manifest.
@@ -28,8 +33,6 @@
std::string title;
// URL patterns associated with this handler.
URLPatternSet patterns;
-
- DISALLOW_COPY_AND_ASSIGN(UrlHandlerInfo);
};
struct UrlHandlers : public Extension::ManifestData {
diff --git a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h
index 066e522..59007ed7 100644
--- a/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h
+++ b/chrome/common/extensions/manifest_handlers/settings_overrides_handler.h
@@ -25,6 +25,10 @@
// homepage and append a startup page to the list.
struct SettingsOverrides : public Extension::ManifestData {
SettingsOverrides();
+
+ SettingsOverrides(const SettingsOverrides&) = delete;
+ SettingsOverrides& operator=(const SettingsOverrides&) = delete;
+
~SettingsOverrides() override;
static const SettingsOverrides* Get(const Extension* extension);
@@ -33,9 +37,6 @@
search_engine;
std::unique_ptr<GURL> homepage;
std::vector<GURL> startup_pages;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SettingsOverrides);
};
class SettingsOverridesHandler : public ManifestHandler {
diff --git a/chrome/common/importer/importer_bridge.h b/chrome/common/importer/importer_bridge.h
index 012b94f..9f02482 100644
--- a/chrome/common/importer/importer_bridge.h
+++ b/chrome/common/importer/importer_bridge.h
@@ -27,6 +27,9 @@
public:
ImporterBridge();
+ ImporterBridge(const ImporterBridge&) = delete;
+ ImporterBridge& operator=(const ImporterBridge&) = delete;
+
virtual void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
const std::u16string& first_folder_name) = 0;
@@ -71,8 +74,6 @@
friend class base::RefCountedThreadSafe<ImporterBridge>;
virtual ~ImporterBridge();
-
- DISALLOW_COPY_AND_ASSIGN(ImporterBridge);
};
#endif // CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_
diff --git a/chrome/common/profiler/thread_profiler_unittest.cc b/chrome/common/profiler/thread_profiler_unittest.cc
index 8b8acbc..6b5e821 100644
--- a/chrome/common/profiler/thread_profiler_unittest.cc
+++ b/chrome/common/profiler/thread_profiler_unittest.cc
@@ -23,6 +23,9 @@
tick_clock_.SetNowTicks(kStartTime);
}
+ TestScheduler(const TestScheduler&) = delete;
+ TestScheduler& operator=(const TestScheduler&) = delete;
+
double RandDouble() const override { return rand_double_value_; }
base::TimeTicks Now() const override { return tick_clock_.NowTicks(); }
@@ -33,8 +36,6 @@
static constexpr base::TimeTicks kStartTime = base::TimeTicks();
base::SimpleTestTickClock tick_clock_;
double rand_double_value_;
-
- DISALLOW_COPY_AND_ASSIGN(TestScheduler);
};
constexpr base::TimeTicks TestScheduler::kStartTime;
diff --git a/chrome/common/ref_counted_util.h b/chrome/common/ref_counted_util.h
index b8dd6e06..20c9914 100644
--- a/chrome/common/ref_counted_util.h
+++ b/chrome/common/ref_counted_util.h
@@ -20,13 +20,14 @@
explicit RefCountedVector(const std::vector<T>& initializer)
: data(initializer) {}
+ RefCountedVector(const RefCountedVector&) = delete;
+ RefCountedVector& operator=(const RefCountedVector&) = delete;
+
std::vector<T> data;
private:
friend class base::RefCountedThreadSafe<RefCountedVector<T>>;
~RefCountedVector() {}
-
- DISALLOW_COPY_AND_ASSIGN(RefCountedVector<T>);
};
#endif // CHROME_COMMON_REF_COUNTED_UTIL_H__
diff --git a/chrome/common/safe_browsing/binary_feature_extractor.h b/chrome/common/safe_browsing/binary_feature_extractor.h
index b0bf4bf..9adb79d 100644
--- a/chrome/common/safe_browsing/binary_feature_extractor.h
+++ b/chrome/common/safe_browsing/binary_feature_extractor.h
@@ -38,6 +38,9 @@
BinaryFeatureExtractor();
+ BinaryFeatureExtractor(const BinaryFeatureExtractor&) = delete;
+ BinaryFeatureExtractor& operator=(const BinaryFeatureExtractor&) = delete;
+
// Fills in the DownloadRequest_SignatureInfo for the given file path.
// This method may be called on any thread.
virtual void CheckSignature(
@@ -78,9 +81,6 @@
protected:
friend class base::RefCountedThreadSafe<BinaryFeatureExtractor>;
virtual ~BinaryFeatureExtractor();
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BinaryFeatureExtractor);
};
} // namespace safe_browsing
diff --git a/chrome/common/safe_browsing/disk_image_type_sniffer_mac.h b/chrome/common/safe_browsing/disk_image_type_sniffer_mac.h
index 8dea4fd..f77a93f 100644
--- a/chrome/common/safe_browsing/disk_image_type_sniffer_mac.h
+++ b/chrome/common/safe_browsing/disk_image_type_sniffer_mac.h
@@ -20,6 +20,9 @@
public:
DiskImageTypeSnifferMac();
+ DiskImageTypeSnifferMac(const DiskImageTypeSnifferMac&) = delete;
+ DiskImageTypeSnifferMac& operator=(const DiskImageTypeSnifferMac&) = delete;
+
// Reads trailer from file to see if it is a DMG type. Must be called on the
// FILE thread.
static bool IsAppleDiskImage(const base::FilePath& dmg_file);
@@ -34,8 +37,6 @@
friend class base::RefCountedThreadSafe<DiskImageTypeSnifferMac>;
~DiskImageTypeSnifferMac();
-
- DISALLOW_COPY_AND_ASSIGN(DiskImageTypeSnifferMac);
};
} // namespace safe_browsing
diff --git a/chrome/common/safe_browsing/mock_binary_feature_extractor.h b/chrome/common/safe_browsing/mock_binary_feature_extractor.h
index a3223f1..d2ba465 100644
--- a/chrome/common/safe_browsing/mock_binary_feature_extractor.h
+++ b/chrome/common/safe_browsing/mock_binary_feature_extractor.h
@@ -13,6 +13,11 @@
class MockBinaryFeatureExtractor : public BinaryFeatureExtractor {
public:
MockBinaryFeatureExtractor();
+
+ MockBinaryFeatureExtractor(const MockBinaryFeatureExtractor&) = delete;
+ MockBinaryFeatureExtractor& operator=(const MockBinaryFeatureExtractor&) =
+ delete;
+
MOCK_METHOD2(CheckSignature,
void(const base::FilePath&,
ClientDownloadRequest_SignatureInfo*));
@@ -24,9 +29,6 @@
protected:
~MockBinaryFeatureExtractor() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MockBinaryFeatureExtractor);
};
} // namespace safe_browsing
diff --git a/chrome/credential_provider/extension/scoped_handle.h b/chrome/credential_provider/extension/scoped_handle.h
index b2f9749..5a083bbc 100644
--- a/chrome/credential_provider/extension/scoped_handle.h
+++ b/chrome/credential_provider/extension/scoped_handle.h
@@ -16,6 +16,10 @@
public:
typedef SC_HANDLE Handle;
+ ScHandleTraits() = delete;
+ ScHandleTraits(const ScHandleTraits&) = delete;
+ ScHandleTraits& operator=(const ScHandleTraits&) = delete;
+
static bool CloseHandle(SC_HANDLE handle) {
return ::CloseServiceHandle(handle) != FALSE;
}
@@ -23,9 +27,6 @@
static bool IsHandleValid(SC_HANDLE handle) { return handle != nullptr; }
static SC_HANDLE NullHandle() { return nullptr; }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScHandleTraits);
};
typedef base::win::GenericScopedHandle<ScHandleTraits,
@@ -36,6 +37,10 @@
public:
using Handle = HANDLE;
+ TimerTraits() = delete;
+ TimerTraits(const TimerTraits&) = delete;
+ TimerTraits& operator=(const TimerTraits&) = delete;
+
static bool CloseHandle(HANDLE handle) {
return ::DeleteTimerQueue(handle) != FALSE;
}
@@ -43,9 +48,6 @@
static bool IsHandleValid(HANDLE handle) { return handle != nullptr; }
static HANDLE NullHandle() { return nullptr; }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(TimerTraits);
};
typedef base::win::GenericScopedHandle<TimerTraits,
diff --git a/chrome/credential_provider/extension/service.h b/chrome/credential_provider/extension/service.h
index 4855561..64996b9 100644
--- a/chrome/credential_provider/extension/service.h
+++ b/chrome/credential_provider/extension/service.h
@@ -20,6 +20,9 @@
// Gets the singleton instance of the service.
static Service* Get();
+ Service(const Service&) = delete;
+ Service& operator=(const Service&) = delete;
+
// Invoke the chosen action routine. By default service runs as a service,
// but the action routine can support running in console for testing purposes.
DWORD Run();
@@ -61,8 +64,6 @@
// Callback to end running periodic tasks.
base::OnceClosure quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(Service);
};
} // namespace extension
diff --git a/chrome/credential_provider/gaiacp/scoped_handle.h b/chrome/credential_provider/gaiacp/scoped_handle.h
index 32d3925..c6307b3 100644
--- a/chrome/credential_provider/gaiacp/scoped_handle.h
+++ b/chrome/credential_provider/gaiacp/scoped_handle.h
@@ -20,6 +20,10 @@
public:
using Handle = HWINSTA;
+ WindowStationTraits() = delete;
+ WindowStationTraits(const WindowStationTraits&) = delete;
+ WindowStationTraits& operator=(const WindowStationTraits&) = delete;
+
static bool CloseHandle(HWINSTA handle) {
return ::CloseWindowStation(handle) != FALSE;
}
@@ -31,9 +35,6 @@
static HWINSTA NullHandle() {
return nullptr;
}
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(WindowStationTraits);
};
typedef base::win::GenericScopedHandle<WindowStationTraits,
@@ -46,6 +47,10 @@
public:
using Handle = HDESK;
+ DesktopTraits() = delete;
+ DesktopTraits(const DesktopTraits&) = delete;
+ DesktopTraits& operator=(const DesktopTraits&) = delete;
+
static bool CloseHandle(HDESK handle) {
return ::CloseDesktop(handle) != FALSE;
}
@@ -57,9 +62,6 @@
static HDESK NullHandle() {
return nullptr;
}
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(DesktopTraits);
};
typedef base::win::GenericScopedHandle<DesktopTraits,
@@ -72,6 +74,10 @@
public:
using Handle = HINTERNET;
+ WinHttpTraits() = delete;
+ WinHttpTraits(const WinHttpTraits&) = delete;
+ WinHttpTraits& operator=(const WinHttpTraits&) = delete;
+
static bool CloseHandle(HINTERNET handle) {
return ::WinHttpCloseHandle(handle) != FALSE;
}
@@ -83,9 +89,6 @@
static HINTERNET NullHandle() {
return nullptr;
}
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(WinHttpTraits);
};
typedef base::win::GenericScopedHandle<WinHttpTraits,
diff --git a/chrome/credential_provider/test/gcp_gls_output_unittest.cc b/chrome/credential_provider/test/gcp_gls_output_unittest.cc
index 383429c..6ebdcea 100644
--- a/chrome/credential_provider/test/gcp_gls_output_unittest.cc
+++ b/chrome/credential_provider/test/gcp_gls_output_unittest.cc
@@ -23,6 +23,10 @@
namespace credential_provider {
class GcpUsingChromeTest : public ::testing::Test {
+ public:
+ GcpUsingChromeTest(const GcpUsingChromeTest&) = delete;
+ GcpUsingChromeTest& operator=(const GcpUsingChromeTest&) = delete;
+
protected:
struct TestGoogleApiResponse {
TestGoogleApiResponse()
@@ -92,9 +96,6 @@
TestGoogleApiResponse user_info_response_;
TestGoogleApiResponse token_info_response_;
TestGoogleApiResponse mdm_token_response_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GcpUsingChromeTest);
};
GcpUsingChromeTest::GcpUsingChromeTest()
diff --git a/chrome/elevation_service/elevator.h b/chrome/elevation_service/elevator.h
index 3fc2215..48b2e03 100644
--- a/chrome/elevation_service/elevator.h
+++ b/chrome/elevation_service/elevator.h
@@ -27,6 +27,9 @@
public:
Elevator() = default;
+ Elevator(const Elevator&) = delete;
+ Elevator& operator=(const Elevator&) = delete;
+
// Securely validates and runs the provided Chrome Recovery CRX elevated, by
// first copying the CRX to a secure directory under %ProgramFiles% to
// validate and unpack the CRX.
@@ -39,8 +42,6 @@
private:
~Elevator() override = default;
-
- DISALLOW_COPY_AND_ASSIGN(Elevator);
};
} // namespace elevation_service
diff --git a/chrome/elevation_service/service_main.h b/chrome/elevation_service/service_main.h
index 3a5edcca..d0a5cb02 100644
--- a/chrome/elevation_service/service_main.h
+++ b/chrome/elevation_service/service_main.h
@@ -23,6 +23,9 @@
public:
static ServiceMain* GetInstance();
+ ServiceMain(const ServiceMain&) = delete;
+ ServiceMain& operator=(const ServiceMain&) = delete;
+
// This function parses the command line and selects the action routine.
bool InitWithCommandLine(const base::CommandLine* command_line);
@@ -105,8 +108,6 @@
base::WaitableEvent exit_signal_;
friend class base::NoDestructor<ServiceMain>;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceMain);
};
} // namespace elevation_service
diff --git a/chrome/install_static/install_details_unittest.cc b/chrome/install_static/install_details_unittest.cc
index 56547d1..362860e 100644
--- a/chrome/install_static/install_details_unittest.cc
+++ b/chrome/install_static/install_details_unittest.cc
@@ -36,6 +36,9 @@
payload.channel_length = channel.length();
}
+ FakeInstallDetails(const FakeInstallDetails&) = delete;
+ FakeInstallDetails& operator=(const FakeInstallDetails&) = delete;
+
void set_product_version(const char* version) {
product_version.assign(version);
payload.product_version = product_version.c_str();
@@ -49,8 +52,6 @@
std::wstring channel = std::wstring(L"testchannel");
std::string product_version = std::string(PRODUCT_VERSION);
Payload payload = Payload();
-
- DISALLOW_COPY_AND_ASSIGN(FakeInstallDetails);
};
TEST(InstallDetailsTest, GetClientStateKeyPath) {
diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc
index 1e913fbc..504e42a 100644
--- a/chrome/install_static/install_util_unittest.cc
+++ b/chrome/install_static/install_util_unittest.cc
@@ -269,6 +269,10 @@
class InstallStaticUtilTest
: public ::testing::TestWithParam<
std::tuple<InstallConstantIndex, const char*>> {
+ public:
+ InstallStaticUtilTest(const InstallStaticUtilTest&) = delete;
+ InstallStaticUtilTest& operator=(const InstallStaticUtilTest&) = delete;
+
protected:
InstallStaticUtilTest()
: system_level_(std::string(std::get<1>(GetParam())) != "user"),
@@ -339,8 +343,6 @@
const HKEY root_key_;
const nt::ROOT_KEY nt_root_key_;
registry_util::RegistryOverrideManager override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(InstallStaticUtilTest);
};
TEST_P(InstallStaticUtilTest, GetChromeInstallSubDirectory) {
diff --git a/chrome/install_static/product_install_details_unittest.cc b/chrome/install_static/product_install_details_unittest.cc
index f736daa..496aa5c 100644
--- a/chrome/install_static/product_install_details_unittest.cc
+++ b/chrome/install_static/product_install_details_unittest.cc
@@ -207,6 +207,10 @@
// Test that MakeProductDetails properly sniffs out an install's details.
class MakeProductDetailsTest : public testing::TestWithParam<TestData> {
+ public:
+ MakeProductDetailsTest(const MakeProductDetailsTest&) = delete;
+ MakeProductDetailsTest& operator=(const MakeProductDetailsTest&) = delete;
+
protected:
MakeProductDetailsTest()
: test_data_(GetParam()),
@@ -279,8 +283,6 @@
const TestData& test_data_;
HKEY root_key_;
nt::ROOT_KEY nt_root_key_;
-
- DISALLOW_COPY_AND_ASSIGN(MakeProductDetailsTest);
};
// Test that the install mode is sniffed properly based on the path.
diff --git a/chrome/installer/mini_installer/configuration_test.cc b/chrome/installer/mini_installer/configuration_test.cc
index 2b69569..e2484475 100644
--- a/chrome/installer/mini_installer/configuration_test.cc
+++ b/chrome/installer/mini_installer/configuration_test.cc
@@ -44,8 +44,8 @@
EXPECT_TRUE(ParseCommandLine(command_line));
}
- private:
- DISALLOW_COPY_AND_ASSIGN(TestConfiguration);
+ TestConfiguration(const TestConfiguration&) = delete;
+ TestConfiguration& operator=(const TestConfiguration&) = delete;
};
} // namespace
@@ -54,6 +54,11 @@
protected:
MiniInstallerConfigurationTest() = default;
+ MiniInstallerConfigurationTest(const MiniInstallerConfigurationTest&) =
+ delete;
+ MiniInstallerConfigurationTest& operator=(
+ const MiniInstallerConfigurationTest&) = delete;
+
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(
registry_overrides_.OverrideRegistry(HKEY_CURRENT_USER));
@@ -63,8 +68,6 @@
private:
registry_util::RegistryOverrideManager registry_overrides_;
-
- DISALLOW_COPY_AND_ASSIGN(MiniInstallerConfigurationTest);
};
TEST_F(MiniInstallerConfigurationTest, Program) {
diff --git a/chrome/installer/mini_installer/mini_installer_unittest.cc b/chrome/installer/mini_installer/mini_installer_unittest.cc
index 60c21f03..5e3b992 100644
--- a/chrome/installer/mini_installer/mini_installer_unittest.cc
+++ b/chrome/installer/mini_installer/mini_installer_unittest.cc
@@ -75,6 +75,11 @@
// A test harness for GetPreviousSetupExePath.
class GetPreviousSetupExePathTest : public ::testing::Test {
+ public:
+ GetPreviousSetupExePathTest(const GetPreviousSetupExePathTest&) = delete;
+ GetPreviousSetupExePathTest& operator=(const GetPreviousSetupExePathTest&) =
+ delete;
+
protected:
GetPreviousSetupExePathTest() = default;
~GetPreviousSetupExePathTest() override = default;
@@ -103,7 +108,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
FakeConfiguration configuration_;
- DISALLOW_COPY_AND_ASSIGN(GetPreviousSetupExePathTest);
};
// Tests that the path is returned.
diff --git a/chrome/installer/setup/install_unittest.cc b/chrome/installer/setup/install_unittest.cc
index d4b96f5..e6624dc 100644
--- a/chrome/installer/setup/install_unittest.cc
+++ b/chrome/installer/setup/install_unittest.cc
@@ -57,6 +57,11 @@
expected_manifest_(std::get<1>(GetParam())),
version_("0.0.0.0") {}
+ CreateVisualElementsManifestTest(const CreateVisualElementsManifestTest&) =
+ delete;
+ CreateVisualElementsManifestTest& operator=(
+ const CreateVisualElementsManifestTest&) = delete;
+
void SetUp() override {
// Create a temp directory for testing.
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
@@ -125,9 +130,6 @@
// The path to the Start Menu shortcut.
base::FilePath start_menu_shortcut_path_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CreateVisualElementsManifestTest);
};
constexpr char kExpectedPrimaryManifest[] =
@@ -462,12 +464,12 @@
: shortcut_operation_(testing::get<0>(GetParam())),
shortcut_level_(testing::get<1>(GetParam())) {}
+ MigrateShortcutTest(const MigrateShortcutTest&) = delete;
+ MigrateShortcutTest& operator=(const MigrateShortcutTest&) = delete;
+
protected:
const installer::InstallShortcutOperation shortcut_operation_;
const installer::InstallShortcutLevel shortcut_level_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MigrateShortcutTest);
};
TEST_P(MigrateShortcutTest, MigrateAwayFromDeprecatedStartMenuTest) {
diff --git a/chrome/installer/setup/installer_state_unittest.cc b/chrome/installer/setup/installer_state_unittest.cc
index 831aac6f..e02f62e 100644
--- a/chrome/installer/setup/installer_state_unittest.cc
+++ b/chrome/installer/setup/installer_state_unittest.cc
@@ -44,15 +44,16 @@
using registry_util::RegistryOverrideManager;
class InstallerStateTest : public testing::Test {
+ public:
+ InstallerStateTest(const InstallerStateTest&) = delete;
+ InstallerStateTest& operator=(const InstallerStateTest&) = delete;
+
protected:
InstallerStateTest() {}
void SetUp() override { ASSERT_TRUE(test_dir_.CreateUniqueTempDir()); }
base::ScopedTempDir test_dir_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InstallerStateTest);
};
// An installer state on which we can access otherwise protected members.
diff --git a/chrome/installer/setup/setup_install_details_unittest.cc b/chrome/installer/setup/setup_install_details_unittest.cc
index 78362ff..28a21201 100644
--- a/chrome/installer/setup/setup_install_details_unittest.cc
+++ b/chrome/installer/setup/setup_install_details_unittest.cc
@@ -468,6 +468,10 @@
#endif // !BUILDFLAG(GOOGLE_CHROME_BRANDING)
class MakeInstallDetailsTest : public testing::TestWithParam<TestData> {
+ public:
+ MakeInstallDetailsTest(const MakeInstallDetailsTest&) = delete;
+ MakeInstallDetailsTest& operator=(const MakeInstallDetailsTest&) = delete;
+
protected:
MakeInstallDetailsTest()
: test_data_(GetParam()),
@@ -534,8 +538,6 @@
nt::ROOT_KEY nt_root_key_;
base::CommandLine command_line_;
std::unique_ptr<installer::InitialPreferences> initial_preferences_;
-
- DISALLOW_COPY_AND_ASSIGN(MakeInstallDetailsTest);
};
TEST_P(MakeInstallDetailsTest, Test) {
diff --git a/chrome/installer/setup/setup_singleton_unittest.cc b/chrome/installer/setup/setup_singleton_unittest.cc
index 0e96f57..4d8920c 100644
--- a/chrome/installer/setup/setup_singleton_unittest.cc
+++ b/chrome/installer/setup/setup_singleton_unittest.cc
@@ -127,6 +127,9 @@
public:
SetupSingletonTest() = default;
+ SetupSingletonTest(const SetupSingletonTest&) = delete;
+ SetupSingletonTest& operator=(const SetupSingletonTest&) = delete;
+
void SetUp() override { ASSERT_TRUE(install_dir_.CreateUniqueTempDir()); }
base::CommandLine MakeCmdLine(const std::string& procname) override {
@@ -148,8 +151,6 @@
private:
base::ScopedTempDir install_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(SetupSingletonTest);
};
} // namespace
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index 607ae1a..3c9f507 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -376,6 +376,10 @@
// A test fixture that configures an InstallationState and an InstallerState
// with a product being updated.
class FindArchiveToPatchTest : public testing::Test {
+ public:
+ FindArchiveToPatchTest(const FindArchiveToPatchTest&) = delete;
+ FindArchiveToPatchTest& operator=(const FindArchiveToPatchTest&) = delete;
+
protected:
class FakeInstallationState : public installer::InstallationState {};
@@ -472,8 +476,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(FindArchiveToPatchTest);
};
const bool FindArchiveToPatchTest::kSystemInstall_ = false;
@@ -799,6 +801,10 @@
}
class LegacyCleanupsTest : public ::testing::Test {
+ public:
+ LegacyCleanupsTest(const LegacyCleanupsTest&) = delete;
+ LegacyCleanupsTest& operator=(const LegacyCleanupsTest&) = delete;
+
protected:
LegacyCleanupsTest() = default;
void SetUp() override {
@@ -887,7 +893,6 @@
base::ScopedTempDir temp_dir_;
registry_util::RegistryOverrideManager registry_override_manager_;
std::unique_ptr<FakeInstallerState> installer_state_;
- DISALLOW_COPY_AND_ASSIGN(LegacyCleanupsTest);
};
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
diff --git a/chrome/installer/setup/update_active_setup_version_work_item.h b/chrome/installer/setup/update_active_setup_version_work_item.h
index 24921f3..96b0541 100644
--- a/chrome/installer/setup/update_active_setup_version_work_item.h
+++ b/chrome/installer/setup/update_active_setup_version_work_item.h
@@ -45,6 +45,11 @@
UpdateActiveSetupVersionWorkItem(const std::wstring& active_setup_path,
Operation operation);
+ UpdateActiveSetupVersionWorkItem(const UpdateActiveSetupVersionWorkItem&) =
+ delete;
+ UpdateActiveSetupVersionWorkItem& operator=(
+ const UpdateActiveSetupVersionWorkItem&) = delete;
+
private:
// WorkItem:
bool DoImpl() override;
@@ -61,8 +66,6 @@
// The Operation to be performed by this WorkItem when executed.
const Operation operation_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateActiveSetupVersionWorkItem);
};
#endif // CHROME_INSTALLER_SETUP_UPDATE_ACTIVE_SETUP_VERSION_WORK_ITEM_H_
diff --git a/chrome/installer/setup/update_active_setup_version_work_item_unittest.cc b/chrome/installer/setup/update_active_setup_version_work_item_unittest.cc
index 4212b11..1ab604c 100644
--- a/chrome/installer/setup/update_active_setup_version_work_item_unittest.cc
+++ b/chrome/installer/setup/update_active_setup_version_work_item_unittest.cc
@@ -78,6 +78,11 @@
public:
UpdateActiveSetupVersionWorkItemTest() {}
+ UpdateActiveSetupVersionWorkItemTest(
+ const UpdateActiveSetupVersionWorkItemTest&) = delete;
+ UpdateActiveSetupVersionWorkItemTest& operator=(
+ const UpdateActiveSetupVersionWorkItemTest&) = delete;
+
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(
registry_override_manager_.OverrideRegistry(kActiveSetupRoot));
@@ -85,8 +90,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(UpdateActiveSetupVersionWorkItemTest);
};
TEST_P(UpdateActiveSetupVersionWorkItemTest, Execute) {
diff --git a/chrome/installer/setup/user_experiment_unittest.cc b/chrome/installer/setup/user_experiment_unittest.cc
index 5ab3f21..8767ee69 100644
--- a/chrome/installer/setup/user_experiment_unittest.cc
+++ b/chrome/installer/setup/user_experiment_unittest.cc
@@ -20,6 +20,10 @@
namespace installer {
class UserExperimentTest : public ::testing::TestWithParam<bool> {
+ public:
+ UserExperimentTest(const UserExperimentTest&) = delete;
+ UserExperimentTest& operator=(const UserExperimentTest&) = delete;
+
protected:
UserExperimentTest()
: system_level_(GetParam()),
@@ -58,7 +62,6 @@
const HKEY root_;
registry_util::RegistryOverrideManager registry_override_manager_;
install_static::ScopedInstallDetails install_details_;
- DISALLOW_COPY_AND_ASSIGN(UserExperimentTest);
};
TEST_P(UserExperimentTest, WriteInitialStateNoData) {
diff --git a/chrome/installer/setup/user_hive_visitor_unittest.cc b/chrome/installer/setup/user_hive_visitor_unittest.cc
index b3583d0f..d63a967d 100644
--- a/chrome/installer/setup/user_hive_visitor_unittest.cc
+++ b/chrome/installer/setup/user_hive_visitor_unittest.cc
@@ -21,6 +21,9 @@
public:
UserHiveVisitor() = default;
+ UserHiveVisitor(const UserHiveVisitor&) = delete;
+ UserHiveVisitor& operator=(const UserHiveVisitor&) = delete;
+
bool OnUserHive(const wchar_t* sid, base::win::RegKey* key) {
EXPECT_NE(nullptr, sid);
EXPECT_STRNE(L"", sid);
@@ -37,8 +40,6 @@
private:
std::vector<std::wstring> sids_visited_;
bool early_exit_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(UserHiveVisitor);
};
} // namespace
diff --git a/chrome/installer/util/advanced_firewall_manager_win_unittest.cc b/chrome/installer/util/advanced_firewall_manager_win_unittest.cc
index 1014c21c..6a1f8e92 100644
--- a/chrome/installer/util/advanced_firewall_manager_win_unittest.cc
+++ b/chrome/installer/util/advanced_firewall_manager_win_unittest.cc
@@ -19,6 +19,10 @@
public:
AdvancedFirewallManagerTest() : skip_test_(true) {}
+ AdvancedFirewallManagerTest(const AdvancedFirewallManagerTest&) = delete;
+ AdvancedFirewallManagerTest& operator=(const AdvancedFirewallManagerTest&) =
+ delete;
+
protected:
// Sets up the test fixture.
void SetUp() override {
@@ -54,9 +58,6 @@
bool skip_test_;
AdvancedFirewallManager manager_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AdvancedFirewallManagerTest);
};
TEST_F(AdvancedFirewallManagerTest, NoRule) {
diff --git a/chrome/installer/util/delete_old_versions_unittest.cc b/chrome/installer/util/delete_old_versions_unittest.cc
index 04285973..c819d77 100644
--- a/chrome/installer/util/delete_old_versions_unittest.cc
+++ b/chrome/installer/util/delete_old_versions_unittest.cc
@@ -28,6 +28,10 @@
namespace {
class DeleteOldVersionsTest : public testing::Test {
+ public:
+ DeleteOldVersionsTest(const DeleteOldVersionsTest&) = delete;
+ DeleteOldVersionsTest& operator=(const DeleteOldVersionsTest&) = delete;
+
protected:
DeleteOldVersionsTest() = default;
@@ -98,8 +102,6 @@
private:
base::ScopedTempDir install_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(DeleteOldVersionsTest);
};
} // namespace
diff --git a/chrome/installer/util/delete_reg_value_work_item_unittest.cc b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
index f643a671..7b254ad 100644
--- a/chrome/installer/util/delete_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/delete_reg_value_work_item_unittest.cc
@@ -24,6 +24,11 @@
const wchar_t kNameDword[] = L"name_dword";
class DeleteRegValueWorkItemTest : public testing::Test {
+ public:
+ DeleteRegValueWorkItemTest(const DeleteRegValueWorkItemTest&) = delete;
+ DeleteRegValueWorkItemTest& operator=(const DeleteRegValueWorkItemTest&) =
+ delete;
+
protected:
DeleteRegValueWorkItemTest() {}
@@ -34,8 +39,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(DeleteRegValueWorkItemTest);
};
} // namespace
diff --git a/chrome/installer/util/delete_tree_work_item_unittest.cc b/chrome/installer/util/delete_tree_work_item_unittest.cc
index 622307fe..a1e3735 100644
--- a/chrome/installer/util/delete_tree_work_item_unittest.cc
+++ b/chrome/installer/util/delete_tree_work_item_unittest.cc
@@ -18,6 +18,10 @@
constexpr char kTextContent[] = "delete me";
class DeleteTreeWorkItemTest : public testing::Test {
+ public:
+ DeleteTreeWorkItemTest(const DeleteTreeWorkItemTest&) = delete;
+ DeleteTreeWorkItemTest& operator=(const DeleteTreeWorkItemTest&) = delete;
+
protected:
DeleteTreeWorkItemTest() = default;
@@ -71,8 +75,6 @@
base::FilePath dir_name_2_;
base::FilePath file_name_1_;
base::FilePath file_name_2_;
-
- DISALLOW_COPY_AND_ASSIGN(DeleteTreeWorkItemTest);
};
} // namespace
diff --git a/chrome/installer/util/experiment_labels.h b/chrome/installer/util/experiment_labels.h
index e490298..dc03c70 100644
--- a/chrome/installer/util/experiment_labels.h
+++ b/chrome/installer/util/experiment_labels.h
@@ -21,6 +21,9 @@
public:
explicit ExperimentLabels(const std::wstring& value);
+ ExperimentLabels(const ExperimentLabels&) = delete;
+ ExperimentLabels& operator=(const ExperimentLabels&) = delete;
+
// Returns the experiment_labels string containing the individual labels.
const std::wstring& value() const { return value_; }
@@ -52,8 +55,6 @@
// The raw experiment_labels string.
std::wstring value_;
-
- DISALLOW_COPY_AND_ASSIGN(ExperimentLabels);
};
} // namespace installer
diff --git a/chrome/installer/util/experiment_storage.h b/chrome/installer/util/experiment_storage.h
index 4f263f2..7ba8ec3 100644
--- a/chrome/installer/util/experiment_storage.h
+++ b/chrome/installer/util/experiment_storage.h
@@ -91,6 +91,10 @@
};
ExperimentStorage();
+
+ ExperimentStorage(const ExperimentStorage&) = delete;
+ ExperimentStorage& operator=(const ExperimentStorage&) = delete;
+
~ExperimentStorage();
// Returns exclusive access to the experiment storage. The underlying
@@ -143,8 +147,6 @@
// A global mutex with a distinct name for the current installation.
base::win::ScopedHandle mutex_;
-
- DISALLOW_COPY_AND_ASSIGN(ExperimentStorage);
};
} // namespace installer
diff --git a/chrome/installer/util/experiment_storage_unittest.cc b/chrome/installer/util/experiment_storage_unittest.cc
index 30ffa72..4c5e598 100644
--- a/chrome/installer/util/experiment_storage_unittest.cc
+++ b/chrome/installer/util/experiment_storage_unittest.cc
@@ -18,6 +18,10 @@
// Individual tests provide a parameter, which is true if Chrome is installed
// in system level.
class ExperimentStorageTest : public ::testing::TestWithParam<bool> {
+ public:
+ ExperimentStorageTest(const ExperimentStorageTest&) = delete;
+ ExperimentStorageTest& operator=(const ExperimentStorageTest&) = delete;
+
protected:
ExperimentStorageTest()
: system_level_install_(GetParam()),
@@ -45,8 +49,6 @@
private:
install_static::ScopedInstallDetails scoped_install_details_;
registry_util::RegistryOverrideManager override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(ExperimentStorageTest);
};
TEST_P(ExperimentStorageTest, TestEncodeDecodeMetrics) {
diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h
index 057151bb..7f0c237 100644
--- a/chrome/installer/util/google_update_settings.h
+++ b/chrome/installer/util/google_update_settings.h
@@ -71,6 +71,10 @@
int last_extra_code;
};
+ GoogleUpdateSettings() = delete;
+ GoogleUpdateSettings(const GoogleUpdateSettings&) = delete;
+ GoogleUpdateSettings& operator=(const GoogleUpdateSettings&) = delete;
+
// Returns true if this install is system-wide, false if it is per-user.
static bool IsSystemInstall();
@@ -280,9 +284,6 @@
// nothing to |experiment_labels|. This will return true if the label did not
// exist, or was successfully read.
static bool ReadExperimentLabels(std::wstring* experiment_labels);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings);
};
#endif // CHROME_INSTALLER_UTIL_GOOGLE_UPDATE_SETTINGS_H_
diff --git a/chrome/installer/util/install_service_work_item_impl.h b/chrome/installer/util/install_service_work_item_impl.h
index 53d438d..aafd633 100644
--- a/chrome/installer/util/install_service_work_item_impl.h
+++ b/chrome/installer/util/install_service_work_item_impl.h
@@ -119,6 +119,10 @@
public:
using Handle = SC_HANDLE;
+ ScHandleTraits() = delete;
+ ScHandleTraits(const ScHandleTraits&) = delete;
+ ScHandleTraits& operator=(const ScHandleTraits&) = delete;
+
static bool CloseHandle(SC_HANDLE handle) {
return ::CloseServiceHandle(handle) != FALSE;
}
@@ -126,9 +130,6 @@
static bool IsHandleValid(SC_HANDLE handle) { return handle != nullptr; }
static SC_HANDLE NullHandle() { return nullptr; }
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScHandleTraits);
};
using ScopedScHandle =
diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h
index 4f4ce2f..6a3b0ca 100644
--- a/chrome/installer/util/install_util.h
+++ b/chrome/installer/util/install_util.h
@@ -34,6 +34,9 @@
// independently.
class InstallUtil {
public:
+ InstallUtil(const InstallUtil&) = delete;
+ InstallUtil& operator=(const InstallUtil&) = delete;
+
// Attempts to trigger the command that would be run by Active Setup for a
// system-level Chrome. For use only when system-level Chrome is installed.
static void TriggerActiveSetupCommand();
@@ -146,13 +149,14 @@
public:
explicit ValueEquals(const std::wstring& value_to_match)
: value_to_match_(value_to_match) {}
+
+ ValueEquals(const ValueEquals&) = delete;
+ ValueEquals& operator=(const ValueEquals&) = delete;
+
bool Evaluate(const std::wstring& value) const override;
protected:
std::wstring value_to_match_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ValueEquals);
};
// Returns zero on install success, or an InstallStatus value otherwise.
@@ -262,9 +266,6 @@
// Converts a product GUID into a SQuished gUID that is used for MSI installer
// registry entries.
static std::wstring GuidToSquid(base::WStringPiece guid);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InstallUtil);
};
#endif // CHROME_INSTALLER_UTIL_INSTALL_UTIL_H_
diff --git a/chrome/installer/util/install_util_unittest.cc b/chrome/installer/util/install_util_unittest.cc
index 5d5984f..2bbe295 100644
--- a/chrome/installer/util/install_util_unittest.cc
+++ b/chrome/installer/util/install_util_unittest.cc
@@ -106,6 +106,10 @@
};
class InstallUtilTest : public testing::Test {
+ public:
+ InstallUtilTest(const InstallUtilTest&) = delete;
+ InstallUtilTest& operator=(const InstallUtilTest&) = delete;
+
protected:
InstallUtilTest() {}
@@ -123,8 +127,6 @@
private:
std::unique_ptr<registry_util::RegistryOverrideManager>
registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(InstallUtilTest);
};
TEST_F(InstallUtilTest, ComposeCommandLine) {
diff --git a/chrome/installer/util/installation_state.h b/chrome/installer/util/installation_state.h
index 2ac0736..faf1a01 100644
--- a/chrome/installer/util/installation_state.h
+++ b/chrome/installer/util/installation_state.h
@@ -117,6 +117,9 @@
public:
InstallationState();
+ InstallationState(const InstallationState&) = delete;
+ InstallationState& operator=(const InstallationState&) = delete;
+
// Initializes this object with the machine's current state.
void Initialize();
@@ -136,9 +139,6 @@
protected:
ProductState user_chrome_;
ProductState system_chrome_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InstallationState);
}; // class InstallationState
} // namespace installer
diff --git a/chrome/installer/util/registry_entry.h b/chrome/installer/util/registry_entry.h
index 9a46b3ab..8fbea0c 100644
--- a/chrome/installer/util/registry_entry.h
+++ b/chrome/installer/util/registry_entry.h
@@ -55,6 +55,9 @@
const std::wstring& name,
DWORD value);
+ RegistryEntry(const RegistryEntry&) = delete;
+ RegistryEntry& operator=(const RegistryEntry&) = delete;
+
// Flags this RegistryKey with |removal_flag|, indicating that it should be
// removed rather than created. Note that this will not result in cleaning up
// the entire registry hierarchy below RegistryEntry even if it is left empty
@@ -122,8 +125,6 @@
// Returns the RegistryStatus of the current registry entry in
// |root|\|key_path_|\|name_|.
RegistryStatus StatusInRegistryUnderRoot(HKEY root) const;
-
- DISALLOW_COPY_AND_ASSIGN(RegistryEntry);
};
#endif // CHROME_INSTALLER_UTIL_REGISTRY_ENTRY_H_
diff --git a/chrome/installer/util/scoped_token_privilege.h b/chrome/installer/util/scoped_token_privilege.h
index 3def5eb6..1c2be41 100644
--- a/chrome/installer/util/scoped_token_privilege.h
+++ b/chrome/installer/util/scoped_token_privilege.h
@@ -20,7 +20,13 @@
// to know whether |privilege_name| was successfully enabled).
class ScopedTokenPrivilege {
public:
+ ScopedTokenPrivilege() = delete;
+
explicit ScopedTokenPrivilege(const wchar_t* privilege_name);
+
+ ScopedTokenPrivilege(const ScopedTokenPrivilege&) = delete;
+ ScopedTokenPrivilege& operator=(const ScopedTokenPrivilege&) = delete;
+
~ScopedTokenPrivilege();
// Always returns true unless the privilege could not be enabled.
@@ -37,8 +43,6 @@
// The previous state of the privilege this object is responsible for. As set
// by AdjustTokenPrivileges() upon construction.
TOKEN_PRIVILEGES previous_privileges_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(ScopedTokenPrivilege);
};
} // namespace installer
diff --git a/chrome/installer/util/set_reg_value_work_item_unittest.cc b/chrome/installer/util/set_reg_value_work_item_unittest.cc
index ac91369..3d3740c 100644
--- a/chrome/installer/util/set_reg_value_work_item_unittest.cc
+++ b/chrome/installer/util/set_reg_value_work_item_unittest.cc
@@ -30,6 +30,10 @@
const DWORD kDword2 = 6789;
class SetRegValueWorkItemTest : public testing::Test {
+ public:
+ SetRegValueWorkItemTest(const SetRegValueWorkItemTest&) = delete;
+ SetRegValueWorkItemTest& operator=(const SetRegValueWorkItemTest&) = delete;
+
protected:
SetRegValueWorkItemTest() {}
@@ -48,8 +52,6 @@
private:
registry_util::RegistryOverrideManager registry_override_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(SetRegValueWorkItemTest);
};
} // namespace
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index e22ef8b..d48a8f8 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -138,14 +138,16 @@
// LazyInstance.
UserSpecificRegistrySuffix();
+ UserSpecificRegistrySuffix(const UserSpecificRegistrySuffix&) = delete;
+ UserSpecificRegistrySuffix& operator=(const UserSpecificRegistrySuffix&) =
+ delete;
+
// Sets |suffix| to the pre-computed suffix cached in this object.
// Returns true unless the initialization originally failed.
bool GetSuffix(std::wstring* suffix);
private:
std::wstring suffix_;
-
- DISALLOW_COPY_AND_ASSIGN(UserSpecificRegistrySuffix);
}; // class UserSpecificRegistrySuffix
UserSpecificRegistrySuffix::UserSpecificRegistrySuffix() {
diff --git a/chrome/notification_helper/com_server_module_unittest.cc b/chrome/notification_helper/com_server_module_unittest.cc
index 48dbdba..c01a129 100644
--- a/chrome/notification_helper/com_server_module_unittest.cc
+++ b/chrome/notification_helper/com_server_module_unittest.cc
@@ -13,6 +13,10 @@
#include "testing/gtest/include/gtest/gtest.h"
class ComServerModuleTest : public testing::Test {
+ public:
+ ComServerModuleTest(const ComServerModuleTest&) = delete;
+ ComServerModuleTest& operator=(const ComServerModuleTest&) = delete;
+
protected:
ComServerModuleTest() = default;
@@ -52,8 +56,6 @@
// A flag indicating if class registration succeeds.
bool class_registration_succeeded_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(ComServerModuleTest);
};
TEST_F(ComServerModuleTest, EventSignalTest) {
diff --git a/chrome/notification_helper/notification_activator.h b/chrome/notification_helper/notification_activator.h
index 5f7e1f69..6dc9938 100644
--- a/chrome/notification_helper/notification_activator.h
+++ b/chrome/notification_helper/notification_activator.h
@@ -22,6 +22,9 @@
public:
NotificationActivator() = default;
+ NotificationActivator(const NotificationActivator&) = delete;
+ NotificationActivator& operator=(const NotificationActivator&) = delete;
+
// Called when a user interacts with a toast in the Windows action center.
// For the meaning of the input parameters, see
// https://msdn.microsoft.com/library/windows/desktop/mt643712.aspx
@@ -32,9 +35,6 @@
protected:
~NotificationActivator() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NotificationActivator);
};
} // namespace notification_helper
diff --git a/chrome/notification_helper/notification_helper_process_unittest.cc b/chrome/notification_helper/notification_helper_process_unittest.cc
index 5da9831..21b3995 100644
--- a/chrome/notification_helper/notification_helper_process_unittest.cc
+++ b/chrome/notification_helper/notification_helper_process_unittest.cc
@@ -70,6 +70,10 @@
} // namespace
class NotificationHelperTest : public testing::Test {
+ public:
+ NotificationHelperTest(const NotificationHelperTest&) = delete;
+ NotificationHelperTest& operator=(const NotificationHelperTest&) = delete;
+
protected:
NotificationHelperTest() : root_(HKEY_CURRENT_USER) {}
@@ -116,8 +120,6 @@
std::unique_ptr<WorkItemList> work_item_list_;
base::win::ScopedCOMInitializer scoped_com_initializer_;
-
- DISALLOW_COPY_AND_ASSIGN(NotificationHelperTest);
};
TEST_F(NotificationHelperTest, NotificationHelperServerTest) {
diff --git a/chrome/renderer/autofill/page_passwords_analyser_browsertest.cc b/chrome/renderer/autofill/page_passwords_analyser_browsertest.cc
index 1af696b1..de73b49 100644
--- a/chrome/renderer/autofill/page_passwords_analyser_browsertest.cc
+++ b/chrome/renderer/autofill/page_passwords_analyser_browsertest.cc
@@ -116,6 +116,11 @@
} // namespace
class PagePasswordsAnalyserTest : public ChromeRenderViewTest {
+ public:
+ PagePasswordsAnalyserTest(const PagePasswordsAnalyserTest&) = delete;
+ PagePasswordsAnalyserTest& operator=(const PagePasswordsAnalyserTest&) =
+ delete;
+
protected:
PagePasswordsAnalyserTest()
: mock_logger_(new MockPageFormAnalyserLogger()) {}
@@ -160,8 +165,6 @@
PagePasswordsAnalyser page_passwords_analyser;
private:
- DISALLOW_COPY_AND_ASSIGN(PagePasswordsAnalyserTest);
-
std::vector<blink::WebElement> elements_;
std::unique_ptr<MockPageFormAnalyserLogger> mock_logger_;
};
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
index 3104607..8d840556 100644
--- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -313,6 +313,10 @@
public:
PasswordAutofillAgentTest() {}
+ PasswordAutofillAgentTest(const PasswordAutofillAgentTest&) = delete;
+ PasswordAutofillAgentTest& operator=(const PasswordAutofillAgentTest&) =
+ delete;
+
// Simulates the fill password form message being sent to the renderer.
// We use that so we don't have to make RenderView::OnFillPasswordForm()
// protected.
@@ -808,9 +812,6 @@
protected:
base::HistogramTester histogram_tester_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgentTest);
};
// Tests that the password login is autocompleted as expected when the browser
diff --git a/chrome/renderer/autofill/password_generation_agent_browsertest.cc b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
index be9ef5f4..efd57bb 100644
--- a/chrome/renderer/autofill/password_generation_agent_browsertest.cc
+++ b/chrome/renderer/autofill/password_generation_agent_browsertest.cc
@@ -171,6 +171,10 @@
PasswordGenerationAgentTest() = default;
+ PasswordGenerationAgentTest(const PasswordGenerationAgentTest&) = delete;
+ PasswordGenerationAgentTest& operator=(const PasswordGenerationAgentTest&) =
+ delete;
+
// ChromeRenderViewTest:
void RegisterMainFrameRemoteInterfaces() override;
void SetUp() override;
@@ -201,9 +205,6 @@
FakeMojoPasswordManagerDriver fake_driver_;
testing::StrictMock<FakePasswordGenerationDriver> fake_pw_client_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgentTest);
};
void PasswordGenerationAgentTest::RegisterMainFrameRemoteInterfaces() {
@@ -373,6 +374,11 @@
public:
PasswordGenerationAgentTestForHtmlAnnotation() = default;
+ PasswordGenerationAgentTestForHtmlAnnotation(
+ const PasswordGenerationAgentTestForHtmlAnnotation&) = delete;
+ PasswordGenerationAgentTestForHtmlAnnotation& operator=(
+ const PasswordGenerationAgentTestForHtmlAnnotation&) = delete;
+
void SetUp() override {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kShowAutofillSignatures);
@@ -380,9 +386,6 @@
}
void TestAnnotateForm(bool has_form_tag);
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgentTestForHtmlAnnotation);
};
void PasswordGenerationAgentTestForHtmlAnnotation::TestAnnotateForm(
diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
index f0fe9532..d6c0f18 100644
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -80,6 +80,9 @@
public:
RendererResourceDelegate() = default;
+ RendererResourceDelegate(const RendererResourceDelegate&) = delete;
+ RendererResourceDelegate& operator=(const RendererResourceDelegate&) = delete;
+
void OnRequestComplete() override {
// Update the browser about our cache.
@@ -128,8 +131,6 @@
cache_stats_recorder_;
base::WeakPtrFactory<RendererResourceDelegate> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate);
};
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/chrome/renderer/chrome_render_thread_observer.h b/chrome/renderer/chrome_render_thread_observer.h
index 79bd0e80..958ff47 100644
--- a/chrome/renderer/chrome_render_thread_observer.h
+++ b/chrome/renderer/chrome_render_thread_observer.h
@@ -49,6 +49,9 @@
mojo::PendingReceiver<chrome::mojom::ChromeOSListener>
chromeos_listener_receiver);
+ ChromeOSListener(const ChromeOSListener&) = delete;
+ ChromeOSListener& operator=(const ChromeOSListener&) = delete;
+
// Is the merge session still running?
bool IsMergeSessionRunning() const;
@@ -73,12 +76,15 @@
bool merge_session_running_ GUARDED_BY(lock_);
mutable base::Lock lock_;
mojo::Receiver<chrome::mojom::ChromeOSListener> receiver_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChromeOSListener);
};
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
ChromeRenderThreadObserver();
+
+ ChromeRenderThreadObserver(const ChromeRenderThreadObserver&) = delete;
+ ChromeRenderThreadObserver& operator=(const ChromeRenderThreadObserver&) =
+ delete;
+
~ChromeRenderThreadObserver() override;
static bool is_incognito_process() { return is_incognito_process_; }
@@ -145,8 +151,6 @@
// was started.
scoped_refptr<ChromeOSListener> chromeos_listener_;
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
-
- DISALLOW_COPY_AND_ASSIGN(ChromeRenderThreadObserver);
};
#endif // CHROME_RENDERER_CHROME_RENDER_THREAD_OBSERVER_H_
diff --git a/chrome/renderer/chromeos_delayed_callback_group.h b/chrome/renderer/chromeos_delayed_callback_group.h
index e878546..fe9ce90 100644
--- a/chrome/renderer/chromeos_delayed_callback_group.h
+++ b/chrome/renderer/chromeos_delayed_callback_group.h
@@ -42,6 +42,9 @@
base::TimeDelta expiration_delay,
scoped_refptr<base::SequencedTaskRunner> expiration_task_runner);
+ DelayedCallbackGroup(const DelayedCallbackGroup&) = delete;
+ DelayedCallbackGroup& operator=(const DelayedCallbackGroup&) = delete;
+
// Add a |callback| to the queue to be called at a later time on the calling
// sequence task runner. |callback| will either be called when RunAll() is
// called or if a delay of |expiration_delay| has elapsed after calling
@@ -90,8 +93,6 @@
scoped_refptr<base::SequencedTaskRunner> expiration_task_runner_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(DelayedCallbackGroup);
};
#endif // CHROME_RENDERER_CHROMEOS_DELAYED_CALLBACK_GROUP_H_
diff --git a/chrome/renderer/extensions/extension_localization_peer.h b/chrome/renderer/extensions/extension_localization_peer.h
index c9aec68..d2107e9 100644
--- a/chrome/renderer/extensions/extension_localization_peer.h
+++ b/chrome/renderer/extensions/extension_localization_peer.h
@@ -52,6 +52,10 @@
const std::string& mime_type,
const GURL& request_url);
+ ExtensionLocalizationPeer(const ExtensionLocalizationPeer&) = delete;
+ ExtensionLocalizationPeer& operator=(const ExtensionLocalizationPeer&) =
+ delete;
+
// blink::WebRequestPeer methods.
void OnUploadProgress(uint64_t position, uint64_t size) override;
bool OnReceivedRedirect(const net::RedirectInfo& redirect_info,
@@ -137,9 +141,6 @@
// Original request URL.
GURL request_url_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ExtensionLocalizationPeer);
};
#endif // CHROME_RENDERER_EXTENSIONS_EXTENSION_LOCALIZATION_PEER_H_
diff --git a/chrome/renderer/extensions/extension_localization_peer_unittest.cc b/chrome/renderer/extensions/extension_localization_peer_unittest.cc
index ccdb1b73..5e75fb9 100644
--- a/chrome/renderer/extensions/extension_localization_peer_unittest.cc
+++ b/chrome/renderer/extensions/extension_localization_peer_unittest.cc
@@ -67,6 +67,9 @@
: body_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::AUTOMATIC) {
}
+ MockRequestPeer(const MockRequestPeer&) = delete;
+ MockRequestPeer& operator=(const MockRequestPeer&) = delete;
+
MOCK_METHOD2(OnUploadProgress, void(uint64_t position, uint64_t size));
MOCK_METHOD3(OnReceivedRedirect,
bool(const net::RedirectInfo& redirect_info,
@@ -128,8 +131,6 @@
mojo::SimpleWatcher body_watcher_;
mojo::ScopedDataPipeConsumerHandle body_handle_;
base::OnceClosure wait_for_body_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(MockRequestPeer);
};
} // namespace
diff --git a/chrome/renderer/extensions/file_browser_handler_custom_bindings.h b/chrome/renderer/extensions/file_browser_handler_custom_bindings.h
index 5da8afa..b102328 100644
--- a/chrome/renderer/extensions/file_browser_handler_custom_bindings.h
+++ b/chrome/renderer/extensions/file_browser_handler_custom_bindings.h
@@ -16,6 +16,11 @@
public:
explicit FileBrowserHandlerCustomBindings(ScriptContext* context);
+ FileBrowserHandlerCustomBindings(const FileBrowserHandlerCustomBindings&) =
+ delete;
+ FileBrowserHandlerCustomBindings& operator=(
+ const FileBrowserHandlerCustomBindings&) = delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
@@ -28,8 +33,6 @@
private:
void GetExternalFileEntryCallback(
const v8::FunctionCallbackInfo<v8::Value>& args);
-
- DISALLOW_COPY_AND_ASSIGN(FileBrowserHandlerCustomBindings);
};
} // namespace extensions
diff --git a/chrome/renderer/extensions/file_manager_private_custom_bindings.h b/chrome/renderer/extensions/file_manager_private_custom_bindings.h
index 9d2b888..61adea33 100644
--- a/chrome/renderer/extensions/file_manager_private_custom_bindings.h
+++ b/chrome/renderer/extensions/file_manager_private_custom_bindings.h
@@ -16,6 +16,11 @@
public:
explicit FileManagerPrivateCustomBindings(ScriptContext* context);
+ FileManagerPrivateCustomBindings(const FileManagerPrivateCustomBindings&) =
+ delete;
+ FileManagerPrivateCustomBindings& operator=(
+ const FileManagerPrivateCustomBindings&) = delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
@@ -23,8 +28,6 @@
void GetFileSystem(const v8::FunctionCallbackInfo<v8::Value>& args);
void GetExternalFileEntry(const v8::FunctionCallbackInfo<v8::Value>& args);
void GetEntryURL(const v8::FunctionCallbackInfo<v8::Value>& args);
-
- DISALLOW_COPY_AND_ASSIGN(FileManagerPrivateCustomBindings);
};
} // namespace extensions
diff --git a/chrome/renderer/extensions/media_galleries_custom_bindings.h b/chrome/renderer/extensions/media_galleries_custom_bindings.h
index 18b4d1da..de81738 100644
--- a/chrome/renderer/extensions/media_galleries_custom_bindings.h
+++ b/chrome/renderer/extensions/media_galleries_custom_bindings.h
@@ -15,14 +15,16 @@
public:
explicit MediaGalleriesCustomBindings(ScriptContext* context);
+ MediaGalleriesCustomBindings(const MediaGalleriesCustomBindings&) = delete;
+ MediaGalleriesCustomBindings& operator=(const MediaGalleriesCustomBindings&) =
+ delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
private:
void GetMediaFileSystemObject(
const v8::FunctionCallbackInfo<v8::Value>& args);
-
- DISALLOW_COPY_AND_ASSIGN(MediaGalleriesCustomBindings);
};
} // namespace extensions
diff --git a/chrome/renderer/extensions/notifications_native_handler.h b/chrome/renderer/extensions/notifications_native_handler.h
index 4ab7e8c..1d9888a 100644
--- a/chrome/renderer/extensions/notifications_native_handler.h
+++ b/chrome/renderer/extensions/notifications_native_handler.h
@@ -19,6 +19,10 @@
public:
explicit NotificationsNativeHandler(ScriptContext* context);
+ NotificationsNativeHandler(const NotificationsNativeHandler&) = delete;
+ NotificationsNativeHandler& operator=(const NotificationsNativeHandler&) =
+ delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
@@ -37,8 +41,6 @@
// buttonIcon - a dictionary of the same format as |icon|
void GetNotificationImageSizes(
const v8::FunctionCallbackInfo<v8::Value>& args);
-
- DISALLOW_COPY_AND_ASSIGN(NotificationsNativeHandler);
};
} // namespace extensions
diff --git a/chrome/renderer/extensions/platform_keys_natives.h b/chrome/renderer/extensions/platform_keys_natives.h
index 4d28406c..63eb1953 100644
--- a/chrome/renderer/extensions/platform_keys_natives.h
+++ b/chrome/renderer/extensions/platform_keys_natives.h
@@ -16,6 +16,9 @@
public:
explicit PlatformKeysNatives(ScriptContext* context);
+ PlatformKeysNatives(const PlatformKeysNatives&) = delete;
+ PlatformKeysNatives& operator=(const PlatformKeysNatives&) = delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
@@ -30,8 +33,6 @@
// parameters are missing or not supported. Note that it returns untyped
// arrays instead of typed arrays (e.g. for RSA publicExponent).
void NormalizeAlgorithm(const v8::FunctionCallbackInfo<v8::Value>& call_info);
-
- DISALLOW_COPY_AND_ASSIGN(PlatformKeysNatives);
};
} // namespace extensions
diff --git a/chrome/renderer/extensions/sync_file_system_custom_bindings.h b/chrome/renderer/extensions/sync_file_system_custom_bindings.h
index dcd0a63..2ea8881 100644
--- a/chrome/renderer/extensions/sync_file_system_custom_bindings.h
+++ b/chrome/renderer/extensions/sync_file_system_custom_bindings.h
@@ -16,6 +16,10 @@
public:
explicit SyncFileSystemCustomBindings(ScriptContext* context);
+ SyncFileSystemCustomBindings(const SyncFileSystemCustomBindings&) = delete;
+ SyncFileSystemCustomBindings& operator=(const SyncFileSystemCustomBindings&) =
+ delete;
+
// ObjectBackedNativeHandler:
void AddRoutes() override;
@@ -23,8 +27,6 @@
// FileSystemObject GetSyncFileSystemObject(string name, string root_url):
// construct a file system object from the given name and root_url.
void GetSyncFileSystemObject(const v8::FunctionCallbackInfo<v8::Value>& args);
-
- DISALLOW_COPY_AND_ASSIGN(SyncFileSystemCustomBindings);
};
} // namespace extensions
diff --git a/chrome/renderer/net/net_error_helper_core_unittest.cc b/chrome/renderer/net/net_error_helper_core_unittest.cc
index 5b0afc5..6fa08259 100644
--- a/chrome/renderer/net/net_error_helper_core_unittest.cc
+++ b/chrome/renderer/net/net_error_helper_core_unittest.cc
@@ -899,6 +899,11 @@
public:
FakeAvailableOfflineContentProvider() = default;
+ FakeAvailableOfflineContentProvider(
+ const FakeAvailableOfflineContentProvider&) = delete;
+ FakeAvailableOfflineContentProvider& operator=(
+ const FakeAvailableOfflineContentProvider&) = delete;
+
void List(ListCallback callback) override {
if (return_content_) {
std::move(callback).Run(list_visible_by_prefs_,
@@ -931,8 +936,6 @@
bool return_content_ = true;
bool list_visible_by_prefs_ = true;
mojo::ReceiverSet<chrome::mojom::AvailableOfflineContentProvider> receivers_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeAvailableOfflineContentProvider);
};
// Provides set up for testing the 'available offline content' feature.
@@ -1074,6 +1077,10 @@
public:
FakeOfflinePageAutoFetcher() = default;
+ FakeOfflinePageAutoFetcher(const FakeOfflinePageAutoFetcher&) = delete;
+ FakeOfflinePageAutoFetcher& operator=(const FakeOfflinePageAutoFetcher&) =
+ delete;
+
struct TryScheduleParameters {
bool user_requested;
TryScheduleCallback callback;
@@ -1101,8 +1108,6 @@
mojo::ReceiverSet<chrome::mojom::OfflinePageAutoFetcher> receivers_;
int cancel_calls_ = 0;
std::vector<TryScheduleParameters> try_schedule_calls_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeOfflinePageAutoFetcher);
};
// This uses the real implementation of PageAutoFetcherHelper, but with a
// substituted fetcher.
diff --git a/chrome/renderer/net/net_error_page_controller.h b/chrome/renderer/net/net_error_page_controller.h
index d18c6c554..7e27a79b 100644
--- a/chrome/renderer/net/net_error_page_controller.h
+++ b/chrome/renderer/net/net_error_page_controller.h
@@ -25,6 +25,9 @@
// Interface used to notify creator of user actions invoked on the error page.
class Delegate {
public:
+ Delegate(const Delegate&) = delete;
+ Delegate& operator=(const Delegate&) = delete;
+
// Button press notification from error page.
virtual void ButtonPressed(NetErrorHelperCore::Button button) = 0;
@@ -61,10 +64,11 @@
protected:
Delegate();
virtual ~Delegate();
-
- DISALLOW_COPY_AND_ASSIGN(Delegate);
};
+ NetErrorPageController(const NetErrorPageController&) = delete;
+ NetErrorPageController& operator=(const NetErrorPageController&) = delete;
+
// Will invoke methods on |delegate| in response to user actions taken on the
// error page. May call delegate methods even after the page has been
// navigated away from, so it is recommended consumers make sure the weak
@@ -109,8 +113,6 @@
v8::Isolate* isolate) override;
base::WeakPtr<Delegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(NetErrorPageController);
};
#endif // CHROME_RENDERER_NET_NET_ERROR_PAGE_CONTROLLER_H_
diff --git a/chrome/renderer/plugins/chrome_plugin_placeholder.h b/chrome/renderer/plugins/chrome_plugin_placeholder.h
index a28a412..e65b825a 100644
--- a/chrome/renderer/plugins/chrome_plugin_placeholder.h
+++ b/chrome/renderer/plugins/chrome_plugin_placeholder.h
@@ -42,6 +42,9 @@
content::RenderFrame* render_frame,
const blink::WebPluginParams& params);
+ ChromePluginPlaceholder(const ChromePluginPlaceholder&) = delete;
+ ChromePluginPlaceholder& operator=(const ChromePluginPlaceholder&) = delete;
+
// Runs |callback| over each plugin placeholder for the given RenderFrame.
static void ForEach(
content::RenderFrame* render_frame,
@@ -97,8 +100,6 @@
mojo::AssociatedReceiver<blink::mojom::ContextMenuClient>
context_menu_client_receiver_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChromePluginPlaceholder);
};
#endif // CHROME_RENDERER_PLUGINS_CHROME_PLUGIN_PLACEHOLDER_H_
diff --git a/chrome/renderer/plugins/non_loadable_plugin_placeholder.h b/chrome/renderer/plugins/non_loadable_plugin_placeholder.h
index fa0e9b670..d854c80 100644
--- a/chrome/renderer/plugins/non_loadable_plugin_placeholder.h
+++ b/chrome/renderer/plugins/non_loadable_plugin_placeholder.h
@@ -25,6 +25,11 @@
class NonLoadablePluginPlaceholder {
public:
+ NonLoadablePluginPlaceholder() = delete;
+ NonLoadablePluginPlaceholder(const NonLoadablePluginPlaceholder&) = delete;
+ NonLoadablePluginPlaceholder& operator=(const NonLoadablePluginPlaceholder&) =
+ delete;
+
// Creates a non-loadable plugin placeholder for platforms without plugins.
static plugins::PluginPlaceholder* CreateNotSupportedPlugin(
content::RenderFrame* render_frame,
@@ -37,9 +42,6 @@
static plugins::PluginPlaceholder* CreateErrorPlugin(
content::RenderFrame* render_frame,
const base::FilePath& file_path);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(NonLoadablePluginPlaceholder);
};
#endif // CHROME_RENDERER_PLUGINS_NON_LOADABLE_PLUGIN_PLACEHOLDER_H_
diff --git a/chrome/renderer/plugins/plugin_uma.h b/chrome/renderer/plugins/plugin_uma.h
index d21498ad..17de3b6 100644
--- a/chrome/renderer/plugins/plugin_uma.h
+++ b/chrome/renderer/plugins/plugin_uma.h
@@ -55,6 +55,9 @@
// Returns singleton instance.
static PluginUMAReporter* GetInstance();
+ PluginUMAReporter(const PluginUMAReporter&) = delete;
+ PluginUMAReporter& operator=(const PluginUMAReporter&) = delete;
+
void ReportPluginMissing(const std::string& plugin_mime_type,
const GURL& plugin_src);
@@ -84,8 +87,6 @@
PluginType MimeTypeToPluginType(const std::string& mime_type);
std::unique_ptr<UMASender> report_sender_;
-
- DISALLOW_COPY_AND_ASSIGN(PluginUMAReporter);
};
#endif // CHROME_RENDERER_PLUGINS_PLUGIN_UMA_H_
diff --git a/chrome/renderer/sandbox_status_extension_android.h b/chrome/renderer/sandbox_status_extension_android.h
index 327efcd..dc2bb3e 100644
--- a/chrome/renderer/sandbox_status_extension_android.h
+++ b/chrome/renderer/sandbox_status_extension_android.h
@@ -31,6 +31,9 @@
// Creates a new SandboxStatusExtension for the |frame|.
static void Create(content::RenderFrame* frame);
+ SandboxStatusExtension(const SandboxStatusExtension&) = delete;
+ SandboxStatusExtension& operator=(const SandboxStatusExtension&) = delete;
+
// content::RenderFrameObserver:
void OnDestruct() override;
void DidClearWindowObject() override;
@@ -71,8 +74,6 @@
mojo::AssociatedReceiver<chrome::mojom::SandboxStatusExtension> receiver_{
this};
-
- DISALLOW_COPY_AND_ASSIGN(SandboxStatusExtension);
};
#endif // CHROME_RENDERER_SANDBOX_STATUS_EXTENSION_ANDROID_H_
diff --git a/chrome/renderer/searchbox/searchbox_extension.h b/chrome/renderer/searchbox/searchbox_extension.h
index be0b812..a906ce07 100644
--- a/chrome/renderer/searchbox/searchbox_extension.h
+++ b/chrome/renderer/searchbox/searchbox_extension.h
@@ -23,6 +23,10 @@
// https://www.chromium.org/embeddedsearch.
class SearchBoxExtension {
public:
+ SearchBoxExtension() = delete;
+ SearchBoxExtension(const SearchBoxExtension&) = delete;
+ SearchBoxExtension& operator=(const SearchBoxExtension&) = delete;
+
static void Install(blink::WebLocalFrame* frame);
// Helpers to dispatch Javascript events.
@@ -35,9 +39,6 @@
static void DispatchKeyCaptureChange(blink::WebLocalFrame* frame);
static void DispatchMostVisitedChanged(blink::WebLocalFrame* frame);
static void DispatchThemeChange(blink::WebLocalFrame* frame);
-
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(SearchBoxExtension);
};
#endif // CHROME_RENDERER_SEARCHBOX_SEARCHBOX_EXTENSION_H_
diff --git a/chrome/renderer/supervised_user/supervised_user_error_page_controller.h b/chrome/renderer/supervised_user/supervised_user_error_page_controller.h
index 30d88d1..2e9dfc2 100644
--- a/chrome/renderer/supervised_user/supervised_user_error_page_controller.h
+++ b/chrome/renderer/supervised_user/supervised_user_error_page_controller.h
@@ -23,6 +23,11 @@
public:
static gin::WrapperInfo kWrapperInfo;
+ SupervisedUserErrorPageController(const SupervisedUserErrorPageController&) =
+ delete;
+ SupervisedUserErrorPageController& operator=(
+ const SupervisedUserErrorPageController&) = delete;
+
// Will invoke methods on |delegate| in response to user actions taken on the
// interstitial. May call delegate methods even after the page has been
// navigated away from, so it is recommended consumers make sure the weak
@@ -55,8 +60,6 @@
// are used for the request permission callback, so messages to no longer
// existing interstitials are ignored.
base::WeakPtrFactory<SupervisedUserErrorPageController> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SupervisedUserErrorPageController);
};
#endif // CHROME_RENDERER_SUPERVISED_USER_SUPERVISED_USER_ERROR_PAGE_CONTROLLER_H_
diff --git a/chrome/renderer/translate/per_frame_translate_agent_browsertest.cc b/chrome/renderer/translate/per_frame_translate_agent_browsertest.cc
index f9bb858..ae0ad96 100644
--- a/chrome/renderer/translate/per_frame_translate_agent_browsertest.cc
+++ b/chrome/renderer/translate/per_frame_translate_agent_browsertest.cc
@@ -31,6 +31,9 @@
ISOLATED_WORLD_ID_TRANSLATE,
render_frame->GetAssociatedInterfaceRegistry()) {}
+ PerFrameTranslateAgent(const PerFrameTranslateAgent&) = delete;
+ PerFrameTranslateAgent& operator=(const PerFrameTranslateAgent&) = delete;
+
base::TimeDelta AdjustDelay(int delayInMs) override {
// Just returns base::TimeDelta() which has initial value 0.
// Tasks doesn't need to be delayed in tests.
@@ -140,14 +143,17 @@
absl::optional<std::string> trans_result_source_lang_;
absl::optional<std::string> trans_result_translated_lang_;
translate::TranslateErrors::Type trans_result_error_type_;
-
- DISALLOW_COPY_AND_ASSIGN(PerFrameTranslateAgent);
};
class PerFrameTranslateAgentBrowserTest : public ChromeRenderViewTest {
public:
PerFrameTranslateAgentBrowserTest() : translate_agent_(nullptr) {}
+ PerFrameTranslateAgentBrowserTest(const PerFrameTranslateAgentBrowserTest&) =
+ delete;
+ PerFrameTranslateAgentBrowserTest& operator=(
+ const PerFrameTranslateAgentBrowserTest&) = delete;
+
protected:
void SetUp() override {
ChromeRenderViewTest::SetUp();
@@ -160,9 +166,6 @@
}
PerFrameTranslateAgent* translate_agent_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PerFrameTranslateAgentBrowserTest);
};
// Tests that the browser gets notified of the translation failure if the
diff --git a/chrome/renderer/translate/translate_agent_browsertest.cc b/chrome/renderer/translate/translate_agent_browsertest.cc
index 5fe73b56..523148f 100644
--- a/chrome/renderer/translate/translate_agent_browsertest.cc
+++ b/chrome/renderer/translate/translate_agent_browsertest.cc
@@ -84,6 +84,9 @@
ISOLATED_WORLD_ID_TRANSLATE,
extensions::kExtensionScheme) {}
+ TestTranslateAgent(const TestTranslateAgent&) = delete;
+ TestTranslateAgent& operator=(const TestTranslateAgent&) = delete;
+
base::TimeDelta AdjustDelay(int delayInMs) override {
// Just returns base::TimeDelta() which has initial value 0.
// Tasks doesn't need to be delayed in tests.
@@ -151,14 +154,16 @@
absl::optional<std::string> trans_result_source_lang_;
absl::optional<std::string> trans_result_translated_lang_;
translate::TranslateErrors::Type trans_result_error_type_;
-
- DISALLOW_COPY_AND_ASSIGN(TestTranslateAgent);
};
class TranslateAgentBrowserTest : public ChromeRenderViewTest {
public:
TranslateAgentBrowserTest() : translate_agent_(nullptr) {}
+ TranslateAgentBrowserTest(const TranslateAgentBrowserTest&) = delete;
+ TranslateAgentBrowserTest& operator=(const TranslateAgentBrowserTest&) =
+ delete;
+
protected:
void SetUp() override {
ChromeRenderViewTest::SetUp();
@@ -180,9 +185,6 @@
TestTranslateAgent* translate_agent_;
FakeContentTranslateDriver fake_translate_driver_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TranslateAgentBrowserTest);
};
// Tests that the browser gets notified of the translation failure if the
diff --git a/chrome/renderer/translate/translate_script_browsertest.cc b/chrome/renderer/translate/translate_script_browsertest.cc
index cc33df6..44b4b5e 100644
--- a/chrome/renderer/translate/translate_script_browsertest.cc
+++ b/chrome/renderer/translate/translate_script_browsertest.cc
@@ -77,6 +77,10 @@
public:
TranslateScriptBrowserTest() {}
+ TranslateScriptBrowserTest(const TranslateScriptBrowserTest&) = delete;
+ TranslateScriptBrowserTest& operator=(const TranslateScriptBrowserTest&) =
+ delete;
+
protected:
void InjectElementLibrary() {
std::string script =
@@ -132,8 +136,6 @@
}
return result.As<v8::Boolean>()->Value();
}
-
- DISALLOW_COPY_AND_ASSIGN(TranslateScriptBrowserTest);
};
// Test if onTranslateElementLoad() succeeds to initialize the element library.
diff --git a/chrome/renderer/url_loader_throttle_provider_impl.h b/chrome/renderer/url_loader_throttle_provider_impl.h
index a6e4fac..24effef 100644
--- a/chrome/renderer/url_loader_throttle_provider_impl.h
+++ b/chrome/renderer/url_loader_throttle_provider_impl.h
@@ -31,6 +31,9 @@
blink::URLLoaderThrottleProviderType type,
ChromeContentRendererClient* chrome_content_renderer_client);
+ URLLoaderThrottleProviderImpl& operator=(
+ const URLLoaderThrottleProviderImpl&) = delete;
+
~URLLoaderThrottleProviderImpl() override;
// blink::URLLoaderThrottleProvider implementation.
@@ -57,8 +60,6 @@
#endif
THREAD_CHECKER(thread_checker_);
-
- DISALLOW_ASSIGN(URLLoaderThrottleProviderImpl);
};
#endif // CHROME_RENDERER_URL_LOADER_THROTTLE_PROVIDER_IMPL_H_
diff --git a/chrome/renderer/websocket_handshake_throttle_provider_impl.h b/chrome/renderer/websocket_handshake_throttle_provider_impl.h
index 8f80622..f1b6fe3 100644
--- a/chrome/renderer/websocket_handshake_throttle_provider_impl.h
+++ b/chrome/renderer/websocket_handshake_throttle_provider_impl.h
@@ -22,6 +22,10 @@
public:
explicit WebSocketHandshakeThrottleProviderImpl(
blink::ThreadSafeBrowserInterfaceBrokerProxy* broker);
+
+ WebSocketHandshakeThrottleProviderImpl& operator=(
+ const WebSocketHandshakeThrottleProviderImpl&) = delete;
+
~WebSocketHandshakeThrottleProviderImpl() override;
// Implements blink::WebSocketHandshakeThrottleProvider.
@@ -41,8 +45,6 @@
mojo::Remote<safe_browsing::mojom::SafeBrowsing> safe_browsing_;
THREAD_CHECKER(thread_checker_);
-
- DISALLOW_ASSIGN(WebSocketHandshakeThrottleProviderImpl);
};
#endif // CHROME_RENDERER_WEBSOCKET_HANDSHAKE_THROTTLE_PROVIDER_IMPL_H_
diff --git a/chrome/renderer/worker_content_settings_client.h b/chrome/renderer/worker_content_settings_client.h
index 7b167b8..6885ed0e 100644
--- a/chrome/renderer/worker_content_settings_client.h
+++ b/chrome/renderer/worker_content_settings_client.h
@@ -26,6 +26,10 @@
class WorkerContentSettingsClient : public blink::WebContentSettingsClient {
public:
explicit WorkerContentSettingsClient(content::RenderFrame* render_frame);
+
+ WorkerContentSettingsClient& operator=(const WorkerContentSettingsClient&) =
+ delete;
+
~WorkerContentSettingsClient() override;
// WebContentSettingsClient overrides.
@@ -62,8 +66,6 @@
pending_content_settings_manager_;
mutable mojo::Remote<content_settings::mojom::ContentSettingsManager>
content_settings_manager_;
-
- DISALLOW_ASSIGN(WorkerContentSettingsClient);
};
#endif // CHROME_RENDERER_WORKER_CONTENT_SETTINGS_CLIENT_H_
diff --git a/chrome/service/cloud_print/cloud_print_auth.h b/chrome/service/cloud_print/cloud_print_auth.h
index cdb7a2c6..6fd1d1d 100644
--- a/chrome/service/cloud_print/cloud_print_auth.h
+++ b/chrome/service/cloud_print/cloud_print_auth.h
@@ -53,6 +53,9 @@
const net::PartialNetworkTrafficAnnotationTag&
partial_traffic_annotation);
+ CloudPrintAuth(const CloudPrintAuth&) = delete;
+ CloudPrintAuth& operator=(const CloudPrintAuth&) = delete;
+
// Note:
//
// The Authenticate* methods are the various entry points from
@@ -112,8 +115,6 @@
std::string client_login_token_;
// Partial network traffic annotation for network requests.
const net::PartialNetworkTrafficAnnotationTag partial_traffic_annotation_;
-
- DISALLOW_COPY_AND_ASSIGN(CloudPrintAuth);
};
} // namespace cloud_print
diff --git a/chrome/service/cloud_print/cloud_print_connector.h b/chrome/service/cloud_print/cloud_print_connector.h
index 57af794c..49fb94e 100644
--- a/chrome/service/cloud_print/cloud_print_connector.h
+++ b/chrome/service/cloud_print/cloud_print_connector.h
@@ -45,6 +45,9 @@
const net::PartialNetworkTrafficAnnotationTag&
partial_traffic_annotation);
+ CloudPrintConnector(const CloudPrintConnector&) = delete;
+ CloudPrintConnector& operator=(const CloudPrintConnector&) = delete;
+
bool Start();
void Stop();
bool IsRunning();
@@ -203,8 +206,6 @@
const net::PartialNetworkTrafficAnnotationTag partial_traffic_annotation_;
base::WeakPtrFactory<CloudPrintConnector> stats_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CloudPrintConnector);
};
} // namespace cloud_print
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
index 0822dacd..17837cd 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
@@ -86,6 +86,9 @@
bool enable_job_poll,
network::NetworkConnectionTracker* network_connection_tracker);
+ Core(const Core&) = delete;
+ Core& operator=(const Core&) = delete;
+
// Note:
//
// The Do* methods are the various entry points from CloudPrintProxyBackend
@@ -220,8 +223,6 @@
std::unique_ptr<CloudPrintTokenStore> token_store_;
base::WeakPtrFactory<Core> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Core);
};
CloudPrintProxyBackend::CloudPrintProxyBackend(
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.h b/chrome/service/cloud_print/cloud_print_proxy_backend.h
index 4f01ba5..96f89a1 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.h
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.h
@@ -34,6 +34,9 @@
public:
CloudPrintProxyFrontend() {}
+ CloudPrintProxyFrontend(const CloudPrintProxyFrontend&) = delete;
+ CloudPrintProxyFrontend& operator=(const CloudPrintProxyFrontend&) = delete;
+
// We successfully authenticated with the cloud print server. This callback
// allows the frontend to persist the tokens.
virtual void OnAuthenticated(const std::string& robot_oauth_refresh_token,
@@ -53,9 +56,6 @@
protected:
// Don't delete through CloudPrintProxyFrontend interface.
virtual ~CloudPrintProxyFrontend() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CloudPrintProxyFrontend);
};
class CloudPrintProxyBackend {
diff --git a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
index e98cb72..2be33028 100644
--- a/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_url_fetcher_unittest.cc
@@ -100,6 +100,9 @@
fetcher_(nullptr),
quit_run_loop_(run_loop_.QuitClosure()) {}
+ CloudPrintURLFetcherTest(const CloudPrintURLFetcherTest&) = delete;
+ CloudPrintURLFetcherTest& operator=(const CloudPrintURLFetcherTest&) = delete;
+
// Creates a URLFetcher, using the program's main thread to do IO.
virtual void CreateFetcher(const GURL& url, int max_retries);
@@ -153,8 +156,6 @@
scoped_refptr<TestCloudPrintURLFetcher> fetcher_;
base::RunLoop run_loop_;
base::OnceClosure quit_run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(CloudPrintURLFetcherTest);
};
class CloudPrintURLFetcherBasicTest : public CloudPrintURLFetcherTest {
diff --git a/chrome/service/cloud_print/cloud_print_wipeout.h b/chrome/service/cloud_print/cloud_print_wipeout.h
index 686df4e..bf10c79f 100644
--- a/chrome/service/cloud_print/cloud_print_wipeout.h
+++ b/chrome/service/cloud_print/cloud_print_wipeout.h
@@ -29,6 +29,10 @@
const GURL& cloud_print_server_url,
const net::PartialNetworkTrafficAnnotationTag&
partial_traffic_annotation);
+
+ CloudPrintWipeout(const CloudPrintWipeout&) = delete;
+ CloudPrintWipeout& operator=(const CloudPrintWipeout&) = delete;
+
~CloudPrintWipeout() override;
void UnregisterPrinters(const std::string& auth_token,
@@ -59,8 +63,6 @@
std::list<std::string> printer_ids_;
// Partial network traffic annotation for network requests.
const net::PartialNetworkTrafficAnnotationTag partial_traffic_annotation_;
-
- DISALLOW_COPY_AND_ASSIGN(CloudPrintWipeout);
};
} // namespace cloud_print
diff --git a/chrome/service/cloud_print/job_status_updater.h b/chrome/service/cloud_print/job_status_updater.h
index a1af18e..a83fde0 100644
--- a/chrome/service/cloud_print/job_status_updater.h
+++ b/chrome/service/cloud_print/job_status_updater.h
@@ -41,6 +41,9 @@
const net::PartialNetworkTrafficAnnotationTag&
partial_traffic_annotation);
+ JobStatusUpdater(const JobStatusUpdater&) = delete;
+ JobStatusUpdater& operator=(const JobStatusUpdater&) = delete;
+
// Checks the status of the local print job and sends an update.
void UpdateStatus();
void Stop();
@@ -71,8 +74,6 @@
bool stopped_ = false;
// Partial network traffic annotation for network requests.
const net::PartialNetworkTrafficAnnotationTag partial_traffic_annotation_;
-
- DISALLOW_COPY_AND_ASSIGN(JobStatusUpdater);
};
} // namespace cloud_print
diff --git a/chrome/service/cloud_print/print_system_cups.cc b/chrome/service/cloud_print/print_system_cups.cc
index 3cea648..64116d5 100644
--- a/chrome/service/cloud_print/print_system_cups.cc
+++ b/chrome/service/cloud_print/print_system_cups.cc
@@ -187,6 +187,9 @@
explicit PrintServerWatcherCUPS(PrintSystemCUPS* print_system)
: print_system_(print_system) {}
+ PrintServerWatcherCUPS(const PrintServerWatcherCUPS&) = delete;
+ PrintServerWatcherCUPS& operator=(const PrintServerWatcherCUPS&) = delete;
+
// PrintSystem::PrintServerWatcher implementation.
bool StartWatching(
PrintSystem::PrintServerWatcher::Delegate* delegate) override {
@@ -243,8 +246,6 @@
scoped_refptr<PrintSystemCUPS> print_system_;
PrintSystem::PrintServerWatcher::Delegate* delegate_ = nullptr;
std::string printers_hash_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintServerWatcherCUPS);
};
class PrinterWatcherCUPS
@@ -256,6 +257,9 @@
print_system_(print_system) {
}
+ PrinterWatcherCUPS(const PrinterWatcherCUPS&) = delete;
+ PrinterWatcherCUPS& operator=(const PrinterWatcherCUPS&) = delete;
+
// PrintSystem::PrinterWatcher implementation.
bool StartWatching(PrintSystem::PrinterWatcher::Delegate* delegate) override {
scoped_refptr<printing::PrintBackend> print_backend(
@@ -360,8 +364,6 @@
PrintSystem::PrinterWatcher::Delegate* delegate_ = nullptr;
scoped_refptr<PrintSystemCUPS> print_system_;
std::string settings_hash_;
-
- DISALLOW_COPY_AND_ASSIGN(PrinterWatcherCUPS);
};
class JobSpoolerCUPS : public PrintSystem::JobSpooler {
@@ -371,6 +373,9 @@
DCHECK(print_system_.get());
}
+ JobSpoolerCUPS(const JobSpoolerCUPS&) = delete;
+ JobSpoolerCUPS& operator=(const JobSpoolerCUPS&) = delete;
+
// PrintSystem::JobSpooler implementation.
bool Spool(const std::string& print_ticket,
const std::string& print_ticket_mime_type,
@@ -404,8 +409,6 @@
private:
scoped_refptr<PrintSystemCUPS> print_system_;
-
- DISALLOW_COPY_AND_ASSIGN(JobSpoolerCUPS);
};
PrintSystemCUPS::PrintSystemCUPS(
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 614be14..ea81a77 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -145,6 +145,9 @@
public:
PrintServerWatcherWin() {}
+ PrintServerWatcherWin(const PrintServerWatcherWin&) = delete;
+ PrintServerWatcherWin& operator=(const PrintServerWatcherWin&) = delete;
+
// PrintSystem::PrintServerWatcher implementation.
bool StartWatching(
PrintSystem::PrintServerWatcher::Delegate* delegate) override {
@@ -172,8 +175,6 @@
private:
PrintSystem::PrintServerWatcher::Delegate* delegate_ = nullptr;
PrintSystemWatcherWin watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintServerWatcherWin);
};
class PrinterWatcherWin
@@ -183,6 +184,9 @@
explicit PrinterWatcherWin(const std::string& printer_name)
: printer_name_(printer_name) {}
+ PrinterWatcherWin(const PrinterWatcherWin&) = delete;
+ PrinterWatcherWin& operator=(const PrinterWatcherWin&) = delete;
+
// PrintSystem::PrinterWatcher implementation.
bool StartWatching(PrintSystem::PrinterWatcher::Delegate* delegate) override {
delegate_ = delegate;
@@ -221,14 +225,15 @@
const std::string printer_name_;
PrintSystem::PrinterWatcher::Delegate* delegate_ = nullptr;
PrintSystemWatcherWin watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(PrinterWatcherWin);
};
class JobSpoolerWin : public PrintSystem::JobSpooler {
public:
JobSpoolerWin() : core_(base::MakeRefCounted<Core>()) {}
+ JobSpoolerWin(const JobSpoolerWin&) = delete;
+ JobSpoolerWin& operator=(const JobSpoolerWin&) = delete;
+
// PrintSystem::JobSpooler implementation.
bool Spool(const std::string& print_ticket,
const std::string& print_ticket_mime_type,
@@ -259,6 +264,9 @@
public:
Core() {}
+ Core(const Core&) = delete;
+ Core& operator=(const Core&) = delete;
+
bool Spool(const std::string& print_ticket,
const std::string& print_ticket_mime_type,
const base::FilePath& print_data_file_path,
@@ -511,12 +519,8 @@
base::win::ScopedHandle job_progress_event_;
base::win::ObjectWatcher job_progress_watcher_;
Microsoft::WRL::ComPtr<IXpsPrintJob> xps_print_job_;
-
- DISALLOW_COPY_AND_ASSIGN(Core);
};
scoped_refptr<Core> core_;
-
- DISALLOW_COPY_AND_ASSIGN(JobSpoolerWin);
};
// A helper class to handle the response from the utility process to the
@@ -611,6 +615,9 @@
public:
PrintSystemWin();
+ PrintSystemWin(const PrintSystemWin&) = delete;
+ PrintSystemWin& operator=(const PrintSystemWin&) = delete;
+
// PrintSystem implementation.
PrintSystemResult Init() override;
PrintSystem::PrintSystemResult EnumeratePrinters(
@@ -639,8 +646,6 @@
std::string GetPrinterDriverInfo(const std::string& printer_name) const;
scoped_refptr<printing::PrintBackend> print_backend_;
-
- DISALLOW_COPY_AND_ASSIGN(PrintSystemWin);
};
PrintSystemWin::PrintSystemWin()
diff --git a/chrome/service/cloud_print/printer_job_handler.h b/chrome/service/cloud_print/printer_job_handler.h
index 8a26a11d..ec1605f 100644
--- a/chrome/service/cloud_print/printer_job_handler.h
+++ b/chrome/service/cloud_print/printer_job_handler.h
@@ -97,6 +97,9 @@
PrintSystem* print_system,
Delegate* delegate);
+ PrinterJobHandler(const PrinterJobHandler&) = delete;
+ PrinterJobHandler& operator=(const PrinterJobHandler&) = delete;
+
bool Initialize();
const std::string& GetPrinterName() const;
@@ -292,8 +295,6 @@
PrinterJobQueueHandler job_queue_handler_;
base::WeakPtrFactory<PrinterJobHandler> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PrinterJobHandler);
};
} // namespace cloud_print
diff --git a/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc b/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc
index ded9038..649690c 100644
--- a/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc
+++ b/chrome/service/cloud_print/printer_job_queue_handler_unittest.cc
@@ -57,13 +57,15 @@
PrinterJobQueueHandlerWithMockedTime()
: PrinterJobQueueHandler(base::WrapUnique(new TimeProviderMock)) {}
+ PrinterJobQueueHandlerWithMockedTime(
+ const PrinterJobQueueHandlerWithMockedTime&) = delete;
+ PrinterJobQueueHandlerWithMockedTime& operator=(
+ const PrinterJobQueueHandlerWithMockedTime&) = delete;
+
TimeProviderMock* GetMock() {
return static_cast<TimeProviderMock*>(
PrinterJobQueueHandler::time_provider());
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PrinterJobQueueHandlerWithMockedTime);
};
class PrinterJobQueueHandlerTest : public ::testing::Test {
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 302370d..a42e5b7 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -77,6 +77,11 @@
public:
ServiceSandboxedProcessLauncherDelegate() {}
+ ServiceSandboxedProcessLauncherDelegate(
+ const ServiceSandboxedProcessLauncherDelegate&) = delete;
+ ServiceSandboxedProcessLauncherDelegate& operator=(
+ const ServiceSandboxedProcessLauncherDelegate&) = delete;
+
bool PreSpawnTarget(sandbox::TargetPolicy* policy) override {
// Ignore result of SetAlternateDesktop. Service process may run as windows
// service and it fails to create a window station.
@@ -87,9 +92,6 @@
sandbox::policy::SandboxType GetSandboxType() override {
return sandbox::policy::SandboxType::kPdfConversion;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ServiceSandboxedProcessLauncherDelegate);
};
// This implementation does not do any font pre-caching.
diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h
index 46e26cf..8d4f2981 100644
--- a/chrome/service/service_utility_process_host.h
+++ b/chrome/service/service_utility_process_host.h
@@ -49,6 +49,9 @@
public:
Client() {}
+ Client(const Client&) = delete;
+ Client& operator=(const Client&) = delete;
+
// Called when the child process died before a reply was receieved.
virtual void OnChildDied() {}
@@ -84,12 +87,15 @@
// Returns true if metafile successfully loaded from |emf_region|.
bool MetafileAvailable(float scale_factor,
base::ReadOnlySharedMemoryRegion emf_region);
-
- DISALLOW_COPY_AND_ASSIGN(Client);
};
ServiceUtilityProcessHost(Client* client,
base::SingleThreadTaskRunner* client_task_runner);
+
+ ServiceUtilityProcessHost(const ServiceUtilityProcessHost&) = delete;
+ ServiceUtilityProcessHost& operator=(const ServiceUtilityProcessHost&) =
+ delete;
+
~ServiceUtilityProcessHost() override;
content::ChildProcessHost* GetHost() { return child_process_host_.get(); }
@@ -165,8 +171,6 @@
std::unique_ptr<PdfToEmfState> pdf_to_emf_state_;
base::WeakPtrFactory<ServiceUtilityProcessHost> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ServiceUtilityProcessHost);
};
#endif // CHROME_SERVICE_SERVICE_UTILITY_PROCESS_HOST_H_
diff --git a/chrome/services/cups_proxy/cups_proxy_service.h b/chrome/services/cups_proxy/cups_proxy_service.h
index 24b3e9ad..db34d1c 100644
--- a/chrome/services/cups_proxy/cups_proxy_service.h
+++ b/chrome/services/cups_proxy/cups_proxy_service.h
@@ -26,6 +26,9 @@
// internally.
class CupsProxyService {
public:
+ CupsProxyService(const CupsProxyService&) = delete;
+ CupsProxyService& operator=(const CupsProxyService&) = delete;
+
// Spawns the global service instance.
static void Spawn(std::unique_ptr<CupsProxyServiceDelegate> delegate);
@@ -46,7 +49,6 @@
std::unique_ptr<ProxyManager> proxy_manager_;
base::WeakPtrFactory<CupsProxyService> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(CupsProxyService);
};
} // namespace cups_proxy
diff --git a/chrome/services/cups_proxy/public/cpp/ipp_messages.h b/chrome/services/cups_proxy/public/cpp/ipp_messages.h
index eac9d17..00806f5 100644
--- a/chrome/services/cups_proxy/public/cpp/ipp_messages.h
+++ b/chrome/services/cups_proxy/public/cpp/ipp_messages.h
@@ -29,7 +29,12 @@
// Explicitly declared/defined defaults since [chromium-style] flagged this as
// a complex struct.
IppRequest();
+
+ IppRequest(const IppRequest&) = delete;
+ IppRequest& operator=(const IppRequest&) = delete;
+
IppRequest(IppRequest&& other);
+
~IppRequest();
// Implicitly deleted by DISALLOW, so adding back in.
@@ -41,8 +46,6 @@
std::vector<ipp_converter::HttpHeader> headers;
printing::ScopedIppPtr ipp;
std::vector<uint8_t> ipp_data;
-
- DISALLOW_COPY_AND_ASSIGN(IppRequest);
};
// Helpful wrapper for a HTTP Response status-line.
@@ -57,7 +60,12 @@
// Explicitly declared/defined defaults since [chromium-style] flagged this as
// a complex struct.
IppResponse();
+
+ IppResponse(const IppResponse&) = delete;
+ IppResponse& operator=(const IppResponse&) = delete;
+
IppResponse(IppResponse&& other);
+
~IppResponse();
// Implicitly deleted by DISALLOW, so adding back in.
@@ -69,8 +77,6 @@
std::vector<ipp_converter::HttpHeader> headers;
printing::ScopedIppPtr ipp;
std::vector<uint8_t> ipp_data;
-
- DISALLOW_COPY_AND_ASSIGN(IppResponse);
};
} // namespace cups_proxy
diff --git a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
index 23d90239..c1d3fd5 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
+++ b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac.h
@@ -34,6 +34,9 @@
ResultCallback callback,
mojo::PendingRemote<chrome::mojom::FileUtilService> service);
+ SandboxedDMGAnalyzer(const SandboxedDMGAnalyzer&) = delete;
+ SandboxedDMGAnalyzer& operator=(const SandboxedDMGAnalyzer&) = delete;
+
// Starts the analysis. Must be called on the UI thread.
void Start();
@@ -66,8 +69,6 @@
// Remote interfaces to the file util service. Only used from the UI thread.
mojo::Remote<chrome::mojom::FileUtilService> service_;
mojo::Remote<chrome::mojom::SafeArchiveAnalyzer> remote_analyzer_;
-
- DISALLOW_COPY_AND_ASSIGN(SandboxedDMGAnalyzer);
};
#endif // CHROME_SERVICES_FILE_UTIL_PUBLIC_CPP_SANDBOXED_DMG_ANALYZER_MAC_H_
diff --git a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
index b23c814..84fc317 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_dmg_analyzer_mac_unittest.cc
@@ -63,6 +63,9 @@
safe_browsing::ArchiveAnalyzerResults* results)
: next_closure_(std::move(next_closure)), results_(results) {}
+ ResultsGetter(const ResultsGetter&) = delete;
+ ResultsGetter& operator=(const ResultsGetter&) = delete;
+
SandboxedDMGAnalyzer::ResultCallback GetCallback() {
return base::BindOnce(&ResultsGetter::ResultsCallback,
base::Unretained(this));
@@ -76,8 +79,6 @@
base::OnceClosure next_closure_;
safe_browsing::ArchiveAnalyzerResults* results_;
-
- DISALLOW_COPY_AND_ASSIGN(ResultsGetter);
};
content::BrowserTaskEnvironment task_environment_;
diff --git a/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer.h b/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer.h
index 716716e..cda492c 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer.h
+++ b/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer.h
@@ -32,6 +32,9 @@
ResultCallback callback,
mojo::PendingRemote<chrome::mojom::FileUtilService> service);
+ SandboxedRarAnalyzer(const SandboxedRarAnalyzer&) = delete;
+ SandboxedRarAnalyzer& operator=(const SandboxedRarAnalyzer&) = delete;
+
// Starts the analysis. Must be called on the UI thread.
void Start();
@@ -66,8 +69,6 @@
// Remote interfaces to the file util service. Only used from the UI thread.
mojo::Remote<chrome::mojom::FileUtilService> service_;
mojo::Remote<chrome::mojom::SafeArchiveAnalyzer> remote_analyzer_;
-
- DISALLOW_COPY_AND_ASSIGN(SandboxedRarAnalyzer);
};
std::ostream& operator<<(std::ostream& os,
diff --git a/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer_unittest.cc b/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer_unittest.cc
index 269c91b..74b7bf9f 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer_unittest.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_rar_analyzer_unittest.cc
@@ -104,6 +104,9 @@
safe_browsing::ArchiveAnalyzerResults* results)
: next_closure_(next_closure), results_(results) {}
+ ResultsGetter(const ResultsGetter&) = delete;
+ ResultsGetter& operator=(const ResultsGetter&) = delete;
+
SandboxedRarAnalyzer::ResultCallback GetCallback() {
return base::BindOnce(&ResultsGetter::ResultsCallback,
base::Unretained(this));
@@ -117,8 +120,6 @@
base::RepeatingClosure next_closure_;
safe_browsing::ArchiveAnalyzerResults* results_;
-
- DISALLOW_COPY_AND_ASSIGN(ResultsGetter);
};
// |analzyer_| should be destroyed after task_environment, so that any other
// threads with objects holding references to it will be shut down first.
diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
index 6c9340b..bcb1aa1 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
+++ b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer.h
@@ -33,6 +33,9 @@
ResultCallback callback,
mojo::PendingRemote<chrome::mojom::FileUtilService> service);
+ SandboxedZipAnalyzer(const SandboxedZipAnalyzer&) = delete;
+ SandboxedZipAnalyzer& operator=(const SandboxedZipAnalyzer&) = delete;
+
// Starts the analysis. Must be called on the UI thread.
void Start();
@@ -63,8 +66,6 @@
// Remote interfaces to the file util service. Only used from the UI thread.
mojo::Remote<chrome::mojom::FileUtilService> service_;
mojo::Remote<chrome::mojom::SafeArchiveAnalyzer> remote_analyzer_;
-
- DISALLOW_COPY_AND_ASSIGN(SandboxedZipAnalyzer);
};
#endif // CHROME_SERVICES_FILE_UTIL_PUBLIC_CPP_SANDBOXED_ZIP_ANALYZER_H_
diff --git a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
index c4c43098..e8bcd6e 100644
--- a/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
+++ b/chrome/services/file_util/public/cpp/sandboxed_zip_analyzer_unittest.cc
@@ -54,6 +54,9 @@
results->success = false;
}
+ ResultsGetter(const ResultsGetter&) = delete;
+ ResultsGetter& operator=(const ResultsGetter&) = delete;
+
SandboxedZipAnalyzer::ResultCallback GetCallback() {
return base::BindOnce(&ResultsGetter::OnZipAnalyzerResults,
base::Unretained(this));
@@ -68,8 +71,6 @@
base::OnceClosure quit_closure_;
safe_browsing::ArchiveAnalyzerResults* results_;
-
- DISALLOW_COPY_AND_ASSIGN(ResultsGetter);
};
SandboxedZipAnalyzerTest()
diff --git a/chrome/services/file_util/public/cpp/zip_file_creator.h b/chrome/services/file_util/public/cpp/zip_file_creator.h
index 25fe6be..5eeabf0 100644
--- a/chrome/services/file_util/public/cpp/zip_file_creator.h
+++ b/chrome/services/file_util/public/cpp/zip_file_creator.h
@@ -65,6 +65,9 @@
std::vector<base::FilePath> src_relative_paths,
base::FilePath dest_file);
+ ZipFileCreator(const ZipFileCreator&) = delete;
+ ZipFileCreator& operator=(const ZipFileCreator&) = delete;
+
// Sets the optional progress callback.
// This callback will be called the next time a progress event is received.
// Precondition: the progress callback hasn't been set yet, or the previously
@@ -140,8 +143,6 @@
// Listener receiver.
mojo::Receiver<chrome::mojom::ZipListener> listener_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ZipFileCreator);
};
#endif // CHROME_SERVICES_FILE_UTIL_PUBLIC_CPP_ZIP_FILE_CREATOR_H_
diff --git a/chrome/services/file_util/zip_file_creator.h b/chrome/services/file_util/zip_file_creator.h
index c8c1ada..21ddf7e 100644
--- a/chrome/services/file_util/zip_file_creator.h
+++ b/chrome/services/file_util/zip_file_creator.h
@@ -33,6 +33,9 @@
explicit ZipFileCreator(PendingCreator receiver);
+ ZipFileCreator(const ZipFileCreator&) = delete;
+ ZipFileCreator& operator=(const ZipFileCreator&) = delete;
+
REQUIRE_ADOPTION_FOR_REFCOUNTED_TYPE();
private:
@@ -77,8 +80,6 @@
// Flag used to cancel an ongoing ZIP creation.
base::AtomicFlag cancelled_;
-
- DISALLOW_COPY_AND_ASSIGN(ZipFileCreator);
};
} // namespace chrome
diff --git a/chrome/services/util_win/util_win_impl.cc b/chrome/services/util_win/util_win_impl.cc
index 5989aa3..8ac4b4c4 100644
--- a/chrome/services/util_win/util_win_impl.cc
+++ b/chrome/services/util_win/util_win_impl.cc
@@ -36,6 +36,9 @@
public:
IsPinnedToTaskbarHelper() = default;
+ IsPinnedToTaskbarHelper(const IsPinnedToTaskbarHelper&) = delete;
+ IsPinnedToTaskbarHelper& operator=(const IsPinnedToTaskbarHelper&) = delete;
+
// Returns true if the current executable is pinned to the taskbar. If
// [check_verbs] is true we check that the unpin from taskbar verb exists for
// the shortcut.
@@ -67,8 +70,6 @@
bool error_occured_ = false;
base::win::ScopedCOMInitializer scoped_com_initializer_;
-
- DISALLOW_COPY_AND_ASSIGN(IsPinnedToTaskbarHelper);
};
std::wstring IsPinnedToTaskbarHelper::LoadShellResourceString(
diff --git a/chrome/test/base/devtools_listener_browsertest.cc b/chrome/test/base/devtools_listener_browsertest.cc
index 9f1eddb..8bba0ef 100644
--- a/chrome/test/base/devtools_listener_browsertest.cc
+++ b/chrome/test/base/devtools_listener_browsertest.cc
@@ -30,6 +30,10 @@
public:
DevToolsListenerBrowserTest() = default;
+ DevToolsListenerBrowserTest(const DevToolsListenerBrowserTest&) = delete;
+ DevToolsListenerBrowserTest& operator=(const DevToolsListenerBrowserTest&) =
+ delete;
+
void SetUpOnMainThread() override {
process_id_ = base::GetUniqueIdForProcess().GetUnsafeValue();
content::DevToolsAgentHost::AddObserver(this);
@@ -99,8 +103,6 @@
DevToolsAgentMap devtools_agent_;
uint32_t process_id_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(DevToolsListenerBrowserTest);
};
IN_PROC_BROWSER_TEST_F(DevToolsListenerBrowserTest, CanCollectCodeCoverage) {
diff --git a/chrome/test/chromedriver/chrome/console_logger.h b/chrome/test/chromedriver/chrome/console_logger.h
index 5093a6e..bacc3d58 100644
--- a/chrome/test/chromedriver/chrome/console_logger.h
+++ b/chrome/test/chromedriver/chrome/console_logger.h
@@ -23,6 +23,9 @@
// The log is owned elsewhere and must not be null.
explicit ConsoleLogger(Log* log);
+ ConsoleLogger(const ConsoleLogger&) = delete;
+ ConsoleLogger& operator=(const ConsoleLogger&) = delete;
+
// Enables Console events for the client, which must not be null.
Status OnConnected(DevToolsClient* client) override;
// Translates an event into a log entry.
@@ -36,8 +39,6 @@
Status OnLogEntryAdded(const base::DictionaryValue& params);
Status OnRuntimeConsoleApiCalled(const base::DictionaryValue& params);
Status OnRuntimeExceptionThrown(const base::DictionaryValue& params);
-
- DISALLOW_COPY_AND_ASSIGN(ConsoleLogger);
};
#endif // CHROME_TEST_CHROMEDRIVER_CHROME_CONSOLE_LOGGER_H_
diff --git a/chrome/test/chromedriver/net/url_request_context_getter.h b/chrome/test/chromedriver/net/url_request_context_getter.h
index da8d30d..50121cf 100644
--- a/chrome/test/chromedriver/net/url_request_context_getter.h
+++ b/chrome/test/chromedriver/net/url_request_context_getter.h
@@ -22,6 +22,9 @@
explicit URLRequestContextGetter(
scoped_refptr<base::SingleThreadTaskRunner> network_task_runner);
+ URLRequestContextGetter(const URLRequestContextGetter&) = delete;
+ URLRequestContextGetter& operator=(const URLRequestContextGetter&) = delete;
+
// Overridden from net::URLRequestContextGetter:
net::URLRequestContext* GetURLRequestContext() override;
scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner()
@@ -34,8 +37,6 @@
// Only accessed on the IO thread.
std::unique_ptr<net::URLRequestContext> url_request_context_;
-
- DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
};
#endif // CHROME_TEST_CHROMEDRIVER_NET_URL_REQUEST_CONTEXT_GETTER_H_
diff --git a/chrome/test/chromedriver/performance_logger.h b/chrome/test/chromedriver/performance_logger.h
index 07adba9..d0a80ea 100644
--- a/chrome/test/chromedriver/performance_logger.h
+++ b/chrome/test/chromedriver/performance_logger.h
@@ -39,6 +39,9 @@
const PerfLoggingPrefs& prefs,
bool enable_service_worker = false);
+ PerformanceLogger(const PerformanceLogger&) = delete;
+ PerformanceLogger& operator=(const PerformanceLogger&) = delete;
+
// PerformanceLogger subscribes to browser-wide |DevToolsClient| for tracing.
bool subscribes_to_browser() override;
@@ -88,8 +91,6 @@
DevToolsClient* browser_client_; // Pointer to browser-wide |DevToolsClient|.
bool trace_buffering_; // True unless trace stopped and all events received.
bool enable_service_worker_;
-
- DISALLOW_COPY_AND_ASSIGN(PerformanceLogger);
};
#endif // CHROME_TEST_CHROMEDRIVER_PERFORMANCE_LOGGER_H_
diff --git a/chrome/test/chromedriver/server/http_handler.cc b/chrome/test/chromedriver/server/http_handler.cc
index 67cbc6da..d76ce9bc5 100644
--- a/chrome/test/chromedriver/server/http_handler.cc
+++ b/chrome/test/chromedriver/server/http_handler.cc
@@ -86,6 +86,9 @@
: url_loader_factory_(std::move(url_loader_factory)),
network_task_runner_(base::SequencedTaskRunnerHandle::Get()) {}
+ WrapperURLLoaderFactory(const WrapperURLLoaderFactory&) = delete;
+ WrapperURLLoaderFactory& operator=(const WrapperURLLoaderFactory&) = delete;
+
void CreateLoaderAndStart(
mojo::PendingReceiver<network::mojom::URLLoader> loader,
int32_t request_id,
@@ -117,8 +120,6 @@
// Runner for URLRequestContextGetter network thread.
scoped_refptr<base::SequencedTaskRunner> network_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(WrapperURLLoaderFactory);
};
CommandMapping::CommandMapping(HttpMethod method,
diff --git a/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc b/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc
index 263aef1..a62af3e 100644
--- a/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc
+++ b/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc
@@ -49,6 +49,9 @@
data_source);
}
+ FooUI(const FooUI&) = delete;
+ FooUI& operator=(const FooUI&) = delete;
+
void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) {
foo_receiver_.Bind(std::move(receiver));
}
@@ -62,8 +65,6 @@
private:
mojo::Receiver<::test::mojom::Foo> foo_receiver_;
-
- DISALLOW_COPY_AND_ASSIGN(FooUI);
};
WEB_UI_CONTROLLER_TYPE_IMPL(FooUI)
@@ -87,6 +88,9 @@
data_source);
}
+ FooBarUI(const FooBarUI&) = delete;
+ FooBarUI& operator=(const FooBarUI&) = delete;
+
void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) {
foo_receiver_.Bind(std::move(receiver));
}
@@ -110,8 +114,6 @@
private:
mojo::Receiver<::test::mojom::Foo> foo_receiver_;
mojo::Receiver<::test::mojom::Bar> bar_receiver_;
-
- DISALLOW_COPY_AND_ASSIGN(FooBarUI);
};
WEB_UI_CONTROLLER_TYPE_IMPL(FooBarUI)
@@ -121,6 +123,10 @@
public:
TestWebUIControllerFactory() = default;
+ TestWebUIControllerFactory(const TestWebUIControllerFactory&) = delete;
+ TestWebUIControllerFactory& operator=(const TestWebUIControllerFactory&) =
+ delete;
+
std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
content::WebUI* web_ui,
const GURL& url) override {
@@ -144,9 +150,6 @@
const GURL& url) override {
return url.SchemeIs(content::kChromeUIScheme);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestWebUIControllerFactory);
};
} // namespace
diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc
index 8b4706e..a4a6066 100644
--- a/chrome/test/nacl/nacl_browsertest_util.cc
+++ b/chrome/test/nacl/nacl_browsertest_util.cc
@@ -114,6 +114,10 @@
public:
NaClIntegrationMessageHandler();
+ NaClIntegrationMessageHandler(const NaClIntegrationMessageHandler&) = delete;
+ NaClIntegrationMessageHandler& operator=(
+ const NaClIntegrationMessageHandler&) = delete;
+
void Log(const std::string& message);
MessageResponse HandleStructuredMessage(const std::string& type,
@@ -125,8 +129,6 @@
private:
bool test_passed_;
-
- DISALLOW_COPY_AND_ASSIGN(NaClIntegrationMessageHandler);
};
NaClIntegrationMessageHandler::NaClIntegrationMessageHandler()
diff --git a/chrome/test/nacl/nacl_browsertest_util.h b/chrome/test/nacl/nacl_browsertest_util.h
index 13496d84..85f339ba 100644
--- a/chrome/test/nacl/nacl_browsertest_util.h
+++ b/chrome/test/nacl/nacl_browsertest_util.h
@@ -45,6 +45,9 @@
public:
LoadTestMessageHandler();
+ LoadTestMessageHandler(const LoadTestMessageHandler&) = delete;
+ LoadTestMessageHandler& operator=(const LoadTestMessageHandler&) = delete;
+
void Log(const std::string& type, const std::string& message);
MessageResponse HandleStructuredMessage(const std::string& type,
@@ -56,8 +59,6 @@
private:
bool test_passed_;
-
- DISALLOW_COPY_AND_ASSIGN(LoadTestMessageHandler);
};
class NaClBrowserTestBase : public InProcessBrowserTest {
diff --git a/chrome/test/permissions/permission_request_manager_test_api.cc b/chrome/test/permissions/permission_request_manager_test_api.cc
index bf9e63f..bc4dfb9 100644
--- a/chrome/test/permissions/permission_request_manager_test_api.cc
+++ b/chrome/test/permissions/permission_request_manager_test_api.cc
@@ -32,14 +32,16 @@
base::Unretained(this)));
}
+ TestPermissionRequestOwner(const TestPermissionRequestOwner&) = delete;
+ TestPermissionRequestOwner& operator=(const TestPermissionRequestOwner&) =
+ delete;
+
permissions::PermissionRequest* request() { return request_.get(); }
private:
void DeleteThis() { delete this; }
std::unique_ptr<permissions::PermissionRequest> request_;
-
- DISALLOW_COPY_AND_ASSIGN(TestPermissionRequestOwner);
};
} // namespace
diff --git a/chrome/test/permissions/permission_request_manager_test_api.h b/chrome/test/permissions/permission_request_manager_test_api.h
index 4e13498..965f0f6 100644
--- a/chrome/test/permissions/permission_request_manager_test_api.h
+++ b/chrome/test/permissions/permission_request_manager_test_api.h
@@ -30,6 +30,11 @@
// Wraps the PermissionRequestManager for the active tab in |browser|.
explicit PermissionRequestManagerTestApi(Browser* browser);
+ PermissionRequestManagerTestApi(const PermissionRequestManagerTestApi&) =
+ delete;
+ PermissionRequestManagerTestApi& operator=(
+ const PermissionRequestManagerTestApi&) = delete;
+
permissions::PermissionRequestManager* manager() { return manager_; }
// Add a "simple" permission request originating from the given frame. One
@@ -46,8 +51,6 @@
private:
permissions::PermissionRequestManager* manager_;
-
- DISALLOW_COPY_AND_ASSIGN(PermissionRequestManagerTestApi);
};
} // namespace test
diff --git a/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc b/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc
index 02f9c01..6692336 100644
--- a/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc
+++ b/chrome/test/pixel/browser_skia_gold_pixel_diff_unittest.cc
@@ -47,8 +47,9 @@
cmd_line->AppendSwitchASCII("git-revision", "test");
}
- private:
- DISALLOW_COPY_AND_ASSIGN(BrowserSkiaGoldPixelDiffTest);
+ BrowserSkiaGoldPixelDiffTest(const BrowserSkiaGoldPixelDiffTest&) = delete;
+ BrowserSkiaGoldPixelDiffTest& operator=(const BrowserSkiaGoldPixelDiffTest&) =
+ delete;
};
TEST_F(BrowserSkiaGoldPixelDiffTest, CompareScreenshotByView) {
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc
index e193251..bb1ca0b 100644
--- a/chrome/test/ppapi/ppapi_browsertest.cc
+++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -1060,6 +1060,9 @@
base::BindOnce(&WrappedUDPSocket::Close, base::Unretained(this)));
}
+ WrappedUDPSocket(const WrappedUDPSocket&) = delete;
+ WrappedUDPSocket& operator=(const WrappedUDPSocket&) = delete;
+
// network::mojom::UDPSocket implementation.
void Connect(const net::IPEndPoint& remote_addr,
network::mojom::UDPSocketOptionsPtr options,
@@ -1162,8 +1165,6 @@
// Only populated on certain read FailureTypes.
mojo::Remote<network::mojom::UDPSocketListener> socket_listener_;
-
- DISALLOW_COPY_AND_ASSIGN(WrappedUDPSocket);
};
void TestCreateUDPSocketCallback(
diff --git a/chrome/test/ppapi/ppapi_test.h b/chrome/test/ppapi/ppapi_test.h
index 5aef8317..60eb875 100644
--- a/chrome/test/ppapi/ppapi_test.h
+++ b/chrome/test/ppapi/ppapi_test.h
@@ -26,6 +26,9 @@
public:
PPAPITestMessageHandler();
+ PPAPITestMessageHandler(const PPAPITestMessageHandler&) = delete;
+ PPAPITestMessageHandler& operator=(const PPAPITestMessageHandler&) = delete;
+
MessageResponse HandleMessage(const std::string& json) override;
void Reset() override;
@@ -35,8 +38,6 @@
private:
std::string message_;
-
- DISALLOW_COPY_AND_ASSIGN(PPAPITestMessageHandler);
};
class PPAPITestBase : public InProcessBrowserTest {
diff --git a/chrome/utility/importer/bookmarks_file_importer.h b/chrome/utility/importer/bookmarks_file_importer.h
index ce66ee1..12598ff 100644
--- a/chrome/utility/importer/bookmarks_file_importer.h
+++ b/chrome/utility/importer/bookmarks_file_importer.h
@@ -16,14 +16,15 @@
public:
BookmarksFileImporter();
+ BookmarksFileImporter(const BookmarksFileImporter&) = delete;
+ BookmarksFileImporter& operator=(const BookmarksFileImporter&) = delete;
+
void StartImport(const importer::SourceProfile& source_profile,
uint16_t items,
ImporterBridge* bridge) override;
private:
~BookmarksFileImporter() override;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarksFileImporter);
};
#endif // CHROME_UTILITY_IMPORTER_BOOKMARKS_FILE_IMPORTER_H_
diff --git a/chrome/utility/importer/edge_database_reader_win.h b/chrome/utility/importer/edge_database_reader_win.h
index 875b945..ad15427 100644
--- a/chrome/utility/importer/edge_database_reader_win.h
+++ b/chrome/utility/importer/edge_database_reader_win.h
@@ -20,6 +20,9 @@
public:
EdgeErrorObject() : last_error_(JET_errSuccess) {}
+ EdgeErrorObject(const EdgeErrorObject&) = delete;
+ EdgeErrorObject& operator=(const EdgeErrorObject&) = delete;
+
// Get the last error converted to a descriptive string.
std::wstring GetErrorMessage() const;
// Get the last error value.
@@ -32,8 +35,6 @@
private:
JET_ERR last_error_;
-
- DISALLOW_COPY_AND_ASSIGN(EdgeErrorObject);
};
class EdgeDatabaseTableEnumerator : public EdgeErrorObject {
diff --git a/chrome/utility/importer/edge_importer_win.h b/chrome/utility/importer/edge_importer_win.h
index c93c38a..4c4c054 100644
--- a/chrome/utility/importer/edge_importer_win.h
+++ b/chrome/utility/importer/edge_importer_win.h
@@ -21,6 +21,9 @@
public:
EdgeImporter();
+ EdgeImporter(const EdgeImporter&) = delete;
+ EdgeImporter& operator=(const EdgeImporter&) = delete;
+
// Importer:
void StartImport(const importer::SourceProfile& source_profile,
uint16_t items,
@@ -38,8 +41,6 @@
// Edge does not have source path. It's used in unit tests only for providing
// a fake source for the spartan database location.
base::FilePath source_path_;
-
- DISALLOW_COPY_AND_ASSIGN(EdgeImporter);
};
#endif // CHROME_UTILITY_IMPORTER_EDGE_IMPORTER_WIN_H_
diff --git a/chrome/utility/importer/external_process_importer_bridge.h b/chrome/utility/importer/external_process_importer_bridge.h
index a5723dc..d5255e0 100644
--- a/chrome/utility/importer/external_process_importer_bridge.h
+++ b/chrome/utility/importer/external_process_importer_bridge.h
@@ -40,6 +40,10 @@
const base::flat_map<uint32_t, std::string>& localized_strings,
mojo::SharedRemote<chrome::mojom::ProfileImportObserver> observer);
+ ExternalProcessImporterBridge(const ExternalProcessImporterBridge&) = delete;
+ ExternalProcessImporterBridge& operator=(
+ const ExternalProcessImporterBridge&) = delete;
+
// Begin ImporterBridge implementation:
void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
const std::u16string& first_folder_name) override;
@@ -76,8 +80,6 @@
base::flat_map<uint32_t, std::string> localized_strings_;
mojo::SharedRemote<chrome::mojom::ProfileImportObserver> observer_;
-
- DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterBridge);
};
#endif // CHROME_UTILITY_IMPORTER_EXTERNAL_PROCESS_IMPORTER_BRIDGE_H_
diff --git a/chrome/utility/importer/firefox_importer.h b/chrome/utility/importer/firefox_importer.h
index 0f797bd..58559911 100644
--- a/chrome/utility/importer/firefox_importer.h
+++ b/chrome/utility/importer/firefox_importer.h
@@ -38,6 +38,9 @@
public:
FirefoxImporter();
+ FirefoxImporter(const FirefoxImporter&) = delete;
+ FirefoxImporter& operator=(const FirefoxImporter&) = delete;
+
// Importer:
void StartImport(const importer::SourceProfile& source_profile,
uint16_t items,
@@ -119,8 +122,6 @@
// Stored because we can only access it from the UI thread.
std::string locale_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(FirefoxImporter);
};
#endif // CHROME_UTILITY_IMPORTER_FIREFOX_IMPORTER_H_
diff --git a/chrome/utility/importer/ie_importer_win.h b/chrome/utility/importer/ie_importer_win.h
index 514a2d1b..5a07166 100644
--- a/chrome/utility/importer/ie_importer_win.h
+++ b/chrome/utility/importer/ie_importer_win.h
@@ -23,6 +23,9 @@
public:
IEImporter();
+ IEImporter(const IEImporter&) = delete;
+ IEImporter& operator=(const IEImporter&) = delete;
+
// Importer:
void StartImport(const importer::SourceProfile& source_profile,
uint16_t items,
@@ -75,8 +78,6 @@
// IE does not have source path. It's used in unit tests only for providing a
// fake source and it's used if importing old Edge favorites on Windows 10.
base::FilePath source_path_;
-
- DISALLOW_COPY_AND_ASSIGN(IEImporter);
};
#endif // CHROME_UTILITY_IMPORTER_IE_IMPORTER_WIN_H_
diff --git a/chrome/utility/importer/importer.h b/chrome/utility/importer/importer.h
index 1b541a2..547777a 100644
--- a/chrome/utility/importer/importer.h
+++ b/chrome/utility/importer/importer.h
@@ -19,6 +19,9 @@
// The base class of all importers.
class Importer : public base::RefCountedThreadSafe<Importer> {
public:
+ Importer(const Importer&) = delete;
+ Importer& operator=(const Importer&) = delete;
+
// All importers should implement this method by adding their import logic.
// And it will be run in file thread by ImporterHost. Since we do async
// import, the importer should invoke ImporterHost::NotifyImportEnded() to
@@ -43,8 +46,6 @@
private:
// True if the caller cancels the import process.
bool cancelled_;
-
- DISALLOW_COPY_AND_ASSIGN(Importer);
};
#endif // CHROME_UTILITY_IMPORTER_IMPORTER_H_
diff --git a/chrome/utility/importer/safari_importer.h b/chrome/utility/importer/safari_importer.h
index f107a538..92155929 100644
--- a/chrome/utility/importer/safari_importer.h
+++ b/chrome/utility/importer/safari_importer.h
@@ -41,6 +41,9 @@
// We pass it in as a parameter for testing purposes.
explicit SafariImporter(const base::FilePath& library_dir);
+ SafariImporter(const SafariImporter&) = delete;
+ SafariImporter& operator=(const SafariImporter&) = delete;
+
// Importer:
void StartImport(const importer::SourceProfile& source_profile,
uint16_t items,
@@ -90,8 +93,6 @@
favicon_base::FaviconUsageDataList* favicons);
base::FilePath library_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(SafariImporter);
};
#endif // CHROME_UTILITY_IMPORTER_SAFARI_IMPORTER_H_
diff --git a/chrome/utility/safe_browsing/mac/udif.cc b/chrome/utility/safe_browsing/mac/udif.cc
index 581240d..c1bdba5 100644
--- a/chrome/utility/safe_browsing/mac/udif.cc
+++ b/chrome/utility/safe_browsing/mac/udif.cc
@@ -191,6 +191,9 @@
public:
UDIFBlock() : block_() {}
+ UDIFBlock(const UDIFBlock&) = delete;
+ UDIFBlock& operator=(const UDIFBlock&) = delete;
+
bool ParseBlockData(const UDIFBlockData* block_data,
size_t block_data_size,
uint16_t sector_size) {
@@ -265,8 +268,6 @@
private:
UDIFBlockData block_;
std::vector<UDIFBlockChunk> chunks_;
-
- DISALLOW_COPY_AND_ASSIGN(UDIFBlock);
};
#pragma pack(pop)