diff --git a/DEPS b/DEPS index e596376d..a1ae48ec 100644 --- a/DEPS +++ b/DEPS
@@ -232,7 +232,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '6f8051954fa41ecaf9eb255e53c0dae94618e905', + 'v8_revision': '6eda84172c2b6944bfde640c0337a4ce80582650', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. @@ -275,7 +275,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. - 'freetype_revision': '5b626281f1e6524dd87e3d5d6af795b39a8cc10b', + 'freetype_revision': '71969d1edfac78f2bd2f76f0210848d124f38ed0', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. @@ -295,7 +295,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'fb6990454da9ed24ad473803c53a04173ba0f948', + 'catapult_revision': '8ec776f0d708cc6fe208d85fea5044971a01636e', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -343,7 +343,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': '39046f36d7f34d50ff6a117ba801536efa8d3b30', + 'dawn_revision': '1a965ab7f8ba4f3a1e52a99a6ad53e15457f1fea', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -1012,7 +1012,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'eb28118b7a61ec5c21906b6fceea657d66b4f004', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'c1fd44b01a571e82dea1aa16d9174c7c73f30118', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1619,7 +1619,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'cd2e35814071e2732f1cb13db8387ebf41bfe98f', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'bc7666be51541b27f8a3cd41b60e8365e6e5d88c', + Var('webrtc_git') + '/src.git' + '@' + 'ef4d0b6c7a4ab2ac4b460c79af3cf858cd6acbb5', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1677,7 +1677,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@4abb7127fda147ecff791ba96b59481b0857ca3c', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@b0ca9bbf75018ccb82c70aeb1fd47766eb5bd179', 'condition': 'checkout_src_internal', },
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index c85026e..e150f69 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py
@@ -739,10 +739,9 @@ [_THIRD_PARTY_EXCEPT_BLINK], # Not an error in third_party folders. ), ( - (r'/base::ThreadRestrictions::(ScopedAllowIO|AssertIOAllowed|' - r'DisallowWaiting|AssertWaitAllowed|SetWaitAllowed|ScopedAllowWait)'), + ('base::ThreadRestrictions::ScopedAllowIO'), ( - 'Use the new API in base/threading/thread_restrictions.h.', + 'ScopedAllowIO is deprecated, use ScopedAllowBlocking instead.', ), False, (),
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn index 998bc01a..fe14ad5f 100644 --- a/android_webview/BUILD.gn +++ b/android_webview/BUILD.gn
@@ -789,7 +789,6 @@ "//services/network/public:features_java", "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/blink/public/common:common_java", - "//ui/android:ui_features_java", ] srcjar_deps = [ ":common_java_features_srcjar",
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index 7424192..f126224 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -17,7 +17,6 @@ import org.chromium.gpu.config.GpuFeatures; import org.chromium.gpu.config.GpuSwitches; import org.chromium.services.network.NetworkServiceFeatures; -import org.chromium.ui.base.UiFeatures; /** * List of experimental features/flags supported for user devices. Add features/flags to this list @@ -140,9 +139,6 @@ Flag.baseFeature(AwFeatures.WEBVIEW_MIXED_CONTENT_AUTOUPGRADES, "Enables autoupgrades for audio/video/image mixed content when mixed content " + "mode is set to MIXED_CONTENT_COMPATIBILITY_MODE"), - Flag.baseFeature(UiFeatures.SWIPE_TO_MOVE_CURSOR, - "Enables swipe to move cursor feature." - + "This flag will only take effect on Android 11 and above."), Flag.baseFeature(AwFeatures.WEBVIEW_JAVA_JS_BRIDGE_MOJO, "Enables the new Java/JS Bridge code path with mojo implementation."), Flag.baseFeature(
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc index 83930968..938d4b6a 100644 --- a/android_webview/renderer/aw_render_view_ext.cc +++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -14,6 +14,7 @@ AwRenderViewExt::AwRenderViewExt(blink::WebView* web_view) : blink::WebViewObserver(web_view) { DCHECK(web_view != nullptr); + web_view->GetSettings()->SetNeedsMinPreferredLogicalWidth(true); } AwRenderViewExt::~AwRenderViewExt() {}
diff --git a/ash/components/BUILD.gn b/ash/components/BUILD.gn index 34b9d5b..7b9fd24 100644 --- a/ash/components/BUILD.gn +++ b/ash/components/BUILD.gn
@@ -12,6 +12,7 @@ testonly = true deps = [ "//ash/components/audio:unit_tests", + "//ash/components/device_activity:unit_tests", "//ash/components/drivefs:unit_tests", "//ash/components/pcie_peripheral:unit_tests", "//ash/components/power:unit_tests",
diff --git a/ash/components/device_activity/BUILD.gn b/ash/components/device_activity/BUILD.gn new file mode 100644 index 0000000..91ba0ac --- /dev/null +++ b/ash/components/device_activity/BUILD.gn
@@ -0,0 +1,37 @@ +# Copyright 2021 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/chromeos/ui_mode.gni") + +assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash") + +component("device_activity") { + output_name = "ash_device_activity" + defines = [ "IS_ASH_DEVICE_ACTIVITY_IMPL" ] + + deps = [ "//base" ] + + sources = [ + "device_activity_client.cc", + "device_activity_client.h", + "device_activity_controller.cc", + "device_activity_controller.h", + ] +} + +source_set("unit_tests") { + testonly = true + + sources = [ + "device_activity_client_unittest.cc", + "device_activity_controller_unittest.cc", + ] + + deps = [ + ":device_activity", + "//base/test:test_support", + "//services/device/public/cpp:test_support", + "//testing/gtest", + ] +}
diff --git a/ash/components/device_activity/device_activity_client.cc b/ash/components/device_activity/device_activity_client.cc new file mode 100644 index 0000000..d1096e7d --- /dev/null +++ b/ash/components/device_activity/device_activity_client.cc
@@ -0,0 +1,13 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/components/device_activity/device_activity_client.h" + +namespace ash { +namespace device_activity { + +DeviceActivityClient::DeviceActivityClient(Trigger t) {} + +} // namespace device_activity +} // namespace ash
diff --git a/ash/components/device_activity/device_activity_client.h b/ash/components/device_activity/device_activity_client.h new file mode 100644 index 0000000..da6bcb6 --- /dev/null +++ b/ash/components/device_activity/device_activity_client.h
@@ -0,0 +1,26 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CLIENT_H_ +#define ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CLIENT_H_ + +#include "ash/components/device_activity/trigger.h" +#include "base/component_export.h" + +namespace ash { +namespace device_activity { + +// Counts device activity while guaranteeing complete device privacy. +class COMPONENT_EXPORT(ASH_DEVICE_ACTIVITY) DeviceActivityClient { + public: + explicit DeviceActivityClient(Trigger t); + DeviceActivityClient(const DeviceActivityClient&) = delete; + DeviceActivityClient& operator=(const DeviceActivityClient&) = delete; + ~DeviceActivityClient() = default; +}; + +} // namespace device_activity +} // namespace ash + +#endif // ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CLIENT_H_
diff --git a/ash/components/device_activity/device_activity_client_unittest.cc b/ash/components/device_activity/device_activity_client_unittest.cc new file mode 100644 index 0000000..6edec74 --- /dev/null +++ b/ash/components/device_activity/device_activity_client_unittest.cc
@@ -0,0 +1,32 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/components/device_activity/device_activity_client.h" + +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { +namespace device_activity { + +class DeviceActivityClientTest : public testing::Test { + public: + DeviceActivityClientTest() = default; + DeviceActivityClientTest(const DeviceActivityClientTest&) = delete; + DeviceActivityClientTest& operator=(const DeviceActivityClientTest&) = delete; + ~DeviceActivityClientTest() override = default; + + protected: + // testing::Test: + void SetUp() override { + device_activity_client_ = + std::make_unique<DeviceActivityClient>(Trigger::kNetwork); + } + + void TearDown() override { device_activity_client_.reset(); } + + std::unique_ptr<DeviceActivityClient> device_activity_client_; +}; + +} // namespace device_activity +} // namespace ash
diff --git a/ash/components/device_activity/device_activity_controller.cc b/ash/components/device_activity/device_activity_controller.cc new file mode 100644 index 0000000..63ab6dc --- /dev/null +++ b/ash/components/device_activity/device_activity_controller.cc
@@ -0,0 +1,45 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/components/device_activity/device_activity_controller.h" + +#include "ash/components/device_activity/device_activity_client.h" +#include "base/check_op.h" + +namespace ash { +namespace device_activity { + +namespace { +DeviceActivityController* g_ash_device_activity_controller = nullptr; +} // namespace + +DeviceActivityController* DeviceActivityController::Get() { + return g_ash_device_activity_controller; +} + +DeviceActivityController::DeviceActivityController() { + DCHECK(!g_ash_device_activity_controller); + g_ash_device_activity_controller = this; +} + +DeviceActivityController::~DeviceActivityController() { + DCHECK_EQ(this, g_ash_device_activity_controller); + Stop(Trigger::kNetwork); + g_ash_device_activity_controller = nullptr; +} + +void DeviceActivityController::Start(Trigger t) { + if (t == Trigger::kNetwork) { + da_client_network_ = std::make_unique<DeviceActivityClient>(t); + } +} + +void DeviceActivityController::Stop(Trigger t) { + if (t == Trigger::kNetwork && da_client_network_) { + da_client_network_.reset(); + } +} + +} // namespace device_activity +} // namespace ash
diff --git a/ash/components/device_activity/device_activity_controller.h b/ash/components/device_activity/device_activity_controller.h new file mode 100644 index 0000000..885869e3 --- /dev/null +++ b/ash/components/device_activity/device_activity_controller.h
@@ -0,0 +1,42 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CONTROLLER_H_ +#define ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CONTROLLER_H_ + +#include <memory> + +#include "ash/components/device_activity/trigger.h" +#include "base/component_export.h" + +namespace ash { +namespace device_activity { + +class DeviceActivityClient; + +// Counts device actives in a privacy compliant way. +class COMPONENT_EXPORT(ASH_DEVICE_ACTIVITY) DeviceActivityController { + public: + // Retrieves a singleton instance. + static DeviceActivityController* Get(); + + DeviceActivityController(); + DeviceActivityController(const DeviceActivityController&) = delete; + DeviceActivityController& operator=(const DeviceActivityController&) = delete; + ~DeviceActivityController(); + + // Start Device Activity reporting for a trigger. + void Start(Trigger t); + + // Stop Device Activity reporting for a trigger. + void Stop(Trigger t); + + private: + std::unique_ptr<DeviceActivityClient> da_client_network_; +}; + +} // namespace device_activity +} // namespace ash + +#endif // ASH_COMPONENTS_DEVICE_ACTIVITY_DEVICE_ACTIVITY_CONTROLLER_H_
diff --git a/ash/components/device_activity/device_activity_controller_unittest.cc b/ash/components/device_activity/device_activity_controller_unittest.cc new file mode 100644 index 0000000..cd8a150f3 --- /dev/null +++ b/ash/components/device_activity/device_activity_controller_unittest.cc
@@ -0,0 +1,37 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/components/device_activity/device_activity_controller.h" + +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { +namespace device_activity { + +class DeviceActivityControllerTest : public testing::Test { + public: + DeviceActivityControllerTest() = default; + DeviceActivityControllerTest(const DeviceActivityControllerTest&) = delete; + DeviceActivityControllerTest& operator=(const DeviceActivityControllerTest&) = + delete; + ~DeviceActivityControllerTest() override = default; + + protected: + // testing::Test: + void SetUp() override { + device_activity_controller_ = std::make_unique<DeviceActivityController>(); + } + + void TearDown() override { device_activity_controller_.reset(); } + + std::unique_ptr<DeviceActivityController> device_activity_controller_; +}; + +TEST_F(DeviceActivityControllerTest, + CheckDeviceActivityControllerSingletonInitialized) { + EXPECT_NE(DeviceActivityController::Get(), nullptr); +} + +} // namespace device_activity +} // namespace ash
diff --git a/ash/components/device_activity/trigger.h b/ash/components/device_activity/trigger.h new file mode 100644 index 0000000..b737c491 --- /dev/null +++ b/ash/components/device_activity/trigger.h
@@ -0,0 +1,20 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_COMPONENTS_DEVICE_ACTIVITY_TRIGGER_H_ +#define ASH_COMPONENTS_DEVICE_ACTIVITY_TRIGGER_H_ + +namespace ash { +namespace device_activity { + +// Device actives are measured according to trigger enums. +// TODO(hirthanan): Add another trigger for when sign-in occurs. +enum class Trigger { + kNetwork // Network state becomes connected. +}; + +} // namespace device_activity +} // namespace ash + +#endif // ASH_COMPONENTS_DEVICE_ACTIVITY_TRIGGER_H_
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 126aabd7..92e6c5b 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -1195,6 +1195,10 @@ const base::Feature kWindowsFollowCursor{"WindowsFollowCursor", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enables or disables Fresnel Device Active reporting on Chrome OS. +const base::Feature kDeviceActiveClient{"DeviceActiveClient", + base::FEATURE_DISABLED_BY_DEFAULT}; + //////////////////////////////////////////////////////////////////////////////// bool AreContextualNudgesEnabled() {
diff --git a/ash/constants/ash_features.h b/ash/constants/ash_features.h index a745cad1..ad1a8b1 100644 --- a/ash/constants/ash_features.h +++ b/ash/constants/ash_features.h
@@ -137,6 +137,7 @@ COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDarkLightMode; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDemoModeSWA; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDeskTemplateSync; +COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDeviceActiveClient; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDiagnosticsApp; COMPONENT_EXPORT(ASH_CONSTANTS) extern const base::Feature kDiagnosticsAppNavigation;
diff --git a/ash/public/cpp/system_tray_client.h b/ash/public/cpp/system_tray_client.h index ca6e3bcf..fd31db9 100644 --- a/ash/public/cpp/system_tray_client.h +++ b/ash/public/cpp/system_tray_client.h
@@ -8,6 +8,8 @@ #include <string> #include "ash/public/cpp/ash_public_export.h" +#include "base/strings/string_piece.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace ash { @@ -22,15 +24,12 @@ // Shows settings related to Bluetooth devices (e.g. to add a device). virtual void ShowBluetoothSettings() = 0; - // Shows the web UI dialog to pair a Bluetooth device. - // |address| is the unique device address in the form "XX:XX:XX:XX:XX:XX" - // with hex digits X. |name_for_display| is a human-readable name, not - // necessarily the device name. + // Show the Bluetooth pairing dialog. When provided, |device_address| is the + // unique device address that the dialog should attempt to pair with and + // should be in the form "XX:XX:XX:XX:XX:XX". When |device_address| is not + // provided the dialog will show the device list instead. virtual void ShowBluetoothPairingDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) = 0; + absl::optional<base::StringPiece> device_address) = 0; // Shows the settings related to date, timezone etc. virtual void ShowDateSettings() = 0;
diff --git a/ash/public/cpp/test/test_system_tray_client.cc b/ash/public/cpp/test/test_system_tray_client.cc index 33b0e160..efa808a 100644 --- a/ash/public/cpp/test/test_system_tray_client.cc +++ b/ash/public/cpp/test/test_system_tray_client.cc
@@ -17,10 +17,7 @@ } void TestSystemTrayClient::ShowBluetoothPairingDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) {} + absl::optional<base::StringPiece> device_address) {} void TestSystemTrayClient::ShowDateSettings() {}
diff --git a/ash/public/cpp/test/test_system_tray_client.h b/ash/public/cpp/test/test_system_tray_client.h index bf7e88b..5926f4d 100644 --- a/ash/public/cpp/test/test_system_tray_client.h +++ b/ash/public/cpp/test/test_system_tray_client.h
@@ -8,6 +8,8 @@ #include "ash/public/cpp/ash_public_export.h" #include "ash/public/cpp/system_tray_client.h" #include "base/macros.h" +#include "base/strings/string_piece.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace ash { @@ -24,10 +26,8 @@ // SystemTrayClient: void ShowSettings(int64_t display_id) override; void ShowBluetoothSettings() override; - void ShowBluetoothPairingDialog(const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) override; + void ShowBluetoothPairingDialog( + absl::optional<base::StringPiece> device_address) override; void ShowDateSettings() override; void ShowSetTimeDialog() override; void ShowDisplaySettings() override;
diff --git a/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc b/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc index 8762275e..a932865 100644 --- a/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc +++ b/ash/system/bluetooth/tray_bluetooth_helper_legacy.cc
@@ -286,8 +286,7 @@ // Show pairing dialog for the unpaired device; this kicks off pairing. Shell::Get()->system_tray_model()->client()->ShowBluetoothPairingDialog( - device->GetAddress(), device->GetNameForDisplay(), device->IsPaired(), - device->IsConnected()); + device->GetAddress()); } BluetoothSystem::State TrayBluetoothHelperLegacy::GetBluetoothState() {
diff --git a/ash/webui/diagnostics_ui/resources/fake_data.js b/ash/webui/diagnostics_ui/resources/fake_data.js index 3e5c9e29..7a21624 100644 --- a/ash/webui/diagnostics_ui/resources/fake_data.js +++ b/ash/webui/diagnostics_ui/resources/fake_data.js
@@ -475,6 +475,15 @@ }; /** @type {!Network} */ +export let fakeConnectingEthernetNetwork = { + state: NetworkState.kConnecting, + type: NetworkType.kEthernet, + observerGuid: 'ethernetGuid', + name: 'ethernetName', + macAddress: '81:C5:A6:30:3F:33', +}; + +/** @type {!Network} */ export let fakeDisconnectedEthernetNetwork = { state: NetworkState.kNotConnected, type: NetworkType.kEthernet,
diff --git a/ash/webui/diagnostics_ui/resources/network_card.js b/ash/webui/diagnostics_ui/resources/network_card.js index fde969881..512a21e 100644 --- a/ash/webui/diagnostics_ui/resources/network_card.js +++ b/ash/webui/diagnostics_ui/resources/network_card.js
@@ -145,11 +145,12 @@ return false; } - // Show the data-points when portal, online, or connected. + // Show the data-points when portal, online, connected, or connecting. switch (this.network.state) { case NetworkState.kPortal: case NetworkState.kOnline: case NetworkState.kConnected: + case NetworkState.kConnecting: return true; default: return false;
diff --git a/ash/webui/scanning/resources/scanning_app.js b/ash/webui/scanning/resources/scanning_app.js index 05465f1..18a20eb 100644 --- a/ash/webui/scanning/resources/scanning_app.js +++ b/ash/webui/scanning/resources/scanning_app.js
@@ -321,14 +321,15 @@ multiPageScanChecked: Boolean, /** - * Only true when the multi-page checkbox is checked AND the selected file - * type is PDF. Multi-page scanning only supports creating PDFs. + * Only true when the multi-page checkbox is checked and the supported scan + * settings are chosen. Multi-page scanning only supports creating PDFs from + * the Flatbed source. * @private {boolean} */ isMultiPageScan_: { type: Boolean, computed: 'computeIsMultiPageScan_(multiPageScanChecked, ' + - 'selectedFileType)', + 'selectedFileType, selectedSource)', observer: 'onIsMultiPageScanChange_', }, @@ -1252,7 +1253,8 @@ /** @private */ computeIsMultiPageScan_() { - return this.multiPageScanChecked && this.isPDFSelected_(); + return this.multiPageScanChecked && this.isPDFSelected_() && + this.isFlatbedSelected_(); }, /** @private */
diff --git a/ash/wm/desks/desks_restore_util.cc b/ash/wm/desks/desks_restore_util.cc index 60061b8..62e3a6f0 100644 --- a/ash/wm/desks/desks_restore_util.cc +++ b/ash/wm/desks/desks_restore_util.cc
@@ -12,6 +12,7 @@ #include "ash/wm/desks/desks_histogram_enums.h" #include "ash/wm/desks/desks_util.h" #include "base/auto_reset.h" +#include "base/metrics/histogram_macros.h" #include "base/strings/utf_string_conversions.h" #include "base/time/clock.h" #include "base/values.h" @@ -138,6 +139,9 @@ return; } + if (primary_user_prefs->GetBoolean(kUserHasUsedDesksRecently)) + UMA_HISTOGRAM_BOOLEAN("Ash.Desks.UserHasUsedDesksRecently", true); + const base::ListValue* desks_names = primary_user_prefs->GetList(prefs::kDesksNamesList); const base::ListValue* desks_metrics =
diff --git a/base/lazy_instance.h b/base/lazy_instance.h index 94e91e80..2e6f2ed60 100644 --- a/base/lazy_instance.h +++ b/base/lazy_instance.h
@@ -52,6 +52,7 @@ #include "base/debug/leak_annotations.h" #include "base/lazy_instance_helpers.h" #include "base/threading/thread_restrictions.h" +#include "build/build_config.h" // LazyInstance uses its own struct initializer-list style static // initialization, which does not require a constructor. @@ -151,7 +152,7 @@ Type* Pointer() { #if DCHECK_IS_ON() if (!Traits::kAllowedToAccessOnNonjoinableThread) - ThreadRestrictions::AssertSingletonAllowed(); + internal::AssertSingletonAllowed(); #endif return subtle::GetOrCreateLazyPointer(
diff --git a/base/memory/singleton.h b/base/memory/singleton.h index cd39b21..27418e7c 100644 --- a/base/memory/singleton.h +++ b/base/memory/singleton.h
@@ -231,7 +231,7 @@ static Type* get() { #if DCHECK_IS_ON() if (!Traits::kAllowedToAccessOnNonjoinableThread) - ThreadRestrictions::AssertSingletonAllowed(); + internal::AssertSingletonAllowed(); #endif return subtle::GetOrCreateLazyPointer( @@ -244,7 +244,7 @@ static Type* GetIfExists() { #if DCHECK_IS_ON() if (!Traits::kAllowedToAccessOnNonjoinableThread) - ThreadRestrictions::AssertSingletonAllowed(); + internal::AssertSingletonAllowed(); #endif if (!subtle::NoBarrier_Load(&instance_))
diff --git a/base/message_loop/message_pump_default.cc b/base/message_loop/message_pump_default.cc index 315e1d1..b2519bf 100644 --- a/base/message_loop/message_pump_default.cc +++ b/base/message_loop/message_pump_default.cc
@@ -6,7 +6,6 @@ #include "base/auto_reset.h" #include "base/logging.h" -#include "base/threading/thread_restrictions.h" #include "build/build_config.h" #if defined(OS_APPLE)
diff --git a/base/task/thread_pool/task_tracker.cc b/base/task/thread_pool/task_tracker.cc index 05316ba..7999458 100644 --- a/base/task/thread_pool/task_tracker.cc +++ b/base/task/thread_pool/task_tracker.cc
@@ -455,14 +455,15 @@ const auto environment = task_source->GetExecutionEnvironment(); - const bool previous_singleton_allowed = - ThreadRestrictions::SetSingletonAllowed( - traits.shutdown_behavior() != - TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN); - const bool previous_io_allowed = - ThreadRestrictions::SetIOAllowed(traits.may_block()); - const bool previous_wait_allowed = - ThreadRestrictions::SetWaitAllowed(traits.with_base_sync_primitives()); + absl::optional<ScopedDisallowSingleton> disallow_singleton; + absl::optional<ScopedDisallowBlocking> disallow_blocking; + absl::optional<ScopedDisallowBaseSyncPrimitives> disallow_sync_primitives; + if (traits.shutdown_behavior() == TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN) + disallow_singleton.emplace(); + if (!traits.may_block()) + disallow_blocking.emplace(); + if (!traits.with_base_sync_primitives()) + disallow_sync_primitives.emplace(); { DCHECK(environment.token.IsValid()); @@ -527,10 +528,6 @@ // scope in which the callback runs. task.task = OnceClosure(); } - - ThreadRestrictions::SetWaitAllowed(previous_wait_allowed); - ThreadRestrictions::SetIOAllowed(previous_io_allowed); - ThreadRestrictions::SetSingletonAllowed(previous_singleton_allowed); } void TaskTracker::BeginCompleteShutdown(base::WaitableEvent& shutdown_event) {
diff --git a/base/task/thread_pool/task_tracker_unittest.cc b/base/task/thread_pool/task_tracker_unittest.cc index 978870e..2090b30 100644 --- a/base/task/thread_pool/task_tracker_unittest.cc +++ b/base/task/thread_pool/task_tracker_unittest.cc
@@ -146,19 +146,6 @@ const bool expect_post_succeeds_; }; -class ScopedSetSingletonAllowed { - public: - explicit ScopedSetSingletonAllowed(bool singleton_allowed) - : previous_value_( - ThreadRestrictions::SetSingletonAllowed(singleton_allowed)) {} - ~ScopedSetSingletonAllowed() { - ThreadRestrictions::SetSingletonAllowed(previous_value_); - } - - private: - const bool previous_value_; -}; - class ThreadPoolTaskTrackerTest : public testing::TestWithParam<TaskShutdownBehavior> { public: @@ -490,16 +477,11 @@ const bool can_use_singletons = (GetParam() != TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN); - Task task(FROM_HERE, BindOnce(&ThreadRestrictions::AssertSingletonAllowed), + Task task(FROM_HERE, BindOnce(&internal::AssertSingletonAllowed), TimeTicks::Now(), TimeDelta()); auto sequence = WillPostTaskAndQueueTaskSource(std::move(task), {GetParam()}); EXPECT_TRUE(sequence); - // Set the singleton allowed bit to the opposite of what it is expected to be - // when |tracker| runs |task| to verify that |tracker| actually sets the - // correct value. - ScopedSetSingletonAllowed scoped_singleton_allowed(!can_use_singletons); - // Running the task should fail iff the task isn't allowed to use singletons. if (can_use_singletons) { EXPECT_FALSE(RunAndPopNextTask(std::move(sequence))); @@ -510,9 +492,7 @@ // Verify that AssertIOAllowed() succeeds only for a MayBlock() task. TEST_P(ThreadPoolTaskTrackerTest, IOAllowed) { - // Unset the IO allowed bit. Expect TaskTracker to set it before running a - // task with the MayBlock() trait. - ThreadRestrictions::SetIOAllowed(false); + // Allowed with MayBlock(). Task task_with_may_block(FROM_HERE, BindOnce([]() { // Shouldn't fail. ScopedBlockingCall scope_blocking_call( @@ -525,9 +505,7 @@ EXPECT_TRUE(sequence_with_may_block); RunAndPopNextTask(std::move(sequence_with_may_block)); - // Set the IO allowed bit. Expect TaskTracker to unset it before running a - // task without the MayBlock() trait. - ThreadRestrictions::SetIOAllowed(true); + // Disallowed in the absence of MayBlock(). Task task_without_may_block(FROM_HERE, BindOnce([]() { EXPECT_DCHECK_DEATH({ ScopedBlockingCall scope_blocking_call( @@ -1199,9 +1177,9 @@ test::QueueAndRunTaskSource(task_tracker.get(), std::move(sequence_without_sync_primitives)); - // Disallow waiting. Expect TaskTracker to allow it before running a task - // with the WithBaseSyncPrimitives() trait. - ThreadRestrictions::DisallowWaiting(); + // Expect TaskTracker to keep waiting allowed when running a task with the + // WithBaseSyncPrimitives() trait. + internal::AssertBaseSyncPrimitivesAllowed(); Task task_with_sync_primitives( FROM_HERE, BindOnce([]() { // Shouldn't fail.
diff --git a/base/task/thread_pool/thread_pool_impl_unittest.cc b/base/task/thread_pool/thread_pool_impl_unittest.cc index f07c98cb..43bcd86 100644 --- a/base/task/thread_pool/thread_pool_impl_unittest.cc +++ b/base/task/thread_pool/thread_pool_impl_unittest.cc
@@ -77,15 +77,6 @@ test::GroupType background_type; }; -#if DCHECK_IS_ON() -// Returns true if I/O calls are allowed on the current thread. -bool GetIOAllowed() { - const bool previous_value = ThreadRestrictions::SetIOAllowed(true); - ThreadRestrictions::SetIOAllowed(previous_value); - return previous_value; -} -#endif - // Returns true if a task with |traits| could run at background thread priority // on this platform. Even if this returns true, it is possible that the task // won't run at background thread priority if a native thread group is used. @@ -129,11 +120,10 @@ : ThreadPriority::NORMAL, PlatformThread::GetCurrentThreadPriority()); -#if DCHECK_IS_ON() - // The #if above is required because GetIOAllowed() always returns true when - // !DCHECK_IS_ON(), even when |traits| don't allow file I/O. - EXPECT_EQ(traits.may_block(), GetIOAllowed()); -#endif + if (traits.may_block()) + internal::AssertBlockingAllowed(); + else + internal::AssertBlockingDisallowedForTesting(); #if HAS_NATIVE_THREAD_POOL() // Native thread groups do not provide the ability to name threads.
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc index e6c8ec6..600fa10f 100644 --- a/base/threading/platform_thread_posix.cc +++ b/base/threading/platform_thread_posix.cc
@@ -22,6 +22,7 @@ #include "base/threading/platform_thread_internal_posix.h" #include "base/threading/scoped_blocking_call.h" #include "base/threading/thread_id_name_manager.h" +#include "base/threading/thread_restrictions.h" #include "build/build_config.h" #if !defined(OS_APPLE) && !defined(OS_FUCHSIA) && !defined(OS_NACL) @@ -69,7 +70,7 @@ delegate = thread_params->delegate; if (!thread_params->joinable) - base::ThreadRestrictions::SetSingletonAllowed(false); + base::DisallowSingleton(); #if !defined(OS_NACL) #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc index 86e240b2..2959a82 100644 --- a/base/threading/platform_thread_win.cc +++ b/base/threading/platform_thread_win.cc
@@ -88,7 +88,7 @@ ThreadParams* thread_params = static_cast<ThreadParams*>(params); PlatformThread::Delegate* delegate = thread_params->delegate; if (!thread_params->joinable) - base::ThreadRestrictions::SetSingletonAllowed(false); + base::DisallowSingleton(); if (thread_params->priority != ThreadPriority::NORMAL) PlatformThread::SetCurrentThreadPriority(thread_params->priority);
diff --git a/base/threading/sequence_bound.h b/base/threading/sequence_bound.h index 91903c3..d507fdb 100644 --- a/base/threading/sequence_bound.h +++ b/base/threading/sequence_bound.h
@@ -287,26 +287,28 @@ // tasks in current sequence, and using "plain" binds and task posting (here // and other places that `CrossThreadBindTraits::PostTask`). using ConstPostTaskCallback = CrossThreadTask<void(const T&)>; - void PostTaskWithThisObject(const Location& from_here, - ConstPostTaskCallback callback) const { + void PostTaskWithThisObject( + ConstPostTaskCallback callback, + const Location& location = Location::Current()) const { DCHECK(!is_null()); // Even though the lifetime of the object pointed to by `t_` may not have // begun yet, the storage has been allocated. Per [basic.life/6] and // [basic.life/7], "Indirection through such a pointer is permitted but the // resulting lvalue may only be used in limited ways, as described below." CrossThreadBindTraits::PostTask( - *impl_task_runner_, from_here, + *impl_task_runner_, location, CrossThreadBindTraits::BindOnce(std::move(callback), std::cref(*t_))); } // Same as above, but for non-const operations. The callback takes a pointer // to the wrapped object rather than a const ref. using PostTaskCallback = CrossThreadTask<void(T*)>; - void PostTaskWithThisObject(const Location& from_here, - PostTaskCallback callback) const { + void PostTaskWithThisObject( + PostTaskCallback callback, + const Location& location = Location::Current()) const { DCHECK(!is_null()); CrossThreadBindTraits::PostTask( - *impl_task_runner_, from_here, + *impl_task_runner_, location, CrossThreadBindTraits::BindOnce(std::move(callback), CrossThreadBindTraits::Unretained(t_))); }
diff --git a/base/threading/sequence_bound_unittest.cc b/base/threading/sequence_bound_unittest.cc index 3a99717..43e1fc7 100644 --- a/base/threading/sequence_bound_unittest.cc +++ b/base/threading/sequence_bound_unittest.cc
@@ -371,15 +371,12 @@ constexpr int kTestValue2 = 42; base::SequenceBound<BoxedValue> value(task_runner_, kTestValue1); base::RunLoop loop; + value.PostTaskWithThisObject(base::BindLambdaForTesting( + [&](const BoxedValue& v) { EXPECT_EQ(kTestValue1, v.value()); })); + value.PostTaskWithThisObject(base::BindLambdaForTesting( + [&](BoxedValue* v) { v->set_value(kTestValue2); })); value.PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const BoxedValue& v) { - EXPECT_EQ(kTestValue1, v.value()); - })); - value.PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting( - [&](BoxedValue* v) { v->set_value(kTestValue2); })); - value.PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const BoxedValue& v) { + base::BindLambdaForTesting([&](const BoxedValue& v) { EXPECT_EQ(kTestValue2, v.value()); loop.Quit(); }));
diff --git a/base/threading/thread_restrictions.cc b/base/threading/thread_restrictions.cc index ae9092e..a892d9b 100644 --- a/base/threading/thread_restrictions.cc +++ b/base/threading/thread_restrictions.cc
@@ -110,6 +110,11 @@ << "g_blocking_disallowed " << *GetBlockingDisallowedTls(); } +void AssertBlockingDisallowedForTesting() { + DCHECK(*GetBlockingDisallowedTls()) + << "g_blocking_disallowed " << *GetBlockingDisallowedTls(); +} + } // namespace internal void DisallowBlocking() { @@ -133,6 +138,19 @@ std::make_unique<BooleanWithStack>(true)); } +ScopedDisallowBaseSyncPrimitives::ScopedDisallowBaseSyncPrimitives() + : was_disallowed_(GetBaseSyncPrimitivesDisallowedTls().Set( + std::make_unique<BooleanWithStack>(true))) {} + +ScopedDisallowBaseSyncPrimitives::~ScopedDisallowBaseSyncPrimitives() { + DCHECK(*GetBaseSyncPrimitivesDisallowedTls()) + << "~ScopedDisallowBaseSyncPrimitives() running while surprisingly " + "already no longer disallowed.\n" + << "g_base_sync_primitives_disallowed " + << *GetBaseSyncPrimitivesDisallowedTls(); + GetBaseSyncPrimitivesDisallowedTls().Set(std::move(was_disallowed_)); +} + ScopedAllowBaseSyncPrimitives::ScopedAllowBaseSyncPrimitives() : was_disallowed_(GetBaseSyncPrimitivesDisallowedTls().Set( std::make_unique<BooleanWithStack>(false))) { @@ -201,8 +219,36 @@ std::make_unique<BooleanWithStack>(false)); } +void AssertSingletonAllowed() { + DCHECK(!*GetSingletonDisallowedTls()) + << "LazyInstance/Singleton is not allowed to be used on this thread. " + "Most likely it's because this thread is not joinable (or the current " + "task is running with TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN " + "semantics), so AtExitManager may have deleted the object on " + "shutdown, leading to a potential shutdown crash. If you need to use " + "the object from this context, it'll have to be updated to use Leaky " + "traits.\n" + << "g_singleton_disallowed " << *GetSingletonDisallowedTls(); +} + } // namespace internal +void DisallowSingleton() { + GetSingletonDisallowedTls().Set(std::make_unique<BooleanWithStack>(true)); +} + +ScopedDisallowSingleton::ScopedDisallowSingleton() + : was_disallowed_(GetSingletonDisallowedTls().Set( + std::make_unique<BooleanWithStack>(true))) {} + +ScopedDisallowSingleton::~ScopedDisallowSingleton() { + DCHECK(*GetSingletonDisallowedTls()) + << "~ScopedDisallowSingleton() running while surprisingly already no " + "longer disallowed.\n" + << "g_singleton_disallowed " << *GetSingletonDisallowedTls(); + GetSingletonDisallowedTls().Set(std::move(was_disallowed_)); +} + void AssertLongCPUWorkAllowed() { DCHECK(!*GetCPUIntensiveWorkDisallowedTls()) << "Function marked as CPU intensive was called from a scope that " @@ -220,41 +266,19 @@ } // static -bool ThreadRestrictions::SetIOAllowed(bool allowed) { - const bool previously_allowed = !*GetBlockingDisallowedTls().Set( - std::make_unique<BooleanWithStack>(!allowed)); - return previously_allowed; +void PermanentThreadAllowance::AllowBlocking() { + *GetBlockingDisallowedTls().Set(std::make_unique<BooleanWithStack>(false)); } // static -bool ThreadRestrictions::SetSingletonAllowed(bool allowed) { - const bool previously_allowed = !*GetSingletonDisallowedTls().Set( - std::make_unique<BooleanWithStack>(!allowed)); - return previously_allowed; +void PermanentThreadAllowance::AllowBaseSyncPrimitives() { + *GetBaseSyncPrimitivesDisallowedTls().Set( + std::make_unique<BooleanWithStack>(false)); } // static -void ThreadRestrictions::AssertSingletonAllowed() { - DCHECK(!*GetSingletonDisallowedTls()) - << "LazyInstance/Singleton is not allowed to be used on this thread. " - "Most likely it's because this thread is not joinable (or the current " - "task is running with TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN " - "semantics), so AtExitManager may have deleted the object on " - "shutdown, leading to a potential shutdown crash. If you need to use " - "the object from this context, it'll have to be updated to use Leaky " - "traits.\n" - << "g_singleton_disallowed " << *GetSingletonDisallowedTls(); -} - -// static -void ThreadRestrictions::DisallowWaiting() { - DisallowBaseSyncPrimitives(); -} - -bool ThreadRestrictions::SetWaitAllowed(bool allowed) { - const bool previously_allowed = !*GetBaseSyncPrimitivesDisallowedTls().Set( - std::make_unique<BooleanWithStack>(!allowed)); - return previously_allowed; +void PermanentSingletonAllowance::AllowSingleton() { + *GetSingletonDisallowedTls().Set(std::make_unique<BooleanWithStack>(false)); } } // namespace base
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index 4ab540b..f459e52 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h
@@ -37,6 +37,11 @@ // - base::ConditionVariable::*Wait* // - base::Process::WaitForExit* // +// - Accessing singletons: Accessing global state (Singleton / LazyInstance) is +// problematic on threads whom aren't joined on shutdown as they can be using +// the state as it becomes invalid during tear down. base::NoDestructor is the +// preferred alternative for global state and doesn't have this restriction. +// // - Long CPU work: Refers to any code that takes more than 100 ms to // run when there is no CPU contention and no hard page faults and therefore, // is not suitable to run on a thread required to keep the browser responsive @@ -46,8 +51,9 @@ // - DisallowBlocking(): Disallows blocking calls on the current thread. // - DisallowBaseSyncPrimitives(): Disallows waiting on a //base sync primitive // on the current thread. +// - DisallowSingleton(): Disallows using singletons on the current thread. // - DisallowUnresponsiveTasks() Disallows blocking calls, waiting on a //base -// sync primitive, and long cpu work on the current thread. +// sync primitive, and long CPU work on the current thread. // // In addition, scoped-allowance mechanisms are offered to make an exception // within a scope for a behavior that is normally disallowed. @@ -102,7 +108,6 @@ class BrowserProcessImpl; class ChromeNSSCryptoModuleDelegate; -class HistogramSynchronizer; class KeyStorageLinux; class NativeBackendKWallet; class NativeDesktopMediaList; @@ -153,9 +158,6 @@ int NumberOfProcessorsForCoreScheduling(); } } -namespace chrome_browser_net { -class Predictor; -} namespace chrome_cleaner { class ResetShortcutsComponent; class SystemReportComponent; @@ -164,7 +166,6 @@ class BrowserGpuChannelHostFactory; class BrowserMainLoop; class BrowserProcessIOThread; -class BrowserShutdownProfileDumper; class BrowserTestBase; class CategorizedWorkerPool; class DesktopCaptureDevice; @@ -173,14 +174,13 @@ class NestedMessagePumpAndroid; class NetworkServiceInstancePrivate; class PepperPrintSettingsManagerImpl; -class RTCVideoDecoder; class RenderProcessHostImpl; class RenderWidgetHostViewMac; +class RTCVideoDecoder; class SandboxHostLinux; class ScopedAllowWaitForDebugURL; class ServiceWorkerContextClient; class ShellPathProvider; -class SoftwareOutputDeviceMus; class SynchronousCompositor; class SynchronousCompositorHost; class SynchronousCompositorSyncCallBridge; @@ -229,6 +229,7 @@ class AudioInputDevice; class AudioOutputDevice; class BlockingUrlProtocol; +class FileVideoCaptureDeviceFactory; class PaintCanvasVideoRenderer; } namespace memory_instrumentation { @@ -251,6 +252,11 @@ class ScopedIPCSupport; } } +namespace nacl { +namespace nonsfi { +class PluginMainDelegate; +} +} // namespace nacl namespace printing { class LocalPrinterHandlerDefault; #if defined(OS_MAC) @@ -268,10 +274,7 @@ class HttpBridge; } namespace ui { -class CommandBufferClientImpl; -class CommandBufferLocal; class DrmThreadProxy; -class GpuState; } namespace weblayer { class BrowserContextImpl; @@ -357,20 +360,24 @@ class FileDescriptorWatcher; class FilePath; class ScopedAllowThreadRecallForStackSamplingProfiler; -class SimpleThread; class StackSamplingProfiler; +class TestCustomDisallow; +class SimpleThread; class Thread; -class WaitableEvent; class BooleanWithStack; bool PathProviderWin(int, FilePath*); #if DCHECK_IS_ON() -#define INLINE_IF_DCHECK_IS_OFF BASE_EXPORT +// NOT_TAIL_CALLED if dcheck-is-on so it's always evident who irrevocably +// altered the allowance (dcheck-builds will provide the setter's stack on +// assertion) or who made a failing Assert*() call. +#define INLINE_OR_NOT_TAIL_CALLED BASE_EXPORT NOT_TAIL_CALLED #define EMPTY_BODY_IF_DCHECK_IS_OFF #else -#define INLINE_IF_DCHECK_IS_OFF inline +// inline if dcheck-is-off so it's no overhead +#define INLINE_OR_NOT_TAIL_CALLED inline // The static_assert() eats follow-on semicolons. `= default` would work // too, but it makes clang realize that all the Scoped classes are no-ops in @@ -378,20 +385,22 @@ #define EMPTY_BODY_IF_DCHECK_IS_OFF \ {} \ static_assert(true, "") -#endif +#endif // DCHECK_IS_ON() namespace internal { // Asserts that blocking calls are allowed in the current scope. This is an // internal call, external code should use ScopedBlockingCall instead, which // serves as a precise annotation of the scope that may/will block. -INLINE_IF_DCHECK_IS_OFF void AssertBlockingAllowed() +INLINE_OR_NOT_TAIL_CALLED void AssertBlockingAllowed() + EMPTY_BODY_IF_DCHECK_IS_OFF; +INLINE_OR_NOT_TAIL_CALLED void AssertBlockingDisallowedForTesting() EMPTY_BODY_IF_DCHECK_IS_OFF; } // namespace internal // Disallows blocking on the current thread. -INLINE_IF_DCHECK_IS_OFF void DisallowBlocking() EMPTY_BODY_IF_DCHECK_IS_OFF; +INLINE_OR_NOT_TAIL_CALLED void DisallowBlocking() EMPTY_BODY_IF_DCHECK_IS_OFF; // Disallows blocking calls within its scope. class BASE_EXPORT ScopedDisallowBlocking { @@ -419,11 +428,11 @@ // This can only be instantiated by friends. Use ScopedAllowBlockingForTesting // in unit tests to avoid the friend requirement. friend class ::StartupTabProviderImpl; - friend class AdjustOOMScoreHelper; - friend class StackSamplingProfiler; friend class android_webview::ScopedAllowInitGLBindings; friend class ash::MojoUtils; // http://crbug.com/1055467 friend class ash::BrowserDataMigrator; + friend class base::AdjustOOMScoreHelper; + friend class base::StackSamplingProfiler; friend class blink::DiskDataAllocator; friend class chromecast::CrashUtil; friend class content::BrowserProcessIOThread; @@ -437,6 +446,7 @@ friend class cronet::CronetURLRequestContext; friend class crosapi::LacrosThreadPriorityDelegate; friend class ios_web_view::WebViewBrowserState; + friend class media::FileVideoCaptureDeviceFactory; friend class memory_instrumentation::OSMetrics; friend class metrics::AndroidMetricsServiceClient; friend class metrics::CleanExitBeacon; @@ -489,9 +499,23 @@ #endif }; -INLINE_IF_DCHECK_IS_OFF void DisallowBaseSyncPrimitives() +INLINE_OR_NOT_TAIL_CALLED void DisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; +// Disallows singletons within its scope. +class BASE_EXPORT ScopedDisallowBaseSyncPrimitives { + public: + ScopedDisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; + ~ScopedDisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; + + private: +#if DCHECK_IS_ON() + std::unique_ptr<BooleanWithStack> was_disallowed_; +#endif + + DISALLOW_COPY_AND_ASSIGN(ScopedDisallowBaseSyncPrimitives); +}; + class BASE_EXPORT ScopedAllowBaseSyncPrimitives { private: // This can only be instantiated by friends. Use @@ -505,9 +529,9 @@ ScopedAllowBaseSyncPrimitivesWithBlockingDisallowed); // Allowed usage: - friend class SimpleThread; friend class ::ChromeNSSCryptoModuleDelegate; friend class base::internal::GetAppOutputScopedAllowBaseSyncPrimitives; + friend class base::SimpleThread; friend class blink::SourceStream; friend class blink::WorkerThread; friend class blink::scheduler::WorkerThread; @@ -686,28 +710,53 @@ // Asserts that waiting on a //base sync primitive is allowed in the current // scope. -INLINE_IF_DCHECK_IS_OFF void AssertBaseSyncPrimitivesAllowed() +INLINE_OR_NOT_TAIL_CALLED void AssertBaseSyncPrimitivesAllowed() EMPTY_BODY_IF_DCHECK_IS_OFF; // Resets all thread restrictions on the current thread. -INLINE_IF_DCHECK_IS_OFF void ResetThreadRestrictionsForTesting() +INLINE_OR_NOT_TAIL_CALLED void ResetThreadRestrictionsForTesting() + EMPTY_BODY_IF_DCHECK_IS_OFF; + +// Check whether the current thread is allowed to use singletons (Singleton / +// LazyInstance). DCHECKs if not. +INLINE_OR_NOT_TAIL_CALLED void AssertSingletonAllowed() EMPTY_BODY_IF_DCHECK_IS_OFF; } // namespace internal +// Disallow using singleton on the current thread. +INLINE_OR_NOT_TAIL_CALLED void DisallowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF; + +// Disallows singletons within its scope. +class BASE_EXPORT ScopedDisallowSingleton { + public: + ScopedDisallowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF; + ~ScopedDisallowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF; + + private: +#if DCHECK_IS_ON() + std::unique_ptr<BooleanWithStack> was_disallowed_; +#endif + + DISALLOW_COPY_AND_ASSIGN(ScopedDisallowSingleton); +}; + // Asserts that running long CPU work is allowed in the current scope. -INLINE_IF_DCHECK_IS_OFF void AssertLongCPUWorkAllowed() +INLINE_OR_NOT_TAIL_CALLED void AssertLongCPUWorkAllowed() EMPTY_BODY_IF_DCHECK_IS_OFF; -INLINE_IF_DCHECK_IS_OFF void DisallowUnresponsiveTasks() +INLINE_OR_NOT_TAIL_CALLED void DisallowUnresponsiveTasks() EMPTY_BODY_IF_DCHECK_IS_OFF; class BASE_EXPORT ThreadRestrictions { public: + ThreadRestrictions() = delete; + // Constructing a ScopedAllowIO temporarily allows IO for the current // thread. Doing this is almost certainly always incorrect. // // DEPRECATED. Use ScopedAllowBlocking(ForTesting). + // TODO(crbug.com/766678): Migrate remaining users. class BASE_EXPORT ScopedAllowIO { public: ScopedAllowIO(const Location& from_here = Location::Current()); @@ -722,81 +771,48 @@ std::unique_ptr<BooleanWithStack> was_disallowed_; #endif }; - -#if DCHECK_IS_ON() - // Set whether the current thread to make IO calls. - // Threads start out in the *allowed* state. - // Returns the previous value. - // - // DEPRECATED. Use ScopedAllowBlocking(ForTesting) or ScopedDisallowBlocking. - // - // NOT_TAIL_CALLED so it's always evident who irrevocably altered the - // allowance. - static bool NOT_TAIL_CALLED SetIOAllowed(bool allowed); - - // Set whether the current thread can use singletons. Returns the previous - // value. - // - // NOT_TAIL_CALLED so it's always evident who irrevocably altered the - // allowance. - static bool NOT_TAIL_CALLED SetSingletonAllowed(bool allowed); - - // Check whether the current thread is allowed to use singletons (Singleton / - // LazyInstance). DCHECKs if not. - static void AssertSingletonAllowed(); - - // Disable waiting on the current thread. Threads start out in the *allowed* - // state. Returns the previous value. - // - // DEPRECATED. Use DisallowBaseSyncPrimitives. - static void DisallowWaiting(); -#else - // Inline the empty definitions of these functions so that they can be - // compiled out. - static bool SetIOAllowed(bool allowed) { return true; } - static bool SetSingletonAllowed(bool allowed) { return true; } - static void AssertSingletonAllowed() {} - static void DisallowWaiting() {} -#endif - - private: - // DO NOT ADD ANY OTHER FRIEND STATEMENTS. - // BEGIN ALLOWED USAGE. - friend class content::BrowserMainLoop; - friend class content::BrowserShutdownProfileDumper; - friend class content::BrowserTestBase; - friend class content::ScopedAllowWaitForDebugURL; - friend class ::HistogramSynchronizer; - friend class internal::TaskTracker; - friend class web::WebMainLoop; - friend class MessagePumpDefault; - friend class PlatformThread; - friend class ui::CommandBufferClientImpl; - friend class ui::CommandBufferLocal; - friend class ui::GpuState; - - // END ALLOWED USAGE. - // BEGIN USAGE THAT NEEDS TO BE FIXED. - friend class chrome_browser_net::Predictor; // http://crbug.com/78451 -#if !defined(OFFICIAL_BUILD) - friend class content::SoftwareOutputDeviceMus; // Interim non-production code -#endif -// END USAGE THAT NEEDS TO BE FIXED. - -#if DCHECK_IS_ON() - // DEPRECATED. Use ScopedAllowBaseSyncPrimitives. - // - // NOT_TAIL_CALLED so it's always evident who irrevocably altered the - // allowance. - static bool NOT_TAIL_CALLED SetWaitAllowed(bool allowed); -#else - static bool SetWaitAllowed(bool allowed) { return true; } -#endif - - DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); }; -#undef INLINE_IF_DCHECK_IS_OFF +// Friend-only methods to permanently allow the current thread to use +// blocking/sync-primitives calls. Threads start out in the *allowed* state but +// are typically *disallowed* via the above base::Disallow*() methods after +// being initialized. +// +// Only use these to permanently set the allowance on a thread, e.g. on +// shutdown. For temporary allowances, use scopers above. +class BASE_EXPORT PermanentThreadAllowance { + public: + // Class is merely a namespace-with-friends. + PermanentThreadAllowance() = delete; + + private: + friend class base::TestCustomDisallow; + friend class content::BrowserMainLoop; + friend class content::BrowserTestBase; + friend class web::WebMainLoop; + + static void AllowBlocking() EMPTY_BODY_IF_DCHECK_IS_OFF; + static void AllowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF; +}; + +// Similar to PermanentThreadAllowance but separate because it's dangerous and +// should have even fewer friends. +class BASE_EXPORT PermanentSingletonAllowance { + public: + // Class is merely a namespace-with-friends. + PermanentSingletonAllowance() = delete; + + private: + friend class nacl::nonsfi::PluginMainDelegate; + + // Re-allow singletons on this thread. Since //base APIs DisallowSingleton() + // when they risk running past shutdown, this should only be called in rare + // cases where the caller knows the process will be killed rather than + // shutdown. + static void AllowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF; +}; + +#undef INLINE_OR_NOT_TAIL_CALLED #undef EMPTY_BODY_IF_DCHECK_IS_OFF } // namespace base
diff --git a/base/threading/thread_restrictions_unittest.cc b/base/threading/thread_restrictions_unittest.cc index 9dea8df..9139670 100644 --- a/base/threading/thread_restrictions_unittest.cc +++ b/base/threading/thread_restrictions_unittest.cc
@@ -64,7 +64,9 @@ EXPECT_DCHECK_DEATH({ internal::AssertBlockingAllowed(); }); } -TEST_F(ThreadRestrictionsTest, BaseSyncPrimitivesAllowedByDefault) {} +TEST_F(ThreadRestrictionsTest, BaseSyncPrimitivesAllowedByDefault) { + internal::AssertBaseSyncPrimitivesAllowed(); +} TEST_F(ThreadRestrictionsTest, DisallowBaseSyncPrimitives) { DisallowBaseSyncPrimitives(); @@ -139,6 +141,31 @@ scoped_allow_base_sync_primitives_for_testing; } +TEST_F(ThreadRestrictionsTest, ScopedDisallowBaseSyncPrimitives) { + { + ScopedDisallowBaseSyncPrimitives disallow_sync_primitives; + EXPECT_DCHECK_DEATH({ internal::AssertBaseSyncPrimitivesAllowed(); }); + } + internal::AssertBaseSyncPrimitivesAllowed(); +} + +TEST_F(ThreadRestrictionsTest, SingletonAllowedByDefault) { + internal::AssertSingletonAllowed(); +} + +TEST_F(ThreadRestrictionsTest, DisallowSingleton) { + DisallowSingleton(); + EXPECT_DCHECK_DEATH({ internal::AssertSingletonAllowed(); }); +} + +TEST_F(ThreadRestrictionsTest, ScopedDisallowSingleton) { + { + ScopedDisallowSingleton disallow_sync_primitives; + EXPECT_DCHECK_DEATH({ internal::AssertSingletonAllowed(); }); + } + internal::AssertSingletonAllowed(); +} + TEST_F(ThreadRestrictionsTest, LongCPUWorkAllowedByDefault) { AssertLongCPUWorkAllowed(); } @@ -171,29 +198,25 @@ : ""); } -namespace { - -class CustomDisallow { +class TestCustomDisallow { public: - NOINLINE CustomDisallow() { ThreadRestrictions::SetIOAllowed(false); } - NOINLINE ~CustomDisallow() { ThreadRestrictions::SetIOAllowed(true); } + NOINLINE TestCustomDisallow() { DisallowBlocking(); } + NOINLINE ~TestCustomDisallow() { PermanentThreadAllowance::AllowBlocking(); } }; -} // namespace - TEST_F(ThreadRestrictionsTest, NestedAllowRestoresPreviousStack) { - CustomDisallow custom_disallow; + TestCustomDisallow custom_disallow; { ScopedAllowBlocking scoped_allow; internal::AssertBlockingAllowed(); } - // CustomDisallow should be back on the blame list (as opposed to + // TestCustomDisallow should be back on the blame list (as opposed to // ~ScopedAllowBlocking which is the last one to have changed the state but is // no longer relevant). EXPECT_DEATH({ internal::AssertBlockingAllowed(); }, EXPENSIVE_DCHECKS_ARE_ON() && debug::StackTrace::WillSymbolizeToStreamForTesting() - ? "CustomDisallow" + ? "TestCustomDisallow" : ""); // And the stack should mention this test body as source. EXPECT_DEATH({ internal::AssertBlockingAllowed(); },
diff --git a/base/win/windows_types.h b/base/win/windows_types.h index ca2e088..91b6176 100644 --- a/base/win/windows_types.h +++ b/base/win/windows_types.h
@@ -31,6 +31,7 @@ typedef int INT; typedef unsigned int UINT; typedef unsigned int* PUINT; +typedef unsigned __int64 UINT64; typedef void* LPVOID; typedef void* PVOID; typedef void* HANDLE; @@ -103,6 +104,8 @@ typedef struct _OVERLAPPED OVERLAPPED; typedef struct tagMSG MSG, *PMSG, *NPMSG, *LPMSG; +typedef struct tagTOUCHINPUT TOUCHINPUT; +typedef struct tagPOINTER_INFO POINTER_INFO; typedef struct _RTL_SRWLOCK RTL_SRWLOCK; typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK;
diff --git a/cc/mojom/render_frame_metadata.mojom b/cc/mojom/render_frame_metadata.mojom index 3a087f7..eaee8d7f 100644 --- a/cc/mojom/render_frame_metadata.mojom +++ b/cc/mojom/render_frame_metadata.mojom
@@ -80,6 +80,8 @@ viz.mojom.VerticalScrollDirection new_vertical_scroll_direction; + mojo_base.mojom.TimeDelta visual_properties_update_duration; + // Used to position Android bottom bar, whose position is computed by the // renderer compositor. [EnableIf=is_android]
diff --git a/cc/mojom/render_frame_metadata_mojom_traits.cc b/cc/mojom/render_frame_metadata_mojom_traits.cc index b9eecfb..0bcadca 100644 --- a/cc/mojom/render_frame_metadata_mojom_traits.cc +++ b/cc/mojom/render_frame_metadata_mojom_traits.cc
@@ -56,7 +56,9 @@ data.ReadViewportSizeInPixels(&out->viewport_size_in_pixels) && data.ReadLocalSurfaceId(&out->local_surface_id) && data.ReadNewVerticalScrollDirection( - &out->new_vertical_scroll_direction); + &out->new_vertical_scroll_direction) && + data.ReadVisualPropertiesUpdateDuration( + &out->visual_properties_update_duration); } } // namespace mojo
diff --git a/cc/mojom/render_frame_metadata_mojom_traits.h b/cc/mojom/render_frame_metadata_mojom_traits.h index e209658..717a9bb3 100644 --- a/cc/mojom/render_frame_metadata_mojom_traits.h +++ b/cc/mojom/render_frame_metadata_mojom_traits.h
@@ -96,6 +96,11 @@ return metadata.new_vertical_scroll_direction; } + static base::TimeDelta visual_properties_update_duration( + const cc::RenderFrameMetadata& metadata) { + return metadata.visual_properties_update_duration; + } + #if defined(OS_ANDROID) static float bottom_controls_height(const cc::RenderFrameMetadata& metadata) { return metadata.bottom_controls_height;
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc index 69571a1..886d921 100644 --- a/cc/trees/layer_tree_host.cc +++ b/cc/trees/layer_tree_host.cc
@@ -1529,6 +1529,11 @@ return new_local_surface_id_request; } +void LayerTreeHost::SetVisualPropertiesUpdateDuration( + base::TimeDelta visual_properties_update_duration) { + visual_properties_update_duration_ = visual_properties_update_duration; +} + void LayerTreeHost::RegisterLayer(Layer* layer) { DCHECK(!LayerById(layer->id())); DCHECK(!in_paint_layer_contents_); @@ -1702,6 +1707,8 @@ tree_impl->RequestNewLocalSurfaceId(); tree_impl->SetLocalSurfaceIdFromParent(local_surface_id_from_parent_); + tree_impl->SetVisualPropertiesUpdateDuration( + visual_properties_update_duration_); if (pending_page_scale_animation_) { tree_impl->SetPendingPageScaleAnimation(
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index 26c0f90..ec195995 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h
@@ -507,6 +507,11 @@ return new_local_surface_id_request_; } + // Records the amount of time spent performing an update in response to new + // blink::VisualProperties. + void SetVisualPropertiesUpdateDuration( + base::TimeDelta visual_properties_update_duration); + void SetDisplayColorSpaces( const gfx::DisplayColorSpaces& display_color_spaces); const gfx::DisplayColorSpaces& display_color_spaces() const { @@ -901,6 +906,7 @@ bool clear_caches_on_next_commit_ = false; viz::LocalSurfaceId local_surface_id_from_parent_; bool new_local_surface_id_request_ = false; + base::TimeDelta visual_properties_update_duration_; uint32_t defer_main_frame_update_count_ = 0; SkColor background_color_ = SK_ColorWHITE;
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index c841d7f5..c97239a 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -2342,6 +2342,9 @@ child_local_surface_id_allocator_.GetCurrentLocalSurfaceId(); } + metadata.visual_properties_update_duration = + active_tree()->visual_properties_update_duration(); + return metadata; }
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc index e923a3e..f22a6a68 100644 --- a/cc/trees/layer_tree_impl.cc +++ b/cc/trees/layer_tree_impl.cc
@@ -617,6 +617,8 @@ if (TakeNewLocalSurfaceIdRequest()) target_tree->RequestNewLocalSurfaceId(); target_tree->SetLocalSurfaceIdFromParent(local_surface_id_from_parent()); + target_tree->SetVisualPropertiesUpdateDuration( + visual_properties_update_duration()); target_tree->pending_page_scale_animation_ = std::move(pending_page_scale_animation_); @@ -1192,6 +1194,11 @@ return new_local_surface_id_request; } +void LayerTreeImpl::SetVisualPropertiesUpdateDuration( + base::TimeDelta visual_properties_update_duration) { + visual_properties_update_duration_ = visual_properties_update_duration; +} + void LayerTreeImpl::SetDeviceViewportRect( const gfx::Rect& device_viewport_rect) { if (device_viewport_rect == device_viewport_rect_)
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h index b52c78d..ed66e8a 100644 --- a/cc/trees/layer_tree_impl.h +++ b/cc/trees/layer_tree_impl.h
@@ -388,6 +388,12 @@ return new_local_surface_id_request_; } + void SetVisualPropertiesUpdateDuration( + base::TimeDelta visual_properties_update_duration); + base::TimeDelta visual_properties_update_duration() const { + return visual_properties_update_duration_; + } + void SetDeviceViewportRect(const gfx::Rect& device_viewport_rect); // TODO(fsamuel): The reason this is not a trivial accessor is because it @@ -823,6 +829,7 @@ viz::LocalSurfaceId local_surface_id_from_parent_; bool new_local_surface_id_request_ = false; + base::TimeDelta visual_properties_update_duration_; // Contains the physical rect of the device viewport, to be used in // determining what needs to be drawn. bool device_viewport_rect_changed_ = false;
diff --git a/cc/trees/render_frame_metadata.h b/cc/trees/render_frame_metadata.h index 4cc735e..3fa95d3 100644 --- a/cc/trees/render_frame_metadata.h +++ b/cc/trees/render_frame_metadata.h
@@ -5,6 +5,7 @@ #ifndef CC_TREES_RENDER_FRAME_METADATA_H_ #define CC_TREES_RENDER_FRAME_METADATA_H_ +#include "base/time/time.h" #include "build/build_config.h" #include "cc/cc_export.h" #include "components/viz/common/quads/selection.h" @@ -114,6 +115,10 @@ viz::VerticalScrollDirection new_vertical_scroll_direction = viz::VerticalScrollDirection::kNull; + // Measures the amount of time that Blink spends updating in response to a new + // set of VisualProperties arriving. See WidgetBase::UpdateVisualProperties. + base::TimeDelta visual_properties_update_duration; + #if defined(OS_ANDROID) // Used to position Android bottom bar, whose position is computed by the // renderer compositor.
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index 67624de8..ae4186d 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -3857,7 +3857,6 @@ "java/src/org/chromium/chrome/browser/offlinepages/downloads/OfflinePageDownloadBridge.java", "java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTask.java", "java/src/org/chromium/chrome/browser/offlinepages/prefetch/PrefetchBackgroundTaskScheduler.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java", "java/src/org/chromium/chrome/browser/partnerbookmarks/PartnerBookmarksReader.java", "java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java", "java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java",
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni index b3180d0..257a10b 100644 --- a/chrome/android/chrome_java_sources.gni +++ b/chrome/android/chrome_java_sources.gni
@@ -897,11 +897,6 @@ "java/src/org/chromium/chrome/browser/omaha/metrics/HistogramUtils.java", "java/src/org/chromium/chrome/browser/omaha/metrics/TrackingProvider.java", "java/src/org/chromium/chrome/browser/omaha/metrics/UpdateSuccessMetrics.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationController.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerFactory.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerImpl.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java", - "java/src/org/chromium/chrome/browser/omaha/notification/UpdateUtils.java", "java/src/org/chromium/chrome/browser/page_info/ChromePageInfo.java", "java/src/org/chromium/chrome/browser/page_info/ChromePageInfoControllerDelegate.java", "java/src/org/chromium/chrome/browser/page_info/PageInfoHistoryController.java",
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java index b3f19080..ab986fb 100644 --- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java +++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java
@@ -395,7 +395,7 @@ mSectionHeaderModel.get(SectionHeaderListProperties.SECTION_HEADERS_KEY) .removeObserver(mSectionHeaderListModelChangeProcessor); } - clearImageMemoryCache(); + maybeClearImageMemoryCache(); FeedSurfaceTracker.getInstance().untrackSurface(this); if (mHybridListRenderer != null) { mHybridListRenderer.unbind(); @@ -1034,11 +1034,14 @@ "force-enable-feed-reliability-logging")); } - private void clearImageMemoryCache() { + // Clear the memory cache if the FEED_CLEAR_IMAGE_MEMORY_CACHE flag is enabled. + private void maybeClearImageMemoryCache() { ProcessScope processScope = FeedSurfaceTracker.getInstance().getXSurfaceProcessScope(); if (processScope != null) { ImageCacheHelper imageCacheHelper = processScope.provideImageCacheHelper(); - if (imageCacheHelper != null) { + if (imageCacheHelper != null + && ChromeFeatureList.isEnabled( + ChromeFeatureList.FEED_CLEAR_IMAGE_MEMORY_CACHE)) { imageCacheHelper.clearMemoryCache(); } }
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml index 6899a83b..38b1b16 100644 --- a/chrome/android/java/res/menu/main_menu.xml +++ b/chrome/android/java/res/menu/main_menu.xml
@@ -102,6 +102,9 @@ android:checkable="true" /> </menu> </item> + <item android:id="@+id/auto_dark_web_contents_id" + android:title="@string/menu_auto_dark_web_contents_off" + android:icon="@drawable/ic_brightness_medium_24dp" /> <item android:id="@+id/paint_preview_show_id" android:title="@string/menu_paint_preview_show" android:icon="@drawable/ic_photo_camera" />
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java index fb94222..487c7e3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java
@@ -138,13 +138,12 @@ import org.chromium.chrome.browser.metrics.UmaSessionStats; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; import org.chromium.chrome.browser.night_mode.SystemNightModeMonitor; +import org.chromium.chrome.browser.night_mode.WebContentsDarkModeController; import org.chromium.chrome.browser.ntp.NewTabPageUma; import org.chromium.chrome.browser.offlinepages.OfflinePageUtils; import org.chromium.chrome.browser.offlinepages.indicator.OfflineIndicatorController; import org.chromium.chrome.browser.omaha.UpdateInfoBarController; import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; -import org.chromium.chrome.browser.omaha.notification.UpdateNotificationController; -import org.chromium.chrome.browser.omaha.notification.UpdateNotificationControllerFactory; import org.chromium.chrome.browser.page_info.ChromePageInfo; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; import org.chromium.chrome.browser.preferences.Pref; @@ -321,8 +320,6 @@ private ContextualSearchManager mContextualSearchManager; private SnackbarManager mSnackbarManager; - private UpdateNotificationController mUpdateNotificationController; - // Timestamp in ms when initial layout inflation begins private long mInflateInitialLayoutBeginMs; // Timestamp in ms when initial layout inflation ends @@ -1260,11 +1257,6 @@ // call doesn't consume the intent because it also has the url that we need to load. VrModuleProvider.getDelegate().onNewIntentWithNative(this, intent); mIntentHandler.onNewIntent(intent); - if (mUpdateNotificationController == null) { - mUpdateNotificationController = - UpdateNotificationControllerFactory.create(this, getLifecycleDispatcher()); - } - mUpdateNotificationController.onNewIntent(intent); } /** @@ -1302,11 +1294,6 @@ DeferredStartupHandler.getInstance().addDeferredTask(() -> { if (isActivityFinishingOrDestroyed()) return; UpdateInfoBarController.createInstance(ChromeActivity.this); - if (mUpdateNotificationController == null) { - mUpdateNotificationController = UpdateNotificationControllerFactory.create( - ChromeActivity.this, ChromeActivity.this.getLifecycleDispatcher()); - } - mUpdateNotificationController.onNewIntent(getIntent()); }); final String simpleName = getClass().getSimpleName(); @@ -2519,6 +2506,21 @@ return true; } + if (id == R.id.auto_dark_web_contents_id) { + // Get values needed to check/enable auto dark for the current site. + Profile profile = getCurrentTabModel().getProfile(); + GURL url = currentTab.getUrl(); + + // Flip auto dark state. + boolean isEnabled = WebContentsDarkModeController.isEnabledForUrl(profile, url); + WebContentsDarkModeController.setEnabledForUrl(profile, url, !isEnabled); + + // TODO(crbug.com/1250800): Update UMA ExceptionCounts and mark UMA SettingStateChanges + // from app menu item. + + return true; + } + if (id == R.id.reader_mode_prefs_id) { DomDistillerUIUtils.openSettings(currentTab.getWebContents()); return true;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java index adf4246..aa2c2f6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java
@@ -45,8 +45,10 @@ import org.chromium.chrome.browser.incognito.IncognitoUtils; import org.chromium.chrome.browser.multiwindow.MultiWindowModeStateDispatcher; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; +import org.chromium.chrome.browser.night_mode.WebContentsDarkModeController; import org.chromium.chrome.browser.omaha.UpdateMenuItemHelper; import org.chromium.chrome.browser.partnercustomizations.PartnerBrowserCustomizations; +import org.chromium.chrome.browser.preferences.Pref; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.share.ShareHelper; import org.chromium.chrome.browser.share.ShareUtils; @@ -63,6 +65,7 @@ import org.chromium.chrome.features.start_surface.StartSurfaceConfiguration; import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils; import org.chromium.components.embedder_support.util.UrlConstants; +import org.chromium.components.user_prefs.UserPrefs; import org.chromium.components.webapk.lib.client.WebApkValidator; import org.chromium.components.webapps.AppBannerManager; import org.chromium.components.webapps.WebappsUtils; @@ -356,6 +359,8 @@ updateRequestDesktopSiteMenuItem(menu, currentTab, true /* can show */); + updateAutoDarkMenuItem(menu, currentTab); + // Only display reader mode settings menu option if the current page is in reader mode. menu.findItem(R.id.reader_mode_prefs_id).setVisible(shouldShowReaderModePrefs(currentTab)); @@ -535,6 +540,16 @@ return CachedFeatureFlags.isEnabled(ChromeFeatureList.NEW_WINDOW_APP_MENU); } + @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) + public boolean isAutoDarkWebContentsEnabled() { + boolean isFlagEnabled = ChromeFeatureList.isEnabled( + ChromeFeatureList.DARKEN_WEBSITES_CHECKBOX_IN_THEMES_SETTING); + + return isFlagEnabled + && UserPrefs.get(mTabModelSelector.getCurrentModel().getProfile()) + .getBoolean(Pref.WEB_KIT_FORCE_DARK_MODE_ENABLED); + } + /** * @return Whether the "New window" menu item should be displayed. */ @@ -885,6 +900,27 @@ } } + /** + * Updates the auto dark menu item's state. + * + * @param menu {@link Menu} for auto dark. + * @param currentTab Current tab being displayed. + */ + protected void updateAutoDarkMenuItem(Menu menu, Tab currentTab) { + MenuItem autoDarkMenuItem = menu.findItem(R.id.auto_dark_web_contents_id); + + // Show app menu item if auto dark enabled. + boolean autoDarkEnabled = isAutoDarkWebContentsEnabled(); + autoDarkMenuItem.setVisible(autoDarkEnabled); + if (!autoDarkEnabled) return; + + // Set text based on if site is blocked or not. + boolean isEnabled = WebContentsDarkModeController.isEnabledForUrl( + mTabModelSelector.getCurrentModel().getProfile(), currentTab.getUrl()); + autoDarkMenuItem.setTitle(isEnabled ? R.string.menu_auto_dark_web_contents_on + : R.string.menu_auto_dark_web_contents_off); + } + @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE) public boolean isIncognitoEnabled() { return IncognitoUtils.isIncognitoModeEnabled();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java index ab50be3d..0992a85 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -13,6 +13,7 @@ import android.view.ViewTreeObserver.OnPreDrawListener; import androidx.annotation.CallSuper; +import androidx.annotation.IntDef; import androidx.annotation.Nullable; import androidx.annotation.StringRes; import androidx.annotation.VisibleForTesting; @@ -41,7 +42,10 @@ import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; import java.util.ArrayList; +import java.util.BitSet; import java.util.List; /** @@ -93,14 +97,24 @@ } } - private static final int FRE_PROGRESS_STARTED = 0; - private static final int FRE_PROGRESS_WELCOME_SHOWN = 1; - private static final int FRE_PROGRESS_DATA_SAVER_SHOWN = 2; - private static final int FRE_PROGRESS_SIGNIN_SHOWN = 3; - private static final int FRE_PROGRESS_COMPLETED_SIGNED_IN = 4; - private static final int FRE_PROGRESS_COMPLETED_NOT_SIGNED_IN = 5; - private static final int FRE_PROGRESS_DEFAULT_SEARCH_ENGINE_SHOWN = 6; - private static final int FRE_PROGRESS_MAX = 7; + @VisibleForTesting + @IntDef({FirstRunProgressStep.STARTED, FirstRunProgressStep.WELCOME_SHOWN, + FirstRunProgressStep.DATA_SAVER_SHOWN, FirstRunProgressStep.SIGNIN_SHOWN, + FirstRunProgressStep.COMPLETED_SIGNED_IN, FirstRunProgressStep.COMPLETED_NOT_SIGNED_IN, + FirstRunProgressStep.DEFAULT_SEARCH_ENGINE_SHOWN, FirstRunProgressStep.MAX}) + @Retention(RetentionPolicy.SOURCE) + public @interface FirstRunProgressStep { + int STARTED = 0; + int WELCOME_SHOWN = 1; + int DATA_SAVER_SHOWN = 2; + int SIGNIN_SHOWN = 3; + int COMPLETED_SIGNED_IN = 4; + int COMPLETED_NOT_SIGNED_IN = 5; + int DEFAULT_SEARCH_ENGINE_SHOWN = 6; + int MAX = 7; + } + + private BitSet mFreProgressStepsRecorded = new BitSet(FirstRunProgressStep.MAX); @Nullable private static FirstRunActivityObserver sObserver; @@ -151,7 +165,7 @@ ? new TosAndUmaFirstRunFragmentWithEnterpriseSupport.Page() : new ToSAndUMAFirstRunFragment.Page()); } - mFreProgressStates.add(FRE_PROGRESS_WELCOME_SHOWN); + mFreProgressStates.add(FirstRunProgressStep.WELCOME_SHOWN); mPagerAdapter = new FirstRunPagerAdapter(FirstRunActivity.this, mPages); mPager.setAdapter(mPagerAdapter); // Other pages will be created by createPostNativeAndPoliciesPageSequence() after @@ -183,21 +197,21 @@ if (FREMobileIdentityConsistencyFieldTrial.isEnabled() && mFreProperties.getBoolean(SHOW_SIGNIN_PAGE)) { mPages.add(SyncConsentFirstRunFragment::new); - mFreProgressStates.add(FRE_PROGRESS_SIGNIN_SHOWN); + mFreProgressStates.add(FirstRunProgressStep.SIGNIN_SHOWN); notifyAdapter = true; } // An optional Data Saver page. if (mFreProperties.getBoolean(SHOW_DATA_REDUCTION_PAGE)) { mPages.add(new DataReductionProxyFirstRunFragment.Page()); - mFreProgressStates.add(FRE_PROGRESS_DATA_SAVER_SHOWN); + mFreProgressStates.add(FirstRunProgressStep.DATA_SAVER_SHOWN); notifyAdapter = true; } // An optional page to select a default search engine. if (mFreProperties.getBoolean(SHOW_SEARCH_ENGINE_PAGE)) { mPages.add(new DefaultSearchEngineFirstRunFragment.Page()); - mFreProgressStates.add(FRE_PROGRESS_DEFAULT_SEARCH_ENGINE_SHOWN); + mFreProgressStates.add(FirstRunProgressStep.DEFAULT_SEARCH_ENGINE_SHOWN); notifyAdapter = true; } @@ -205,7 +219,7 @@ if (!FREMobileIdentityConsistencyFieldTrial.isEnabled() && mFreProperties.getBoolean(SHOW_SIGNIN_PAGE)) { mPages.add(SyncConsentFirstRunFragment::new); - mFreProgressStates.add(FRE_PROGRESS_SIGNIN_SHOWN); + mFreProgressStates.add(FirstRunProgressStep.SIGNIN_SHOWN); notifyAdapter = true; } @@ -291,7 +305,7 @@ }; mFirstRunFlowSequencer.start(); FirstRunStatus.setFirstRunTriggered(true); - recordFreProgressHistogram(FRE_PROGRESS_STARTED); + recordFreProgressHistogram(FirstRunProgressStep.STARTED); onInitialLayoutInflationComplete(); RecordHistogram.recordTimesHistogram("MobileFre.FromLaunch.ActivityInflated", @@ -433,7 +447,7 @@ if (mPager.getCurrentItem() == 0) { abortFirstRunExperience(); } else { - jumpToPage(mPager.getCurrentItem() - 1); + setCurrentItemForPager(mPager.getCurrentItem() - 1); } } @@ -446,7 +460,7 @@ @Override public boolean advanceToNextPage() { int position = mPager.getCurrentItem() + 1; - if (!jumpToPage(position)) return false; + if (!setCurrentItemForPager(position)) return false; recordFreProgressHistogram(mFreProgressStates.get(position)); return true; @@ -465,8 +479,8 @@ RecordHistogram.recordMediumTimesHistogram("MobileFre.FromLaunch.FreCompleted", SystemClock.elapsedRealtime() - mIntentCreationElapsedRealtimeMs); recordFreProgressHistogram(TextUtils.isEmpty(mResultSignInAccountName) - ? FRE_PROGRESS_COMPLETED_NOT_SIGNED_IN - : FRE_PROGRESS_COMPLETED_SIGNED_IN); + ? FirstRunProgressStep.COMPLETED_NOT_SIGNED_IN + : FirstRunProgressStep.COMPLETED_SIGNED_IN); FirstRunFlowSequencer.markFlowAsCompleted( mResultSignInAccountName, mResultShowSignInSettings); @@ -566,23 +580,9 @@ } } - /** - * Transitions to a given page. - * @param position A page index to transition to. - * @return Whether the transition to a given page was allowed. - */ - private boolean jumpToPage(int position) { - // TODO(http://crbug.com/1250285): Simplify this condition if checking for ToS acceptance is - // not needed at this point. - boolean jumpToPageSuccess = - didAcceptTermsOfService() ? setCurrentItemForPager(position) : position == 0; - + private boolean setCurrentItemForPager(int position) { if (sObserver != null) sObserver.onJumpToPage(this, position); - return jumpToPageSuccess; - } - - private boolean setCurrentItemForPager(int position) { if (position >= mPagerAdapter.getItemCount()) { completeFirstRunExperience(); return false; @@ -610,14 +610,18 @@ } } - // TODO(http://crbug.com/1250289): Ensure each state is only recorded once. private void recordFreProgressHistogram(int state) { + assert 0 <= state && state < FirstRunProgressStep.MAX; + + if (mFreProgressStepsRecorded.get(state)) return; + + mFreProgressStepsRecorded.set(state); if (mLaunchedFromChromeIcon) { RecordHistogram.recordEnumeratedHistogram( - "MobileFre.Progress.MainIntent", state, FRE_PROGRESS_MAX); + "MobileFre.Progress.MainIntent", state, FirstRunProgressStep.MAX); } else { RecordHistogram.recordEnumeratedHistogram( - "MobileFre.Progress.ViewIntent", state, FRE_PROGRESS_MAX); + "MobileFre.Progress.ViewIntent", state, FirstRunProgressStep.MAX); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/OWNERS deleted file mode 100644 index 71e85dc..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -hesen@chromium.org -xingliu@chromium.org
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationController.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationController.java deleted file mode 100644 index 285252c7..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationController.java +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha.notification; - -import android.content.Intent; - -/** - * Helper for gluing different implementations of UpdateNotificationController. - */ -public interface UpdateNotificationController { - /** - * Receives and handles intent. - * @param intent A {@link Intent} could contain an extra that helpful for controller. - */ - void onNewIntent(Intent intent); -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerFactory.java deleted file mode 100644 index 071d7a3..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerFactory.java +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -package org.chromium.chrome.browser.omaha.notification; - -import android.app.Activity; - -import org.chromium.chrome.browser.flags.ChromeFeatureList; -import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; - -/** - * A factory that creates an {@link UpdateNotificationController} instance. - */ -public class UpdateNotificationControllerFactory { - /** - * @param activity Activity the notification will be shown in. - * @param lifecycleDispatcher Lifecycle of an Activity the notification will be shown in. - * @return a new {@link UpdateNotificationController} to use. - */ - public static UpdateNotificationController create( - Activity activity, ActivityLifecycleDispatcher lifecycleDispatcher) { - if (ChromeFeatureList.isEnabled( - ChromeFeatureList.UPDATE_NOTIFICATION_SCHEDULING_INTEGRATION)) { - return new UpdateNotificationServiceBridge(lifecycleDispatcher); - } - return new UpdateNotificationControllerImpl(activity, lifecycleDispatcher); - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerImpl.java deleted file mode 100644 index e5404e1..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationControllerImpl.java +++ /dev/null
@@ -1,200 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha.notification; - -import static org.chromium.chrome.browser.omaha.UpdateConfigs.getUpdateNotificationInterval; -import static org.chromium.chrome.browser.omaha.UpdateConfigs.getUpdateNotificationTextBody; -import static org.chromium.chrome.browser.omaha.UpdateConfigs.getUpdateNotificationTitle; -import static org.chromium.chrome.browser.omaha.UpdateConfigs.isUpdateNotificationEnabled; -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.INLINE_UPDATE_AVAILABLE; -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.UPDATE_AVAILABLE; - -import android.app.Activity; -import android.app.PendingIntent; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; - -import androidx.annotation.Nullable; - -import org.chromium.base.Callback; -import org.chromium.base.ContextUtils; -import org.chromium.base.Log; -import org.chromium.chrome.R; -import org.chromium.chrome.browser.init.BrowserParts; -import org.chromium.chrome.browser.init.ChromeBrowserInitializer; -import org.chromium.chrome.browser.init.EmptyBrowserParts; -import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; -import org.chromium.chrome.browser.lifecycle.DestroyObserver; -import org.chromium.chrome.browser.notifications.NotificationConstants; -import org.chromium.chrome.browser.notifications.NotificationUmaTracker; -import org.chromium.chrome.browser.notifications.NotificationWrapperBuilderFactory; -import org.chromium.chrome.browser.notifications.channels.ChromeChannelDefinitions; -import org.chromium.chrome.browser.omaha.OmahaBase; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateStatus; -import org.chromium.components.browser_ui.notifications.NotificationManagerProxy; -import org.chromium.components.browser_ui.notifications.NotificationManagerProxyImpl; -import org.chromium.components.browser_ui.notifications.NotificationMetadata; -import org.chromium.components.browser_ui.notifications.NotificationWrapper; -import org.chromium.components.browser_ui.notifications.NotificationWrapperBuilder; -import org.chromium.components.browser_ui.notifications.PendingIntentProvider; - -/** - * Class supports to build and to send update notification every three weeks if new Chrome version - * is available. It listens to {@link UpdateStatusProvider}, and handle the intent to start update - * flow. - */ -public class UpdateNotificationControllerImpl - implements UpdateNotificationController, DestroyObserver { - private static final String TAG = "UpdateNotif"; - private static final String INLINE_UPDATE_NOTIFICATION_RECEIVED_EXTRA = - "org.chromium.chrome.browser.omaha.inline_update_notification_received_extra"; - private static final String UPDATE_NOTIFICATION_STATE_EXTRA = - "org.chromium.chrome.browser.omaha.update_notification_state_extra"; - private static final String UPDATE_NOTIFICATION_TAG = - "org.chromium.chrome.browser.omaha.update_notification_tag"; - public static final String PREF_LAST_TIME_UPDATE_NOTIFICATION_KEY = - "pref_last_timestamp_update_notification_pushed_key"; - private final Callback<UpdateStatusProvider.UpdateStatus> mObserver = status -> { - mUpdateStatus = status; - processUpdateStatus(); - }; - - private Activity mActivity; - private ActivityLifecycleDispatcher mActivityLifecycle; - private boolean mShouldStartInlineUpdate; - private @Nullable UpdateStatus mUpdateStatus; - - /** - * @param activity Activity the notification will be shown in. - * @param lifecycleDispatcher Lifecycle of an Activity the notification will be shown in. - */ - public UpdateNotificationControllerImpl( - Activity activity, ActivityLifecycleDispatcher lifecycleDispatcher) { - mActivity = activity; - mActivityLifecycle = lifecycleDispatcher; - UpdateStatusProvider.getInstance().addObserver(mObserver); - mActivityLifecycle.register(this); - } - - // UpdateNotificationController implementation. - @Override - public void onNewIntent(Intent intent) { - mShouldStartInlineUpdate = - intent.getBooleanExtra(INLINE_UPDATE_NOTIFICATION_RECEIVED_EXTRA, false); - processUpdateStatus(); - } - - // DestroyObserver implementation. - @Override - public void onDestroy() { - UpdateStatusProvider.getInstance().removeObserver(mObserver); - mActivityLifecycle.unregister(this); - mActivityLifecycle = null; - mActivity = null; - } - - private void processUpdateStatus() { - if (mUpdateStatus == null) return; - - switch (mUpdateStatus.updateState) { - case UPDATE_AVAILABLE: - scheduleUpdateNotification(); - break; - case INLINE_UPDATE_AVAILABLE: - if (mShouldStartInlineUpdate) { - UpdateStatusProvider.getInstance().startInlineUpdate( - UpdateStatusProvider.UpdateInteractionSource.FROM_NOTIFICATION, - mActivity); - mShouldStartInlineUpdate = false; - } else { - scheduleUpdateNotification(); - } - break; - default: - break; - } - } - - private void scheduleUpdateNotification() { - if (!shouldPushNotification()) return; - - NotificationWrapperBuilder builder = - NotificationWrapperBuilderFactory - .createNotificationWrapperBuilder( - ChromeChannelDefinitions.ChannelId.UPDATES, - new NotificationMetadata( - NotificationUmaTracker.SystemNotificationType.UPDATES, - UPDATE_NOTIFICATION_TAG /* notificationTag */, - NotificationConstants.NOTIFICATION_ID_UPDATE)) - .setSmallIcon(R.drawable.ic_chrome) - .setAutoCancel(true) - .setContentTitle(getUpdateNotificationTitle()) - .setContentText(getUpdateNotificationTextBody()); - - builder.setContentIntent(createContentIntent(mUpdateStatus)); - NotificationWrapper notification = builder.buildNotificationWrapper(); - NotificationManagerProxy notificationManager = new NotificationManagerProxyImpl(mActivity); - notificationManager.notify(notification); - NotificationUmaTracker.getInstance().onNotificationShown( - NotificationUmaTracker.SystemNotificationType.UPDATES, - notification.getNotification()); - updateLastPushedTimeStamp(); - } - - private PendingIntentProvider createContentIntent(UpdateStatus status) { - Context context = ContextUtils.getApplicationContext(); - Intent clickIntent = new Intent(context, UpdateNotificationReceiver.class) - .putExtra(UPDATE_NOTIFICATION_STATE_EXTRA, status.updateState); - PendingIntentProvider contentIntent = PendingIntentProvider.getBroadcast( - context, 0, clickIntent, PendingIntent.FLAG_UPDATE_CURRENT); - return contentIntent; - } - - private static boolean shouldPushNotification() { - if (!isUpdateNotificationEnabled()) return false; - long currentTime = System.currentTimeMillis(); - SharedPreferences preferences = OmahaBase.getSharedPreferences(); - long lastPushedTimeStamp = preferences.getLong(PREF_LAST_TIME_UPDATE_NOTIFICATION_KEY, 0); - return currentTime - lastPushedTimeStamp >= getUpdateNotificationInterval(); - } - - private static void updateLastPushedTimeStamp() { - SharedPreferences preferences = OmahaBase.getSharedPreferences(); - SharedPreferences.Editor editor = preferences.edit(); - editor.putLong(PREF_LAST_TIME_UPDATE_NOTIFICATION_KEY, System.currentTimeMillis()); - editor.apply(); - } - - /** - * A receiver that try to build the intent to launch Chrome activity. - */ - public static final class UpdateNotificationReceiver extends BroadcastReceiver { - // BroadcastReceiver implementation. - @Override - public void onReceive(Context context, Intent intent) { - final BrowserParts parts = new EmptyBrowserParts() { - @Override - public void finishNativeInitialization() { - try { - int state = intent.getIntExtra(UPDATE_NOTIFICATION_STATE_EXTRA, - UpdateStatusProvider.UpdateState.NONE); - UpdateUtils.onUpdateAvailable(context, state); - } catch (IllegalArgumentException e) { - // If it takes too long to load native library, we may fail to start - // activity. - Log.e(TAG, "Failed to start activity in background.", e); - } - } - }; - - // Try to load native. - ChromeBrowserInitializer.getInstance().handlePreNativeStartupAndLoadLibraries(parts); - ChromeBrowserInitializer.getInstance().handlePostNativeStartup(true, parts); - } - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java deleted file mode 100644 index d89304f..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateNotificationServiceBridge.java +++ /dev/null
@@ -1,111 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha.notification; - -import static org.chromium.chrome.browser.omaha.UpdateConfigs.getUpdateNotificationTextBody; -import static org.chromium.chrome.browser.omaha.UpdateConfigs.getUpdateNotificationTitle; -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.INLINE_UPDATE_AVAILABLE; -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.UPDATE_AVAILABLE; - -import android.content.Intent; - -import androidx.annotation.Nullable; - -import org.chromium.base.Callback; -import org.chromium.base.ContextUtils; -import org.chromium.base.Log; -import org.chromium.base.annotations.CalledByNative; -import org.chromium.base.annotations.JNINamespace; -import org.chromium.base.annotations.NativeMethods; -import org.chromium.chrome.browser.flags.ChromeFeatureList; -import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher; -import org.chromium.chrome.browser.lifecycle.DestroyObserver; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState; - -/** - * Class supports to build and to send update notification per certain duration if new Chrome - * version is available. It listens to {@link UpdateStatusProvider}, and coordinates with the - * backend notification scheduling system. - */ -@JNINamespace("updates") -public class UpdateNotificationServiceBridge - implements UpdateNotificationController, DestroyObserver { - private final Callback<UpdateStatusProvider.UpdateStatus> mObserver = status -> { - mUpdateStatus = status; - processUpdateStatus(); - }; - - private ActivityLifecycleDispatcher mActivityLifecycle; - private @Nullable UpdateStatusProvider.UpdateStatus mUpdateStatus; - private static final String TAG = "cr_UpdateNotif"; - - /** - * @param lifecycleDispatcher Lifecycle of an Activity the notification will be shown in. - */ - public UpdateNotificationServiceBridge(ActivityLifecycleDispatcher lifecycleDispatcher) { - mActivityLifecycle = lifecycleDispatcher; - UpdateStatusProvider.getInstance().addObserver(mObserver); - mActivityLifecycle.register(this); - } - - // UpdateNotificationController implementation. - @Override - public void onNewIntent(Intent intent) { - processUpdateStatus(); - } - - // DestroyObserver implementation. - @Override - public void onDestroy() { - UpdateStatusProvider.getInstance().removeObserver(mObserver); - mActivityLifecycle.unregister(this); - mActivityLifecycle = null; - } - - private void processUpdateStatus() { - if (mUpdateStatus == null) return; - switch (mUpdateStatus.updateState) { - case UPDATE_AVAILABLE: // Intentional fallthrough. - case INLINE_UPDATE_AVAILABLE: // Intentional fallthrough. - boolean shouldShowImmediately = mUpdateStatus.updateState == INLINE_UPDATE_AVAILABLE - || ChromeFeatureList.isEnabled( - ChromeFeatureList.UPDATE_NOTIFICATION_IMMEDIATE_SHOW_OPTION); - UpdateNotificationServiceBridgeJni.get().schedule(getUpdateNotificationTitle(), - getUpdateNotificationTextBody(), mUpdateStatus.updateState, - shouldShowImmediately); - - break; - default: - break; - } - } - - @NativeMethods - interface Natives { - /** - * Schedule a notification through scheduling system. - * @param title The title string of notification context. - * @param message The body string of notification context. - * @param state An enum of {@link UpdateState} pulled from UpdateStatusProvider. - * @param shouldShowImmediately A flag to show notification right away if it is true. - */ - void schedule(String title, String message, @UpdateState int state, - boolean shouldShowImmediately); - } - - /** - * Launches Chrome activity depends on {@link UpdateState}. - * @param state An enum value of {@link UpdateState} stored in native side schedule service. - * */ - @CalledByNative - private static void launchChromeActivity(@UpdateState int state) { - try { - UpdateUtils.onUpdateAvailable(ContextUtils.getApplicationContext(), state); - } catch (IllegalArgumentException e) { - Log.e(TAG, "Failed to start activity in background.", e); - } - } -}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateUtils.java deleted file mode 100644 index 3015227..0000000 --- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/notification/UpdateUtils.java +++ /dev/null
@@ -1,59 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.chrome.browser.omaha.notification; - -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.INLINE_UPDATE_AVAILABLE; -import static org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState.UPDATE_AVAILABLE; - -import android.content.Context; -import android.content.Intent; - -import org.chromium.base.Callback; -import org.chromium.chrome.browser.IntentHandler; -import org.chromium.chrome.browser.document.ChromeLauncherActivity; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider; -import org.chromium.chrome.browser.omaha.UpdateStatusProvider.UpdateState; - -/** - * Util functions for update notification implementation. - */ -public class UpdateUtils { - private static final String INLINE_UPDATE_NOTIFICATION_RECEIVED_EXTRA = - "org.chromium.chrome.browser.omaha.inline_update_notification_received_extra"; - - /** - * Addresses different states for update notification. - * @param context A {@link Context} Context passing into receiver. - * @param state A {@link UpdateState} state of update notification. - */ - public static void onUpdateAvailable(Context context, @UpdateState int state) { - switch (state) { - case INLINE_UPDATE_AVAILABLE: - Intent launchInlineUpdateIntent = - new Intent(Intent.ACTION_VIEW) - .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - .setClass(context, ChromeLauncherActivity.class) - .putExtra(INLINE_UPDATE_NOTIFICATION_RECEIVED_EXTRA, true); - IntentHandler.startActivityForTrustedIntent(launchInlineUpdateIntent); - break; - case UPDATE_AVAILABLE: - Callback<UpdateStatusProvider.UpdateStatus> intentLauncher = - new Callback<UpdateStatusProvider.UpdateStatus>() { - @Override - public void onResult(UpdateStatusProvider.UpdateStatus result) { - UpdateStatusProvider.getInstance().startIntentUpdate(context, - UpdateStatusProvider.UpdateInteractionSource - .FROM_NOTIFICATION, - true /* newTask */); - UpdateStatusProvider.getInstance().removeObserver(this); - } - }; - UpdateStatusProvider.getInstance().addObserver(intentLauncher); - break; - default: - break; - } - } -}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java index 84d97435..8def6d46 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java
@@ -43,6 +43,7 @@ import org.chromium.base.Callback; import org.chromium.base.CollectionUtil; import org.chromium.base.Promise; +import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.task.PostTask; import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.Criteria; @@ -84,6 +85,7 @@ import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.content_public.common.ContentUrlConstants; +import java.util.BitSet; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -101,6 +103,8 @@ private static final String FOO_URL = "https://foo.com"; private static final long ACTIVITY_WAIT_LONG_MS = TimeUnit.SECONDS.toMillis(10); private static final String TEST_ENROLLMENT_TOKEN = "enrollment-token"; + private static final String FRE_PROGRESS_MAIN_INTENT_HISTOGRAM = + "MobileFre.Progress.MainIntent"; @Rule public MultiActivityTestRule mTestRule = new MultiActivityTestRule(); @@ -594,6 +598,87 @@ @Test @MediumTest + public void testFirstRunPages_ProgressHistogramRecordedOnlyOnce() throws Exception { + initializePreferences(new FirstRunPagesTestCase() + .withDataSaverPromo() + .withSearchPromo() + .withSigninPromo()); + + FirstRunActivity firstRunActivity = launchFirstRunActivity(); + + // Go until the last page without skipping the last one, go back until initial page, and + // then complete first run. + new FirstRunNavigationHelper(firstRunActivity) + .ensurePagesCreationSucceeded() + .acceptTermsOfService() + .acknowledgeDataSaverEnabled() + .selectDefaultSearchEngine() + .ensureSigninPromoIsCurrentPage() + .goBackToPreviousPage() + .ensureDefaultSearchEnginePromoIsCurrentPage() + .goBackToPreviousPage() + .ensureDataSaverPromoIsCurrentPage() + .goBackToPreviousPage() + .ensureTermsOfServiceIsCurrentPage() + .acceptTermsOfService() + .acknowledgeDataSaverEnabled() + .selectDefaultSearchEngine() + .skipSigninPromo(); + + waitForActivity(ChromeTabbedActivity.class); + + checkRecordedProgressSteps(BitSet.valueOf(new long[] { + FirstRunActivity.FirstRunProgressStep.STARTED, + FirstRunActivity.FirstRunProgressStep.WELCOME_SHOWN, + FirstRunActivity.FirstRunProgressStep.DATA_SAVER_SHOWN, + FirstRunActivity.FirstRunProgressStep.SIGNIN_SHOWN, + FirstRunActivity.FirstRunProgressStep.COMPLETED_SIGNED_IN, + FirstRunActivity.FirstRunProgressStep.DEFAULT_SEARCH_ENGINE_SHOWN, + })); + } + + @Test + @MediumTest + public void testFirstRunPages_ProgressHistogramRecording_NoPromos() throws Exception { + initializePreferences(new FirstRunPagesTestCase()); + + FirstRunActivity firstRunActivity = launchFirstRunActivity(); + + new FirstRunNavigationHelper(firstRunActivity) + .ensurePagesCreationSucceeded() + .acceptTermsOfService(); + + waitForActivity(ChromeTabbedActivity.class); + + checkRecordedProgressSteps(BitSet.valueOf(new long[] { + FirstRunActivity.FirstRunProgressStep.STARTED, + FirstRunActivity.FirstRunProgressStep.WELCOME_SHOWN, + FirstRunActivity.FirstRunProgressStep.COMPLETED_NOT_SIGNED_IN, + })); + } + + private void checkRecordedProgressSteps(BitSet bucketsRecorded) { + for (int bucket = FirstRunActivity.FirstRunProgressStep.STARTED; + bucket < FirstRunActivity.FirstRunProgressStep.MAX; ++bucket) { + int recordedValue = RecordHistogram.getHistogramValueCountForTesting( + FRE_PROGRESS_MAIN_INTENT_HISTOGRAM, bucket); + if (bucketsRecorded.get(bucket)) { + Assert.assertEquals( + String.format( + "Histogram <%s>, bucket <%d> should be recorded exactly once.", + FRE_PROGRESS_MAIN_INTENT_HISTOGRAM, bucket), + 1, recordedValue); + } else { + Assert.assertEquals( + String.format("Histogram <%s>, bucket <%d> should not be recorded.", + FRE_PROGRESS_MAIN_INTENT_HISTOGRAM, bucket), + 0, recordedValue); + } + } + } + + @Test + @MediumTest @DisabledTest(message = "https://crbug.com/1221647") public void testExitFirstRunWithPolicy() throws Exception { initializePreferences(new FirstRunPagesTestCase().withCctTosDisabled());
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateUnitTest.java index 5228290..44685b9 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateUnitTest.java
@@ -6,6 +6,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.when; @@ -55,6 +56,9 @@ import org.chromium.chrome.browser.toolbar.menu_button.MenuUiState; import org.chromium.chrome.browser.util.ChromeAccessibilityUtil; import org.chromium.chrome.test.util.browser.Features; +import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge; +import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridgeJni; +import org.chromium.components.content_settings.ContentSettingValues; import org.chromium.components.prefs.PrefService; import org.chromium.components.user_prefs.UserPrefs; import org.chromium.components.user_prefs.UserPrefsJni; @@ -117,6 +121,8 @@ private TabModelFilterProvider mTabModelFilterProvider; @Mock private TabModelFilter mTabModelFilter; + @Mock + public WebsitePreferenceBridge.Natives mWebsitePreferenceBridgeJniMock; private OneshotSupplierImpl<OverviewModeBehavior> mOverviewModeSupplier = new OneshotSupplierImpl<>(); @@ -150,6 +156,7 @@ mJniMocker.mock(ContentFeatureListImplJni.TEST_HOOKS, mContentFeatureListJniMock); mJniMocker.mock(UserPrefsJni.TEST_HOOKS, mUserPrefsJniMock); + mJniMocker.mock(WebsitePreferenceBridgeJni.TEST_HOOKS, mWebsitePreferenceBridgeJniMock); Profile.setLastUsedProfileForTesting(mProfile); Mockito.when(mUserPrefsJniMock.get(mProfile)).thenReturn(mPrefService); FeatureList.setTestCanUseDefaultsForTesting(); @@ -241,8 +248,9 @@ Integer[] expectedItems = {R.id.icon_row_menu_id, R.id.new_tab_menu_id, R.id.new_incognito_tab_menu_id, R.id.divider_line_id, R.id.open_history_menu_id, R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, - R.id.divider_line_id, R.id.request_desktop_site_row_menu_id, R.id.divider_line_id, - R.id.preferences_id, R.id.help_id}; + R.id.divider_line_id, R.id.request_desktop_site_row_menu_id, + R.id.auto_dark_web_contents_id, R.id.divider_line_id, R.id.preferences_id, + R.id.help_id}; assertMenuItemsAreEqual(menu, expectedItems); } @@ -252,7 +260,8 @@ setUpMocksForPageMenu(); setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, false /*showUpdate*/, false /*showMoveToOtherWindow*/, false /*showReaderModePrefs*/, - true /*showAddToHomeScreen*/, false /*showPaintPreview*/); + true /*showAddToHomeScreen*/, false /*showPaintPreview*/, + true /*isAutoDarkEnabled*/); Assert.assertEquals(MenuGroup.PAGE_MENU, mAppMenuPropertiesDelegate.getMenuGroup()); Menu menu = createTestMenu(); @@ -263,12 +272,47 @@ R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.divider_line_id, R.id.share_row_menu_id, R.id.find_in_page_id, R.id.translate_id, R.id.add_to_homescreen_id, R.id.request_desktop_site_row_menu_id, - R.id.divider_line_id, R.id.preferences_id, R.id.help_id}; + R.id.auto_dark_web_contents_id, R.id.divider_line_id, R.id.preferences_id, + R.id.help_id}; Integer[] expectedTitles = {0, R.string.menu_new_tab, R.string.menu_new_incognito_tab, 0, R.string.menu_history, R.string.menu_downloads, R.string.menu_bookmarks, R.string.menu_recent_tabs, 0, 0, R.string.menu_find_in_page, - R.string.menu_translate, R.string.menu_add_to_homescreen, 0, 0, - R.string.menu_settings, R.string.menu_help}; + R.string.menu_translate, R.string.menu_add_to_homescreen, 0, + R.string.menu_auto_dark_web_contents_on, 0, R.string.menu_settings, + R.string.menu_help}; + Integer[] expectedActionBarItems = {R.id.forward_menu_id, R.id.bookmark_this_page_id, + R.id.offline_page_id, R.id.info_menu_id, R.id.reload_menu_id}; + assertMenuItemsAreEqual(menu, expectedItems); + assertMenuTitlesAreEqual(menu, expectedTitles); + assertActionBarItemsAreEqual(menu, expectedActionBarItems); + } + + @Test + @Config(qualifiers = "sw320dp") + public void testPageMenuItems_Phone_RegularPage_AutoDarkNotEnabled() { + setUpMocksForPageMenu(); + setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, false /*showUpdate*/, + false /*showMoveToOtherWindow*/, false /*showReaderModePrefs*/, + true /*showAddToHomeScreen*/, false /*showPaintPreview*/, + false /*isAutoDarkEnabled*/); + + Assert.assertEquals(MenuGroup.PAGE_MENU, mAppMenuPropertiesDelegate.getMenuGroup()); + Menu menu = createTestMenu(); + mAppMenuPropertiesDelegate.prepareMenu(menu, null); + + Integer[] expectedItems = {R.id.icon_row_menu_id, R.id.new_tab_menu_id, + R.id.new_incognito_tab_menu_id, R.id.divider_line_id, R.id.open_history_menu_id, + R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, + R.id.divider_line_id, R.id.share_row_menu_id, R.id.find_in_page_id, + R.id.translate_id, R.id.add_to_homescreen_id, R.id.request_desktop_site_row_menu_id, + R.id.auto_dark_web_contents_id, R.id.divider_line_id, R.id.preferences_id, + R.id.help_id}; + Integer[] expectedTitles = {0, R.string.menu_new_tab, R.string.menu_new_incognito_tab, 0, + R.string.menu_history, R.string.menu_downloads, R.string.menu_bookmarks, + R.string.menu_recent_tabs, 0, 0, R.string.menu_find_in_page, + R.string.menu_translate, R.string.menu_add_to_homescreen, 0, + R.string.menu_auto_dark_web_contents_off, 0, R.string.menu_settings, + R.string.menu_help}; Integer[] expectedActionBarItems = {R.id.forward_menu_id, R.id.bookmark_this_page_id, R.id.offline_page_id, R.id.info_menu_id, R.id.reload_menu_id}; assertMenuItemsAreEqual(menu, expectedItems); @@ -282,7 +326,8 @@ setUpMocksForPageMenu(); setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, false /*showUpdate*/, false /*showMoveToOtherWindow*/, false /*showReaderModePrefs*/, - true /*showAddToHomeScreen*/, false /*showPaintPreview*/); + true /*showAddToHomeScreen*/, false /*showPaintPreview*/, + true /*isAutoDarkEnabled*/); doReturn(new AppBannerManager.InstallStringPair(R.string.menu_add_to_homescreen_install, R.string.menu_add_to_homescreen_install)) .when(mAppMenuPropertiesDelegate) @@ -297,13 +342,14 @@ R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.divider_line_id, R.id.translate_id, R.id.share_row_menu_id, R.id.find_in_page_id, R.id.add_to_homescreen_id, - R.id.request_desktop_site_row_menu_id, R.id.divider_line_id, R.id.preferences_id, - R.id.help_id}; + R.id.request_desktop_site_row_menu_id, R.id.auto_dark_web_contents_id, + R.id.divider_line_id, R.id.preferences_id, R.id.help_id}; Integer[] expectedTitles = {0, R.string.menu_new_tab, R.string.menu_new_incognito_tab, 0, R.string.menu_history, R.string.menu_downloads, R.string.menu_bookmarks, R.string.menu_recent_tabs, 0, 0, R.string.menu_find_in_page, - R.string.menu_translate, R.string.menu_add_to_homescreen_install, 0, 0, - R.string.menu_settings, R.string.menu_help}; + R.string.menu_translate, R.string.menu_add_to_homescreen_install, 0, + R.string.menu_auto_dark_web_contents_on, 0, R.string.menu_settings, + R.string.menu_help}; Integer[] expectedActionBarItems = {R.id.forward_menu_id, R.id.bookmark_this_page_id, R.id.offline_page_id, R.id.info_menu_id, R.id.reload_menu_id}; assertMenuItemsAreEqual(menu, expectedItems); @@ -317,7 +363,8 @@ setUpMocksForPageMenu(); setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, false /*showUpdate*/, false /*showMoveToOtherWindow*/, false /*showReaderModePrefs*/, - true /*showAddToHomeScreen*/, false /*showPaintPreview*/); + true /*showAddToHomeScreen*/, false /*showPaintPreview*/, + true /*isAutoDarkEnabled*/); doReturn(true).when(mAppMenuPropertiesDelegate).shouldShowManagedByMenuItem(any(Tab.class)); Assert.assertEquals(MenuGroup.PAGE_MENU, mAppMenuPropertiesDelegate.getMenuGroup()); @@ -329,7 +376,8 @@ R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.divider_line_id, R.id.share_row_menu_id, R.id.find_in_page_id, R.id.translate_id, R.id.add_to_homescreen_id, R.id.request_desktop_site_row_menu_id, - R.id.divider_line_id, R.id.preferences_id, R.id.help_id, R.id.managed_by_menu_id}; + R.id.auto_dark_web_contents_id, R.id.divider_line_id, R.id.preferences_id, + R.id.help_id, R.id.managed_by_menu_id}; assertMenuItemsAreEqual(menu, expectedItems); } @@ -339,7 +387,8 @@ setUpMocksForPageMenu(); setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, true /*showUpdate*/, true /*showMoveToOtherWindow*/, true /*showReaderModePrefs*/, - true /*showAddToHomeScreen*/, true /*showPaintPreview*/); + true /*showAddToHomeScreen*/, true /*showPaintPreview*/, + true /*isAutoDarkEnabled*/); Assert.assertEquals(MenuGroup.PAGE_MENU, mAppMenuPropertiesDelegate.getMenuGroup()); Menu menu = createTestMenu(); @@ -355,7 +404,8 @@ setUpMocksForPageMenu(); setMenuOptions(false /*isNativePage*/, true /*showTranslate*/, true /*showUpdate*/, false /*showMoveToOtherWindow*/, true /*showReaderModePrefs*/, - true /*showAddToHomeScreen*/, false /*showPaintPreview*/); + true /*showAddToHomeScreen*/, false /*showPaintPreview*/, + true /*isAutoDarkEnabled*/); doReturn(true).when(mAppMenuPropertiesDelegate).shouldShowIconBeforeItem(); Assert.assertEquals(MenuGroup.PAGE_MENU, mAppMenuPropertiesDelegate.getMenuGroup()); @@ -365,8 +415,8 @@ Integer[] expectedItems = {R.id.update_menu_id, R.id.new_tab_menu_id, R.id.new_incognito_tab_menu_id, R.id.open_history_menu_id, R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.translate_id, - R.id.find_in_page_id, R.id.add_to_homescreen_id, R.id.reader_mode_prefs_id, - R.id.preferences_id, R.id.help_id}; + R.id.find_in_page_id, R.id.add_to_homescreen_id, R.id.auto_dark_web_contents_id, + R.id.reader_mode_prefs_id, R.id.preferences_id, R.id.help_id}; assertMenuItemsHaveIcons(menu, expectedItems); } @@ -443,8 +493,8 @@ R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.divider_line_id, R.id.share_row_menu_id, R.id.get_image_descriptions_id, R.id.find_in_page_id, R.id.add_to_homescreen_id, - R.id.request_desktop_site_row_menu_id, R.id.divider_line_id, R.id.preferences_id, - R.id.help_id}; + R.id.request_desktop_site_row_menu_id, R.id.auto_dark_web_contents_id, + R.id.divider_line_id, R.id.preferences_id, R.id.help_id}; assertMenuItemsAreEqual(menu, expectedItems); @@ -481,6 +531,7 @@ doReturn(false) .when(mAppMenuPropertiesDelegate) .shouldShowManagedByMenuItem(any(Tab.class)); + doReturn(true).when(mAppMenuPropertiesDelegate).isAutoDarkWebContentsEnabled(); setUpIncognitoMocks(); } @@ -564,7 +615,7 @@ private void setMenuOptions(boolean isNativePage, boolean showTranslate, boolean showUpdate, boolean showMoveToOtherWindow, boolean showReaderModePrefs, boolean showAddToHomeScreen, - boolean showPaintPreview) { + boolean showPaintPreview, boolean isAutoDarkEnabled) { when(mTab.getUrl()).thenReturn(JUnitTestGURLs.getGURL(JUnitTestGURLs.SEARCH_URL)); when(mTab.isNativePage()).thenReturn(isNativePage); doReturn(showTranslate) @@ -586,5 +637,8 @@ doReturn(showPaintPreview) .when(mAppMenuPropertiesDelegate) .shouldShowPaintPreview(anyBoolean(), any(Tab.class), anyBoolean()); + when(mWebsitePreferenceBridgeJniMock.getContentSetting(any(), anyInt(), any(), any())) + .thenReturn(isAutoDarkEnabled ? ContentSettingValues.DEFAULT + : ContentSettingValues.BLOCK); } }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java index e51d039..6c40d9c4 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tabbed_mode/TabbedAppMenuPropertiesDelegateUnitTest.java
@@ -65,6 +65,8 @@ import org.chromium.chrome.browser.ui.appmenu.AppMenuDelegate; import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager; import org.chromium.chrome.test.util.browser.Features; +import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge; +import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridgeJni; import org.chromium.components.signin.identitymanager.IdentityManager; import org.chromium.components.webapps.AppBannerManager; import org.chromium.content.browser.ContentFeatureListImpl; @@ -159,6 +161,8 @@ private TabModelFilterProvider mTabModelFilterProvider; @Mock private TabModelFilter mTabModelFilter; + @Mock + public WebsitePreferenceBridge.Natives mWebsitePreferenceBridgeJniMock; private OneshotSupplierImpl<OverviewModeBehavior> mOverviewModeSupplier = new OneshotSupplierImpl<>(); @@ -203,6 +207,7 @@ when(mContentFeatureListJniMock.isEnabled( ContentFeatureList.EXPERIMENTAL_ACCESSIBILITY_LABELS)) .thenReturn(false); + jniMocker.mock(WebsitePreferenceBridgeJni.TEST_HOOKS, mWebsitePreferenceBridgeJniMock); OfflinePageUtils.setInstanceForTesting(mOfflinePageUtils); when(mIdentityService.getSigninManager(any(Profile.class))).thenReturn(mSigninManager); when(mSigninManager.getIdentityManager()).thenReturn(mIdentityManager); @@ -233,8 +238,8 @@ R.id.downloads_menu_id, R.id.all_bookmarks_menu_id, R.id.recent_tabs_menu_id, R.id.divider_line_id, R.id.translate_id, R.id.share_row_menu_id, R.id.find_in_page_id, R.id.add_to_homescreen_id, - R.id.request_desktop_site_row_menu_id, R.id.divider_line_id, R.id.preferences_id, - R.id.help_id, R.id.managed_by_menu_id}; + R.id.request_desktop_site_row_menu_id, R.id.auto_dark_web_contents_id, + R.id.divider_line_id, R.id.preferences_id, R.id.help_id, R.id.managed_by_menu_id}; assertMenuItemsAreEqual(menu, expectedItems); } @@ -438,6 +443,7 @@ doReturn(false).when(mTabbedAppMenuPropertiesDelegate).isPartnerHomepageEnabled(); doReturn(true).when(mTabbedAppMenuPropertiesDelegate).isTabletSizeScreen(); doReturn(true).when(mTabbedAppMenuPropertiesDelegate).isNewWindowMenuFeatureEnabled(); + doReturn(true).when(mTabbedAppMenuPropertiesDelegate).isAutoDarkWebContentsEnabled(); setUpIncognitoMocks(); when(mTab.getUrl()).thenReturn(JUnitTestGURLs.getGURL(JUnitTestGURLs.SEARCH_URL));
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn index 762296d0..84b98d0 100644 --- a/chrome/app/BUILD.gn +++ b/chrome/app/BUILD.gn
@@ -225,14 +225,8 @@ visibility = [ ":*" ] } - if (is_chrome_branded) { - _fuchsia_package_name = "google_chrome" - } else { - _fuchsia_package_name = "chromium" - } - fuchsia_package("chrome_pkg") { - package_name = _fuchsia_package_name + package_name = "chrome" deps = [ ":chrome_component", ":chrome_component_v1", @@ -241,6 +235,6 @@ fuchsia_package_runner("chrome_fuchsia") { package = ":chrome_pkg" - package_name_override = _fuchsia_package_name + package_name_override = "chrome" } }
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 1f8e96e..d229567 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -478,6 +478,8 @@ "enterprise/browser_management/browser_management_status_provider.h", "enterprise/browser_management/management_service_factory.cc", "enterprise/browser_management/management_service_factory.h", + "enterprise/reporting/prefs.cc", + "enterprise/reporting/prefs.h", "enterprise/util/affiliation.cc", "enterprise/util/affiliation.h", "enterprise/util/managed_browser_utils.cc", @@ -3063,6 +3065,8 @@ "enterprise/reporting/profile_report_generator_android.h", "enterprise/reporting/profile_report_generator_delegate_base.cc", "enterprise/reporting/profile_report_generator_delegate_base.h", + "enterprise/reporting/report_scheduler_android.cc", + "enterprise/reporting/report_scheduler_android.h", "enterprise/reporting/reporting_delegate_factory_android.cc", "enterprise/reporting/reporting_delegate_factory_android.h", "enterprise/util/android_enterprise_info.cc", @@ -3270,10 +3274,6 @@ "touch_to_fill/touch_to_fill_controller.h", "translate/android/translate_bridge.cc", "translate/android/translate_bridge.h", - "updates/update_notification_client.cc", - "updates/update_notification_client.h", - "updates/update_notification_service_bridge_android.cc", - "updates/update_notification_service_bridge_android.h", "video_tutorials/internal/android/video_tutorial_service_bridge_factory.cc", "webauthn/android/cable_module_android.cc", ] @@ -3336,8 +3336,6 @@ "//chrome/browser/ui/android/layouts:android", "//chrome/browser/ui/webui/explore_sites_internals:mojo_bindings", "//chrome/browser/ui/webui/feed_internals:mojo_bindings", - "//chrome/browser/updates", - "//chrome/browser/updates:factory", "//chrome/browser/video_tutorials/internal", "//chrome/browser/video_tutorials/internal:jni_headers", "//chrome/browser/webapps/android:android", @@ -3741,8 +3739,6 @@ "enterprise/reporting/extension_request/extension_request_report_generator.h", "enterprise/reporting/extension_request/extension_request_report_throttler.cc", "enterprise/reporting/extension_request/extension_request_report_throttler.h", - "enterprise/reporting/prefs.cc", - "enterprise/reporting/prefs.h", "enterprise/reporting/profile_report_generator_delegate_base.cc", "enterprise/reporting/profile_report_generator_delegate_base.h", "enterprise/reporting/profile_report_generator_desktop.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index df22076..d2e008761 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7075,12 +7075,6 @@ flag_descriptions::kPrerender2Description, kOsAll, FEATURE_VALUE_TYPE(blink::features::kPrerender2)}, -#if defined(OS_ANDROID) - {"enable-swipe-to-move-cursor", flag_descriptions::kSwipeToMoveCursorName, - flag_descriptions::kSwipeToMoveCursorDescription, kOsAndroid, - FEATURE_VALUE_TYPE(features::kSwipeToMoveCursor)}, -#endif // defined(OS_ANDROID) - #if !defined(OS_ANDROID) {"settings-landing-page-redesign", flag_descriptions::kSettingsLandingPageRedesignName, @@ -7742,6 +7736,13 @@ flag_descriptions::kForceMajorVersion100InUserAgentName, flag_descriptions::kForceMajorVersion100InUserAgentDescription, kOsAll, FEATURE_VALUE_TYPE(blink::features::kForceMajorVersion100InUserAgent)}, + {"autofill-enable-offer-notification-for-promo-codes", + flag_descriptions::kAutofillEnableOfferNotificationForPromoCodesName, + flag_descriptions:: + kAutofillEnableOfferNotificationForPromoCodesDescription, + kOsAll, + FEATURE_VALUE_TYPE( + autofill::features::kAutofillEnableOfferNotificationForPromoCodes)}, // NOTE: Adding a new flag requires adding a corresponding entry to enum // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
diff --git a/chrome/browser/ash/accessibility/speech_monitor.cc b/chrome/browser/ash/accessibility/speech_monitor.cc index 534d07a..ce42db00 100644 --- a/chrome/browser/ash/accessibility/speech_monitor.cc +++ b/chrome/browser/ash/accessibility/speech_monitor.cc
@@ -19,6 +19,7 @@ } // namespace SpeechMonitor::SpeechMonitor() { + content::TtsController::SkipAddNetworkChangeObserverForTests(true); content::TtsController::GetInstance()->SetTtsPlatform(this); }
diff --git a/chrome/browser/ash/arc/bluetooth/arc_bluetooth_bridge.cc b/chrome/browser/ash/arc/bluetooth/arc_bluetooth_bridge.cc index 1254c8a..6569396 100644 --- a/chrome/browser/ash/arc/bluetooth/arc_bluetooth_bridge.cc +++ b/chrome/browser/ash/arc/bluetooth/arc_bluetooth_bridge.cc
@@ -1357,9 +1357,7 @@ // BluetoothPairingDialog will automatically pair the device and handle all // the incoming pairing requests. - chromeos::BluetoothPairingDialog::ShowDialog( - device->GetAddress(), device->GetNameForDisplay(), device->IsPaired(), - device->IsConnected()); + chromeos::BluetoothPairingDialog::ShowDialog(device->GetAddress()); } void ArcBluetoothBridge::RemoveBond(mojom::BluetoothAddressPtr addr) {
diff --git a/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.cc b/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.cc index 6b4f497..db2e12fd 100644 --- a/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.cc +++ b/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.cc
@@ -12,12 +12,7 @@ namespace ash { WizardControllerExitWaiter::WizardControllerExitWaiter(OobeScreenId screen_id) - : WizardControllerExitWaiter( - WizardController::default_controller()->GetScreen(screen_id)) {} - -WizardControllerExitWaiter::WizardControllerExitWaiter( - BaseScreen* target_screen) - : target_screen_(target_screen) {} + : target_screen_id_(screen_id) {} WizardControllerExitWaiter::~WizardControllerExitWaiter() = default; @@ -26,7 +21,7 @@ WizardController* wizard_controller = WizardController::default_controller(); if (!wizard_controller || - wizard_controller->current_screen() != target_screen_) { + wizard_controller->current_screen()->screen_id() != target_screen_id_) { state_ = State::DONE; return; } @@ -36,8 +31,7 @@ state_ = State::WAITING_FOR_SCREEN_EXIT; - LOG(INFO) << "Actually waiting for exiting screen " - << target_screen_->screen_id(); + LOG(INFO) << "Actually waiting for exiting screen " << target_screen_id_; run_loop_ = std::make_unique<base::RunLoop>(); run_loop_->Run(); @@ -51,7 +45,7 @@ void WizardControllerExitWaiter::OnCurrentScreenChanged( BaseScreen* new_screen) { ASSERT_NE(state_, State::IDLE); - if (new_screen != target_screen_) + if (new_screen->screen_id() != target_screen_id_) EndWait(); }
diff --git a/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.h b/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.h index f2ec3a4..63502c5 100644 --- a/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.h +++ b/chrome/browser/ash/login/test/wizard_controller_screen_exit_waiter.h
@@ -24,7 +24,6 @@ public WizardController::ScreenObserver { public: explicit WizardControllerExitWaiter(OobeScreenId screen_id); - explicit WizardControllerExitWaiter(BaseScreen* target_screen); ~WizardControllerExitWaiter() override; // WizardController::ScreenObserver: @@ -39,7 +38,7 @@ void EndWait(); - const BaseScreen* target_screen_; + const OobeScreenId target_screen_id_ = OobeScreen::SCREEN_UNKNOWN; State state_ = State::IDLE;
diff --git a/chrome/browser/ash/policy/status_collector/device_status_collector.cc b/chrome/browser/ash/policy/status_collector/device_status_collector.cc index e25ccb9..161bb68fe 100644 --- a/chrome/browser/ash/policy/status_collector/device_status_collector.cc +++ b/chrome/browser/ash/policy/status_collector/device_status_collector.cc
@@ -1462,7 +1462,8 @@ int32_t dictionary_attack_threshold, bool dictionary_attack_lockout_in_effect, int32_t dictionary_attack_lockout_seconds_remaining, - bool boot_lockbox_finalized) + bool boot_lockbox_finalized, + bool owner_password_is_present) : enabled(enabled), owned(owned), initialized(initialized), @@ -1473,7 +1474,8 @@ dictionary_attack_lockout_in_effect(dictionary_attack_lockout_in_effect), dictionary_attack_lockout_seconds_remaining( dictionary_attack_lockout_seconds_remaining), - boot_lockbox_finalized(boot_lockbox_finalized) {} + boot_lockbox_finalized(boot_lockbox_finalized), + owner_password_is_present(owner_password_is_present) {} TpmStatusInfo::~TpmStatusInfo() = default; SampledData::SampledData() = default;
diff --git a/chrome/browser/ash/policy/status_collector/device_status_collector.h b/chrome/browser/ash/policy/status_collector/device_status_collector.h index d8fd792..3c2e234d 100644 --- a/chrome/browser/ash/policy/status_collector/device_status_collector.h +++ b/chrome/browser/ash/policy/status_collector/device_status_collector.h
@@ -78,7 +78,8 @@ int32_t dictionary_attack_threshold, bool dictionary_attack_lockout_in_effect, int32_t dictionary_attack_lockout_seconds_remaining, - bool boot_lockbox_finalized); + bool boot_lockbox_finalized, + bool owner_password_is_present); ~TpmStatusInfo(); bool enabled = false; @@ -91,6 +92,7 @@ bool dictionary_attack_lockout_in_effect = false; int32_t dictionary_attack_lockout_seconds_remaining = 0; bool boot_lockbox_finalized = false; + bool owner_password_is_present = false; }; // Sampled hardware measurement data for single time point.
diff --git a/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc b/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc index 0fab7c2..7e07dcd0 100644 --- a/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc +++ b/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc
@@ -2444,6 +2444,8 @@ device_status_.tpm_status_info() .dictionary_attack_lockout_seconds_remaining()); EXPECT_EQ(false, device_status_.tpm_status_info().boot_lockbox_finalized()); + EXPECT_EQ(tpm_status_reply->is_owner_password_present(), + device_status_.tpm_status_info().owner_password_is_present()); } // Checks if tpm status is partially reported even if any error happens
diff --git a/chrome/browser/ash/policy/status_collector/tpm_status_combiner.cc b/chrome/browser/ash/policy/status_collector/tpm_status_combiner.cc index f6854ff..738a775 100644 --- a/chrome/browser/ash/policy/status_collector/tpm_status_combiner.cc +++ b/chrome/browser/ash/policy/status_collector/tpm_status_combiner.cc
@@ -28,6 +28,8 @@ // further operations needed. tpm_status_info_.initialized = reply.is_owned() && !reply.is_owner_password_present(); + tpm_status_info_.owner_password_is_present = + reply.is_owner_password_present(); } else { LOG(WARNING) << "Failed to get tpm status."; }
diff --git a/chrome/browser/ash/usb/cros_usb_detector.cc b/chrome/browser/ash/usb/cros_usb_detector.cc index 8b77f799..587e841 100644 --- a/chrome/browser/ash/usb/cros_usb_detector.cc +++ b/chrome/browser/ash/usb/cros_usb_detector.cc
@@ -337,6 +337,10 @@ return "cros:" + guid; } +CrosUsbDetector::DeviceClaim::DeviceClaim() = default; + +CrosUsbDetector::DeviceClaim::~DeviceClaim() = default; + // static CrosUsbDetector* CrosUsbDetector::Get() { return g_cros_usb_detector; @@ -819,10 +823,9 @@ auto claim_it = devices_claimed_.find(guid); if (claim_it != devices_claimed_.end()) { - if (claim_it->second.device_file.IsValid()) { + if (claim_it->second.device_file.is_valid()) { // We take a dup here which will be closed if DoVmAttach fails. - base::ScopedFD device_fd( - claim_it->second.device_file.Duplicate().TakePlatformFile()); + base::ScopedFD device_fd(dup(claim_it->second.device_file.get())); DoVmAttach(vm_name, device.info.Clone(), std::move(device_fd), std::move(callback)); } else { @@ -843,7 +846,7 @@ } VLOG(1) << "Saving lifeline_fd " << write_end.get(); - devices_claimed_[guid].lifeline_file = base::File(std::move(write_end)); + devices_claimed_[guid].lifeline_file = std::move(write_end); // Open a file descriptor to pass to CrostiniManager & Concierge. device_manager_->OpenFileDescriptor( @@ -869,7 +872,8 @@ std::move(callback).Run(/*success=*/false); return; } - devices_claimed_[device_info->guid].device_file = file.Duplicate(); + devices_claimed_[device_info->guid].device_file = + base::ScopedFD(file.Duplicate().TakePlatformFile()); if (!manager()) { LOG(ERROR) << "Attaching device without Crostini manager instance"; std::move(callback).Run(/*success=*/false); @@ -958,8 +962,7 @@ void CrosUsbDetector::RelinquishDeviceClaim(const std::string& guid) { auto it = devices_claimed_.find(guid); if (it != devices_claimed_.end()) { - VLOG(1) << "Closing lifeline_fd " - << it->second.lifeline_file.GetPlatformFile(); + VLOG(1) << "Closing lifeline_fd " << it->second.lifeline_file.get(); devices_claimed_.erase(it); } else { LOG(ERROR) << "Relinquishing device with no prior claim: " << guid;
diff --git a/chrome/browser/ash/usb/cros_usb_detector.h b/chrome/browser/ash/usb/cros_usb_detector.h index 5c2d9a5..fa467b9 100644 --- a/chrome/browser/ash/usb/cros_usb_detector.h +++ b/chrome/browser/ash/usb/cros_usb_detector.h
@@ -263,8 +263,10 @@ // is shared successfully with the VM. When an file is closed (here or by the // VM, PermissionBroker will reattach the previous host drivers (if any). struct DeviceClaim { - base::File device_file; - base::File lifeline_file; + DeviceClaim(); + ~DeviceClaim(); + base::ScopedFD device_file; + base::ScopedFD lifeline_file; }; std::map<std::string, DeviceClaim> devices_claimed_;
diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc index 350dae8..c67fc42 100644 --- a/chrome/browser/browser_features.cc +++ b/chrome/browser/browser_features.cc
@@ -55,7 +55,7 @@ // Shows a confirmation dialog when updates to PWAs identity (name and icon) // have been detected. const base::Feature kPwaUpdateDialogForNameAndIcon{ - "PwaUpdateDialogForNameAndIcon", base::FEATURE_DISABLED_BY_DEFAULT}; + "PwaUpdateDialogForNameAndIcon", base::FEATURE_ENABLED_BY_DEFAULT}; #if !defined(OS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) // Enables taking snapshots of the user data directory after a major
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index c4cf728..57474b5 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -81,6 +81,7 @@ "//ash", "//ash/components/account_manager", "//ash/components/audio", + "//ash/components/device_activity", "//ash/components/drivefs", "//ash/components/drivefs/mojom", "//ash/components/enhanced_network_tts/mojom", @@ -259,6 +260,7 @@ "//chromeos/geolocation", "//chromeos/ime:gencode", "//chromeos/language/language_packs", + "//chromeos/language/public/mojom", "//chromeos/login/auth", "//chromeos/login/login_state", "//chromeos/login/session",
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc index 1b7d61b..b68d84f 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -1112,6 +1112,12 @@ } void ChromeBrowserMainPartsChromeos::PostBrowserStart() { + if (base::FeatureList::IsEnabled(features::kDeviceActiveClient)) { + device_activity_controller_ = + std::make_unique<ash::device_activity::DeviceActivityController>(); + device_activity_controller_->Start(ash::device_activity::Trigger::kNetwork); + } + // Construct a delegate to connect the accessibility component extensions and // AccessibilityEventRewriter. accessibility_event_rewriter_delegate_ = @@ -1202,6 +1208,7 @@ // crbug.com/702403 for details. void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() { SystemProxyManager::Shutdown(); + device_activity_controller_.reset(); crostini_unsupported_action_notifier_.reset(); BootTimesRecorder::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", true);
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.h b/chrome/browser/chromeos/chrome_browser_main_chromeos.h index 4a20f32..72b8b2a5 100644 --- a/chrome/browser/chromeos/chrome_browser_main_chromeos.h +++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.h
@@ -9,6 +9,8 @@ // TODO(https://crbug.com/1164001): remove and use forward declaration. #include "ash/components/power/dark_resume_controller.h" +// TODO(https://crbug.com/1164001): remove and use forward declaration. +#include "ash/components/device_activity/device_activity_controller.h" #include "base/macros.h" #include "base/task/cancelable_task_tracker.h" // TODO(https://crbug.com/1164001): remove and use forward declaration. @@ -202,6 +204,9 @@ std::unique_ptr<ash::AshUsbDetector> ash_usb_detector_; std::unique_ptr<CrosUsbDetector> cros_usb_detector_; + std::unique_ptr<ash::device_activity::DeviceActivityController> + device_activity_controller_; + std::unique_ptr<crostini::CrostiniUnsupportedActionNotifier> crostini_unsupported_action_notifier_;
diff --git a/chrome/browser/commerce/merchant_viewer/android/BUILD.gn b/chrome/browser/commerce/merchant_viewer/android/BUILD.gn index 540c92fdb..d814482c 100644 --- a/chrome/browser/commerce/merchant_viewer/android/BUILD.gn +++ b/chrome/browser/commerce/merchant_viewer/android/BUILD.gn
@@ -42,6 +42,7 @@ "//chrome/browser/profiles/android:java", "//chrome/browser/tab:java", "//chrome/browser/tabmodel:java", + "//chrome/browser/ui/android/favicon:java", "//chrome/browser/version:java", "//components/browser_ui/bottomsheet/android:java", "//components/browser_ui/widget/android:java", @@ -63,6 +64,7 @@ "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_core_core_java", "//ui/android:ui_no_recycler_view_java", + "//ui/android:ui_utils_java", "//url:gurl_java", ] resources_package = "org.chromium.chrome.tab_ui" @@ -104,6 +106,7 @@ "//chrome/browser/profiles/android:java", "//chrome/browser/tab:java", "//chrome/browser/tabmodel:java", + "//chrome/browser/ui/android/favicon:java", "//chrome/test/android:chrome_java_test_support", "//components/browser_ui/bottomsheet/android:java", "//components/embedder_support/android:content_view_java",
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarProperties.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarProperties.java index da1085d..e6707b1c 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarProperties.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarProperties.java
@@ -4,6 +4,8 @@ package org.chromium.chrome.browser.merchant_viewer; +import android.graphics.drawable.Drawable; + import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey; import org.chromium.ui.modelutil.PropertyModel.WritableFloatPropertyKey; @@ -35,6 +37,9 @@ public static final WritableIntPropertyKey FAVICON_ICON = new WritableIntPropertyKey(); + public static final WritableObjectPropertyKey<Drawable> FAVICON_ICON_DRAWABLE = + new WritableObjectPropertyKey<>(); + public static final WritableBooleanPropertyKey FAVICON_ICON_VISIBLE = new WritableBooleanPropertyKey(); @@ -44,5 +49,5 @@ public static final PropertyKey[] ALL_KEYS = new PropertyKey[] {URL, TITLE, LOAD_PROGRESS, PROGRESS_VISIBLE, SECURITY_ICON, SECURITY_ICON_CONTENT_DESCRIPTION, SECURITY_ICON_ON_CLICK_CALLBACK, CLOSE_BUTTON_ON_CLICK_CALLBACK, FAVICON_ICON, - FAVICON_ICON_VISIBLE, OPEN_IN_NEW_TAB_VISIBLE}; + FAVICON_ICON_DRAWABLE, FAVICON_ICON_VISIBLE, OPEN_IN_NEW_TAB_VISIBLE}; }
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarView.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarView.java index 38a77fe..3f2e7c47 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarView.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarView.java
@@ -5,6 +5,7 @@ package org.chromium.chrome.browser.merchant_viewer; import android.content.Context; +import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageView; @@ -101,6 +102,12 @@ faviconIcon.setImageResource(resId); } + /** Sets the favicon icon drawable. */ + public void setFaviconIconDrawable(Drawable iconDrawable) { + ImageView faviconIcon = mToolbarView.findViewById(R.id.favicon); + faviconIcon.setImageDrawable(iconDrawable); + } + /** Sets the visibility of favicon icon. */ public void setFaviconIconVisible(boolean visible) { ImageView faviconIcon = mToolbarView.findViewById(R.id.favicon);
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinder.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinder.java index 6c7d30f..19d3c99 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinder.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinder.java
@@ -32,6 +32,9 @@ model.get(BottomSheetToolbarProperties.CLOSE_BUTTON_ON_CLICK_CALLBACK)); } else if (BottomSheetToolbarProperties.FAVICON_ICON == propertyKey) { view.setFaviconIcon(model.get(BottomSheetToolbarProperties.FAVICON_ICON)); + } else if (BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE == propertyKey) { + view.setFaviconIconDrawable( + model.get(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE)); } else if (BottomSheetToolbarProperties.FAVICON_ICON_VISIBLE == propertyKey) { view.setFaviconIconVisible( model.get(BottomSheetToolbarProperties.FAVICON_ICON_VISIBLE));
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinator.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinator.java index 13f1a701..3b07c40 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinator.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinator.java
@@ -11,8 +11,11 @@ import androidx.annotation.VisibleForTesting; +import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.Supplier; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.ui.favicon.FaviconHelper; import org.chromium.chrome.tab_ui.R; import org.chromium.components.browser_ui.bottomsheet.BottomSheetContent; import org.chromium.components.browser_ui.bottomsheet.BottomSheetController; @@ -54,17 +57,20 @@ * @param tabSupplier provider to obtain {@link Tab}. * @param layoutView decor view. * @param intentRequestTracker The {@link IntentRequestTracker} of the current activity. + * @param profileSupplier Supplier of {@link Profile} for which favicon service is used. */ public MerchantTrustBottomSheetCoordinator(Context context, WindowAndroid windowAndroid, BottomSheetController bottomSheetController, Supplier<Tab> tabSupplier, View layoutView, - MerchantTrustMetrics metrics, IntentRequestTracker intentRequestTracker) { + MerchantTrustMetrics metrics, IntentRequestTracker intentRequestTracker, + ObservableSupplier<Profile> profileSupplier) { mContext = context; mBottomSheetController = bottomSheetController; mLayoutView = layoutView; mMetrics = metrics; mIntentRequestTracker = intentRequestTracker; - mMediator = new MerchantTrustBottomSheetMediator(context, windowAndroid, metrics); + mMediator = new MerchantTrustBottomSheetMediator( + context, windowAndroid, metrics, profileSupplier, new FaviconHelper()); } /** Displays the details tab sheet. */
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediator.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediator.java index bc53539..a429b3a 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediator.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediator.java
@@ -5,12 +5,17 @@ package org.chromium.chrome.browser.merchant_viewer; import android.content.Context; +import android.graphics.drawable.Drawable; import android.os.Handler; import android.view.ViewGroup; import androidx.annotation.DrawableRes; import androidx.annotation.VisibleForTesting; +import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.ui.favicon.FaviconHelper; +import org.chromium.chrome.browser.ui.favicon.FaviconUtils; import org.chromium.chrome.browser.version.ChromeVersionInfo; import org.chromium.chrome.tab_ui.R; import org.chromium.components.embedder_support.delegate.WebContentsDelegateAndroid; @@ -25,6 +30,7 @@ import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.WebContentsObserver; import org.chromium.content_public.common.ResourceRequestBody; +import org.chromium.ui.UiUtils; import org.chromium.ui.base.ViewAndroidDelegate; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.modelutil.PropertyModel; @@ -38,6 +44,9 @@ private final WindowAndroid mWindowAndroid; private final MerchantTrustMetrics mMetrics; private final int mTopControlsHeightDp; + private final FaviconHelper mFaviconHelper; + private final int mFaviconSize; + private final ObservableSupplier<Profile> mProfileSupplier; private PropertyModel mToolbarModel; private WebContents mWebContents; @@ -45,16 +54,22 @@ private WebContentsDelegateAndroid mWebContentsDelegate; private WebContentsObserver mWebContentsObserver; private WebContents mWebContentsForTesting; + private Drawable mFaviconDrawableForTesting; /** Creates a new instance. */ - MerchantTrustBottomSheetMediator( - Context context, WindowAndroid windowAndroid, MerchantTrustMetrics metrics) { + MerchantTrustBottomSheetMediator(Context context, WindowAndroid windowAndroid, + MerchantTrustMetrics metrics, ObservableSupplier<Profile> profileSupplier, + FaviconHelper faviconHelper) { mContext = context; mWindowAndroid = windowAndroid; mMetrics = metrics; mTopControlsHeightDp = (int) (mContext.getResources().getDimensionPixelSize( R.dimen.toolbar_height_no_shadow) / mWindowAndroid.getDisplay().getDipScale()); + mFaviconHelper = faviconHelper; + mFaviconSize = + mContext.getResources().getDimensionPixelSize(R.dimen.preview_tab_favicon_size); + mProfileSupplier = profileSupplier; } void setupSheetWebContents(ThinWebView thinWebView, PropertyModel toolbarModel) { @@ -65,6 +80,8 @@ createWebContents(); mWebContentsObserver = new WebContentsObserver(mWebContents) { + private GURL mCurrentUrl; + @Override public void loadProgressChanged(float progress) { if (mToolbarModel != null) { @@ -75,6 +92,13 @@ @Override public void didStartNavigation(NavigationHandle navigation) { mMetrics.recordNavigateLinkOnBottomSheet(); + if (navigation.isInPrimaryMainFrame() && !navigation.isSameDocument() + && (navigation.getUrl() != null)) { + GURL url = navigation.getUrl(); + if (url.equals(mCurrentUrl)) return; + mCurrentUrl = url; + loadFavicon(url); + } } @Override @@ -215,4 +239,39 @@ void setWebContentsForTesting(WebContents webContents) { mWebContentsForTesting = webContents; } + + /** + * Generates a favicon for a given URL. If no favicon could be found or generated from + * the URL, a default favicon will be shown. + */ + private void loadFavicon(GURL url) { + Profile profile = mProfileSupplier.get(); + if (profile == null) { + mToolbarModel.set(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE, + getDefaultFaviconDrawable()); + return; + } + mFaviconHelper.getLocalFaviconImageForURL(profile, url, mFaviconSize, (bitmap, iconUrl) -> { + Drawable drawable; + if (mFaviconDrawableForTesting != null) { + drawable = mFaviconDrawableForTesting; + } else if (bitmap != null) { + drawable = + FaviconUtils.createRoundedBitmapDrawable(mContext.getResources(), bitmap); + } else { + drawable = getDefaultFaviconDrawable(); + } + mToolbarModel.set(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE, drawable); + }); + } + + private Drawable getDefaultFaviconDrawable() { + return UiUtils.getTintedDrawable( + mContext, R.drawable.ic_globe_24dp, R.color.default_icon_color_tint_list); + } + + @VisibleForTesting + void setFaviconDrawableForTesting(Drawable drawableForTesting) { + mFaviconDrawableForTesting = drawableForTesting; + } }
diff --git a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinator.java b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinator.java index d45478a..0d387346 100644 --- a/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinator.java +++ b/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustSignalsCoordinator.java
@@ -54,7 +54,7 @@ new MerchantTrustSignalsDataProvider(), profileSupplier, metrics, new MerchantTrustBottomSheetCoordinator(context, windowAndroid, bottomSheetController, tabSupplier, layoutView, metrics, - intentRequestTracker), + intentRequestTracker, profileSupplier), new MerchantTrustSignalsStorageFactory(profileSupplier)); }
diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java index 0dd5e7d..1b7510a 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/BottomSheetToolbarViewBinderTest.java
@@ -6,6 +6,7 @@ import static org.junit.Assert.assertEquals; +import android.graphics.drawable.Drawable; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; @@ -13,6 +14,7 @@ import android.widget.ProgressBar; import android.widget.TextView; +import androidx.appcompat.content.res.AppCompatResources; import androidx.test.filters.SmallTest; import org.junit.Test; @@ -56,8 +58,6 @@ mItemViewModel = new PropertyModel.Builder(BottomSheetToolbarProperties.ALL_KEYS) - .with(BottomSheetToolbarProperties.FAVICON_ICON, - R.drawable.ic_logo_googleg_24dp) .with(BottomSheetToolbarProperties.FAVICON_ICON_VISIBLE, true) .with(BottomSheetToolbarProperties.OPEN_IN_NEW_TAB_VISIBLE, false) .build(); @@ -154,6 +154,19 @@ @Test @UiThreadTest @SmallTest + public void testSetFaviconIconDrawable() { + ImageView faviconIcon = mItemView.getView().findViewById(R.id.favicon); + assertEquals(null, faviconIcon.getDrawable()); + + Drawable iconDrawable = + AppCompatResources.getDrawable(getActivity(), R.drawable.ic_globe_24dp); + mItemViewModel.set(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE, iconDrawable); + assertEquals(iconDrawable, faviconIcon.getDrawable()); + } + + @Test + @UiThreadTest + @SmallTest public void testSetFaviconIconVisible() { ImageView faviconIcon = mItemView.getView().findViewById(R.id.favicon); assertEquals(View.VISIBLE, faviconIcon.getVisibility());
diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinatorTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinatorTest.java index 466e7016..28c2ca1 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinatorTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetCoordinatorTest.java
@@ -27,10 +27,12 @@ import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; +import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.supplier.Supplier; import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.flags.ChromeSwitches; +import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; @@ -97,11 +99,13 @@ @Before public void setUp() { mActivity = sActivityTestRule.getActivity(); - TestThreadUtils.runOnUiThreadBlocking( - () -> { mWindowAndroid = new WindowAndroid(mActivity); }); - mDetailsTabCoordinator = new MerchantTrustBottomSheetCoordinator(mActivity, mWindowAndroid, - mMockBottomSheetController, mMockTabProvider, mMockDecorView, mMockMetrics, - IntentRequestTracker.createFromActivity(mActivity)); + TestThreadUtils.runOnUiThreadBlocking(() -> { + mWindowAndroid = new WindowAndroid(mActivity); + mDetailsTabCoordinator = new MerchantTrustBottomSheetCoordinator(mActivity, + mWindowAndroid, mMockBottomSheetController, mMockTabProvider, mMockDecorView, + mMockMetrics, IntentRequestTracker.createFromActivity(mActivity), + new ObservableSupplierImpl<Profile>()); + }); mDetailsTabCoordinator.setMediatorForTesting(mMockMediator); requestOpenSheetAndVerify(); }
diff --git a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediatorTest.java b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediatorTest.java index 569890b..644905da 100644 --- a/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediatorTest.java +++ b/chrome/browser/commerce/merchant_viewer/android/javatests/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustBottomSheetMediatorTest.java
@@ -5,10 +5,13 @@ package org.chromium.chrome.browser.merchant_viewer; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -16,6 +19,7 @@ import android.content.Context; import android.content.res.Resources; +import android.graphics.drawable.Drawable; import org.junit.After; import org.junit.Before; @@ -27,12 +31,17 @@ import org.mockito.Captor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.mockito.stubbing.Answer; import org.robolectric.annotation.Config; import org.chromium.base.FeatureList; +import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.JniMocker; import org.chromium.chrome.browser.flags.ChromeFeatureList; +import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.ui.favicon.FaviconHelper; +import org.chromium.chrome.browser.ui.favicon.FaviconHelper.FaviconImageCallback; import org.chromium.chrome.tab_ui.R; import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.embedder_support.delegate.WebContentsDelegateAndroid; @@ -100,6 +109,21 @@ @Mock SecurityStateModel.Natives mSecurityStateMocks; + @Mock + private ObservableSupplier<Profile> mMockProfileSupplier; + + @Mock + private Profile mMockProfile; + + @Mock + private FaviconHelper mMockFaviconHelper; + + @Mock + private GURL mMockUrl; + + @Mock + private Drawable mMockDrawable; + @Captor private ArgumentCaptor<WebContentsDelegateAndroid> mWebContentsDelegateCaptor; @@ -127,13 +151,26 @@ when(mUrlUtilitiesJniMock.isGoogleDomainUrl(anyString(), anyBoolean())).thenReturn(true); when(mSecurityStateMocks.getSecurityLevelForWebContents(any(WebContents.class))) .thenReturn(ConnectionSecurityLevel.SECURE); + doReturn(true).when(mMockNavigationHandle).isInPrimaryMainFrame(); + doReturn(false).when(mMockNavigationHandle).isSameDocument(); + doReturn(mMockUrl).when(mMockNavigationHandle).getUrl(); + doReturn(mMockProfile).when(mMockProfileSupplier).get(); + doAnswer((Answer<Void>) invocation -> { + FaviconImageCallback callback = (FaviconImageCallback) invocation.getArguments()[3]; + callback.onFaviconAvailable(null, null); + return null; + }) + .when(mMockFaviconHelper) + .getLocalFaviconImageForURL(any(Profile.class), any(GURL.class), anyInt(), + any(FaviconImageCallback.class)); mocker.mock(UrlUtilitiesJni.TEST_HOOKS, mUrlUtilitiesJniMock); mocker.mock(SecurityStateModelJni.TEST_HOOKS, mSecurityStateMocks); - mMediator = new MerchantTrustBottomSheetMediator( - mMockContext, mMockWindowAndroid, mMockMetrics); + mMediator = new MerchantTrustBottomSheetMediator(mMockContext, mMockWindowAndroid, + mMockMetrics, mMockProfileSupplier, mMockFaviconHelper); mMediator.setWebContentsForTesting(mMockWebContents); + mMediator.setFaviconDrawableForTesting(mMockDrawable); mToolbarModel = new PropertyModel.Builder(BottomSheetToolbarProperties.ALL_KEYS).build(); setUpSheetWebContentsAndVerify(); } @@ -141,6 +178,7 @@ @After public void tearDown() { mMediator.setWebContentsForTesting(null); + mMediator.setFaviconDrawableForTesting(null); } private void setUpSheetWebContentsAndVerify() { @@ -213,8 +251,15 @@ @Test public void testWebContentsObserverDidStartNavigation() { + assertNull(mToolbarModel.get(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE)); + mWebContentsObserverCaptor.getValue().didStartNavigation(mMockNavigationHandle); verify(mMockMetrics, times(1)).recordNavigateLinkOnBottomSheet(); + verify(mMockFaviconHelper, times(1)) + .getLocalFaviconImageForURL(any(Profile.class), any(GURL.class), anyInt(), + any(FaviconImageCallback.class)); + assertEquals(mMockDrawable, + mToolbarModel.get(BottomSheetToolbarProperties.FAVICON_ICON_DRAWABLE)); } @Test
diff --git a/chrome/browser/enterprise/reporting/prefs.cc b/chrome/browser/enterprise/reporting/prefs.cc index f2662e5f..7caf84df 100644 --- a/chrome/browser/enterprise/reporting/prefs.cc +++ b/chrome/browser/enterprise/reporting/prefs.cc
@@ -30,9 +30,11 @@ } void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { +#if !defined(OS_ANDROID) registry->RegisterBooleanPref(prefs::kCloudExtensionRequestEnabled, false); registry->RegisterDictionaryPref(prefs::kCloudExtensionRequestIds); registry->RegisterDictionaryPref(kCloudExtensionRequestUploadedIds); +#endif // !defined(OS_ANDROID) } } // namespace enterprise_reporting
diff --git a/chrome/browser/enterprise/reporting/report_scheduler_android.cc b/chrome/browser/enterprise/reporting/report_scheduler_android.cc new file mode 100644 index 0000000..a21fd28f --- /dev/null +++ b/chrome/browser/enterprise/reporting/report_scheduler_android.cc
@@ -0,0 +1,45 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/enterprise/reporting/report_scheduler_android.h" + +#include "chrome/browser/browser_process.h" + +namespace enterprise_reporting { + +ReportSchedulerAndroid::ReportSchedulerAndroid() = default; + +ReportSchedulerAndroid::~ReportSchedulerAndroid() = default; + +PrefService* ReportSchedulerAndroid::GetLocalState() { + return g_browser_process->local_state(); +} + +void ReportSchedulerAndroid::StartWatchingUpdatesIfNeeded( + base::Time last_upload, + base::TimeDelta upload_interval) { + // No-op because in-app auto-update is not supported on Android. +} + +void ReportSchedulerAndroid::StopWatchingUpdates() { + // No-op because in-app auto-update is not supported on Android. +} + +void ReportSchedulerAndroid::OnBrowserVersionUploaded() { + // No-op because in-app auto-update is not supported on Android. +} + +void ReportSchedulerAndroid::StartWatchingExtensionRequestIfNeeded() { + // No-op because extensions are not supported on Android. +} + +void ReportSchedulerAndroid::StopWatchingExtensionRequest() { + // No-op because extensions are not supported on Android. +} + +void ReportSchedulerAndroid::OnExtensionRequestUploaded() { + // No-op because extensions are not supported on Android. +} + +} // namespace enterprise_reporting
diff --git a/chrome/browser/enterprise/reporting/report_scheduler_android.h b/chrome/browser/enterprise/reporting/report_scheduler_android.h new file mode 100644 index 0000000..1d072e1 --- /dev/null +++ b/chrome/browser/enterprise/reporting/report_scheduler_android.h
@@ -0,0 +1,34 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ENTERPRISE_REPORTING_REPORT_SCHEDULER_ANDROID_H_ +#define CHROME_BROWSER_ENTERPRISE_REPORTING_REPORT_SCHEDULER_ANDROID_H_ + +#include "components/enterprise/browser/reporting/report_scheduler.h" + +namespace enterprise_reporting { + +// Android implementation of the ReportScheduler delegate. +class ReportSchedulerAndroid : public ReportScheduler::Delegate { + public: + ReportSchedulerAndroid(); + ReportSchedulerAndroid(const ReportSchedulerAndroid&) = delete; + ReportSchedulerAndroid& operator=(const ReportSchedulerAndroid&) = delete; + + ~ReportSchedulerAndroid() override; + + // ReportScheduler::Delegate implementation. + PrefService* GetLocalState() override; + void StartWatchingUpdatesIfNeeded(base::Time last_upload, + base::TimeDelta upload_interval) override; + void StopWatchingUpdates() override; + void OnBrowserVersionUploaded() override; + void StartWatchingExtensionRequestIfNeeded() override; + void StopWatchingExtensionRequest() override; + void OnExtensionRequestUploaded() override; +}; + +} // namespace enterprise_reporting + +#endif // CHROME_BROWSER_ENTERPRISE_REPORTING_REPORT_SCHEDULER_ANDROID_H_
diff --git a/chrome/browser/enterprise/reporting/report_scheduler_desktop_unittest.cc b/chrome/browser/enterprise/reporting/report_scheduler_unittest.cc similarity index 96% rename from chrome/browser/enterprise/reporting/report_scheduler_desktop_unittest.cc rename to chrome/browser/enterprise/reporting/report_scheduler_unittest.cc index ecc26e61..ddd5c903 100644 --- a/chrome/browser/enterprise/reporting/report_scheduler_desktop_unittest.cc +++ b/chrome/browser/enterprise/reporting/report_scheduler_unittest.cc
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/enterprise/browser/reporting/real_time_report_generator.h" #include "components/enterprise/browser/reporting/report_scheduler.h" +#include "components/enterprise/browser/reporting/real_time_report_generator.h" #include <utility> @@ -16,8 +16,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/reporting/extension_request/extension_request_report_throttler.h" #include "chrome/browser/enterprise/reporting/prefs.h" -#include "chrome/browser/enterprise/reporting/report_scheduler_desktop.h" -#include "chrome/browser/enterprise/reporting/reporting_delegate_factory_desktop.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/upgrade_detector/build_state.h" #include "chrome/common/chrome_constants.h" @@ -39,6 +37,12 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_ANDROID) +#include "chrome/browser/enterprise/reporting/reporting_delegate_factory_android.h" +#else +#include "chrome/browser/enterprise/reporting/reporting_delegate_factory_desktop.h" +#endif // defined(OS_ANDROID) + using ::base::test::RunOnceCallback; using ::testing::_; using ::testing::ByMove; @@ -58,8 +62,10 @@ constexpr base::TimeDelta kDefaultUploadInterval = base::TimeDelta::FromHours(24); +#if !defined(OS_ANDROID) constexpr char kUploadTriggerMetricName[] = "Enterprise.CloudReportingUploadTrigger"; +#endif } // namespace @@ -73,9 +79,15 @@ class MockReportGenerator : public ReportGenerator { public: +#if defined(OS_ANDROID) + explicit MockReportGenerator( + ReportingDelegateFactoryAndroid* delegate_factory) + : ReportGenerator(delegate_factory) {} +#else explicit MockReportGenerator( ReportingDelegateFactoryDesktop* delegate_factory) : ReportGenerator(delegate_factory) {} +#endif // defined(OS_ANDROID) void Generate(ReportType report_type, ReportCallback callback) override { OnGenerate(report_type, callback); } @@ -97,9 +109,15 @@ class MockRealTimeReportGenerator : public RealTimeReportGenerator { public: +#if defined(OS_ANDROID) + explicit MockRealTimeReportGenerator( + ReportingDelegateFactoryAndroid* delegate_factory) + : RealTimeReportGenerator(delegate_factory) {} +#else explicit MockRealTimeReportGenerator( ReportingDelegateFactoryDesktop* delegate_factory) : RealTimeReportGenerator(delegate_factory) {} +#endif // defined(OS_ANDROID) MOCK_METHOD1(Generate, std::vector<std::unique_ptr<google::protobuf::MessageLite>>( @@ -133,8 +151,10 @@ ~ReportSchedulerTest() override = default; void SetUp() override { +#if !defined(OS_ANDROID) scoped_feature_list_.InitAndEnableFeature( features::kEnterpriseRealtimeExtensionRequest); +#endif // !defined(OS_ANDROID) ASSERT_TRUE(profile_manager_.SetUp()); client_ptr_ = std::make_unique<policy::MockCloudPolicyClient>(); client_ = client_ptr_.get(); @@ -242,12 +262,18 @@ profile_manager_.CreateTestingProfile("profile")->GetPath()); } +#if !defined(OS_ANDROID) base::test::ScopedFeatureList scoped_feature_list_; +#endif content::BrowserTaskEnvironment task_environment_; ScopedTestingLocalState local_state_; TestingProfileManager profile_manager_; +#if defined(OS_ANDROID) + ReportingDelegateFactoryAndroid report_delegate_factory_; +#else ReportingDelegateFactoryDesktop report_delegate_factory_; +#endif // defined(OS_ANDROID) std::unique_ptr<ReportScheduler> scheduler_; policy::MockCloudPolicyClient* client_; MockReportGenerator* generator_; @@ -272,10 +298,12 @@ public ReportSchedulerTest { void SetUp() override { ReportSchedulerTest::SetUp(); +#if !defined(OS_ANDROID) if (is_realtime_feature_enabled()) { scoped_feature_list_.Reset(); scoped_feature_list_.Init(); } +#endif } bool is_realtime_feature_enabled() { return GetParam(); } @@ -486,6 +514,9 @@ ::testing::Mock::VerifyAndClearExpectations(generator_); } +// Android does not support version updates nor extensions +#if !defined(OS_ANDROID) + #if !BUILDFLAG(IS_CHROMEOS_ASH) // Tests that a basic report is generated and uploaded when a browser update is @@ -800,4 +831,6 @@ histogram_tester_.ExpectUniqueSample(kUploadTriggerMetricName, 5, 1); } +#endif // !defined(OS_ANDROID) + } // namespace enterprise_reporting
diff --git a/chrome/browser/enterprise/reporting/reporting_delegate_factory_android.cc b/chrome/browser/enterprise/reporting/reporting_delegate_factory_android.cc index 5b1548e..8f4c0f5 100644 --- a/chrome/browser/enterprise/reporting/reporting_delegate_factory_android.cc +++ b/chrome/browser/enterprise/reporting/reporting_delegate_factory_android.cc
@@ -8,6 +8,7 @@ #include "chrome/browser/enterprise/reporting/browser_report_generator_android.h" #include "chrome/browser/enterprise/reporting/profile_report_generator_android.h" +#include "chrome/browser/enterprise/reporting/report_scheduler_android.h" namespace enterprise_reporting { @@ -28,8 +29,7 @@ std::unique_ptr<ReportScheduler::Delegate> ReportingDelegateFactoryAndroid::GetReportSchedulerDelegate() { - // TODO(crbug.com/1228844) Implement ReportScheduler::Delegate for Android - return nullptr; + return std::make_unique<ReportSchedulerAndroid>(); } std::unique_ptr<RealTimeReportGenerator::Delegate>
diff --git a/chrome/browser/feedback/android/process_id_feedback_source.cc b/chrome/browser/feedback/android/process_id_feedback_source.cc index c4af58b..aad4a57 100644 --- a/chrome/browser/feedback/android/process_id_feedback_source.cc +++ b/chrome/browser/feedback/android/process_id_feedback_source.cc
@@ -55,33 +55,10 @@ host->GetProcess().Pid()); } - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - PrepareProcessIdsOnProcessThread(); - } else { - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce( - &ProcessIdFeedbackSource::PrepareProcessIdsOnProcessThread, this)); - } -} - -void ProcessIdFeedbackSource::PrepareProcessIdsOnProcessThread() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); - for (content::BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) process_ids_[iter.GetData().process_type].push_back( iter.GetData().GetProcess().Handle()); - content::GetUIThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&ProcessIdFeedbackSource::PrepareCompleted, this)); -} - -void ProcessIdFeedbackSource::PrepareCompleted() { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - JNIEnv* env = AttachCurrentThread(); ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); DCHECK(!obj.is_null());
diff --git a/chrome/browser/feedback/android/process_id_feedback_source.h b/chrome/browser/feedback/android/process_id_feedback_source.h index 561fb8eb..c727149 100644 --- a/chrome/browser/feedback/android/process_id_feedback_source.h +++ b/chrome/browser/feedback/android/process_id_feedback_source.h
@@ -33,9 +33,6 @@ friend base::RefCountedThreadSafe<ProcessIdFeedbackSource>; ~ProcessIdFeedbackSource(); - void PrepareProcessIdsOnProcessThread(); - void PrepareCompleted(); - std::map<int, std::vector<base::ProcessHandle>> process_ids_; JavaObjectWeakGlobalRef java_ref_;
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 5209c5b..a2f03f8 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -191,7 +191,7 @@ { "name": "apps-shortcut-default-off", "owners": [ "chrome-desktop-ui-sea@google.com", "cyan" ], - "expiry_milestone": 95 + "expiry_milestone": 99 }, { "name": "arc-custom-tabs-experiment", @@ -398,6 +398,11 @@ "expiry_milestone": 97 }, { + "name": "autofill-enable-offer-notification-for-promo-codes", + "owners": [ "jsaul@google.com", "siyua" ], + "expiry_milestone": 100 + }, + { "name": "autofill-enable-offers-in-clank-keyboard-accessory", "owners": [ "siyua", "siashah@google.com" ], "expiry_milestone": 95 @@ -2685,11 +2690,6 @@ "expiry_milestone": 100 }, { - "name": "enable-swipe-to-move-cursor", - "owners": [ "ctzsm" ], - "expiry_milestone": 100 - }, - { "name": "enable-switch-access-point-scanning", "owners": ["anastasi@google.com", "//ui/accessibility/OWNERS"], "expiry_milestone": 92
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index e0a1c0d2..7c648e3 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -299,6 +299,12 @@ "When enabled, the offer notification showing will be tracked cross-tab, " "and on one merchant, the notification will only be shown once."; +const char kAutofillEnableOfferNotificationForPromoCodesName[] = + "Extend Autofill offers and rewards notification to promo code offers"; +const char kAutofillEnableOfferNotificationForPromoCodesDescription[] = + "When enabled, a notification will be displayed on page navigation if the " + "domain has an eligible merchant promo code offer or reward."; + const char kAutofillEnableOffersInClankKeyboardAccessoryName[] = "Enable Autofill offers in keyboard accessory"; const char kAutofillEnableOffersInClankKeyboardAccessoryDescription[] = @@ -3630,11 +3636,6 @@ "flow where they do not have to leave Chrome until the update is ready " "to install."; -const char kSwipeToMoveCursorName[] = "Swipe to move cursor"; -const char kSwipeToMoveCursorDescription[] = - "Allows user to use touch gestures to move the text cursor around. This " - "flag will only take effect on Android 11 and above."; - const char kWalletRequiresFirstSyncSetupCompleteName[] = "Controls whether Wallet (GPay) integration on Android requires " "first-sync-setup to be complete";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 8a60a59f..82ec236 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -181,6 +181,9 @@ extern const char kAutofillEnableOfferNotificationCrossTabTrackingName[]; extern const char kAutofillEnableOfferNotificationCrossTabTrackingDescription[]; +extern const char kAutofillEnableOfferNotificationForPromoCodesName[]; +extern const char kAutofillEnableOfferNotificationForPromoCodesDescription[]; + extern const char kAutofillEnableOffersInClankKeyboardAccessoryName[]; extern const char kAutofillEnableOffersInClankKeyboardAccessoryDescription[]; @@ -2059,9 +2062,6 @@ extern const char kInlineUpdateFlowName[]; extern const char kInlineUpdateFlowDescription[]; -extern const char kSwipeToMoveCursorName[]; -extern const char kSwipeToMoveCursorDescription[]; - extern const char kWalletRequiresFirstSyncSetupCompleteName[]; extern const char kWalletRequiresFirstSyncSetupCompleteDescription[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index 346b7e6..b078507 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -135,8 +135,9 @@ &feature_engagement::kIPHNewTabPageHomeButtonFeature, &feature_engagement::kIPHSnooze, &feature_engagement::kIPHTabSwitcherButtonFeature, - &feed::kFeedImageMemoryCacheSizePercentage, &feed::kFeedBackToTop, + &feed::kFeedClearImageMemoryCache, + &feed::kFeedImageMemoryCacheSizePercentage, &feed::kFeedInteractiveRefresh, &feed::kFeedLoadingPlaceholder, &feed::kInterestFeedContentSuggestions, @@ -284,7 +285,6 @@ &kStartSurfaceAndroid, &kUmaBackgroundSessions, &kUpdateHistoryEntryPointsInIncognito, - &kUpdateNotificationSchedulingIntegration, &kUpdateNotificationScheduleServiceImmediateShowOption, &kVoiceSearchAudioCapturePolicy, &kVoiceButtonInTopToolbar, @@ -786,10 +786,6 @@ const base::Feature kUpdateHistoryEntryPointsInIncognito{ "UpdateHistoryEntryPointsInIncognito", base::FEATURE_DISABLED_BY_DEFAULT}; -const base::Feature kUpdateNotificationSchedulingIntegration{ - "UpdateNotificationSchedulingIntegration", - base::FEATURE_DISABLED_BY_DEFAULT}; - const base::Feature kUpdateNotificationScheduleServiceImmediateShowOption{ "UpdateNotificationScheduleServiceImmediateShowOption", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/flags/android/chrome_feature_list.h b/chrome/browser/flags/android/chrome_feature_list.h index cc790c81..9f1412e5 100644 --- a/chrome/browser/flags/android/chrome_feature_list.h +++ b/chrome/browser/flags/android/chrome_feature_list.h
@@ -154,7 +154,6 @@ extern const base::Feature kStartSurfaceAndroid; extern const base::Feature kUmaBackgroundSessions; extern const base::Feature kUpdateHistoryEntryPointsInIncognito; -extern const base::Feature kUpdateNotificationSchedulingIntegration; extern const base::Feature kUpdateNotificationScheduleServiceImmediateShowOption; extern const base::Feature kUserMediaScreenCapturing;
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index 2509dca..b8fcfc50 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -334,9 +334,10 @@ public static final String EXPERIMENTS_FOR_AGSA = "ExperimentsForAgsa"; public static final String EXPLICIT_LANGUAGE_ASK = "ExplicitLanguageAsk"; public static final String EXPLORE_SITES = "ExploreSites"; + public static final String FEED_BACK_TO_TOP = "FeedBackToTop"; + public static final String FEED_CLEAR_IMAGE_MEMORY_CACHE = "FeedClearImageMemoryCache"; public static final String FEED_IMAGE_MEMORY_CACHE_SIZE_PERCENTAGE = "FeedImageMemoryCacheSizePercentage"; - public static final String FEED_BACK_TO_TOP = "FeedBackToTop"; public static final String FEED_INTERACTIVE_REFRESH = "FeedInteractiveRefresh"; public static final String FEED_LOADING_PLACEHOLDER = "FeedLoadingPlaceholder"; public static final String FEED_RELIABILITY_LOGGING = "FeedReliabilityLogging"; @@ -527,8 +528,6 @@ public static final String TRUSTED_WEB_ACTIVITY_QUALITY_ENFORCEMENT_WARNING = "TrustedWebActivityQualityEnforcementWarning"; public static final String VIDEO_TUTORIALS = "VideoTutorials"; - public static final String UPDATE_NOTIFICATION_SCHEDULING_INTEGRATION = - "UpdateNotificationSchedulingIntegration"; public static final String UPDATE_NOTIFICATION_IMMEDIATE_SHOW_OPTION = "UpdateNotificationScheduleServiceImmediateShowOption"; public static final String UPDATE_HISTORY_ENTRY_POINTS_IN_INCOGNITO =
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc index c4d7ed2..77c9d430 100644 --- a/chrome/browser/memory_details.cc +++ b/chrome/browser/memory_details.cc
@@ -33,7 +33,6 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/bindings_policy.h" #include "content/public/common/content_constants.h" -#include "content/public/common/content_features.h" #include "extensions/buildflags/buildflags.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/global_memory_dump.h" #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h" @@ -131,32 +130,38 @@ return *this; } -// About threading: -// -// This operation will hit no fewer than 3 threads. -// -// The BrowserChildProcessHostIterator can only be accessed from the IO thread. -// -// The RenderProcessHostIterator can only be accessed from the UI thread. -// // This operation can take 30-100ms to complete. We never want to have // one task run for that long on the UI or IO threads. So, we run the // expensive parts of this operation over on the blocking pool. -// void MemoryDetails::StartFetch() { // This might get called from the UI or FILE threads, but should not be // getting called from the IO thread. DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - CollectChildInfoOnProcessThread(); - } else { - // In order to process this request, we need to use the plugin information. - // However, plugin process information is only available from the IO thread. - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&MemoryDetails::CollectChildInfoOnProcessThread, this)); + std::vector<ProcessMemoryInformation> child_info; + + // Collect the list of child processes. A 0 |handle| means that + // the process is being launched, so we skip it. + for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { + ProcessMemoryInformation info; + if (!iter.GetData().GetProcess().IsValid()) + continue; + info.pid = iter.GetData().GetProcess().Pid(); + if (!info.pid) + continue; + + info.process_type = iter.GetData().process_type; + info.renderer_type = ProcessMemoryInformation::RENDERER_UNKNOWN; + info.titles.push_back(iter.GetData().name); + child_info.push_back(info); } + + // Now go do expensive memory lookups in a thread pool. + base::ThreadPool::PostTask( + FROM_HERE, + {base::MayBlock(), base::TaskPriority::BEST_EFFORT, + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, + base::BindOnce(&MemoryDetails::CollectProcessData, this, child_info)); } MemoryDetails::~MemoryDetails() {} @@ -196,37 +201,6 @@ return log; } -void MemoryDetails::CollectChildInfoOnProcessThread() { - DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::BrowserThread::UI - : content::BrowserThread::IO); - - std::vector<ProcessMemoryInformation> child_info; - - // Collect the list of child processes. A 0 |handle| means that - // the process is being launched, so we skip it. - for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) { - ProcessMemoryInformation info; - if (!iter.GetData().GetProcess().IsValid()) - continue; - info.pid = iter.GetData().GetProcess().Pid(); - if (!info.pid) - continue; - - info.process_type = iter.GetData().process_type; - info.renderer_type = ProcessMemoryInformation::RENDERER_UNKNOWN; - info.titles.push_back(iter.GetData().name); - child_info.push_back(info); - } - - // Now go do expensive memory lookups in a thread pool. - base::ThreadPool::PostTask( - FROM_HERE, - {base::MayBlock(), base::TaskPriority::BEST_EFFORT, - base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}, - base::BindOnce(&MemoryDetails::CollectProcessData, this, child_info)); -} - void MemoryDetails::CollectChildInfoOnUIThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); ProcessData* const chrome_browser = ChromeBrowser();
diff --git a/chrome/browser/memory_details.h b/chrome/browser/memory_details.h index 2a3b65f..d494029 100644 --- a/chrome/browser/memory_details.h +++ b/chrome/browser/memory_details.h
@@ -145,13 +145,6 @@ #endif private: - // Collect child process information on the process thread. This is needed - // because information about some child process types (i.e. plugins) can only - // be taken on that thread. The data will be used by about:memory. When - // finished, invokes back to the file thread to run the rest of the - // about:memory functionality. - void CollectChildInfoOnProcessThread(); - // Collect current process information from the OS and store it // for processing. If data has already been collected, clears old // data and re-collects the data.
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index b6eda999..76b1861 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc
@@ -820,7 +820,7 @@ void WatchDogThread::Init() { // This thread shouldn't be allowed to perform any blocking disk I/O. - base::ThreadRestrictions::SetIOAllowed(false); + base::DisallowBlocking(); base::AutoLock lock(g_watchdog_lock.Get()); CHECK(!g_watchdog_thread);
diff --git a/chrome/browser/metrics/variations/variations_safe_mode_browsertest.cc b/chrome/browser/metrics/variations/variations_safe_mode_browsertest.cc index 8380434..2ca20ec 100644 --- a/chrome/browser/metrics/variations/variations_safe_mode_browsertest.cc +++ b/chrome/browser/metrics/variations/variations_safe_mode_browsertest.cc
@@ -8,17 +8,34 @@ #include <string> +#include "base/base_switches.h" +#include "base/containers/contains.h" #include "base/metrics/field_trial.h" +#include "base/path_service.h" +#include "base/ranges/ranges.h" +#include "base/strings/strcat.h" +#include "base/test/launcher/test_launcher.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/task_environment.h" +#include "base/test/test_switches.h" #include "chrome/browser/browser_process.h" +#include "chrome/common/chrome_paths.h" +#include "chrome/common/chrome_switches.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/metrics/clean_exit_beacon.h" #include "components/metrics/metrics_pref_names.h" +#include "components/metrics/metrics_service.h" +#include "components/prefs/json_pref_store.h" #include "components/prefs/pref_service.h" +#include "components/prefs/pref_service_factory.h" #include "components/variations/metrics.h" #include "components/variations/pref_names.h" #include "components/variations/service/variations_field_trial_creator.h" +#include "components/variations/service/variations_safe_mode_constants.h" +#include "components/variations/service/variations_service.h" +#include "components/variations/variations_switches.h" #include "components/variations/variations_test_utils.h" +#include "content/public/common/content_switches.h" #include "content/public/test/browser_test.h" #include "testing/gtest/include/gtest/gtest.h" @@ -94,7 +111,7 @@ SeedUsage::kSafeSeedUsed, 1); // Verify that there is a field trial associated with the sole test seed - // study, |kTestSeedStudyName|. + // study, |variations::kTestSeedStudyName|. EXPECT_TRUE(base::FieldTrialList::TrialExists(kTestSeedStudyName)); } @@ -151,4 +168,174 @@ SeedUsage::kRegularSeedUsed, 1); } +// This test code is programmatically launched by the SafeModeEndToEnd +// test below. Its primary purpose is to provide an entry-point by +// which the SafeModeEndToEnd test can cause the Field Trial Setup +// code to be exercised. For some launches, the setup code is expected +// to crash before reaching the test body; the test body simply verifies +// that the test is using the user-data-dir configured on the command-line. +// +// The MANUAL_ prefix prevents the test from running unless explicitly +// invoked. +IN_PROC_BROWSER_TEST_F(VariationsSafeModeBrowserTest, MANUAL_SubTest) { + // Validate that Chrome is running with the user-data-dir specified on the + // command-line. + base::FilePath expected_user_data_dir = + base::CommandLine::ForCurrentProcess()->GetSwitchValuePath( + ::switches::kUserDataDir); + base::FilePath actual_user_data_dir; + ASSERT_TRUE( + base::PathService::Get(chrome::DIR_USER_DATA, &actual_user_data_dir)); + ASSERT_FALSE(expected_user_data_dir.empty()); + ASSERT_FALSE(actual_user_data_dir.empty()); + ASSERT_EQ(actual_user_data_dir, expected_user_data_dir); +} + +namespace { + +class FieldTrialTest : public ::testing::TestWithParam<std::string> { + public: + void SetUp() override { + ::testing::TestWithParam<std::string>::SetUp(); + metrics::CleanExitBeacon::SkipCleanShutdownStepsForTesting(); + + pref_registry_ = base::MakeRefCounted<PrefRegistrySimple>(); + metrics::MetricsService::RegisterPrefs(pref_registry_.get()); + variations::VariationsService::RegisterPrefs(pref_registry_.get()); + + base::ScopedAllowBlockingForTesting allow_blocking; + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); + user_data_dir_ = temp_dir_.GetPath().AppendASCII("user-data-dir"); + pref_service_factory_.set_user_prefs(base::MakeRefCounted<JsonPrefStore>( + user_data_dir_.AppendASCII("Local State"))); + } + + protected: + const std::string& field_trial_group() const { return GetParam(); } + const base::FilePath& user_data_dir() const { return user_data_dir_; } + + bool IsSuccessfulSubTestOutput(const std::string& output) { + static const char* const kSubTestSuccessStrings[] = { + "Running 1 test from 1 test suite", + "OK ] VariationsSafeModeBrowserTest.MANUAL_SubTest", + "1 test from VariationsSafeModeBrowserTest", + "1 test from 1 test suite ran", + }; + return base::ranges::all_of(kSubTestSuccessStrings, [&](const char* s) { + return base::Contains(output, s); + }); + } + + bool IsCrashingSubTestOutput(const std::string& output) { + const char* const kSubTestCrashStrings[] = { + "Running 1 test from 1 test suite", + "VariationsSafeModeBrowserTest.MANUAL_SubTest", + "Check failed: crash_for_testing", + }; + return base::ranges::all_of(kSubTestCrashStrings, [&](const char* s) { + return base::Contains(output, s); + }); + } + + void RunAndExpectSuccessfulSubTest( + const base::CommandLine& sub_test_command) { + std::string output; + base::GetAppOutputAndError(sub_test_command, &output); + EXPECT_TRUE(IsSuccessfulSubTestOutput(output)) + << "Did not find success signals in output:\n" + << output; + } + + void RunAndExpectCrashingSubTest(const base::CommandLine& sub_test_command) { + std::string output; + base::GetAppOutputAndError(sub_test_command, &output); + EXPECT_FALSE(IsSuccessfulSubTestOutput(output)) + << "Expected crash but found success signals in output:\n" + << output; + EXPECT_TRUE(IsCrashingSubTestOutput(output)) + << "Did not find crash signals in output:\n" + << output; + } + + std::unique_ptr<PrefService> LoadLocalState() { + return pref_service_factory_.Create(pref_registry_); + } + + std::unique_ptr<metrics::CleanExitBeacon> LoadCleanExitBeacon( + PrefService* pref_service) { + static constexpr wchar_t kDummyWindowsRegistryKey[] = L""; + auto clean_exit_beacon = std::make_unique<metrics::CleanExitBeacon>( + kDummyWindowsRegistryKey, user_data_dir(), pref_service); + clean_exit_beacon->Initialize(); + return clean_exit_beacon; + } + + private: + base::test::TaskEnvironment task_environment_; + scoped_refptr<PrefRegistrySimple> pref_registry_; + PrefServiceFactory pref_service_factory_; + base::ScopedTempDir temp_dir_; + base::FilePath user_data_dir_; +}; + +} // namespace + +TEST_P(FieldTrialTest, ExtendedSafeModeEndToEnd) { + SCOPED_TRACE(field_trial_group()); + + // Reuse the browser_tests binary (i.e., that this test code is in), to + // manually run the sub-test. + base::CommandLine sub_test = + base::CommandLine(base::CommandLine::ForCurrentProcess()->GetProgram()); + + // Run the sub-test in the |user_data_dir()| allocated for the test case. + sub_test.AppendSwitchASCII(base::kGTestFilterFlag, + "VariationsSafeModeBrowserTest.MANUAL_SubTest"); + sub_test.AppendSwitch(::switches::kRunManualTestsFlag); + sub_test.AppendSwitch(::switches::kSingleProcessTests); + sub_test.AppendSwitchPath(::switches::kUserDataDir, user_data_dir()); + + // Select the extended variations safe mode field trial group. The "*" + // prefix forces the experiment/trial state to "active" at startup. + sub_test.AppendSwitchASCII(::switches::kForceFieldTrials, + base::StrCat({"*", kExtendedSafeModeTrial, "/", + field_trial_group(), "/"})); + + // Explicitly avoid any terminal control characters in the output. + sub_test.AppendSwitchASCII("gtest_color", "no"); + + // Initial sub-test run should be successful. + RunAndExpectSuccessfulSubTest(sub_test); + + // Add command-line switch to force crash during metric initialization. + // TODO(crbug/1249256): inject variations seed into user-data-dir that + // enables this feature instead of using altered command line. + base::CommandLine crashing_sub_test = sub_test; + crashing_sub_test.AppendSwitchASCII( + ::switches::kEnableFeatures, kForceFieldTrialSetupCrashForTesting.name); + + SetUpExtendedSafeModeExperiment(field_trial_group()); + + // The next three runs of the sub-test should crash... + for (int expected_crash_streak = 1; + expected_crash_streak <= kCrashStreakThreshold; + ++expected_crash_streak) { + RunAndExpectCrashingSubTest(crashing_sub_test); + auto local_state = LoadLocalState(); + auto clean_exit_beacon = LoadCleanExitBeacon(local_state.get()); + ASSERT_TRUE(clean_exit_beacon != nullptr); + ASSERT_FALSE(clean_exit_beacon->exited_cleanly()); + EXPECT_EQ(expected_crash_streak, + local_state->GetInteger(prefs::kVariationsCrashStreak)); + } + + // Until safe mode kicks in. + RunAndExpectSuccessfulSubTest(sub_test); +} + +INSTANTIATE_TEST_CASE_P( + VariationsSafeModeBrowserTest, + FieldTrialTest, + ::testing::Values(kSignalAndWriteSynchronouslyViaPrefServiceGroup, + kSignalAndWriteViaFileUtilGroup)); } // namespace variations
diff --git a/chrome/browser/notifications/scheduler/notification_schedule_service_factory.cc b/chrome/browser/notifications/scheduler/notification_schedule_service_factory.cc index d03dacc..9c3cce79 100644 --- a/chrome/browser/notifications/scheduler/notification_schedule_service_factory.cc +++ b/chrome/browser/notifications/scheduler/notification_schedule_service_factory.cc
@@ -26,8 +26,6 @@ #include "chrome/browser/notifications/scheduler/notification_background_task_scheduler_android.h" #include "chrome/browser/reading_list/android/reading_list_notification_client.h" #include "chrome/browser/reading_list/android/reading_list_notification_service.h" -#include "chrome/browser/updates/update_notification_client.h" -#include "chrome/browser/updates/update_notification_service_factory.h" #endif // defined(OS_ANDROID) namespace { @@ -37,16 +35,6 @@ auto client_registrar = std::make_unique<notifications::NotificationSchedulerClientRegistrar>(); #if defined(OS_ANDROID) - // Register UpdateNotificationClient. - auto update_notification_service_getter = - base::BindRepeating(&UpdateNotificationServiceFactory::GetForKey, key); - auto chrome_update_client = - std::make_unique<updates::UpdateNotificationClient>( - std::move(update_notification_service_getter)); - client_registrar->RegisterClient( - notifications::SchedulerClientType::kChromeUpdate, - std::move(chrome_update_client)); - // Register reading list client. if (ReadingListNotificationService::IsEnabled()) { Profile* profile = ProfileManager::GetProfileFromProfileKey(key);
diff --git a/chrome/browser/pdf/pdf_extension_test.cc b/chrome/browser/pdf/pdf_extension_test.cc index d5d4dc1..b338bc1 100644 --- a/chrome/browser/pdf/pdf_extension_test.cc +++ b/chrome/browser/pdf/pdf_extension_test.cc
@@ -383,24 +383,8 @@ private: int CountPepperPDFProcesses() { - int result = -1; - base::RunLoop run_loop; - auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::GetUIThreadTaskRunner({}) - : content::GetIOThreadTaskRunner({}); - task_runner->PostTaskAndReply( - FROM_HERE, - base::BindOnce(&PDFExtensionTestWithoutUnseasonedOverride:: - CountPepperPDFProcessesOnProcessThread, - base::Unretained(this), base::Unretained(&result)), - run_loop.QuitClosure()); - run_loop.Run(); - return result; - } - - void CountPepperPDFProcessesOnProcessThread(int* result) { auto* service = content::PluginService::GetInstance(); - *result = service->CountPpapiPluginProcessesForProfile( + return service->CountPpapiPluginProcessesForProfile( base::FilePath(ChromeContentClient::kPDFPluginPath), browser()->profile()->GetPath()); }
diff --git a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade.cc b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade.cc index 8740cc6..1e4f0a0 100644 --- a/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade.cc +++ b/chrome/browser/performance_manager/persistence/site_data/site_data_cache_facade.cc
@@ -68,7 +68,6 @@ SiteDataCacheFacadeFactory::GetInstance() ->cache_factory() ->PostTaskWithThisObject( - FROM_HERE, base::BindOnce( [](base::OnceCallback<void(bool)> cb, const std::string& browser_context_id, @@ -84,21 +83,19 @@ base::RunLoop run_loop; SiteDataCacheFacadeFactory::GetInstance() ->cache_factory() - ->PostTaskWithThisObject( - FROM_HERE, base::BindOnce( - [](base::OnceClosure quit_closure, - const std::string& browser_context_id, - SiteDataCacheFactory* cache_factory) { - auto* cache = - cache_factory->GetDataCacheForBrowserContext( - browser_context_id); - if (cache->IsRecording()) { - static_cast<SiteDataCacheImpl*>(cache) - ->SetInitializationCallbackForTesting( - std::move(quit_closure)); - } - }, - run_loop.QuitClosure(), browser_context_->UniqueId())); + ->PostTaskWithThisObject(base::BindOnce( + [](base::OnceClosure quit_closure, + const std::string& browser_context_id, + SiteDataCacheFactory* cache_factory) { + auto* cache = cache_factory->GetDataCacheForBrowserContext( + browser_context_id); + if (cache->IsRecording()) { + static_cast<SiteDataCacheImpl*>(cache) + ->SetInitializationCallbackForTesting( + std::move(quit_closure)); + } + }, + run_loop.QuitClosure(), browser_context_->UniqueId())); run_loop.Run(); } @@ -117,7 +114,7 @@ browser_context_->UniqueId()); SiteDataCacheFacadeFactory::GetInstance() ->cache_factory() - ->PostTaskWithThisObject(FROM_HERE, std::move(clear_all_site_data_cb)); + ->PostTaskWithThisObject(std::move(clear_all_site_data_cb)); } else { std::vector<url::Origin> origins_to_remove; @@ -148,7 +145,7 @@ browser_context_->UniqueId(), std::move(origins_to_remove)); SiteDataCacheFacadeFactory::GetInstance() ->cache_factory() - ->PostTaskWithThisObject(FROM_HERE, std::move(clear_site_data_cb)); + ->PostTaskWithThisObject(std::move(clear_site_data_cb)); } }
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle_browsertest.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle_browsertest.cc index 3f99acef..f52c83d 100644 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle_browsertest.cc +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle_browsertest.cc
@@ -14,7 +14,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/plugin_service.h" -#include "content/public/common/content_features.h" #include "content/public/test/browser_test.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/embedded_test_server.h" @@ -49,24 +48,8 @@ } int CountPDFProcesses() { - int result = -1; - base::RunLoop run_loop; - auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI) - ? content::GetUIThreadTaskRunner({}) - : content::GetIOThreadTaskRunner({}); - task_runner->PostTaskAndReply( - FROM_HERE, - base::BindOnce(&PluginResponseInterceptorURLLoaderThrottleBrowserTest:: - CountPDFProcessesOnProcessThread, - base::Unretained(this), base::Unretained(&result)), - run_loop.QuitClosure()); - run_loop.Run(); - return result; - } - - void CountPDFProcessesOnProcessThread(int* result) { auto* service = content::PluginService::GetInstance(); - *result = service->CountPpapiPluginProcessesForProfile( + return service->CountPpapiPluginProcessesForProfile( base::FilePath(ChromeContentClient::kPDFPluginPath), browser()->profile()->GetPath()); }
diff --git a/chrome/browser/policy/messaging_layer/public/report_client.cc b/chrome/browser/policy/messaging_layer/public/report_client.cc index fbe3f04b..f665845 100644 --- a/chrome/browser/policy/messaging_layer/public/report_client.cc +++ b/chrome/browser/policy/messaging_layer/public/report_client.cc
@@ -392,9 +392,8 @@ void ReportingClient::AsyncStartUploader( UploaderInterface::UploadReason reason, UploaderInterface::UploaderInterfaceResultCb start_uploader_cb) { - ReportingClient* const instance = - static_cast<ReportingClient*>(GetInstance()); - instance->DeliverAsyncStartUploader(reason, std::move(start_uploader_cb)); + ReportingClient::GetInstance()->DeliverAsyncStartUploader( + reason, std::move(start_uploader_cb)); } void ReportingClient::DeliverAsyncStartUploader( @@ -452,14 +451,12 @@ const base::FilePath& reporting_path, base::StringPiece verification_key, policy::CloudPolicyClient* client) - : saved_build_cloud_policy_client_cb_( - std::move(static_cast<ReportingClient*>(GetInstance()) - ->build_cloud_policy_client_cb_)) { - static_cast<ReportingClient*>(GetInstance())->reporting_path_ = - reporting_path; - static_cast<ReportingClient*>(GetInstance())->verification_key_ = - std::string(verification_key); - static_cast<ReportingClient*>(GetInstance())->build_cloud_policy_client_cb_ = + : saved_build_cloud_policy_client_cb_(std::move( + ReportingClient::GetInstance()->build_cloud_policy_client_cb_)) { + ReportingClient::GetInstance()->reporting_path_ = reporting_path; + ReportingClient::GetInstance()->verification_key_.assign( + verification_key.data(), verification_key.size()); + ReportingClient::GetInstance()->build_cloud_policy_client_cb_ = base::BindRepeating( [](policy::CloudPolicyClient* client, base::OnceCallback<void(StatusOr<policy::CloudPolicyClient*>)> @@ -468,8 +465,7 @@ } ReportingClient::TestEnvironment::~TestEnvironment() { - static_cast<ReportingClient*>(ReportingClient::GetInstance()) - ->build_cloud_policy_client_cb_ = + ReportingClient::GetInstance()->build_cloud_policy_client_cb_ = std::move(saved_build_cloud_policy_client_cb_); base::Singleton<ReportingClient>::OnExit(nullptr); }
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 5180682c..a0426feb 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -27,6 +27,7 @@ #include "chrome/browser/download/download_prefs.h" #include "chrome/browser/engagement/important_sites_util.h" #include "chrome/browser/enterprise/connectors/connectors_prefs.h" +#include "chrome/browser/enterprise/reporting/prefs.h" #include "chrome/browser/enterprise/util/managed_browser_utils.h" #include "chrome/browser/external_protocol/external_protocol_handler.h" #include "chrome/browser/first_run/first_run.h" @@ -232,7 +233,6 @@ #else // defined(OS_ANDROID) #include "chrome/browser/cart/cart_service.h" #include "chrome/browser/device_api/device_service_impl.h" -#include "chrome/browser/enterprise/reporting/prefs.h" #include "chrome/browser/gcm/gcm_product_util.h" #include "chrome/browser/intranet_redirect_detector.h" #include "chrome/browser/media/unified_autoplay_config.h" @@ -886,6 +886,7 @@ chrome::enterprise_util::RegisterLocalStatePrefs(registry); component_updater::RegisterPrefs(registry); embedder_support::OriginTrialPrefs::RegisterPrefs(registry); + enterprise_reporting::RegisterLocalStatePrefs(registry); ExternalProtocolHandler::RegisterPrefs(registry); flags_ui::PrefServiceFlagsStorage::RegisterPrefs(registry); GpuModeManager::RegisterPrefs(registry); @@ -948,7 +949,6 @@ registry->RegisterIntegerPref(first_run::kTosDialogBehavior, 0); registry->RegisterBooleanPref(lens::kLensCameraAssistedSearchEnabled, true); #else // defined(OS_ANDROID) - enterprise_reporting::RegisterLocalStatePrefs(registry); gcm::RegisterPrefs(registry); IntranetRedirectDetector::RegisterPrefs(registry); media_router::RegisterLocalStatePrefs(registry);
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index bbba561..162d8dd 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -145,6 +145,7 @@ #include "chrome/browser/storage/storage_notification_service_factory.h" #include "chrome/browser/ui/global_error/global_error_service_factory.h" #include "chrome/browser/ui/media_router/media_router_ui_service_factory.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h" #include "chrome/browser/usb/usb_chooser_context_factory.h" #endif @@ -499,6 +500,7 @@ UnifiedConsentServiceFactory::GetInstance(); UrlLanguageHistogramFactory::GetInstance(); #if !defined(OS_ANDROID) + TutorialServiceManager::GetInstance(); UsbChooserContextFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_EXTENSIONS)
diff --git a/chrome/browser/resources/internals/user_education/user_education_internals.js b/chrome/browser/resources/internals/user_education/user_education_internals.js index 0ba33a5..f2f1b20 100644 --- a/chrome/browser/resources/internals/user_education/user_education_internals.js +++ b/chrome/browser/resources/internals/user_education/user_education_internals.js
@@ -45,7 +45,8 @@ * @private */ startTutorial_(e) { - // TODO(crbug.com/1194751): start tutorial through handler + const id = /** @type {string} */ (e.model.item); + this.handler_.startTutorial(id); } }
diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn index b4df0e6..9142ca7 100644 --- a/chrome/browser/resources/settings/BUILD.gn +++ b/chrome/browser/resources/settings/BUILD.gn
@@ -189,6 +189,7 @@ "languages_page/languages.js", "languages_page/languages_browser_proxy.js", "languages_page/languages_settings_metrics_proxy.js", + "languages_page/languages_types.js", "people_page/import_data_browser_proxy.js", "people_page/manage_profile_browser_proxy.js", ] @@ -484,6 +485,7 @@ "languages_page:languages_page", "languages_page:languages_settings_metrics_proxy", "languages_page:languages_subpage", + "languages_page:languages_types", ] } extra_deps = [ ":build_ts" ] @@ -839,6 +841,7 @@ "languages_page/languages_page.js", "languages_page/languages_settings_metrics_proxy.js", "languages_page/languages_subpage.js", + "languages_page/languages_types.js", "people_page/import_data_browser_proxy.js", "people_page/import_data_dialog.js", "people_page/manage_profile_browser_proxy.js",
diff --git a/chrome/browser/resources/settings/chromeos/BUILD.gn b/chrome/browser/resources/settings/chromeos/BUILD.gn index 373d2d9..fe75104 100644 --- a/chrome/browser/resources/settings/chromeos/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/BUILD.gn
@@ -275,6 +275,7 @@ "controls/settings_boolean_control_behavior.js", "languages_page/languages.js", "languages_page/languages_browser_proxy.js", + "languages_page/languages_types.js", "people_page/account_manager_browser_proxy.js", "people_page/profile_info_browser_proxy.js", "chromeos/ambient_mode_page/ambient_mode_browser_proxy.js",
diff --git a/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html b/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html index eabf8cc..3832a1d 100644 --- a/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html +++ b/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html
@@ -7,7 +7,8 @@ } cr-toast { - --iron-icon-fill-color: var(--google-yellow-500); + /* NOTE: Toasts have a dark background so use the light icon color. */ + --iron-icon-fill-color: var(--cros-light-icon-color-warning); } cr-toast iron-icon {
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/BUILD.gn b/chrome/browser/resources/settings/chromeos/os_languages_page/BUILD.gn index e87ee13..0c7b216 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/BUILD.gn +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/BUILD.gn
@@ -234,7 +234,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel" ] } polymer_modulizer("add_spellcheck_languages_dialog") { @@ -249,7 +249,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel" ] } polymer_modulizer("cr_checkbox_with_policy") { @@ -264,7 +264,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel" ] } polymer_modulizer("os_edit_dictionary_page") { @@ -282,7 +282,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel,LanguageState" ] } polymer_modulizer("os_languages_section") { @@ -291,7 +291,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel" ] } polymer_modulizer("input_method_options_page") { @@ -300,7 +300,7 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper" ] } polymer_modulizer("input_page") { @@ -309,7 +309,10 @@ html_type = "dom-module" migrated_imports = os_settings_migrated_imports namespace_rewrites = os_settings_namespace_rewrites - auto_imports = os_settings_auto_imports + [ "chrome/browser/resources/settings/controls/settings_toggle_button.html|SettingsToggleButtonElement" ] + auto_imports = os_settings_auto_imports + [ + "chrome/browser/resources/settings/controls/settings_toggle_button.html|SettingsToggleButtonElement", + "chrome/browser/resources/settings/languages_page/languages_types.html|LanguageHelper,LanguagesModel,LanguageState,SpellCheckLanguageState", + ] } polymer_modulizer("shared_style") {
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/add_input_methods_dialog.html b/chrome/browser/resources/settings/chromeos/os_languages_page/add_input_methods_dialog.html index 9b851b56..c9cce15 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/add_input_methods_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/add_input_methods_dialog.html
@@ -9,6 +9,7 @@ <link rel="import" href="../metrics_recorder.html"> <link rel="import" href="shared_style.html"> <link rel="import" href="../../languages_page/languages.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <link rel="import" href="../../settings_shared_css.html"> <dom-module id="os-settings-add-input-methods-dialog">
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/add_spellcheck_languages_dialog.js b/chrome/browser/resources/settings/chromeos/os_languages_page/add_spellcheck_languages_dialog.js index dacf2bf..af8107f5 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/add_spellcheck_languages_dialog.js +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/add_spellcheck_languages_dialog.js
@@ -19,6 +19,7 @@ import {FindShortcutBehavior} from '//resources/cr_elements/find_shortcut_behavior.js'; import {afterNextRender, flush, html, Polymer, TemplateInstanceBase, Templatizer} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {LanguageHelper, LanguagesModel, SpellCheckLanguageState} from '../../languages_page/languages_types.js'; import {PrefsBehavior} from '../../prefs/prefs_behavior.js'; import {recordClick, recordNavigation, recordPageBlur, recordPageFocus, recordSearch, recordSettingChange, setUserActionRecorderForTesting} from '../metrics_recorder.m.js';
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/change_device_language_dialog.html b/chrome/browser/resources/settings/chromeos/os_languages_page/change_device_language_dialog.html index d6924a5c..2a7760c 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/change_device_language_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/change_device_language_dialog.html
@@ -14,6 +14,7 @@ <link rel="import" href="chrome://resources/cr_components/chromeos/localized_link/localized_link.html"> <link rel="import" href="../metrics_recorder.html"> <link rel="import" href="../../languages_page/languages.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <link rel="import" href="../../lifetime_browser_proxy.html"> <link rel="import" href="../../settings_shared_css.html">
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/input_method_options_page.html b/chrome/browser/resources/settings/chromeos/os_languages_page/input_method_options_page.html index 8fec07ae..bd946e6 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/input_method_options_page.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/input_method_options_page.html
@@ -9,6 +9,7 @@ <link rel="import" href="../../router.html"> <link rel="import" href="../../settings_shared_css.html"> <link rel="import" href="../../prefs/prefs_behavior.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <dom-module id="settings-input-method-options-page"> <template>
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/input_page.html b/chrome/browser/resources/settings/chromeos/os_languages_page/input_page.html index 54f113d84..00266ab 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/input_page.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/input_page.html
@@ -23,6 +23,7 @@ <link rel="import" href="../../router.html"> <link rel="import" href="../../settings_shared_css.html"> <link rel="import" href="../../settings_page/settings_animated_pages.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <dom-module id="os-settings-input-page"> <template>
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/os_add_languages_dialog.html b/chrome/browser/resources/settings/chromeos/os_languages_page/os_add_languages_dialog.html index 3304c6664..295d18e 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/os_add_languages_dialog.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/os_add_languages_dialog.html
@@ -11,6 +11,7 @@ <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> <link rel="import" href="shared_style.html"> <link rel="import" href="../../languages_page/languages.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <link rel="import" href="../../settings_shared_css.html"> <dom-module id="os-settings-add-languages-dialog">
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_page_v2.html b/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_page_v2.html index 63bc595..444e3e8 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_page_v2.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_page_v2.html
@@ -25,6 +25,7 @@ <link rel="import" href="../../router.html"> <link rel="import" href="../../settings_shared_css.html"> <link rel="import" href="../metrics_recorder.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <dom-module id="os-settings-languages-page-v2"> <template>
diff --git a/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_section.html b/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_section.html index 145f9d1c..0e925758 100644 --- a/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_section.html +++ b/chrome/browser/resources/settings/chromeos/os_languages_page/os_languages_section.html
@@ -15,6 +15,7 @@ <link rel="import" href="../../settings_page/settings_subpage.html"> <link rel="import" href="../../settings_shared_css.html"> <link rel="import" href="../../settings_vars_css.html"> +<link rel="import" href="../../languages_page/languages_types.html"> <dom-module id="os-settings-languages-section"> <template>
diff --git a/chrome/browser/resources/settings/chromeos/os_settings.gni b/chrome/browser/resources/settings/chromeos/os_settings.gni index 6d07f46..2d45ada 100644 --- a/chrome/browser/resources/settings/chromeos/os_settings.gni +++ b/chrome/browser/resources/settings/chromeos/os_settings.gni
@@ -489,6 +489,7 @@ "chrome/browser/resources/settings/icons.html", "chrome/browser/resources/settings/languages_page/languages_browser_proxy.html", "chrome/browser/resources/settings/languages_page/languages.html", + "chrome/browser/resources/settings/languages_page/languages_types.html", "chrome/browser/resources/settings/lifetime_browser_proxy.html", "chrome/browser/resources/settings/people_page/account_manager_browser_proxy.html", "chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html",
diff --git a/chrome/browser/resources/settings/languages_page/languages.js b/chrome/browser/resources/settings/languages_page/languages.js index 50af373c..7622222 100644 --- a/chrome/browser/resources/settings/languages_page/languages.js +++ b/chrome/browser/resources/settings/languages_page/languages.js
@@ -21,6 +21,7 @@ import {CrSettingsPrefs} from '../prefs/prefs_types.js'; import {LanguagesBrowserProxy, LanguagesBrowserProxyImpl} from './languages_browser_proxy.js'; +import {InputMethodsModel, LanguageHelper, LanguagesModel, LanguageState, SpellCheckLanguageState} from './languages_types.js'; const MoveType = chrome.languageSettingsPrivate.MoveType;
diff --git a/chrome/browser/resources/settings/languages_page/languages_page.js b/chrome/browser/resources/settings/languages_page/languages_page.js index 9a176b0..7b96676 100644 --- a/chrome/browser/resources/settings/languages_page/languages_page.js +++ b/chrome/browser/resources/settings/languages_page/languages_page.js
@@ -46,6 +46,7 @@ import {Route, Router} from '../router.js'; import {LanguageSettingsActionType, LanguageSettingsMetricsProxy, LanguageSettingsMetricsProxyImpl, LanguageSettingsPageImpressionType} from './languages_settings_metrics_proxy.js'; +import {LanguageHelper, LanguagesModel, LanguageState, SpellCheckLanguageState} from './languages_types.js'; /** * @constructor
diff --git a/chrome/browser/resources/settings/languages_page/languages_subpage.js b/chrome/browser/resources/settings/languages_page/languages_subpage.js index 2f778e43..d6f228a 100644 --- a/chrome/browser/resources/settings/languages_page/languages_subpage.js +++ b/chrome/browser/resources/settings/languages_page/languages_subpage.js
@@ -40,6 +40,7 @@ import {PrefsBehavior, PrefsBehaviorInterface} from '../prefs/prefs_behavior.js'; import {LanguageSettingsActionType, LanguageSettingsMetricsProxy, LanguageSettingsMetricsProxyImpl, LanguageSettingsPageImpressionType} from './languages_settings_metrics_proxy.js'; +import {LanguageHelper, LanguagesModel, LanguageState} from './languages_types.js'; /** * @type {number} Millisecond delay that can be used when closing an action
diff --git a/chrome/browser/resources/settings/languages_page/languages_types.js b/chrome/browser/resources/settings/languages_page/languages_types.js index a40ba95..b7eb532 100644 --- a/chrome/browser/resources/settings/languages_page/languages_types.js +++ b/chrome/browser/resources/settings/languages_page/languages_types.js
@@ -21,7 +21,7 @@ * ?chrome.languageSettingsPrivate.SpellcheckDictionaryStatus, * }} */ -let LanguageState; +export let LanguageState; /** * Settings and state for spellcheck languages. @@ -34,7 +34,7 @@ * ?chrome.languageSettingsPrivate.SpellcheckDictionaryStatus, * }} */ -let SpellCheckLanguageState; +export let SpellCheckLanguageState; /** * Input method data to expose to consumers (Chrome OS only). @@ -47,7 +47,7 @@ * currentId: string, * }} */ -let InputMethodsModel; +export let InputMethodsModel; /** * Languages data to expose to consumers. @@ -77,13 +77,13 @@ * spellCheckOffLanguages: !Array<!SpellCheckLanguageState>, * }} */ -let LanguagesModel; +export let LanguagesModel; /** * Helper methods for reading and writing language settings. * @interface */ -class LanguageHelper { +export class LanguageHelper { /** @return {!Promise} */ whenReady() {}
diff --git a/chrome/browser/resources/settings/lazy_load.ts b/chrome/browser/resources/settings/lazy_load.ts index 43389048..5e5be20 100644 --- a/chrome/browser/resources/settings/lazy_load.ts +++ b/chrome/browser/resources/settings/lazy_load.ts
@@ -77,6 +77,7 @@ export {LanguagesBrowserProxy, LanguagesBrowserProxyImpl} from './languages_page/languages_browser_proxy.js'; export {LanguageSettingsActionType, LanguageSettingsMetricsProxy, LanguageSettingsMetricsProxyImpl, LanguageSettingsPageImpressionType} from './languages_page/languages_settings_metrics_proxy.js'; export {kMenuCloseDelay, SettingsLanguagesSubpageElement} from './languages_page/languages_subpage.js'; +export {LanguageHelper, LanguagesModel} from './languages_page/languages_types.js'; // </if> // <if expr="not chromeos"> export {ImportDataBrowserProxyImpl, ImportDataStatus} from './people_page/import_data_browser_proxy.js';
diff --git a/chrome/browser/resources/tools/optimize_webui.py b/chrome/browser/resources/tools/optimize_webui.py index 87164da..fed8462 100755 --- a/chrome/browser/resources/tools/optimize_webui.py +++ b/chrome/browser/resources/tools/optimize_webui.py
@@ -92,7 +92,7 @@ export default ({{ plugins: [ plugin('{in_path}', '{host_url}', {exclude_list}, - {external_path_list}) ] + {external_path_list}, /* allowEmptyExtension= */ false) ] }}); '''.format(plugin_path=path_to_plugin.replace('\\', '/'), in_path=in_path.replace('\\', '/'), @@ -196,10 +196,9 @@ tmp_out_dir = tempfile.mkdtemp(dir=out_path).replace('\\', '/') excludes = _BASE_EXCLUDES + [ - # This file is dynamically created by C++. Need to specify an exclusion - # URL for both the relative URL and chrome:// URL syntax. + # This file is dynamically created by C++. Should always be imported with a + # relative path. 'strings.m.js', - '%s/strings.m.js' % args.host_url, ] excludes.extend(args.exclude or []) external_paths = args.external_paths or []
diff --git a/chrome/browser/resources/tools/optimize_webui_test.py b/chrome/browser/resources/tools/optimize_webui_test.py index 77842e9..535c107 100755 --- a/chrome/browser/resources/tools/optimize_webui_test.py +++ b/chrome/browser/resources/tools/optimize_webui_test.py
@@ -112,7 +112,7 @@ alert('hello from element_in_dir'); ''') self._write_file_to_src_dir('ui.js', ''' -import 'chrome://fake-host/strings.m.js'; +import './strings.m.js'; import './element.js'; import './element_in_dir/element_in_dir.js'; ''')
diff --git a/chrome/browser/resources/tools/rollup_plugin.js b/chrome/browser/resources/tools/rollup_plugin.js index 16216595d..1717bb4 100644 --- a/chrome/browser/resources/tools/rollup_plugin.js +++ b/chrome/browser/resources/tools/rollup_plugin.js
@@ -68,7 +68,8 @@ return joinPaths(urlSrcPath, pathFromUrl); } -export default function plugin(rootPath, hostUrl, excludes, externalPaths) { +export default function plugin( + rootPath, hostUrl, excludes, externalPaths, allowEmptyExtension) { const urlsToPaths = new Map(); for (const externalPath of externalPaths) { const [url, path] = externalPath.split('|', 2); @@ -79,6 +80,11 @@ name: 'webui-path-resolver-plugin', resolveId(source, origin) { + if (path.extname(source) === '' && !allowEmptyExtension) { + this.error( + `Invalid path (missing file extension) was found: ${source}`); + } + // Normalize origin paths to use forward slashes. if (origin) { origin = normalizeSlashes(origin); @@ -94,8 +100,12 @@ } // Not in the URL path map -> should be in the root directory. - // Check if it should be excluded from the bundle. - const fullSourcePath = combinePaths(origin, source); + // Check if it should be excluded from the bundle. Check for an absolute + // path before combining with the origin path. + const fullSourcePath = + (source.startsWith('/') && !source.startsWith(rootPath)) ? + path.join(rootPath, source) : + combinePaths(origin, source); if (fullSourcePath.startsWith(rootPath)) { const pathFromRoot = relativePath(rootPath, fullSourcePath); if (excludes.includes(pathFromRoot)) {
diff --git a/chrome/browser/search/search_unittest.cc b/chrome/browser/search/search_unittest.cc index 388675c..f9ae1011 100644 --- a/chrome/browser/search/search_unittest.cc +++ b/chrome/browser/search/search_unittest.cc
@@ -17,10 +17,13 @@ #include "chrome/browser/search/instant_service.h" #include "chrome/browser/search/instant_service_factory.h" #include "chrome/browser/search_engines/template_url_service_factory.h" +#include "chrome/browser/signin/chrome_signin_client_factory.h" +#include "chrome/browser/signin/chrome_signin_client_test_util.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/search_test_utils.h" +#include "chrome/test/base/testing_profile.h" #include "components/search_engines/template_url_service.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_frame_host.h" @@ -130,6 +133,13 @@ false, !content::CanSameSiteMainFrameNavigationsChangeSiteInstances(), true}, }; + + // BrowserWithTestWindowTest: + TestingProfile::TestingFactories GetTestingFactories() override { + return {{ChromeSigninClientFactory::GetInstance(), + base::BindRepeating(&BuildChromeSigninClientWithURLLoader, + test_url_loader_factory())}}; + } }; struct SearchTestCase {
diff --git a/chrome/browser/speech/extension_api/tts_extension_apitest.cc b/chrome/browser/speech/extension_api/tts_extension_apitest.cc index a419494..47d2a09c 100644 --- a/chrome/browser/speech/extension_api/tts_extension_apitest.cc +++ b/chrome/browser/speech/extension_api/tts_extension_apitest.cc
@@ -270,6 +270,7 @@ public: void SetUpInProcessBrowserTestFixture() override { ExtensionApiTest::SetUpInProcessBrowserTestFixture(); + content::TtsController::SkipAddNetworkChangeObserverForTests(true); content::TtsController* tts_controller = content::TtsController::GetInstance(); tts_controller->SetTtsPlatform(&mock_platform_impl_);
diff --git a/chrome/browser/speech/speech_recognition_service_browsertest.cc b/chrome/browser/speech/speech_recognition_service_browsertest.cc index fbe9612..3db0abf12 100644 --- a/chrome/browser/speech/speech_recognition_service_browsertest.cc +++ b/chrome/browser/speech/speech_recognition_service_browsertest.cc
@@ -23,6 +23,7 @@ #include "chrome/test/base/in_process_browser_test.h" #include "components/metrics/content/subprocess_metrics_provider.h" #include "components/prefs/pref_service.h" +#include "components/soda/constants.h" #include "components/soda/pref_names.h" #include "content/public/browser/audio_service.h" #include "content/public/common/content_switches.h" @@ -147,12 +148,6 @@ void OnLanguageIdentificationEvent( media::mojom::LanguageIdentificationEventPtr event) override; - void SetUpCommandLine(base::CommandLine* command_line) override { - // Required for the utility process to access the directory containing the - // test files. - command_line->AppendSwitch(sandbox::policy::switches::kNoSandbox); - } - protected: void CloseCaptionBubble() { is_client_requesting_speech_recognition_ = false; @@ -212,10 +207,8 @@ } void SpeechRecognitionServiceTest::SetUpPrefs() { - g_browser_process->local_state()->SetFilePath( - prefs::kSodaBinaryPath, - test_data_dir_.Append(base::FilePath(soda::kSodaResourcePath)) - .Append(soda::kSodaTestBinaryRelativePath)); + g_browser_process->local_state()->SetFilePath(prefs::kSodaBinaryPath, + GetSodaTestBinaryPath()); g_browser_process->local_state()->SetFilePath( prefs::kSodaEnUsConfigPath, test_data_dir_.Append(base::FilePath(soda::kSodaResourcePath))
diff --git a/chrome/browser/tracing/chrome_tracing_delegate.cc b/chrome/browser/tracing/chrome_tracing_delegate.cc index 8995b94..475ef83 100644 --- a/chrome/browser/tracing/chrome_tracing_delegate.cc +++ b/chrome/browser/tracing/chrome_tracing_delegate.cc
@@ -341,15 +341,18 @@ } #endif // defined(OS_ANDROID) -bool ChromeTracingDelegate::IsAllowedToBeginBackgroundScenarioInternal( +bool ChromeTracingDelegate::IsActionAllowed( + BackgroundScenarioAction action, const content::BackgroundTracingConfig& config, - bool requires_anonymized_data) const { + bool requires_anonymized_data, + bool ignore_trace_limit) const { // If the background tracing is specified on the command-line, we allow - // any scenario to be traced. - if (IsBackgroundTracingCommandLine()) { + // any scenario to be traced and uploaded. + if (IsBackgroundTracingCommandLine()) return true; - } - if (requires_anonymized_data && chrome::IsOffTheRecordSessionActive()) { + + if (requires_anonymized_data && + (incognito_launched_ || chrome::IsOffTheRecordSessionActive())) { RecordDisallowedMetric( TracingFinalizationDisallowedReason::kIncognitoLaunched); return false; @@ -357,21 +360,23 @@ BackgroundTracingStateManager& state = BackgroundTracingStateManager::GetInstance(); - if (state.DidLastSessionEndUnexpectedly()) { + + // Don't start a new trace if the previous trace did not end. + if (action == BackgroundScenarioAction::kStartTracing && + state.DidLastSessionEndUnexpectedly()) { RecordDisallowedMetric( TracingFinalizationDisallowedReason::kLastTracingSessionDidNotEnd); return false; } - // If it is a crash scenario then ignore the trace upload limit and continue - // uploading. We again check if the trigger was due to crash later before - // uploading. - if (!config.has_crash_scenario() && - state.DidRecentlyUploadForScenario(config)) { + // Check the trace limit for both kStartTracing and kUploadTrace actions + // because there is no point starting a trace that can't be uploaded. + if (!ignore_trace_limit && state.DidRecentlyUploadForScenario(config)) { RecordDisallowedMetric( TracingFinalizationDisallowedReason::kTraceUploadedRecently); return false; } + return true; } @@ -384,16 +389,21 @@ // will thus not save state. This means that when we save the background // tracing session state for one session, and then later read the state in a // future session, there might have been sessions between these two where - // tracing was disabled. Therefore, when we record - // TracingFinalizationDisallowedReason::kLastTracingSessionDidNotEnd, it might - // not be the directly preceding session, but instead it is the previous - // session where tracing was enabled. + // tracing was disabled. Therefore, when IsActionAllowed records + // TracingFinalizationDisallowedReason::kLastTracingSessionDidNotEnd, it + // might not be the directly preceding session, but instead it is the + // previous session where tracing was enabled. BackgroundTracingStateManager& state = BackgroundTracingStateManager::GetInstance(); state.Initialize(); - if (!IsAllowedToBeginBackgroundScenarioInternal(config, - requires_anonymized_data)) { + // If the config includes a crash scenario, ignore the trace limit so that a + // trace can be taken on crash. We check if the trigger is actually due to a + // crash later before uploading. + const bool ignore_trace_limit = config.has_crash_scenario(); + + if (!IsActionAllowed(BackgroundScenarioAction::kStartTracing, config, + requires_anonymized_data, ignore_trace_limit)) { return false; } @@ -414,18 +424,13 @@ BackgroundTracingStateManager& state = BackgroundTracingStateManager::GetInstance(); state.SetState(BackgroundTracingState::FINALIZATION_STARTED); - // If it is a crash scenario then ignore the trace upload limit and continue - // uploading. - if (!is_crash_scenario && state.DidRecentlyUploadForScenario(config)) { - RecordDisallowedMetric( - TracingFinalizationDisallowedReason::kTraceUploadedRecently); - return false; - } - if (requires_anonymized_data && - (incognito_launched_ || chrome::IsOffTheRecordSessionActive())) { - RecordDisallowedMetric( - TracingFinalizationDisallowedReason::kIncognitoLaunched); + // If a crash scenario triggered, ignore the trace upload limit and continue + // uploading. + const bool ignore_trace_limit = is_crash_scenario; + + if (!IsActionAllowed(BackgroundScenarioAction::kUploadTrace, config, + requires_anonymized_data, ignore_trace_limit)) { return false; }
diff --git a/chrome/browser/tracing/chrome_tracing_delegate.h b/chrome/browser/tracing/chrome_tracing_delegate.h index f94af65..d5e3ee5 100644 --- a/chrome/browser/tracing/chrome_tracing_delegate.h +++ b/chrome/browser/tracing/chrome_tracing_delegate.h
@@ -152,9 +152,18 @@ void OnBrowserAdded(Browser* browser) override; #endif - bool IsAllowedToBeginBackgroundScenarioInternal( - const content::BackgroundTracingConfig& config, - bool requires_anonymized_data) const; + // The types of action that are guarded by IsActionAllowed. + enum class BackgroundScenarioAction { + kStartTracing, + kUploadTrace, + }; + + // Returns true if the delegate should be allowed to perform `action` for the + // scenario described in `config`. + bool IsActionAllowed(BackgroundScenarioAction action, + const content::BackgroundTracingConfig& config, + bool requires_anonymized_data, + bool ignore_trace_limit) const; bool incognito_launched_ = false; };
diff --git a/chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc b/chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc index cd6b855..afb1838 100644 --- a/chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc +++ b/chrome/browser/tracing/chrome_tracing_delegate_browsertest.cc
@@ -6,14 +6,21 @@ #include "base/bind.h" #include "base/command_line.h" +#include "base/files/file_path.h" +#include "base/files/file_path_watcher.h" +#include "base/files/file_util.h" +#include "base/files/scoped_temp_dir.h" #include "base/json/json_writer.h" #include "base/run_loop.h" #include "base/strings/pattern.h" +#include "base/test/bind.h" +#include "base/threading/thread_restrictions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/tracing/chrome_tracing_delegate.h" +#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/common/pref_names.h" @@ -40,6 +47,8 @@ #if !BUILDFLAG(IS_CHROMEOS_ASH) void SetUpOnMainThread() override { + InProcessBrowserTest::SetUpOnMainThread(); + PrefService* local_state = g_browser_process->local_state(); DCHECK(local_state); local_state->SetBoolean(metrics::prefs::kMetricsReportingEnabled, true); @@ -49,7 +58,8 @@ bool StartPreemptiveScenario( content::BackgroundTracingManager::DataFiltering data_filtering, - base::StringPiece scenario_name = "TestScenario") { + base::StringPiece scenario_name = "TestScenario", + bool with_crash_scenario = false) { base::Value dict(base::Value::Type::DICTIONARY); dict.SetStringKey("scenario_name", scenario_name); @@ -64,6 +74,13 @@ rules_dict.SetStringKey("trigger_name", "test"); rules_list.Append(std::move(rules_dict)); } + if (with_crash_scenario) { + base::Value rules_dict(base::Value::Type::DICTIONARY); + rules_dict.SetStringKey("rule", "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED"); + rules_dict.SetStringKey("trigger_name", "test_crash"); + rules_dict.SetBoolKey("is_crash", true); + rules_list.Append(std::move(rules_dict)); + } dict.SetKey("configs", std::move(rules_list)); std::unique_ptr<content::BackgroundTracingConfig> config( @@ -74,13 +91,21 @@ std::move(config), data_filtering); } + bool StartPreemptiveScenarioWithCrash( + content::BackgroundTracingManager::DataFiltering data_filtering, + base::StringPiece scenario_name = "TestScenario") { + return StartPreemptiveScenario(data_filtering, scenario_name, + /*with_crash_scenario=*/true); + } + void TriggerPreemptiveScenario( - base::OnceClosure on_started_finalization_callback) { + base::OnceClosure on_started_finalization_callback, + base::StringPiece trigger_name = "test") { on_started_finalization_callback_ = std::move(on_started_finalization_callback); trigger_handle_ = content::BackgroundTracingManager::GetInstance()->RegisterTriggerType( - "test"); + trigger_name); content::BackgroundTracingManager::StartedFinalizingCallback started_finalizing_callback = base::BindOnce( @@ -90,6 +115,12 @@ trigger_handle_, std::move(started_finalizing_callback)); } + void TriggerPreemptiveScenarioWithCrash( + base::OnceClosure on_started_finalization_callback) { + TriggerPreemptiveScenario(std::move(on_started_finalization_callback), + "test_crash"); + } + void WaitForUpload() { // No ReceiveCallback set, so wait for SetTraceToUpload to be called. auto* manager = content::BackgroundTracingManager::GetInstance(); @@ -270,6 +301,73 @@ EXPECT_EQ(state, R"({"state":1,"upload_times":[]})"); } +// Test how crash scenarios behave when uploads are throttled: tracing starts if +// a crash scenario exists, and the trace is uploaded if the crash scenario is +// triggered. +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, + BackgroundTracingCrashScenarioNotThrottled) { + EXPECT_TRUE(StartPreemptiveScenario( + content::BackgroundTracingManager::NO_DATA_FILTERING)); + + TriggerPreemptiveScenario(base::OnceClosure()); + + WaitForUpload(); + EXPECT_EQ(get_receive_count(), 1); + + content::BackgroundTracingManager::GetInstance()->AbortScenarioForTesting(); + base::RunLoop wait_for_abort; + content::BackgroundTracingManager::GetInstance()->WhenIdle( + wait_for_abort.QuitClosure()); + wait_for_abort.Run(); + + EXPECT_FALSE( + content::BackgroundTracingManager::GetInstance()->HasActiveScenario()); + + // We should immediately be able to start a new scenario that includes a + // crash scenario. + EXPECT_TRUE(StartPreemptiveScenarioWithCrash( + content::BackgroundTracingManager::NO_DATA_FILTERING)); + TriggerPreemptiveScenarioWithCrash(base::OnceClosure()); + + WaitForUpload(); + EXPECT_EQ(get_receive_count(), 2); +} + +// Test how crash scenarios behave when uploads are throttled: tracing starts if +// a crash scenario exists, but if a different scenario is triggered the upload +// should still be throttled. +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, + BackgroundTracingCrashScenarioUploadThrottled) { + EXPECT_TRUE(StartPreemptiveScenario( + content::BackgroundTracingManager::NO_DATA_FILTERING)); + + TriggerPreemptiveScenario(base::OnceClosure()); + + WaitForUpload(); + EXPECT_EQ(get_receive_count(), 1); + + content::BackgroundTracingManager::GetInstance()->AbortScenarioForTesting(); + base::RunLoop wait_for_abort; + content::BackgroundTracingManager::GetInstance()->WhenIdle( + wait_for_abort.QuitClosure()); + wait_for_abort.Run(); + + EXPECT_FALSE( + content::BackgroundTracingManager::GetInstance()->HasActiveScenario()); + + // We should immediately be able to start a new scenario that includes a + // crash scenario. + EXPECT_TRUE(StartPreemptiveScenarioWithCrash( + content::BackgroundTracingManager::NO_DATA_FILTERING)); + + base::RunLoop wait_for_finalization_start; + TriggerPreemptiveScenario(wait_for_finalization_start.QuitClosure()); + wait_for_finalization_start.Run(); + + EXPECT_EQ(get_started_finalizations(), 1); + EXPECT_FALSE(get_last_started_finalization_success()); +} + IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, BackgroundTracingUnexpectedSessionEnd) { std::string state = GetSessionStateJson(); @@ -339,6 +437,17 @@ content::BackgroundTracingManager::ANONYMIZE_DATA)); } +// If we need a PII-stripped trace, OTR sessions that ended before tracing +// should block the trace (because traces could theoretically include stale +// memory from those sessions). +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, + FinishedIncognitoSessionBlockingTraceStart) { + Browser* incognito_browser = CreateIncognitoBrowser(browser()->profile()); + EXPECT_TRUE(BrowserList::IsOffTheRecordBrowserActive()); + CloseBrowserSynchronously(incognito_browser); + EXPECT_FALSE(BrowserList::IsOffTheRecordBrowserActive()); +} + // If we need a PII-stripped trace, any new OTR session during tracing should // block the finalization of the trace. IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, @@ -357,6 +466,36 @@ EXPECT_FALSE(get_last_started_finalization_success()); } +// If we need a PII-stripped trace, any OTR session that starts and ends during +// tracing should block the finalization of the trace. +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTest, + ShortIncognitoSessionBlockingTraceFinalization) { + EXPECT_TRUE(StartPreemptiveScenario( + content::BackgroundTracingManager::ANONYMIZE_DATA)); + + Browser* incognito_browser = CreateIncognitoBrowser(browser()->profile()); + EXPECT_TRUE(BrowserList::IsOffTheRecordBrowserActive()); + CloseBrowserSynchronously(incognito_browser); + EXPECT_FALSE(BrowserList::IsOffTheRecordBrowserActive()); + + base::RunLoop wait_for_finalization_start; + TriggerPreemptiveScenario(wait_for_finalization_start.QuitClosure()); + wait_for_finalization_start.Run(); + + EXPECT_TRUE(get_started_finalizations() == 1); + EXPECT_FALSE(get_last_started_finalization_success()); +} + +namespace { +static const char* const kDefaultConfigText = R"({ + "mode": "PREEMPTIVE_TRACING_MODE", + "scenario_name": "TestScenario", + "custom_categories": "base,toplevel", + "configs": [{"rule": "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED", + "trigger_name": "test"}] + })"; +} // namespace + class ChromeTracingDelegateBrowserTestOnStartup : public ChromeTracingDelegateBrowserTest { protected: @@ -367,13 +506,7 @@ // We need to replace the config JSON with the full one here, as we can't // pass JSON through the fieldtrial switch parsing. if (config_text == "default_config_for_testing") { - return R"({ - "mode": "PREEMPTIVE_TRACING_MODE", - "scenario_name": "TestScenario", - "custom_categories": "base,toplevel", - "configs": [{"rule": "MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED", - "trigger_name": "test"}] - })"; + return kDefaultConfigText; } return config_text; } @@ -443,3 +576,100 @@ R"({"state":0,"upload_times":[{"scenario":"TestScenario","time":"*"}]})")) << "Actual: " << state; } + +class ChromeTracingDelegateBrowserTestFromCommandLine + : public ChromeTracingDelegateBrowserTest { + protected: + void SetUpCommandLine(base::CommandLine* command_line) override { + ChromeTracingDelegateBrowserTest::SetUpCommandLine(command_line); + ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); + + base::FilePath config_path( + temp_dir_.GetPath().Append(FILE_PATH_LITERAL("config.json"))); + ASSERT_TRUE(base::WriteFile(config_path, kDefaultConfigText)); + command_line->AppendSwitchPath("enable-background-tracing", config_path); + + output_path_ = base::FilePath( + temp_dir_.GetPath().Append(FILE_PATH_LITERAL("output.perfetto.gz"))); + command_line->AppendSwitchPath("background-tracing-output-file", + output_path_); + } + + bool OutputPathExists() const { + base::ScopedAllowBlockingForTesting allow_blocking; + return base::PathExists(output_path_); + } + + void TriggerScenarioAndWaitForOutput() { + base::ScopedAllowBlockingForTesting allow_blocking; + + // Wait for the output file to appear instead of for the trigger callback + // (which just means the data is ready to write). + base::FilePathWatcher output_watcher; + base::RunLoop run_loop; + output_watcher.Watch( + output_path_, base::FilePathWatcher::Type::kNonRecursive, + base::BindLambdaForTesting( + [&run_loop](const base::FilePath&, bool) { run_loop.Quit(); })); + TriggerPreemptiveScenario(base::OnceClosure()); + run_loop.Run(); + } + + private: + base::ScopedTempDir temp_dir_; + base::FilePath output_path_; +}; + +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTestFromCommandLine, + ScenarioFromCommandLine) { + ASSERT_FALSE(OutputPathExists()); + + EXPECT_TRUE( + content::BackgroundTracingManager::GetInstance()->HasActiveScenario()); + // State 1 = STARTED. + EXPECT_EQ(GetSessionStateJson(), R"({"state":1,"upload_times":[]})"); + + // The scenario should also be "uploaded" (actually written to the output + // file). + TriggerScenarioAndWaitForOutput(); + EXPECT_TRUE(OutputPathExists()); +} + +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTestFromCommandLine, + PRE_IgnoreThrottle) { + EXPECT_TRUE( + content::BackgroundTracingManager::GetInstance()->HasActiveScenario()); + EXPECT_EQ(GetSessionStateJson(), R"({"state":1,"upload_times":[]})"); + + // This updates the upload time for the test scenario to the current time, + // even though the output is actually written to a file. + TriggerScenarioAndWaitForOutput(); + EXPECT_TRUE(OutputPathExists()); + + std::string state = GetSessionStateJson(); + EXPECT_TRUE(base::MatchPattern( + state, + R"({"state":3,"upload_times":[{"scenario":"TestScenario","time":"*"}]})")) + << "Actual: " << state; +} + +IN_PROC_BROWSER_TEST_F(ChromeTracingDelegateBrowserTestFromCommandLine, + IgnoreThrottle) { + // The scenario from the command-line should be started even though not + // enough time has elapsed since the last upload (set in the PRE_ above). + ASSERT_FALSE(OutputPathExists()); + + EXPECT_TRUE( + content::BackgroundTracingManager::GetInstance()->HasActiveScenario()); + // State 1 = STARTED. + std::string state = GetSessionStateJson(); + EXPECT_TRUE(base::MatchPattern( + state, + R"({"state":1,"upload_times":[{"scenario":"TestScenario","time":"*"}]})")) + << "Actual: " << state; + + // The scenario should also be "uploaded" (actually written to the output + // file). + TriggerScenarioAndWaitForOutput(); + EXPECT_TRUE(OutputPathExists()); +}
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 2465279..c4107a7a 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1338,6 +1338,9 @@ "user_education/reopen_tab_in_product_help_trigger.h", "user_education/scoped_new_badge_tracker.cc", "user_education/scoped_new_badge_tracker.h", + "user_education/tutorial/browser_tutorial_service_factory.h", + "user_education/tutorial/tutorial.cc", + "user_education/tutorial/tutorial.h", "user_education/tutorial/tutorial_bubble.h", "user_education/tutorial/tutorial_bubble_factory.cc", "user_education/tutorial/tutorial_bubble_factory.h", @@ -1346,6 +1349,12 @@ "user_education/tutorial/tutorial_description.cc", "user_education/tutorial/tutorial_description.h", "user_education/tutorial/tutorial_identifier.h", + "user_education/tutorial/tutorial_registry.cc", + "user_education/tutorial/tutorial_registry.h", + "user_education/tutorial/tutorial_service.cc", + "user_education/tutorial/tutorial_service.h", + "user_education/tutorial/tutorial_service_manager.cc", + "user_education/tutorial/tutorial_service_manager.h", "views/eye_dropper/eye_dropper.cc", "views/eye_dropper/eye_dropper.h", "views/eye_dropper/eye_dropper_view.cc", @@ -4502,6 +4511,7 @@ "views/translate/translate_icon_view.h", "views/update_recommended_message_box.cc", "views/update_recommended_message_box.h", + "views/user_education/browser_tutorial_service_factory.cc", "views/user_education/feature_promo_bubble_owner.cc", "views/user_education/feature_promo_bubble_owner.h", "views/user_education/feature_promo_bubble_owner_impl.cc", @@ -4520,6 +4530,8 @@ "views/user_education/new_badge_label.h", "views/user_education/tip_marquee_view.cc", "views/user_education/tip_marquee_view.h", + "views/user_education/tutorial_bubble_factory_views.cc", + "views/user_education/tutorial_bubble_factory_views.h", "views/web_apps/frame_toolbar/web_app_content_settings_container.cc", "views/web_apps/frame_toolbar/web_app_content_settings_container.h", "views/web_apps/frame_toolbar/web_app_frame_toolbar_utils.cc",
diff --git a/chrome/browser/ui/android/night_mode/BUILD.gn b/chrome/browser/ui/android/night_mode/BUILD.gn index 150ad8d..4ed4332 100644 --- a/chrome/browser/ui/android/night_mode/BUILD.gn +++ b/chrome/browser/ui/android/night_mode/BUILD.gn
@@ -38,6 +38,7 @@ "//third_party/androidx:androidx_annotation_annotation_java", "//third_party/androidx:androidx_preference_preference_java", "//ui/android:ui_utils_java", + "//url:gurl_java", ] resources_package = "org.chromium.chrome.browser.night_mode" }
diff --git a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeController.java b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeController.java index d3ab981..3bbcd26 100644 --- a/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeController.java +++ b/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeController.java
@@ -12,8 +12,10 @@ import org.chromium.chrome.browser.preferences.Pref; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge; +import org.chromium.components.content_settings.ContentSettingValues; import org.chromium.components.content_settings.ContentSettingsType; import org.chromium.components.user_prefs.UserPrefs; +import org.chromium.url.GURL; /** * A controller class could enable or disable web content dark mode feature based on the night mode @@ -49,6 +51,29 @@ return sController; } + public static boolean isEnabledForUrl(Profile profile, GURL url) { + @ContentSettingValues + int contentSetting = WebsitePreferenceBridge.getContentSetting( + profile, ContentSettingsType.AUTO_DARK_WEB_CONTENT, url, url); + return contentSetting != ContentSettingValues.BLOCK; + } + + public static void setEnabledForUrl(Profile profile, GURL url, boolean enabled) { + // This is only called when a user disables/enables the feature for a site from the app + // menu. The app menu item should only be visible (and thus clickable) if Auto Dark is + // enabled. If it is enabled, the default content setting should be ALLOW. + assert WebsitePreferenceBridge.getDefaultContentSetting( + profile, ContentSettingsType.AUTO_DARK_WEB_CONTENT) + == ContentSettingValues.ALLOW; + + @ContentSettingValues + int contentSettingValue = + enabled ? ContentSettingValues.DEFAULT : ContentSettingValues.BLOCK; + + WebsitePreferenceBridge.setContentSettingDefaultScope( + profile, ContentSettingsType.AUTO_DARK_WEB_CONTENT, url, url, contentSettingValue); + } + /** * Enable or disable the global user settings for auto dark mode. If the global settings is * enabled, the web contents will be darkened by default if Chrome is in dark mode.
diff --git a/chrome/browser/ui/android/strings/android_chrome_strings.grd b/chrome/browser/ui/android/strings/android_chrome_strings.grd index 1e1b8329..fa81c65 100644 --- a/chrome/browser/ui/android/strings/android_chrome_strings.grd +++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3237,6 +3237,13 @@ <message name="IDS_MENU_REQUEST_DESKTOP_SITE_OFF" desc="Accessibility description for when Request Desktop Site is disabled."> Turn on Request desktop site </message> + <!-- TODO(https://crbug.com/1248537): Update the placeholders. --> + <message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS_ON" translateable="false" desc="Accessibility description for when auto darken web content is enabled. [CHAR_LIMIT=27]"> + Disable Auto-Dark for site + </message> + <message name="IDS_MENU_AUTO_DARK_WEB_CONTENTS_OFF" translateable="false" desc="Accessibility description for when auto darken web content is disabled. [CHAR_LIMIT=27]"> + Enable Auto-Dark for site + </message> <message name="IDS_MENU_READER_MODE_PREFS" desc="Menu item to show reader mode preferences pane, which allows users to change the appearance (font size, theme, etc.) of the page. [CHAR_LIMIT=27]"> Appearance </message>
diff --git a/chrome/browser/ui/ash/system_tray_client_impl.cc b/chrome/browser/ui/ash/system_tray_client_impl.cc index e7b00868..d9ce6e8 100644 --- a/chrome/browser/ui/ash/system_tray_client_impl.cc +++ b/chrome/browser/ui/ash/system_tray_client_impl.cc
@@ -301,12 +301,8 @@ } void SystemTrayClientImpl::ShowBluetoothPairingDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) { - if (chromeos::BluetoothPairingDialog::ShowDialog(address, name_for_display, - paired, connected)) { + absl::optional<base::StringPiece> device_address) { + if (chromeos::BluetoothPairingDialog::ShowDialog(device_address)) { base::RecordAction( base::UserMetricsAction("StatusArea_Bluetooth_Connect_Unknown")); }
diff --git a/chrome/browser/ui/ash/system_tray_client_impl.h b/chrome/browser/ui/ash/system_tray_client_impl.h index d824de7..b73c2f5 100644 --- a/chrome/browser/ui/ash/system_tray_client_impl.h +++ b/chrome/browser/ui/ash/system_tray_client_impl.h
@@ -7,9 +7,11 @@ #include "ash/public/cpp/system_tray_client.h" #include "base/macros.h" +#include "base/strings/string_piece.h" #include "chrome/browser/ash/system/system_clock_observer.h" #include "chrome/browser/upgrade_detector/upgrade_observer.h" #include "components/policy/core/common/cloud/cloud_policy_store.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace ash { struct LocaleInfo; @@ -61,10 +63,8 @@ // ash::SystemTrayClient: void ShowSettings(int64_t display_id) override; void ShowBluetoothSettings() override; - void ShowBluetoothPairingDialog(const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) override; + void ShowBluetoothPairingDialog( + absl::optional<base::StringPiece> device_address) override; void ShowDateSettings() override; void ShowSetTimeDialog() override; void ShowDisplaySettings() override;
diff --git a/chrome/browser/ui/browser_instant_controller_unittest.cc b/chrome/browser/ui/browser_instant_controller_unittest.cc index 4010537..62714da 100644 --- a/chrome/browser/ui/browser_instant_controller_unittest.cc +++ b/chrome/browser/ui/browser_instant_controller_unittest.cc
@@ -16,8 +16,11 @@ #include "chrome/browser/search/instant_service.h" #include "chrome/browser/search/instant_unittest_base.h" #include "chrome/browser/search/search.h" +#include "chrome/browser/signin/chrome_signin_client_factory.h" +#include "chrome/browser/signin/chrome_signin_client_test_util.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/url_constants.h" +#include "chrome/test/base/testing_profile.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/reload_type.h" #include "content/public/browser/render_frame_host.h" @@ -33,6 +36,13 @@ class BrowserInstantControllerTest : public InstantUnitTestBase { protected: friend class FakeWebContentsObserver; + + // BrowserWithTestWindowTest: + TestingProfile::TestingFactories GetTestingFactories() override { + return {{ChromeSigninClientFactory::GetInstance(), + base::BindRepeating(&BuildChromeSigninClientWithURLLoader, + test_url_loader_factory())}}; + } }; struct TabReloadTestCase {
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.cc b/chrome/browser/ui/hung_plugin_tab_helper.cc index b287deb..60daf3624 100644 --- a/chrome/browser/ui/hung_plugin_tab_helper.cc +++ b/chrome/browser/ui/hung_plugin_tab_helper.cc
@@ -21,37 +21,9 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/child_process_data.h" #include "content/public/browser/plugin_service.h" -#include "content/public/common/content_features.h" #include "content/public/common/process_type.h" #include "content/public/common/result_codes.h" -namespace { - -// Called on the process thread to actually kill the plugin with the given child -// ID. We specifically don't want this to be a member function since if the -// user chooses to kill the plugin, we want to kill it even if they close the -// tab first. -// -// Be careful with the child_id. It's supplied by the renderer which might be -// hacked. -void KillPluginOnProcessThread(int child_id) { - content::BrowserChildProcessHostIterator iter( - content::PROCESS_TYPE_PPAPI_PLUGIN); - while (!iter.Done()) { - const content::ChildProcessData& data = iter.GetData(); - if (data.id == child_id) { - CrashDumpHungChildProcess(data.GetProcess().Handle()); - data.GetProcess().Terminate(content::RESULT_CODE_HUNG, false); - return; - } - ++iter; - } - // Ignore the case where we didn't find the plugin, it may have terminated - // before this function could run. -} - -} // namespace - // HungPluginTabHelper::PluginState ------------------------------------------- // Per-plugin state (since there could be more than one plugin hung). The @@ -167,12 +139,21 @@ } void HungPluginTabHelper::KillPlugin(int child_id) { - if (base::FeatureList::IsEnabled(features::kProcessHostOnUI)) { - KillPluginOnProcessThread(child_id); - } else { - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, base::BindOnce(&KillPluginOnProcessThread, child_id)); + // Be careful with the child_id. It's supplied by the renderer which might be + // hacked. + content::BrowserChildProcessHostIterator iter( + content::PROCESS_TYPE_PPAPI_PLUGIN); + while (!iter.Done()) { + const content::ChildProcessData& data = iter.GetData(); + if (data.id == child_id) { + CrashDumpHungChildProcess(data.GetProcess().Handle()); + data.GetProcess().Terminate(content::RESULT_CODE_HUNG, false); + return; + } + ++iter; } + // Ignore the case where we didn't find the plugin, it may have terminated + // before this function could run. } HungPluginTabHelper::HungPluginTabHelper(content::WebContents* contents)
diff --git a/chrome/browser/ui/tabs/tab_menu_model.cc b/chrome/browser/ui/tabs/tab_menu_model.cc index bd39998e..4149ef02 100644 --- a/chrome/browser/ui/tabs/tab_menu_model.cc +++ b/chrome/browser/ui/tabs/tab_menu_model.cc
@@ -74,6 +74,7 @@ AddItem(TabStripModel::CommandAddToNewGroup, l10n_util::GetPluralStringFUTF16( IDS_TAB_CXMENU_ADD_TAB_TO_NEW_GROUP, num_tabs)); + SetElementIdentifierAt(GetItemCount() - 1, kAddToNewGroupItemIdentifier); if (base::FeatureList::IsEnabled(features::kTabGroupsNewBadgePromo)) SetIsNewFeatureAt(GetItemCount() - 1, true); } @@ -159,3 +160,6 @@ AddItemWithStringId(TabStripModel::CommandCloseTabsToRight, IDS_TAB_CXMENU_CLOSETABSTORIGHT); } + +DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabMenuModel, + kAddToNewGroupItemIdentifier);
diff --git a/chrome/browser/ui/tabs/tab_menu_model.h b/chrome/browser/ui/tabs/tab_menu_model.h index 7b78e0c1..1c21334b 100644 --- a/chrome/browser/ui/tabs/tab_menu_model.h +++ b/chrome/browser/ui/tabs/tab_menu_model.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_TABS_TAB_MENU_MODEL_H_ #include "chrome/browser/ui/send_tab_to_self/send_tab_to_self_sub_menu_model.h" +#include "ui/base/interaction/element_identifier.h" #include "ui/base/models/simple_menu_model.h" class TabStripModel; @@ -33,6 +34,9 @@ TabMenuModel& operator=(const TabMenuModel&) = delete; ~TabMenuModel() override; + DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabMenuModel, + kAddToNewGroupItemIdentifier); + private: void Build(TabStripModel* tab_strip, int index);
diff --git a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate_unittest.cc b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate_unittest.cc index 300632b..5f1319ff2 100644 --- a/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate_unittest.cc +++ b/chrome/browser/ui/toolbar/chrome_location_bar_model_delegate_unittest.cc
@@ -9,12 +9,15 @@ #include "base/test/scoped_feature_list.h" #include "chrome/browser/search/search.h" #include "chrome/browser/search_engines/template_url_service_factory.h" +#include "chrome/browser/signin/chrome_signin_client_factory.h" +#include "chrome/browser/signin/chrome_signin_client_test_util.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/search_test_utils.h" +#include "chrome/test/base/testing_profile.h" #include "components/search_engines/template_url_service.h" // Concrete implementation of ChromeLocationBarModelDelegate. @@ -93,6 +96,13 @@ TestChromeLocationBarModelDelegate* delegate() { return delegate_.get(); } + // BrowserWithTestWindowTest: + TestingProfile::TestingFactories GetTestingFactories() override { + return {{ChromeSigninClientFactory::GetInstance(), + base::BindRepeating(&BuildChromeSigninClientWithURLLoader, + test_url_loader_factory())}}; + } + private: base::test::ScopedFeatureList scoped_feature_list_; std::unique_ptr<TestChromeLocationBarModelDelegate> delegate_;
diff --git a/chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h b/chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h new file mode 100644 index 0000000..71d6a2b --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h
@@ -0,0 +1,73 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_BROWSER_TUTORIAL_SERVICE_FACTORY_H_ +#define CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_BROWSER_TUTORIAL_SERVICE_FACTORY_H_ + +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/interaction/element_identifier.h" + +// TODO (dpenning): Move this file into views code and instantiate the factory +// from views framework code. + +namespace base { +template <typename T> +struct DefaultSingletonTraits; +} // namespace base + +namespace content { +class BrowserContext; +} // namespace content + +class Profile; + +class TutorialService; + +// A factory to create a unique TutorialService. +class BrowserTutorialServiceFactory : public BrowserContextKeyedServiceFactory { + public: + static TutorialService* GetForProfile(Profile* profile); + + // Gets the lazy singleton instance of the Factory. + static BrowserTutorialServiceFactory* GetInstance(); + + // In some cases it is not possible to get a browser based element context + // without going through the browser view from the profile. Since the + // implenentations of the frameworks should not be exposed to the systems + // building the tutorials, this method is provided to return an element + // context. + static ui::ElementContext GetDefaultElementContextForProfile( + Profile* profile); + + // Disallow copy/assign. + BrowserTutorialServiceFactory(const BrowserTutorialServiceFactory&) = delete; + BrowserTutorialServiceFactory& operator=( + const BrowserTutorialServiceFactory&) = delete; + + void RegisterBubbleFactories(); + + private: + friend struct base::DefaultSingletonTraits<BrowserTutorialServiceFactory>; + + BrowserTutorialServiceFactory(); + ~BrowserTutorialServiceFactory() override; + + // BrowserContextKeyedServiceFactory overrides. + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; + + bool registered_bubble_factories_ = false; +}; + +class BrowserTutorialRegistry : public TutorialRegistry { + public: + void RegisterTutorials() override; +}; + +#endif // CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_BROWSER_TUTORIAL_SERVICE_FACTORY_H_
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial.cc b/chrome/browser/ui/user_education/tutorial/tutorial.cc new file mode 100644 index 0000000..eb03fda --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial.cc
@@ -0,0 +1,214 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" + +#include "base/bind.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_description.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/base/interaction/element_tracker.h" + +Tutorial::StepBuilder::StepBuilder() + : step_builder_(std::make_unique<ui::InteractionSequence::StepBuilder>()) {} +Tutorial::StepBuilder::~StepBuilder() = default; + +// static +std::unique_ptr<ui::InteractionSequence::Step> +Tutorial::StepBuilder::BuildFromDescriptionStep( + TutorialDescription::Step step, + absl::optional<std::pair<int, int>> progress, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry) { + Tutorial::StepBuilder step_builder; + + step_builder.SetAnchorElementID(step.element_id) + .SetTitleText(step.title_text) + .SetBodyText(step.body_text) + .SetStepType(step.step_type) + .SetProgress(progress) + .SetArrow(step.arrow); + + return step_builder.Build(tutorial_service, bubble_factory_registry); +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetAnchorElementID( + ui::ElementIdentifier element_id_) { + step_builder_->SetElementID(element_id_); + return *this; +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetTitleText( + absl::optional<std::u16string> title_text_) { + this->title_text = title_text_; + return *this; +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetBodyText( + absl::optional<std::u16string> body_text_) { + this->body_text = body_text_; + return *this; +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetStepType( + ui::InteractionSequence::StepType step_type_) { + step_builder_->SetType(step_type_); + return *this; +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetProgress( + absl::optional<std::pair<int, int>> progress_) { + this->progress = progress_; + return *this; +} + +Tutorial::StepBuilder& Tutorial::StepBuilder::SetArrow( + TutorialDescription::Step::Arrow arrow_) { + this->arrow = arrow_; + return *this; +} + +std::unique_ptr<ui::InteractionSequence::Step> Tutorial::StepBuilder::Build( + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry) { + step_builder_->SetStartCallback( + BuildShowBubbleCallback(tutorial_service, bubble_factory_registry)); + step_builder_->SetEndCallback(BuildHideBubbleCallback(tutorial_service)); + + return step_builder_->Build(); +} + +ui::InteractionSequence::StepCallback +Tutorial::StepBuilder::BuildShowBubbleCallback( + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry) { + return base::BindOnce( + [](TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry, + absl::optional<std::u16string> title_text_, + absl::optional<std::u16string> body_text_, + TutorialDescription::Step::Arrow arrow_, + absl::optional<std::pair<int, int>> progress_, + ui::TrackedElement* element, ui::ElementIdentifier element_id, + ui::InteractionSequence::StepType step_type) { + DCHECK(tutorial_service); + DCHECK(bubble_factory_registry); + + std::unique_ptr<TutorialBubble> bubble = + bubble_factory_registry->CreateBubbleForTrackedElement( + element, title_text_, body_text_, arrow_, progress_); + tutorial_service->SetCurrentBubble(std::move(bubble)); + }, + base::Unretained(tutorial_service), + base::Unretained(bubble_factory_registry), title_text, body_text, arrow, + progress); +} + +ui::InteractionSequence::StepCallback +Tutorial::StepBuilder::BuildHideBubbleCallback( + TutorialService* tutorial_service) { + return base::BindOnce( + [](TutorialService* tutorial_service, ui::TrackedElement* element, + ui::ElementIdentifier element_id, + ui::InteractionSequence::StepType step_type) { + tutorial_service->HideCurrentBubbleIfShowing(); + }, + base::Unretained(tutorial_service)); +} + +Tutorial::Builder::Builder() + : builder_(std::make_unique<ui::InteractionSequence::Builder>()) {} +Tutorial::Builder::~Builder() = default; + +// static +std::unique_ptr<Tutorial> Tutorial::Builder::BuildFromDescription( + TutorialDescription description, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry, + ui::ElementContext context) { + Tutorial::Builder builder; + builder.SetContext(context); + + int visible_step_count = 0; + for (const auto& step : description.steps) { + if (step.ShouldShowBubble()) + visible_step_count++; + } + DCHECK(visible_step_count > 0); + + int current_step = 0; + for (const auto& step : description.steps) { + builder.AddStep(Tutorial::StepBuilder::BuildFromDescriptionStep( + step, std::pair<int, int>(current_step, visible_step_count), + tutorial_service, bubble_factory_registry)); + if (step.ShouldShowBubble()) + current_step++; + } + DCHECK(visible_step_count == current_step); + + builder.SetAbortedCallback(base::BindOnce( + [](TutorialService* tutorial_service, ui::TrackedElement* last_element, + ui::ElementIdentifier last_id, + ui::InteractionSequence::StepType last_step_type, + ui::InteractionSequence::AbortedReason aborted_reason) { + tutorial_service->AbortTutorial(); + }, + tutorial_service)); + + builder.SetCompletedCallback(base::BindOnce( + [](TutorialService* tutorial_service) { + tutorial_service->CompleteTutorial(); + }, + tutorial_service)); + + return builder.Build(); +} + +Tutorial::Builder& Tutorial::Builder::AddStep( + std::unique_ptr<ui::InteractionSequence::Step> step) { + builder_->AddStep(std::move(step)); + return *this; +} + +Tutorial::Builder& Tutorial::Builder::SetAbortedCallback( + ui::InteractionSequence::AbortedCallback callback) { + builder_->SetAbortedCallback(std::move(callback)); + return *this; +} + +Tutorial::Builder& Tutorial::Builder::SetCompletedCallback( + ui::InteractionSequence::CompletedCallback callback) { + builder_->SetCompletedCallback(std::move(callback)); + return *this; +} + +Tutorial::Builder& Tutorial::Builder::SetContext( + ui::ElementContext element_context) { + builder_->SetContext(element_context); + return *this; +} + +std::unique_ptr<Tutorial> Tutorial::Builder::Build() { + return absl::WrapUnique(new Tutorial(builder_->Build())); +} + +Tutorial::Tutorial( + std::unique_ptr<ui::InteractionSequence> interaction_sequence) + : interaction_sequence_(std::move(interaction_sequence)) {} +Tutorial::~Tutorial() = default; + +void Tutorial::Start() { + DCHECK(interaction_sequence_); + if (interaction_sequence_) + interaction_sequence_->Start(); +} + +void Tutorial::Abort() { + if (interaction_sequence_) + interaction_sequence_.reset(); +}
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial.h b/chrome/browser/ui/user_education/tutorial/tutorial.h new file mode 100644 index 0000000..617d415e --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial.h
@@ -0,0 +1,125 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_H_ +#define CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_H_ + +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_description.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/base/interaction/element_tracker.h" +#include "ui/base/interaction/interaction_sequence.h" + +class TutorialService; + +// Tutorials are a user initiated IPH which spans 1 or more Interactions. +// It utilizes the InteractionSequence Framework to provide a tracked list of +// interactions with tracked elements. +// +// Each tutorial consists of a list of InteractionSequence steps which, in the +// default case, create a TutorialBubble which is implementation specific to +// the platform the tutorial is written for. It is possible to create custom +// InteractionSequenceSteps when using the traditional constructor and not +// using the TutorialStepBuilder. +// +// Because of implementation details in InteractionSequence, a tutorial can only +// be run once, see documentation for InteractionSequence. +// +// Basic tutorials use a TutorialDescription struct and the +// Builder::BuildFromDescription method to construct the tutorial. +// +// the end user of a Tutorial would define a tutorial description in a +// TutorialRegistry, for the platform the tutorial is implemented on. (see +// BrowserTutorialServiceFactory) +// +// TODO: Provide an in-depth readme.md for tutorials +// +class Tutorial { + public: + ~Tutorial(); + + class StepBuilder : public TutorialDescription::Step { + public: + StepBuilder(); + ~StepBuilder(); + + static std::unique_ptr<ui::InteractionSequence::Step> + BuildFromDescriptionStep( + TutorialDescription::Step step, + absl::optional<std::pair<int, int>> progress, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry); + + StepBuilder& SetAnchorElementID(ui::ElementIdentifier anchor_element_); + StepBuilder& SetTitleText(absl::optional<std::u16string> title_text_); + StepBuilder& SetBodyText(absl::optional<std::u16string> body_text_); + StepBuilder& SetStepType(ui::InteractionSequence::StepType step_type_); + StepBuilder& SetProgress(absl::optional<std::pair<int, int>> progress_); + StepBuilder& SetArrow(TutorialDescription::Step::Arrow arrow_); + + std::unique_ptr<ui::InteractionSequence::Step> Build( + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry); + + private: + absl::optional<std::pair<int, int>> progress; + ui::InteractionSequence::StepCallback BuildShowBubbleCallback( + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry); + ui::InteractionSequence::StepCallback BuildHideBubbleCallback( + TutorialService* tutorial_service); + + std::unique_ptr<ui::InteractionSequence::StepBuilder> step_builder_; + }; + + class Builder { + public: + Builder(); + ~Builder(); + + static std::unique_ptr<Tutorial> BuildFromDescription( + TutorialDescription description, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry, + ui::ElementContext context); + + Builder(const Builder& other) = delete; + void operator=(Builder& other) = delete; + + Builder& AddStep(std::unique_ptr<ui::InteractionSequence::Step> step); + Builder& SetContext(ui::ElementContext element_context); + + Builder& SetAbortedCallback( + ui::InteractionSequence::AbortedCallback callback); + Builder& SetCompletedCallback( + ui::InteractionSequence::CompletedCallback callback); + + std::unique_ptr<Tutorial> Build(); + + private: + std::unique_ptr<ui::InteractionSequence::Builder> builder_; + }; + + // Starts the Tutorial. has the same constraints as + // InteractionSequence::Start. + void Start(); + + // Cancels the Tutorial. Calls the destructor of the InteractionSequence, + // calling the abort callback if necessary. + void Abort(); + + private: + // Tutorial Constructor that takes an InteractionSequence. Should only be + // used in cases where custom step logic must be called + explicit Tutorial( + std::unique_ptr<ui::InteractionSequence> interaction_sequence); + + // The Interaction Sequence which controls the tutorial bubbles opening and + // closing + std::unique_ptr<ui::InteractionSequence> interaction_sequence_; +}; + +#endif // CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_H_
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_bubble.h b/chrome/browser/ui/user_education/tutorial/tutorial_bubble.h index 6e48647..1434a2a 100644 --- a/chrome/browser/ui/user_education/tutorial/tutorial_bubble.h +++ b/chrome/browser/ui/user_education/tutorial/tutorial_bubble.h
@@ -9,6 +9,7 @@ // it is implemented by a framework's bubble. It is returned as the result of // TutorialBubbleFactory's CreateBubble method. struct TutorialBubble { + TutorialBubble() = default; TutorialBubble(const TutorialBubble&) = delete; TutorialBubble& operator=(const TutorialBubble&) = delete; virtual ~TutorialBubble() = default;
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.cc b/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.cc index 0e8d955..8adb04f 100644 --- a/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.cc +++ b/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.cc
@@ -19,7 +19,7 @@ } std::unique_ptr<TutorialBubble> -TutorialBubbleFactoryRegistry::GetBubbleForTrackedElement( +TutorialBubbleFactoryRegistry::CreateBubbleForTrackedElement( ui::TrackedElement* element, absl::optional<std::u16string> title_text, absl::optional<std::u16string> body_text,
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h b/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h index 85f25f82..482e90e 100644 --- a/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h +++ b/chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h
@@ -29,7 +29,7 @@ // gets the correct bubble factory for a given element if none are found a // nullptr is returned. - std::unique_ptr<TutorialBubble> GetBubbleForTrackedElement( + std::unique_ptr<TutorialBubble> CreateBubbleForTrackedElement( ui::TrackedElement* element, absl::optional<std::u16string> title_text, absl::optional<std::u16string> body_text,
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_description.cc b/chrome/browser/ui/user_education/tutorial/tutorial_description.cc index b43932ba..ac4375d 100644 --- a/chrome/browser/ui/user_education/tutorial/tutorial_description.cc +++ b/chrome/browser/ui/user_education/tutorial/tutorial_description.cc
@@ -28,7 +28,7 @@ TutorialDescription::Step::Step(const TutorialDescription::Step& description) = default; -bool TutorialDescription::Step::Step::ShouldShowBubble() { +bool TutorialDescription::Step::Step::ShouldShowBubble() const { return (element_id && step_type != ui::InteractionSequence::StepType::kHidden && (title_text || body_text));
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_description.h b/chrome/browser/ui/user_education/tutorial/tutorial_description.h index 057f6dde..8180ef99 100644 --- a/chrome/browser/ui/user_education/tutorial/tutorial_description.h +++ b/chrome/browser/ui/user_education/tutorial/tutorial_description.h
@@ -26,9 +26,9 @@ NONE, TOP, BOTTOM, - TOP_HORIZ, - CENTER_HORIZ, - BOTTOM_HORIZ, + TOP_HORIZONTAL, + CENTER_HORIZONTAL, + BOTTOM_HORIZONTAL, }; Step(); @@ -56,7 +56,7 @@ // returns true iff all of the required parameters exist to display a // bubble. - bool ShouldShowBubble(); + bool ShouldShowBubble() const; }; // the list of TutorialDescription steps
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_registry.cc b/chrome/browser/ui/user_education/tutorial/tutorial_registry.cc new file mode 100644 index 0000000..7c95ac86 --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_registry.cc
@@ -0,0 +1,46 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/tutorial_registry.h" + +#include <memory> +#include <vector> + +#include "base/no_destructor.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_description.h" + +TutorialRegistry::TutorialRegistry() = default; +TutorialRegistry::~TutorialRegistry() = default; + +std::unique_ptr<Tutorial> TutorialRegistry::CreateTutorial( + TutorialIdentifier id, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry, + ui::ElementContext context) { + DCHECK(tutorial_registry_.size() > 0); + auto pair = tutorial_registry_.find(id); + if (pair == tutorial_registry_.end()) { + return nullptr; + } + return Tutorial::Builder::BuildFromDescription( + pair->second, tutorial_service, bubble_factory_registry, context); +} + +const std::vector<TutorialIdentifier> +TutorialRegistry::GetTutorialIdentifiers() { + DCHECK(tutorial_registry_.size() > 0); + std::vector<TutorialIdentifier> id_strings; + std::transform(tutorial_registry_.begin(), tutorial_registry_.end(), + std::back_inserter(id_strings), + [](const auto& pair) { return pair.first; }); + return id_strings; +} + +void TutorialRegistry::AddTutorial(TutorialIdentifier id, + TutorialDescription description) { + tutorial_registry_.insert(std::make_pair(id, description)); +} + +void TutorialRegistry::RegisterTutorials() {}
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_registry.h b/chrome/browser/ui/user_education/tutorial/tutorial_registry.h new file mode 100644 index 0000000..024e35fb --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_registry.h
@@ -0,0 +1,51 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_REGISTRY_H_ +#define CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_REGISTRY_H_ + +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_identifier.h" + +class Tutorial; + +// A TutorialRegistry is a Map of TutorialIdentifier to TutorialDescription. +// TutorialDescriptions should be added to the registry by subclassing the +// registry and overriding the RegisterTutorials method. +class TutorialRegistry { + public: + TutorialRegistry(); + virtual ~TutorialRegistry(); + TutorialRegistry(const TutorialRegistry&) = delete; + TutorialRegistry& operator=(const TutorialRegistry&) = delete; + + // Returns a list of Tutorial Identifiers if the tutorial registry exists. + // If RegisterTutorials has not been called this returns an empty vector. + const std::vector<TutorialIdentifier> GetTutorialIdentifiers(); + + // Constructs the tutorial from the TutorialDescription at a given ID. + // If no TutorialIdentifier can be found that matches the ID, a nullptr + // is returned. The TutorialService is passed in order to allow Tutorials + // to be constructed with access to the BubbleOwnerRegistry. + std::unique_ptr<Tutorial> CreateTutorial( + TutorialIdentifier id, + TutorialService* tutorial_service, + TutorialBubbleFactoryRegistry* bubble_factory_registry, + ui::ElementContext context); + + // Adds tutorials to the Service, Should be called from the initialization of + // the implementations service factory. + virtual void RegisterTutorials(); + + protected: + // Adds a TutorialID, TutorialDescription Pair to the Registry. This should + // be used by the RegisterTutorials method to Add Tutorials. + void AddTutorial(TutorialIdentifier id, TutorialDescription description); + + private: + std::map<TutorialIdentifier, TutorialDescription> tutorial_registry_; +}; + +#endif // CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_REGISTRY_H_
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_service.cc b/chrome/browser/ui/user_education/tutorial/tutorial_service.cc new file mode 100644 index 0000000..53f28c8d --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_service.cc
@@ -0,0 +1,68 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" + +#include <memory> +#include <vector> + +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_identifier.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h" + +TutorialService::TutorialService( + std::unique_ptr<TutorialRegistry> tutorial_registry) + : tutorial_registry_(std::move(tutorial_registry)) {} + +TutorialService::~TutorialService() = default; + +bool TutorialService::StartTutorial(TutorialIdentifier id, + ui::ElementContext context) { + TutorialBubbleFactoryRegistry* factory_registry = + TutorialServiceManager::GetInstance()->bubble_factory_registry(); + + return StartTutorialImpl( + tutorial_registry_->CreateTutorial(id, this, factory_registry, context)); +} + +bool TutorialService::StartTutorialImpl(std::unique_ptr<Tutorial> tutorial) { + if (running_tutorial_) + return false; + + running_tutorial_ = std::move(tutorial); + running_tutorial_->Start(); + return true; +} + +void TutorialService::AbortTutorial() { + // TODO (dpenning): Add in hooks to listen for abort + running_tutorial_.reset(); +} + +void TutorialService::CompleteTutorial() { + // TODO (dpenning): Add in hooks to listen for complete + running_tutorial_.reset(); +} + +void TutorialService::SetCurrentBubble(std::unique_ptr<TutorialBubble> bubble) { + HideCurrentBubbleIfShowing(); + currently_displayed_bubble_ = std::move(bubble); +} + +void TutorialService::HideCurrentBubbleIfShowing() { + if (currently_displayed_bubble_) { + currently_displayed_bubble_.release(); + } +} + +bool TutorialService::IsRunningTutorial() const { + return running_tutorial_ != nullptr; +} + +std::vector<TutorialIdentifier> TutorialService::GetTutorialIdentifiers() + const { + return tutorial_registry_->GetTutorialIdentifiers(); +}
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_service.h b/chrome/browser/ui/user_education/tutorial/tutorial_service.h new file mode 100644 index 0000000..2d42550 --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_service.h
@@ -0,0 +1,71 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_H_ +#define CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_H_ + +#include <memory> + +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_identifier.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_registry.h" +#include "components/keyed_service/core/keyed_service.h" +#include "ui/base/interaction/element_tracker.h" + +// A non-singleton service which provides the current running tutorial, +// registries for Tutorials. A TutorialService should be constructed by a +// factory which fills in the correct tutorials based on the platform the +// tutorial targets. +class TutorialService : public KeyedService { + public: + explicit TutorialService(std::unique_ptr<TutorialRegistry> tutorial_registry); + ~TutorialService() override; + + // returns true if there is a currently running tutorial. + bool IsRunningTutorial() const; + + void SetCurrentBubble(std::unique_ptr<TutorialBubble> bubble); + + void HideCurrentBubbleIfShowing(); + + // Returns a list of Tutorial Identifiers if the tutorial registry exists. + // if there is no registry this returns an empty vector. + std::vector<TutorialIdentifier> GetTutorialIdentifiers() const; + + // Getters for the registries + TutorialRegistry* tutorial_registry() { return tutorial_registry_.get(); } + + const TutorialRegistry* tutorial_registry() const { + return tutorial_registry_.get(); + } + + // Starts the tutorial by looking for the id in the Tutorial Registry. + bool StartTutorial(TutorialIdentifier id, ui::ElementContext context); + + private: + friend class Tutorial; + + // Aborts the current running tutorial if there is one. + void AbortTutorial(); + + // Clears out the current tutorial. + // TODO (dpenning): allow for registering a callback that performs any + // IPH/other code on completion of tutorial + void CompleteTutorial(); + + // Starts the tutorial and returns true if a tutorial was started. + bool StartTutorialImpl(std::unique_ptr<Tutorial> tutorial); + + // The current running tutorial. + std::unique_ptr<Tutorial> running_tutorial_; + + // The current bubble. + std::unique_ptr<TutorialBubble> currently_displayed_bubble_; + + // The registries that provide the tutorials. + std::unique_ptr<TutorialRegistry> tutorial_registry_; +}; + +#endif // CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_H_
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.cc b/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.cc new file mode 100644 index 0000000..aa234c3 --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.cc
@@ -0,0 +1,32 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h" + +#include "build/build_config.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" + +// TODO: as more platforms are tested for reliability we will add them here. +#if defined(OS_MAC) || defined(OS_WIN) +#include "chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h" +#endif + +TutorialServiceManager::TutorialServiceManager() + : bubble_factory_registry_( + std::make_unique<TutorialBubbleFactoryRegistry>()) {} +TutorialServiceManager::~TutorialServiceManager() = default; + +TutorialServiceManager* TutorialServiceManager::GetInstance() { + return base::Singleton<TutorialServiceManager>::get(); +} + +TutorialService* TutorialServiceManager::GetTutorialServiceForProfile( + Profile* profile) { +#if defined(OS_MAC) || defined(OS_WIN) + return BrowserTutorialServiceFactory::GetForProfile(profile); +#endif +#if !defined(OS_MAC) && !defined(OS_WIN) + return nullptr; +#endif +}
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h b/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h new file mode 100644 index 0000000..75cef41 --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h
@@ -0,0 +1,37 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_MANAGER_H_ +#define CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_MANAGER_H_ + +#include "base/memory/singleton.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" + +// TutorialServiceManager is a singleton that provides the platform specific +// factory for a TutorialService. +class TutorialServiceManager { + public: + TutorialServiceManager(); + ~TutorialServiceManager(); + TutorialServiceManager(const TutorialServiceManager&) = delete; + TutorialServiceManager& operator=(const TutorialServiceManager&) = delete; + + static TutorialServiceManager* GetInstance(); + + // Returns a TutorialService which is provided by the ServiceFactory. + TutorialService* GetTutorialServiceForProfile(Profile* profile); + + // Returns the factory registry for use in the tutorial step callbacks. + TutorialBubbleFactoryRegistry* bubble_factory_registry() { + return bubble_factory_registry_.get(); + } + + private: + friend struct base::DefaultSingletonTraits<TutorialServiceManager>; + + std::unique_ptr<TutorialBubbleFactoryRegistry> bubble_factory_registry_; +}; + +#endif // CHROME_BROWSER_UI_USER_EDUCATION_TUTORIAL_TUTORIAL_SERVICE_MANAGER_H_
diff --git a/chrome/browser/ui/user_education/tutorial/tutorial_unittest.cc b/chrome/browser/ui/user_education/tutorial/tutorial_unittest.cc new file mode 100644 index 0000000..6249b1d8 --- /dev/null +++ b/chrome/browser/ui/user_education/tutorial/tutorial_unittest.cc
@@ -0,0 +1,68 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/tutorial.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_description.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_identifier.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_registry.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/base/interaction/interaction_sequence.h" + +namespace { +DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(kTestIdentifier1); +const ui::ElementContext kTestContext1(1); + +const TutorialIdentifier kTestTutorial1{"kTestTutorial1"}; +} // namespace + +class TestTutorialRegistry : public TutorialRegistry { + public: + void RegisterTutorials() override { + { + TutorialDescription description; + description.steps.emplace_back(TutorialDescription::Step( + u"title", u"description", ui::InteractionSequence::StepType::kShown, + kTestIdentifier1, TutorialDescription::Step::Arrow::NONE)); + AddTutorial(kTestTutorial1, description); + } + } +}; + +TEST(TutorialTest, TutorialBuilder) { + std::unique_ptr<TestTutorialRegistry> registry = + std::make_unique<TestTutorialRegistry>(); + registry->RegisterTutorials(); + + std::unique_ptr<TutorialBubbleFactoryRegistry> bubble_factory_registry = + std::make_unique<TutorialBubbleFactoryRegistry>(); + + std::unique_ptr<TutorialService> service = + std::make_unique<TutorialService>(std::move(registry)); + + Tutorial::Builder builder; + std::unique_ptr<ui::InteractionSequence::Step> step = + Tutorial::StepBuilder() + .SetAnchorElementID(kTestIdentifier1) + .Build(service.get(), bubble_factory_registry.get()); + + builder.SetContext(kTestContext1).AddStep(std::move(step)).Build(); +} + +TEST(TutorialTest, TutorialRegistryRegistersTutorials) { + std::unique_ptr<TestTutorialRegistry> registry = + std::make_unique<TestTutorialRegistry>(); + registry->RegisterTutorials(); + + std::unique_ptr<TutorialBubbleFactoryRegistry> bubble_factory_registry = + std::make_unique<TutorialBubbleFactoryRegistry>(); + + std::unique_ptr<TutorialService> service = + std::make_unique<TutorialService>(std::move(registry)); + + service->GetTutorialIdentifiers(); +}
diff --git a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc index 7a89683..bc360d16 100644 --- a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc +++ b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc
@@ -38,6 +38,7 @@ #include "components/tab_groups/tab_group_visual_data.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/skia/include/core/SkColor.h" +#include "ui/base/interaction/element_identifier.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/dialog_model_field.h" @@ -182,6 +183,8 @@ title_field_->SetPlaceholderText( l10n_util::GetStringUTF16(IDS_TAB_GROUP_HEADER_BUBBLE_TITLE_PLACEHOLDER)); title_field_->set_controller(&title_field_controller_); + title_field_->SetProperty(views::kElementIdentifierKey, + kEditorBubbleIdentifier); const tab_groups::TabGroupColorId initial_color_id = InitColorSet(); color_selector_ = AddChildView(std::make_unique<ColorPickerView>( @@ -473,3 +476,6 @@ BEGIN_METADATA(TabGroupEditorBubbleView, TitleField, views::Textfield) END_METADATA + +DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabGroupEditorBubbleView, + kEditorBubbleIdentifier);
diff --git a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h index d469a03..154d96b1 100644 --- a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h +++ b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h
@@ -35,6 +35,8 @@ class TabGroupEditorBubbleView : public views::BubbleDialogDelegateView { public: METADATA_HEADER(TabGroupEditorBubbleView); + DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabGroupEditorBubbleView, + kEditorBubbleIdentifier); static constexpr int TAB_GROUP_HEADER_CXMENU_SAVE_GROUP = 13; static constexpr int TAB_GROUP_HEADER_CXMENU_NEW_TAB_IN_GROUP = 14;
diff --git a/chrome/browser/ui/views/tabs/tab_group_header.cc b/chrome/browser/ui/views/tabs/tab_group_header.cc index e4ae185..3b6fb603de 100644 --- a/chrome/browser/ui/views/tabs/tab_group_header.cc +++ b/chrome/browser/ui/views/tabs/tab_group_header.cc
@@ -30,6 +30,7 @@ #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkPath.h" #include "ui/accessibility/ax_node_data.h" +#include "ui/base/interaction/element_identifier.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/canvas.h" @@ -114,6 +115,8 @@ // to contrast with the solid color. SetProperty(views::kDrawFocusRingBackgroundOutline, true); + SetProperty(views::kElementIdentifierKey, kTabGroupHeaderIdentifier); + SetEventTargeter(std::make_unique<views::ViewTargeter>(this)); last_modified_expansion_ = base::TimeTicks::Now(); @@ -495,3 +498,6 @@ views::Widget* widget) { is_open_ = false; } + +DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabGroupHeader, + kTabGroupHeaderIdentifier);
diff --git a/chrome/browser/ui/views/tabs/tab_group_header.h b/chrome/browser/ui/views/tabs/tab_group_header.h index ab01a7a5..64ffbe5 100644 --- a/chrome/browser/ui/views/tabs/tab_group_header.h +++ b/chrome/browser/ui/views/tabs/tab_group_header.h
@@ -7,6 +7,7 @@ #include "chrome/browser/ui/views/tabs/tab_slot_view.h" #include "components/tab_groups/tab_group_id.h" +#include "ui/base/interaction/element_identifier.h" #include "ui/base/metadata/metadata_header_macros.h" #include "ui/views/context_menu_controller.h" #include "ui/views/controls/focus_ring.h" @@ -29,6 +30,10 @@ public views::ViewTargeterDelegate { public: METADATA_HEADER(TabGroupHeader); + + DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabGroupHeader, + kTabGroupHeaderIdentifier); + TabGroupHeader(TabStrip* tab_strip, const tab_groups::TabGroupId& group); TabGroupHeader(const TabGroupHeader&) = delete; TabGroupHeader& operator=(const TabGroupHeader&) = delete;
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc index d421b2d..c35f1cd 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.cc +++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -72,6 +72,7 @@ #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/pathops/SkPathOps.h" #include "ui/base/clipboard/clipboard.h" +#include "ui/base/interaction/element_identifier.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/list_selection_model.h" @@ -95,6 +96,7 @@ #include "ui/views/masked_targeter_delegate.h" #include "ui/views/mouse_watcher_view_host.h" #include "ui/views/rect_based_targeting_utils.h" +#include "ui/views/view_class_properties.h" #include "ui/views/view_model_utils.h" #include "ui/views/view_observer.h" #include "ui/views/view_targeter.h" @@ -1135,6 +1137,8 @@ ThemeProperties::COLOR_TOOLBAR); Init(); SetEventTargeter(std::make_unique<views::ViewTargeter>(this)); + + SetProperty(views::kElementIdentifierKey, kTabStripIdentifier); } TabStrip::~TabStrip() { @@ -3956,3 +3960,5 @@ ADD_READONLY_PROPERTY_METADATA(int, InactiveTabWidth) ADD_READONLY_PROPERTY_METADATA(int, AvailableWidthForTabStrip) END_METADATA + +DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabStrip, kTabStripIdentifier);
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h index fc490174..8319fac 100644 --- a/chrome/browser/ui/views/tabs/tab_strip.h +++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -90,6 +90,8 @@ TabStrip& operator=(const TabStrip&) = delete; ~TabStrip() override; + DECLARE_CLASS_ELEMENT_IDENTIFIER_VALUE(TabStrip, kTabStripIdentifier); + void SetAvailableWidthCallback( base::RepeatingCallback<int()> available_width_callback);
diff --git a/chrome/browser/ui/views/user_education/browser_tutorial_service_factory.cc b/chrome/browser/ui/views/user_education/browser_tutorial_service_factory.cc new file mode 100644 index 0000000..b27a214 --- /dev/null +++ b/chrome/browser/ui/views/user_education/browser_tutorial_service_factory.cc
@@ -0,0 +1,105 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h" + +#include "base/memory/singleton.h" +#include "build/build_config.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/tabs/tab_menu_model.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h" +#include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h" +#include "chrome/browser/ui/views/tabs/tab_strip.h" +#include "chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.h" +#include "chrome/common/chrome_constants.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "content/public/browser/browser_context.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/views/interaction/element_tracker_views.h" + +// static +BrowserTutorialServiceFactory* BrowserTutorialServiceFactory::GetInstance() { + BrowserTutorialServiceFactory* factory = + base::Singleton<BrowserTutorialServiceFactory>::get(); + factory->RegisterBubbleFactories(); + return factory; +} + +// static +TutorialService* BrowserTutorialServiceFactory::GetForProfile( + Profile* profile) { + return static_cast<TutorialService*>( + GetInstance()->GetServiceForBrowserContext(profile, true)); +} + +BrowserTutorialServiceFactory::BrowserTutorialServiceFactory() + : BrowserContextKeyedServiceFactory( + "TutorialService", + BrowserContextDependencyManager::GetInstance()) {} +BrowserTutorialServiceFactory::~BrowserTutorialServiceFactory() = default; + +KeyedService* BrowserTutorialServiceFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + std::unique_ptr<TutorialRegistry> tutorial_registry = + std::make_unique<BrowserTutorialRegistry>(); + tutorial_registry->RegisterTutorials(); + + std::unique_ptr<TutorialBubbleFactoryRegistry> bubble_owner_registry = + std::make_unique<TutorialBubbleFactoryRegistry>(); + + TutorialService* service = new TutorialService(std::move(tutorial_registry)); + + return service; +} + +void BrowserTutorialServiceFactory::RegisterBubbleFactories() { + if (registered_bubble_factories_) + return; + + TutorialServiceManager::GetInstance() + ->bubble_factory_registry() + ->RegisterBubbleFactory(std::make_unique<TutorialBubbleFactoryViews>()); + + registered_bubble_factories_ = true; +} + +// static +ui::ElementContext +BrowserTutorialServiceFactory::GetDefaultElementContextForProfile( + Profile* profile) { + Browser* const browser = chrome::FindBrowserWithProfile(profile); + DCHECK(browser); + if (!browser) + return ui::ElementContext(); + + BrowserView* const browser_view = + BrowserView::GetBrowserViewForBrowser(browser); + DCHECK(browser_view); + if (!browser_view) + return ui::ElementContext(); + return views::ElementTrackerViews::GetContextForView(browser_view); +} + +void BrowserTutorialRegistry::RegisterTutorials() { + { + TutorialDescription* description = new TutorialDescription(); + TutorialDescription::Step step1( + absl::nullopt, + u"Right Click on a Tab and select \"Add Tab To new Group\".", + ui::InteractionSequence::StepType::kShown, + TabStrip::kTabStripIdentifier, TutorialDescription::Step::Arrow::TOP); + description->steps.emplace_back(step1); + + TutorialDescription::Step step2( + absl::nullopt, u"Select \"Enter a name for your Tab Group\".", + ui::InteractionSequence::StepType::kShown, + TabGroupEditorBubbleView::kEditorBubbleIdentifier, + TutorialDescription::Step::Arrow::CENTER_HORIZONTAL); + description->steps.emplace_back(step2); + + AddTutorial("Tab Group Tutorial", *description); + } +}
diff --git a/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.cc b/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.cc new file mode 100644 index 0000000..f26ef9b --- /dev/null +++ b/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.cc
@@ -0,0 +1,91 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.h" + +#include <memory> + +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/views/frame/browser_view.h" +#include "chrome/browser/ui/views/user_education/feature_promo_bubble_owner_impl.h" +#include "chrome/browser/ui/views/user_education/feature_promo_bubble_params.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/interaction/element_tracker.h" +#include "ui/views/interaction/element_tracker_views.h" + +TutorialBubbleViews::TutorialBubbleViews(absl::optional<base::Token> bubble_id) + : bubble_id_(bubble_id) {} + +TutorialBubbleViews::~TutorialBubbleViews() { + FeaturePromoBubbleOwnerImpl* owner_impl = + FeaturePromoBubbleOwnerImpl::GetInstance(); + if (bubble_id_ && owner_impl->BubbleIsShowing(bubble_id_.value())) { + owner_impl->CloseBubble(bubble_id_.value()); + } +} + +TutorialBubbleFactoryViews::TutorialBubbleFactoryViews() = default; +TutorialBubbleFactoryViews::~TutorialBubbleFactoryViews() = default; + +std::unique_ptr<TutorialBubble> TutorialBubbleFactoryViews::CreateBubble( + ui::TrackedElement* element, + absl::optional<std::u16string> title_text, + absl::optional<std::u16string> body_text, + TutorialDescription::Step::Arrow arrow, + absl::optional<std::pair<int, int>> progress) { + if (!element->IsA<views::TrackedElementViews>()) + return nullptr; + + views::View* view = element->AsA<views::TrackedElementViews>()->view(); + + FeaturePromoBubbleOwnerImpl* owner_impl = + FeaturePromoBubbleOwnerImpl::GetInstance(); + + FeaturePromoBubbleView::CreateParams params; + if (body_text) { + params.body_text = body_text.value(); + params.screenreader_text = body_text.value(); + } + params.anchor_view = view; + if (title_text) + params.title_text = title_text.value(); + if (progress) { + params.tutorial_progress_current = progress->first; + params.tutorial_progress_max = progress->second; + } + + switch (arrow) { + case TutorialDescription::Step::Arrow::TOP: + params.arrow = views::BubbleBorder::Arrow::TOP_CENTER; + break; + case TutorialDescription::Step::Arrow::BOTTOM: + params.arrow = views::BubbleBorder::Arrow::BOTTOM_CENTER; + break; + + // TODO read RTL State to choose direction + case TutorialDescription::Step::Arrow::TOP_HORIZONTAL: + params.arrow = views::BubbleBorder::Arrow::LEFT_TOP; + break; + case TutorialDescription::Step::Arrow::CENTER_HORIZONTAL: + params.arrow = views::BubbleBorder::Arrow::LEFT_CENTER; + break; + case TutorialDescription::Step::Arrow::BOTTOM_HORIZONTAL: + params.arrow = views::BubbleBorder::Arrow::LEFT_BOTTOM; + break; + + // in some cases we wont be able to place the arrow (Mac Menus) + case TutorialDescription::Step::Arrow::NONE: + params.arrow = views::BubbleBorder::Arrow::NONE; + break; + } + + return std::make_unique<TutorialBubbleViews>( + owner_impl->ShowBubble(std::move(params), base::BindOnce([] {}))); +} + +bool TutorialBubbleFactoryViews::CanBuildBubbleForTrackedElement( + ui::TrackedElement* element) { + return element->IsA<views::TrackedElementViews>(); +}
diff --git a/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.h b/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.h new file mode 100644 index 0000000..26bc785 --- /dev/null +++ b/chrome/browser/ui/views/user_education/tutorial_bubble_factory_views.h
@@ -0,0 +1,37 @@ +// Copyright 2020 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_TUTORIAL_BUBBLE_FACTORY_VIEWS_H_ +#define CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_TUTORIAL_BUBBLE_FACTORY_VIEWS_H_ + +#include "base/token.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_bubble_factory.h" +#include "third_party/abseil-cpp/absl/types/optional.h" +#include "ui/base/interaction/element_tracker.h" + +class TutorialBubbleViews : public TutorialBubble { + public: + explicit TutorialBubbleViews(absl::optional<base::Token> bubble_id); + ~TutorialBubbleViews() override; + + private: + absl::optional<base::Token> bubble_id_; +}; + +class TutorialBubbleFactoryViews : public TutorialBubbleFactory { + public: + TutorialBubbleFactoryViews(); + ~TutorialBubbleFactoryViews() override; + + std::unique_ptr<TutorialBubble> CreateBubble( + ui::TrackedElement* element, + absl::optional<std::u16string> title_text, + absl::optional<std::u16string> body_text, + TutorialDescription::Step::Arrow arrow, + absl::optional<std::pair<int, int>> progress) override; + + bool CanBuildBubbleForTrackedElement(ui::TrackedElement* element) override; +}; + +#endif // CHROME_BROWSER_UI_VIEWS_USER_EDUCATION_TUTORIAL_BUBBLE_FACTORY_VIEWS_H_
diff --git a/chrome/browser/ui/views/web_apps/web_app_identity_update_confirmation_view.cc b/chrome/browser/ui/views/web_apps/web_app_identity_update_confirmation_view.cc index 0c292ffc..f67bf424 100644 --- a/chrome/browser/ui/views/web_apps/web_app_identity_update_confirmation_view.cc +++ b/chrome/browser/ui/views/web_apps/web_app_identity_update_confirmation_view.cc
@@ -13,6 +13,7 @@ #include "components/vector_icons/vector_icons.h" #include "components/webapps/browser/installable/installable_metrics.h" #include "content/public/browser/web_contents.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/base/models/image_model.h" @@ -33,7 +34,10 @@ // of the app (before and after). const int kNameColumnWidth = 170; -bool g_auto_accept_app_identity_update_for_testing = false; +// Keeps track of whether the testing code has set an action to be performed +// when the dialog is set to show (and what that action should be: true = accept +// the dialog, false = do not accept). +absl::optional<bool> g_auto_resolve_app_identity_update_dialog_for_testing; } // namespace @@ -227,6 +231,12 @@ const SkBitmap& new_icon, content::WebContents* web_contents, web_app::AppIdentityDialogCallback callback) { + if (g_auto_resolve_app_identity_update_dialog_for_testing && + *g_auto_resolve_app_identity_update_dialog_for_testing == false) { + std::move(callback).Run(web_app::AppIdentityUpdate::kSkipped); + return; + } + Profile* profile = Profile::FromBrowserContext(web_contents->GetBrowserContext()); auto* dialog = new WebAppIdentityUpdateConfirmationView( @@ -237,13 +247,14 @@ dialog, web_contents->GetTopLevelNativeWindow()); dialog_widget->Show(); - if (g_auto_accept_app_identity_update_for_testing) { + if (g_auto_resolve_app_identity_update_dialog_for_testing && + *g_auto_resolve_app_identity_update_dialog_for_testing) { dialog->AcceptDialog(); } } void SetAutoAcceptAppIdentityUpdateForTesting(bool auto_accept) { - g_auto_accept_app_identity_update_for_testing = auto_accept; + g_auto_resolve_app_identity_update_dialog_for_testing = auto_accept; } } // namespace chrome
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc index d351e5e..d7194f5 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest.cc
@@ -1698,9 +1698,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstCrtShctWindowedSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstCrtShctWindowedSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported. @@ -1733,9 +1734,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstOmniboxSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstOmniboxSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported. @@ -1768,9 +1770,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstMenuOptionSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabNoShctSiteA_InListTabbedSiteA_InstMenuOptionSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported. @@ -2201,9 +2204,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstCrtShctWindowedSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstCrtShctWindowedSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported. @@ -2236,9 +2240,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstOmniboxSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstOmniboxSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported. @@ -2271,9 +2276,10 @@ helper_.AfterStateCheckAction(); } +// Flaky, see http://crbug.com/1250766/. IN_PROC_BROWSER_TEST_F( WebAppIntegrationBrowserTest, - WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstMenuOptionSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { + DISABLED_WebAppIntegration_InstPlcyTabShctSiteA_InListTabbedSiteA_InstMenuOptionSiteA_InListWinSiteA_WindowCreated_UninstallPlcySiteA_InListWinSiteA) { // Test contents are generated by script. Please do not modify! // See `chrome/test/webapps/README.md` for more info. // Sheriffs: Disabling this test is supported.
diff --git a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_base.cc b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_base.cc index a1bef07..2fd6b5a 100644 --- a/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_base.cc +++ b/chrome/browser/ui/views/web_apps/web_app_integration_browsertest_base.cc
@@ -1077,6 +1077,7 @@ void WebAppIntegrationBrowserTest::SetUp() { helper_.SetUp(); InProcessBrowserTest::SetUp(); + chrome::SetAutoAcceptAppIdentityUpdateForTesting(false); } void WebAppIntegrationBrowserTest::SetUpOnMainThread() {
diff --git a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc index f28254f..1d00b0a 100644 --- a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc +++ b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc
@@ -4,13 +4,18 @@ #include "chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h" +#include <memory> + #include "ash/constants/ash_features.h" #include "ash/public/cpp/bluetooth_config_service.h" +#include "base/check.h" #include "base/json/json_writer.h" +#include "base/memory/ptr_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/chromeos/bluetooth_shared_load_time_data_provider.h" #include "chrome/browser/ui/webui/webui_util.h" #include "chrome/common/url_constants.h" +#include "chrome/common/webui_url_constants.h" #include "chrome/grit/bluetooth_pairing_dialog_resources.h" #include "chrome/grit/bluetooth_pairing_dialog_resources_map.h" #include "chrome/grit/generated_resources.h" @@ -48,46 +53,55 @@ // static SystemWebDialogDelegate* BluetoothPairingDialog::ShowDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) { - std::string cannonical_address = - device::CanonicalizeBluetoothAddress(address); - if (cannonical_address.empty()) { - LOG(ERROR) << "BluetoothPairingDialog: Invalid address: " << address; - return nullptr; - } - auto* instance = SystemWebDialogDelegate::FindInstance(cannonical_address); - if (instance) { - instance->Focus(); - return instance; + absl::optional<base::StringPiece> device_address) { + std::string dialog_id = chrome::kChromeUIBluetoothPairingURL; + absl::optional<std::string> canonical_device_address; + + if (device_address.has_value()) { + canonical_device_address = + device::CanonicalizeBluetoothAddress(device_address.value()); + + if (canonical_device_address->empty()) { + LOG(ERROR) << "BluetoothPairingDialog: Invalid address: " + << device_address.value(); + return nullptr; + } + dialog_id = canonical_device_address.value(); } - BluetoothPairingDialog* dialog = new BluetoothPairingDialog( - cannonical_address, name_for_display, paired, connected); + SystemWebDialogDelegate* existing_dialog = + SystemWebDialogDelegate::FindInstance(dialog_id); + + if (existing_dialog) { + existing_dialog->Focus(); + return existing_dialog; + } + + // This object manages its own lifetime so we don't bother wrapping in a + // std::unique_ptr to release quickly after. + BluetoothPairingDialog* dialog = + new BluetoothPairingDialog(dialog_id, canonical_device_address); dialog->ShowSystemDialog(); return dialog; } BluetoothPairingDialog::BluetoothPairingDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected) + const std::string& dialog_id, + absl::optional<base::StringPiece> canonical_device_address) : SystemWebDialogDelegate(GURL(chrome::kChromeUIBluetoothPairingURL), - std::u16string() /* title */), - address_(address) { - device_data_.SetString("address", address); - device_data_.SetString("name", name_for_display); - device_data_.SetBoolean("paired", paired); - device_data_.SetBoolean("connected", connected); + /*title=*/std::u16string()), + dialog_id_(dialog_id) { + if (canonical_device_address.has_value()) { + device_data_.SetString("address", canonical_device_address.value()); + } else { + CHECK(ash::features::IsBluetoothRevampEnabled()); + } } BluetoothPairingDialog::~BluetoothPairingDialog() = default; const std::string& BluetoothPairingDialog::Id() { - return address_; + return dialog_id_; } void BluetoothPairingDialog::AdjustWidgetInitParams(
diff --git a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h index 1c76fc8..4ca0a028 100644 --- a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h +++ b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h
@@ -8,29 +8,34 @@ #include <string> #include "base/macros.h" +#include "base/strings/string_piece.h" #include "chrome/browser/ui/webui/chromeos/system_web_dialog_delegate.h" #include "chromeos/services/bluetooth_config/public/mojom/cros_bluetooth_config.mojom-forward.h" #include "mojo/public/cpp/bindings/pending_receiver.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/web_dialogs/web_dialog_ui.h" namespace chromeos { class BluetoothPairingDialog : public SystemWebDialogDelegate { public: - // Shows a bluetooth pairing dialog. The dialog is returned for testing. + // Show the Bluetooth pairing dialog. When provided, |device_address| is the + // unique device address that the dialog should attempt to pair with and + // should be in the form "XX:XX:XX:XX:XX:XX". When |device_address| is not + // provided the dialog will show the device list instead. The returned object + // manages its own lifetime, for more information see + // chrome/browser/ui/webui/chromeos/system_web_dialog_delegate.h. static SystemWebDialogDelegate* ShowDialog( - const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected); + absl::optional<base::StringPiece> device_address = absl::nullopt); - protected: - BluetoothPairingDialog(const std::string& address, - const std::u16string& name_for_display, - bool paired, - bool connected); ~BluetoothPairingDialog() override; + protected: + BluetoothPairingDialog( + const std::string& dialog_id, + absl::optional<base::StringPiece> canonical_device_address); + + private: // SystemWebDialogDelegate const std::string& Id() override; void AdjustWidgetInitParams(views::Widget::InitParams* params) override; @@ -39,14 +44,16 @@ void GetDialogSize(gfx::Size* size) const override; std::string GetDialogArgs() const override; - private: - std::string address_; + // The canonical Bluetooth address of a device when pairing a specific device, + // otherwise |kChromeUIBluetoothPairingURL|. + std::string dialog_id_; + base::DictionaryValue device_data_; DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog); }; -// A WebUI to host bluetooth device pairing web ui. +// A WebUI to host the Bluetooth device pairing web UI. class BluetoothPairingDialogUI : public ui::MojoWebDialogUI { public: explicit BluetoothPairingDialogUI(content::WebUI* web_ui);
diff --git a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog_browsertest-inl.h b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog_browsertest-inl.h index 19dfee2..0ee8dab 100644 --- a/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog_browsertest-inl.h +++ b/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog_browsertest-inl.h
@@ -64,10 +64,7 @@ .WillRepeatedly(testing::Return(mock_device_.get())); chromeos::SystemWebDialogDelegate* dialog = - chromeos::BluetoothPairingDialog::ShowDialog( - mock_device_->GetAddress(), mock_device_->GetNameForDisplay(), - mock_device_->IsPaired(), mock_device_->IsConnected()); - + chromeos::BluetoothPairingDialog::ShowDialog(mock_device_->GetAddress()); content::WebUI* webui = dialog->GetWebUIForTest(); content::WebContents* webui_webcontents = webui->GetWebContents(); EXPECT_TRUE(content::WaitForLoadStop(webui_webcontents));
diff --git a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc index 21fdf71..7fb608c 100644 --- a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc +++ b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc
@@ -633,9 +633,7 @@ } if (!device->IsPaired() && device->IsPairable()) { // Show pairing dialog for the unpaired device. - chromeos::BluetoothPairingDialog::ShowDialog( - device->GetAddress(), device->GetNameForDisplay(), device->IsPaired(), - device->IsConnected()); + BluetoothPairingDialog::ShowDialog(device->GetAddress()); } else { // Attempt to connect to the device. device->Connect(nullptr, base::DoNothing());
diff --git a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc index b1238e4..5128f69 100644 --- a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc +++ b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.cc
@@ -4,22 +4,37 @@ #include "chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h" -#include "chrome/grit/dev_ui_browser_resources.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/user_education/tutorial/browser_tutorial_service_factory.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service_manager.h" #include "ui/base/webui/resource_path.h" UserEducationInternalsPageHandlerImpl::UserEducationInternalsPageHandlerImpl( - Profile* profile) {} + Profile* profile) + : tutorial_service_( + TutorialServiceManager::GetInstance()->GetTutorialServiceForProfile( + profile)), + profile_(profile) {} UserEducationInternalsPageHandlerImpl:: ~UserEducationInternalsPageHandlerImpl() = default; void UserEducationInternalsPageHandlerImpl::GetTutorials( GetTutorialsCallback callback) { - std::vector<std::string> ids; - std::move(callback).Run(std::move(ids)); + std::vector<std::string> ids = tutorial_service_->GetTutorialIdentifiers(); + + std::vector<std::string> tutorial_string_ids; + for (const auto& id : ids) { + tutorial_string_ids.emplace_back(std::string(id)); + } + std::move(callback).Run(std::move(tutorial_string_ids)); } void UserEducationInternalsPageHandlerImpl::StartTutorial( const std::string& tutorial_id) { - return; + ui::ElementContext context = + BrowserTutorialServiceFactory::GetDefaultElementContextForProfile( + profile_); + + tutorial_service_->StartTutorial(tutorial_id, context); }
diff --git a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h index 05feefa..314bc93 100644 --- a/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h +++ b/chrome/browser/ui/webui/internals/user_education/user_education_internals_page_handler_impl.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_WEBUI_INTERNALS_USER_EDUCATION_USER_EDUCATION_INTERNALS_PAGE_HANDLER_IMPL_H_ #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/user_education/tutorial/tutorial_service.h" #include "chrome/browser/ui/webui/internals/user_education/user_education_internals.mojom.h" #include "content/public/browser/web_ui_data_source.h" @@ -24,6 +25,10 @@ // mojom::user_education_internals::UserEducationInternalsPageHandler: void GetTutorials(GetTutorialsCallback callback) override; void StartTutorial(const std::string& tutorial_id) override; + + private: + TutorialService* tutorial_service_; + Profile* profile_; }; #endif // CHROME_BROWSER_UI_WEBUI_INTERNALS_USER_EDUCATION_USER_EDUCATION_INTERNALS_PAGE_HANDLER_IMPL_H_
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc index 385dc58..b74c59c 100644 --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.cc
@@ -50,6 +50,7 @@ #include "components/prefs/pref_service.h" #include "components/search/ntp_features.h" #include "components/search_engines/template_url_service.h" +#include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/navigation_handle.h" @@ -77,9 +78,7 @@ constexpr char kPrevNavigationTimePrefName[] = "NewTabPage.PrevNavigationTime"; -content::WebUIDataSource* CreateNewTabPageUiHtmlSource( - Profile* profile, - const base::Time& navigation_start_time) { +content::WebUIDataSource* CreateNewTabPageUiHtmlSource(Profile* profile) { content::WebUIDataSource* source = content::WebUIDataSource::Create(chrome::kChromeUINewTabPageHost); @@ -92,7 +91,6 @@ ->search_terms_data() .GoogleBaseURLValue()) .spec()); - source->AddDouble("navigationStartTime", navigation_start_time.ToJsTime()); source->AddBoolean( "handleMostVisitedNavigationExplicitly", @@ -109,8 +107,6 @@ source->AddBoolean( "middleSlotPromoEnabled", base::FeatureList::IsEnabled(ntp_features::kNtpMiddleSlotPromo)); - source->AddBoolean("modulesEnabled", - base::FeatureList::IsEnabled(ntp_features::kModules)); source->AddBoolean( "modulesDragAndDropEnabled", base::FeatureList::IsEnabled(ntp_features::kNtpModulesDragAndDrop)); @@ -288,8 +284,6 @@ source->AddBoolean( "chromeCartModuleEnabled", base::FeatureList::IsEnabled(ntp_features::kNtpChromeCartModule)); - source->AddBoolean("driveModuleEnabled", - NewTabPageUI::IsDriveModuleEnabled(profile)); source->AddBoolean( "photosModuleEnabled", base::FeatureList::IsEnabled(ntp_features::kNtpPhotosModule)); @@ -347,7 +341,7 @@ // for the unlikely case where the NewTabPageHandler is created before we // received the DidStartNavigation event. navigation_start_time_(base::Time::Now()) { - auto* source = CreateNewTabPageUiHtmlSource(profile_, navigation_start_time_); + auto* source = CreateNewTabPageUiHtmlSource(profile_); source->AddBoolean( "customBackgroundDisabledByPolicy", ntp_custom_background_service_->IsCustomBackgroundDisabledByPolicy()); @@ -390,9 +384,10 @@ ntp_custom_background_service_observation_.Observe( ntp_custom_background_service_); - // Populates the load time data with basic theme info. + // Populates the load time data with basic info. OnThemeChanged(); OnCustomBackgroundImageUpdated(); + OnLoad(); } WEB_UI_CONTROLLER_TYPE_IMPL(NewTabPageUI) @@ -431,9 +426,10 @@ // TODO(https://crbug.com/1213351): Stop calling the private method // FindExtendedPrimaryAccountInfo(). auto* identity_manager = IdentityManagerFactory::GetForProfile(profile); - return identity_manager - ->FindExtendedPrimaryAccountInfo(signin::ConsentLevel::kSync) - .IsManaged(); + return /* Can be null if Chrome signin is disabled. */ identity_manager && + identity_manager + ->FindExtendedPrimaryAccountInfo(signin::ConsentLevel::kSync) + .IsManaged(); } void NewTabPageUI::BindInterface( @@ -613,11 +609,7 @@ if (navigation_handle->IsInPrimaryMainFrame() && navigation_handle->GetURL() == GURL(chrome::kChromeUINewTabPageURL)) { navigation_start_time_ = base::Time::Now(); - std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); - update->SetDoubleKey("navigationStartTime", - navigation_start_time_.ToJsTime()); - content::WebUIDataSource::Update(profile_, chrome::kChromeUINewTabPageHost, - std::move(update)); + OnLoad(); auto prev_navigation_time = profile_->GetPrefs()->GetTime(kPrevNavigationTimePrefName); if (!prev_navigation_time.is_null()) { @@ -651,6 +643,25 @@ } } +void NewTabPageUI::OnLoad() { + std::unique_ptr<base::DictionaryValue> update(new base::DictionaryValue); + update->SetDoubleKey("navigationStartTime", + navigation_start_time_.ToJsTime()); + // Only enable modules if account credentials are available as most modules + // won't have data to render otherwise. + auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_); + bool has_credentials = + /* Can be null if Chrome signin is disabled. */ identity_manager && + identity_manager->GetAccountsInCookieJar().signed_in_accounts.size() > 0; + update->SetBoolKey( + "modulesEnabled", + base::FeatureList::IsEnabled(ntp_features::kModules) && has_credentials); + update->SetBoolKey("driveModuleEnabled", + NewTabPageUI::IsDriveModuleEnabled(profile_)); + content::WebUIDataSource::Update(profile_, chrome::kChromeUINewTabPageHost, + std::move(update)); +} + // static base::RefCountedMemory* NewTabPageUI::GetFaviconResourceBytes( ui::ResourceScaleFactor scale_factor) {
diff --git a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h index a952cf4..03f4455 100644 --- a/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h +++ b/chrome/browser/ui/webui/new_tab_page/new_tab_page_ui.h
@@ -195,6 +195,8 @@ void OnCustomLinksEnabledPrefChanged(); // Callback for when the value of the pref for showing the NTP tiles changes. void OnTilesVisibilityPrefChanged(); + // Called when the NTP (re)loads. Sets mutable load time data. + void OnLoad(); std::unique_ptr<NewTabPageHandler> page_handler_; mojo::Receiver<new_tab_page::mojom::PageHandlerFactory>
diff --git a/chrome/browser/updates/BUILD.gn b/chrome/browser/updates/BUILD.gn deleted file mode 100644 index f897caa..0000000 --- a/chrome/browser/updates/BUILD.gn +++ /dev/null
@@ -1,57 +0,0 @@ -# Copyright 2020 The Chromium Authors.All rights reserved. -# Use of this source code is governed by a BSD - style license that can be -# found in the LICENSE file. - -source_set("updates") { - sources = [ - "update_notification_config.cc", - "update_notification_config.h", - "update_notification_info.cc", - "update_notification_info.h", - "update_notification_service.h", - "update_notification_service_bridge.h", - ] - - deps = [ - ":factory", - "//base", - "//components/keyed_service/core", - ] -} - -source_set("factory") { - sources = [ - "update_notification_service_factory.cc", - "update_notification_service_factory.h", - ] - - deps = [ - "//base", - "//chrome/browser/notifications/proto", - "//chrome/browser/notifications/scheduler/public", - "//chrome/browser/updates/internal:lib", - "//components/keyed_service/core", - "//components/leveldb_proto", - "//skia", - ] -} - -source_set("unit_tests") { - testonly = true - sources = [ - "internal/update_notification_service_impl_unittest.cc", - "test/mock_update_notification_service_bridge.cc", - "test/mock_update_notification_service_bridge.h", - "update_notification_config_unittest.cc", - ] - deps = [ - ":updates", - "//chrome/browser/notifications/scheduler/public", - "//chrome/browser/notifications/scheduler/test:test_support", - "//chrome/browser/updates/internal:lib", - "//chrome/test:test_support", - "//skia", - "//testing/gmock", - "//testing/gtest", - ] -}
diff --git a/chrome/browser/updates/DEPS b/chrome/browser/updates/DEPS deleted file mode 100644 index c1d3ca8..0000000 --- a/chrome/browser/updates/DEPS +++ /dev/null
@@ -1,3 +0,0 @@ -include_rules = [ - "+chrome/android/chrome_jni_headers", -]
diff --git a/chrome/browser/updates/OWNERS b/chrome/browser/updates/OWNERS deleted file mode 100644 index 20e9fbc..0000000 --- a/chrome/browser/updates/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -dtrainor@chromium.org -nyquist@chromium.org -xingliu@chromium.org -hesen@chromium.org
diff --git a/chrome/browser/updates/internal/BUILD.gn b/chrome/browser/updates/internal/BUILD.gn deleted file mode 100644 index 8c33ca9..0000000 --- a/chrome/browser/updates/internal/BUILD.gn +++ /dev/null
@@ -1,19 +0,0 @@ -# Copyright 2020 The Chromium Authors.All rights reserved. -# Use of this source code is governed by a BSD - style license that can be -# found in the LICENSE file. - -source_set("lib") { - visibility = [ "//chrome/browser/updates:*" ] - - sources = [ - "update_notification_service_impl.cc", - "update_notification_service_impl.h", - ] - - deps = [ - "//base", - "//chrome/browser/notifications/scheduler/public", - "//components/keyed_service/core", - "//skia", - ] -}
diff --git a/chrome/browser/updates/internal/update_notification_service_impl.cc b/chrome/browser/updates/internal/update_notification_service_impl.cc deleted file mode 100644 index a6a9966..0000000 --- a/chrome/browser/updates/internal/update_notification_service_impl.cc +++ /dev/null
@@ -1,187 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/internal/update_notification_service_impl.h" - -#include <memory> -#include <utility> - -#include "base/bind.h" -#include "base/check.h" -#include "base/containers/contains.h" -#include "base/strings/string_number_conversions.h" -#include "base/time/default_clock.h" -#include "chrome/browser/notifications/scheduler/public/client_overview.h" -#include "chrome/browser/notifications/scheduler/public/notification_params.h" -#include "chrome/browser/notifications/scheduler/public/notification_schedule_service.h" -#include "chrome/browser/notifications/scheduler/public/schedule_service_utils.h" -#include "chrome/browser/notifications/scheduler/public/throttle_config.h" -#include "chrome/browser/updates/update_notification_config.h" // nogncheck -#include "chrome/browser/updates/update_notification_info.h" // nogncheck -#include "chrome/browser/updates/update_notification_service_bridge.h" // nogncheck - -namespace updates { - -// Maximum number of update notification should be cached in scheduler. -constexpr int kNumMaxNotificationsLimit = 1; - -// Maxmium number of consecutive dismiss actions from user that should be -// considered as negative feedback. -constexpr int kNumConsecutiveDismissCountCap = 2; - -// String to represents the key of the map to store update state extra. -const char kUpdateStateEnumKey[] = "extra_data_map_key_update_state_enum"; - -namespace { - -void BuildNotificationData(const updates::UpdateNotificationInfo& data, - notifications::NotificationData* out) { - DCHECK(out); - out->title = data.title; - out->message = data.message; - out->custom_data[kUpdateStateEnumKey] = base::NumberToString(data.state); -} - -notifications::ScheduleParams BuildScheduleParams( - bool should_show_immediately, - base::Clock* clock, - const UpdateNotificationConfig* config) { - notifications::ScheduleParams schedule_params; - schedule_params.impression_mapping.emplace( - notifications::UserFeedback::kDismiss, - notifications::ImpressionResult::kNegative); - schedule_params.impression_mapping.emplace( - notifications::UserFeedback::kNotHelpful, - notifications::ImpressionResult::kNegative); - if (should_show_immediately) { - schedule_params.deliver_time_start = absl::make_optional(clock->Now()); - schedule_params.deliver_time_end = - absl::make_optional(clock->Now() + base::TimeDelta::FromMinutes(1)); - } else { - notifications::TimePair actual_window; - notifications::NextTimeWindow(clock, config->deliver_window_morning, - config->deliver_window_evening, - &actual_window); - schedule_params.deliver_time_start = - absl::make_optional(std::move(actual_window.first)); - schedule_params.deliver_time_end = - absl::make_optional(std::move(actual_window.second)); - } - return schedule_params; -} - -base::TimeDelta GetCurrentInterval(int num_suppresion, - base::TimeDelta init_interval, - base::TimeDelta max_interval) { - return std::min(max_interval, (num_suppresion + 1) * init_interval); -} - -bool TooManyNotificationCached( - const notifications::ClientOverview& client_overview) { - return client_overview.num_scheduled_notifications >= - kNumMaxNotificationsLimit; -} - -} // namespace - -UpdateNotificationServiceImpl::UpdateNotificationServiceImpl( - notifications::NotificationScheduleService* schedule_service, - std::unique_ptr<UpdateNotificationConfig> config, - std::unique_ptr<UpdateNotificationServiceBridge> bridge, - base::Clock* clock) - : schedule_service_(schedule_service), - config_(std::move(config)), - bridge_(std::move(bridge)), - clock_(clock) {} - -UpdateNotificationServiceImpl::~UpdateNotificationServiceImpl() = default; - -void UpdateNotificationServiceImpl::Schedule(UpdateNotificationInfo data) { - schedule_service_->GetClientOverview( - notifications::SchedulerClientType::kChromeUpdate, - base::BindOnce(&UpdateNotificationServiceImpl::ScheduleInternal, - weak_ptr_factory_.GetWeakPtr(), std::move(data))); -} - -void UpdateNotificationServiceImpl::ScheduleInternal( - UpdateNotificationInfo data, - notifications::ClientOverview client_overview) { - if (TooManyNotificationCached(client_overview)) - return; - - notifications::NotificationData notification_data; - BuildNotificationData(data, ¬ification_data); - auto params = std::make_unique<notifications::NotificationParams>( - notifications::SchedulerClientType::kChromeUpdate, - std::move(notification_data), - BuildScheduleParams(data.should_show_immediately, clock_, config_.get())); - params->enable_ihnr_buttons = true; - schedule_service_->Schedule(std::move(params)); -} - -void UpdateNotificationServiceImpl::OnUserClick(const ExtraData& extra) { - DCHECK(base::Contains(extra, kUpdateStateEnumKey)); - int state = 0; - auto res = base::StringToInt(extra.at(kUpdateStateEnumKey), &state); - DCHECK(res); - bridge_->LaunchChromeActivity(state); -} - -void UpdateNotificationServiceImpl::GetThrottleConfig( - ThrottleConfigCallback callback) { - schedule_service_->GetClientOverview( - notifications::SchedulerClientType::kChromeUpdate, - base::BindOnce(&UpdateNotificationServiceImpl::DetermineThrottleConfig, - weak_ptr_factory_.GetWeakPtr(), std::move(callback))); -} - -void UpdateNotificationServiceImpl::DetermineThrottleConfig( - ThrottleConfigCallback callback, - notifications::ClientOverview client_overview) { - auto throttle_config = std::make_unique<notifications::ThrottleConfig>(); - // 2 consecutive dismiss will cause a suppression. - throttle_config->negative_action_count_threshold = - kNumConsecutiveDismissCountCap; - auto num_suppresion = client_overview.impression_detail.num_negative_events; - // Next suppression duration is proportional to the number of suppression - // events, ceiled with a maximum duration interval. - throttle_config->suppression_duration = GetCurrentInterval( - num_suppresion, config_->init_interval, config_->max_interval); - std::move(callback).Run(std::move(throttle_config)); -} - -void UpdateNotificationServiceImpl::BeforeShowNotification( - std::unique_ptr<notifications::NotificationData> notification_data, - NotificationDataCallback callback) { - schedule_service_->GetClientOverview( - notifications::SchedulerClientType::kChromeUpdate, - base::BindOnce(&UpdateNotificationServiceImpl::MaybeShowNotification, - weak_ptr_factory_.GetWeakPtr(), - std::move(notification_data), std::move(callback))); -} - -bool UpdateNotificationServiceImpl::TooSoonForNextNotification( - const notifications::ClientOverview& client_overview) { - auto last_shown_timestamp = client_overview.impression_detail.last_shown_ts; - auto next_notificaiton_interval = - GetCurrentInterval(client_overview.impression_detail.num_negative_events, - config_->init_interval, config_->max_interval); - return last_shown_timestamp.has_value() && - next_notificaiton_interval >= - clock_->Now() - last_shown_timestamp.value(); -} - -void UpdateNotificationServiceImpl::MaybeShowNotification( - std::unique_ptr<notifications::NotificationData> notification_data, - NotificationDataCallback callback, - notifications::ClientOverview client_overview) { - bool should_show_notification = - config_->is_enabled && !TooSoonForNextNotification(client_overview) && - !TooManyNotificationCached(client_overview); - - std::move(callback).Run( - should_show_notification ? std::move(notification_data) : nullptr); -} - -} // namespace updates
diff --git a/chrome/browser/updates/internal/update_notification_service_impl.h b/chrome/browser/updates/internal/update_notification_service_impl.h deleted file mode 100644 index 811ff143..0000000 --- a/chrome/browser/updates/internal/update_notification_service_impl.h +++ /dev/null
@@ -1,84 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_INTERNAL_UPDATE_NOTIFICATION_SERVICE_IMPL_H_ -#define CHROME_BROWSER_UPDATES_INTERNAL_UPDATE_NOTIFICATION_SERVICE_IMPL_H_ - -#include "chrome/browser/updates/update_notification_service.h" // nogncheck - -#include <memory> - -#include "base/memory/weak_ptr.h" -#include "base/time/clock.h" - -namespace notifications { -struct ClientOverview; -class NotificationScheduleService; -} // namespace notifications - -namespace updates { - -struct UpdateNotificationConfig; -struct UpdateNotificationInfo; -class UpdateNotificationServiceBridge; - -class UpdateNotificationServiceImpl : public UpdateNotificationService { - public: - UpdateNotificationServiceImpl( - notifications::NotificationScheduleService* schedule_service, - std::unique_ptr<UpdateNotificationConfig> config, - std::unique_ptr<UpdateNotificationServiceBridge> bridge, - base::Clock* clock); - ~UpdateNotificationServiceImpl() override; - - private: - // UpdateNotificationService implementation. - void Schedule(UpdateNotificationInfo data) override; - void OnUserClick(const ExtraData& extra) override; - void GetThrottleConfig(ThrottleConfigCallback callback) override; - void BeforeShowNotification( - std::unique_ptr<notifications::NotificationData> notification_data, - NotificationDataCallback callback) override; - - // Calculates the params of throttle config depends on |client_overview|, and - // reply to the |callback|. suppresion duration length starts with - // |init_interval| read from config, and the increase is proportional to - // the number of suppression events, until reach the |max_interva|l in config. - void DetermineThrottleConfig(ThrottleConfigCallback callback, - notifications::ClientOverview client_overview); - - // Called before displaying the notification, and will reply nullptr to - // callback if it's not the right time to show this upcoming notification. - void MaybeShowNotification( - std::unique_ptr<notifications::NotificationData> notification_data, - NotificationDataCallback callback, - notifications::ClientOverview client_overview); - - // Return true if |current timestamp - last notification shown timestamp| is - // smailler than interval, which is based on the config and number of throttle - // events read from |client_overview|. - bool TooSoonForNextNotification( - const notifications::ClientOverview& client_overview); - - // Called before using notification schedule service to actually schedule. - // Will not schedule if already has too many notifications cached. - void ScheduleInternal(UpdateNotificationInfo data, - notifications::ClientOverview client_overview); - - // Used to schedule notification to show in the future. Must outlive this - // class. - notifications::NotificationScheduleService* schedule_service_; - - std::unique_ptr<UpdateNotificationConfig> config_; - - std::unique_ptr<UpdateNotificationServiceBridge> bridge_; - - base::Clock* clock_; - - base::WeakPtrFactory<UpdateNotificationServiceImpl> weak_ptr_factory_{this}; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_INTERNAL_UPDATE_NOTIFICATION_SERVICE_IMPL_H_
diff --git a/chrome/browser/updates/internal/update_notification_service_impl_unittest.cc b/chrome/browser/updates/internal/update_notification_service_impl_unittest.cc deleted file mode 100644 index b6b6d45..0000000 --- a/chrome/browser/updates/internal/update_notification_service_impl_unittest.cc +++ /dev/null
@@ -1,207 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/internal/update_notification_service_impl.h" - -#include <memory> -#include <utility> - -#include "base/bind.h" -#include "base/callback_helpers.h" -#include "base/strings/string_number_conversions.h" -#include "base/strings/utf_string_conversions.h" -#include "base/test/simple_test_clock.h" -#include "base/test/task_environment.h" -#include "chrome/browser/notifications/scheduler/public/schedule_service_utils.h" -#include "chrome/browser/notifications/scheduler/public/throttle_config.h" -#include "chrome/browser/notifications/scheduler/test/mock_notification_schedule_service.h" -#include "chrome/browser/updates/test/mock_update_notification_service_bridge.h" -#include "chrome/browser/updates/update_notification_config.h" -#include "chrome/browser/updates/update_notification_info.h" - -namespace updates { -namespace { - -using testing::_; -using ::testing::Invoke; - -constexpr char16_t kTestTitle[] = u"hello"; -constexpr char16_t kTestMessage[] = u"world"; - -class UpdateNotificationServiceImplTest : public testing::Test { - public: - UpdateNotificationServiceImplTest() : bridge_(nullptr), config_(nullptr) {} - ~UpdateNotificationServiceImplTest() override = default; - UpdateNotificationServiceImplTest( - const UpdateNotificationServiceImplTest& other) = delete; - UpdateNotificationServiceImplTest& operator=( - const UpdateNotificationServiceImplTest& other) = delete; - - void SetUp() override { - scheduler_ = std::make_unique< - notifications::test::MockNotificationScheduleService>(); - auto bridge = std::make_unique<test::MockUpdateNotificationServiceBridge>(); - bridge_ = bridge.get(); - auto config = UpdateNotificationConfig::Create(); - config_ = config.get(); - config_->is_enabled = true; - service_ = std::make_unique<updates::UpdateNotificationServiceImpl>( - scheduler_.get(), std::move(config), std::move(bridge), &clock_); - } - - protected: - notifications::test::MockNotificationScheduleService* scheduler() { - return scheduler_.get(); - } - test::MockUpdateNotificationServiceBridge* bridge() { return bridge_; } - UpdateNotificationService* service() { return service_.get(); } - UpdateNotificationConfig* config() { return config_; } - base::SimpleTestClock* clock() { return &clock_; } - - private: - base::SimpleTestClock clock_; - base::test::TaskEnvironment task_environment_; - test::MockUpdateNotificationServiceBridge* bridge_; - std::unique_ptr<notifications::test::MockNotificationScheduleService> - scheduler_; - UpdateNotificationConfig* config_; - - std::unique_ptr<UpdateNotificationService> service_; -}; - -MATCHER_P(NotificationParamsEq, - expected, - "Compare the notification params except GUID") { - EXPECT_EQ(arg->schedule_params, expected->schedule_params); - EXPECT_EQ(arg->notification_data, expected->notification_data); - EXPECT_EQ(arg->enable_ihnr_buttons, expected->enable_ihnr_buttons); - EXPECT_EQ(arg->type, expected->type); - return true; -} - -TEST_F(UpdateNotificationServiceImplTest, Schedule) { - base::Time fake_now; - EXPECT_TRUE(base::Time::FromString("05/18/20 01:00:00 AM", &fake_now)); - clock()->SetNow(fake_now); - - notifications::ScheduleParams expected_schedule_params; - expected_schedule_params.impression_mapping.emplace( - notifications::UserFeedback::kDismiss, - notifications::ImpressionResult::kNegative); - expected_schedule_params.impression_mapping.emplace( - notifications::UserFeedback::kNotHelpful, - notifications::ImpressionResult::kNegative); - notifications::TimePair deliver_window; - notifications::NextTimeWindow(clock(), config()->deliver_window_morning, - config()->deliver_window_evening, - &deliver_window); - expected_schedule_params.deliver_time_start = - absl::make_optional(std::move(deliver_window.first)); - expected_schedule_params.deliver_time_end = - absl::make_optional(std::move(deliver_window.second)); - - notifications::NotificationData expected_notification_data; - expected_notification_data.title = kTestTitle; - expected_notification_data.message = kTestMessage; - expected_notification_data - .custom_data["extra_data_map_key_update_state_enum"] = "1"; - - notifications::NotificationParams expected_params( - notifications::SchedulerClientType::kChromeUpdate, - std::move(expected_notification_data), - std::move(expected_schedule_params)); - expected_params.enable_ihnr_buttons = true; - - EXPECT_CALL( - *scheduler(), - GetClientOverview(notifications::SchedulerClientType::kChromeUpdate, _)) - .WillOnce(Invoke( - [](notifications::SchedulerClientType client, - base::OnceCallback<void(notifications::ClientOverview)> callback) { - notifications::ClientOverview client_overview; - client_overview.num_scheduled_notifications = 0; - std::move(callback).Run(std::move(client_overview)); - })); - EXPECT_CALL(*scheduler(), Schedule(NotificationParamsEq(&expected_params))); - - UpdateNotificationInfo data; - data.title = kTestTitle; - data.message = kTestMessage; - data.state = 1; - data.should_show_immediately = false; - service()->Schedule(std::move(data)); -} - -TEST_F(UpdateNotificationServiceImplTest, VerifyOnUserClick) { - std::vector<int> update_states = {1 /*UPDATE_AVAILABLE*/, - 3 /*INLINE_UPDATE_AVAILABLE*/}; - for (const auto& state : update_states) { - UpdateNotificationService::ExtraData extra = { - {"extra_data_map_key_update_state_enum", base::NumberToString(state)}}; - EXPECT_CALL(*bridge(), LaunchChromeActivity(state)); - service()->OnUserClick(extra); - } -} - -TEST_F(UpdateNotificationServiceImplTest, VerifyGetThrottleConfig) { - for (int i = 0; i < 4; i++) { - EXPECT_CALL( - *scheduler(), - GetClientOverview(notifications::SchedulerClientType::kChromeUpdate, _)) - .WillOnce( - Invoke([&i](notifications::SchedulerClientType client, - base::OnceCallback<void(notifications::ClientOverview)> - callback) { - notifications::ClientOverview client_overview; - client_overview.impression_detail.num_negative_events = i; - std::move(callback).Run(std::move(client_overview)); - })); - service()->GetThrottleConfig(base::BindOnce( - [](int num_suppression, - std::unique_ptr<notifications::ThrottleConfig> throttle_config) { - EXPECT_EQ(throttle_config->suppression_duration.value(), - base::TimeDelta::FromDays( - std::min(21 * (1 + num_suppression), 90))); - EXPECT_EQ(throttle_config->negative_action_count_threshold.value(), - 2); - }, - i)); - } -} - -TEST_F(UpdateNotificationServiceImplTest, BeforeShowNotification) { - std::vector<int> last_shown_timestamp_test_cases = {0, 20, 21, 22}; - for (int test_case : last_shown_timestamp_test_cases) { - EXPECT_CALL( - *scheduler(), - GetClientOverview(notifications::SchedulerClientType::kChromeUpdate, _)) - .WillOnce( - Invoke([&](notifications::SchedulerClientType client, - base::OnceCallback<void(notifications::ClientOverview)> - callback) { - base::Time fake_now; - EXPECT_TRUE( - base::Time::FromString("05/18/20 01:00:00 AM", &fake_now)); - clock()->SetNow(fake_now); - notifications::ClientOverview client_overview; - client_overview.impression_detail.last_shown_ts = - this->clock()->Now() - base::TimeDelta::FromDays(test_case); - std::move(callback).Run(std::move(client_overview)); - })); - service()->BeforeShowNotification( - std::make_unique<notifications::NotificationData>(), - base::BindOnce( - [](bool should_show, - std::unique_ptr<notifications::NotificationData> data) { - if (should_show) - EXPECT_NE(data, nullptr); - else - EXPECT_EQ(data, nullptr); - }, - test_case > 21)); - } -} - -} // namespace -} // namespace updates
diff --git a/chrome/browser/updates/test/mock_update_notification_service_bridge.cc b/chrome/browser/updates/test/mock_update_notification_service_bridge.cc deleted file mode 100644 index e8668dd..0000000 --- a/chrome/browser/updates/test/mock_update_notification_service_bridge.cc +++ /dev/null
@@ -1,17 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/test/mock_update_notification_service_bridge.h" - -namespace updates { -namespace test { - -MockUpdateNotificationServiceBridge::MockUpdateNotificationServiceBridge() = - default; - -MockUpdateNotificationServiceBridge::~MockUpdateNotificationServiceBridge() = - default; - -} // namespace test -} // namespace updates
diff --git a/chrome/browser/updates/test/mock_update_notification_service_bridge.h b/chrome/browser/updates/test/mock_update_notification_service_bridge.h deleted file mode 100644 index f0acb6c..0000000 --- a/chrome/browser/updates/test/mock_update_notification_service_bridge.h +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_TEST_MOCK_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_ -#define CHROME_BROWSER_UPDATES_TEST_MOCK_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_ - -#include "chrome/browser/updates/update_notification_service_bridge.h" - -#include "base/time/time.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "third_party/abseil-cpp/absl/types/optional.h" - -namespace updates { -namespace test { - -class MockUpdateNotificationServiceBridge - : public UpdateNotificationServiceBridge { - public: - MockUpdateNotificationServiceBridge(); - - MockUpdateNotificationServiceBridge( - const MockUpdateNotificationServiceBridge&) = delete; - MockUpdateNotificationServiceBridge& operator=( - const MockUpdateNotificationServiceBridge&) = delete; - - ~MockUpdateNotificationServiceBridge(); - - MOCK_METHOD1(UpdateLastShownTimeStamp, void(base::Time timestamp)); - MOCK_METHOD0(GetLastShownTimeStamp, absl::optional<base::Time>()); - MOCK_METHOD1(UpdateThrottleInterval, void(base::TimeDelta interval)); - MOCK_METHOD0(GetThrottleInterval, absl::optional<base::TimeDelta>()); - MOCK_METHOD1(UpdateNegativeActionCount, void(int count)); - MOCK_METHOD0(GetNegativeActionCount, int()); - MOCK_METHOD1(LaunchChromeActivity, void(int state)); -}; - -} // namespace test -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_TEST_MOCK_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_
diff --git a/chrome/browser/updates/update_notification_client.cc b/chrome/browser/updates/update_notification_client.cc deleted file mode 100644 index 5ae3712..0000000 --- a/chrome/browser/updates/update_notification_client.cc +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_client.h" - -#include <utility> - -#include "chrome/browser/updates/update_notification_service.h" - -namespace updates { - -UpdateNotificationClient::UpdateNotificationClient(GetServiceCallback callback) - : service_getter_(std::move(callback)) {} - -UpdateNotificationClient::~UpdateNotificationClient() = default; - -void UpdateNotificationClient::BeforeShowNotification( - std::unique_ptr<NotificationData> notification_data, - NotificationDataCallback callback) { - GetUpdateNotificationService()->BeforeShowNotification( - std::move(notification_data), std::move(callback)); -} - -void UpdateNotificationClient::OnSchedulerInitialized( - bool success, - std::set<std::string> guid) { - NOTIMPLEMENTED(); -} - -void UpdateNotificationClient::OnUserAction(const UserActionData& action_data) { - DCHECK(action_data.client_type == - notifications::SchedulerClientType::kChromeUpdate); - if (action_data.action_type == notifications::UserActionType::kClick) { - GetUpdateNotificationService()->OnUserClick(action_data.custom_data); - } -} - -void UpdateNotificationClient::GetThrottleConfig( - ThrottleConfigCallback callback) { - GetUpdateNotificationService()->GetThrottleConfig(std::move(callback)); -} - -UpdateNotificationService* -UpdateNotificationClient::GetUpdateNotificationService() { - return service_getter_.Run(); -} - -} // namespace updates
diff --git a/chrome/browser/updates/update_notification_client.h b/chrome/browser/updates/update_notification_client.h deleted file mode 100644 index de36a95..0000000 --- a/chrome/browser/updates/update_notification_client.h +++ /dev/null
@@ -1,50 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CLIENT_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CLIENT_H_ - -#include <memory> -#include <set> -#include <string> - -#include "base/bind.h" -#include "chrome/browser/notifications/scheduler/public/notification_scheduler_client.h" - -namespace updates { - -class UpdateNotificationService; - -// Client side code for Chrome Update notification, integrated with -// notificaiton scheduler system. -class UpdateNotificationClient - : public notifications::NotificationSchedulerClient { - public: - using NotificationData = notifications::NotificationData; - using UserActionData = notifications::UserActionData; - using ThrottleConfig = notifications::ThrottleConfig; - using GetServiceCallback = - base::RepeatingCallback<UpdateNotificationService*()>; - - explicit UpdateNotificationClient(GetServiceCallback callback); - ~UpdateNotificationClient() override; - - private: - // NotificationSchedulerClient implementation. - void BeforeShowNotification( - std::unique_ptr<NotificationData> notification_data, - NotificationDataCallback callback) override; - void OnSchedulerInitialized(bool success, - std::set<std::string> guids) override; - void OnUserAction(const UserActionData& action_data) override; - void GetThrottleConfig(ThrottleConfigCallback callback) override; - - UpdateNotificationService* GetUpdateNotificationService(); - - GetServiceCallback service_getter_; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CLIENT_H_
diff --git a/chrome/browser/updates/update_notification_config.cc b/chrome/browser/updates/update_notification_config.cc deleted file mode 100644 index 3d0180be..0000000 --- a/chrome/browser/updates/update_notification_config.cc +++ /dev/null
@@ -1,106 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_config.h" - -#include "base/metrics/field_trial_params.h" -#include "chrome/browser/flags/android/chrome_feature_list.h" // nogncheck - -namespace updates { -namespace { -// Helper routines to get Finch experiment parameter. If no Finch seed was -// found, use the |default_value|. The |name| should match an experiment -// parameter in Finch server configuration. -int GetFinchConfigInt(const std::string& name, int default_value) { - return base::GetFieldTrialParamByFeatureAsInt( - chrome::android::kInlineUpdateFlow, name, default_value); -} - -bool GetFinchConfigBool(const std::string& name, bool default_value) { - return base::GetFieldTrialParamByFeatureAsBool( - chrome::android::kInlineUpdateFlow, name, default_value); -} - -} // namespace - -// Default update notification schedule initial interval in days. -constexpr int kDefaultUpdateNotificationInitInterval = 21; - -// Default update notification schedule maximum interval in days. -constexpr int kDefaultUpdateNotificationMaxInterval = 90; - -// Default start clock of deliver window in the morning. -constexpr int kDefaultDeliverWindowMorningStart = 5; - -// Default end clock of deliver window in the morning. -constexpr int kDefaultDeliverWindowMorningEnd = 7; - -// Default start clock of deliver window in the evening. -constexpr int kDefaultDeliverWindowEveningStart = 18; - -// Default end clock of deliver window in the evening. -constexpr int kDefaultDeliverWindowEveningEnd = 20; - -// Default update notification state. -constexpr bool kDefaultUpdateNotificationState = false; - -std::unique_ptr<UpdateNotificationConfig> UpdateNotificationConfig::Create() { - return std::make_unique<UpdateNotificationConfig>(); -} - -std::unique_ptr<UpdateNotificationConfig> -UpdateNotificationConfig::CreateFromFinch() { - std::unique_ptr<UpdateNotificationConfig> config = - std::make_unique<UpdateNotificationConfig>(); - - config->is_enabled = GetFinchConfigBool(kUpdateNotificationStateParamName, - kDefaultUpdateNotificationState); - - config->init_interval = base::TimeDelta::FromDays( - GetFinchConfigInt(kUpdateNotificationInitIntervalParamName, - kDefaultUpdateNotificationInitInterval)); - - config->max_interval = base::TimeDelta::FromDays( - GetFinchConfigInt(kUpdateNotificationMaxIntervalParamName, - kDefaultUpdateNotificationMaxInterval)); - - int morning_window_start = - GetFinchConfigInt(kUpdateNotificationDeliverWindowMorningStartParamName, - kDefaultDeliverWindowMorningStart); - int morning_window_end = - GetFinchConfigInt(kUpdateNotificationDeliverWindowMorningEndParamName, - kDefaultDeliverWindowMorningEnd); - config->deliver_window_morning = { - base::TimeDelta::FromHours(morning_window_start), - base::TimeDelta::FromHours(morning_window_end)}; - - int evening_window_start = - GetFinchConfigInt(kUpdateNotificationDeliverWindowEveningStartParamName, - kDefaultDeliverWindowEveningStart); - int evening_window_end = - GetFinchConfigInt(kUpdateNotificationDeliverWindowEveningEndParamName, - kDefaultDeliverWindowEveningEnd); - config->deliver_window_evening = { - base::TimeDelta::FromHours(evening_window_start), - base::TimeDelta::FromHours(evening_window_end)}; - - return config; -} - -UpdateNotificationConfig::UpdateNotificationConfig() - : is_enabled(true), - init_interval( - base::TimeDelta::FromDays(kDefaultUpdateNotificationInitInterval)), - max_interval( - base::TimeDelta::FromDays(kDefaultUpdateNotificationMaxInterval)), - deliver_window_morning( - base::TimeDelta::FromHours(kDefaultDeliverWindowMorningStart), - base::TimeDelta::FromHours(kDefaultDeliverWindowMorningEnd)), - deliver_window_evening( - base::TimeDelta::FromHours(kDefaultDeliverWindowEveningStart), - base::TimeDelta::FromHours(kDefaultDeliverWindowEveningEnd)) {} - -UpdateNotificationConfig::~UpdateNotificationConfig() = default; - -} // namespace updates
diff --git a/chrome/browser/updates/update_notification_config.h b/chrome/browser/updates/update_notification_config.h deleted file mode 100644 index 9bee5fa5..0000000 --- a/chrome/browser/updates/update_notification_config.h +++ /dev/null
@@ -1,76 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CONFIG_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CONFIG_H_ - -#include <memory> -#include <utility> - -#include "base/macros.h" -#include "base/time/time.h" - -namespace updates { - -// Some of these are also existing in Java side, please refer: -// src/chrome/android/java/src/org/ -// chromium/chrome/browser/omaha/UpdateConfigs.java - -// Configure the update notification enable/disable switch. -constexpr char kUpdateNotificationStateParamName[] = - "update_notification_state"; - -// Configure the initial schedule interval update notification in days. -constexpr char kUpdateNotificationInitIntervalParamName[] = - "update_notification_init_interval_days"; - -// Configure the maximum schedule interval update notification in days. -constexpr char kUpdateNotificationMaxIntervalParamName[] = - "update_notification_max_interval_days"; - -// Configure the start of deliver window in the morning. -constexpr char kUpdateNotificationDeliverWindowMorningStartParamName[] = - "update_notification_deliver_window_morning_start"; - -// Configure the end of deliver window in the morning. -constexpr char kUpdateNotificationDeliverWindowMorningEndParamName[] = - "update_notification_deliver_window_morning_end"; - -// Configure the start of deliver window in the evening. -constexpr char kUpdateNotificationDeliverWindowEveningStartParamName[] = - "update_notification_deliver_window_evening_start"; - -// Configure the end of deliver window in the evening. -constexpr char kUpdateNotificationDeliverWindowEveningEndParamName[] = - "update_notification_deliver_window_evening_end"; - -struct UpdateNotificationConfig { - // Create a default update notification config. - static std::unique_ptr<UpdateNotificationConfig> Create(); - - // Create an update notification config read from Finch. - static std::unique_ptr<UpdateNotificationConfig> CreateFromFinch(); - - UpdateNotificationConfig(); - ~UpdateNotificationConfig(); - - // Flag to tell whether update notification is enabled or not. - bool is_enabled; - - // Default interval to schedule next update notification. - base::TimeDelta init_interval; - - // Maximum interval to schedule next update notification. - base::TimeDelta max_interval; - - // Deliver window pair [start, end] in the morning. - std::pair<base::TimeDelta, base::TimeDelta> deliver_window_morning; - - // Deliver window pair [start, end] in the evening. - std::pair<base::TimeDelta, base::TimeDelta> deliver_window_evening; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_CONFIG_H_
diff --git a/chrome/browser/updates/update_notification_config_unittest.cc b/chrome/browser/updates/update_notification_config_unittest.cc deleted file mode 100644 index b65970c2..0000000 --- a/chrome/browser/updates/update_notification_config_unittest.cc +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_config.h" - -#include <map> -#include <string> - -#include "base/strings/string_number_conversions.h" -#include "base/test/scoped_feature_list.h" -#include "chrome/browser/flags/android/chrome_feature_list.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace updates { -namespace { - -TEST(UpdateNotificationConfigTest, FinchConfigTest) { - base::test::ScopedFeatureList scoped_feature_list; - - std::map<std::string, std::string> parameters = { - {kUpdateNotificationStateParamName, "true"}, - {kUpdateNotificationInitIntervalParamName, base::NumberToString(7)}, - {kUpdateNotificationMaxIntervalParamName, base::NumberToString(123)}, - {kUpdateNotificationDeliverWindowMorningStartParamName, - base::NumberToString(5)}, - {kUpdateNotificationDeliverWindowMorningEndParamName, - base::NumberToString(6)}, - {kUpdateNotificationDeliverWindowEveningStartParamName, - base::NumberToString(21)}, - {kUpdateNotificationDeliverWindowEveningEndParamName, - base::NumberToString(23)}, - }; - scoped_feature_list.InitAndEnableFeatureWithParameters( - chrome::android::kInlineUpdateFlow, parameters); - std::unique_ptr<UpdateNotificationConfig> config = - UpdateNotificationConfig::CreateFromFinch(); - EXPECT_TRUE(config->is_enabled); - EXPECT_EQ(config->init_interval.InDays(), 7); - EXPECT_EQ(config->max_interval.InDays(), 123); - EXPECT_EQ(config->deliver_window_morning.first.InHours(), 5); - EXPECT_EQ(config->deliver_window_morning.second.InHours(), 6); - EXPECT_EQ(config->deliver_window_evening.first.InHours(), 21); - EXPECT_EQ(config->deliver_window_evening.second.InHours(), 23); -} - -} // namespace - -} // namespace updates
diff --git a/chrome/browser/updates/update_notification_info.cc b/chrome/browser/updates/update_notification_info.cc deleted file mode 100644 index 577a69f..0000000 --- a/chrome/browser/updates/update_notification_info.cc +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_info.h" - -namespace updates { - -UpdateNotificationInfo::UpdateNotificationInfo() - : state(0), should_show_immediately(false) {} - -UpdateNotificationInfo::UpdateNotificationInfo( - const UpdateNotificationInfo& other) = default; - -bool UpdateNotificationInfo::operator==( - const UpdateNotificationInfo& other) const { - return title == other.title && message == other.message && - state == other.state && - should_show_immediately == other.should_show_immediately; -} - -UpdateNotificationInfo::~UpdateNotificationInfo() = default; - -} // namespace updates
diff --git a/chrome/browser/updates/update_notification_info.h b/chrome/browser/updates/update_notification_info.h deleted file mode 100644 index 3bd0395..0000000 --- a/chrome/browser/updates/update_notification_info.h +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_INFO_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_INFO_H_ - -#include <string> - - -namespace updates { - -// Contains data used to schedule an update notification. -struct UpdateNotificationInfo { - UpdateNotificationInfo(); - UpdateNotificationInfo(const UpdateNotificationInfo& other); - bool operator==(const UpdateNotificationInfo& other) const; - ~UpdateNotificationInfo(); - - // The title of the notification. - std::u16string title; - - // The body text of the notification. - std::u16string message; - - // Update state enum value. Align with |UpdateState| in - // UpdateStatusProvider.java - int state; - - // Should show the notification right away. - bool should_show_immediately; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_INFO_H_
diff --git a/chrome/browser/updates/update_notification_service.h b/chrome/browser/updates/update_notification_service.h deleted file mode 100644 index 4279cd5e..0000000 --- a/chrome/browser/updates/update_notification_service.h +++ /dev/null
@@ -1,58 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_H_ - -#include <map> -#include <memory> -#include <string> - -#include "base/callback.h" -#include "base/macros.h" -#include "components/keyed_service/core/keyed_service.h" // nognservice - -namespace notifications { -struct ThrottleConfig; -struct NotificationData; -} // namespace notifications - -namespace updates { - -struct UpdateNotificationInfo; - -// Service to schedule update notification via -// notifications::NotificationScheduleService. -class UpdateNotificationService : public KeyedService { - public: - using ExtraData = std::map<std::string, std::string>; - using ThrottleConfigCallback = - base::OnceCallback<void(std::unique_ptr<notifications::ThrottleConfig>)>; - using NotificationDataCallback = base::OnceCallback<void( - std::unique_ptr<notifications::NotificationData>)>; - - // Schedule an update notification. - virtual void Schedule(UpdateNotificationInfo data) = 0; - - // Called when the notification is clicked by user. Passing |extra| for - // processing custom data. - virtual void OnUserClick(const ExtraData& extra) = 0; - - // Replies customized throttle config. - virtual void GetThrottleConfig(ThrottleConfigCallback callback) = 0; - - // Confirm whether the upcoming notification is ready to display. - virtual void BeforeShowNotification( - std::unique_ptr<notifications::NotificationData> notification_data, - NotificationDataCallback callback) = 0; - - ~UpdateNotificationService() override = default; - - protected: - UpdateNotificationService() = default; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_H_
diff --git a/chrome/browser/updates/update_notification_service_bridge.h b/chrome/browser/updates/update_notification_service_bridge.h deleted file mode 100644 index 9b262c6..0000000 --- a/chrome/browser/updates/update_notification_service_bridge.h +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_ - -#include <memory> - -#include "base/macros.h" - -namespace updates { - -class UpdateNotificationServiceBridge { - public: - // Create the default UpdateNotificationServiceBridge. - static std::unique_ptr<UpdateNotificationServiceBridge> Create(); - - // Launches Chrome activity after user clicked the notification. Launching - // behavior may be different which depends on |state|. - virtual void LaunchChromeActivity(int state) = 0; - - virtual ~UpdateNotificationServiceBridge() = default; - - UpdateNotificationServiceBridge( - const UpdateNotificationServiceBridge& other) = delete; - UpdateNotificationServiceBridge& operator=( - const UpdateNotificationServiceBridge& other) = delete; - - protected: - UpdateNotificationServiceBridge() = default; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_H_
diff --git a/chrome/browser/updates/update_notification_service_bridge_android.cc b/chrome/browser/updates/update_notification_service_bridge_android.cc deleted file mode 100644 index 04bd5dab..0000000 --- a/chrome/browser/updates/update_notification_service_bridge_android.cc +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_service_bridge_android.h" - -#include <utility> - -#include "base/android/jni_string.h" -#include "base/strings/utf_string_conversions.h" -#include "chrome/android/chrome_jni_headers/UpdateNotificationServiceBridge_jni.h" -#include "chrome/browser/android/profile_key_util.h" -#include "chrome/browser/notifications/scheduler/public/notification_params.h" -#include "chrome/browser/profiles/profile_key.h" -#include "chrome/browser/updates/update_notification_info.h" -#include "chrome/browser/updates/update_notification_service.h" -#include "chrome/browser/updates/update_notification_service_factory.h" - -using base::android::JavaParamRef; -using base::android::ScopedJavaLocalRef; - -namespace updates { - -void JNI_UpdateNotificationServiceBridge_Schedule( - JNIEnv* env, - const JavaParamRef<jstring>& j_title, - const JavaParamRef<jstring>& j_message, - const jint j_state, - const jboolean j_show_immediately) { - ProfileKey* profile_key = ::android::GetLastUsedRegularProfileKey(); - auto* update_notification_service = - UpdateNotificationServiceFactory::GetForKey(profile_key); - UpdateNotificationInfo data; - data.title = ConvertJavaStringToUTF16(env, j_title); - data.message = ConvertJavaStringToUTF16(env, j_message); - data.state = static_cast<int>(j_state); - data.should_show_immediately = static_cast<bool>(j_show_immediately); - update_notification_service->Schedule(std::move(data)); -} - -void UpdateNotificationServiceBridgeAndroid::LaunchChromeActivity(int state) { - JNIEnv* env = base::android::AttachCurrentThread(); - Java_UpdateNotificationServiceBridge_launchChromeActivity( - env, static_cast<jint>(state)); -} -} // namespace updates
diff --git a/chrome/browser/updates/update_notification_service_bridge_android.h b/chrome/browser/updates/update_notification_service_bridge_android.h deleted file mode 100644 index 48d26fac..0000000 --- a/chrome/browser/updates/update_notification_service_bridge_android.h +++ /dev/null
@@ -1,25 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_ANDROID_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_ANDROID_H_ - -#include "chrome/browser/updates/update_notification_service_bridge.h" - -namespace updates { - -class UpdateNotificationServiceBridgeAndroid - : public UpdateNotificationServiceBridge { - public: - UpdateNotificationServiceBridgeAndroid() = default; - ~UpdateNotificationServiceBridgeAndroid() override = default; - - private: - // UpdateNotificationServiceBridge implementation. - void LaunchChromeActivity(int state) override; -}; - -} // namespace updates - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_BRIDGE_ANDROID_H_
diff --git a/chrome/browser/updates/update_notification_service_factory.cc b/chrome/browser/updates/update_notification_service_factory.cc deleted file mode 100644 index be79ccac..0000000 --- a/chrome/browser/updates/update_notification_service_factory.cc +++ /dev/null
@@ -1,61 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/updates/update_notification_service_factory.h" - -#include <memory> -#include <utility> - -#include "base/memory/singleton.h" -#include "base/time/default_clock.h" -#include "chrome/browser/notifications/scheduler/notification_schedule_service_factory.h" // nogncheck -#include "chrome/browser/profiles/incognito_helpers.h" // nogncheck -#include "chrome/browser/profiles/profile_key.h" // nogncheck -#include "chrome/browser/updates/internal/update_notification_service_impl.h" -#include "chrome/browser/updates/update_notification_config.h" // nogncheck -#include "chrome/browser/updates/update_notification_service_bridge.h" // nogncheck -#include "chrome/browser/updates/update_notification_service_bridge_android.h" // nogncheck -#include "components/keyed_service/core/simple_dependency_manager.h" - -// static -UpdateNotificationServiceFactory* -UpdateNotificationServiceFactory::GetInstance() { - return base::Singleton<UpdateNotificationServiceFactory>::get(); -} - -// static -updates::UpdateNotificationService* UpdateNotificationServiceFactory::GetForKey( - SimpleFactoryKey* key) { - return static_cast<updates::UpdateNotificationService*>( - GetInstance()->GetServiceForKey(key, true /* create */)); -} - -UpdateNotificationServiceFactory::UpdateNotificationServiceFactory() - : SimpleKeyedServiceFactory("updates::UpdateNotificationService", - SimpleDependencyManager::GetInstance()) { - DependsOn(NotificationScheduleServiceFactory::GetInstance()); -} - -UpdateNotificationServiceFactory::~UpdateNotificationServiceFactory() = default; - -std::unique_ptr<KeyedService> -UpdateNotificationServiceFactory::BuildServiceInstanceFor( - SimpleFactoryKey* key) const { - auto* profile_key = ProfileKey::FromSimpleFactoryKey(key); - - auto* schedule_service = - NotificationScheduleServiceFactory::GetForKey(profile_key); - auto config = updates::UpdateNotificationConfig::CreateFromFinch(); - auto bridge = - std::make_unique<updates::UpdateNotificationServiceBridgeAndroid>(); - return std::make_unique<updates::UpdateNotificationServiceImpl>( - schedule_service, std::move(config), std::move(bridge), - base::DefaultClock::GetInstance()); -} - -SimpleFactoryKey* UpdateNotificationServiceFactory::GetKeyToUse( - SimpleFactoryKey* key) const { - ProfileKey* profile_key = ProfileKey::FromSimpleFactoryKey(key); - return profile_key->GetOriginalKey(); -}
diff --git a/chrome/browser/updates/update_notification_service_factory.h b/chrome/browser/updates/update_notification_service_factory.h deleted file mode 100644 index 0b3770c6..0000000 --- a/chrome/browser/updates/update_notification_service_factory.h +++ /dev/null
@@ -1,41 +0,0 @@ -// Copyright 2019 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_FACTORY_H_ -#define CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_FACTORY_H_ - -#include <memory> - -#include "base/macros.h" -#include "components/keyed_service/core/simple_keyed_service_factory.h" // nogncheck - -namespace base { -template <typename T> -struct DefaultSingletonTraits; -} // namespace base - -namespace updates { -class UpdateNotificationService; -} // namespace updates - -class UpdateNotificationServiceFactory : public SimpleKeyedServiceFactory { - public: - static UpdateNotificationServiceFactory* GetInstance(); - static updates::UpdateNotificationService* GetForKey(SimpleFactoryKey* key); - - private: - friend struct base::DefaultSingletonTraits<UpdateNotificationServiceFactory>; - - UpdateNotificationServiceFactory(); - ~UpdateNotificationServiceFactory() override; - - // SimpleKeyedServiceFactory implementation. - std::unique_ptr<KeyedService> BuildServiceInstanceFor( - SimpleFactoryKey* key) const override; - SimpleFactoryKey* GetKeyToUse(SimpleFactoryKey* key) const override; - - DISALLOW_COPY_AND_ASSIGN(UpdateNotificationServiceFactory); -}; - -#endif // CHROME_BROWSER_UPDATES_UPDATE_NOTIFICATION_SERVICE_FACTORY_H_
diff --git a/chrome/browser/web_applications/manifest_update_manager_browsertest.cc b/chrome/browser/web_applications/manifest_update_manager_browsertest.cc index 954b1d3..b05c8a6 100644 --- a/chrome/browser/web_applications/manifest_update_manager_browsertest.cc +++ b/chrome/browser/web_applications/manifest_update_manager_browsertest.cc
@@ -216,6 +216,7 @@ // WebAppProvider setup. os_hooks_suppress_ = OsIntegrationManager::ScopedSuppressOsHooksForTesting(); + chrome::SetAutoAcceptAppIdentityUpdateForTesting(false); InProcessBrowserTest::SetUp(); } @@ -2054,7 +2055,7 @@ "action": "/?longtype", "name": "Long Custom type", "accept": { - "long/type": [".longtype"] + "application/long-type": [".longtype"] } } ], @@ -2069,7 +2070,7 @@ GetFileTypeAssociationsHandledByWebAppsForDisplay(browser()->profile(), GetAppURL()); #if defined(OS_LINUX) - EXPECT_EQ(u"long/type, text/plain", associations_list); + EXPECT_EQ(u"application/long-type, text/plain", associations_list); #else EXPECT_EQ(u"LONGTYPE, TXT", associations_list); #endif // defined(OS_LINUX)
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 1f417ce..c5cd603 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1632138958-acf4aca38c620206b66ecdd9098e65ff48e0d6ab.profdata +chrome-linux-main-1632160516-c9f75c92e6ab53bc1d3326019b19564e4776d2b3.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index f40b443..23f0d5c 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1632160516-0572ef449c8e21593aff64b60346242b4c12a3a2.profdata +chrome-mac-main-1632182207-7dd53e2aef87d278af79fd55585989b0b6308e3c.profdata
diff --git a/chrome/renderer/resources/cart/cart-product-extraction.js b/chrome/renderer/resources/cart/cart-product-extraction.js index 3f11963..9f89f13 100644 --- a/chrome/renderer/resources/cart/cart-product-extraction.js +++ b/chrome/renderer/resources/cart/cart-product-extraction.js
@@ -19,8 +19,9 @@ var cartItemHTMLRegex = new RegExp( '(cart|basket|bundle)[-_]?((\\w+)[-_])?(item|product)', 'i'); var cartItemTextRegex = new RegExp( - '(remove|delete|save for later|move to (favo(u?)rite|list|wish( ?)list)s?)'+ - '|(qty)', 'i'); + 'remove|delete|save for later|move to (favo(u?)rite|list|wish( ?)list)s?', + 'i'); +var cartItemQtyRegex = new RegExp('qty', 'i'); var moveToCartTextRegex = new RegExp('move to (cart|bag)', 'i'); var addToCartTextRegex = new RegExp('add to cart', 'i'); var cartPriceTextRegex = new RegExp('estimated (sales )?tax', 'i'); @@ -104,7 +105,8 @@ // large and are picked up. Adding in hostname.endsWith('target.com') is a // workaround for this problem. In target we only get one image per product. return hostname.endsWith('craigslist.org') || hostname.endsWith('target.com') - || hostname.endsWith('zazzle.com'); + || hostname.endsWith('zazzle.com') + || hostname.endsWith("ashleyfurniture.com"); } function extractImage(item) { @@ -493,7 +495,8 @@ } // Generic heuristic to search for price elements. let captured_prices = []; - for (const price of item.querySelectorAll('span, b, p, div, h3, td, li')) { + for (const price of item.querySelectorAll( + 'span, b, p, div, h3, td, li, em')) { const candidate = price.innerText.trim(); if (!candidate.match(priceRegexFull)) continue; @@ -654,7 +657,11 @@ if ((document.URL.includes("ashleyfurniture.com") || document.URL.includes("gnc.com")) && matchPattern(item, minicartHTMLRegex, false)) return false; + if (document.URL.includes("ashleyfurniture.com") + && matchPattern(item, cartItemQtyRegex, true) === null) + return false; return matchPattern(item, cartItemTextRegex, true) || + matchPattern(item, cartItemQtyRegex, true) || matchPattern(item, cartItemHTMLRegex, false); }
diff --git a/chrome/services/speech/BUILD.gn b/chrome/services/speech/BUILD.gn index 591259b..5834734 100644 --- a/chrome/services/speech/BUILD.gn +++ b/chrome/services/speech/BUILD.gn
@@ -2,14 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/buildflag_header.gni") import("//build/config/chromeos/ui_mode.gni") -import("//chrome/services/speech/buildflags.gni") - -buildflag_header("buildflags") { - header = "buildflags.h" - flags = [ "ENABLE_SODA=$enable_soda" ] -} source_set("lib") { sources = [ @@ -37,7 +30,6 @@ ] deps = [ - ":buildflags", "//base", "//build:chromeos_buildflags", "//chrome/services/speech/soda",
diff --git a/chrome/services/speech/buildflags.gni b/chrome/services/speech/buildflags.gni deleted file mode 100644 index e48c018..0000000 --- a/chrome/services/speech/buildflags.gni +++ /dev/null
@@ -1,7 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -declare_args() { - enable_soda = false -}
diff --git a/chrome/services/speech/soda/BUILD.gn b/chrome/services/speech/soda/BUILD.gn index 18f73e5..a6c95c4 100644 --- a/chrome/services/speech/soda/BUILD.gn +++ b/chrome/services/speech/soda/BUILD.gn
@@ -2,7 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/chromeos/ui_mode.gni") -import("//chrome/services/speech/buildflags.gni") +import("//components/soda/buildflags.gni") import("//third_party/protobuf/proto_library.gni") assert(!is_android)
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index e898713..8c6b06e2 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -19,7 +19,6 @@ import( "//chrome/browser/sync/test/integration/sync_integration_tests_sources.gni") import("//chrome/common/features.gni") -import("//chrome/services/speech/buildflags.gni") import("//chrome/test/base/js2gtest.gni") import("//chrome/test/include_js_tests.gni") import("//chromeos/assistant/assistant.gni") @@ -34,6 +33,7 @@ import("//components/os_crypt/features.gni") import("//components/safe_browsing/buildflags.gni") import("//components/signin/features.gni") +import("//components/soda/buildflags.gni") import("//components/spellcheck/spellcheck_build_features.gni") import("//extensions/buildflags/buildflags.gni") import("//mojo/public/tools/bindings/mojom.gni") @@ -1304,6 +1304,7 @@ "//components/unified_consent", "//components/user_manager", "//components/variations/service", + "//components/variations/service:constants", "//components/webapps/browser", "//components/webrtc", "//components/webrtc_logging/browser", @@ -4471,6 +4472,7 @@ "../browser/endpoint_fetcher/endpoint_fetcher_unittest.cc", "../browser/engagement/important_sites_util_unittest.cc", "../browser/engagement/site_engagement_service_unittest.cc", + "../browser/enterprise/reporting/report_scheduler_unittest.cc", "../browser/enterprise/util/managed_browser_utils_unittest.cc", "../browser/external_protocol/external_protocol_handler_unittest.cc", "../browser/federated_learning/floc_eligibility_unittest.cc", @@ -5624,7 +5626,6 @@ "//chrome/browser/share", "//chrome/browser/supervised_user/kids_chrome_management:proto", "//chrome/browser/thumbnail:unit_tests", - "//chrome/browser/updates:unit_tests", "//chrome/services/media_gallery_util:unit_tests", "//components/back_forward_cache", "//components/crash/content/browser", @@ -5715,7 +5716,6 @@ "../browser/enterprise/reporting/real_time_report_generator_unittest.cc", "../browser/enterprise/reporting/report_generator_unittest.cc", "../browser/enterprise/reporting/report_request_queue_generator_unittest.cc", - "../browser/enterprise/reporting/report_scheduler_desktop_unittest.cc", "../browser/first_run/first_run_unittest.cc", "../browser/font_family_cache_unittest.cc", @@ -7531,6 +7531,7 @@ "../../ui/views/controls/webview/webview_unittest.cc", "../browser/ui/media_router/media_router_ui_unittest.cc", "../browser/ui/user_education/feature_promo_snooze_service_unittest.cc", + "../browser/ui/user_education/tutorial/tutorial_unittest.cc", "../browser/ui/views/accelerator_table_unittest.cc", "../browser/ui/views/apps/app_info_dialog/app_info_dialog_views_unittest.cc", "../browser/ui/views/apps/app_info_dialog/app_info_permissions_panel_unittest.cc",
diff --git a/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js b/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js index b276c08..575a834 100644 --- a/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js +++ b/chrome/test/data/webui/chromeos/diagnostics/network_card_test.js
@@ -4,7 +4,7 @@ import 'chrome://diagnostics/network_card.js'; -import {fakeCellularNetwork, fakeDisconnectedEthernetNetwork, fakeDisconnectedWifiNetwork, fakeEthernetNetwork, fakeNetworkGuidInfoList, fakePortalWifiNetwork, fakeWifiNetwork, fakeWifiNetworkDisabled} from 'chrome://diagnostics/fake_data.js'; +import {fakeCellularNetwork, fakeConnectingEthernetNetwork, fakeDisconnectedEthernetNetwork, fakeDisconnectedWifiNetwork, fakeEthernetNetwork, fakeNetworkGuidInfoList, fakePortalWifiNetwork, fakeWifiNetwork, fakeWifiNetworkDisabled} from 'chrome://diagnostics/fake_data.js'; import {FakeNetworkHealthProvider} from 'chrome://diagnostics/fake_network_health_provider.js'; import {setNetworkHealthProviderForTesting} from 'chrome://diagnostics/mojo_interface_provider.js'; @@ -50,6 +50,8 @@ provider.setFakeNetworkState( 'wifiDisconnectedGuid', [fakeDisconnectedWifiNetwork]); provider.setFakeNetworkState('wifiPortalGuid', [fakePortalWifiNetwork]); + provider.setFakeNetworkState( + 'ethernetConnectingGuid', [fakeConnectingEthernetNetwork]); // Add the network info to the DOM. networkCardElement = /** @type {!NetworkCardElement} */ ( document.createElement('network-card')); @@ -164,6 +166,17 @@ }); }); + test('NetworkConnectingHideTroubleShooting', () => { + return initializeNetworkCard('ethernetConnectingGuid').then(() => { + dx_utils.assertElementContainsText( + networkCardElement.$$('#cardTitle'), + 'Ethernet [81:C5:A6:30:3F:33] (Connecting)'); + assertFalse(isVisible(getTroubleConnectingElement())); + assertTrue(isVisible(getNetworkInfoElement())); + assertTrue(isVisible(getIpConfigDrawerElement())); + }); + }); + test('CardDrawerInitializedCorrectly', () => { return initializeNetworkCard('wifiGuid').then(() => { const ipConfigInfoDrawerElement =
diff --git a/chrome/test/data/webui/chromeos/scanning/scanning_app_test.js b/chrome/test/data/webui/chromeos/scanning/scanning_app_test.js index f13439f..b2caaba 100644 --- a/chrome/test/data/webui/chromeos/scanning/scanning_app_test.js +++ b/chrome/test/data/webui/chromeos/scanning/scanning_app_test.js
@@ -2480,4 +2480,37 @@ return fakeScanService_.whenCalled('startScan'); }); }); + + // Verify a normal scan is started when the multi-page checkbox is checked + // while a non-Flatbed source type is selected. + test('OnlyMultiPageScanWhenFlatbedIsSelected', () => { + return initializeScanningApp(expectedScanners, capabilities) + .then(() => { + return getScannerCapabilities(); + }) + .then(() => { + scanningApp.selectedSource = PLATEN; + scanningApp.selectedFileType = FileType.PDF.toString(); + return flushTasks(); + }) + .then(() => { + scanningApp.multiPageScanChecked = true; + }) + .then(() => { + assertEquals( + 'Scan page 1', scanningApp.$$('#scanButton').textContent.trim()); + + // Leave the multi-page checkbox checked but switch the source. + scanningApp.selectedSource = ADF_SIMPLEX; + return flushTasks(); + }) + .then(() => { + const scanButton = scanningApp.$$('#scanButton'); + assertEquals('Scan', scanButton.textContent.trim()); + + // When scan button is clicked expect a normal scan to start. + scanButton.click(); + return fakeScanService_.whenCalled('startScan'); + }); + }); }
diff --git a/chrome/test/data/webui/settings/languages_page_metrics_test_browser.js b/chrome/test/data/webui/settings/languages_page_metrics_test_browser.js index c681392..85677ba8 100644 --- a/chrome/test/data/webui/settings/languages_page_metrics_test_browser.js +++ b/chrome/test/data/webui/settings/languages_page_metrics_test_browser.js
@@ -4,7 +4,7 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {LanguagesBrowserProxyImpl, LanguageSettingsActionType, LanguageSettingsMetricsProxy, LanguageSettingsMetricsProxyImpl, LanguageSettingsPageImpressionType, SettingsLanguagesSubpageElement} from 'chrome://settings/lazy_load.js'; +import {LanguageHelper, LanguagesBrowserProxyImpl, LanguageSettingsActionType, LanguageSettingsMetricsProxy, LanguageSettingsMetricsProxyImpl, LanguageSettingsPageImpressionType, SettingsLanguagesSubpageElement} from 'chrome://settings/lazy_load.js'; import {CrSettingsPrefs} from 'chrome://settings/settings.js'; import {assertEquals, assertFalse, assertTrue} from '../chai_assert.js';
diff --git a/chromecast/app/linux/cast_crash_reporter_client_unittest.cc b/chromecast/app/linux/cast_crash_reporter_client_unittest.cc index 552d6d36..7a8ad6b3 100644 --- a/chromecast/app/linux/cast_crash_reporter_client_unittest.cc +++ b/chromecast/app/linux/cast_crash_reporter_client_unittest.cc
@@ -12,6 +12,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/macros.h" #include "base/test/scoped_path_override.h" +#include "base/threading/scoped_blocking_call.h" #include "base/threading/thread_restrictions.h" #include "base/values.h" #include "chromecast/app/linux/cast_crash_reporter_client.h" @@ -73,9 +74,6 @@ } void TearDown() override { - // Remove IO restrictions in order to examine the state of the filesystem. - base::ThreadRestrictions::SetIOAllowed(true); - // Assert that the original file has been moved. ASSERT_FALSE(base::PathExists(minidump_path())); @@ -123,31 +121,30 @@ DISALLOW_COPY_AND_ASSIGN(CastCrashReporterClientTest); }; -#if DCHECK_IS_ON() -// This test shall only be run when thread restricitons are enabled. Otherwise, -// the thread will not actually be IO-restricted, and the final ASSERT will -// fail. TEST_F(CastCrashReporterClientTest, EndToEndTestOnIORestrictedThread) { // Handle a "crash" on an IO restricted thread. - base::ThreadRestrictions::SetIOAllowed(false); + base::ScopedDisallowBlocking disallow_blocking; CastCrashReporterClient client; ASSERT_TRUE(client.HandleCrashDump(minidump_path().value().c_str(), 0)); - - // Assert that the thread is IO restricted when the function exits. - // Note that SetIOAllowed returns the previous value. - ASSERT_FALSE(base::ThreadRestrictions::SetIOAllowed(true)); } -#endif // DCHECK_IS_ON() TEST_F(CastCrashReporterClientTest, EndToEndTestOnNonIORestrictedThread) { + { + // ScopedBlockingCall will DCHECK if blocking isn't allowed at the beginning + // of this test. + base::ScopedBlockingCall test_blocking_allowed( + FROM_HERE, base::BlockingType::WILL_BLOCK); + } + // Handle a crash on a non-IO restricted thread. - base::ThreadRestrictions::SetIOAllowed(true); CastCrashReporterClient client; ASSERT_TRUE(client.HandleCrashDump(minidump_path().value().c_str(), 0)); // Assert that the thread is not IO restricted when the function exits. - // Note that SetIOAllowed returns the previous value. - ASSERT_TRUE(base::ThreadRestrictions::SetIOAllowed(true)); + { + base::ScopedBlockingCall test_blocking_allowed( + FROM_HERE, base::BlockingType::WILL_BLOCK); + } } } // namespace chromecast
diff --git a/chromeos/language/language_packs/BUILD.gn b/chromeos/language/language_packs/BUILD.gn index ed5b870e..b55d0ab 100644 --- a/chromeos/language/language_packs/BUILD.gn +++ b/chromeos/language/language_packs/BUILD.gn
@@ -8,11 +8,14 @@ sources = [ "language_pack_manager.cc", "language_pack_manager.h", + "language_packs_impl.cc", + "language_packs_impl.h", ] deps = [ "//base", "//chromeos/dbus/dlcservice:dlcservice", "//chromeos/dbus/dlcservice:dlcservice_proto", + "//chromeos/language/public/mojom", ] }
diff --git a/chromeos/language/language_packs/language_packs_impl.cc b/chromeos/language/language_packs/language_packs_impl.cc new file mode 100644 index 0000000..1f60583e --- /dev/null +++ b/chromeos/language/language_packs/language_packs_impl.cc
@@ -0,0 +1,100 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <string> + +#include "chromeos/language/language_packs/language_packs_impl.h" +#include "third_party/abseil-cpp/absl/types/optional.h" + +namespace chromeos { +namespace language_packs { + +using ::language::mojom::FeatureId; +using ::language::mojom::LanguagePackInfo; +using ::language::mojom::LanguagePacks; +using ::language::mojom::PackState; + +namespace { + +absl::optional<std::string> ConvertMojoFeatureToPackId(FeatureId mojo_id) { + switch (mojo_id) { + case FeatureId::HANDWRITING_RECOGNITION: + return kHandwritingFeatureId; + + // Catch all unknown cases here. + default: + return absl::nullopt; + } +} + +// Called when GetPackState() or InstallPack() functions from Language Packs +// are complete. +void OnOperationComplete(LanguagePacksImpl::GetPackInfoCallback mojo_callback, + const PackResult& pack_result) { + auto info = LanguagePackInfo::New(); + switch (pack_result.pack_state) { + case PackResult::NOT_INSTALLED: + info->pack_state = PackState::NOT_INSTALLED; + break; + case PackResult::IN_PROGRESS: + info->pack_state = PackState::INSTALLING; + break; + case PackResult::INSTALLED: + info->pack_state = PackState::INSTALLED; + info->path = pack_result.path; + break; + + // Catch all remaining cases as error. + default: + info->pack_state = PackState::ERROR; + break; + } + std::move(mojo_callback).Run(std::move(info)); +} + +} // namespace + +LanguagePacksImpl::LanguagePacksImpl( + mojo::PendingReceiver<language::mojom::LanguagePacks> receiver) + : receiver_(this, std::move(receiver)) {} +LanguagePacksImpl::~LanguagePacksImpl() = default; + +void LanguagePacksImpl::GetPackInfo(FeatureId feature_id, + const std::string& language, + GetPackInfoCallback mojo_callback) { + LanguagePackManager* lp = LanguagePackManager::GetInstance(); + const absl::optional<std::string> pack_id = + ConvertMojoFeatureToPackId(feature_id); + + if (pack_id.has_value()) { + lp->GetPackState( + pack_id.value(), language, + base::BindOnce(&OnOperationComplete, std::move(mojo_callback))); + } else { + auto info = LanguagePackInfo::New(); + info->pack_state = PackState::ERROR; + std::move(mojo_callback).Run(std::move(info)); + } +} + +void LanguagePacksImpl::InstallPack(FeatureId feature_id, + const std::string& language, + InstallPackCallback mojo_callback) { + LanguagePackManager* lp = LanguagePackManager::GetInstance(); + const absl::optional<std::string> pack_id = + ConvertMojoFeatureToPackId(feature_id); + + if (pack_id.has_value()) { + lp->InstallPack( + pack_id.value(), language, + base::BindOnce(&OnOperationComplete, std::move(mojo_callback))); + } else { + auto info = LanguagePackInfo::New(); + info->pack_state = PackState::ERROR; + std::move(mojo_callback).Run(std::move(info)); + } +} + +} // namespace language_packs +} // namespace chromeos
diff --git a/chromeos/language/language_packs/language_packs_impl.h b/chromeos/language/language_packs/language_packs_impl.h new file mode 100644 index 0000000..f05ad76 --- /dev/null +++ b/chromeos/language/language_packs/language_packs_impl.h
@@ -0,0 +1,42 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROMEOS_LANGUAGE_LANGUAGE_PACKS_LANGUAGE_PACKS_IMPL_H_ +#define CHROMEOS_LANGUAGE_LANGUAGE_PACKS_LANGUAGE_PACKS_IMPL_H_ + +#include <string> + +#include "chromeos/language/language_packs/language_pack_manager.h" +#include "chromeos/language/public/mojom/language_packs.mojom.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver.h" + +namespace chromeos { +namespace language_packs { + +class LanguagePacksImpl : public language::mojom::LanguagePacks { + public: + explicit LanguagePacksImpl( + mojo::PendingReceiver<language::mojom::LanguagePacks> receiver); + LanguagePacksImpl(const LanguagePacksImpl&) = delete; + LanguagePacksImpl& operator=(const LanguagePacksImpl&) = delete; + // Called when mojom connection is destroyed. + ~LanguagePacksImpl() override; + + // mojom::LanguagePacks interface methods. + void GetPackInfo(language::mojom::FeatureId feature_id, + const std::string& language, + GetPackInfoCallback callback) override; + void InstallPack(language::mojom::FeatureId feature_id, + const std::string& language, + InstallPackCallback callback) override; + + private: + mojo::Receiver<language::mojom::LanguagePacks> receiver_; +}; + +} // namespace language_packs +} // namespace chromeos + +#endif // CHROMEOS_LANGUAGE_LANGUAGE_PACKS_LANGUAGE_PACKS_IMPL_H_
diff --git a/chromeos/language/public/mojom/BUILD.gn b/chromeos/language/public/mojom/BUILD.gn new file mode 100644 index 0000000..80015af0 --- /dev/null +++ b/chromeos/language/public/mojom/BUILD.gn
@@ -0,0 +1,10 @@ +# Copyright 2021 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//mojo/public/tools/bindings/mojom.gni") + +mojom("mojom") { + sources = [ "language_packs.mojom" ] + public_deps = [ "//mojo/public/mojom/base" ] +}
diff --git a/chromeos/language/public/mojom/OWNERS b/chromeos/language/public/mojom/OWNERS new file mode 100644 index 0000000..61b5e28 --- /dev/null +++ b/chromeos/language/public/mojom/OWNERS
@@ -0,0 +1,2 @@ +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS \ No newline at end of file
diff --git a/chromeos/language/public/mojom/language_packs.mojom b/chromeos/language/public/mojom/language_packs.mojom new file mode 100644 index 0000000..c0aa7cc --- /dev/null +++ b/chromeos/language/public/mojom/language_packs.mojom
@@ -0,0 +1,54 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Private API exposed by Language Packs. +// It allows clients to check, request and observe the files managed by +// Language Packs. + +module language.mojom; + +// ID of the Feature using LanguagePacks. +[Stable, Extensible] +enum FeatureId { + // Unknown feature, not supported. + UNSUPPORTED_UNKNOWN = 0, + // Handwriting Recognition used by the Virtual Keyboard. + HANDWRITING_RECOGNITION = 1, +}; + +// Current state of Pack on disk. +// INSTALLED means that it's mounted and can be used. +[Stable, Extensible] +enum PackState { + ERROR = 0, + NOT_INSTALLED = 1, + INSTALLING = 2, + INSTALLED = 3 +}; + +// This struct holds information that allows clients to use a Pack. +[Stable] +struct LanguagePackInfo { + PackState pack_state; + string path; +}; + +// Interface for managing Language Packs. +// Lives in the browser process and it allows clients to get information +// about a Language Pack or to install one. +// Language Packs are mounted to the user partition once they are installed and +// this interface allows to get the path to the files. +// Next ordinal: 2 +[Stable] +interface LanguagePacks { + // Gets information about the current state of a Language Pack. + // Takes the id of the feature (for example handwriting) and the language. + GetPackInfo@0(FeatureId feature_id, string language) => + (LanguagePackInfo info); + + // Requests to install a Language Pack. + // Takes the id of the feature (for example handwriting) and the language. + InstallPack@1(FeatureId feature_id, string language) => + (LanguagePackInfo info); +}; \ No newline at end of file
diff --git a/chromeos/resources/BUILD.gn b/chromeos/resources/BUILD.gn index e912f79b..89c9c67 100644 --- a/chromeos/resources/BUILD.gn +++ b/chromeos/resources/BUILD.gn
@@ -36,6 +36,7 @@ deps = [ "//chromeos/components/multidevice/mojom:mojom_js", + "//chromeos/language/public/mojom:mojom_js", "//chromeos/services/bluetooth_config/public/mojom:mojom_js", "//chromeos/services/cellular_setup/public/mojom:mojom_js", "//chromeos/services/device_sync/public/mojom:mojom_js",
diff --git a/components/android_autofill/browser/android_autofill_manager.h b/components/android_autofill/browser/android_autofill_manager.h index 5df062b..87c3869 100644 --- a/components/android_autofill/browser/android_autofill_manager.h +++ b/components/android_autofill/browser/android_autofill_manager.h
@@ -22,6 +22,9 @@ const std::string& app_locale, AutofillManager::AutofillDownloadManagerState enable_download_manager); + AndroidAutofillManager(const AndroidAutofillManager&) = delete; + AndroidAutofillManager& operator=(const AndroidAutofillManager&) = delete; + ~AndroidAutofillManager() override; void OnFocusNoLongerOnForm(bool had_interacted_form) override; @@ -112,8 +115,6 @@ bool has_server_prediction_ = false; AutofillProvider* autofill_provider_for_testing_ = nullptr; base::WeakPtrFactory<AndroidAutofillManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AndroidAutofillManager); }; } // namespace autofill
diff --git a/components/apdu/apdu_command.h b/components/apdu/apdu_command.h index a5b23e0..10d2c80e 100644 --- a/components/apdu/apdu_command.h +++ b/components/apdu/apdu_command.h
@@ -40,6 +40,10 @@ std::vector<uint8_t> data); ApduCommand(ApduCommand&& that); ApduCommand& operator=(ApduCommand&& that); + + ApduCommand(const ApduCommand&) = delete; + ApduCommand& operator=(const ApduCommand&) = delete; + ~ApduCommand(); // Returns serialized message data. @@ -87,8 +91,6 @@ uint8_t p2_ = 0; size_t response_length_ = 0; std::vector<uint8_t> data_; - - DISALLOW_COPY_AND_ASSIGN(ApduCommand); }; } // namespace apdu
diff --git a/components/apdu/apdu_response.h b/components/apdu/apdu_response.h index 7f4807e7..2806fda6 100644 --- a/components/apdu/apdu_response.h +++ b/components/apdu/apdu_response.h
@@ -39,6 +39,10 @@ ApduResponse(std::vector<uint8_t> data, Status response_status); ApduResponse(ApduResponse&& that); ApduResponse& operator=(ApduResponse&& that); + + ApduResponse(const ApduResponse&) = delete; + ApduResponse& operator=(const ApduResponse&) = delete; + ~ApduResponse(); std::vector<uint8_t> GetEncodedResponse() const; @@ -51,8 +55,6 @@ std::vector<uint8_t> data_; Status response_status_; - - DISALLOW_COPY_AND_ASSIGN(ApduResponse); }; } // namespace apdu
diff --git a/components/arc/appfuse/arc_appfuse_bridge.h b/components/arc/appfuse/arc_appfuse_bridge.h index d3d9b1df..b06c4d3 100644 --- a/components/arc/appfuse/arc_appfuse_bridge.h +++ b/components/arc/appfuse/arc_appfuse_bridge.h
@@ -31,6 +31,10 @@ ArcAppfuseBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcAppfuseBridge(const ArcAppfuseBridge&) = delete; + ArcAppfuseBridge& operator=(const ArcAppfuseBridge&) = delete; + ~ArcAppfuseBridge() override; // mojom::AppfuseHost overrides: @@ -46,8 +50,6 @@ private: ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - - DISALLOW_COPY_AND_ASSIGN(ArcAppfuseBridge); }; } // namespace arc
diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h index dc79627..66795caa 100644 --- a/components/arc/arc_service_manager.h +++ b/components/arc/arc_service_manager.h
@@ -26,6 +26,10 @@ class ArcServiceManager { public: ArcServiceManager(); + + ArcServiceManager(const ArcServiceManager&) = delete; + ArcServiceManager& operator=(const ArcServiceManager&) = delete; + ~ArcServiceManager(); // Returns the current BrowserContext which ARC is allowed. @@ -78,8 +82,6 @@ // TODO(hidehiko): Remove this when we move IsArcAllowedForProfile() to // components/arc. See browser_context() for details. AccountId account_id_; - - DISALLOW_COPY_AND_ASSIGN(ArcServiceManager); }; } // namespace arc
diff --git a/components/arc/arc_util_unittest.cc b/components/arc/arc_util_unittest.cc index 13f27ee..c984ade 100644 --- a/components/arc/arc_util_unittest.cc +++ b/components/arc/arc_util_unittest.cc
@@ -50,11 +50,14 @@ feature_list.InitFromCommandLine(std::string(), kArcFeatureName); } } + + ScopedArcFeature(const ScopedArcFeature&) = delete; + ScopedArcFeature& operator=(const ScopedArcFeature&) = delete; + ~ScopedArcFeature() = default; private: base::test::ScopedFeatureList feature_list; - DISALLOW_COPY_AND_ASSIGN(ScopedArcFeature); }; class ScopedRtVcpuFeature { @@ -89,6 +92,10 @@ explicit FakeUser(user_manager::UserType user_type) : User(AccountId::FromUserEmailGaiaId("user@test.com", "1234567890")), user_type_(user_type) {} + + FakeUser(const FakeUser&) = delete; + FakeUser& operator=(const FakeUser&) = delete; + ~FakeUser() override = default; // user_manager::User: @@ -96,8 +103,6 @@ private: const user_manager::UserType user_type_; - - DISALLOW_COPY_AND_ASSIGN(FakeUser); }; class ArcUtilTest : public testing::Test {
diff --git a/components/arc/audio/arc_audio_bridge.h b/components/arc/audio/arc_audio_bridge.h index 01098ef..0394854 100644 --- a/components/arc/audio/arc_audio_bridge.h +++ b/components/arc/audio/arc_audio_bridge.h
@@ -32,6 +32,10 @@ ArcAudioBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcAudioBridge(const ArcAudioBridge&) = delete; + ArcAudioBridge& operator=(const ArcAudioBridge&) = delete; + ~ArcAudioBridge() override; // ConnectionObserver<mojom::AudioInstance> overrides. @@ -61,8 +65,6 @@ // Avoids sending requests when the instance is unavailable. // TODO(crbug.com/549195): Remove once the root cause is fixed. bool available_ = false; - - DISALLOW_COPY_AND_ASSIGN(ArcAudioBridge); }; } // namespace arc
diff --git a/components/arc/camera/arc_camera_bridge.cc b/components/arc/camera/arc_camera_bridge.cc index d55a643..b960333 100644 --- a/components/arc/camera/arc_camera_bridge.cc +++ b/components/arc/camera/arc_camera_bridge.cc
@@ -65,6 +65,11 @@ weak_ptr_factory_.GetWeakPtr())); } + PendingStartCameraServiceResult(const PendingStartCameraServiceResult&) = + delete; + PendingStartCameraServiceResult& operator=( + const PendingStartCameraServiceResult&) = delete; + ~PendingStartCameraServiceResult() = default; private: @@ -89,8 +94,6 @@ mojo::Remote<mojom::CameraService> service_; ArcCameraBridge::StartCameraServiceCallback callback_; base::WeakPtrFactory<PendingStartCameraServiceResult> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PendingStartCameraServiceResult); }; // static
diff --git a/components/arc/camera/arc_camera_bridge.h b/components/arc/camera/arc_camera_bridge.h index c5c44cc..1f0de7cd 100644 --- a/components/arc/camera/arc_camera_bridge.h +++ b/components/arc/camera/arc_camera_bridge.h
@@ -33,6 +33,10 @@ ArcCameraBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcCameraBridge(const ArcCameraBridge&) = delete; + ArcCameraBridge& operator=(const ArcCameraBridge&) = delete; + ~ArcCameraBridge() override; // mojom::CameraHost overrides: @@ -51,8 +55,6 @@ std::map<PendingStartCameraServiceResult*, std::unique_ptr<PendingStartCameraServiceResult>> pending_start_camera_service_results_; - - DISALLOW_COPY_AND_ASSIGN(ArcCameraBridge); }; } // namespace arc
diff --git a/components/arc/clipboard/arc_clipboard_bridge.h b/components/arc/clipboard/arc_clipboard_bridge.h index 72591ba5..3dc92d1 100644 --- a/components/arc/clipboard/arc_clipboard_bridge.h +++ b/components/arc/clipboard/arc_clipboard_bridge.h
@@ -30,6 +30,10 @@ ArcClipboardBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcClipboardBridge(const ArcClipboardBridge&) = delete; + ArcClipboardBridge& operator=(const ArcClipboardBridge&) = delete; + ~ArcClipboardBridge() override; // ClipboardObserver overrides. @@ -45,8 +49,6 @@ bool event_originated_at_instance_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridge); }; } // namespace arc
diff --git a/components/arc/clipboard/arc_clipboard_bridge_unittest.cc b/components/arc/clipboard/arc_clipboard_bridge_unittest.cc index 70ed56b..e84de6b087 100644 --- a/components/arc/clipboard/arc_clipboard_bridge_unittest.cc +++ b/components/arc/clipboard/arc_clipboard_bridge_unittest.cc
@@ -58,6 +58,10 @@ class ArcClipboardBridgeTest : public testing::Test { public: ArcClipboardBridgeTest() = default; + + ArcClipboardBridgeTest(const ArcClipboardBridgeTest&) = delete; + ArcClipboardBridgeTest& operator=(const ArcClipboardBridgeTest&) = delete; + ~ArcClipboardBridgeTest() override = default; void SetUp() override { @@ -81,8 +85,6 @@ std::unique_ptr<ArcBridgeService> arc_bridge_service_; std::unique_ptr<ArcClipboardBridge> clipboard_bridge_; std::unique_ptr<FakeClipboardInstance> clipboard_instance_; - - DISALLOW_COPY_AND_ASSIGN(ArcClipboardBridgeTest); }; TEST_F(ArcClipboardBridgeTest, GetClipContent_PlainText) {
diff --git a/components/arc/disk_quota/arc_disk_quota_bridge.h b/components/arc/disk_quota/arc_disk_quota_bridge.h index 6803f588..902c454 100644 --- a/components/arc/disk_quota/arc_disk_quota_bridge.h +++ b/components/arc/disk_quota/arc_disk_quota_bridge.h
@@ -40,6 +40,10 @@ ArcDiskQuotaBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcDiskQuotaBridge(const ArcDiskQuotaBridge&) = delete; + ArcDiskQuotaBridge& operator=(const ArcDiskQuotaBridge&) = delete; + ~ArcDiskQuotaBridge() override; void SetAccountId(const AccountId& account_id); @@ -65,8 +69,6 @@ ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. AccountId account_id_; - - DISALLOW_COPY_AND_ASSIGN(ArcDiskQuotaBridge); }; } // namespace arc
diff --git a/components/arc/ime/arc_ime_bridge.h b/components/arc/ime/arc_ime_bridge.h index cb4443ee..0d95293 100644 --- a/components/arc/ime/arc_ime_bridge.h +++ b/components/arc/ime/arc_ime_bridge.h
@@ -27,6 +27,9 @@ // Chromium and the ARC container. class ArcImeBridge { public: + ArcImeBridge(const ArcImeBridge&) = delete; + ArcImeBridge& operator=(const ArcImeBridge&) = delete; + virtual ~ArcImeBridge() {} // Received IPCs are deserialized and passed to this delegate. @@ -65,9 +68,6 @@ protected: ArcImeBridge() {} - - private: - DISALLOW_COPY_AND_ASSIGN(ArcImeBridge); }; } // namespace arc
diff --git a/components/arc/ime/arc_ime_bridge_impl.h b/components/arc/ime/arc_ime_bridge_impl.h index 55282e4..10d80be 100644 --- a/components/arc/ime/arc_ime_bridge_impl.h +++ b/components/arc/ime/arc_ime_bridge_impl.h
@@ -26,6 +26,10 @@ class ArcImeBridgeImpl : public ArcImeBridge, public mojom::ImeHost { public: ArcImeBridgeImpl(Delegate* delegate, ArcBridgeService* bridge_service); + + ArcImeBridgeImpl(const ArcImeBridgeImpl&) = delete; + ArcImeBridgeImpl& operator=(const ArcImeBridgeImpl&) = delete; + ~ArcImeBridgeImpl() override; // ArcImeBridge overrides: @@ -59,8 +63,6 @@ private: Delegate* const delegate_; ArcBridgeService* const bridge_service_; - - DISALLOW_COPY_AND_ASSIGN(ArcImeBridgeImpl); }; } // namespace arc
diff --git a/components/arc/ime/arc_ime_service.cc b/components/arc/ime/arc_ime_service.cc index 60812d3f..e838ffc 100644 --- a/components/arc/ime/arc_ime_service.cc +++ b/components/arc/ime/arc_ime_service.cc
@@ -69,6 +69,9 @@ explicit ArcWindowDelegateImpl(ArcImeService* ime_service) : ime_service_(ime_service) {} + ArcWindowDelegateImpl(const ArcWindowDelegateImpl&) = delete; + ArcWindowDelegateImpl& operator=(const ArcWindowDelegateImpl&) = delete; + ~ArcWindowDelegateImpl() override = default; bool IsInArcAppWindow(const aura::Window* window) const override { @@ -130,8 +133,6 @@ private: ArcImeService* const ime_service_; - - DISALLOW_COPY_AND_ASSIGN(ArcWindowDelegateImpl); }; // Singleton factory for ArcImeService.
diff --git a/components/arc/ime/arc_ime_service.h b/components/arc/ime/arc_ime_service.h index 4d7f134..84a0878 100644 --- a/components/arc/ime/arc_ime_service.h +++ b/components/arc/ime/arc_ime_service.h
@@ -67,6 +67,9 @@ ArcImeService(content::BrowserContext* context, ArcBridgeService* bridge_service); + ArcImeService(const ArcImeService&) = delete; + ArcImeService& operator=(const ArcImeService&) = delete; + ~ArcImeService() override; // Injects the custom IPC bridge object for testing purpose only. @@ -214,8 +217,6 @@ aura::Window* focused_arc_window_ = nullptr; std::unique_ptr<KeyEventResultReceiver> receiver_; - - DISALLOW_COPY_AND_ASSIGN(ArcImeService); }; } // namespace arc
diff --git a/components/arc/lock_screen/arc_lock_screen_bridge.h b/components/arc/lock_screen/arc_lock_screen_bridge.h index b105a2b..9fa57e32 100644 --- a/components/arc/lock_screen/arc_lock_screen_bridge.h +++ b/components/arc/lock_screen/arc_lock_screen_bridge.h
@@ -35,6 +35,10 @@ ArcLockScreenBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcLockScreenBridge(const ArcLockScreenBridge&) = delete; + ArcLockScreenBridge& operator=(const ArcLockScreenBridge&) = delete; + ~ArcLockScreenBridge() override; // ConnectionObserver<mojom::LockScreenInstance> overrides: @@ -50,8 +54,6 @@ THREAD_CHECKER(thread_checker_); ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - - DISALLOW_COPY_AND_ASSIGN(ArcLockScreenBridge); }; } // namespace arc
diff --git a/components/arc/media_session/arc_media_session_bridge.h b/components/arc/media_session/arc_media_session_bridge.h index b720af5..3cd8468 100644 --- a/components/arc/media_session/arc_media_session_bridge.h +++ b/components/arc/media_session/arc_media_session_bridge.h
@@ -35,6 +35,10 @@ ArcMediaSessionBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcMediaSessionBridge(const ArcMediaSessionBridge&) = delete; + ArcMediaSessionBridge& operator=(const ArcMediaSessionBridge&) = delete; + ~ArcMediaSessionBridge() override; // ConnectionObserver<mojom::MediaSessionInstance> overrides. @@ -45,8 +49,6 @@ void SetupAudioFocus(); ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - - DISALLOW_COPY_AND_ASSIGN(ArcMediaSessionBridge); }; } // namespace arc
diff --git a/components/arc/metrics/arc_metrics_service.h b/components/arc/metrics/arc_metrics_service.h index 3c367e5..700e4dde 100644 --- a/components/arc/metrics/arc_metrics_service.h +++ b/components/arc/metrics/arc_metrics_service.h
@@ -81,6 +81,10 @@ ArcMetricsService(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcMetricsService(const ArcMetricsService&) = delete; + ArcMetricsService& operator=(const ArcMetricsService&) = delete; + ~ArcMetricsService() override; // KeyedService overrides. @@ -164,6 +168,10 @@ class ProcessObserver : public ConnectionObserver<mojom::ProcessInstance> { public: explicit ProcessObserver(ArcMetricsService* arc_metrics_service); + + ProcessObserver(const ProcessObserver&) = delete; + ProcessObserver& operator=(const ProcessObserver&) = delete; + ~ProcessObserver() override; private: @@ -172,13 +180,16 @@ void OnConnectionClosed() override; ArcMetricsService* arc_metrics_service_; - - DISALLOW_COPY_AND_ASSIGN(ProcessObserver); }; class ArcBridgeServiceObserver : public arc::ArcBridgeService::Observer { public: ArcBridgeServiceObserver(); + + ArcBridgeServiceObserver(const ArcBridgeServiceObserver&) = delete; + ArcBridgeServiceObserver& operator=(const ArcBridgeServiceObserver&) = + delete; + ~ArcBridgeServiceObserver() override; // Whether the arc bridge is in the process of closing. @@ -188,7 +199,6 @@ // arc::ArcBridgeService::Observer overrides. void BeforeArcBridgeClosed() override; void AfterArcBridgeClosed() override; - DISALLOW_COPY_AND_ASSIGN(ArcBridgeServiceObserver); }; class IntentHelperObserver @@ -196,6 +206,10 @@ public: IntentHelperObserver(ArcMetricsService* arc_metrics_service, ArcBridgeServiceObserver* arc_bridge_service_observer); + + IntentHelperObserver(const IntentHelperObserver&) = delete; + IntentHelperObserver& operator=(const IntentHelperObserver&) = delete; + ~IntentHelperObserver() override; private: @@ -205,14 +219,16 @@ ArcMetricsService* arc_metrics_service_; ArcBridgeServiceObserver* arc_bridge_service_observer_; - - DISALLOW_COPY_AND_ASSIGN(IntentHelperObserver); }; class AppLauncherObserver : public ConnectionObserver<mojom::AppInstance> { public: AppLauncherObserver(ArcMetricsService* arc_metrics_service, ArcBridgeServiceObserver* arc_bridge_service_observer); + + AppLauncherObserver(const AppLauncherObserver&) = delete; + AppLauncherObserver& operator=(const AppLauncherObserver&) = delete; + ~AppLauncherObserver() override; private: @@ -222,8 +238,6 @@ ArcMetricsService* arc_metrics_service_; ArcBridgeServiceObserver* arc_bridge_service_observer_; - - DISALLOW_COPY_AND_ASSIGN(AppLauncherObserver); }; void RecordArcUserInteraction(UserInteractionType type); @@ -271,8 +285,6 @@ // Always keep this the last member of this class to make sure it's the // first thing to be destructed. base::WeakPtrFactory<ArcMetricsService> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcMetricsService); }; // Singleton factory for ArcMetricsService.
diff --git a/components/arc/midis/arc_midis_bridge.h b/components/arc/midis/arc_midis_bridge.h index d5a1a24c..d29d190b 100644 --- a/components/arc/midis/arc_midis_bridge.h +++ b/components/arc/midis/arc_midis_bridge.h
@@ -33,6 +33,10 @@ ArcMidisBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcMidisBridge(const ArcMidisBridge&) = delete; + ArcMidisBridge& operator=(const ArcMidisBridge&) = delete; + ~ArcMidisBridge() override; // Midis Mojo host interface @@ -51,8 +55,6 @@ // WeakPtrFactory to use for callbacks. base::WeakPtrFactory<ArcMidisBridge> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcMidisBridge); }; } // namespace arc
diff --git a/components/arc/net/always_on_vpn_manager.h b/components/arc/net/always_on_vpn_manager.h index 40c7a44..15b26c70f 100644 --- a/components/arc/net/always_on_vpn_manager.h +++ b/components/arc/net/always_on_vpn_manager.h
@@ -14,6 +14,10 @@ class AlwaysOnVpnManager { public: explicit AlwaysOnVpnManager(PrefService* pref_service); + + AlwaysOnVpnManager(const AlwaysOnVpnManager&) = delete; + AlwaysOnVpnManager& operator=(const AlwaysOnVpnManager&) = delete; + ~AlwaysOnVpnManager(); private: @@ -21,8 +25,6 @@ void OnPrefChanged(); PrefChangeRegistrar registrar_; - - DISALLOW_COPY_AND_ASSIGN(AlwaysOnVpnManager); }; } // namespace arc
diff --git a/components/arc/net/arc_net_host_impl.h b/components/arc/net/arc_net_host_impl.h index d590683..978e860 100644 --- a/components/arc/net/arc_net_host_impl.h +++ b/components/arc/net/arc_net_host_impl.h
@@ -49,6 +49,10 @@ // The constructor will register an Observer with ArcBridgeService. ArcNetHostImpl(content::BrowserContext* context, ArcBridgeService* arc_bridge_service); + + ArcNetHostImpl(const ArcNetHostImpl&) = delete; + ArcNetHostImpl& operator=(const ArcNetHostImpl&) = delete; + ~ArcNetHostImpl() override; void SetPrefService(PrefService* pref_service); @@ -169,8 +173,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<ArcNetHostImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcNetHostImpl); }; } // namespace arc
diff --git a/components/arc/obb_mounter/arc_obb_mounter_bridge.h b/components/arc/obb_mounter/arc_obb_mounter_bridge.h index 707ea27..b3b0317 100644 --- a/components/arc/obb_mounter/arc_obb_mounter_bridge.h +++ b/components/arc/obb_mounter/arc_obb_mounter_bridge.h
@@ -31,6 +31,10 @@ ArcObbMounterBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcObbMounterBridge(const ArcObbMounterBridge&) = delete; + ArcObbMounterBridge& operator=(const ArcObbMounterBridge&) = delete; + ~ArcObbMounterBridge() override; // mojom::ObbMounterHost overrides: @@ -43,8 +47,6 @@ private: ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - - DISALLOW_COPY_AND_ASSIGN(ArcObbMounterBridge); }; } // namespace arc
diff --git a/components/arc/power/arc_power_bridge.cc b/components/arc/power/arc_power_bridge.cc index c6cda20..120f292 100644 --- a/components/arc/power/arc_power_bridge.cc +++ b/components/arc/power/arc_power_bridge.cc
@@ -61,6 +61,10 @@ WakeLockRequestor(device::mojom::WakeLockType type, device::mojom::WakeLockProvider* provider) : type_(type), provider_(provider) {} + + WakeLockRequestor(const WakeLockRequestor&) = delete; + WakeLockRequestor& operator=(const WakeLockRequestor&) = delete; + ~WakeLockRequestor() = default; // Increments the number of outstanding requests from Android and requests a @@ -111,8 +115,6 @@ // Lazily initialized in response to first request. mojo::Remote<device::mojom::WakeLock> wake_lock_; - - DISALLOW_COPY_AND_ASSIGN(WakeLockRequestor); }; // static
diff --git a/components/arc/power/arc_power_bridge.h b/components/arc/power/arc_power_bridge.h index db5609eb..a9f282b 100644 --- a/components/arc/power/arc_power_bridge.h +++ b/components/arc/power/arc_power_bridge.h
@@ -53,6 +53,10 @@ ArcPowerBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcPowerBridge(const ArcPowerBridge&) = delete; + ArcPowerBridge& operator=(const ArcPowerBridge&) = delete; + ~ArcPowerBridge() override; void AddObserver(Observer* observer); @@ -149,8 +153,6 @@ bool is_suspending_ = false; base::WeakPtrFactory<ArcPowerBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcPowerBridge); }; } // namespace arc
diff --git a/components/arc/power/arc_power_bridge_unittest.cc b/components/arc/power/arc_power_bridge_unittest.cc index fdf2249..448b10c 100644 --- a/components/arc/power/arc_power_bridge_unittest.cc +++ b/components/arc/power/arc_power_bridge_unittest.cc
@@ -61,6 +61,10 @@ static constexpr double kInitialBrightness = 100.0; ArcPowerBridgeTest() = default; + + ArcPowerBridgeTest(const ArcPowerBridgeTest&) = delete; + ArcPowerBridgeTest& operator=(const ArcPowerBridgeTest&) = delete; + ~ArcPowerBridgeTest() override = default; void SetUp() override { @@ -146,8 +150,6 @@ std::unique_ptr<ArcPowerBridge> power_bridge_; std::unique_ptr<device::TestWakeLockProvider> wake_lock_provider_; - - DISALLOW_COPY_AND_ASSIGN(ArcPowerBridgeTest); }; TEST_F(ArcPowerBridgeTest, SuspendAndResume) {
diff --git a/components/arc/rotation_lock/arc_rotation_lock_bridge.h b/components/arc/rotation_lock/arc_rotation_lock_bridge.h index 4bb2847..8a05ddfc 100644 --- a/components/arc/rotation_lock/arc_rotation_lock_bridge.h +++ b/components/arc/rotation_lock/arc_rotation_lock_bridge.h
@@ -38,6 +38,10 @@ ArcRotationLockBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcRotationLockBridge(const ArcRotationLockBridge&) = delete; + ArcRotationLockBridge& operator=(const ArcRotationLockBridge&) = delete; + ~ArcRotationLockBridge() override; // ConnectionObserver<mojom::RotationLockInstance>: @@ -55,8 +59,6 @@ THREAD_CHECKER(thread_checker_); ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - - DISALLOW_COPY_AND_ASSIGN(ArcRotationLockBridge); }; } // namespace arc
diff --git a/components/arc/session/arc_bridge_host_impl.h b/components/arc/session/arc_bridge_host_impl.h index ba36dc0..6bf877b4 100644 --- a/components/arc/session/arc_bridge_host_impl.h +++ b/components/arc/session/arc_bridge_host_impl.h
@@ -36,6 +36,10 @@ ArcBridgeHostImpl( ArcBridgeService* arc_bridge_service, mojo::PendingReceiver<mojom::ArcBridgeHost> pending_receiver); + + ArcBridgeHostImpl(const ArcBridgeHostImpl&) = delete; + ArcBridgeHostImpl& operator=(const ArcBridgeHostImpl&) = delete; + ~ArcBridgeHostImpl() override; // ArcBridgeHost overrides. @@ -208,8 +212,6 @@ // Put as a last member to ensure that any callback tied to the elements // is not invoked. std::vector<std::unique_ptr<MojoChannelBase>> mojo_channels_; - - DISALLOW_COPY_AND_ASSIGN(ArcBridgeHostImpl); }; } // namespace arc
diff --git a/components/arc/session/arc_client_adapter.h b/components/arc/session/arc_client_adapter.h index d8af3b9..50a1cad 100644 --- a/components/arc/session/arc_client_adapter.h +++ b/components/arc/session/arc_client_adapter.h
@@ -49,6 +49,10 @@ // Creates a default instance of ArcClientAdapter. static std::unique_ptr<ArcClientAdapter> Create(); + + ArcClientAdapter(const ArcClientAdapter&) = delete; + ArcClientAdapter& operator=(const ArcClientAdapter&) = delete; + virtual ~ArcClientAdapter(); // StartMiniArc starts ARC with only a handful of ARC processes for Chrome OS @@ -88,9 +92,6 @@ ArcClientAdapter(); base::ObserverList<Observer>::Unchecked observer_list_; - - private: - DISALLOW_COPY_AND_ASSIGN(ArcClientAdapter); }; } // namespace arc
diff --git a/components/arc/session/arc_container_client_adapter.cc b/components/arc/session/arc_container_client_adapter.cc index 7034957..041de4af 100644 --- a/components/arc/session/arc_container_client_adapter.cc +++ b/components/arc/session/arc_container_client_adapter.cc
@@ -103,6 +103,10 @@ chromeos::SessionManagerClient::Get()->AddObserver(this); } + ArcContainerClientAdapter(const ArcContainerClientAdapter&) = delete; + ArcContainerClientAdapter& operator=(const ArcContainerClientAdapter&) = + delete; + ~ArcContainerClientAdapter() override { if (chromeos::SessionManagerClient::Get()) chromeos::SessionManagerClient::Get()->RemoveObserver(this); @@ -220,8 +224,6 @@ private: // A cryptohome ID of the primary profile. cryptohome::Identification cryptohome_id_; - - DISALLOW_COPY_AND_ASSIGN(ArcContainerClientAdapter); }; std::unique_ptr<ArcClientAdapter> CreateArcContainerClientAdapter() {
diff --git a/components/arc/session/arc_data_remover.h b/components/arc/session/arc_data_remover.h index fbc1ca2a..d316e6c6 100644 --- a/components/arc/session/arc_data_remover.h +++ b/components/arc/session/arc_data_remover.h
@@ -22,6 +22,10 @@ public: ArcDataRemover(PrefService* prefs, const cryptohome::Identification& cryptohome_id); + + ArcDataRemover(const ArcDataRemover&) = delete; + ArcDataRemover& operator=(const ArcDataRemover&) = delete; + ~ArcDataRemover(); // Schedules to remove the data. This is persistent, calling Run() just @@ -49,7 +53,6 @@ const cryptohome::Identification cryptohome_id_; base::WeakPtrFactory<ArcDataRemover> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ArcDataRemover); }; } // namespace arc
diff --git a/components/arc/session/arc_data_remover_unittest.cc b/components/arc/session/arc_data_remover_unittest.cc index 91ece35..e44b8d7 100644 --- a/components/arc/session/arc_data_remover_unittest.cc +++ b/components/arc/session/arc_data_remover_unittest.cc
@@ -27,6 +27,10 @@ class TestUpstartClient : public chromeos::FakeUpstartClient { public: TestUpstartClient() = default; + + TestUpstartClient(const TestUpstartClient&) = delete; + TestUpstartClient& operator=(const TestUpstartClient&) = delete; + ~TestUpstartClient() override = default; void StartJob(const std::string& job, @@ -40,8 +44,6 @@ private: bool arc_available_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestUpstartClient); }; class ArcDataRemoverTest : public testing::Test {
diff --git a/components/arc/session/arc_session_impl.cc b/components/arc/session/arc_session_impl.cc index 22fffcf..ac30e84 100644 --- a/components/arc/session/arc_session_impl.cc +++ b/components/arc/session/arc_session_impl.cc
@@ -171,6 +171,10 @@ public: ArcSessionDelegateImpl(ArcBridgeService* arc_bridge_service, version_info::Channel channel); + + ArcSessionDelegateImpl(const ArcSessionDelegateImpl&) = delete; + ArcSessionDelegateImpl& operator=(const ArcSessionDelegateImpl&) = delete; + ~ArcSessionDelegateImpl() override = default; // ArcSessionImpl::Delegate override. @@ -206,8 +210,6 @@ // WeakPtrFactory to use callbacks. base::WeakPtrFactory<ArcSessionDelegateImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcSessionDelegateImpl); }; ArcSessionDelegateImpl::ArcSessionDelegateImpl(
diff --git a/components/arc/session/arc_session_impl.h b/components/arc/session/arc_session_impl.h index c354b37..e2fc1eb 100644 --- a/components/arc/session/arc_session_impl.h +++ b/components/arc/session/arc_session_impl.h
@@ -169,6 +169,10 @@ scheduler_configuration_manager, AdbSideloadingAvailabilityDelegate* adb_sideloading_availability_delegate); + + ArcSessionImpl(const ArcSessionImpl&) = delete; + ArcSessionImpl& operator=(const ArcSessionImpl&) = delete; + ~ArcSessionImpl() override; // Returns default delegate implementation used for the production. @@ -295,8 +299,6 @@ // WeakPtrFactory to use callbacks. base::WeakPtrFactory<ArcSessionImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcSessionImpl); }; // Stringified output for logging purpose.
diff --git a/components/arc/session/arc_session_impl_unittest.cc b/components/arc/session/arc_session_impl_unittest.cc index 4712d80a..189c325 100644 --- a/components/arc/session/arc_session_impl_unittest.cc +++ b/components/arc/session/arc_session_impl_unittest.cc
@@ -221,6 +221,9 @@ arc_session_->AddObserver(this); } + TestArcSessionObserver(const TestArcSessionObserver&) = delete; + TestArcSessionObserver& operator=(const TestArcSessionObserver&) = delete; + ~TestArcSessionObserver() override { arc_session_->RemoveObserver(this); } const absl::optional<OnSessionStoppedArgs>& on_session_stopped_args() const { @@ -241,8 +244,6 @@ ArcSession* const arc_session_; // Not owned. base::RunLoop* const run_loop_ = nullptr; // Not owned. absl::optional<OnSessionStoppedArgs> on_session_stopped_args_; - - DISALLOW_COPY_AND_ASSIGN(TestArcSessionObserver); }; // Custom deleter for ArcSession testing. @@ -259,6 +260,12 @@ : public chromeos::SchedulerConfigurationManagerBase { public: FakeSchedulerConfigurationManager() = default; + + FakeSchedulerConfigurationManager(const FakeSchedulerConfigurationManager&) = + delete; + FakeSchedulerConfigurationManager& operator=( + const FakeSchedulerConfigurationManager&) = delete; + ~FakeSchedulerConfigurationManager() override = default; void SetLastReply(size_t num_cores_disabled) { @@ -273,8 +280,6 @@ private: absl::optional<std::pair<bool, size_t>> reply_; - - DISALLOW_COPY_AND_ASSIGN(FakeSchedulerConfigurationManager); }; class FakeAdbSideloadingAvailabilityDelegate @@ -300,6 +305,10 @@ class ArcSessionImplTest : public testing::Test { public: ArcSessionImplTest() = default; + + ArcSessionImplTest(const ArcSessionImplTest&) = delete; + ArcSessionImplTest& operator=(const ArcSessionImplTest&) = delete; + ~ArcSessionImplTest() override = default; std::unique_ptr<ArcSessionImpl, ArcSessionDeleter> CreateArcSession( @@ -354,8 +363,6 @@ } base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(ArcSessionImplTest); }; // Starting mini container success case.
diff --git a/components/arc/session/arc_vm_client_adapter.cc b/components/arc/session/arc_vm_client_adapter.cc index 3e7ad45f..622382b 100644 --- a/components/arc/session/arc_vm_client_adapter.cc +++ b/components/arc/session/arc_vm_client_adapter.cc
@@ -551,6 +551,9 @@ arc_service_manager->arc_bridge_service()->app()->AddObserver(this); } + ArcVmClientAdapter(const ArcVmClientAdapter&) = delete; + ArcVmClientAdapter& operator=(const ArcVmClientAdapter&) = delete; + ~ArcVmClientAdapter() override { auto* arc_service_manager = arc::ArcServiceManager::Get(); if (arc_service_manager) @@ -1169,8 +1172,6 @@ // For callbacks. base::WeakPtrFactory<ArcVmClientAdapter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcVmClientAdapter); }; std::unique_ptr<ArcClientAdapter> CreateArcVmClientAdapter() {
diff --git a/components/arc/session/arc_vm_client_adapter_unittest.cc b/components/arc/session/arc_vm_client_adapter_unittest.cc index e79bc517..be73eb4 100644 --- a/components/arc/session/arc_vm_client_adapter_unittest.cc +++ b/components/arc/session/arc_vm_client_adapter_unittest.cc
@@ -120,6 +120,10 @@ class TestDebugDaemonClient : public chromeos::FakeDebugDaemonClient { public: TestDebugDaemonClient() = default; + + TestDebugDaemonClient(const TestDebugDaemonClient&) = delete; + TestDebugDaemonClient& operator=(const TestDebugDaemonClient&) = delete; + ~TestDebugDaemonClient() override = default; void BackupArcBugReport(const cryptohome::AccountIdentifier& id, @@ -138,8 +142,6 @@ private: bool backup_arc_bug_report_called_ = false; bool backup_arc_bug_report_result_ = true; - - DISALLOW_COPY_AND_ASSIGN(TestDebugDaemonClient); }; // A concierge that remembers the parameter passed to StartArcVm. @@ -147,6 +149,10 @@ class TestConciergeClient : public chromeos::FakeConciergeClient { public: static void Initialize() { new TestConciergeClient(); } + + TestConciergeClient(const TestConciergeClient&) = delete; + TestConciergeClient& operator=(const TestConciergeClient&) = delete; + ~TestConciergeClient() override = default; void StopVm(const vm_tools::concierge::StopVmRequest& request, @@ -194,8 +200,6 @@ vm_tools::concierge::StartArcVmRequest start_arc_vm_request_; vm_tools::concierge::StopVmRequest stop_vm_request_; base::OnceClosure on_stop_vm_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestConciergeClient); }; // A fake ArcVmBootNotificationServer that listens on an UDS and records @@ -307,6 +311,9 @@ chromeos::UpstartClient::InitializeFake(); } + ArcVmClientAdapterTest(const ArcVmClientAdapterTest&) = delete; + ArcVmClientAdapterTest& operator=(const ArcVmClientAdapterTest&) = delete; + ~ArcVmClientAdapterTest() override { chromeos::ConciergeClient::Shutdown(); chromeos::DBusThreadManager::Shutdown(); @@ -636,8 +643,6 @@ FakeDemoModeDelegate demo_mode_delegate_; std::unique_ptr<FakeAppHost> app_host_; std::unique_ptr<FakeAppInstance> app_instance_; - - DISALLOW_COPY_AND_ASSIGN(ArcVmClientAdapterTest); }; // Tests that SetUserInfo() doesn't crash.
diff --git a/components/arc/session/connection_notifier.h b/components/arc/session/connection_notifier.h index 46121f2..6f00e2c 100644 --- a/components/arc/session/connection_notifier.h +++ b/components/arc/session/connection_notifier.h
@@ -19,6 +19,10 @@ class ConnectionNotifier { public: ConnectionNotifier(); + + ConnectionNotifier(const ConnectionNotifier&) = delete; + ConnectionNotifier& operator=(const ConnectionNotifier&) = delete; + ~ConnectionNotifier(); void AddObserver(ConnectionObserverBase* observer); @@ -33,8 +37,6 @@ private: THREAD_CHECKER(thread_checker_); base::ObserverList<ConnectionObserverBase>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionNotifier); }; } // namespace internal
diff --git a/components/arc/session/mojo_channel.h b/components/arc/session/mojo_channel.h index 3be3937..58149a6d 100644 --- a/components/arc/session/mojo_channel.h +++ b/components/arc/session/mojo_channel.h
@@ -18,13 +18,13 @@ // Thin interface to wrap Remote<T> with type erasure. class MojoChannelBase { public: + MojoChannelBase(const MojoChannelBase&) = delete; + MojoChannelBase& operator=(const MojoChannelBase&) = delete; + virtual ~MojoChannelBase() = default; protected: MojoChannelBase() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(MojoChannelBase); }; // Thin wrapper for Remote<T>, where T is one of ARC mojo Instance class. @@ -37,6 +37,9 @@ // Delay registration to the ConnectionHolder until the version is ready. } + MojoChannel(const MojoChannel&) = delete; + MojoChannel& operator=(const MojoChannel&) = delete; + ~MojoChannel() override { holder_->CloseInstance(remote_.get()); } void set_disconnect_handler(base::OnceClosure error_handler) { @@ -60,8 +63,6 @@ // Put as a last member to ensure that any callback tied to the |remote_| // is not invoked. mojo::Remote<InstanceType> remote_; - - DISALLOW_COPY_AND_ASSIGN(MojoChannel); }; } // namespace arc
diff --git a/components/arc/storage_manager/arc_storage_manager.h b/components/arc/storage_manager/arc_storage_manager.h index e56c9b5..a99395e8 100644 --- a/components/arc/storage_manager/arc_storage_manager.h +++ b/components/arc/storage_manager/arc_storage_manager.h
@@ -30,6 +30,10 @@ ArcStorageManager(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcStorageManager(const ArcStorageManager&) = delete; + ArcStorageManager& operator=(const ArcStorageManager&) = delete; + ~ArcStorageManager() override; // Opens detailed preference screen of private volume on ARC. @@ -46,8 +50,6 @@ private: ArcBridgeService* const arc_bridge_service_; - - DISALLOW_COPY_AND_ASSIGN(ArcStorageManager); }; } // namespace arc
diff --git a/components/arc/test/connection_holder_util.h b/components/arc/test/connection_holder_util.h index 317ea4ae..5d663af 100644 --- a/components/arc/test/connection_holder_util.h +++ b/components/arc/test/connection_holder_util.h
@@ -26,6 +26,10 @@ : holder_(holder), closure_(std::move(closure)) { holder_->AddObserver(this); } + + ReadinessObserver(const ReadinessObserver&) = delete; + ReadinessObserver& operator=(const ReadinessObserver&) = delete; + ~ReadinessObserver() override { holder_->RemoveObserver(this); } private: @@ -37,8 +41,6 @@ ConnectionHolder<InstanceType, HostType>* const holder_; // Owned by caller base::OnceClosure closure_; - - DISALLOW_COPY_AND_ASSIGN(ReadinessObserver); }; } // namespace internal
diff --git a/components/arc/test/fake_accessibility_helper_instance.h b/components/arc/test/fake_accessibility_helper_instance.h index 81589fbdf7..77384e6 100644 --- a/components/arc/test/fake_accessibility_helper_instance.h +++ b/components/arc/test/fake_accessibility_helper_instance.h
@@ -14,6 +14,12 @@ : public mojom::AccessibilityHelperInstance { public: FakeAccessibilityHelperInstance(); + + FakeAccessibilityHelperInstance(const FakeAccessibilityHelperInstance&) = + delete; + FakeAccessibilityHelperInstance& operator=( + const FakeAccessibilityHelperInstance&) = delete; + ~FakeAccessibilityHelperInstance() override; void Init(mojo::PendingRemote<mojom::AccessibilityHelperHost> host_remote, @@ -54,8 +60,6 @@ mojom::AccessibilityActionDataPtr last_requested_action_; mojom::AccessibilityWindowKeyPtr last_requested_tree_window_key_; RefreshWithExtraDataCallback refresh_with_extra_data_callback_; - - DISALLOW_COPY_AND_ASSIGN(FakeAccessibilityHelperInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_app_instance.h b/components/arc/test/fake_app_instance.h index 1ab4eac..8ff3a92 100644 --- a/components/arc/test/fake_app_instance.h +++ b/components/arc/test/fake_app_instance.h
@@ -33,6 +33,10 @@ public: Request(const std::string& package_name, const std::string& activity) : package_name_(package_name), activity_(activity) {} + + Request(const Request&) = delete; + Request& operator=(const Request&) = delete; + ~Request() {} const std::string& package_name() const { return package_name_; } @@ -47,8 +51,6 @@ private: std::string package_name_; std::string activity_; - - DISALLOW_COPY_AND_ASSIGN(Request); }; class IconRequest : public Request { @@ -58,14 +60,16 @@ int dimension) : Request(package_name, activity), dimension_(static_cast<int>(dimension)) {} + + IconRequest(const IconRequest&) = delete; + IconRequest& operator=(const IconRequest&) = delete; + ~IconRequest() {} int dimension() const { return dimension_; } private: const int dimension_; - - DISALLOW_COPY_AND_ASSIGN(IconRequest); }; class ShortcutIconRequest { @@ -73,6 +77,10 @@ ShortcutIconRequest(const std::string& icon_resource_id, int dimension) : icon_resource_id_(icon_resource_id), dimension_(static_cast<int>(dimension)) {} + + ShortcutIconRequest(const ShortcutIconRequest&) = delete; + ShortcutIconRequest& operator=(const ShortcutIconRequest&) = delete; + ~ShortcutIconRequest() {} const std::string& icon_resource_id() const { return icon_resource_id_; } @@ -81,8 +89,6 @@ private: const std::string icon_resource_id_; const int dimension_; - - DISALLOW_COPY_AND_ASSIGN(ShortcutIconRequest); }; explicit FakeAppInstance(mojom::AppHost* app_host);
diff --git a/components/arc/test/fake_arc_bridge_host.h b/components/arc/test/fake_arc_bridge_host.h index cff9cd2..75d602bc 100644 --- a/components/arc/test/fake_arc_bridge_host.h +++ b/components/arc/test/fake_arc_bridge_host.h
@@ -14,6 +14,10 @@ class FakeArcBridgeHost : public mojom::ArcBridgeHost { public: FakeArcBridgeHost(); + + FakeArcBridgeHost(const FakeArcBridgeHost&) = delete; + FakeArcBridgeHost& operator=(const FakeArcBridgeHost&) = delete; + ~FakeArcBridgeHost() override; // ArcBridgeHost overrides. @@ -159,9 +163,6 @@ mojo::PendingRemote<mojom::WallpaperInstance> wallpaper_remote) override; void OnWebApkInstanceReady( mojo::PendingRemote<mojom::WebApkInstance> webapk_instance) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeArcBridgeHost); }; } // namespace arc
diff --git a/components/arc/test/fake_arc_session.h b/components/arc/test/fake_arc_session.h index 696e779..164141d 100644 --- a/components/arc/test/fake_arc_session.h +++ b/components/arc/test/fake_arc_session.h
@@ -22,6 +22,10 @@ class FakeArcSession : public ArcSession { public: FakeArcSession(); + + FakeArcSession(const FakeArcSession&) = delete; + FakeArcSession& operator=(const FakeArcSession&) = delete; + ~FakeArcSession() override; // ArcSession overrides: @@ -73,8 +77,6 @@ bool running_ = false; bool stop_requested_ = false; std::string upgrade_locale_param_; - - DISALLOW_COPY_AND_ASSIGN(FakeArcSession); }; } // namespace arc
diff --git a/components/arc/test/fake_backup_settings_instance.h b/components/arc/test/fake_backup_settings_instance.h index d6e681b..865fd10e 100644 --- a/components/arc/test/fake_backup_settings_instance.h +++ b/components/arc/test/fake_backup_settings_instance.h
@@ -13,6 +13,11 @@ class FakeBackupSettingsInstance : public mojom::BackupSettingsInstance { public: FakeBackupSettingsInstance(); + + FakeBackupSettingsInstance(const FakeBackupSettingsInstance&) = delete; + FakeBackupSettingsInstance& operator=(const FakeBackupSettingsInstance&) = + delete; + ~FakeBackupSettingsInstance() override; // mojom::BackupSettingsInstance overrides: @@ -28,8 +33,6 @@ int set_backup_enabled_count_ = 0; bool enabled_ = false; bool managed_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeBackupSettingsInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_bluetooth_instance.h b/components/arc/test/fake_bluetooth_instance.h index 85b661a5..4074ff5c 100644 --- a/components/arc/test/fake_bluetooth_instance.h +++ b/components/arc/test/fake_bluetooth_instance.h
@@ -25,6 +25,10 @@ public: GattDBResult(mojom::BluetoothAddressPtr&& remote_addr, std::vector<mojom::BluetoothGattDBElementPtr>&& db); + + GattDBResult(const GattDBResult&) = delete; + GattDBResult& operator=(const GattDBResult&) = delete; + ~GattDBResult(); const mojom::BluetoothAddressPtr& remote_addr() const { @@ -38,8 +42,6 @@ private: mojom::BluetoothAddressPtr remote_addr_; std::vector<mojom::BluetoothGattDBElementPtr> db_; - - DISALLOW_COPY_AND_ASSIGN(GattDBResult); }; class LEDeviceFoundData { @@ -47,6 +49,10 @@ LEDeviceFoundData(mojom::BluetoothAddressPtr addr, int32_t rssi, const std::vector<uint8_t>& eir); + + LEDeviceFoundData(const LEDeviceFoundData&) = delete; + LEDeviceFoundData& operator=(const LEDeviceFoundData&) = delete; + ~LEDeviceFoundData(); const mojom::BluetoothAddressPtr& addr() const { return addr_; } @@ -59,8 +65,6 @@ mojom::BluetoothAddressPtr addr_; int32_t rssi_; std::vector<uint8_t> eir_; - - DISALLOW_COPY_AND_ASSIGN(LEDeviceFoundData); }; class ConnectionStateChangedData { @@ -68,6 +72,11 @@ ConnectionStateChangedData(mojom::BluetoothAddressPtr addr, device::BluetoothTransport device_type, bool connected); + + ConnectionStateChangedData(const ConnectionStateChangedData&) = delete; + ConnectionStateChangedData& operator=(const ConnectionStateChangedData&) = + delete; + ~ConnectionStateChangedData(); const mojom::BluetoothAddressPtr& addr() const { return addr_; } @@ -78,14 +87,17 @@ mojom::BluetoothAddressPtr addr_; device::BluetoothTransport device_type_; bool connected_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionStateChangedData); }; class LEConnectionStateChangeData { public: LEConnectionStateChangeData(mojom::BluetoothAddressPtr addr, bool connected); + + LEConnectionStateChangeData(const LEConnectionStateChangeData&) = delete; + LEConnectionStateChangeData& operator=(const LEConnectionStateChangeData&) = + delete; + ~LEConnectionStateChangeData(); const mojom::BluetoothAddressPtr& addr() const { return addr_; } @@ -94,8 +106,6 @@ private: mojom::BluetoothAddressPtr addr_; bool connected_; - - DISALLOW_COPY_AND_ASSIGN(LEConnectionStateChangeData); }; FakeBluetoothInstance();
diff --git a/components/arc/test/fake_clipboard_instance.h b/components/arc/test/fake_clipboard_instance.h index 5e2d3eaf..3a8848e1 100644 --- a/components/arc/test/fake_clipboard_instance.h +++ b/components/arc/test/fake_clipboard_instance.h
@@ -14,6 +14,10 @@ class FakeClipboardInstance : public mojom::ClipboardInstance { public: FakeClipboardInstance(); + + FakeClipboardInstance(const FakeClipboardInstance&) = delete; + FakeClipboardInstance& operator=(const FakeClipboardInstance&) = delete; + ~FakeClipboardInstance() override; int num_host_clipboard_updated() const { return num_host_clipboard_updated_; } @@ -27,8 +31,6 @@ private: int num_host_clipboard_updated_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeClipboardInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_file_system_instance.h b/components/arc/test/fake_file_system_instance.h index caed0c76..aa8e13f 100644 --- a/components/arc/test/fake_file_system_instance.h +++ b/components/arc/test/fake_file_system_instance.h
@@ -211,6 +211,10 @@ }; FakeFileSystemInstance(); + + FakeFileSystemInstance(const FakeFileSystemInstance&) = delete; + FakeFileSystemInstance& operator=(const FakeFileSystemInstance&) = delete; + ~FakeFileSystemInstance() override; // Returns true if Init() has been called. @@ -440,8 +444,6 @@ int64_t next_watcher_id_ = 1; int get_child_documents_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeFileSystemInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_intent_helper_instance.h b/components/arc/test/fake_intent_helper_instance.h index 363a1fb..0c62917e 100644 --- a/components/arc/test/fake_intent_helper_instance.h +++ b/components/arc/test/fake_intent_helper_instance.h
@@ -64,6 +64,9 @@ void SetIntentHandlers(const std::string& action, std::vector<mojom::IntentHandlerInfoPtr> handlers); + FakeIntentHelperInstance(const FakeIntentHelperInstance&) = delete; + FakeIntentHelperInstance& operator=(const FakeIntentHelperInstance&) = delete; + // mojom::IntentHelperInstance: ~FakeIntentHelperInstance() override; @@ -150,8 +153,6 @@ // Keeps the binding alive so that calls to this class can be correctly // routed. mojo::Remote<mojom::IntentHelperHost> host_remote_; - - DISALLOW_COPY_AND_ASSIGN(FakeIntentHelperInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_notifications_instance.h b/components/arc/test/fake_notifications_instance.h index 144fd9b..406079f3 100644 --- a/components/arc/test/fake_notifications_instance.h +++ b/components/arc/test/fake_notifications_instance.h
@@ -17,6 +17,11 @@ class FakeNotificationsInstance : public mojom::NotificationsInstance { public: FakeNotificationsInstance(); + + FakeNotificationsInstance(const FakeNotificationsInstance&) = delete; + FakeNotificationsInstance& operator=(const FakeNotificationsInstance&) = + delete; + ~FakeNotificationsInstance() override; // mojom::NotificationsInstance overrides: @@ -51,8 +56,6 @@ private: std::vector<std::pair<std::string, mojom::ArcNotificationEvent>> events_; mojom::ArcDoNotDisturbStatusPtr latest_do_not_disturb_status_; - - DISALLOW_COPY_AND_ASSIGN(FakeNotificationsInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_pip_instance.h b/components/arc/test/fake_pip_instance.h index b9d9fd74..b12639c8 100644 --- a/components/arc/test/fake_pip_instance.h +++ b/components/arc/test/fake_pip_instance.h
@@ -15,6 +15,10 @@ class FakePipInstance : public mojom::PipInstance { public: FakePipInstance(); + + FakePipInstance(const FakePipInstance&) = delete; + FakePipInstance& operator=(const FakePipInstance&) = delete; + ~FakePipInstance() override; int num_closed() { return num_closed_; } @@ -30,8 +34,6 @@ mojo::Remote<mojom::PipHost> host_remote_; int num_closed_ = 0; absl::optional<bool> suppressed_; - - DISALLOW_COPY_AND_ASSIGN(FakePipInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_policy_instance.h b/components/arc/test/fake_policy_instance.h index 5977579..da28583c 100644 --- a/components/arc/test/fake_policy_instance.h +++ b/components/arc/test/fake_policy_instance.h
@@ -16,6 +16,10 @@ class FakePolicyInstance : public mojom::PolicyInstance { public: FakePolicyInstance(); + + FakePolicyInstance(const FakePolicyInstance&) = delete; + FakePolicyInstance& operator=(const FakePolicyInstance&) = delete; + ~FakePolicyInstance() override; // mojom::PolicyInstance @@ -35,8 +39,6 @@ mojo::Remote<mojom::PolicyHost> host_remote_; std::string command_payload_; - - DISALLOW_COPY_AND_ASSIGN(FakePolicyInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_timer_instance.h b/components/arc/test/fake_timer_instance.h index d8c1c9b..901562d 100644 --- a/components/arc/test/fake_timer_instance.h +++ b/components/arc/test/fake_timer_instance.h
@@ -14,6 +14,10 @@ class FakeTimerInstance : public mojom::TimerInstance { public: FakeTimerInstance(); + + FakeTimerInstance(const FakeTimerInstance&) = delete; + FakeTimerInstance& operator=(const FakeTimerInstance&) = delete; + ~FakeTimerInstance() override; // mojom::TimerInstance overrides: @@ -24,8 +28,6 @@ private: mojo::Remote<mojom::TimerHost> host_remote_; - - DISALLOW_COPY_AND_ASSIGN(FakeTimerInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_wake_lock_instance.h b/components/arc/test/fake_wake_lock_instance.h index d1bc68a..80f44e1 100644 --- a/components/arc/test/fake_wake_lock_instance.h +++ b/components/arc/test/fake_wake_lock_instance.h
@@ -15,6 +15,10 @@ class FakeWakeLockInstance : public mojom::WakeLockInstance { public: FakeWakeLockInstance(); + + FakeWakeLockInstance(const FakeWakeLockInstance&) = delete; + FakeWakeLockInstance& operator=(const FakeWakeLockInstance&) = delete; + ~FakeWakeLockInstance() override; // mojom::WakeLockInstance overrides: @@ -23,8 +27,6 @@ private: mojo::Remote<mojom::WakeLockHost> host_remote_; - - DISALLOW_COPY_AND_ASSIGN(FakeWakeLockInstance); }; } // namespace arc
diff --git a/components/arc/test/fake_wallpaper_instance.h b/components/arc/test/fake_wallpaper_instance.h index 2e0697a3..f67ce01a 100644 --- a/components/arc/test/fake_wallpaper_instance.h +++ b/components/arc/test/fake_wallpaper_instance.h
@@ -18,6 +18,10 @@ class FakeWallpaperInstance : public mojom::WallpaperInstance { public: FakeWallpaperInstance(); + + FakeWallpaperInstance(const FakeWallpaperInstance&) = delete; + FakeWallpaperInstance& operator=(const FakeWallpaperInstance&) = delete; + ~FakeWallpaperInstance() override; const std::vector<int32_t>& changed_ids() const { return changed_ids_; } @@ -35,8 +39,6 @@ // Keeps the binding alive so that calls to this class can be correctly // routed. mojo::Remote<mojom::WallpaperHost> host_remote_; - - DISALLOW_COPY_AND_ASSIGN(FakeWallpaperInstance); }; } // namespace arc
diff --git a/components/arc/test/test_browser_context.h b/components/arc/test/test_browser_context.h index 66fc548..ee357bb 100644 --- a/components/arc/test/test_browser_context.h +++ b/components/arc/test/test_browser_context.h
@@ -18,6 +18,10 @@ class TestBrowserContext : public content::TestBrowserContext { public: TestBrowserContext(); + + TestBrowserContext(const TestBrowserContext&) = delete; + TestBrowserContext& operator=(const TestBrowserContext&) = delete; + ~TestBrowserContext() override; inline PrefRegistrySimple* pref_registry() { return prefs_.registry(); } @@ -25,8 +29,6 @@ private: BrowserContextDependencyManager* const browser_context_dependency_manager_; TestingPrefServiceSimple prefs_; - - DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); }; } // namespace arc
diff --git a/components/arc/timer/arc_timer_bridge.h b/components/arc/timer/arc_timer_bridge.h index 5749a0d..fcc06b6 100644 --- a/components/arc/timer/arc_timer_bridge.h +++ b/components/arc/timer/arc_timer_bridge.h
@@ -49,6 +49,10 @@ ArcTimerBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcTimerBridge(const ArcTimerBridge&) = delete; + ArcTimerBridge& operator=(const ArcTimerBridge&) = delete; + ~ArcTimerBridge() override; // ConnectionObserver<mojom::TimerInstance>::Observer overrides. @@ -88,8 +92,6 @@ mojo::Receiver<mojom::TimerHost> receiver_{this}; base::WeakPtrFactory<ArcTimerBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcTimerBridge); }; } // namespace arc
diff --git a/components/arc/timer/arc_timer_bridge_unittest.cc b/components/arc/timer/arc_timer_bridge_unittest.cc index a122e908..e5e035e2 100644 --- a/components/arc/timer/arc_timer_bridge_unittest.cc +++ b/components/arc/timer/arc_timer_bridge_unittest.cc
@@ -99,6 +99,9 @@ ArcServiceManager::Get()->arc_bridge_service()->timer()); } + ArcTimerTest(const ArcTimerTest&) = delete; + ArcTimerTest& operator=(const ArcTimerTest&) = delete; + ~ArcTimerTest() override { // Destroys the FakeTimerInstance. This results in // ArcTimerBridge::OnInstanceClosed being called. @@ -133,8 +136,6 @@ ArcTimerStore arc_timer_store_; ArcTimerBridge* timer_bridge_; - - DISALLOW_COPY_AND_ASSIGN(ArcTimerTest); }; bool ArcTimerTest::StoreReadFds(const std::vector<clockid_t> clocks,
diff --git a/components/arc/usb/usb_host_bridge.h b/components/arc/usb/usb_host_bridge.h index b40302e..579a72c 100644 --- a/components/arc/usb/usb_host_bridge.h +++ b/components/arc/usb/usb_host_bridge.h
@@ -59,6 +59,10 @@ // The constructor will register an Observer with ArcBridgeService. ArcUsbHostBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcUsbHostBridge(const ArcUsbHostBridge&) = delete; + ArcUsbHostBridge& operator=(const ArcUsbHostBridge&) = delete; + ~ArcUsbHostBridge() override; // Returns the factory instance for this class. @@ -124,8 +128,6 @@ // WeakPtrFactory to use for callbacks. base::WeakPtrFactory<ArcUsbHostBridge> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcUsbHostBridge); }; } // namespace arc
diff --git a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h b/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h index 614718d6..7d30c2e 100644 --- a/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h +++ b/components/arc/video_accelerator/gpu_arc_video_decode_accelerator.h
@@ -43,6 +43,11 @@ const gpu::GpuPreferences& gpu_preferences, const gpu::GpuDriverBugWorkarounds& gpu_workarounds, scoped_refptr<ProtectedBufferManager> protected_buffer_manager); + + GpuArcVideoDecodeAccelerator(const GpuArcVideoDecodeAccelerator&) = delete; + GpuArcVideoDecodeAccelerator& operator=(const GpuArcVideoDecodeAccelerator&) = + delete; + ~GpuArcVideoDecodeAccelerator() override; // Implementation of media::VideoDecodeAccelerator::Client interface. @@ -187,7 +192,6 @@ bool awaiting_first_import_ = false; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(GpuArcVideoDecodeAccelerator); }; } // namespace arc
diff --git a/components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h b/components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h index 8d3ebb40..0e7965b 100644 --- a/components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h +++ b/components/arc/video_accelerator/gpu_arc_video_encode_accelerator.h
@@ -31,6 +31,11 @@ explicit GpuArcVideoEncodeAccelerator( const gpu::GpuPreferences& gpu_preferences, const gpu::GpuDriverBugWorkarounds& gpu_workarounds); + + GpuArcVideoEncodeAccelerator(const GpuArcVideoEncodeAccelerator&) = delete; + GpuArcVideoEncodeAccelerator& operator=(const GpuArcVideoEncodeAccelerator&) = + delete; + ~GpuArcVideoEncodeAccelerator() override; private: @@ -92,8 +97,6 @@ int32_t bitstream_buffer_serial_; std::unordered_map<uint32_t, UseBitstreamBufferCallback> use_bitstream_cbs_; gpu::GpuMemoryBufferSupport support_; - - DISALLOW_COPY_AND_ASSIGN(GpuArcVideoEncodeAccelerator); }; } // namespace arc
diff --git a/components/arc/video_accelerator/gpu_arc_video_protected_buffer_allocator.h b/components/arc/video_accelerator/gpu_arc_video_protected_buffer_allocator.h index 26fe128..f174c20 100644 --- a/components/arc/video_accelerator/gpu_arc_video_protected_buffer_allocator.h +++ b/components/arc/video_accelerator/gpu_arc_video_protected_buffer_allocator.h
@@ -24,6 +24,11 @@ class GpuArcVideoProtectedBufferAllocator : public mojom::VideoProtectedBufferAllocator { public: + GpuArcVideoProtectedBufferAllocator( + const GpuArcVideoProtectedBufferAllocator&) = delete; + GpuArcVideoProtectedBufferAllocator& operator=( + const GpuArcVideoProtectedBufferAllocator&) = delete; + ~GpuArcVideoProtectedBufferAllocator() override; static std::unique_ptr<GpuArcVideoProtectedBufferAllocator> Create( @@ -48,7 +53,6 @@ const std::unique_ptr<ProtectedBufferAllocator> protected_buffer_allocator_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(GpuArcVideoProtectedBufferAllocator); }; } // namespace arc
diff --git a/components/arc/video_accelerator/protected_buffer_manager.cc b/components/arc/video_accelerator/protected_buffer_manager.cc index 0b0f31f..71bcba0 100644 --- a/components/arc/video_accelerator/protected_buffer_manager.cc +++ b/components/arc/video_accelerator/protected_buffer_manager.cc
@@ -38,6 +38,9 @@ class ProtectedBufferManager::ProtectedBuffer { public: + ProtectedBuffer(const ProtectedBuffer&) = delete; + ProtectedBuffer& operator=(const ProtectedBuffer&) = delete; + virtual ~ProtectedBuffer() {} // Downcasting methods to return duplicated handles to the underlying @@ -63,8 +66,6 @@ private: scoped_refptr<gfx::NativePixmap> dummy_handle_; - - DISALLOW_COPY_AND_ASSIGN(ProtectedBuffer); }; class ProtectedBufferManager::ProtectedSharedMemory @@ -183,6 +184,11 @@ uint64_t allocator_id, scoped_refptr<ProtectedBufferManager> protected_buffer_manager, base::OnceClosure release_all_protected_buffers_cb); + + ProtectedBufferAllocatorImpl(const ProtectedBufferAllocatorImpl&) = delete; + ProtectedBufferAllocatorImpl& operator=(const ProtectedBufferAllocatorImpl&) = + delete; + ~ProtectedBufferAllocatorImpl() override; bool AllocateProtectedSharedMemory(base::ScopedFD dummy_fd, size_t size) override; @@ -197,7 +203,6 @@ base::OnceClosure release_all_protected_buffers_cb_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(ProtectedBufferAllocatorImpl); }; ProtectedBufferManager::ProtectedBufferAllocatorImpl::
diff --git a/components/arc/video_accelerator/protected_buffer_manager_proxy.h b/components/arc/video_accelerator/protected_buffer_manager_proxy.h index 3390984..53594a5f 100644 --- a/components/arc/video_accelerator/protected_buffer_manager_proxy.h +++ b/components/arc/video_accelerator/protected_buffer_manager_proxy.h
@@ -18,6 +18,11 @@ explicit GpuArcProtectedBufferManagerProxy( scoped_refptr<arc::ProtectedBufferManager> protected_buffer_manager); + GpuArcProtectedBufferManagerProxy(const GpuArcProtectedBufferManagerProxy&) = + delete; + GpuArcProtectedBufferManagerProxy& operator=( + const GpuArcProtectedBufferManagerProxy&) = delete; + ~GpuArcProtectedBufferManagerProxy() override; // arc::mojom::ProtectedBufferManager implementation. @@ -27,8 +32,6 @@ private: scoped_refptr<arc::ProtectedBufferManager> protected_buffer_manager_; - - DISALLOW_COPY_AND_ASSIGN(GpuArcProtectedBufferManagerProxy); }; } // namespace arc
diff --git a/components/arc/wake_lock/arc_wake_lock_bridge.cc b/components/arc/wake_lock/arc_wake_lock_bridge.cc index 0f0445d6..6e9f743 100644 --- a/components/arc/wake_lock/arc_wake_lock_bridge.cc +++ b/components/arc/wake_lock/arc_wake_lock_bridge.cc
@@ -52,6 +52,10 @@ WakeLockRequester(device::mojom::WakeLockType type, device::mojom::WakeLockProvider* provider) : type_(type), provider_(provider) {} + + WakeLockRequester(const WakeLockRequester&) = delete; + WakeLockRequester& operator=(const WakeLockRequester&) = delete; + ~WakeLockRequester() = default; // Increments the number of outstanding requests from Android and requests a @@ -114,8 +118,6 @@ // Lazily initialized in response to first request. mojo::Remote<device::mojom::WakeLock> wake_lock_; - - DISALLOW_COPY_AND_ASSIGN(WakeLockRequester); }; // static
diff --git a/components/arc/wake_lock/arc_wake_lock_bridge.h b/components/arc/wake_lock/arc_wake_lock_bridge.h index 4494b6a..b5b9970 100644 --- a/components/arc/wake_lock/arc_wake_lock_bridge.h +++ b/components/arc/wake_lock/arc_wake_lock_bridge.h
@@ -46,6 +46,10 @@ ArcWakeLockBridge(content::BrowserContext* context, ArcBridgeService* bridge_service); + + ArcWakeLockBridge(const ArcWakeLockBridge&) = delete; + ArcWakeLockBridge& operator=(const ArcWakeLockBridge&) = delete; + ~ArcWakeLockBridge() override; void SetWakeLockProviderForTesting( @@ -82,8 +86,6 @@ mojo::Receiver<mojom::WakeLockHost> receiver_{this}; base::WeakPtrFactory<ArcWakeLockBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ArcWakeLockBridge); }; } // namespace arc
diff --git a/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc b/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc index 9dbf097..9da5d06 100644 --- a/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc +++ b/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc
@@ -38,6 +38,9 @@ CreateWakeLockInstance(); } + ArcWakeLockBridgeTest(const ArcWakeLockBridgeTest&) = delete; + ArcWakeLockBridgeTest& operator=(const ArcWakeLockBridgeTest&) = delete; + ~ArcWakeLockBridgeTest() override { DestroyWakeLockInstance(); } protected: @@ -104,8 +107,6 @@ std::unique_ptr<ArcBridgeService> bridge_service_; std::unique_ptr<FakeWakeLockInstance> instance_; std::unique_ptr<ArcWakeLockBridge> wake_lock_bridge_; - - DISALLOW_COPY_AND_ASSIGN(ArcWakeLockBridgeTest); }; TEST_F(ArcWakeLockBridgeTest, AcquireAndReleaseSinglePartialWakeLock) {
diff --git a/components/assist_ranker/assist_ranker_service_impl.h b/components/assist_ranker/assist_ranker_service_impl.h index e1b00c2..9b4add99 100644 --- a/components/assist_ranker/assist_ranker_service_impl.h +++ b/components/assist_ranker/assist_ranker_service_impl.h
@@ -29,6 +29,10 @@ AssistRankerServiceImpl( base::FilePath base_path, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + AssistRankerServiceImpl(const AssistRankerServiceImpl&) = delete; + AssistRankerServiceImpl& operator=(const AssistRankerServiceImpl&) = delete; + ~AssistRankerServiceImpl() override; // AssistRankerService... @@ -49,8 +53,6 @@ predictor_map_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(AssistRankerServiceImpl); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/base_predictor.h b/components/assist_ranker/base_predictor.h index b4ba028..6204f5a 100644 --- a/components/assist_ranker/base_predictor.h +++ b/components/assist_ranker/base_predictor.h
@@ -40,6 +40,10 @@ class BasePredictor : public base::SupportsWeakPtr<BasePredictor> { public: BasePredictor(const PredictorConfig& config); + + BasePredictor(const BasePredictor&) = delete; + BasePredictor& operator=(const BasePredictor&) = delete; + virtual ~BasePredictor(); // Returns true if the predictor is ready to make predictions. @@ -83,8 +87,6 @@ bool is_ready_ = false; bool is_query_enabled_ = false; PredictorConfig config_; - - DISALLOW_COPY_AND_ASSIGN(BasePredictor); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/base_predictor_unittest.cc b/components/assist_ranker/base_predictor_unittest.cc index 75bdb2f7..5269456 100644 --- a/components/assist_ranker/base_predictor_unittest.cc +++ b/components/assist_ranker/base_predictor_unittest.cc
@@ -72,6 +72,10 @@ // |predictor_config|. static std::unique_ptr<FakePredictor> Create( PredictorConfig predictor_config); + + FakePredictor(const FakePredictor&) = delete; + FakePredictor& operator=(const FakePredictor&) = delete; + ~FakePredictor() override {} // Validation will always succeed. static RankerModelStatus ValidateModel(const RankerModel& model) { @@ -84,7 +88,6 @@ private: FakePredictor(const PredictorConfig& config) : BasePredictor(config) {} - DISALLOW_COPY_AND_ASSIGN(FakePredictor); }; std::unique_ptr<FakePredictor> FakePredictor::Create(
diff --git a/components/assist_ranker/binary_classifier_predictor.h b/components/assist_ranker/binary_classifier_predictor.h index 6aa1a9f1..5d2e8ea 100644 --- a/components/assist_ranker/binary_classifier_predictor.h +++ b/components/assist_ranker/binary_classifier_predictor.h
@@ -24,6 +24,10 @@ // Predictor class for models that output a binary decision. class BinaryClassifierPredictor : public BasePredictor { public: + BinaryClassifierPredictor(const BinaryClassifierPredictor&) = delete; + BinaryClassifierPredictor& operator=(const BinaryClassifierPredictor&) = + delete; + ~BinaryClassifierPredictor() override; // Returns an new predictor instance with the given |config| and initialize @@ -59,8 +63,6 @@ // TODO(hamelphi): Use an abstract BinaryClassifierInferenceModule in order to // generalize to other models. std::unique_ptr<GenericLogisticRegressionInference> inference_module_; - - DISALLOW_COPY_AND_ASSIGN(BinaryClassifierPredictor); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/classifier_predictor.h b/components/assist_ranker/classifier_predictor.h index 0f653df6..85aad1a568 100644 --- a/components/assist_ranker/classifier_predictor.h +++ b/components/assist_ranker/classifier_predictor.h
@@ -26,6 +26,9 @@ // Predictor class for single-layer neural network models. class ClassifierPredictor : public BasePredictor { public: + ClassifierPredictor(const ClassifierPredictor&) = delete; + ClassifierPredictor& operator=(const ClassifierPredictor&) = delete; + ~ClassifierPredictor() override; // Returns an new predictor instance with the given |config| and initialize @@ -60,8 +63,6 @@ ClassifierPredictor(const PredictorConfig& config); NNClassifierModel model_; - - DISALLOW_COPY_AND_ASSIGN(ClassifierPredictor); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/fake_ranker_model_loader.h b/components/assist_ranker/fake_ranker_model_loader.h index c94edd11..7a5c8ec 100644 --- a/components/assist_ranker/fake_ranker_model_loader.h +++ b/components/assist_ranker/fake_ranker_model_loader.h
@@ -20,6 +20,10 @@ FakeRankerModelLoader(ValidateModelCallback validate_model_cb, OnModelAvailableCallback on_model_available_cb, std::unique_ptr<RankerModel> ranker_model); + + FakeRankerModelLoader(const FakeRankerModelLoader&) = delete; + FakeRankerModelLoader& operator=(const FakeRankerModelLoader&) = delete; + ~FakeRankerModelLoader() override; void NotifyOfRankerActivity() override; @@ -28,7 +32,6 @@ std::unique_ptr<RankerModel> ranker_model_; const ValidateModelCallback validate_model_cb_; const OnModelAvailableCallback on_model_available_cb_; - DISALLOW_COPY_AND_ASSIGN(FakeRankerModelLoader); }; } // namespace testing
diff --git a/components/assist_ranker/ranker_model.h b/components/assist_ranker/ranker_model.h index 996ba17..153cebb 100644 --- a/components/assist_ranker/ranker_model.h +++ b/components/assist_ranker/ranker_model.h
@@ -17,6 +17,10 @@ class RankerModel { public: RankerModel(); + + RankerModel(const RankerModel&) = delete; + RankerModel& operator=(const RankerModel&) = delete; + ~RankerModel(); // Returns a new ranker model constructed from |data|. @@ -36,8 +40,6 @@ private: // The underlying ranker model proto. std::unique_ptr<RankerModelProto> proto_; - - DISALLOW_COPY_AND_ASSIGN(RankerModel); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/ranker_model_loader.h b/components/assist_ranker/ranker_model_loader.h index e55fa9d9..45fee75 100644 --- a/components/assist_ranker/ranker_model_loader.h +++ b/components/assist_ranker/ranker_model_loader.h
@@ -46,6 +46,10 @@ std::unique_ptr<assist_ranker::RankerModel>)>; RankerModelLoader() = default; + + RankerModelLoader(const RankerModelLoader&) = delete; + RankerModelLoader& operator=(const RankerModelLoader&) = delete; + virtual ~RankerModelLoader() = default; // Call this method periodically to notify the model loader the ranker is // actively in use. The user's engagement with the ranked feature is used @@ -53,9 +57,6 @@ // is pending, this will trigger (subject to retry and frequency limits) a // model download attempt. virtual void NotifyOfRankerActivity() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(RankerModelLoader); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/ranker_model_loader_impl.cc b/components/assist_ranker/ranker_model_loader_impl.cc index af4d0c6..e098c9af 100644 --- a/components/assist_ranker/ranker_model_loader_impl.cc +++ b/components/assist_ranker/ranker_model_loader_impl.cc
@@ -55,6 +55,9 @@ MyScopedHistogramTimer(const base::StringPiece& name) : name_(name.begin(), name.end()), start_(base::TimeTicks::Now()) {} + MyScopedHistogramTimer(const MyScopedHistogramTimer&) = delete; + MyScopedHistogramTimer& operator=(const MyScopedHistogramTimer&) = delete; + ~MyScopedHistogramTimer() { RecordTimerHistogram(name_, base::TimeTicks::Now() - start_); } @@ -62,8 +65,6 @@ private: const std::string name_; const base::TimeTicks start_; - - DISALLOW_COPY_AND_ASSIGN(MyScopedHistogramTimer); }; std::string LoadFromFile(const base::FilePath& model_path) {
diff --git a/components/assist_ranker/ranker_model_loader_impl.h b/components/assist_ranker/ranker_model_loader_impl.h index 44538a0..1a0df80 100644 --- a/components/assist_ranker/ranker_model_loader_impl.h +++ b/components/assist_ranker/ranker_model_loader_impl.h
@@ -59,6 +59,9 @@ GURL model_url, std::string uma_prefix); + RankerModelLoaderImpl(const RankerModelLoaderImpl&) = delete; + RankerModelLoaderImpl& operator=(const RankerModelLoaderImpl&) = delete; + ~RankerModelLoaderImpl() override; // Call this method periodically to notify the model loader the ranker is @@ -163,8 +166,6 @@ // Creates weak pointer references to the loader. base::WeakPtrFactory<RankerModelLoaderImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RankerModelLoaderImpl); }; } // namespace assist_ranker
diff --git a/components/assist_ranker/ranker_url_fetcher.h b/components/assist_ranker/ranker_url_fetcher.h index 4f22b22..f800bdf 100644 --- a/components/assist_ranker/ranker_url_fetcher.h +++ b/components/assist_ranker/ranker_url_fetcher.h
@@ -35,6 +35,10 @@ }; RankerURLFetcher(); + + RankerURLFetcher(const RankerURLFetcher&) = delete; + RankerURLFetcher& operator=(const RankerURLFetcher&) = delete; + ~RankerURLFetcher(); int max_retry_on_5xx() { return max_retry_on_5xx_; } @@ -72,8 +76,6 @@ // Max number how many times to retry on the server error int max_retry_on_5xx_; - - DISALLOW_COPY_AND_ASSIGN(RankerURLFetcher); }; } // namespace assist_ranker
diff --git a/components/autofill/content/renderer/autofill_agent.h b/components/autofill/content/renderer/autofill_agent.h index 8a27a2b..13157706 100644 --- a/components/autofill/content/renderer/autofill_agent.h +++ b/components/autofill/content/renderer/autofill_agent.h
@@ -78,6 +78,10 @@ PasswordGenerationAgent* password_generation_agent, AutofillAssistantAgent* autofill_assistant_agent, blink::AssociatedInterfaceRegistry* registry); + + AutofillAgent(const AutofillAgent&) = delete; + AutofillAgent& operator=(const AutofillAgent&) = delete; + ~AutofillAgent() override; void BindPendingReceiver( @@ -398,8 +402,6 @@ const scoped_refptr<FieldDataManager> field_data_manager_; base::WeakPtrFactory<AutofillAgent> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutofillAgent); }; } // namespace autofill
diff --git a/components/autofill/content/renderer/form_cache.h b/components/autofill/content/renderer/form_cache.h index 846893d..eae42336 100644 --- a/components/autofill/content/renderer/form_cache.h +++ b/components/autofill/content/renderer/form_cache.h
@@ -33,6 +33,10 @@ class FormCache { public: explicit FormCache(blink::WebLocalFrame* frame); + + FormCache(const FormCache&) = delete; + FormCache& operator=(const FormCache&) = delete; + ~FormCache(); // Scans the DOM in |frame_| extracting and storing forms that have not been @@ -156,8 +160,6 @@ // Fields that are eligible to show manual filling on form interaction. base::flat_set<FieldRendererId> fields_eligible_for_manual_filling_; - - DISALLOW_COPY_AND_ASSIGN(FormCache); }; } // namespace autofill
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h index bb0d6373..d302e25 100644 --- a/components/autofill/content/renderer/password_autofill_agent.h +++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -113,6 +113,10 @@ PasswordAutofillAgent(content::RenderFrame* render_frame, blink::AssociatedInterfaceRegistry* registry); + + PasswordAutofillAgent(const PasswordAutofillAgent&) = delete; + PasswordAutofillAgent& operator=(const PasswordAutofillAgent&) = delete; + ~PasswordAutofillAgent() override; void BindPendingReceiver( @@ -309,6 +313,10 @@ // Creates a new notifier that uses the agent which owns it to access the // real driver implementation. explicit FocusStateNotifier(PasswordAutofillAgent* agent); + + FocusStateNotifier(const FocusStateNotifier&) = delete; + FocusStateNotifier& operator=(const FocusStateNotifier&) = delete; + ~FocusStateNotifier(); void FocusedInputChanged(FieldRendererId focused_field_id, @@ -319,8 +327,6 @@ mojom::FocusedFieldType focused_field_type_ = mojom::FocusedFieldType::kUnknown; PasswordAutofillAgent* agent_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FocusStateNotifier); }; // This class keeps track of autofilled username and password input elements @@ -330,6 +336,10 @@ class PasswordValueGatekeeper { public: PasswordValueGatekeeper(); + + PasswordValueGatekeeper(const PasswordValueGatekeeper&) = delete; + PasswordValueGatekeeper& operator=(const PasswordValueGatekeeper&) = delete; + ~PasswordValueGatekeeper(); // Call this for every autofilled username and password field, so that @@ -349,8 +359,6 @@ bool was_user_gesture_seen_; std::vector<blink::WebInputElement> elements_; - - DISALLOW_COPY_AND_ASSIGN(PasswordValueGatekeeper); }; // Annotate |forms| and all fields in the current frame with form and field @@ -590,8 +598,6 @@ // Current state of Touch To Fill. This is reset during // CleanupOnDocumentShutdown. TouchToFillState touch_to_fill_state_ = TouchToFillState::kShouldShow; - - DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); }; } // namespace autofill
diff --git a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc index 9dfa089..4534fc87 100644 --- a/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc +++ b/components/autofill/content/renderer/password_form_conversion_utils_browsertest.cc
@@ -86,6 +86,12 @@ class PasswordFormConversionUtilsTest : public content::RenderViewTest { public: PasswordFormConversionUtilsTest() = default; + + PasswordFormConversionUtilsTest(const PasswordFormConversionUtilsTest&) = + delete; + PasswordFormConversionUtilsTest& operator=( + const PasswordFormConversionUtilsTest&) = delete; + ~PasswordFormConversionUtilsTest() override = default; protected: @@ -113,8 +119,6 @@ *form = forms[0]; } - - DISALLOW_COPY_AND_ASSIGN(PasswordFormConversionUtilsTest); }; } // namespace
diff --git a/components/autofill/content/renderer/password_generation_agent.h b/components/autofill/content/renderer/password_generation_agent.h index fb48c29..e0fc997 100644 --- a/components/autofill/content/renderer/password_generation_agent.h +++ b/components/autofill/content/renderer/password_generation_agent.h
@@ -46,6 +46,10 @@ PasswordGenerationAgent(content::RenderFrame* render_frame, PasswordAutofillAgent* password_agent, blink::AssociatedInterfaceRegistry* registry); + + PasswordGenerationAgent(const PasswordGenerationAgent&) = delete; + PasswordGenerationAgent& operator=(const PasswordGenerationAgent&) = delete; + ~PasswordGenerationAgent() override; void BindPendingReceiver( @@ -180,8 +184,6 @@ deferring_password_generation_driver_; mojo::AssociatedReceiver<mojom::PasswordGenerationAgent> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent); }; } // namespace autofill
diff --git a/components/autofill/content/renderer/renderer_save_password_progress_logger.h b/components/autofill/content/renderer/renderer_save_password_progress_logger.h index af0cd80..9130683 100644 --- a/components/autofill/content/renderer/renderer_save_password_progress_logger.h +++ b/components/autofill/content/renderer/renderer_save_password_progress_logger.h
@@ -25,6 +25,12 @@ // The |password_manager_driver| needs to outlive the constructed logger. RendererSavePasswordProgressLogger( mojom::PasswordManagerDriver* password_manager_driver); + + RendererSavePasswordProgressLogger( + const RendererSavePasswordProgressLogger&) = delete; + RendererSavePasswordProgressLogger& operator=( + const RendererSavePasswordProgressLogger&) = delete; + ~RendererSavePasswordProgressLogger() override; void LogElementName(StringID label, @@ -38,8 +44,6 @@ // Used by SendLog to send the logs to the browser. // |password_manager_driver_| needs to outlive the logger. mojom::PasswordManagerDriver* password_manager_driver_; - - DISALLOW_COPY_AND_ASSIGN(RendererSavePasswordProgressLogger); }; } // namespace autofill
diff --git a/components/autofill/core/browser/address_normalization_manager.h b/components/autofill/core/browser/address_normalization_manager.h index 96e3a77..9b90031 100644 --- a/components/autofill/core/browser/address_normalization_manager.h +++ b/components/autofill/core/browser/address_normalization_manager.h
@@ -27,6 +27,10 @@ AddressNormalizationManager(AddressNormalizer* address_normalizer, const std::string& app_locale); + AddressNormalizationManager(const AddressNormalizationManager&) = delete; + AddressNormalizationManager& operator=(const AddressNormalizationManager&) = + delete; + ~AddressNormalizationManager(); // Multiple address version of NormalizeAddressWithCallback. Starts the @@ -63,7 +67,6 @@ AddressNormalizer* address_normalizer_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(AddressNormalizationManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/address_normalizer_impl.cc b/components/autofill/core/browser/address_normalizer_impl.cc index 335589e..8edaff6 100644 --- a/components/autofill/core/browser/address_normalizer_impl.cc +++ b/components/autofill/core/browser/address_normalizer_impl.cc
@@ -105,6 +105,9 @@ base::TimeDelta::FromSeconds(timeout_seconds)); } + NormalizationRequest(const NormalizationRequest&) = delete; + NormalizationRequest& operator=(const NormalizationRequest&) = delete; + ~NormalizationRequest() {} void OnRulesLoaded(bool success, AddressValidator* address_validator) { @@ -141,8 +144,6 @@ bool has_responded_ = false; base::WeakPtrFactory<NormalizationRequest> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NormalizationRequest); }; AddressNormalizerImpl::AddressNormalizerImpl(std::unique_ptr<Source> source,
diff --git a/components/autofill/core/browser/address_normalizer_impl.h b/components/autofill/core/browser/address_normalizer_impl.h index 1cfde07..5f638ac3 100644 --- a/components/autofill/core/browser/address_normalizer_impl.h +++ b/components/autofill/core/browser/address_normalizer_impl.h
@@ -33,6 +33,10 @@ AddressNormalizerImpl(std::unique_ptr<::i18n::addressinput::Source> source, std::unique_ptr<::i18n::addressinput::Storage> storage, const std::string& app_locale); + + AddressNormalizerImpl(const AddressNormalizerImpl&) = delete; + AddressNormalizerImpl& operator=(const AddressNormalizerImpl&) = delete; + ~AddressNormalizerImpl() override; // AddressNormalizer implementation. @@ -71,8 +75,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<AddressNormalizerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AddressNormalizerImpl); }; } // namespace autofill
diff --git a/components/autofill/core/browser/address_normalizer_impl_unittest.cc b/components/autofill/core/browser/address_normalizer_impl_unittest.cc index d3b6d2da..4d6a9bc 100644 --- a/components/autofill/core/browser/address_normalizer_impl_unittest.cc +++ b/components/autofill/core/browser/address_normalizer_impl_unittest.cc
@@ -32,6 +32,9 @@ public: ChromiumTestdataSource() : TestdataSource(true) {} + ChromiumTestdataSource(const ChromiumTestdataSource&) = delete; + ChromiumTestdataSource& operator=(const ChromiumTestdataSource&) = delete; + ~ChromiumTestdataSource() override {} // For this test, only load the rules for the "US". @@ -46,9 +49,6 @@ "\"California\",\"key\":\"CA\",\"id\":" "\"data/US/CA\"}}")); } - - private: - DISALLOW_COPY_AND_ASSIGN(ChromiumTestdataSource); }; // A test subclass of the AddressNormalizerImpl. Used to simulate rules not @@ -59,6 +59,9 @@ std::unique_ptr<::i18n::addressinput::Storage> storage) : AddressNormalizerImpl(std::move(source), std::move(storage), "en-US") {} + TestAddressNormalizer(const TestAddressNormalizer&) = delete; + TestAddressNormalizer& operator=(const TestAddressNormalizer&) = delete; + ~TestAddressNormalizer() override {} void ShouldLoadRules(bool should_load_rules) { @@ -73,8 +76,6 @@ private: bool should_load_rules_ = true; - - DISALLOW_COPY_AND_ASSIGN(TestAddressNormalizer); }; } // namespace
diff --git a/components/autofill/core/browser/autocomplete_history_manager.h b/components/autofill/core/browser/autocomplete_history_manager.h index 4c489c5..b7b928a8 100644 --- a/components/autofill/core/browser/autocomplete_history_manager.h +++ b/components/autofill/core/browser/autocomplete_history_manager.h
@@ -34,6 +34,11 @@ public AutofillSubject { public: AutocompleteHistoryManager(); + + AutocompleteHistoryManager(const AutocompleteHistoryManager&) = delete; + AutocompleteHistoryManager& operator=(const AutocompleteHistoryManager&) = + delete; + ~AutocompleteHistoryManager() override; // SingleFieldFormFiller overrides: @@ -81,6 +86,10 @@ class UMARecorder { public: UMARecorder() = default; + + UMARecorder(const UMARecorder&) = delete; + UMARecorder& operator=(const UMARecorder&) = delete; + ~UMARecorder() = default; void OnGetAutocompleteSuggestions( @@ -97,8 +106,6 @@ // The name of field that is currently measured, we don't repeatedly measure // the query of the same field while user is filling the field. std::u16string measuring_name_; - - DISALLOW_COPY_AND_ASSIGN(UMARecorder); }; // Internal data object used to keep a request's context to associate it @@ -192,8 +199,6 @@ UMARecorder uma_recorder_; base::WeakPtrFactory<AutocompleteHistoryManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutocompleteHistoryManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc index 635db5eb..81ddcb6 100644 --- a/components/autofill/core/browser/autocomplete_history_manager_unittest.cc +++ b/components/autofill/core/browser/autocomplete_history_manager_unittest.cc
@@ -47,6 +47,10 @@ class MockAutofillClient : public TestAutofillClient { public: MockAutofillClient() : prefs_(test::PrefServiceForTesting()) {} + + MockAutofillClient(const MockAutofillClient&) = delete; + MockAutofillClient& operator=(const MockAutofillClient&) = delete; + ~MockAutofillClient() override = default; PrefService* GetPrefs() override { return const_cast<PrefService*>(base::as_const(*this).GetPrefs()); @@ -55,8 +59,6 @@ private: std::unique_ptr<PrefService> prefs_; - - DISALLOW_COPY_AND_ASSIGN(MockAutofillClient); }; class MockSuggestionsHandler
diff --git a/components/autofill/core/browser/autofill_address_policy_handler.h b/components/autofill/core/browser/autofill_address_policy_handler.h index 20bb8847..1edf5ef 100644 --- a/components/autofill/core/browser/autofill_address_policy_handler.h +++ b/components/autofill/core/browser/autofill_address_policy_handler.h
@@ -15,14 +15,16 @@ class AutofillAddressPolicyHandler : public policy::TypeCheckingPolicyHandler { public: AutofillAddressPolicyHandler(); + + AutofillAddressPolicyHandler(const AutofillAddressPolicyHandler&) = delete; + AutofillAddressPolicyHandler& operator=(const AutofillAddressPolicyHandler&) = + delete; + ~AutofillAddressPolicyHandler() override; // ConfigurationPolicyHandler methods: void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillAddressPolicyHandler); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_credit_card_policy_handler.h b/components/autofill/core/browser/autofill_credit_card_policy_handler.h index d604e75..7b34ab60 100644 --- a/components/autofill/core/browser/autofill_credit_card_policy_handler.h +++ b/components/autofill/core/browser/autofill_credit_card_policy_handler.h
@@ -16,14 +16,17 @@ : public policy::TypeCheckingPolicyHandler { public: AutofillCreditCardPolicyHandler(); + + AutofillCreditCardPolicyHandler(const AutofillCreditCardPolicyHandler&) = + delete; + AutofillCreditCardPolicyHandler& operator=( + const AutofillCreditCardPolicyHandler&) = delete; + ~AutofillCreditCardPolicyHandler() override; // ConfigurationPolicyHandler methods: void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillCreditCardPolicyHandler); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_driver_factory.h b/components/autofill/core/browser/autofill_driver_factory.h index 9dcd62e..918f89c 100644 --- a/components/autofill/core/browser/autofill_driver_factory.h +++ b/components/autofill/core/browser/autofill_driver_factory.h
@@ -25,6 +25,9 @@ explicit AutofillDriverFactory(AutofillClient* client); + AutofillDriverFactory(const AutofillDriverFactory&) = delete; + AutofillDriverFactory& operator=(const AutofillDriverFactory&) = delete; + ~AutofillDriverFactory(); // A convenience function to retrieve an AutofillDriver for the given key or @@ -61,8 +64,6 @@ AutofillClient* const client_; std::unordered_map<void*, std::unique_ptr<AutofillDriver>> driver_map_; - - DISALLOW_COPY_AND_ASSIGN(AutofillDriverFactory); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_driver_factory_unittest.cc b/components/autofill/core/browser/autofill_driver_factory_unittest.cc index 1867780..56b31ba 100644 --- a/components/autofill/core/browser/autofill_driver_factory_unittest.cc +++ b/components/autofill/core/browser/autofill_driver_factory_unittest.cc
@@ -34,12 +34,13 @@ ++*instance_counter; } + CountingAutofillDriver(const CountingAutofillDriver&) = delete; + CountingAutofillDriver& operator=(const CountingAutofillDriver&) = delete; + ~CountingAutofillDriver() override { --*instance_counter_; } private: int* const instance_counter_; - - DISALLOW_COPY_AND_ASSIGN(CountingAutofillDriver); }; // Code-wise this class is identitcal to AutofillDriverFactory, but exposes the
diff --git a/components/autofill/core/browser/autofill_external_delegate.h b/components/autofill/core/browser/autofill_external_delegate.h index ac974e4..01d1d3e 100644 --- a/components/autofill/core/browser/autofill_external_delegate.h +++ b/components/autofill/core/browser/autofill_external_delegate.h
@@ -36,6 +36,10 @@ // BrowserAutofillManager and AutofillDriver. AutofillExternalDelegate(BrowserAutofillManager* manager, AutofillDriver* driver); + + AutofillExternalDelegate(const AutofillExternalDelegate&) = delete; + AutofillExternalDelegate& operator=(const AutofillExternalDelegate&) = delete; + virtual ~AutofillExternalDelegate(); // AutofillPopupDelegate implementation. @@ -183,8 +187,6 @@ base::OnceClosure deletion_callback_; base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_field.h b/components/autofill/core/browser/autofill_field.h index a45996a..e0bb2748 100644 --- a/components/autofill/core/browser/autofill_field.h +++ b/components/autofill/core/browser/autofill_field.h
@@ -41,6 +41,10 @@ AutofillField(); explicit AutofillField(const FormFieldData& field); AutofillField(const FormFieldData& field, const std::u16string& unique_name); + + AutofillField(const AutofillField&) = delete; + AutofillField& operator=(const AutofillField&) = delete; + virtual ~AutofillField(); // Creates AutofillField that has bare minimum information for uploading @@ -304,8 +308,6 @@ // Strength of the single username vote signal, if applicable. absl::optional<AutofillUploadContents::Field::SingleUsernameVoteType> single_username_vote_type_; - - DISALLOW_COPY_AND_ASSIGN(AutofillField); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_manager.h b/components/autofill/core/browser/autofill_manager.h index 0f09f65..f963252 100644 --- a/components/autofill/core/browser/autofill_manager.h +++ b/components/autofill/core/browser/autofill_manager.h
@@ -77,6 +77,9 @@ LogManager* log_manager, const std::vector<FormStructure*>& forms); + AutofillManager(const AutofillManager&) = delete; + AutofillManager& operator=(const AutofillManager&) = delete; + ~AutofillManager() override; // The following will fail a DCHECK if called for a prerendered main frame. @@ -389,8 +392,6 @@ // Will be not null only for |SaveCardBubbleViewsFullFormBrowserTest|. ObserverForTest* observer_for_testing_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(AutofillManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_merge_unittest.cc b/components/autofill/core/browser/autofill_merge_unittest.cc index 837dca1..67fe8d0 100644 --- a/components/autofill/core/browser/autofill_merge_unittest.cc +++ b/components/autofill/core/browser/autofill_merge_unittest.cc
@@ -121,6 +121,10 @@ class PersonalDataManagerMock : public PersonalDataManager { public: PersonalDataManagerMock(); + + PersonalDataManagerMock(const PersonalDataManagerMock&) = delete; + PersonalDataManagerMock& operator=(const PersonalDataManagerMock&) = delete; + ~PersonalDataManagerMock() override; // Reset the saved profiles. @@ -132,8 +136,6 @@ private: std::vector<std::unique_ptr<AutofillProfile>> profiles_; - - DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerMock); }; PersonalDataManagerMock::PersonalDataManagerMock()
diff --git a/components/autofill/core/browser/autofill_policy_handler.h b/components/autofill/core/browser/autofill_policy_handler.h index 6d9c56e9..a42023b9 100644 --- a/components/autofill/core/browser/autofill_policy_handler.h +++ b/components/autofill/core/browser/autofill_policy_handler.h
@@ -15,14 +15,15 @@ class AutofillPolicyHandler : public policy::TypeCheckingPolicyHandler { public: AutofillPolicyHandler(); + + AutofillPolicyHandler(const AutofillPolicyHandler&) = delete; + AutofillPolicyHandler& operator=(const AutofillPolicyHandler&) = delete; + ~AutofillPolicyHandler() override; // ConfigurationPolicyHandler methods: void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillPolicyHandler); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_profile_validator.h b/components/autofill/core/browser/autofill_profile_validator.h index 54c6166e..042d435 100644 --- a/components/autofill/core/browser/autofill_profile_validator.h +++ b/components/autofill/core/browser/autofill_profile_validator.h
@@ -35,6 +35,9 @@ std::unique_ptr<::i18n::addressinput::Source> source, std::unique_ptr<::i18n::addressinput::Storage> storage); + AutofillProfileValidator(const AutofillProfileValidator&) = delete; + AutofillProfileValidator& operator=(const AutofillProfileValidator&) = delete; + ~AutofillProfileValidator() override; // If the rule corresponding to the |profile| is loaded, this validates the @@ -60,6 +63,9 @@ AddressValidator* validator, AutofillProfileValidatorCallback on_validated); + ValidationRequest(const ValidationRequest&) = delete; + ValidationRequest& operator=(const ValidationRequest&) = delete; + ~ValidationRequest(); // Validates various fields of the |profile_|, and calls |on_validated_|. @@ -76,7 +82,6 @@ bool has_responded_ = false; base::CancelableOnceCallback<void()> on_timeout_; base::WeakPtrFactory<ValidationRequest> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ValidationRequest); }; friend class AutofillProfileValidatorTest; @@ -92,8 +97,6 @@ // A map of the region code and the pending requests for that region code. std::map<std::string, std::vector<std::unique_ptr<ValidationRequest>>> pending_requests_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileValidator); }; } // namespace autofill
diff --git a/components/autofill/core/browser/autofill_profile_validator_unittest.cc b/components/autofill/core/browser/autofill_profile_validator_unittest.cc index 8f12fd9..c13c789 100644 --- a/components/autofill/core/browser/autofill_profile_validator_unittest.cc +++ b/components/autofill/core/browser/autofill_profile_validator_unittest.cc
@@ -41,6 +41,9 @@ public: ValidationTestDataSource() : TestdataSource(true) {} + ValidationTestDataSource(const ValidationTestDataSource&) = delete; + ValidationTestDataSource& operator=(const ValidationTestDataSource&) = delete; + ~ValidationTestDataSource() override {} void Get(const std::string& key, const Callback& data_ready) const override { @@ -62,9 +65,6 @@ "\"id\": \"data/CA/QC\", \"zip\": \"G|H|J\", \"name\": \"Quebec\"}" "}")); } - - private: - DISALLOW_COPY_AND_ASSIGN(ValidationTestDataSource); }; class AutofillProfileValidatorTest : public testing::Test {
diff --git a/components/autofill/core/browser/browser_autofill_manager.h b/components/autofill/core/browser/browser_autofill_manager.h index ee833cf..e6193193 100644 --- a/components/autofill/core/browser/browser_autofill_manager.h +++ b/components/autofill/core/browser/browser_autofill_manager.h
@@ -83,6 +83,10 @@ AutofillClient* client, const std::string& app_locale, AutofillDownloadManagerState enable_download_manager); + + BrowserAutofillManager(const BrowserAutofillManager&) = delete; + BrowserAutofillManager& operator=(const BrowserAutofillManager&) = delete; + ~BrowserAutofillManager() override; void ShowAutofillSettings(bool show_credit_card_settings); @@ -767,7 +771,6 @@ friend class FormStructureBrowserTest; friend class GetMatchingTypesTest; friend class CreditCardAccessoryControllerTest; - DISALLOW_COPY_AND_ASSIGN(BrowserAutofillManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/data_model/autofill_data_model_unittest.cc b/components/autofill/core/browser/data_model/autofill_data_model_unittest.cc index e878bfd..11be576 100644 --- a/components/autofill/core/browser/data_model/autofill_data_model_unittest.cc +++ b/components/autofill/core/browser/data_model/autofill_data_model_unittest.cc
@@ -35,6 +35,10 @@ set_use_count(use_count); set_use_date(use_date); } + + TestAutofillDataModel(const TestAutofillDataModel&) = delete; + TestAutofillDataModel& operator=(const TestAutofillDataModel&) = delete; + ~TestAutofillDataModel() override {} private: @@ -46,8 +50,6 @@ const std::u16string& value, structured_address::VerificationStatus status) override {} void GetSupportedTypes(ServerFieldTypeSet* supported_types) const override {} - - DISALLOW_COPY_AND_ASSIGN(TestAutofillDataModel); }; } // namespace
diff --git a/components/autofill/core/browser/data_model/autofill_profile_comparator.h b/components/autofill/core/browser/data_model/autofill_profile_comparator.h index bcf37ec..e57c7fb 100644 --- a/components/autofill/core/browser/data_model/autofill_profile_comparator.h +++ b/components/autofill/core/browser/data_model/autofill_profile_comparator.h
@@ -36,6 +36,11 @@ class AutofillProfileComparator { public: explicit AutofillProfileComparator(const base::StringPiece& app_locale); + + AutofillProfileComparator(const AutofillProfileComparator&) = delete; + AutofillProfileComparator& operator=(const AutofillProfileComparator&) = + delete; + ~AutofillProfileComparator(); enum WhitespaceSpec { RETAIN_WHITESPACE, DISCARD_WHITESPACE }; @@ -314,8 +319,6 @@ private: l10n::CaseInsensitiveCompare case_insensitive_compare_; const std::string app_locale_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileComparator); }; } // namespace autofill
diff --git a/components/autofill/core/browser/form_data_importer.h b/components/autofill/core/browser/form_data_importer.h index 19d42f0d..ce758c0 100644 --- a/components/autofill/core/browser/form_data_importer.h +++ b/components/autofill/core/browser/form_data_importer.h
@@ -49,6 +49,10 @@ payments::PaymentsClient* payments_client, PersonalDataManager* personal_data_manager, const std::string& app_locale); + + FormDataImporter(const FormDataImporter&) = delete; + FormDataImporter& operator=(const FormDataImporter&) = delete; + ~FormDataImporter(); // Imports the form data, submitted by the user, into @@ -281,8 +285,6 @@ FRIEND_TEST_ALL_PREFIXES(FormDataImporterTest, ImportUpiId); FRIEND_TEST_ALL_PREFIXES(FormDataImporterTest, ImportUpiIdDisabled); FRIEND_TEST_ALL_PREFIXES(FormDataImporterTest, ImportUpiIdIgnoreNonUpiId); - - DISALLOW_COPY_AND_ASSIGN(FormDataImporter); }; } // namespace autofill
diff --git a/components/autofill/core/browser/form_parsing/autofill_scanner.h b/components/autofill/core/browser/form_parsing/autofill_scanner.h index 52d90906..c73c9a6 100644 --- a/components/autofill/core/browser/form_parsing/autofill_scanner.h +++ b/components/autofill/core/browser/form_parsing/autofill_scanner.h
@@ -22,6 +22,10 @@ explicit AutofillScanner(const std::vector<AutofillField*>& fields); explicit AutofillScanner( const std::vector<std::unique_ptr<AutofillField>>& fields); + + AutofillScanner(const AutofillScanner&) = delete; + AutofillScanner& operator=(const AutofillScanner&) = delete; + ~AutofillScanner(); // Advances the cursor by one step, if possible. @@ -64,8 +68,6 @@ // The storage of non-owning pointers, used for the unique_ptr constructor. std::vector<AutofillField*> non_owning_; - - DISALLOW_COPY_AND_ASSIGN(AutofillScanner); }; } // namespace autofill
diff --git a/components/autofill/core/browser/form_parsing/credit_card_field.h b/components/autofill/core/browser/form_parsing/credit_card_field.h index 8b3c7f6..64eb4dab 100644 --- a/components/autofill/core/browser/form_parsing/credit_card_field.h +++ b/components/autofill/core/browser/form_parsing/credit_card_field.h
@@ -24,6 +24,10 @@ class CreditCardField : public FormField { public: explicit CreditCardField(LogManager* log_manager); + + CreditCardField(const CreditCardField&) = delete; + CreditCardField& operator=(const CreditCardField&) = delete; + ~CreditCardField() override; static std::unique_ptr<FormField> Parse(AutofillScanner* scanner, const LanguageCode& page_language, @@ -103,8 +107,6 @@ // |CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR|; otherwise we store // |CREDIT_CARD_EXP_DATE_4_DIGIT_YEAR|. ServerFieldType exp_year_type_; - - DISALLOW_COPY_AND_ASSIGN(CreditCardField); }; } // namespace autofill
diff --git a/components/autofill/core/browser/form_parsing/form_field.h b/components/autofill/core/browser/form_parsing/form_field.h index 20753be..6ee706b 100644 --- a/components/autofill/core/browser/form_parsing/form_field.h +++ b/components/autofill/core/browser/form_parsing/form_field.h
@@ -37,6 +37,9 @@ // name, phone number, or address field. class FormField { public: + FormField(const FormField&) = delete; + FormField& operator=(const FormField&) = delete; + virtual ~FormField() = default; // Classifies each field in |fields| with its heuristically detected type. @@ -207,8 +210,6 @@ FieldCandidatesMap* field_candidates, const LanguageCode& page_language, LogManager* log_manager = nullptr); - - DISALLOW_COPY_AND_ASSIGN(FormField); }; } // namespace autofill
diff --git a/components/autofill/core/browser/form_structure.h b/components/autofill/core/browser/form_structure.h index fb4fce4..167984f9 100644 --- a/components/autofill/core/browser/form_structure.h +++ b/components/autofill/core/browser/form_structure.h
@@ -64,6 +64,10 @@ class FormStructure { public: explicit FormStructure(const FormData& form); + + FormStructure(const FormStructure&) = delete; + FormStructure& operator=(const FormStructure&) = delete; + virtual ~FormStructure(); // Runs several heuristics against the form fields to determine their possible @@ -686,8 +690,6 @@ // Single username details, if applicable. absl::optional<AutofillUploadContents::SingleUsernameData> single_username_data_; - - DISALLOW_COPY_AND_ASSIGN(FormStructure); }; LogBuffer& operator<<(LogBuffer& buffer, const FormStructure& form);
diff --git a/components/autofill/core/browser/geo/autofill_country.h b/components/autofill/core/browser/geo/autofill_country.h index b71ec4f..894d6cd 100644 --- a/components/autofill/core/browser/geo/autofill_country.h +++ b/components/autofill/core/browser/geo/autofill_country.h
@@ -21,6 +21,10 @@ // Returns country data corresponding to the two-letter ISO code // |country_code|. AutofillCountry(const std::string& country_code, const std::string& locale); + + AutofillCountry(const AutofillCountry&) = delete; + AutofillCountry& operator=(const AutofillCountry&) = delete; + ~AutofillCountry(); // Returns the likely country code for |locale|, or "US" as a fallback if no @@ -71,8 +75,6 @@ // Required fields for an address import for the country. RequiredFieldsForAddressImport required_fields_for_address_import_; - - DISALLOW_COPY_AND_ASSIGN(AutofillCountry); }; LogBuffer& operator<<(LogBuffer& buffer, const AutofillCountry& country);
diff --git a/components/autofill/core/browser/geo/subkey_requester.cc b/components/autofill/core/browser/geo/subkey_requester.cc index 11c8fda..6f1d7f6c 100644 --- a/components/autofill/core/browser/geo/subkey_requester.cc +++ b/components/autofill/core/browser/geo/subkey_requester.cc
@@ -45,6 +45,9 @@ base::TimeDelta::FromSeconds(timeout_seconds)); } + SubKeyRequest(const SubKeyRequest&) = delete; + SubKeyRequest& operator=(const SubKeyRequest&) = delete; + ~SubKeyRequest() override { on_timeout_.Cancel(); } void OnRulesLoaded() override { @@ -75,8 +78,6 @@ bool has_responded_; base::CancelableOnceClosure on_timeout_; - - DISALLOW_COPY_AND_ASSIGN(SubKeyRequest); }; } // namespace
diff --git a/components/autofill/core/browser/geo/subkey_requester.h b/components/autofill/core/browser/geo/subkey_requester.h index 3a9200a..d585b59 100644 --- a/components/autofill/core/browser/geo/subkey_requester.h +++ b/components/autofill/core/browser/geo/subkey_requester.h
@@ -31,6 +31,10 @@ SubKeyRequester(std::unique_ptr<::i18n::addressinput::Source> source, std::unique_ptr<::i18n::addressinput::Storage> storage); + + SubKeyRequester(const SubKeyRequester&) = delete; + SubKeyRequester& operator=(const SubKeyRequester&) = delete; + ~SubKeyRequester() override; // If the rules for |region_code| are loaded, this gets the subkeys for the @@ -68,8 +72,6 @@ // The address validator used to load subkeys. AddressValidator address_validator_; - - DISALLOW_COPY_AND_ASSIGN(SubKeyRequester); }; } // namespace autofill
diff --git a/components/autofill/core/browser/geo/subkey_requester_unittest.cc b/components/autofill/core/browser/geo/subkey_requester_unittest.cc index cb96733..6b952287 100644 --- a/components/autofill/core/browser/geo/subkey_requester_unittest.cc +++ b/components/autofill/core/browser/geo/subkey_requester_unittest.cc
@@ -63,6 +63,9 @@ : SubKeyRequester(std::move(source), std::move(storage)), should_load_rules_(true) {} + TestSubKeyRequester(const TestSubKeyRequester&) = delete; + TestSubKeyRequester& operator=(const TestSubKeyRequester&) = delete; + ~TestSubKeyRequester() override {} void ShouldLoadRules(bool should_load_rules) { @@ -77,8 +80,6 @@ private: bool should_load_rules_; - - DISALLOW_COPY_AND_ASSIGN(TestSubKeyRequester); }; } // namespace
diff --git a/components/autofill/core/browser/logging/log_manager.cc b/components/autofill/core/browser/logging/log_manager.cc index 41fe08d..60928587 100644 --- a/components/autofill/core/browser/logging/log_manager.cc +++ b/components/autofill/core/browser/logging/log_manager.cc
@@ -16,6 +16,9 @@ LogManagerImpl(LogRouter* log_router, base::RepeatingClosure notification_callback); + LogManagerImpl(const LogManagerImpl&) = delete; + LogManagerImpl& operator=(const LogManagerImpl&) = delete; + ~LogManagerImpl() override; // LogManager @@ -37,8 +40,6 @@ // Called every time the logging activity status changes. base::RepeatingClosure notification_callback_; - - DISALLOW_COPY_AND_ASSIGN(LogManagerImpl); }; LogManagerImpl::LogManagerImpl(LogRouter* log_router,
diff --git a/components/autofill/core/browser/logging/log_receiver.h b/components/autofill/core/browser/logging/log_receiver.h index 3c2e2b7c..fe3dc444 100644 --- a/components/autofill/core/browser/logging/log_receiver.h +++ b/components/autofill/core/browser/logging/log_receiver.h
@@ -15,12 +15,13 @@ class LogReceiver { public: LogReceiver() {} + + LogReceiver(const LogReceiver&) = delete; + LogReceiver& operator=(const LogReceiver&) = delete; + virtual ~LogReceiver() {} virtual void LogEntry(const base::Value& entry) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(LogReceiver); }; } // namespace autofill
diff --git a/components/autofill/core/browser/logging/log_router.h b/components/autofill/core/browser/logging/log_router.h index 633c14b..7b2e774 100644 --- a/components/autofill/core/browser/logging/log_router.h +++ b/components/autofill/core/browser/logging/log_router.h
@@ -27,6 +27,10 @@ class LogRouter : public KeyedService { public: LogRouter(); + + LogRouter(const LogRouter&) = delete; + LogRouter& operator=(const LogRouter&) = delete; + ~LogRouter() override; // Returns a JSON entry that can be fed into the logger. @@ -65,8 +69,6 @@ // Logs accumulated since the first receiver was registered. std::vector<base::Value> accumulated_logs_; - - DISALLOW_COPY_AND_ASSIGN(LogRouter); }; } // namespace autofill
diff --git a/components/autofill/core/browser/logging/stub_log_manager.h b/components/autofill/core/browser/logging/stub_log_manager.h index 0a84282..e0a23d8a 100644 --- a/components/autofill/core/browser/logging/stub_log_manager.h +++ b/components/autofill/core/browser/logging/stub_log_manager.h
@@ -16,6 +16,10 @@ class StubLogManager : public LogManager { public: StubLogManager() = default; + + StubLogManager(const StubLogManager&) = delete; + StubLogManager& operator=(const StubLogManager&) = delete; + ~StubLogManager() override = default; private: @@ -26,8 +30,6 @@ void LogEntry(base::Value&& entry) const override; bool IsLoggingActive() const override; LogBufferSubmitter Log() override; - - DISALLOW_COPY_AND_ASSIGN(StubLogManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/autofill_credit_card_filling_infobar_delegate_mobile.h b/components/autofill/core/browser/payments/autofill_credit_card_filling_infobar_delegate_mobile.h index ebd7013e6..d72e8ba 100644 --- a/components/autofill/core/browser/payments/autofill_credit_card_filling_infobar_delegate_mobile.h +++ b/components/autofill/core/browser/payments/autofill_credit_card_filling_infobar_delegate_mobile.h
@@ -25,6 +25,12 @@ AutofillCreditCardFillingInfoBarDelegateMobile( const CreditCard& card, base::OnceClosure card_filling_callback); + + AutofillCreditCardFillingInfoBarDelegateMobile( + const AutofillCreditCardFillingInfoBarDelegateMobile&) = delete; + AutofillCreditCardFillingInfoBarDelegateMobile& operator=( + const AutofillCreditCardFillingInfoBarDelegateMobile&) = delete; + ~AutofillCreditCardFillingInfoBarDelegateMobile() override; int issuer_icon_id() const { return issuer_icon_id_; } @@ -61,8 +67,6 @@ std::u16string card_label_; std::u16string card_sub_label_; - - DISALLOW_COPY_AND_ASSIGN(AutofillCreditCardFillingInfoBarDelegateMobile); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/autofill_save_card_infobar_delegate_mobile.h b/components/autofill/core/browser/payments/autofill_save_card_infobar_delegate_mobile.h index a22150c..3ba16b6 100644 --- a/components/autofill/core/browser/payments/autofill_save_card_infobar_delegate_mobile.h +++ b/components/autofill/core/browser/payments/autofill_save_card_infobar_delegate_mobile.h
@@ -48,6 +48,11 @@ local_save_card_prompt_callback, const AccountInfo& displayed_target_account); + AutofillSaveCardInfoBarDelegateMobile( + const AutofillSaveCardInfoBarDelegateMobile&) = delete; + AutofillSaveCardInfoBarDelegateMobile& operator=( + const AutofillSaveCardInfoBarDelegateMobile&) = delete; + ~AutofillSaveCardInfoBarDelegateMobile() override; // Returns |delegate| as an AutofillSaveCardInfoBarDelegateMobile, or nullptr @@ -172,8 +177,6 @@ // shouldn't appear. std::u16string displayed_target_account_email_; gfx::Image displayed_target_account_avatar_; - - DISALLOW_COPY_AND_ASSIGN(AutofillSaveCardInfoBarDelegateMobile); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.h b/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.h index d1ba2b5b..a834d6ee 100644 --- a/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.h +++ b/components/autofill/core/browser/payments/autofill_wallet_model_type_controller.h
@@ -40,6 +40,12 @@ delegate_for_transport_mode, PrefService* pref_service, syncer::SyncService* sync_service); + + AutofillWalletModelTypeController(const AutofillWalletModelTypeController&) = + delete; + AutofillWalletModelTypeController& operator=( + const AutofillWalletModelTypeController&) = delete; + ~AutofillWalletModelTypeController() override; // DataTypeController overrides. @@ -62,8 +68,6 @@ syncer::SyncService* const sync_service_; PrefChangeRegistrar pref_registrar_; - - DISALLOW_COPY_AND_ASSIGN(AutofillWalletModelTypeController); }; } // namespace browser_sync
diff --git a/components/autofill/core/browser/payments/credit_card_access_manager.h b/components/autofill/core/browser/payments/credit_card_access_manager.h index fc92c079..b376baae 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager.h +++ b/components/autofill/core/browser/payments/credit_card_access_manager.h
@@ -92,6 +92,10 @@ AutofillClient* client, PersonalDataManager* personal_data_manager, CreditCardFormEventLogger* credit_card_form_event_logger); + + CreditCardAccessManager(const CreditCardAccessManager&) = delete; + CreditCardAccessManager& operator=(const CreditCardAccessManager&) = delete; + ~CreditCardAccessManager() override; // Logs information about current credit card data. @@ -358,8 +362,6 @@ std::unordered_map<std::string, CachedServerCardInfo> unmasked_card_cache_; base::WeakPtrFactory<CreditCardAccessManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CreditCardAccessManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/credit_card_cvc_authenticator.h b/components/autofill/core/browser/payments/credit_card_cvc_authenticator.h index 1170a361..b9e6947 100644 --- a/components/autofill/core/browser/payments/credit_card_cvc_authenticator.h +++ b/components/autofill/core/browser/payments/credit_card_cvc_authenticator.h
@@ -82,6 +82,11 @@ #endif }; explicit CreditCardCVCAuthenticator(AutofillClient* client); + + CreditCardCVCAuthenticator(const CreditCardCVCAuthenticator&) = delete; + CreditCardCVCAuthenticator& operator=(const CreditCardCVCAuthenticator&) = + delete; + ~CreditCardCVCAuthenticator() override; // Authentication @@ -131,8 +136,6 @@ base::WeakPtr<Requester> requester_; base::WeakPtrFactory<CreditCardCVCAuthenticator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CreditCardCVCAuthenticator); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/credit_card_fido_authenticator.h b/components/autofill/core/browser/payments/credit_card_fido_authenticator.h index eabbaee..4c1e054 100644 --- a/components/autofill/core/browser/payments/credit_card_fido_authenticator.h +++ b/components/autofill/core/browser/payments/credit_card_fido_authenticator.h
@@ -102,6 +102,11 @@ virtual void OnFidoAuthorizationComplete(bool did_succeed) = 0; }; CreditCardFIDOAuthenticator(AutofillDriver* driver, AutofillClient* client); + + CreditCardFIDOAuthenticator(const CreditCardFIDOAuthenticator&) = delete; + CreditCardFIDOAuthenticator& operator=(const CreditCardFIDOAuthenticator&) = + delete; + ~CreditCardFIDOAuthenticator() override; // Invokes Authentication flow. Responds to |accessor_| with full pan. @@ -291,8 +296,6 @@ base::WaitableEvent user_is_verifiable_callback_received_; base::WeakPtrFactory<CreditCardFIDOAuthenticator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CreditCardFIDOAuthenticator); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/credit_card_otp_authenticator.cc b/components/autofill/core/browser/payments/credit_card_otp_authenticator.cc index fbd9cb1..74902cfa 100644 --- a/components/autofill/core/browser/payments/credit_card_otp_authenticator.cc +++ b/components/autofill/core/browser/payments/credit_card_otp_authenticator.cc
@@ -16,8 +16,9 @@ CreditCardOtpAuthenticator::~CreditCardOtpAuthenticator() = default; -void CreditCardOtpAuthenticator::Authenticate( +void CreditCardOtpAuthenticator::OnChallengeOptionSelected( const CreditCard* card, + const CardUnmaskChallengeOption& selected_challenge_option, base::WeakPtr<Requester> requester, const std::string& context_token, int64_t billing_customer_number) { @@ -25,32 +26,127 @@ return requester->OnOtpAuthenticationComplete( OtpAuthenticationResponse().with_did_succeed(false)); } - + // Currently only virtual cards are supported for OTP authentication. + DCHECK_EQ(card->record_type(), CreditCard::VIRTUAL_CARD); + DCHECK_EQ(selected_challenge_option.type, + CardUnmaskChallengeOptionType::kSmsOtp); + DCHECK(!context_token.empty()); + // Store info for this session. These info will be shared for multiple + // payments requests. Only |context_token_| will be changed during this + // session. + card_ = card; + selected_challenge_option_ = selected_challenge_option; requester_ = requester; + context_token_ = context_token; + billing_customer_number_ = billing_customer_number; - absl::optional<GURL> last_committed_url_origin; - if (autofill_client_->GetLastCommittedURL().is_valid()) { - last_committed_url_origin = - autofill_client_->GetLastCommittedURL().GetOrigin(); - } - + // Asynchronously prepare payments_client. This is only needed once per + // session. DCHECK(payments_client_); payments_client_->Prepare(); - request_ = std::make_unique<payments::PaymentsClient::UnmaskRequestDetails>(); - request_->card = *card; - request_->reason = AutofillClient::UnmaskCardReason::kAutofill; - request_->last_committed_url_origin = last_committed_url_origin; - request_->billing_customer_number = billing_customer_number; - request_->context_token = context_token_; + // Send user selected challenge option to server. + SendSelectChallengeOptionRequest(); +} - // TODO(crbug.com/1243475): Show otp authentication dialog with masked phone - // number and otp digits. Then hold request before otp value is populated. +void CreditCardOtpAuthenticator::SendSelectChallengeOptionRequest() { + // Prepare SelectChallengeOption request. + select_challenge_option_request_ = std::make_unique< + payments::PaymentsClient::SelectChallengeOptionRequestDetails>(); + select_challenge_option_request_->selected_challenge_option = + selected_challenge_option_; + select_challenge_option_request_->billing_customer_number = + billing_customer_number_; + select_challenge_option_request_->context_token = context_token_; + // Send SelectChallengeOption request to server, the callback is + // |OnDidSelectChallengeOption|. + payments_client_->SelectChallengeOption( + *select_challenge_option_request_, + base::BindOnce(&CreditCardOtpAuthenticator::OnDidSelectChallengeOption, + weak_ptr_factory_.GetWeakPtr())); +} + +void CreditCardOtpAuthenticator::OnDidSelectChallengeOption( + AutofillClient::PaymentsRpcResult result, + const std::string& context_token) { + if (result == AutofillClient::PaymentsRpcResult::kSuccess) { + DCHECK(!context_token.empty()); + // Update the |context_token_| with the new one. + context_token_ = context_token; + // Display the OTP dialog. + ShowOtpDialog(); + } + // TODO(crbug.com/1243475): Add error handling for SelectChallengeOption + // response. +} + +void CreditCardOtpAuthenticator::ShowOtpDialog() { + // Before showing OTP dialog, let's load required risk data if it's not + // prepared. Risk data is only required for unmask request. Not required for + // select challenge option request. // TODO(crbug.com/1243475): Explore the possibility of sending one // LoadRiskData request per session. - autofill_client_->LoadRiskData( - base::BindOnce(&CreditCardOtpAuthenticator::OnDidGetUnmaskRiskData, + if (risk_data_.empty()) { + autofill_client_->LoadRiskData( + base::BindOnce(&CreditCardOtpAuthenticator::OnDidGetUnmaskRiskData, + weak_ptr_factory_.GetWeakPtr())); + } + + // TODO(crbug.com/1243475): Invoke autofill_client to show otp authentication + // dialog. Then hold request before otp value is populated. + // Once user confirms the OTP, we wil invoke |OnUnmaskPromptAccepted(otp)|. + // If user asks for a new OTP code, we will invoke + // |SendSelectChallengeOptionRequest()| again. +} + +void CreditCardOtpAuthenticator::OnUnmaskPromptAccepted( + const std::u16string& otp) { + otp_ = otp; + + unmask_request_ = + std::make_unique<payments::PaymentsClient::UnmaskRequestDetails>(); + unmask_request_->card = *card_; + unmask_request_->reason = AutofillClient::UnmaskCardReason::kAutofill; + unmask_request_->billing_customer_number = billing_customer_number_; + unmask_request_->context_token = context_token_; + unmask_request_->otp = otp_; + + if (card_->record_type() == CreditCard::VIRTUAL_CARD) { + absl::optional<GURL> last_committed_url_origin; + if (autofill_client_->GetLastCommittedURL().is_valid()) { + last_committed_url_origin = + autofill_client_->GetLastCommittedURL().GetOrigin(); + } + unmask_request_->last_committed_url_origin = last_committed_url_origin; + } + + // Populating risk data and showing OTP dialog may occur asynchronously. + // If |risk_data_| has already been loaded, send the unmask card request. + // Otherwise, continue to wait and let OnDidGetUnmaskRiskData handle it. + if (!risk_data_.empty()) { + SendUnmaskCardRequest(); + } +} + +void CreditCardOtpAuthenticator::OnDidGetUnmaskRiskData( + const std::string& risk_data) { + risk_data_ = risk_data; + // Populating risk data and showing OTP dialog may occur asynchronously. + // If the dialog has already been accepted (otp is provided), send the unmask + // card request. Otherwise, continue to wait for the user to accept the OTP + // dialog. + if (!otp_.empty()) { + SendUnmaskCardRequest(); + } +} + +void CreditCardOtpAuthenticator::SendUnmaskCardRequest() { + unmask_request_->risk_data = risk_data_; + + payments_client_->UnmaskCard( + *unmask_request_, + base::BindOnce(&CreditCardOtpAuthenticator::OnDidGetRealPan, weak_ptr_factory_.GetWeakPtr())); } @@ -67,6 +163,8 @@ OtpAuthenticationResponse().with_did_succeed(false)); return; } + // TODO(crbug.com/1243475): Add error handling for otp mismatch/expired + // errors. We allow user retry. // The following prerequisites should be ensured in the PaymentsClient. DCHECK(!response_details.real_pan.empty()); @@ -74,44 +172,37 @@ DCHECK(!response_details.expiration_month.empty()); DCHECK(!response_details.expiration_year.empty()); - request_->card.SetNumber(base::UTF8ToUTF16(response_details.real_pan)); - request_->card.set_record_type(CreditCard::VIRTUAL_CARD); - request_->card.SetExpirationMonthFromString( + unmask_request_->card.SetNumber( + base::UTF8ToUTF16(response_details.real_pan)); + unmask_request_->card.set_record_type(CreditCard::VIRTUAL_CARD); + unmask_request_->card.SetExpirationMonthFromString( base::UTF8ToUTF16(response_details.expiration_month), /*app_locale=*/std::string()); - request_->card.SetExpirationYearFromString( + unmask_request_->card.SetExpirationYearFromString( base::UTF8ToUTF16(response_details.expiration_year)); auto response = OtpAuthenticationResponse().with_did_succeed(true); - response.card = &(request_->card); + response.card = &(unmask_request_->card); response.cvc = base::UTF8ToUTF16(response_details.dcvv); requester_->OnOtpAuthenticationComplete(response); return; } - // TODO(crbug.com/1243475): Add error handling. + // TODO(crbug.com/1243475): Add error handling for VCN error. requester_->OnOtpAuthenticationComplete( OtpAuthenticationResponse().with_did_succeed(false)); } -void CreditCardOtpAuthenticator::OnDidGetUnmaskRiskData( - const std::string& risk_data) { - request_->risk_data = risk_data; - if (!otp_.empty()) - SendUnmaskCardRequest(); -} - -void CreditCardOtpAuthenticator::SendUnmaskCardRequest() { - payments_client_->UnmaskCard( - *request_, base::BindOnce(&CreditCardOtpAuthenticator::OnDidGetRealPan, - weak_ptr_factory_.GetWeakPtr())); -} - void CreditCardOtpAuthenticator::Reset() { weak_ptr_factory_.InvalidateWeakPtrs(); payments_client_->CancelRequest(); - request_.reset(); + card_ = nullptr; + selected_challenge_option_ = CardUnmaskChallengeOption(); otp_ = std::u16string(); context_token_ = std::string(); + risk_data_ = std::string(); + billing_customer_number_ = 0; + select_challenge_option_request_.reset(); + unmask_request_.reset(); } } // namespace autofill
diff --git a/components/autofill/core/browser/payments/credit_card_otp_authenticator.h b/components/autofill/core/browser/payments/credit_card_otp_authenticator.h index 091b1a9a..6be4a2d 100644 --- a/components/autofill/core/browser/payments/credit_card_otp_authenticator.h +++ b/components/autofill/core/browser/payments/credit_card_otp_authenticator.h
@@ -59,17 +59,40 @@ CreditCardOtpAuthenticator& operator=(const CreditCardOtpAuthenticator&) = delete; - // Start the OTP authentication for the |card|. - void Authenticate(const CreditCard* card, - base::WeakPtr<Requester> requester, - const std::string& context_token, - int64_t billing_customer_number); + // Start the OTP authentication for the |card| with + // |selected_challenge_option|. Will invoke + // |SendSelectChallengeOptionRequest()| to send the selected challenge option + // to server. + void OnChallengeOptionSelected( + const CreditCard* card, + const CardUnmaskChallengeOption& selected_challenge_option, + base::WeakPtr<Requester> requester, + const std::string& context_token, + int64_t billing_customer_number); + + // Have PaymentsClient send a SelectChallengeOptionRequest. This will also be + // invoked when user requests to get a new OTP code. The response's callback + // function is |OnDidSelectChallengeOption()| when server response returns. + void SendSelectChallengeOptionRequest(); + + // Callback function invoked when the client receives the select challenge + // option response from the server. Updates locally-cached |context_token_| to + // the latest version. On a success, this will trigger the otp dialog by + // calling |ShowOtpDialog()|. If server returns error, show the error dialog + // and end session. + void OnDidSelectChallengeOption(AutofillClient::PaymentsRpcResult result, + const std::string& context_token); + + // Called when the user has attempted an OTP verification. This will prepare + // unmask request and invoke |SendUnmaskCardRequest()|. Note that this can + // also be invoked when user retries with a new OTP. + void OnUnmaskPromptAccepted(const std::u16string& otp); // Callback function invoked when the client receives a response from the // server. Updates locally-cached |context_token_| to the latest version. If // the request was successful, dismiss the UI and pass the full card // information to the CreditCardAccessManager, otherwise update the UI to show - // the correct error message. + // the correct error message and end the session. void OnDidGetRealPan( AutofillClient::PaymentsRpcResult result, payments::PaymentsClient::UnmaskResponseDetails& response_details); @@ -77,22 +100,39 @@ private: friend class CreditCardOtpAuthenticatorTest; + // Display the OTP dialog UI. + // Once user confirms the OTP, we wil invoke |OnUnmaskPromptAccepted(otp)|. + // If user asks for a new OTP code, we will invoke + // |SendSelectChallengeOptionRequest()| again. + void ShowOtpDialog(); + // Invoked when risk data is fetched. void OnDidGetUnmaskRiskData(const std::string& risk_data); - // Have PaymentsClient send a UnmaskCardRequest for this card. + // Have PaymentsClient send a UnmaskCardRequest for this card. The response's + // callback function is |OnDidGetRealPan()|. void SendUnmaskCardRequest(); // Reset the authenticator to initial states. void Reset(); + // Card being unmasked. + const CreditCard* card_; + // User-entered OTP value. std::u16string otp_; + // User-selected challenge option. + CardUnmaskChallengeOption selected_challenge_option_; + // Stores the latest version of the context token, passed between Payments // calls and unmodified by Chrome. std::string context_token_; + std::string risk_data_; + + int64_t billing_customer_number_; + // The associated autofill client. AutofillClient* autofill_client_; @@ -102,8 +142,14 @@ // Weak pointer to object that is requesting authentication. base::WeakPtr<Requester> requester_; - // This contains the details of the request to be sent to the server. - std::unique_ptr<payments::PaymentsClient::UnmaskRequestDetails> request_; + // This contains the details of the SelectChallengeOption request to be sent + // to the server. + std::unique_ptr<payments::PaymentsClient::SelectChallengeOptionRequestDetails> + select_challenge_option_request_; + + // This contains the details of the Unmask request to be sent to the server. + std::unique_ptr<payments::PaymentsClient::UnmaskRequestDetails> + unmask_request_; base::WeakPtrFactory<CreditCardOtpAuthenticator> weak_ptr_factory_{this}; };
diff --git a/components/autofill/core/browser/payments/credit_card_otp_authenticator_unittest.cc b/components/autofill/core/browser/payments/credit_card_otp_authenticator_unittest.cc index f54c2a1..bcd9e5d4 100644 --- a/components/autofill/core/browser/payments/credit_card_otp_authenticator_unittest.cc +++ b/components/autofill/core/browser/payments/credit_card_otp_authenticator_unittest.cc
@@ -19,8 +19,10 @@ namespace autofill { namespace { +const char kTestChallengeId[] = "arbitrary challenge id"; const char kTestNumber[] = "4234567890123456"; const char16_t kTestNumber16[] = u"4234567890123456"; +const char16_t kMaskedPhoneNumber[] = u"(***)-***-5678"; } // namespace class CreditCardOtpAuthenticatorTest : public testing::Test { @@ -44,12 +46,11 @@ requester_ = std::make_unique<TestAuthenticationRequester>(); autofill_driver_ = std::make_unique<TestAutofillDriver>(); - payments::TestPaymentsClient* payments_client = - new payments::TestPaymentsClient( - autofill_driver_->GetURLLoaderFactory(), - autofill_client_.GetIdentityManager(), &personal_data_manager_); + payments_client_ = new payments::TestPaymentsClient( + autofill_driver_->GetURLLoaderFactory(), + autofill_client_.GetIdentityManager(), &personal_data_manager_); autofill_client_.set_test_payments_client( - std::unique_ptr<payments::TestPaymentsClient>(payments_client)); + std::unique_ptr<payments::TestPaymentsClient>(payments_client_)); authenticator_ = std::make_unique<CreditCardOtpAuthenticator>(&autofill_client_); } @@ -63,7 +64,6 @@ void OnDidGetRealPan(AutofillClient::PaymentsRpcResult result, const std::string& real_pan) { - authenticator_->otp_ = u"123456"; payments::PaymentsClient::UnmaskResponseDetails response; response.real_pan = real_pan; response.dcvv = "123"; @@ -73,20 +73,51 @@ authenticator_->OnDidGetRealPan(result, response); } + std::string OtpAuthenticatorContextToken() { + return authenticator_->context_token_; + } + protected: std::unique_ptr<TestAuthenticationRequester> requester_; base::test::TaskEnvironment task_environment_; TestAutofillClient autofill_client_; std::unique_ptr<TestAutofillDriver> autofill_driver_; TestPersonalDataManager personal_data_manager_; + payments::TestPaymentsClient* payments_client_; std::unique_ptr<CreditCardOtpAuthenticator> authenticator_; }; TEST_F(CreditCardOtpAuthenticatorTest, AuthenticateServerCardSuccess) { CreditCard card = test::GetMaskedServerCard(); - authenticator_->Authenticate(&card, requester_->GetWeakPtr(), - /*context_token=*/"", - /*billing_customer_number=*/0); + card.set_record_type(CreditCard::VIRTUAL_CARD); + CardUnmaskChallengeOption selected_otp_challenge_option; + selected_otp_challenge_option.type = CardUnmaskChallengeOptionType::kSmsOtp; + selected_otp_challenge_option.id = kTestChallengeId; + selected_otp_challenge_option.challenge_info = kMaskedPhoneNumber; + + // Simulate user selects OTP challenge option. Current context_token is from + // previous unmask response. TestPaymentsClient will ack the select challenge + // option request and directly invoke the callback. + authenticator_->OnChallengeOptionSelected( + &card, selected_otp_challenge_option, requester_->GetWeakPtr(), + /*context_token=*/"context_token_from_previous_unmask_response", + /*billing_customer_number=*/1111111); + // Verify the context token is updated with SelectChallengeOption response. + EXPECT_FALSE(OtpAuthenticatorContextToken().empty()); + EXPECT_NE(OtpAuthenticatorContextToken(), + "context_token_from_previous_unmask_response"); + // TODO(crbug.com/1243475): Verify the otp dialog is shown. + + // Simulate user provide the OTP and click 'Confirm' in the OTP dialog. + // TestPaymentsClient just stores the unmask request detail, won't invoke the + // callback. OnDidGetRealPan below will manually invoke the callback. + authenticator_->OnUnmaskPromptAccepted(/*otp=*/u"123456"); + // Verify that the otp is correctly set in UnmaskRequestDetails. + EXPECT_EQ(payments_client_->unmask_request()->otp, u"123456"); + // Also verify that risk data is set in UnmaskRequestDetails. + EXPECT_FALSE(payments_client_->unmask_request()->risk_data.empty()); + + // Simulate server returns success and invoke the callback. OnDidGetRealPan(AutofillClient::PaymentsRpcResult::kSuccess, kTestNumber); EXPECT_TRUE(requester_->did_succeed()); EXPECT_EQ(kTestNumber16, requester_->number());
diff --git a/components/autofill/core/browser/payments/credit_card_save_manager.h b/components/autofill/core/browser/payments/credit_card_save_manager.h index a10f8b1c..7b5d3da 100644 --- a/components/autofill/core/browser/payments/credit_card_save_manager.h +++ b/components/autofill/core/browser/payments/credit_card_save_manager.h
@@ -98,6 +98,10 @@ payments::PaymentsClient* payments_client, const std::string& app_locale, PersonalDataManager* personal_data_manager); + + CreditCardSaveManager(const CreditCardSaveManager&) = delete; + CreditCardSaveManager& operator=(const CreditCardSaveManager&) = delete; + virtual ~CreditCardSaveManager(); // Begins the process to offer local credit card save to the user. @@ -393,8 +397,6 @@ FRIEND_TEST_ALL_PREFIXES( CreditCardSaveManagerTest, UploadCreditCard_WalletSyncTransportNotEnabled_ShouldRequestExpirationDate); - - DISALLOW_COPY_AND_ASSIGN(CreditCardSaveManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/full_card_request.h b/components/autofill/core/browser/payments/full_card_request.h index fbc44f2..b27bc50 100644 --- a/components/autofill/core/browser/payments/full_card_request.h +++ b/components/autofill/core/browser/payments/full_card_request.h
@@ -102,6 +102,10 @@ FullCardRequest(RiskDataLoader* risk_data_loader, payments::PaymentsClient* payments_client, PersonalDataManager* personal_data_manager); + + FullCardRequest(const FullCardRequest&) = delete; + FullCardRequest& operator=(const FullCardRequest&) = delete; + ~FullCardRequest(); // Retrieves the pan for |card| after querying the user for CVC and invokes @@ -226,8 +230,6 @@ // Enables destroying FullCardRequest while CVC prompt is showing or a server // communication is pending. base::WeakPtrFactory<FullCardRequest> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FullCardRequest); }; } // namespace payments
diff --git a/components/autofill/core/browser/payments/local_card_migration_manager.h b/components/autofill/core/browser/payments/local_card_migration_manager.h index af767cf7..9b4cb4b 100644 --- a/components/autofill/core/browser/payments/local_card_migration_manager.h +++ b/components/autofill/core/browser/payments/local_card_migration_manager.h
@@ -86,6 +86,11 @@ payments::PaymentsClient* payments_client, const std::string& app_locale, PersonalDataManager* personal_data_manager); + + LocalCardMigrationManager(const LocalCardMigrationManager&) = delete; + LocalCardMigrationManager& operator=(const LocalCardMigrationManager&) = + delete; + virtual ~LocalCardMigrationManager(); // Returns true if all of the conditions for allowing local credit card @@ -252,8 +257,6 @@ local_card_migration_strike_database_; base::WeakPtrFactory<LocalCardMigrationManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/payments_client.cc b/components/autofill/core/browser/payments/payments_client.cc index 91c5448..7102673b 100644 --- a/components/autofill/core/browser/payments/payments_client.cc +++ b/components/autofill/core/browser/payments/payments_client.cc
@@ -283,6 +283,10 @@ : callback_(std::move(callback)), app_locale_(app_locale), full_sync_enabled_(full_sync_enabled) {} + + GetUnmaskDetailsRequest(const GetUnmaskDetailsRequest&) = delete; + GetUnmaskDetailsRequest& operator=(const GetUnmaskDetailsRequest&) = delete; + ~GetUnmaskDetailsRequest() override {} std::string GetRequestUrlPath() override { @@ -360,7 +364,6 @@ // Suggested authentication method and other information to facilitate card // unmasking. payments::PaymentsClient::UnmaskDetails unmask_details_; - DISALLOW_COPY_AND_ASSIGN(GetUnmaskDetailsRequest); }; class UnmaskCardRequest : public PaymentsRequest { @@ -375,6 +378,10 @@ callback_(std::move(callback)) { DCHECK_NE(CreditCard::LOCAL_CARD, request_details.card.record_type()); } + + UnmaskCardRequest(const UnmaskCardRequest&) = delete; + UnmaskCardRequest& operator=(const UnmaskCardRequest&) = delete; + ~UnmaskCardRequest() override {} std::string GetRequestUrlPath() override { return kUnmaskCardRequestPath; } @@ -590,8 +597,6 @@ PaymentsClient::UnmaskResponseDetails&)> callback_; PaymentsClient::UnmaskResponseDetails response_details_; - - DISALLOW_COPY_AND_ASSIGN(UnmaskCardRequest); }; class OptChangeRequest : public PaymentsRequest { @@ -605,6 +610,10 @@ : request_details_(request_details), callback_(std::move(callback)), full_sync_enabled_(full_sync_enabled) {} + + OptChangeRequest(const OptChangeRequest&) = delete; + OptChangeRequest& operator=(const OptChangeRequest&) = delete; + ~OptChangeRequest() override {} std::string GetRequestUrlPath() override { return kOptChangeRequestPath; } @@ -702,8 +711,6 @@ callback_; const bool full_sync_enabled_; PaymentsClient::OptChangeResponseDetails response_details_; - - DISALLOW_COPY_AND_ASSIGN(OptChangeRequest); }; class GetUploadDetailsRequest : public PaymentsRequest { @@ -728,6 +735,10 @@ callback_(std::move(callback)), billable_service_number_(billable_service_number), upload_card_source_(upload_card_source) {} + + GetUploadDetailsRequest(const GetUploadDetailsRequest&) = delete; + GetUploadDetailsRequest& operator=(const GetUploadDetailsRequest&) = delete; + ~GetUploadDetailsRequest() override {} std::string GetRequestUrlPath() override { @@ -874,8 +885,6 @@ std::vector<std::pair<int, int>> supported_card_bin_ranges_; const int billable_service_number_; PaymentsClient::UploadCardSource upload_card_source_; - - DISALLOW_COPY_AND_ASSIGN(GetUploadDetailsRequest); }; class UploadCardRequest : public PaymentsRequest { @@ -887,6 +896,10 @@ : request_details_(request_details), full_sync_enabled_(full_sync_enabled), callback_(std::move(callback)) {} + + UploadCardRequest(const UploadCardRequest&) = delete; + UploadCardRequest& operator=(const UploadCardRequest&) = delete; + ~UploadCardRequest() override {} std::string GetRequestUrlPath() override { return kUploadCardRequestPath; } @@ -991,8 +1004,6 @@ const std::string&)> callback_; std::string server_id_; - - DISALLOW_COPY_AND_ASSIGN(UploadCardRequest); }; class MigrateCardsRequest : public PaymentsRequest { @@ -1006,6 +1017,10 @@ migratable_credit_cards_(migratable_credit_cards), full_sync_enabled_(full_sync_enabled), callback_(std::move(callback)) {} + + MigrateCardsRequest(const MigrateCardsRequest&) = delete; + MigrateCardsRequest& operator=(const MigrateCardsRequest&) = delete; + ~MigrateCardsRequest() override {} std::string GetRequestUrlPath() override { return kMigrateCardsRequestPath; } @@ -1119,8 +1134,6 @@ MigrateCardsCallback callback_; std::unique_ptr<std::unordered_map<std::string, std::string>> save_result_; std::string display_text_; - - DISALLOW_COPY_AND_ASSIGN(MigrateCardsRequest); }; } // namespace
diff --git a/components/autofill/core/browser/payments/payments_client.h b/components/autofill/core/browser/payments/payments_client.h index 5657128..4c20015c 100644 --- a/components/autofill/core/browser/payments/payments_client.h +++ b/components/autofill/core/browser/payments/payments_client.h
@@ -254,7 +254,6 @@ // An opaque token used to chain consecutive payments requests together. std::string context_token; int64_t billing_customer_number = 0; - std::string app_locale; }; // An enum set in the GetUploadDetailsRequest indicating the source of the @@ -288,6 +287,9 @@ AccountInfoGetter* const account_info_getter, bool is_off_the_record = false); + PaymentsClient(const PaymentsClient&) = delete; + PaymentsClient& operator=(const PaymentsClient&) = delete; + virtual ~PaymentsClient(); // Starts fetching the OAuth2 token in anticipation of future Payments @@ -441,8 +443,6 @@ bool has_retried_authorization_; base::WeakPtrFactory<PaymentsClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PaymentsClient); }; } // namespace payments
diff --git a/components/autofill/core/browser/payments/payments_client_unittest.cc b/components/autofill/core/browser/payments/payments_client_unittest.cc index 3b185d1..6a338ba0 100644 --- a/components/autofill/core/browser/payments/payments_client_unittest.cc +++ b/components/autofill/core/browser/payments/payments_client_unittest.cc
@@ -125,6 +125,10 @@ class PaymentsClientTest : public testing::Test { public: PaymentsClientTest() = default; + + PaymentsClientTest(const PaymentsClientTest&) = delete; + PaymentsClientTest& operator=(const PaymentsClientTest&) = delete; + ~PaymentsClientTest() override = default; void SetUp() override { @@ -345,7 +349,6 @@ PaymentsClient::SelectChallengeOptionRequestDetails request_details; request_details.billing_customer_number = 555666777888; request_details.context_token = "fake context token"; - request_details.app_locale = "language-LOCALE"; CardUnmaskChallengeOption selected_challenge_option; selected_challenge_option.type = challenge_type; @@ -480,8 +483,6 @@ base::WeakPtrFactory<PaymentsClientTest> weak_ptr_factory_{this}; private: - DISALLOW_COPY_AND_ASSIGN(PaymentsClientTest); - std::vector<AutofillProfile> BuildTestProfiles() { std::vector<AutofillProfile> profiles; profiles.push_back(BuildProfile("John", "Smith", "1234 Main St.", "Miami",
diff --git a/components/autofill/core/browser/payments/payments_requests/select_challenge_option_request.cc b/components/autofill/core/browser/payments/payments_requests/select_challenge_option_request.cc index bb79687..def64a56 100644 --- a/components/autofill/core/browser/payments/payments_requests/select_challenge_option_request.cc +++ b/components/autofill/core/browser/payments/payments_requests/select_challenge_option_request.cc
@@ -37,7 +37,6 @@ std::string SelectChallengeOptionRequest::GetRequestContent() { base::Value request_dict(base::Value::Type::DICTIONARY); base::Value context(base::Value::Type::DICTIONARY); - context.SetKey("language_code", base::Value(request_details_.app_locale)); context.SetKey("billable_service", base::Value(kUnmaskCardBillableServiceNumber)); request_dict.SetKey("context", std::move(context));
diff --git a/components/autofill/core/browser/payments/payments_util_unittest.cc b/components/autofill/core/browser/payments/payments_util_unittest.cc index 620e4ed9..9b460aa4 100644 --- a/components/autofill/core/browser/payments/payments_util_unittest.cc +++ b/components/autofill/core/browser/payments/payments_util_unittest.cc
@@ -19,13 +19,14 @@ class PaymentsUtilTest : public testing::Test { public: PaymentsUtilTest() {} + + PaymentsUtilTest(const PaymentsUtilTest&) = delete; + PaymentsUtilTest& operator=(const PaymentsUtilTest&) = delete; + ~PaymentsUtilTest() override {} protected: TestPersonalDataManager personal_data_manager_; - - private: - DISALLOW_COPY_AND_ASSIGN(PaymentsUtilTest); }; TEST_F(PaymentsUtilTest, GetBillingCustomerId_PaymentsCustomerData_Normal) {
diff --git a/components/autofill/core/browser/payments/test_credit_card_fido_authenticator.h b/components/autofill/core/browser/payments/test_credit_card_fido_authenticator.h index 36dc7d4..08067f9b 100644 --- a/components/autofill/core/browser/payments/test_credit_card_fido_authenticator.h +++ b/components/autofill/core/browser/payments/test_credit_card_fido_authenticator.h
@@ -22,6 +22,12 @@ public: explicit TestCreditCardFIDOAuthenticator(AutofillDriver* driver, AutofillClient* client); + + TestCreditCardFIDOAuthenticator(const TestCreditCardFIDOAuthenticator&) = + delete; + TestCreditCardFIDOAuthenticator& operator=( + const TestCreditCardFIDOAuthenticator&) = delete; + ~TestCreditCardFIDOAuthenticator() override; // CreditCardFIDOAuthenticator: @@ -61,8 +67,6 @@ PublicKeyCredentialCreationOptionsPtr creation_options_; bool is_user_verifiable_ = false; bool opt_out_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestCreditCardFIDOAuthenticator); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/test_credit_card_save_manager.h b/components/autofill/core/browser/payments/test_credit_card_save_manager.h index db3376f..0a90fdef 100644 --- a/components/autofill/core/browser/payments/test_credit_card_save_manager.h +++ b/components/autofill/core/browser/payments/test_credit_card_save_manager.h
@@ -26,6 +26,11 @@ AutofillClient* client, payments::TestPaymentsClient* payments_client, PersonalDataManager* personal_data_manager); + + TestCreditCardSaveManager(const TestCreditCardSaveManager&) = delete; + TestCreditCardSaveManager& operator=(const TestCreditCardSaveManager&) = + delete; + ~TestCreditCardSaveManager() override; bool IsCreditCardUploadEnabled() override; @@ -48,8 +53,6 @@ FRIEND_TEST_ALL_PREFIXES(CreditCardSaveManagerTest, UploadCreditCard_NumStrikesLoggedOnUploadNotSuccess); - - DISALLOW_COPY_AND_ASSIGN(TestCreditCardSaveManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/test_legal_message_line.h b/components/autofill/core/browser/payments/test_legal_message_line.h index 111e904..b894206f 100644 --- a/components/autofill/core/browser/payments/test_legal_message_line.h +++ b/components/autofill/core/browser/payments/test_legal_message_line.h
@@ -26,6 +26,9 @@ set_links(links); } + TestLegalMessageLine(const TestLegalMessageLine&) = delete; + TestLegalMessageLine& operator=(const TestLegalMessageLine&) = delete; + ~TestLegalMessageLine() override {} void set_text(const std::string& ascii_text) { @@ -33,9 +36,6 @@ } void set_links(const Links& links) { links_ = links; } - - private: - DISALLOW_COPY_AND_ASSIGN(TestLegalMessageLine); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/test_local_card_migration_manager.h b/components/autofill/core/browser/payments/test_local_card_migration_manager.h index 5565710..9e50308 100644 --- a/components/autofill/core/browser/payments/test_local_card_migration_manager.h +++ b/components/autofill/core/browser/payments/test_local_card_migration_manager.h
@@ -29,6 +29,11 @@ AutofillClient* client, payments::TestPaymentsClient* payments_client, TestPersonalDataManager* personal_data_manager); + + TestLocalCardMigrationManager(const TestLocalCardMigrationManager&) = delete; + TestLocalCardMigrationManager& operator=( + const TestLocalCardMigrationManager&) = delete; + ~TestLocalCardMigrationManager() override; // Override the base function. Checks the existnece of billing customer number @@ -73,8 +78,6 @@ bool main_prompt_was_shown_ = false; TestPersonalDataManager* personal_data_manager_; - - DISALLOW_COPY_AND_ASSIGN(TestLocalCardMigrationManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/payments/test_payments_client.cc b/components/autofill/core/browser/payments/test_payments_client.cc index 2955365..b5324e8 100644 --- a/components/autofill/core/browser/payments/test_payments_client.cc +++ b/components/autofill/core/browser/payments/test_payments_client.cc
@@ -94,6 +94,14 @@ std::move(save_result_), "this is display text"); } +void TestPaymentsClient::SelectChallengeOption( + const SelectChallengeOptionRequestDetails& details, + base::OnceCallback<void(AutofillClient::PaymentsRpcResult, + const std::string&)> callback) { + std::move(callback).Run(AutofillClient::PaymentsRpcResult::kSuccess, + "context_token from SelectChallengeOption"); +} + void TestPaymentsClient::ShouldReturnUnmaskDetailsImmediately( bool should_return_unmask_details) { should_return_unmask_details_ = should_return_unmask_details;
diff --git a/components/autofill/core/browser/payments/test_payments_client.h b/components/autofill/core/browser/payments/test_payments_client.h index 52135648..359b399c 100644 --- a/components/autofill/core/browser/payments/test_payments_client.h +++ b/components/autofill/core/browser/payments/test_payments_client.h
@@ -28,6 +28,9 @@ signin::IdentityManager* identity_manager, PersonalDataManager* personal_data_manager); + TestPaymentsClient(const TestPaymentsClient&) = delete; + TestPaymentsClient& operator=(const TestPaymentsClient&) = delete; + ~TestPaymentsClient() override; void GetUnmaskDetails( @@ -63,6 +66,11 @@ const std::vector<MigratableCreditCard>& migratable_credit_cards, MigrateCardsCallback callback) override; + void SelectChallengeOption( + const SelectChallengeOptionRequestDetails& details, + base::OnceCallback<void(AutofillClient::PaymentsRpcResult, + const std::string&)> callback) override; + // Some metrics are affected by the latency of GetUnmaskDetails, so it is // useful to control whether or not GetUnmaskDetails() is responded to. void ShouldReturnUnmaskDetailsImmediately(bool should_return_unmask_details); @@ -126,8 +134,6 @@ std::unique_ptr<std::unordered_map<std::string, std::string>> save_result_; bool use_invalid_legal_message_ = false; std::unique_ptr<base::Value> LegalMessage(); - - DISALLOW_COPY_AND_ASSIGN(TestPaymentsClient); }; } // namespace payments
diff --git a/components/autofill/core/browser/test_autofill_client.h b/components/autofill/core/browser/test_autofill_client.h index b0e1b691..8ee89b0 100644 --- a/components/autofill/core/browser/test_autofill_client.h +++ b/components/autofill/core/browser/test_autofill_client.h
@@ -41,6 +41,10 @@ class TestAutofillClient : public AutofillClient { public: TestAutofillClient(); + + TestAutofillClient(const TestAutofillClient&) = delete; + TestAutofillClient& operator=(const TestAutofillClient&) = delete; + ~TestAutofillClient() override; // AutofillClient: @@ -304,8 +308,6 @@ std::vector<std::string> allowed_merchants_; std::vector<std::string> allowed_bin_ranges_; #endif - - DISALLOW_COPY_AND_ASSIGN(TestAutofillClient); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_clock.h b/components/autofill/core/browser/test_autofill_clock.h index 73adc815..63a28dbe 100644 --- a/components/autofill/core/browser/test_autofill_clock.h +++ b/components/autofill/core/browser/test_autofill_clock.h
@@ -21,6 +21,10 @@ class TestAutofillClock { public: TestAutofillClock(); + + TestAutofillClock(const TestAutofillClock&) = delete; + TestAutofillClock& operator=(const TestAutofillClock&) = delete; + ~TestAutofillClock(); // Set the time to be returned from AutofillClock::Now() calls. @@ -31,8 +35,6 @@ private: base::SimpleTestClock test_clock_; - - DISALLOW_COPY_AND_ASSIGN(TestAutofillClock); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_download_manager.h b/components/autofill/core/browser/test_autofill_download_manager.h index 27e6e2ec..4c707377 100644 --- a/components/autofill/core/browser/test_autofill_download_manager.h +++ b/components/autofill/core/browser/test_autofill_download_manager.h
@@ -18,6 +18,11 @@ public: TestAutofillDownloadManager(AutofillDriver* driver, AutofillDownloadManager::Observer* observer); + + TestAutofillDownloadManager(const TestAutofillDownloadManager&) = delete; + TestAutofillDownloadManager& operator=(const TestAutofillDownloadManager&) = + delete; + ~TestAutofillDownloadManager() override; // AutofillDownloadManager overrides. @@ -30,8 +35,6 @@ private: std::vector<FormStructure*> last_queried_forms_; - - DISALLOW_COPY_AND_ASSIGN(TestAutofillDownloadManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_external_delegate.h b/components/autofill/core/browser/test_autofill_external_delegate.h index d9752bb..ddda6b6 100644 --- a/components/autofill/core/browser/test_autofill_external_delegate.h +++ b/components/autofill/core/browser/test_autofill_external_delegate.h
@@ -18,6 +18,11 @@ BrowserAutofillManager* autofill_manager, AutofillDriver* autofill_driver, bool call_parent_methods); + + TestAutofillExternalDelegate(const TestAutofillExternalDelegate&) = delete; + TestAutofillExternalDelegate& operator=(const TestAutofillExternalDelegate&) = + delete; + ~TestAutofillExternalDelegate() override; // AutofillExternalDelegate overrides. @@ -97,8 +102,6 @@ bool has_suggestions_available_on_field_focus_ = false; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(TestAutofillExternalDelegate); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_profile_validator_delayed.h b/components/autofill/core/browser/test_autofill_profile_validator_delayed.h index 846c249..0c39546 100644 --- a/components/autofill/core/browser/test_autofill_profile_validator_delayed.h +++ b/components/autofill/core/browser/test_autofill_profile_validator_delayed.h
@@ -25,6 +25,11 @@ std::unique_ptr<::i18n::addressinput::Source> source, std::unique_ptr<::i18n::addressinput::Storage> storage); + TestAutofillProfileValidatorDelayed( + const TestAutofillProfileValidatorDelayed&) = delete; + TestAutofillProfileValidatorDelayed& operator=( + const TestAutofillProfileValidatorDelayed&) = delete; + ~TestAutofillProfileValidatorDelayed() override; // Starts loading the rules for the specified |region_code|. @@ -32,8 +37,6 @@ private: void LoadRulesInstantly(const std::string& region_code); - - DISALLOW_COPY_AND_ASSIGN(TestAutofillProfileValidatorDelayed); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_autofill_tick_clock.h b/components/autofill/core/browser/test_autofill_tick_clock.h index 1a15e28..7b80aa1 100644 --- a/components/autofill/core/browser/test_autofill_tick_clock.h +++ b/components/autofill/core/browser/test_autofill_tick_clock.h
@@ -21,6 +21,10 @@ class TestAutofillTickClock { public: TestAutofillTickClock(); + + TestAutofillTickClock(const TestAutofillTickClock&) = delete; + TestAutofillTickClock& operator=(const TestAutofillTickClock&) = delete; + ~TestAutofillTickClock(); // Set the time to be returned from AutofillTickClock::Now() calls. @@ -31,8 +35,6 @@ private: base::SimpleTestTickClock test_tick_clock_; - - DISALLOW_COPY_AND_ASSIGN(TestAutofillTickClock); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_browser_autofill_manager.h b/components/autofill/core/browser/test_browser_autofill_manager.h index e3e1e65d..3cb6640 100644 --- a/components/autofill/core/browser/test_browser_autofill_manager.h +++ b/components/autofill/core/browser/test_browser_autofill_manager.h
@@ -28,6 +28,11 @@ TestBrowserAutofillManager(AutofillDriver* driver, AutofillClient* client, TestPersonalDataManager* personal_data); + + TestBrowserAutofillManager(const TestBrowserAutofillManager&) = delete; + TestBrowserAutofillManager& operator=(const TestBrowserAutofillManager&) = + delete; + ~TestBrowserAutofillManager() override; // BrowserAutofillManager overrides. @@ -81,8 +86,6 @@ std::string submitted_form_signature_; std::vector<ServerFieldTypeSet> expected_submitted_field_types_; - - DISALLOW_COPY_AND_ASSIGN(TestBrowserAutofillManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_event_waiter.h b/components/autofill/core/browser/test_event_waiter.h index be100f8..f56f8ef 100644 --- a/components/autofill/core/browser/test_event_waiter.h +++ b/components/autofill/core/browser/test_event_waiter.h
@@ -33,6 +33,10 @@ explicit EventWaiter( std::list<Event> expected_event_sequence, base::TimeDelta timeout = base::TimeDelta::FromSeconds(0)); + + EventWaiter(const EventWaiter&) = delete; + EventWaiter& operator=(const EventWaiter&) = delete; + ~EventWaiter(); // Either returns right away if all events were observed between this @@ -46,8 +50,6 @@ private: std::list<Event> expected_events_; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(EventWaiter); }; template <typename Event>
diff --git a/components/autofill/core/browser/test_form_structure.h b/components/autofill/core/browser/test_form_structure.h index c9cfc83..da0b086 100644 --- a/components/autofill/core/browser/test_form_structure.h +++ b/components/autofill/core/browser/test_form_structure.h
@@ -14,13 +14,14 @@ class TestFormStructure : public FormStructure { public: explicit TestFormStructure(const FormData& form); + + TestFormStructure(const TestFormStructure&) = delete; + TestFormStructure& operator=(const TestFormStructure&) = delete; + ~TestFormStructure() override; void SetFieldTypes(const std::vector<ServerFieldType>& heuristic_types, const std::vector<ServerFieldType>& server_types); - - private: - DISALLOW_COPY_AND_ASSIGN(TestFormStructure); }; } // namespace autofill
diff --git a/components/autofill/core/browser/test_personal_data_manager.h b/components/autofill/core/browser/test_personal_data_manager.h index 2706a629..a45b044 100644 --- a/components/autofill/core/browser/test_personal_data_manager.h +++ b/components/autofill/core/browser/test_personal_data_manager.h
@@ -24,6 +24,10 @@ class TestPersonalDataManager : public PersonalDataManager { public: TestPersonalDataManager(); + + TestPersonalDataManager(const TestPersonalDataManager&) = delete; + TestPersonalDataManager& operator=(const TestPersonalDataManager&) = delete; + ~TestPersonalDataManager() override; using PersonalDataManager::GetProfileSaveStrikeDatabase; @@ -174,8 +178,6 @@ &inmemory_strike_database_}; AutofillProfileUpdateStrikeDatabase inmemory_profile_update_strike_database_{ &inmemory_strike_database_}; - - DISALLOW_COPY_AND_ASSIGN(TestPersonalDataManager); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/address_combobox_model.h b/components/autofill/core/browser/ui/address_combobox_model.h index f306749..b03916e 100644 --- a/components/autofill/core/browser/ui/address_combobox_model.h +++ b/components/autofill/core/browser/ui/address_combobox_model.h
@@ -30,6 +30,10 @@ AddressComboboxModel(const PersonalDataManager& personal_data_manager, const std::string& app_locale, const std::string& default_selected_guid); + + AddressComboboxModel(const AddressComboboxModel&) = delete; + AddressComboboxModel& operator=(const AddressComboboxModel&) = delete; + ~AddressComboboxModel() override; // ui::ComboboxModel implementation: @@ -72,8 +76,6 @@ // To be called when the data for the given country code was loaded. base::ObserverList<ui::ComboboxModelObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(AddressComboboxModel); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/country_combobox_model.h b/components/autofill/core/browser/ui/country_combobox_model.h index d7f3e3e..dad6f39 100644 --- a/components/autofill/core/browser/ui/country_combobox_model.h +++ b/components/autofill/core/browser/ui/country_combobox_model.h
@@ -24,6 +24,10 @@ using CountryVector = std::vector<std::unique_ptr<AutofillCountry>>; CountryComboboxModel(); + + CountryComboboxModel(const CountryComboboxModel&) = delete; + CountryComboboxModel& operator=(const CountryComboboxModel&) = delete; + ~CountryComboboxModel() override; // |filter| is passed each known country's country code. If |filter| returns @@ -50,8 +54,6 @@ // The countries to show in the model, including NULL for entries that are // not countries (the separator entry). CountryVector countries_; - - DISALLOW_COPY_AND_ASSIGN(CountryComboboxModel); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl.h b/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl.h index 18611cc..7d648fd 100644 --- a/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl.h +++ b/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl.h
@@ -26,6 +26,12 @@ : public CardExpirationDateFixFlowController { public: CardExpirationDateFixFlowControllerImpl(); + + CardExpirationDateFixFlowControllerImpl( + const CardExpirationDateFixFlowControllerImpl&) = delete; + CardExpirationDateFixFlowControllerImpl& operator=( + const CardExpirationDateFixFlowControllerImpl&) = delete; + ~CardExpirationDateFixFlowControllerImpl() override; void Show(CardExpirationDateFixFlowView* card_expiration_date_fix_flow_view, @@ -64,8 +70,6 @@ // Label of the card describing the network and the last four digits. std::u16string card_label_; - - DISALLOW_COPY_AND_ASSIGN(CardExpirationDateFixFlowControllerImpl); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl_unittest.cc b/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl_unittest.cc index 134dc64..cdaccbab 100644 --- a/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl_unittest.cc +++ b/components/autofill/core/browser/ui/payments/card_expiration_date_fix_flow_controller_impl_unittest.cc
@@ -61,6 +61,12 @@ public testing::Test { public: CardExpirationDateFixFlowControllerImplTest() {} + + CardExpirationDateFixFlowControllerImplTest( + const CardExpirationDateFixFlowControllerImplTest&) = delete; + CardExpirationDateFixFlowControllerImplTest& operator=( + const CardExpirationDateFixFlowControllerImplTest&) = delete; + ~CardExpirationDateFixFlowControllerImplTest() override {} void SetUp() override { @@ -68,9 +74,6 @@ std::make_unique<TestCardExpirationDateFixFlowView>(); controller_ = std::make_unique<CardExpirationDateFixFlowControllerImpl>(); } - - private: - DISALLOW_COPY_AND_ASSIGN(CardExpirationDateFixFlowControllerImplTest); }; TEST_F(CardExpirationDateFixFlowControllerImplTest, LogShown) {
diff --git a/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl.h b/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl.h index 6cc34fc..cbdabf6 100644 --- a/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl.h +++ b/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl.h
@@ -18,6 +18,11 @@ class CardNameFixFlowControllerImpl : public CardNameFixFlowController { public: CardNameFixFlowControllerImpl(); + + CardNameFixFlowControllerImpl(const CardNameFixFlowControllerImpl&) = delete; + CardNameFixFlowControllerImpl& operator=( + const CardNameFixFlowControllerImpl&) = delete; + ~CardNameFixFlowControllerImpl() override; void Show(CardNameFixFlowView* card_name_fix_flow_view, @@ -52,8 +57,6 @@ // Whether the user explicitly accepted or dismissed this prompt. bool had_user_interaction_ = false; - - DISALLOW_COPY_AND_ASSIGN(CardNameFixFlowControllerImpl); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl_unittest.cc b/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl_unittest.cc index a6008cc4..015e461 100644 --- a/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl_unittest.cc +++ b/components/autofill/core/browser/ui/payments/card_name_fix_flow_controller_impl_unittest.cc
@@ -69,15 +69,18 @@ public testing::Test { public: CardNameFixFlowControllerImplTest() {} + + CardNameFixFlowControllerImplTest(const CardNameFixFlowControllerImplTest&) = + delete; + CardNameFixFlowControllerImplTest& operator=( + const CardNameFixFlowControllerImplTest&) = delete; + ~CardNameFixFlowControllerImplTest() override {} void SetUp() override { test_card_name_fix_flow_view_ = std::make_unique<TestCardNameFixFlowView>(); controller_ = std::make_unique<CardNameFixFlowControllerImpl>(); } - - private: - DISALLOW_COPY_AND_ASSIGN(CardNameFixFlowControllerImplTest); }; TEST_F(CardNameFixFlowControllerImplTest, LogShown) {
diff --git a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h index e6be5ce..57d7258d 100644 --- a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h +++ b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl.h
@@ -23,6 +23,12 @@ class CardUnmaskPromptControllerImpl : public CardUnmaskPromptController { public: explicit CardUnmaskPromptControllerImpl(PrefService* pref_service); + + CardUnmaskPromptControllerImpl(const CardUnmaskPromptControllerImpl&) = + delete; + CardUnmaskPromptControllerImpl& operator=( + const CardUnmaskPromptControllerImpl&) = delete; + virtual ~CardUnmaskPromptControllerImpl(); // This should be OnceCallback<unique_ptr<CardUnmaskPromptView>> but there are @@ -95,8 +101,6 @@ base::WeakPtrFactory<CardUnmaskPromptControllerImpl> weak_pointer_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImpl); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc index 906661a..edaf1c5 100644 --- a/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc +++ b/components/autofill/core/browser/ui/payments/card_unmask_prompt_controller_impl_unittest.cc
@@ -33,6 +33,9 @@ public: TestCardUnmaskDelegate() {} + TestCardUnmaskDelegate(const TestCardUnmaskDelegate&) = delete; + TestCardUnmaskDelegate& operator=(const TestCardUnmaskDelegate&) = delete; + virtual ~TestCardUnmaskDelegate() {} // CardUnmaskDelegate implementation. @@ -52,8 +55,6 @@ private: UserProvidedUnmaskDetails details_; base::WeakPtrFactory<TestCardUnmaskDelegate> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestCardUnmaskDelegate); }; class TestCardUnmaskPromptView : public CardUnmaskPromptView { @@ -158,6 +159,12 @@ public testing::Test { public: CardUnmaskPromptControllerImplTest() {} + + CardUnmaskPromptControllerImplTest( + const CardUnmaskPromptControllerImplTest&) = delete; + CardUnmaskPromptControllerImplTest& operator=( + const CardUnmaskPromptControllerImplTest&) = delete; + ~CardUnmaskPromptControllerImplTest() override {} void SetUp() override { @@ -169,9 +176,6 @@ prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif } - - private: - DISALLOW_COPY_AND_ASSIGN(CardUnmaskPromptControllerImplTest); }; #if defined(OS_ANDROID) @@ -326,6 +330,12 @@ public testing::TestWithParam<bool> { public: LoggingValidationTestForNickname() : card_has_nickname_(GetParam()) {} + + LoggingValidationTestForNickname(const LoggingValidationTestForNickname&) = + delete; + LoggingValidationTestForNickname& operator=( + const LoggingValidationTestForNickname&) = delete; + ~LoggingValidationTestForNickname() override = default; void SetUp() override { @@ -345,8 +355,6 @@ private: bool card_has_nickname_; - - DISALLOW_COPY_AND_ASSIGN(LoggingValidationTestForNickname); }; TEST_P(LoggingValidationTestForNickname, LogShown) { @@ -656,6 +664,10 @@ public testing::TestWithParam<CvcCase> { public: CvcInputValidationTest() {} + + CvcInputValidationTest(const CvcInputValidationTest&) = delete; + CvcInputValidationTest& operator=(const CvcInputValidationTest&) = delete; + ~CvcInputValidationTest() override {} void SetUp() override { @@ -667,9 +679,6 @@ prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif } - - private: - DISALLOW_COPY_AND_ASSIGN(CvcInputValidationTest); }; TEST_P(CvcInputValidationTest, CvcInputValidation) { @@ -699,6 +708,11 @@ public testing::TestWithParam<CvcCase> { public: CvcInputAmexValidationTest() {} + + CvcInputAmexValidationTest(const CvcInputAmexValidationTest&) = delete; + CvcInputAmexValidationTest& operator=(const CvcInputAmexValidationTest&) = + delete; + ~CvcInputAmexValidationTest() override {} void SetUp() override { @@ -710,9 +724,6 @@ prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif } - - private: - DISALLOW_COPY_AND_ASSIGN(CvcInputAmexValidationTest); }; TEST_P(CvcInputAmexValidationTest, CvcInputValidation) { @@ -751,6 +762,11 @@ public testing::TestWithParam<ExpirationDateTestCase> { public: ExpirationDateValidationTest() {} + + ExpirationDateValidationTest(const ExpirationDateValidationTest&) = delete; + ExpirationDateValidationTest& operator=(const ExpirationDateValidationTest&) = + delete; + ~ExpirationDateValidationTest() override {} void SetUp() override { @@ -762,9 +778,6 @@ prefs::kAutofillCreditCardFidoAuthOfferCheckboxState, true); #endif } - - private: - DISALLOW_COPY_AND_ASSIGN(ExpirationDateValidationTest); }; TEST_P(ExpirationDateValidationTest, ExpirationDateValidation) {
diff --git a/components/autofill/core/browser/ui/payments/local_card_migration_bubble_controller.h b/components/autofill/core/browser/ui/payments/local_card_migration_bubble_controller.h index 0833468f..44828da 100644 --- a/components/autofill/core/browser/ui/payments/local_card_migration_bubble_controller.h +++ b/components/autofill/core/browser/ui/payments/local_card_migration_bubble_controller.h
@@ -18,14 +18,17 @@ class LocalCardMigrationBubbleController { public: LocalCardMigrationBubbleController() {} + + LocalCardMigrationBubbleController( + const LocalCardMigrationBubbleController&) = delete; + LocalCardMigrationBubbleController& operator=( + const LocalCardMigrationBubbleController&) = delete; + virtual ~LocalCardMigrationBubbleController() {} virtual void OnConfirmButtonClicked() = 0; virtual void OnCancelButtonClicked() = 0; virtual void OnBubbleClosed(PaymentsBubbleClosedReason closed_reason) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationBubbleController); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/payments/local_card_migration_dialog_controller.h b/components/autofill/core/browser/ui/payments/local_card_migration_dialog_controller.h index 9fb0316..01d1435 100644 --- a/components/autofill/core/browser/ui/payments/local_card_migration_dialog_controller.h +++ b/components/autofill/core/browser/ui/payments/local_card_migration_dialog_controller.h
@@ -23,6 +23,12 @@ class LocalCardMigrationDialogController { public: LocalCardMigrationDialogController() {} + + LocalCardMigrationDialogController( + const LocalCardMigrationDialogController&) = delete; + LocalCardMigrationDialogController& operator=( + const LocalCardMigrationDialogController&) = delete; + virtual ~LocalCardMigrationDialogController() {} virtual LocalCardMigrationDialogState GetViewState() const = 0; @@ -39,9 +45,6 @@ virtual void DeleteCard(const std::string& deleted_card_guid) = 0; virtual void OnDialogClosed() = 0; virtual bool AllCardsInvalid() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(LocalCardMigrationDialogController); }; } // namespace autofill
diff --git a/components/autofill/core/browser/ui/region_combobox_model.h b/components/autofill/core/browser/ui/region_combobox_model.h index 8d35ad3..6aac06f 100644 --- a/components/autofill/core/browser/ui/region_combobox_model.h +++ b/components/autofill/core/browser/ui/region_combobox_model.h
@@ -31,6 +31,10 @@ class RegionComboboxModel : public ui::ComboboxModel { public: RegionComboboxModel(); + + RegionComboboxModel(const RegionComboboxModel&) = delete; + RegionComboboxModel& operator=(const RegionComboboxModel&) = delete; + ~RegionComboboxModel() override; void LoadRegionData(const std::string& country_code, @@ -73,8 +77,6 @@ // Weak pointer factory. base::WeakPtrFactory<RegionComboboxModel> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RegionComboboxModel); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.h b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.h index 4e98599..7176e27 100644 --- a/components/autofill/core/browser/webdata/autocomplete_sync_bridge.h +++ b/components/autofill/core/browser/webdata/autocomplete_sync_bridge.h
@@ -35,6 +35,10 @@ AutocompleteSyncBridge( AutofillWebDataBackend* backend, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + AutocompleteSyncBridge(const AutocompleteSyncBridge&) = delete; + AutocompleteSyncBridge& operator=(const AutocompleteSyncBridge&) = delete; + ~AutocompleteSyncBridge() override; static void CreateForWebDataServiceAndBackend( @@ -82,8 +86,6 @@ base::ScopedObservation<AutofillWebDataBackend, AutofillWebDataServiceObserverOnDBSequence> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncBridge); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc index 9a96532..972b971 100644 --- a/components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autocomplete_sync_bridge_unittest.cc
@@ -144,6 +144,11 @@ class AutocompleteSyncBridgeTest : public testing::Test { public: AutocompleteSyncBridgeTest() {} + + AutocompleteSyncBridgeTest(const AutocompleteSyncBridgeTest&) = delete; + AutocompleteSyncBridgeTest& operator=(const AutocompleteSyncBridgeTest&) = + delete; + ~AutocompleteSyncBridgeTest() override {} void SetUp() override { @@ -302,8 +307,6 @@ std::unique_ptr<AutocompleteSyncBridge> bridge_; testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_; std::unique_ptr<syncer::ClientTagBasedModelTypeProcessor> real_processor_; - - DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncBridgeTest); }; TEST_F(AutocompleteSyncBridgeTest, GetClientTag) {
diff --git a/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.h b/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.h index 9ff3493..5525b64 100644 --- a/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.h +++ b/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.h
@@ -28,6 +28,12 @@ delegate_for_full_sync_mode, PrefService* pref_service, syncer::SyncService* sync_service); + + AutofillProfileModelTypeController( + const AutofillProfileModelTypeController&) = delete; + AutofillProfileModelTypeController& operator=( + const AutofillProfileModelTypeController&) = delete; + ~AutofillProfileModelTypeController() override; // DataTypeController overrides. @@ -42,8 +48,6 @@ // Registrar for listening to prefs::kAutofillProfileEnabled. PrefChangeRegistrar pref_registrar_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileModelTypeController); }; } // namespace browser_sync
diff --git a/components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h b/components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h index 6be00c7..28201be0 100644 --- a/components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h +++ b/components/autofill/core/browser/webdata/autofill_profile_sync_bridge.h
@@ -50,6 +50,11 @@ std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, const std::string& app_locale, AutofillWebDataBackend* backend); + + AutofillProfileSyncBridge(const AutofillProfileSyncBridge&) = delete; + AutofillProfileSyncBridge& operator=(const AutofillProfileSyncBridge&) = + delete; + ~AutofillProfileSyncBridge() override; // Constructor that hides dealing with change_processor and also stores the @@ -110,8 +115,6 @@ base::ScopedObservation<AutofillWebDataBackend, AutofillWebDataServiceObserverOnDBSequence> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncBridge); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_profile_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autofill_profile_sync_bridge_unittest.cc index cb75b60..74c21c87 100644 --- a/components/autofill/core/browser/webdata/autofill_profile_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_profile_sync_bridge_unittest.cc
@@ -265,6 +265,12 @@ class AutofillProfileSyncBridgeTestBase : public testing::Test { public: AutofillProfileSyncBridgeTestBase() = default; + + AutofillProfileSyncBridgeTestBase(const AutofillProfileSyncBridgeTestBase&) = + delete; + AutofillProfileSyncBridgeTestBase& operator=( + const AutofillProfileSyncBridgeTestBase&) = delete; + ~AutofillProfileSyncBridgeTestBase() override = default; void SetUp() override { @@ -375,8 +381,6 @@ testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_; std::unique_ptr<syncer::ClientTagBasedModelTypeProcessor> real_processor_; std::unique_ptr<AutofillProfileSyncBridge> bridge_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncBridgeTestBase); }; // This class performs the sync bridge test with and without structured names @@ -1462,10 +1466,13 @@ public testing::WithParamInterface<UpdatesUsageStatsTestCase> { public: AutofillProfileSyncBridgeUpdatesUsageStatsTest() {} - ~AutofillProfileSyncBridgeUpdatesUsageStatsTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncBridgeUpdatesUsageStatsTest); + AutofillProfileSyncBridgeUpdatesUsageStatsTest( + const AutofillProfileSyncBridgeUpdatesUsageStatsTest&) = delete; + AutofillProfileSyncBridgeUpdatesUsageStatsTest& operator=( + const AutofillProfileSyncBridgeUpdatesUsageStatsTest&) = delete; + + ~AutofillProfileSyncBridgeUpdatesUsageStatsTest() override {} }; TEST_P(AutofillProfileSyncBridgeUpdatesUsageStatsTest, UpdatesUsageStats) {
diff --git a/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker.h b/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker.h index 6d2050d7..e976538f 100644 --- a/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker.h +++ b/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker.h
@@ -32,6 +32,12 @@ class AutofillProfileSyncDifferenceTracker { public: explicit AutofillProfileSyncDifferenceTracker(AutofillTable* table); + + AutofillProfileSyncDifferenceTracker( + const AutofillProfileSyncDifferenceTracker&) = delete; + AutofillProfileSyncDifferenceTracker& operator=( + const AutofillProfileSyncDifferenceTracker&) = delete; + virtual ~AutofillProfileSyncDifferenceTracker(); // Adds a new |remote| entry to the diff tracker, originating from the sync @@ -106,15 +112,18 @@ // sides and need to be deleted from sync (because the conflict resolution // preferred the local copies). std::set<std::string> delete_from_sync_; - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncDifferenceTracker); }; class AutofillProfileInitialSyncDifferenceTracker : public AutofillProfileSyncDifferenceTracker { public: explicit AutofillProfileInitialSyncDifferenceTracker(AutofillTable* table); + + AutofillProfileInitialSyncDifferenceTracker( + const AutofillProfileInitialSyncDifferenceTracker&) = delete; + AutofillProfileInitialSyncDifferenceTracker& operator=( + const AutofillProfileInitialSyncDifferenceTracker&) = delete; + ~AutofillProfileInitialSyncDifferenceTracker() override; absl::optional<syncer::ModelError> IncorporateRemoteDelete( @@ -136,8 +145,6 @@ absl::optional<AutofillProfile> FindMergeableLocalEntry( const AutofillProfile& remote, const AutofillProfileComparator& comparator); - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileInitialSyncDifferenceTracker); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker_unittest.cc b/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker_unittest.cc index 9098947b..cf4eb90 100644 --- a/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_profile_sync_difference_tracker_unittest.cc
@@ -47,6 +47,12 @@ class AutofillProfileSyncDifferenceTrackerTestBase : public testing::Test { public: AutofillProfileSyncDifferenceTrackerTestBase() {} + + AutofillProfileSyncDifferenceTrackerTestBase( + const AutofillProfileSyncDifferenceTrackerTestBase&) = delete; + AutofillProfileSyncDifferenceTrackerTestBase& operator=( + const AutofillProfileSyncDifferenceTrackerTestBase&) = delete; + ~AutofillProfileSyncDifferenceTrackerTestBase() override {} void SetUp() override { @@ -117,22 +123,24 @@ base::test::TaskEnvironment task_environment_; AutofillTable table_; WebDatabase db_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncDifferenceTrackerTestBase); }; class AutofillProfileSyncDifferenceTrackerTest : public AutofillProfileSyncDifferenceTrackerTestBase { public: AutofillProfileSyncDifferenceTrackerTest() : tracker_(table()) {} + + AutofillProfileSyncDifferenceTrackerTest( + const AutofillProfileSyncDifferenceTrackerTest&) = delete; + AutofillProfileSyncDifferenceTrackerTest& operator=( + const AutofillProfileSyncDifferenceTrackerTest&) = delete; + ~AutofillProfileSyncDifferenceTrackerTest() override {} AutofillProfileSyncDifferenceTracker* tracker() override { return &tracker_; } private: AutofillProfileSyncDifferenceTracker tracker_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileSyncDifferenceTrackerTest); }; TEST_F(AutofillProfileSyncDifferenceTrackerTest, @@ -405,6 +413,12 @@ public: AutofillProfileInitialSyncDifferenceTrackerTest() : initial_tracker_(table()) {} + + AutofillProfileInitialSyncDifferenceTrackerTest( + const AutofillProfileInitialSyncDifferenceTrackerTest&) = delete; + AutofillProfileInitialSyncDifferenceTrackerTest& operator=( + const AutofillProfileInitialSyncDifferenceTrackerTest&) = delete; + ~AutofillProfileInitialSyncDifferenceTrackerTest() override {} void MergeSimilarEntriesForInitialSync() { @@ -417,8 +431,6 @@ private: AutofillProfileInitialSyncDifferenceTracker initial_tracker_; - - DISALLOW_COPY_AND_ASSIGN(AutofillProfileInitialSyncDifferenceTrackerTest); }; TEST_F(AutofillProfileInitialSyncDifferenceTrackerTest,
diff --git a/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc b/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc index 307cd2e..f9b43f55 100644 --- a/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_sync_bridge_util_unittest.cc
@@ -36,6 +36,9 @@ explicit TestAutofillTable(std::vector<CreditCard> cards_on_disk) : cards_on_disk_(cards_on_disk) {} + TestAutofillTable(const TestAutofillTable&) = delete; + TestAutofillTable& operator=(const TestAutofillTable&) = delete; + ~TestAutofillTable() override {} bool GetServerCreditCards( @@ -47,8 +50,6 @@ private: std::vector<CreditCard> cards_on_disk_; - - DISALLOW_COPY_AND_ASSIGN(TestAutofillTable); }; EntityData SpecificsToEntity(const sync_pb::AutofillWalletSpecifics& specifics, @@ -63,10 +64,12 @@ class AutofillSyncBridgeUtilTest : public testing::Test { public: AutofillSyncBridgeUtilTest() {} - ~AutofillSyncBridgeUtilTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(AutofillSyncBridgeUtilTest); + AutofillSyncBridgeUtilTest(const AutofillSyncBridgeUtilTest&) = delete; + AutofillSyncBridgeUtilTest& operator=(const AutofillSyncBridgeUtilTest&) = + delete; + + ~AutofillSyncBridgeUtilTest() override {} }; // Tests that PopulateWalletTypesFromSyncData behaves as expected.
diff --git a/components/autofill/core/browser/webdata/autofill_table.h b/components/autofill/core/browser/webdata/autofill_table.h index 79c7e877..8dfd51a 100644 --- a/components/autofill/core/browser/webdata/autofill_table.h +++ b/components/autofill/core/browser/webdata/autofill_table.h
@@ -441,6 +441,10 @@ public syncer::SyncMetadataStore { public: AutofillTable(); + + AutofillTable(const AutofillTable&) = delete; + AutofillTable& operator=(const AutofillTable&) = delete; + ~AutofillTable() override; // Retrieves the AutofillTable* owned by |db|. @@ -832,8 +836,6 @@ bool InitCreditCardArtImagesTable(); std::unique_ptr<AutofillTableEncryptor> autofill_table_encryptor_; - - DISALLOW_COPY_AND_ASSIGN(AutofillTable); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge.h b/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge.h index 8085137..3bd0ebd 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge.h +++ b/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge.h
@@ -51,6 +51,12 @@ AutofillWalletMetadataSyncBridge( std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, AutofillWebDataBackend* web_data_backend); + + AutofillWalletMetadataSyncBridge(const AutofillWalletMetadataSyncBridge&) = + delete; + AutofillWalletMetadataSyncBridge& operator=( + const AutofillWalletMetadataSyncBridge&) = delete; + ~AutofillWalletMetadataSyncBridge() override; base::WeakPtr<AutofillWalletMetadataSyncBridge> GetWeakPtr() { @@ -137,8 +143,6 @@ base::WeakPtrFactory<AutofillWalletMetadataSyncBridge> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(AutofillWalletMetadataSyncBridge); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge_unittest.cc index a431d6a..87be161 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_metadata_sync_bridge_unittest.cc
@@ -287,6 +287,12 @@ class AutofillWalletMetadataSyncBridgeTest : public testing::Test { public: AutofillWalletMetadataSyncBridgeTest() {} + + AutofillWalletMetadataSyncBridgeTest( + const AutofillWalletMetadataSyncBridgeTest&) = delete; + AutofillWalletMetadataSyncBridgeTest& operator=( + const AutofillWalletMetadataSyncBridgeTest&) = delete; + ~AutofillWalletMetadataSyncBridgeTest() override {} void SetUp() override { @@ -483,8 +489,6 @@ testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_; std::unique_ptr<syncer::ClientTagBasedModelTypeProcessor> real_processor_; std::unique_ptr<AutofillWalletMetadataSyncBridge> bridge_; - - DISALLOW_COPY_AND_ASSIGN(AutofillWalletMetadataSyncBridgeTest); }; // The following 2 tests make sure client tags stay stable. @@ -1171,6 +1175,12 @@ public AutofillWalletMetadataSyncBridgeTest { public: AutofillWalletMetadataSyncBridgeRemoteChangesTest() {} + + AutofillWalletMetadataSyncBridgeRemoteChangesTest( + const AutofillWalletMetadataSyncBridgeRemoteChangesTest&) = delete; + AutofillWalletMetadataSyncBridgeRemoteChangesTest& operator=( + const AutofillWalletMetadataSyncBridgeRemoteChangesTest&) = delete; + ~AutofillWalletMetadataSyncBridgeRemoteChangesTest() override {} void ResetBridgeWithPotentialInitialSync( @@ -1190,9 +1200,6 @@ ReceiveUpdates(remote_data); } } - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillWalletMetadataSyncBridgeRemoteChangesTest); }; // No upstream communication or local DB change happens if the server sends an
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.h b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.h index 80d7c9c..dfb3907 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.h +++ b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge.h
@@ -47,6 +47,10 @@ explicit AutofillWalletSyncBridge( std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, AutofillWebDataBackend* web_data_backend); + + AutofillWalletSyncBridge(const AutofillWalletSyncBridge&) = delete; + AutofillWalletSyncBridge& operator=(const AutofillWalletSyncBridge&) = delete; + ~AutofillWalletSyncBridge() override; // ModelTypeSyncBridge implementation. @@ -148,8 +152,6 @@ // The bridge should be used on the same sequence where it is constructed. SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(AutofillWalletSyncBridge); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc index d595d8c..b65a8567 100644 --- a/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc +++ b/components/autofill/core/browser/webdata/autofill_wallet_sync_bridge_unittest.cc
@@ -213,6 +213,11 @@ class AutofillWalletSyncBridgeTest : public testing::Test { public: AutofillWalletSyncBridgeTest() {} + + AutofillWalletSyncBridgeTest(const AutofillWalletSyncBridgeTest&) = delete; + AutofillWalletSyncBridgeTest& operator=(const AutofillWalletSyncBridgeTest&) = + delete; + ~AutofillWalletSyncBridgeTest() override {} void SetUp() override { @@ -334,8 +339,6 @@ testing::NiceMock<MockModelTypeChangeProcessor> mock_processor_; std::unique_ptr<syncer::ClientTagBasedModelTypeProcessor> real_processor_; std::unique_ptr<AutofillWalletSyncBridge> bridge_; - - DISALLOW_COPY_AND_ASSIGN(AutofillWalletSyncBridgeTest); }; // The following 4 tests make sure client tags stay stable.
diff --git a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h index c2fcf49..9441d3f 100644 --- a/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h +++ b/components/autofill/core/browser/webdata/autofill_webdata_backend_impl.h
@@ -241,10 +241,12 @@ class SupportsUserDataAggregatable : public base::SupportsUserData { public: SupportsUserDataAggregatable() {} - ~SupportsUserDataAggregatable() override {} - private: - DISALLOW_COPY_AND_ASSIGN(SupportsUserDataAggregatable); + SupportsUserDataAggregatable(const SupportsUserDataAggregatable&) = delete; + SupportsUserDataAggregatable& operator=( + const SupportsUserDataAggregatable&) = delete; + + ~SupportsUserDataAggregatable() override {} }; // The task runner that this class uses for its UI tasks.
diff --git a/components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h b/components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h index cb3c396..8ef17f4 100644 --- a/components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h +++ b/components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h
@@ -19,6 +19,11 @@ class MockAutofillWebDataBackend : public AutofillWebDataBackend { public: MockAutofillWebDataBackend(); + + MockAutofillWebDataBackend(const MockAutofillWebDataBackend&) = delete; + MockAutofillWebDataBackend& operator=(const MockAutofillWebDataBackend&) = + delete; + ~MockAutofillWebDataBackend() override; MOCK_METHOD(WebDatabase*, GetDatabase, (), (override)); @@ -49,9 +54,6 @@ NotifyOfCreditCardArtImagesChanged, (const std::vector<std::string>& server_ids), (override)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockAutofillWebDataBackend); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/system_encryptor.h b/components/autofill/core/browser/webdata/system_encryptor.h index beb53228..14507c0 100644 --- a/components/autofill/core/browser/webdata/system_encryptor.h +++ b/components/autofill/core/browser/webdata/system_encryptor.h
@@ -13,6 +13,10 @@ class SystemEncryptor : public AutofillTableEncryptor { public: SystemEncryptor() = default; + + SystemEncryptor(const SystemEncryptor&) = delete; + SystemEncryptor& operator=(const SystemEncryptor&) = delete; + ~SystemEncryptor() override = default; bool EncryptString16(const std::u16string& plaintext, @@ -20,9 +24,6 @@ bool DecryptString16(const std::string& ciphertext, std::u16string* plaintext) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(SystemEncryptor); }; } // namespace autofill
diff --git a/components/autofill/core/browser/webdata/web_data_service_unittest.cc b/components/autofill/core/browser/webdata/web_data_service_unittest.cc index 121e827..067bb805 100644 --- a/components/autofill/core/browser/webdata/web_data_service_unittest.cc +++ b/components/autofill/core/browser/webdata/web_data_service_unittest.cc
@@ -54,6 +54,12 @@ class AutofillWebDataServiceConsumer : public WebDataServiceConsumer { public: AutofillWebDataServiceConsumer() : handle_(0) {} + + AutofillWebDataServiceConsumer(const AutofillWebDataServiceConsumer&) = + delete; + AutofillWebDataServiceConsumer& operator=( + const AutofillWebDataServiceConsumer&) = delete; + virtual ~AutofillWebDataServiceConsumer() {} virtual void OnWebDataServiceRequestDone( @@ -69,7 +75,6 @@ private: WebDataServiceBase::Handle handle_; T result_; - DISALLOW_COPY_AND_ASSIGN(AutofillWebDataServiceConsumer); }; const int kWebDataServiceTimeoutSeconds = 8;
diff --git a/components/autofill/core/common/autofill_l10n_util.h b/components/autofill/core/common/autofill_l10n_util.h index d430cff..91e21c6 100644 --- a/components/autofill/core/common/autofill_l10n_util.h +++ b/components/autofill/core/common/autofill_l10n_util.h
@@ -25,14 +25,16 @@ CaseInsensitiveCompare(); // Used for testing. explicit CaseInsensitiveCompare(const icu::Locale& locale); + + CaseInsensitiveCompare(const CaseInsensitiveCompare&) = delete; + CaseInsensitiveCompare& operator=(const CaseInsensitiveCompare&) = delete; + ~CaseInsensitiveCompare(); bool StringsEqual(const std::u16string& lhs, const std::u16string& rhs) const; private: std::unique_ptr<icu::Collator> collator_; - - DISALLOW_COPY_AND_ASSIGN(CaseInsensitiveCompare); }; } // namespace l10n
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc index 2542d11..ed607bb4 100644 --- a/components/autofill/core/common/autofill_payments_features.cc +++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -75,6 +75,12 @@ "AutofillEnableOfferNotificationCrossTabTracking", base::FEATURE_DISABLED_BY_DEFAULT}; +// When enabled, a notification will be displayed on page navigation if the +// domain has an eligible merchant promo code offer or reward. +const base::Feature kAutofillEnableOfferNotificationForPromoCodes{ + "AutofillEnableOfferNotificationForPromoCodes", + base::FEATURE_DISABLED_BY_DEFAULT}; + // When enabled, offers will be displayed in the Clank keyboard accessory during // downstream. const base::Feature kAutofillEnableOffersInClankKeyboardAccessory{
diff --git a/components/autofill/core/common/autofill_payments_features.h b/components/autofill/core/common/autofill_payments_features.h index 764f8a5..e0791344a 100644 --- a/components/autofill/core/common/autofill_payments_features.h +++ b/components/autofill/core/common/autofill_payments_features.h
@@ -24,6 +24,7 @@ extern const base::Feature kAutofillEnableMerchantBoundVirtualCards; extern const base::Feature kAutofillEnableOfferNotification; extern const base::Feature kAutofillEnableOfferNotificationCrossTabTracking; +extern const base::Feature kAutofillEnableOfferNotificationForPromoCodes; extern const base::Feature kAutofillEnableOffersInClankKeyboardAccessory; extern const base::Feature kAutofillEnableOffersInDownstream; extern const base::Feature
diff --git a/components/autofill/core/common/save_password_progress_logger.h b/components/autofill/core/common/save_password_progress_logger.h index d28e22e..94b9f705 100644 --- a/components/autofill/core/common/save_password_progress_logger.h +++ b/components/autofill/core/common/save_password_progress_logger.h
@@ -162,6 +162,11 @@ }; SavePasswordProgressLogger(); + + SavePasswordProgressLogger(const SavePasswordProgressLogger&) = delete; + SavePasswordProgressLogger& operator=(const SavePasswordProgressLogger&) = + delete; + virtual ~SavePasswordProgressLogger(); // Call these methods to log information. They sanitize the input and call @@ -199,9 +204,6 @@ // Translates the StringID values into the corresponding strings. static std::string GetStringFromID(SavePasswordProgressLogger::StringID id); - - private: - DISALLOW_COPY_AND_ASSIGN(SavePasswordProgressLogger); }; } // namespace autofill
diff --git a/components/autofill/ios/browser/credit_card_save_manager_test_observer_bridge.h b/components/autofill/ios/browser/credit_card_save_manager_test_observer_bridge.h index 85a66449..fc7623d 100644 --- a/components/autofill/ios/browser/credit_card_save_manager_test_observer_bridge.h +++ b/components/autofill/ios/browser/credit_card_save_manager_test_observer_bridge.h
@@ -38,6 +38,12 @@ explicit CreditCardSaveManagerTestObserverBridge( CreditCardSaveManager* credit_card_save_manager, id<CreditCardSaveManagerTestObserver> observer); + + CreditCardSaveManagerTestObserverBridge( + const CreditCardSaveManagerTestObserverBridge&) = delete; + CreditCardSaveManagerTestObserverBridge& operator=( + const CreditCardSaveManagerTestObserverBridge&) = delete; + ~CreditCardSaveManagerTestObserverBridge() override = default; // CreditCardSaveManager::ObserverForTest: @@ -50,8 +56,6 @@ private: __weak id<CreditCardSaveManagerTestObserver> observer_ = nil; - - DISALLOW_COPY_AND_ASSIGN(CreditCardSaveManagerTestObserverBridge); }; } // namespace autofill
diff --git a/components/autofill/ios/browser/ios_test_event_waiter.h b/components/autofill/ios/browser/ios_test_event_waiter.h index 0cd8eff..3664818 100644 --- a/components/autofill/ios/browser/ios_test_event_waiter.h +++ b/components/autofill/ios/browser/ios_test_event_waiter.h
@@ -26,6 +26,10 @@ public: explicit IOSTestEventWaiter(std::list<Event> expected_events, double timeout = 0); + + IOSTestEventWaiter(const IOSTestEventWaiter&) = delete; + IOSTestEventWaiter& operator=(const IOSTestEventWaiter&) = delete; + ~IOSTestEventWaiter() = default; // Either returns true right away if all events were observed between this @@ -43,8 +47,6 @@ std::list<Event> expected_events_; bool runloop_running_; double timeout_; - - DISALLOW_COPY_AND_ASSIGN(IOSTestEventWaiter); }; template <typename Event>
diff --git a/components/autofill/ios/browser/personal_data_manager_observer_bridge.h b/components/autofill/ios/browser/personal_data_manager_observer_bridge.h index 1f996b6..d7a7b00 100644 --- a/components/autofill/ios/browser/personal_data_manager_observer_bridge.h +++ b/components/autofill/ios/browser/personal_data_manager_observer_bridge.h
@@ -33,6 +33,12 @@ public: explicit PersonalDataManagerObserverBridge( id<PersonalDataManagerObserver> delegate); + + PersonalDataManagerObserverBridge(const PersonalDataManagerObserverBridge&) = + delete; + PersonalDataManagerObserverBridge& operator=( + const PersonalDataManagerObserverBridge&) = delete; + ~PersonalDataManagerObserverBridge() override; // PersonalDataManagerObserver implementation. @@ -41,8 +47,6 @@ private: __weak id<PersonalDataManagerObserver> delegate_; - - DISALLOW_COPY_AND_ASSIGN(PersonalDataManagerObserverBridge); }; } // namespace autofill
diff --git a/components/autofill/ios/form_util/form_activity_observer.h b/components/autofill/ios/form_util/form_activity_observer.h index aca5489..942f78ef 100644 --- a/components/autofill/ios/form_util/form_activity_observer.h +++ b/components/autofill/ios/form_util/form_activity_observer.h
@@ -25,6 +25,10 @@ class FormActivityObserver { public: FormActivityObserver() {} + + FormActivityObserver(const FormActivityObserver&) = delete; + FormActivityObserver& operator=(const FormActivityObserver&) = delete; + virtual ~FormActivityObserver() {} // Called when the user is typing on a form field in the main frame or in a @@ -70,9 +74,6 @@ virtual void FormRemoved(web::WebState* web_state, web::WebFrame* sender_frame, const FormRemovalParams& params) {} - - private: - DISALLOW_COPY_AND_ASSIGN(FormActivityObserver); }; } // namespace autofill
diff --git a/components/autofill/ios/form_util/form_activity_observer_bridge.h b/components/autofill/ios/form_util/form_activity_observer_bridge.h index 5ee07ee..aeac53c 100644 --- a/components/autofill/ios/form_util/form_activity_observer_bridge.h +++ b/components/autofill/ios/form_util/form_activity_observer_bridge.h
@@ -46,6 +46,11 @@ // |owner| will not be retained. FormActivityObserverBridge(web::WebState* web_state, id<FormActivityObserver> owner); + + FormActivityObserverBridge(const FormActivityObserverBridge&) = delete; + FormActivityObserverBridge& operator=(const FormActivityObserverBridge&) = + delete; + ~FormActivityObserverBridge() override; // FormActivityObserver overrides: @@ -67,8 +72,6 @@ private: web::WebState* web_state_ = nullptr; __weak id<FormActivityObserver> owner_ = nil; - - DISALLOW_COPY_AND_ASSIGN(FormActivityObserverBridge); }; } // namespace autofill
diff --git a/components/autofill/ios/form_util/form_activity_tab_helper.h b/components/autofill/ios/form_util/form_activity_tab_helper.h index 4bdf1fa..b7660ff 100644 --- a/components/autofill/ios/form_util/form_activity_tab_helper.h +++ b/components/autofill/ios/form_util/form_activity_tab_helper.h
@@ -29,6 +29,9 @@ class FormActivityTabHelper : public web::WebStateUserData<FormActivityTabHelper> { public: + FormActivityTabHelper(const FormActivityTabHelper&) = delete; + FormActivityTabHelper& operator=(const FormActivityTabHelper&) = delete; + ~FormActivityTabHelper() override; static FormActivityTabHelper* GetOrCreateForWebState( @@ -74,8 +77,6 @@ base::ObserverList<FormActivityObserver>::Unchecked observers_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(FormActivityTabHelper); }; } // namespace autofill
diff --git a/components/autofill/ios/form_util/test_form_activity_observer.h b/components/autofill/ios/form_util/test_form_activity_observer.h index d37bac1..c6dff6d 100644 --- a/components/autofill/ios/form_util/test_form_activity_observer.h +++ b/components/autofill/ios/form_util/test_form_activity_observer.h
@@ -41,6 +41,10 @@ class TestFormActivityObserver : public autofill::FormActivityObserver { public: explicit TestFormActivityObserver(web::WebState* web_state); + + TestFormActivityObserver(const TestFormActivityObserver&) = delete; + TestFormActivityObserver& operator=(const TestFormActivityObserver&) = delete; + ~TestFormActivityObserver() override; // Arguments passed to |DocumentSubmitted|. @@ -72,8 +76,6 @@ std::unique_ptr<TestSubmitDocumentInfo> submit_document_info_; std::unique_ptr<TestFormActivityInfo> form_activity_info_; std::unique_ptr<TestFormRemovalInfo> form_removal_info_; - - DISALLOW_COPY_AND_ASSIGN(TestFormActivityObserver); }; } // namespace autofill #endif // COMPONENTS_AUTOFILL_IOS_FORM_UTIL_TEST_FORM_ACTIVITY_OBSERVER_H_
diff --git a/components/autofill/ios/form_util/test_form_activity_tab_helper.h b/components/autofill/ios/form_util/test_form_activity_tab_helper.h index 9bc7555f..7cbb167 100644 --- a/components/autofill/ios/form_util/test_form_activity_tab_helper.h +++ b/components/autofill/ios/form_util/test_form_activity_tab_helper.h
@@ -22,6 +22,11 @@ class TestFormActivityTabHelper { public: explicit TestFormActivityTabHelper(web::WebState* web_state); + + TestFormActivityTabHelper(const TestFormActivityTabHelper&) = delete; + TestFormActivityTabHelper& operator=(const TestFormActivityTabHelper&) = + delete; + ~TestFormActivityTabHelper(); void FormActivityRegistered(web::WebFrame* sender_frame, @@ -36,8 +41,6 @@ private: web::WebState* web_state_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestFormActivityTabHelper); }; } // namespace autofill
diff --git a/components/autofill/ios/form_util/unique_id_data_tab_helper.h b/components/autofill/ios/form_util/unique_id_data_tab_helper.h index f93bd054..ffdfa76f 100644 --- a/components/autofill/ios/form_util/unique_id_data_tab_helper.h +++ b/components/autofill/ios/form_util/unique_id_data_tab_helper.h
@@ -15,6 +15,9 @@ : public web::WebStateObserver, public web::WebStateUserData<UniqueIDDataTabHelper> { public: + UniqueIDDataTabHelper(const UniqueIDDataTabHelper&) = delete; + UniqueIDDataTabHelper& operator=(const UniqueIDDataTabHelper&) = delete; + ~UniqueIDDataTabHelper() override; // Returns the next available renderer id for WebState. @@ -43,8 +46,6 @@ scoped_refptr<autofill::FieldDataManager> field_data_manager_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(UniqueIDDataTabHelper); }; #endif // COMPONENTS_AUTOFILL_IOS_FORM_UTIL_UNIQUE_ID_DATA_TAB_HELPER_H_
diff --git a/components/autofill_assistant/browser/actions/collect_user_data_action.h b/components/autofill_assistant/browser/actions/collect_user_data_action.h index d742fd2..7e41b3a 100644 --- a/components/autofill_assistant/browser/actions/collect_user_data_action.h +++ b/components/autofill_assistant/browser/actions/collect_user_data_action.h
@@ -29,6 +29,10 @@ public: explicit CollectUserDataAction(ActionDelegate* delegate, const ActionProto& proto); + + CollectUserDataAction(const CollectUserDataAction&) = delete; + CollectUserDataAction& operator=(const CollectUserDataAction&) = delete; + ~CollectUserDataAction() override; // Overrides Action: @@ -122,8 +126,6 @@ std::map<std::string, std::unique_ptr<LoginDetails>> login_details_map_; base::WeakPtrFactory<CollectUserDataAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CollectUserDataAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/configure_bottom_sheet_action.h b/components/autofill_assistant/browser/actions/configure_bottom_sheet_action.h index 085d9c5..99e8617 100644 --- a/components/autofill_assistant/browser/actions/configure_bottom_sheet_action.h +++ b/components/autofill_assistant/browser/actions/configure_bottom_sheet_action.h
@@ -17,6 +17,11 @@ public: explicit ConfigureBottomSheetAction(ActionDelegate* delegate, const ActionProto& proto); + + ConfigureBottomSheetAction(const ConfigureBottomSheetAction&) = delete; + ConfigureBottomSheetAction& operator=(const ConfigureBottomSheetAction&) = + delete; + ~ConfigureBottomSheetAction() override; private: @@ -29,7 +34,6 @@ ProcessActionCallback callback_; base::OneShotTimer timer_; base::WeakPtrFactory<ConfigureBottomSheetAction> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ConfigureBottomSheetAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/configure_ui_state_action.h b/components/autofill_assistant/browser/actions/configure_ui_state_action.h index 298cff0..558b96a 100644 --- a/components/autofill_assistant/browser/actions/configure_ui_state_action.h +++ b/components/autofill_assistant/browser/actions/configure_ui_state_action.h
@@ -16,6 +16,10 @@ public: explicit ConfigureUiStateAction(ActionDelegate* delegate, const ActionProto& proto); + + ConfigureUiStateAction(const ConfigureUiStateAction&) = delete; + ConfigureUiStateAction& operator=(const ConfigureUiStateAction&) = delete; + ~ConfigureUiStateAction() override; private: @@ -23,7 +27,6 @@ void InternalProcessAction(ProcessActionCallback callback) override; base::WeakPtrFactory<ConfigureUiStateAction> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ConfigureUiStateAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/expect_navigation_action.h b/components/autofill_assistant/browser/actions/expect_navigation_action.h index c254065..ef814ea 100644 --- a/components/autofill_assistant/browser/actions/expect_navigation_action.h +++ b/components/autofill_assistant/browser/actions/expect_navigation_action.h
@@ -14,13 +14,15 @@ public: explicit ExpectNavigationAction(ActionDelegate* delegate, const ActionProto& proto); + + ExpectNavigationAction(const ExpectNavigationAction&) = delete; + ExpectNavigationAction& operator=(const ExpectNavigationAction&) = delete; + ~ExpectNavigationAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(ExpectNavigationAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/fallback_handler/required_fields_fallback_handler.h b/components/autofill_assistant/browser/actions/fallback_handler/required_fields_fallback_handler.h index 0c03e6c..da50cc4 100644 --- a/components/autofill_assistant/browser/actions/fallback_handler/required_fields_fallback_handler.h +++ b/components/autofill_assistant/browser/actions/fallback_handler/required_fields_fallback_handler.h
@@ -32,6 +32,10 @@ const std::map<field_formatter::Key, std::string>& fallback_values, ActionDelegate* delegate); + RequiredFieldsFallbackHandler(const RequiredFieldsFallbackHandler&) = delete; + RequiredFieldsFallbackHandler& operator=( + const RequiredFieldsFallbackHandler&) = delete; + ~RequiredFieldsFallbackHandler(); // Check if there are required fields. If so, verify them and fallback if @@ -117,8 +121,6 @@ std::unique_ptr<BatchElementChecker> batch_element_checker_; base::TimeDelta total_wait_time_ = base::TimeDelta::FromSeconds(0); base::WeakPtrFactory<RequiredFieldsFallbackHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RequiredFieldsFallbackHandler); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/highlight_element_action.h b/components/autofill_assistant/browser/actions/highlight_element_action.h index ed5c909..a344ebf 100644 --- a/components/autofill_assistant/browser/actions/highlight_element_action.h +++ b/components/autofill_assistant/browser/actions/highlight_element_action.h
@@ -18,6 +18,10 @@ public: explicit HighlightElementAction(ActionDelegate* delegate, const ActionProto& proto); + + HighlightElementAction(const HighlightElementAction&) = delete; + HighlightElementAction& operator=(const HighlightElementAction&) = delete; + ~HighlightElementAction() override; private: @@ -31,8 +35,6 @@ const ClientStatus& status); base::WeakPtrFactory<HighlightElementAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HighlightElementAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/navigate_action.h b/components/autofill_assistant/browser/actions/navigate_action.h index bfa867f..09269d4 100644 --- a/components/autofill_assistant/browser/actions/navigate_action.h +++ b/components/autofill_assistant/browser/actions/navigate_action.h
@@ -13,13 +13,15 @@ class NavigateAction : public Action { public: explicit NavigateAction(ActionDelegate* delegate, const ActionProto& proto); + + NavigateAction(const NavigateAction&) = delete; + NavigateAction& operator=(const NavigateAction&) = delete; + ~NavigateAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(NavigateAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/popup_message_action.h b/components/autofill_assistant/browser/actions/popup_message_action.h index 4820e4e..2e1b9d5 100644 --- a/components/autofill_assistant/browser/actions/popup_message_action.h +++ b/components/autofill_assistant/browser/actions/popup_message_action.h
@@ -19,13 +19,15 @@ public: explicit PopupMessageAction(ActionDelegate* delegate, const ActionProto& proto); + + PopupMessageAction(const PopupMessageAction&) = delete; + PopupMessageAction& operator=(const PopupMessageAction&) = delete; + ~PopupMessageAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(PopupMessageAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/prompt_action.h b/components/autofill_assistant/browser/actions/prompt_action.h index cc8e8e3d4..4178da28 100644 --- a/components/autofill_assistant/browser/actions/prompt_action.h +++ b/components/autofill_assistant/browser/actions/prompt_action.h
@@ -26,6 +26,10 @@ class PromptAction : public Action { public: explicit PromptAction(ActionDelegate* delegate, const ActionProto& proto); + + PromptAction(const PromptAction&) = delete; + PromptAction& operator=(const PromptAction&) = delete; + ~PromptAction() override; // Overrides Action: @@ -100,8 +104,6 @@ Stopwatch last_checks_stopwatch_; base::WeakPtrFactory<PromptAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PromptAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/select_option_action.h b/components/autofill_assistant/browser/actions/select_option_action.h index 69349f4..158b9fc 100644 --- a/components/autofill_assistant/browser/actions/select_option_action.h +++ b/components/autofill_assistant/browser/actions/select_option_action.h
@@ -21,6 +21,10 @@ public: explicit SelectOptionAction(ActionDelegate* delegate, const ActionProto& proto); + + SelectOptionAction(const SelectOptionAction&) = delete; + SelectOptionAction& operator=(const SelectOptionAction&) = delete; + ~SelectOptionAction() override; private: @@ -37,8 +41,6 @@ ProcessActionCallback process_action_callback_; base::WeakPtrFactory<SelectOptionAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SelectOptionAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/set_attribute_action.h b/components/autofill_assistant/browser/actions/set_attribute_action.h index d11684a..59429ab 100644 --- a/components/autofill_assistant/browser/actions/set_attribute_action.h +++ b/components/autofill_assistant/browser/actions/set_attribute_action.h
@@ -19,6 +19,10 @@ public: explicit SetAttributeAction(ActionDelegate* delegate, const ActionProto& proto); + + SetAttributeAction(const SetAttributeAction&) = delete; + SetAttributeAction& operator=(const SetAttributeAction&) = delete; + ~SetAttributeAction() override; private: @@ -32,8 +36,6 @@ const ClientStatus& status); base::WeakPtrFactory<SetAttributeAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SetAttributeAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/show_cast_action.h b/components/autofill_assistant/browser/actions/show_cast_action.h index 0abcd048..4314c14b 100644 --- a/components/autofill_assistant/browser/actions/show_cast_action.h +++ b/components/autofill_assistant/browser/actions/show_cast_action.h
@@ -21,6 +21,10 @@ class ShowCastAction : public Action { public: explicit ShowCastAction(ActionDelegate* delegate, const ActionProto& proto); + + ShowCastAction(const ShowCastAction&) = delete; + ShowCastAction& operator=(const ShowCastAction&) = delete; + ~ShowCastAction() override; private: @@ -54,8 +58,6 @@ ProcessActionCallback process_action_callback_; base::WeakPtrFactory<ShowCastAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ShowCastAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/show_details_action.h b/components/autofill_assistant/browser/actions/show_details_action.h index e95c68a..5d00b424 100644 --- a/components/autofill_assistant/browser/actions/show_details_action.h +++ b/components/autofill_assistant/browser/actions/show_details_action.h
@@ -16,13 +16,15 @@ public: explicit ShowDetailsAction(ActionDelegate* delegate, const ActionProto& proto); + + ShowDetailsAction(const ShowDetailsAction&) = delete; + ShowDetailsAction& operator=(const ShowDetailsAction&) = delete; + ~ShowDetailsAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(ShowDetailsAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/show_form_action.h b/components/autofill_assistant/browser/actions/show_form_action.h index e76fefd..7b13575 100644 --- a/components/autofill_assistant/browser/actions/show_form_action.h +++ b/components/autofill_assistant/browser/actions/show_form_action.h
@@ -16,6 +16,10 @@ class ShowFormAction : public Action { public: explicit ShowFormAction(ActionDelegate* delegate, const ActionProto& proto); + + ShowFormAction(const ShowFormAction&) = delete; + ShowFormAction& operator=(const ShowFormAction&) = delete; + ~ShowFormAction() override; private: @@ -38,8 +42,6 @@ ProcessActionCallback callback_; base::WeakPtrFactory<ShowFormAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ShowFormAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/show_info_box_action.h b/components/autofill_assistant/browser/actions/show_info_box_action.h index b0b3b441..2556bd6e 100644 --- a/components/autofill_assistant/browser/actions/show_info_box_action.h +++ b/components/autofill_assistant/browser/actions/show_info_box_action.h
@@ -15,13 +15,15 @@ public: explicit ShowInfoBoxAction(ActionDelegate* delegate, const ActionProto& proto); + + ShowInfoBoxAction(const ShowInfoBoxAction&) = delete; + ShowInfoBoxAction& operator=(const ShowInfoBoxAction&) = delete; + ~ShowInfoBoxAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(ShowInfoBoxAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/show_progress_bar_action.h b/components/autofill_assistant/browser/actions/show_progress_bar_action.h index 395fca9..4ac6d7b 100644 --- a/components/autofill_assistant/browser/actions/show_progress_bar_action.h +++ b/components/autofill_assistant/browser/actions/show_progress_bar_action.h
@@ -16,6 +16,10 @@ public: explicit ShowProgressBarAction(ActionDelegate* delegate, const ActionProto& proto); + + ShowProgressBarAction(const ShowProgressBarAction&) = delete; + ShowProgressBarAction& operator=(const ShowProgressBarAction&) = delete; + ~ShowProgressBarAction() override; private: @@ -24,8 +28,6 @@ void EndAction(ProcessActionCallback callback, ProcessedActionStatusProto status); - - DISALLOW_COPY_AND_ASSIGN(ShowProgressBarAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/stop_action.h b/components/autofill_assistant/browser/actions/stop_action.h index e1e11cc..2f922ef 100644 --- a/components/autofill_assistant/browser/actions/stop_action.h +++ b/components/autofill_assistant/browser/actions/stop_action.h
@@ -13,13 +13,15 @@ class StopAction : public Action { public: explicit StopAction(ActionDelegate* delegate, const ActionProto& proto); + + StopAction(const StopAction&) = delete; + StopAction& operator=(const StopAction&) = delete; + ~StopAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(StopAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/tell_action.h b/components/autofill_assistant/browser/actions/tell_action.h index 1463fdd..2e7bf01 100644 --- a/components/autofill_assistant/browser/actions/tell_action.h +++ b/components/autofill_assistant/browser/actions/tell_action.h
@@ -13,13 +13,15 @@ class TellAction : public Action { public: explicit TellAction(ActionDelegate* delegate, const ActionProto& proto); + + TellAction(const TellAction&) = delete; + TellAction& operator=(const TellAction&) = delete; + ~TellAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(TellAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/unsupported_action.h b/components/autofill_assistant/browser/actions/unsupported_action.h index 7ef081a..4f8bc726 100644 --- a/components/autofill_assistant/browser/actions/unsupported_action.h +++ b/components/autofill_assistant/browser/actions/unsupported_action.h
@@ -14,13 +14,15 @@ public: explicit UnsupportedAction(ActionDelegate* delegate, const ActionProto& proto); + + UnsupportedAction(const UnsupportedAction&) = delete; + UnsupportedAction& operator=(const UnsupportedAction&) = delete; + ~UnsupportedAction() override; private: // Overrides Action: void InternalProcessAction(ProcessActionCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(UnsupportedAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/upload_dom_action.h b/components/autofill_assistant/browser/actions/upload_dom_action.h index df8985b..2df2172 100644 --- a/components/autofill_assistant/browser/actions/upload_dom_action.h +++ b/components/autofill_assistant/browser/actions/upload_dom_action.h
@@ -18,6 +18,10 @@ class UploadDomAction : public Action { public: explicit UploadDomAction(ActionDelegate* delegate, const ActionProto& proto); + + UploadDomAction(const UploadDomAction&) = delete; + UploadDomAction& operator=(const UploadDomAction&) = delete; + ~UploadDomAction() override; private: @@ -36,8 +40,6 @@ ProcessActionCallback process_action_callback_; base::WeakPtrFactory<UploadDomAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UploadDomAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/use_address_action.h b/components/autofill_assistant/browser/actions/use_address_action.h index f45b8bb..d7500bac 100644 --- a/components/autofill_assistant/browser/actions/use_address_action.h +++ b/components/autofill_assistant/browser/actions/use_address_action.h
@@ -25,6 +25,10 @@ class UseAddressAction : public Action { public: explicit UseAddressAction(ActionDelegate* delegate, const ActionProto& proto); + + UseAddressAction(const UseAddressAction&) = delete; + UseAddressAction& operator=(const UseAddressAction&) = delete; + ~UseAddressAction() override; private: @@ -51,8 +55,6 @@ ProcessActionCallback process_action_callback_; base::WeakPtrFactory<UseAddressAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UseAddressAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/use_credit_card_action.h b/components/autofill_assistant/browser/actions/use_credit_card_action.h index df58d949..f6c76ef 100644 --- a/components/autofill_assistant/browser/actions/use_credit_card_action.h +++ b/components/autofill_assistant/browser/actions/use_credit_card_action.h
@@ -26,6 +26,10 @@ public: explicit UseCreditCardAction(ActionDelegate* delegate, const ActionProto& proto); + + UseCreditCardAction(const UseCreditCardAction&) = delete; + UseCreditCardAction& operator=(const UseCreditCardAction&) = delete; + ~UseCreditCardAction() override; private: @@ -59,8 +63,6 @@ ProcessActionCallback process_action_callback_; base::WeakPtrFactory<UseCreditCardAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UseCreditCardAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/wait_for_document_action.h b/components/autofill_assistant/browser/actions/wait_for_document_action.h index 3c73060..ee262ef 100644 --- a/components/autofill_assistant/browser/actions/wait_for_document_action.h +++ b/components/autofill_assistant/browser/actions/wait_for_document_action.h
@@ -17,6 +17,10 @@ public: explicit WaitForDocumentAction(ActionDelegate* delegate, const ActionProto& proto); + + WaitForDocumentAction(const WaitForDocumentAction&) = delete; + WaitForDocumentAction& operator=(const WaitForDocumentAction&) = delete; + ~WaitForDocumentAction() override; private: @@ -42,8 +46,6 @@ ProcessActionCallback callback_; std::unique_ptr<ElementFinder::Result> optional_frame_element_; base::WeakPtrFactory<WaitForDocumentAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaitForDocumentAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/wait_for_dom_action.h b/components/autofill_assistant/browser/actions/wait_for_dom_action.h index cbac97ec..a26f794 100644 --- a/components/autofill_assistant/browser/actions/wait_for_dom_action.h +++ b/components/autofill_assistant/browser/actions/wait_for_dom_action.h
@@ -25,6 +25,10 @@ class WaitForDomAction : public Action { public: explicit WaitForDomAction(ActionDelegate* delegate, const ActionProto& proto); + + WaitForDomAction(const WaitForDomAction&) = delete; + WaitForDomAction& operator=(const WaitForDomAction&) = delete; + ~WaitForDomAction() override; private: @@ -48,8 +52,6 @@ base::flat_map<std::string, DomObjectFrameStack> elements_; base::WeakPtrFactory<WaitForDomAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaitForDomAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/actions/wait_for_navigation_action.h b/components/autofill_assistant/browser/actions/wait_for_navigation_action.h index f5f5803..c0495b6 100644 --- a/components/autofill_assistant/browser/actions/wait_for_navigation_action.h +++ b/components/autofill_assistant/browser/actions/wait_for_navigation_action.h
@@ -16,6 +16,10 @@ public: explicit WaitForNavigationAction(ActionDelegate* delegate, const ActionProto& proto); + + WaitForNavigationAction(const WaitForNavigationAction&) = delete; + WaitForNavigationAction& operator=(const WaitForNavigationAction&) = delete; + ~WaitForNavigationAction() override; private: @@ -29,8 +33,6 @@ ProcessActionCallback callback_; base::OneShotTimer timer_; base::WeakPtrFactory<WaitForNavigationAction> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaitForNavigationAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/batch_element_checker.h b/components/autofill_assistant/browser/batch_element_checker.h index 8b153ef..1fe43699 100644 --- a/components/autofill_assistant/browser/batch_element_checker.h +++ b/components/autofill_assistant/browser/batch_element_checker.h
@@ -27,6 +27,10 @@ class BatchElementChecker { public: explicit BatchElementChecker(); + + BatchElementChecker(const BatchElementChecker&) = delete; + BatchElementChecker& operator=(const BatchElementChecker&) = delete; + virtual ~BatchElementChecker(); // Callback for AddElementCheck. Arguments are an ok client status if the @@ -101,8 +105,6 @@ std::vector<base::OnceCallback<void()>> all_done_; base::WeakPtrFactory<BatchElementChecker> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BatchElementChecker); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/controller.h b/components/autofill_assistant/browser/controller.h index f10b0ed..8fc4022e 100644 --- a/components/autofill_assistant/browser/controller.h +++ b/components/autofill_assistant/browser/controller.h
@@ -68,6 +68,10 @@ base::WeakPtr<RuntimeManagerImpl> runtime_manager, std::unique_ptr<Service> service, std::unique_ptr<AutofillAssistantTtsController> tts_controller); + + Controller(const Controller&) = delete; + Controller& operator=(const Controller&) = delete; + ~Controller() override; // Let the controller know it should keep tracking script availability for the @@ -617,8 +621,6 @@ std::unique_ptr<GenericUserInterfaceProto> persistent_generic_user_interface_; base::WeakPtrFactory<Controller> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Controller); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/devtools/devtools_client.h b/components/autofill_assistant/browser/devtools/devtools_client.h index 960bc175..89fd167 100644 --- a/components/autofill_assistant/browser/devtools/devtools_client.h +++ b/components/autofill_assistant/browser/devtools/devtools_client.h
@@ -34,6 +34,10 @@ public content::DevToolsAgentHostClient { public: explicit DevtoolsClient(scoped_refptr<content::DevToolsAgentHost> agent_host); + + DevtoolsClient(const DevtoolsClient&) = delete; + DevtoolsClient& operator=(const DevtoolsClient&) = delete; + ~DevtoolsClient() override; input::Domain* GetInput(); @@ -88,6 +92,10 @@ // Register the event handlers and start tracking new targets. |client| // must outlive this frame tracker. FrameTracker(DevtoolsClient* client); + + FrameTracker(const FrameTracker&) = delete; + FrameTracker& operator=(const FrameTracker&) = delete; + ~FrameTracker(); void Start(); @@ -117,7 +125,6 @@ std::unordered_map<std::string, std::string> sessions_map_; base::WeakPtrFactory<FrameTracker> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FrameTracker); }; // If the frame is known to devtools, return the session id for it. @@ -160,7 +167,6 @@ FrameTracker frame_tracker_; base::WeakPtrFactory<DevtoolsClient> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DevtoolsClient); }; } // namespace autofill_assistant.
diff --git a/components/autofill_assistant/browser/element_area.h b/components/autofill_assistant/browser/element_area.h index 36e881a..c15f1893 100644 --- a/components/autofill_assistant/browser/element_area.h +++ b/components/autofill_assistant/browser/element_area.h
@@ -25,6 +25,10 @@ // |delegate| and |settings| must remain valid for the lifetime of this // instance. explicit ElementArea(ScriptExecutorDelegate* delegate); + + ElementArea(const ElementArea&) = delete; + ElementArea& operator=(const ElementArea&) = delete; + ~ElementArea(); // Clears the area. Stops scheduled updates. @@ -150,8 +154,6 @@ on_update_; base::WeakPtrFactory<ElementArea> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ElementArea); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/element_precondition.h b/components/autofill_assistant/browser/element_precondition.h index 12c766f..0974513 100644 --- a/components/autofill_assistant/browser/element_precondition.h +++ b/components/autofill_assistant/browser/element_precondition.h
@@ -32,6 +32,10 @@ const base::flat_map<std::string, DomObjectFrameStack>&)>; ElementPrecondition(const ElementConditionProto& proto); + + ElementPrecondition(const ElementPrecondition&) = delete; + ElementPrecondition& operator=(const ElementPrecondition&) = delete; + ~ElementPrecondition(); // Check whether the conditions are satisfied and return the result through @@ -88,8 +92,6 @@ base::flat_map<std::string, DomObjectFrameStack> elements_; base::WeakPtrFactory<ElementPrecondition> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ElementPrecondition); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/event_handler.h b/components/autofill_assistant/browser/event_handler.h index 7f6dcad1..7c62d97 100644 --- a/components/autofill_assistant/browser/event_handler.h +++ b/components/autofill_assistant/browser/event_handler.h
@@ -34,6 +34,10 @@ }; EventHandler(); + + EventHandler(const EventHandler&) = delete; + EventHandler& operator=(const EventHandler&) = delete; + ~EventHandler(); void DispatchEvent(const EventKey& key); @@ -47,7 +51,6 @@ private: base::ReentrantObserverList<Observer> observers_{ base::ObserverListPolicy::EXISTING_ONLY}; - DISALLOW_COPY_AND_ASSIGN(EventHandler); }; // Intended for debugging.
diff --git a/components/autofill_assistant/browser/fake_script_executor_delegate.h b/components/autofill_assistant/browser/fake_script_executor_delegate.h index eb29b163..975a6e3 100644 --- a/components/autofill_assistant/browser/fake_script_executor_delegate.h +++ b/components/autofill_assistant/browser/fake_script_executor_delegate.h
@@ -22,6 +22,11 @@ class FakeScriptExecutorDelegate : public ScriptExecutorDelegate { public: FakeScriptExecutorDelegate(); + + FakeScriptExecutorDelegate(const FakeScriptExecutorDelegate&) = delete; + FakeScriptExecutorDelegate& operator=(const FakeScriptExecutorDelegate&) = + delete; + ~FakeScriptExecutorDelegate() override; const ClientSettings& GetSettings() override; @@ -195,8 +200,6 @@ std::unique_ptr<GenericUserInterfaceProto> persistent_generic_ui_; bool require_ui_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeScriptExecutorDelegate); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/mock_website_login_manager.h b/components/autofill_assistant/browser/mock_website_login_manager.h index c87f8b1..cdf3491 100644 --- a/components/autofill_assistant/browser/mock_website_login_manager.h +++ b/components/autofill_assistant/browser/mock_website_login_manager.h
@@ -16,6 +16,10 @@ class MockWebsiteLoginManager : public WebsiteLoginManager { public: MockWebsiteLoginManager(); + + MockWebsiteLoginManager(const MockWebsiteLoginManager&) = delete; + MockWebsiteLoginManager& operator=(const MockWebsiteLoginManager&) = delete; + ~MockWebsiteLoginManager() override; MOCK_METHOD(void, @@ -66,8 +70,6 @@ MOCK_METHOD(bool, ReadyToCommitSubmittedPassword, (), (override)); MOCK_METHOD(bool, SaveSubmittedPassword, (), (override)); - - DISALLOW_COPY_AND_ASSIGN(MockWebsiteLoginManager); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/retry_timer.h b/components/autofill_assistant/browser/retry_timer.h index dd86566a..f99e2a2d 100644 --- a/components/autofill_assistant/browser/retry_timer.h +++ b/components/autofill_assistant/browser/retry_timer.h
@@ -25,6 +25,10 @@ public: // A RetryTimer with the given retry period explicit RetryTimer(base::TimeDelta period); + + RetryTimer(const RetryTimer&) = delete; + RetryTimer& operator=(const RetryTimer&) = delete; + ~RetryTimer(); // Tries to run |task| once immediately and then periodically until it @@ -68,7 +72,6 @@ std::unique_ptr<base::OneShotTimer> timer_; base::WeakPtrFactory<RetryTimer> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(RetryTimer); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/script_executor.h b/components/autofill_assistant/browser/script_executor.h index e588469..270ba216 100644 --- a/components/autofill_assistant/browser/script_executor.h +++ b/components/autofill_assistant/browser/script_executor.h
@@ -88,6 +88,10 @@ std::map<std::string, ScriptStatus>* scripts_state, const std::vector<std::unique_ptr<Script>>* ordered_interrupts, ScriptExecutorDelegate* delegate); + + ScriptExecutor(const ScriptExecutor&) = delete; + ScriptExecutor& operator=(const ScriptExecutor&) = delete; + ~ScriptExecutor() override; // What should happen after the script has run. @@ -299,6 +303,10 @@ void(BatchElementChecker*, base::OnceCallback<void(const ClientStatus&)>)> check_elements, WaitForDomOperation::Callback callback); + + WaitForDomOperation(const WaitForDomOperation&) = delete; + WaitForDomOperation& operator=(const WaitForDomOperation&) = delete; + ~WaitForDomOperation() override; void Run(); @@ -391,8 +399,6 @@ RetryTimer retry_timer_; base::WeakPtrFactory<WaitForDomOperation> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaitForDomOperation); }; void OnGetActions(base::TimeTicks start_time, @@ -540,7 +546,6 @@ int consecutive_slow_roundtrip_counter_ = 0; base::WeakPtrFactory<ScriptExecutor> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ScriptExecutor); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/script_precondition.h b/components/autofill_assistant/browser/script_precondition.h index 45ea069..2e0d6ab 100644 --- a/components/autofill_assistant/browser/script_precondition.h +++ b/components/autofill_assistant/browser/script_precondition.h
@@ -45,6 +45,9 @@ parameter_match, const ElementConditionProto& must_match); + ScriptPrecondition(const ScriptPrecondition&) = delete; + ScriptPrecondition& operator=(const ScriptPrecondition&) = delete; + ~ScriptPrecondition(); // Check whether the conditions satisfied and return the result through @@ -72,8 +75,6 @@ std::vector<ScriptParameterMatchProto> parameter_match_; ElementPrecondition element_precondition_; - - DISALLOW_COPY_AND_ASSIGN(ScriptPrecondition); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/script_tracker.h b/components/autofill_assistant/browser/script_tracker.h index e99954d..3033246 100644 --- a/components/autofill_assistant/browser/script_tracker.h +++ b/components/autofill_assistant/browser/script_tracker.h
@@ -57,6 +57,9 @@ ScriptTracker(ScriptExecutorDelegate* delegate, ScriptTracker::Listener* listener); + ScriptTracker(const ScriptTracker&) = delete; + ScriptTracker& operator=(const ScriptTracker&) = delete; + ~ScriptTracker() override; // Updates the set of available |scripts|. This interrupts any pending checks, @@ -174,8 +177,6 @@ std::string last_script_payload_; base::WeakPtrFactory<ScriptTracker> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ScriptTracker); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/service/java_service.h b/components/autofill_assistant/browser/service/java_service.h index 2b18ab9..eb1b4b0c 100644 --- a/components/autofill_assistant/browser/service/java_service.h +++ b/components/autofill_assistant/browser/service/java_service.h
@@ -25,6 +25,10 @@ public: explicit JavaService( const base::android::JavaParamRef<jobject>& java_service); + + JavaService(const JavaService&) = delete; + JavaService& operator=(const JavaService&) = delete; + ~JavaService() override; // Get scripts for a given |url|, which should be a valid URL. @@ -52,8 +56,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> java_service_; - - DISALLOW_COPY_AND_ASSIGN(JavaService); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/user_action.h b/components/autofill_assistant/browser/user_action.h index 276f6e0..90a890e8 100644 --- a/components/autofill_assistant/browser/user_action.h +++ b/components/autofill_assistant/browser/user_action.h
@@ -27,6 +27,10 @@ UserAction(UserAction&&); UserAction(); + + UserAction(const UserAction&) = delete; + UserAction& operator=(const UserAction&) = delete; + ~UserAction(); UserAction& operator=(UserAction&&); @@ -99,8 +103,6 @@ // Optional identifier to uniquely identify this user action. std::string identifier_; - - DISALLOW_COPY_AND_ASSIGN(UserAction); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/user_model.h b/components/autofill_assistant/browser/user_model.h index f920ae3..820d1c6f 100644 --- a/components/autofill_assistant/browser/user_model.h +++ b/components/autofill_assistant/browser/user_model.h
@@ -39,6 +39,10 @@ }; UserModel(); + + UserModel(const UserModel&) = delete; + UserModel& operator=(const UserModel&) = delete; + ~UserModel(); base::WeakPtr<UserModel> GetWeakPtr(); @@ -153,7 +157,6 @@ GURL current_url_; base::ObserverList<Observer> observers_; base::WeakPtrFactory<UserModel> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(UserModel); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/web/web_controller.h b/components/autofill_assistant/browser/web/web_controller.h index dc4b67e..75c52ab 100644 --- a/components/autofill_assistant/browser/web/web_controller.h +++ b/components/autofill_assistant/browser/web/web_controller.h
@@ -74,6 +74,10 @@ WebController(content::WebContents* web_contents, std::unique_ptr<DevtoolsClient> devtools_client, const UserData* user_data); + + WebController(const WebController&) = delete; + WebController& operator=(const WebController&) = delete; + virtual ~WebController(); // Load |url| in the current tab. Returns immediately, before the new page has @@ -569,7 +573,6 @@ std::vector<std::unique_ptr<WebControllerWorker>> pending_workers_; base::WeakPtrFactory<WebController> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(WebController); }; } // namespace autofill_assistant #endif // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_WEB_WEB_CONTROLLER_H_
diff --git a/components/autofill_assistant/browser/web/web_controller_browsertest.cc b/components/autofill_assistant/browser/web/web_controller_browsertest.cc index eaebd9f..3d28f12 100644 --- a/components/autofill_assistant/browser/web/web_controller_browsertest.cc +++ b/components/autofill_assistant/browser/web/web_controller_browsertest.cc
@@ -46,6 +46,10 @@ public content::WebContentsObserver { public: WebControllerBrowserTest() {} + + WebControllerBrowserTest(const WebControllerBrowserTest&) = delete; + WebControllerBrowserTest& operator=(const WebControllerBrowserTest&) = delete; + ~WebControllerBrowserTest() override {} void SetUpCommandLine(base::CommandLine* command_line) override { @@ -914,8 +918,6 @@ private: std::unique_ptr<net::EmbeddedTestServer> http_server_; std::unique_ptr<net::EmbeddedTestServer> http_server_iframe_; - - DISALLOW_COPY_AND_ASSIGN(WebControllerBrowserTest); }; IN_PROC_BROWSER_TEST_F(WebControllerBrowserTest, ElementExistenceCheck) {
diff --git a/components/autofill_assistant/browser/web/web_controller_worker.h b/components/autofill_assistant/browser/web/web_controller_worker.h index 5da5a27..c9bab2c 100644 --- a/components/autofill_assistant/browser/web/web_controller_worker.h +++ b/components/autofill_assistant/browser/web/web_controller_worker.h
@@ -16,10 +16,11 @@ class WebControllerWorker { public: WebControllerWorker() = default; - virtual ~WebControllerWorker() = default; - private: - DISALLOW_COPY_AND_ASSIGN(WebControllerWorker); + WebControllerWorker(const WebControllerWorker&) = delete; + WebControllerWorker& operator=(const WebControllerWorker&) = delete; + + virtual ~WebControllerWorker() = default; }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/website_login_manager.h b/components/autofill_assistant/browser/website_login_manager.h index 3e4085af..2aa7d2f1 100644 --- a/components/autofill_assistant/browser/website_login_manager.h +++ b/components/autofill_assistant/browser/website_login_manager.h
@@ -32,6 +32,10 @@ }; WebsiteLoginManager() = default; + + WebsiteLoginManager(const WebsiteLoginManager&) = delete; + WebsiteLoginManager& operator=(const WebsiteLoginManager&) = delete; + virtual ~WebsiteLoginManager() = default; // Asynchronously returns all matching login details for |url| in the @@ -92,8 +96,6 @@ // submitted password exist (E.g ReadyToCommitSubmittedPassword) and it is // properly saved, false otherwise. virtual bool SaveSubmittedPassword() = 0; - - DISALLOW_COPY_AND_ASSIGN(WebsiteLoginManager); }; } // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/website_login_manager_impl.cc b/components/autofill_assistant/browser/website_login_manager_impl.cc index 6ec78aa..cdc44a7 100644 --- a/components/autofill_assistant/browser/website_login_manager_impl.cc +++ b/components/autofill_assistant/browser/website_login_manager_impl.cc
@@ -70,6 +70,9 @@ notify_finished_callback_(std::move(notify_finished_callback)), weak_ptr_factory_(this) {} + PendingRequest(const PendingRequest&) = delete; + PendingRequest& operator=(const PendingRequest&) = delete; + ~PendingRequest() override = default; void Start() { // Note: Currently, |FormFetcherImpl| has the default state NOT_WAITING. @@ -105,7 +108,6 @@ base::OnceCallback<void(const PendingRequest*)> notify_finished_callback_; base::WeakPtrFactory<PendingRequest> weak_ptr_factory_; - DISALLOW_COPY_AND_ASSIGN(PendingRequest); }; // A pending request to fetch all logins that match the specified |form_digest|.
diff --git a/components/autofill_assistant/browser/website_login_manager_impl.h b/components/autofill_assistant/browser/website_login_manager_impl.h index 63d2791..2fb4222 100644 --- a/components/autofill_assistant/browser/website_login_manager_impl.h +++ b/components/autofill_assistant/browser/website_login_manager_impl.h
@@ -22,6 +22,10 @@ public: WebsiteLoginManagerImpl(password_manager::PasswordManagerClient* client, content::WebContents* web_contents); + + WebsiteLoginManagerImpl(const WebsiteLoginManagerImpl&) = delete; + WebsiteLoginManagerImpl& operator=(const WebsiteLoginManagerImpl&) = delete; + ~WebsiteLoginManagerImpl() override; // From WebsiteLoginManager: @@ -80,8 +84,6 @@ // Needs to be the last member. base::WeakPtrFactory<WebsiteLoginManagerImpl> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(WebsiteLoginManagerImpl); }; } // namespace autofill_assistant
diff --git a/components/background_sync/background_sync_controller_impl.h b/components/background_sync/background_sync_controller_impl.h index b5bdee8..278414af 100644 --- a/components/background_sync/background_sync_controller_impl.h +++ b/components/background_sync/background_sync_controller_impl.h
@@ -53,6 +53,11 @@ BackgroundSyncControllerImpl( content::BrowserContext* browser_context, std::unique_ptr<background_sync::BackgroundSyncDelegate> delegate); + + BackgroundSyncControllerImpl(const BackgroundSyncControllerImpl&) = delete; + BackgroundSyncControllerImpl& operator=(const BackgroundSyncControllerImpl&) = + delete; + ~BackgroundSyncControllerImpl() override; // content::BackgroundSyncController overrides. @@ -127,8 +132,6 @@ std::unique_ptr<BackgroundSyncMetrics> background_sync_metrics_; std::set<url::Origin> periodic_sync_origins_; - - DISALLOW_COPY_AND_ASSIGN(BackgroundSyncControllerImpl); }; #endif // COMPONENTS_BACKGROUND_SYNC_BACKGROUND_SYNC_CONTROLLER_IMPL_H_
diff --git a/components/background_sync/background_sync_metrics.h b/components/background_sync/background_sync_metrics.h index 01f0ffcc0..b17dcbf 100644 --- a/components/background_sync/background_sync_metrics.h +++ b/components/background_sync/background_sync_metrics.h
@@ -32,6 +32,10 @@ explicit BackgroundSyncMetrics( background_sync::BackgroundSyncDelegate* delegate); + + BackgroundSyncMetrics(const BackgroundSyncMetrics&) = delete; + BackgroundSyncMetrics& operator=(const BackgroundSyncMetrics&) = delete; + ~BackgroundSyncMetrics(); void MaybeRecordOneShotSyncRegistrationEvent(const url::Origin& origin, @@ -84,8 +88,6 @@ base::OnceClosure ukm_event_recorded_for_testing_; base::WeakPtrFactory<BackgroundSyncMetrics> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BackgroundSyncMetrics); }; #endif // COMPONENTS_BACKGROUND_SYNC_BACKGROUND_SYNC_METRICS_H_
diff --git a/components/background_sync/background_sync_permission_context.h b/components/background_sync/background_sync_permission_context.h index b62bd7b..07afce26 100644 --- a/components/background_sync/background_sync_permission_context.h +++ b/components/background_sync/background_sync_permission_context.h
@@ -19,6 +19,12 @@ public: explicit BackgroundSyncPermissionContext( content::BrowserContext* browser_context); + + BackgroundSyncPermissionContext(const BackgroundSyncPermissionContext&) = + delete; + BackgroundSyncPermissionContext& operator=( + const BackgroundSyncPermissionContext&) = delete; + ~BackgroundSyncPermissionContext() override = default; private: @@ -31,8 +37,6 @@ bool user_gesture, permissions::BrowserPermissionCallback callback) override; bool IsRestrictedToSecureOrigins() const override; - - DISALLOW_COPY_AND_ASSIGN(BackgroundSyncPermissionContext); }; #endif // COMPONENTS_BACKGROUND_SYNC_BACKGROUND_SYNC_PERMISSION_CONTEXT_H_
diff --git a/components/background_task_scheduler/background_task.h b/components/background_task_scheduler/background_task.h index 1ecdd14..0c94a32e 100644 --- a/components/background_task_scheduler/background_task.h +++ b/components/background_task_scheduler/background_task.h
@@ -60,14 +60,14 @@ // task will not be rescheduled. virtual bool OnStopTask(const TaskParameters& task_params) = 0; + BackgroundTask(const BackgroundTask&) = delete; + BackgroundTask& operator=(const BackgroundTask&) = delete; + // Destructor. virtual ~BackgroundTask() {} protected: BackgroundTask() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(BackgroundTask); }; } // namespace background_task
diff --git a/components/background_task_scheduler/internal/android/native_task_scheduler.h b/components/background_task_scheduler/internal/android/native_task_scheduler.h index 7110db7..04e9f46 100644 --- a/components/background_task_scheduler/internal/android/native_task_scheduler.h +++ b/components/background_task_scheduler/internal/android/native_task_scheduler.h
@@ -13,14 +13,15 @@ class NativeTaskScheduler : public BackgroundTaskScheduler { public: NativeTaskScheduler(); + + NativeTaskScheduler(const NativeTaskScheduler&) = delete; + NativeTaskScheduler& operator=(const NativeTaskScheduler&) = delete; + ~NativeTaskScheduler() override; // BackgroundTaskScheduler overrides. bool Schedule(const TaskInfo& task_info) override; void Cancel(int task_id) override; - - private: - DISALLOW_COPY_AND_ASSIGN(NativeTaskScheduler); }; } // namespace background_task
diff --git a/components/blocked_content/popup_blocker_tab_helper.h b/components/blocked_content/popup_blocker_tab_helper.h index c446bc35..85c9e06 100644 --- a/components/blocked_content/popup_blocker_tab_helper.h +++ b/components/blocked_content/popup_blocker_tab_helper.h
@@ -52,6 +52,9 @@ kMaxValue = kClickedThroughAbusive }; + PopupBlockerTabHelper(const PopupBlockerTabHelper&) = delete; + PopupBlockerTabHelper& operator=(const PopupBlockerTabHelper&) = delete; + ~PopupBlockerTabHelper() override; // Returns the number of blocked popups. @@ -100,8 +103,6 @@ int32_t next_id_ = 0; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PopupBlockerTabHelper); }; } // namespace blocked_content
diff --git a/components/blocked_content/popup_opener_tab_helper.h b/components/blocked_content/popup_opener_tab_helper.h index 3f8404a..c911cbd8 100644 --- a/components/blocked_content/popup_opener_tab_helper.h +++ b/components/blocked_content/popup_opener_tab_helper.h
@@ -36,6 +36,9 @@ : public content::WebContentsObserver, public content::WebContentsUserData<PopupOpenerTabHelper> { public: + PopupOpenerTabHelper(const PopupOpenerTabHelper&) = delete; + PopupOpenerTabHelper& operator=(const PopupOpenerTabHelper&) = delete; + ~PopupOpenerTabHelper() override; void OnOpenedPopup(PopupTracker* popup_tracker); @@ -93,8 +96,6 @@ HostContentSettingsMap* settings_map_ = nullptr; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PopupOpenerTabHelper); }; } // namespace blocked_content
diff --git a/components/blocked_content/popup_tracker.h b/components/blocked_content/popup_tracker.h index bd2967a..6d04d48 100644 --- a/components/blocked_content/popup_tracker.h +++ b/components/blocked_content/popup_tracker.h
@@ -43,6 +43,10 @@ static PopupTracker* CreateForWebContents(content::WebContents* contents, content::WebContents* opener, WindowOpenDisposition disposition); + + PopupTracker(const PopupTracker&) = delete; + PopupTracker& operator=(const PopupTracker&) = delete; + ~PopupTracker() override; void set_is_trusted(bool is_trusted) { is_trusted_ = is_trusted; } @@ -112,8 +116,6 @@ const WindowOpenDisposition window_open_disposition_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PopupTracker); }; } // namespace blocked_content
diff --git a/components/blocked_content/safe_browsing_triggered_popup_blocker.h b/components/blocked_content/safe_browsing_triggered_popup_blocker.h index 865ed0e..48421a21 100644 --- a/components/blocked_content/safe_browsing_triggered_popup_blocker.h +++ b/components/blocked_content/safe_browsing_triggered_popup_blocker.h
@@ -76,6 +76,12 @@ // Creates a SafeBrowsingTriggeredPopupBlocker and attaches it (via UserData) // to |web_contents|. static void MaybeCreate(content::WebContents* web_contents); + + SafeBrowsingTriggeredPopupBlocker(const SafeBrowsingTriggeredPopupBlocker&) = + delete; + SafeBrowsingTriggeredPopupBlocker& operator=( + const SafeBrowsingTriggeredPopupBlocker&) = delete; + ~SafeBrowsingTriggeredPopupBlocker() override; bool ShouldApplyAbusivePopupBlocker(content::Page& page); @@ -111,6 +117,9 @@ public: explicit PageData(content::Page& page); + PageData(const PageData&) = delete; + PageData& operator=(const PageData&) = delete; + // Logs UMA in the destructor based on the number of popups blocked. ~PageData() override; @@ -128,8 +137,6 @@ // Whether the current committed page load should trigger the stronger popup // blocker. bool is_triggered_ = false; - - DISALLOW_COPY_AND_ASSIGN(PageData); }; class NavigationHandleData @@ -160,8 +167,6 @@ scoped_observation_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingTriggeredPopupBlocker); }; } // namespace blocked_content
diff --git a/components/blocked_content/safe_browsing_triggered_popup_blocker_unittest.cc b/components/blocked_content/safe_browsing_triggered_popup_blocker_unittest.cc index 0571606..b4a1c03 100644 --- a/components/blocked_content/safe_browsing_triggered_popup_blocker_unittest.cc +++ b/components/blocked_content/safe_browsing_triggered_popup_blocker_unittest.cc
@@ -52,6 +52,12 @@ : public content::RenderViewHostTestHarness { public: SafeBrowsingTriggeredPopupBlockerTest() = default; + + SafeBrowsingTriggeredPopupBlockerTest( + const SafeBrowsingTriggeredPopupBlockerTest&) = delete; + SafeBrowsingTriggeredPopupBlockerTest& operator=( + const SafeBrowsingTriggeredPopupBlockerTest&) = delete; + ~SafeBrowsingTriggeredPopupBlockerTest() override { settings_map_->ShutdownOnUIThread(); } @@ -156,8 +162,6 @@ std::unique_ptr<content::TestNavigationThrottleInserter> throttle_inserter_; sync_preferences::TestingPrefServiceSyncable pref_service_; scoped_refptr<HostContentSettingsMap> settings_map_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingTriggeredPopupBlockerTest); }; struct RedirectSamplesAndResults {
diff --git a/components/blocked_content/subresource_filter_abusive_unittest.cc b/components/blocked_content/subresource_filter_abusive_unittest.cc index f43595001..aa5a29d3 100644 --- a/components/blocked_content/subresource_filter_abusive_unittest.cc +++ b/components/blocked_content/subresource_filter_abusive_unittest.cc
@@ -70,6 +70,11 @@ .push_back(subresource_filter::kFilterAdsOnAbusiveSites); scoped_features_.InitWithFeatures(enabled_features, disabled_features); } + + SubresourceFilterAbusiveTest(const SubresourceFilterAbusiveTest&) = delete; + SubresourceFilterAbusiveTest& operator=(const SubresourceFilterAbusiveTest&) = + delete; + ~SubresourceFilterAbusiveTest() override {} // SubresourceFilterTestHarness: @@ -116,7 +121,6 @@ private: base::test::ScopedFeatureList scoped_features_; - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAbusiveTest); }; TEST_P(SubresourceFilterAbusiveTest, ConfigCombination) {
diff --git a/components/blocked_content/url_list_manager.h b/components/blocked_content/url_list_manager.h index 0f26cd6..2d3ca11 100644 --- a/components/blocked_content/url_list_manager.h +++ b/components/blocked_content/url_list_manager.h
@@ -29,6 +29,10 @@ }; UrlListManager(); + + UrlListManager(const UrlListManager&) = delete; + UrlListManager& operator=(const UrlListManager&) = delete; + ~UrlListManager(); void AddObserver(Observer* observer); @@ -38,8 +42,6 @@ private: base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(UrlListManager); }; } // namespace blocked_content
diff --git a/components/blocklist/opt_out_blocklist/opt_out_blocklist.h b/components/blocklist/opt_out_blocklist/opt_out_blocklist.h index 15810579..01c0133 100644 --- a/components/blocklist/opt_out_blocklist/opt_out_blocklist.h +++ b/components/blocklist/opt_out_blocklist/opt_out_blocklist.h
@@ -41,6 +41,10 @@ OptOutBlocklist(std::unique_ptr<OptOutStore> opt_out_store, base::Clock* clock, OptOutBlocklistDelegate* blocklist_delegate); + + OptOutBlocklist(const OptOutBlocklist&) = delete; + OptOutBlocklist& operator=(const OptOutBlocklist&) = delete; + virtual ~OptOutBlocklist(); // Creates the BlocklistData that backs the blocklist. @@ -173,8 +177,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<OptOutBlocklist> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OptOutBlocklist); }; } // namespace blocklist
diff --git a/components/blocklist/opt_out_blocklist/opt_out_blocklist_data.h b/components/blocklist/opt_out_blocklist/opt_out_blocklist_data.h index ce59e4a..daf0888 100644 --- a/components/blocklist/opt_out_blocklist/opt_out_blocklist_data.h +++ b/components/blocklist/opt_out_blocklist/opt_out_blocklist_data.h
@@ -88,6 +88,10 @@ std::unique_ptr<Policy> type_policy, size_t max_hosts, AllowedTypesAndVersions allowed_types); + + BlocklistData(const BlocklistData&) = delete; + BlocklistData& operator=(const BlocklistData&) = delete; + ~BlocklistData(); // Adds a new entry for all rules to use when evaluating blocklisting state. @@ -166,8 +170,6 @@ // to remove stale entries from the database and to DCHECK that other methods // are not using disallowed types. AllowedTypesAndVersions allowed_types_; - - DISALLOW_COPY_AND_ASSIGN(BlocklistData); }; } // namespace blocklist
diff --git a/components/blocklist/opt_out_blocklist/opt_out_blocklist_item.h b/components/blocklist/opt_out_blocklist/opt_out_blocklist_item.h index 158260d..51ad228 100644 --- a/components/blocklist/opt_out_blocklist/opt_out_blocklist_item.h +++ b/components/blocklist/opt_out_blocklist/opt_out_blocklist_item.h
@@ -30,6 +30,9 @@ int opt_out_block_list_threshold, base::TimeDelta block_list_duration); + OptOutBlocklistItem(const OptOutBlocklistItem&) = delete; + OptOutBlocklistItem& operator=(const OptOutBlocklistItem&) = delete; + ~OptOutBlocklistItem(); // Adds a new navigation at the specified |entry_time|. @@ -50,6 +53,10 @@ class OptOutRecord { public: OptOutRecord(base::Time entry_time, bool opt_out); + + OptOutRecord(const OptOutRecord&) = delete; + OptOutRecord& operator=(const OptOutRecord&) = delete; + ~OptOutRecord(); OptOutRecord(OptOutRecord&&) noexcept; OptOutRecord& operator=(OptOutRecord&&) noexcept; @@ -68,8 +75,6 @@ base::Time entry_time_; // Whether the user opted out of the action. bool opt_out_; - - DISALLOW_COPY_AND_ASSIGN(OptOutRecord); }; // The number of entries to store to determine action eligibility. @@ -89,8 +94,6 @@ // The total number of opt outs currently in |opt_out_records_|. int total_opt_out_; - - DISALLOW_COPY_AND_ASSIGN(OptOutBlocklistItem); }; } // namespace blocklist
diff --git a/components/blocklist/opt_out_blocklist/opt_out_blocklist_unittest.cc b/components/blocklist/opt_out_blocklist/opt_out_blocklist_unittest.cc index 94f0aa5..062c85fa 100644 --- a/components/blocklist/opt_out_blocklist/opt_out_blocklist_unittest.cc +++ b/components/blocklist/opt_out_blocklist/opt_out_blocklist_unittest.cc
@@ -224,6 +224,10 @@ class OptOutBlocklistTest : public testing::Test { public: OptOutBlocklistTest() = default; + + OptOutBlocklistTest(const OptOutBlocklistTest&) = delete; + OptOutBlocklistTest& operator=(const OptOutBlocklistTest&) = delete; + ~OptOutBlocklistTest() override = default; void StartTest(bool null_opt_out_store) { @@ -298,8 +302,6 @@ size_t max_hosts_ = 0; BlocklistData::AllowedTypesAndVersions allowed_types_; - - DISALLOW_COPY_AND_ASSIGN(OptOutBlocklistTest); }; TEST_F(OptOutBlocklistTest, HostBlockListNoStore) {
diff --git a/components/blocklist/opt_out_blocklist/sql/opt_out_store_sql.h b/components/blocklist/opt_out_blocklist/sql/opt_out_store_sql.h index 2647e0d..4cdb91c7 100644 --- a/components/blocklist/opt_out_blocklist/sql/opt_out_store_sql.h +++ b/components/blocklist/opt_out_blocklist/sql/opt_out_store_sql.h
@@ -35,6 +35,10 @@ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, scoped_refptr<base::SequencedTaskRunner> background_task_runner, const base::FilePath& database_dir); + + OptOutStoreSQL(const OptOutStoreSQL&) = delete; + OptOutStoreSQL& operator=(const OptOutStoreSQL&) = delete; + ~OptOutStoreSQL() override; // OptOutStore implementation: @@ -58,8 +62,6 @@ // SQL connection to the SQLite database. std::unique_ptr<sql::Database> db_; - - DISALLOW_COPY_AND_ASSIGN(OptOutStoreSQL); }; } // namespace blocklist
diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmarks/browser/bookmark_codec.h index 3932ebd..81089b9 100644 --- a/components/bookmarks/browser/bookmark_codec.h +++ b/components/bookmarks/browser/bookmark_codec.h
@@ -34,6 +34,10 @@ // guarantees on how the IDs are reassigned or about doing minimal // reassignments to achieve uniqueness. BookmarkCodec(); + + BookmarkCodec(const BookmarkCodec&) = delete; + BookmarkCodec& operator=(const BookmarkCodec&) = delete; + ~BookmarkCodec(); // Encodes the model to a JSON value. This is invoked to encode the contents @@ -205,8 +209,6 @@ // Meta info set on bookmark model root. BookmarkNode::MetaInfoMap model_meta_info_map_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkCodec); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/bookmark_expanded_state_tracker.h b/components/bookmarks/browser/bookmark_expanded_state_tracker.h index a73244f..5bdf3a4 100644 --- a/components/bookmarks/browser/bookmark_expanded_state_tracker.h +++ b/components/bookmarks/browser/bookmark_expanded_state_tracker.h
@@ -26,6 +26,11 @@ BookmarkExpandedStateTracker(BookmarkModel* bookmark_model, PrefService* pref_service); + + BookmarkExpandedStateTracker(const BookmarkExpandedStateTracker&) = delete; + BookmarkExpandedStateTracker& operator=(const BookmarkExpandedStateTracker&) = + delete; + ~BookmarkExpandedStateTracker() override; // The set of expanded nodes. @@ -51,8 +56,6 @@ BookmarkModel* bookmark_model_; PrefService* pref_service_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkExpandedStateTracker); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc b/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc index c2d4d76..e002509 100644 --- a/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc +++ b/components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc
@@ -25,6 +25,12 @@ class BookmarkExpandedStateTrackerTest : public testing::Test { public: BookmarkExpandedStateTrackerTest(); + + BookmarkExpandedStateTrackerTest(const BookmarkExpandedStateTrackerTest&) = + delete; + BookmarkExpandedStateTrackerTest& operator=( + const BookmarkExpandedStateTrackerTest&) = delete; + ~BookmarkExpandedStateTrackerTest() override; protected: @@ -36,8 +42,6 @@ base::test::TaskEnvironment task_environment_; TestingPrefServiceSimple prefs_; std::unique_ptr<BookmarkModel> model_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkExpandedStateTrackerTest); }; BookmarkExpandedStateTrackerTest::BookmarkExpandedStateTrackerTest() = default;
diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc index 10f58ce4..dc3d7151 100644 --- a/components/bookmarks/browser/bookmark_model.cc +++ b/components/bookmarks/browser/bookmark_model.cc
@@ -97,6 +97,10 @@ class EmptyUndoDelegate : public BookmarkUndoDelegate { public: EmptyUndoDelegate() {} + + EmptyUndoDelegate(const EmptyUndoDelegate&) = delete; + EmptyUndoDelegate& operator=(const EmptyUndoDelegate&) = delete; + ~EmptyUndoDelegate() override {} private: @@ -106,8 +110,6 @@ const BookmarkNode* parent, size_t index, std::unique_ptr<BookmarkNode> node) override {} - - DISALLOW_COPY_AND_ASSIGN(EmptyUndoDelegate); }; } // namespace
diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h index 4864b2b..ae917ee 100644 --- a/components/bookmarks/browser/bookmark_model.h +++ b/components/bookmarks/browser/bookmark_model.h
@@ -74,6 +74,10 @@ public KeyedService { public: explicit BookmarkModel(std::unique_ptr<BookmarkClient> client); + + BookmarkModel(const BookmarkModel&) = delete; + BookmarkModel& operator=(const BookmarkModel&) = delete; + ~BookmarkModel() override; // Triggers the loading of bookmarks, which is an asynchronous operation with @@ -428,8 +432,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<BookmarkModel> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BookmarkModel); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/bookmark_node.h b/components/bookmarks/browser/bookmark_node.h index 730572b..353dd406c 100644 --- a/components/bookmarks/browser/bookmark_node.h +++ b/components/bookmarks/browser/bookmark_node.h
@@ -61,6 +61,9 @@ // Creates a new node with |id|, |guid| and |url|. BookmarkNode(int64_t id, const base::GUID& guid, const GURL& url); + BookmarkNode(const BookmarkNode&) = delete; + BookmarkNode& operator=(const BookmarkNode&) = delete; + ~BookmarkNode() override; // Returns true if the node is a BookmarkPermanentNode (which does not include @@ -216,8 +219,6 @@ std::unique_ptr<MetaInfoMap> meta_info_map_; const bool is_permanent_node_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkNode); }; // BookmarkPermanentNode ------------------------------------------------------- @@ -229,6 +230,9 @@ static std::unique_ptr<BookmarkPermanentNode> CreateManagedBookmarks( int64_t id); + BookmarkPermanentNode(const BookmarkPermanentNode&) = delete; + BookmarkPermanentNode& operator=(const BookmarkPermanentNode&) = delete; + ~BookmarkPermanentNode() override; // BookmarkNode overrides: @@ -257,8 +261,6 @@ bool visible_when_empty); const bool visible_when_empty_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode); }; // If you are looking for gMock printing via PrintTo(), please check
diff --git a/components/bookmarks/browser/bookmark_storage.h b/components/bookmarks/browser/bookmark_storage.h index ac2b55a..0a3779b 100644 --- a/components/bookmarks/browser/bookmark_storage.h +++ b/components/bookmarks/browser/bookmark_storage.h
@@ -40,6 +40,10 @@ // location derived from |profile_path|. The disk writes will be executed as a // task in a backend task runner. BookmarkStorage(BookmarkModel* model, const base::FilePath& profile_path); + + BookmarkStorage(const BookmarkStorage&) = delete; + BookmarkStorage& operator=(const BookmarkStorage&) = delete; + ~BookmarkStorage() override; // Schedules saving the bookmark bar model to disk. @@ -86,8 +90,6 @@ // The state of the backup file creation which is created lazily just before // the first scheduled save. bool backup_triggered_ = false; - - DISALLOW_COPY_AND_ASSIGN(BookmarkStorage); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/bookmark_utils_unittest.cc b/components/bookmarks/browser/bookmark_utils_unittest.cc index ab06293a4..96f8e87 100644 --- a/components/bookmarks/browser/bookmark_utils_unittest.cc +++ b/components/bookmarks/browser/bookmark_utils_unittest.cc
@@ -37,6 +37,9 @@ grouped_changes_beginning_count_(0), grouped_changes_ended_count_(0) {} + BookmarkUtilsTest(const BookmarkUtilsTest&) = delete; + BookmarkUtilsTest& operator=(const BookmarkUtilsTest&) = delete; + ~BookmarkUtilsTest() override {} // Copy and paste is not yet supported on iOS. http://crbug.com/228147 @@ -78,8 +81,6 @@ int grouped_changes_beginning_count_; int grouped_changes_ended_count_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkUtilsTest); }; TEST_F(BookmarkUtilsTest, GetBookmarksMatchingPropertiesWordPhraseQuery) {
diff --git a/components/bookmarks/browser/scoped_group_bookmark_actions.h b/components/bookmarks/browser/scoped_group_bookmark_actions.h index c2f0997..b718eb5 100644 --- a/components/bookmarks/browser/scoped_group_bookmark_actions.h +++ b/components/bookmarks/browser/scoped_group_bookmark_actions.h
@@ -15,12 +15,15 @@ class ScopedGroupBookmarkActions { public: explicit ScopedGroupBookmarkActions(BookmarkModel* model); + + ScopedGroupBookmarkActions(const ScopedGroupBookmarkActions&) = delete; + ScopedGroupBookmarkActions& operator=(const ScopedGroupBookmarkActions&) = + delete; + ~ScopedGroupBookmarkActions(); private: BookmarkModel* model_; - - DISALLOW_COPY_AND_ASSIGN(ScopedGroupBookmarkActions); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/titled_url_index.h b/components/bookmarks/browser/titled_url_index.h index 6420879..273412a 100644 --- a/components/bookmarks/browser/titled_url_index.h +++ b/components/bookmarks/browser/titled_url_index.h
@@ -37,6 +37,10 @@ // returned unsorted. explicit TitledUrlIndex( std::unique_ptr<TitledUrlNodeSorter> sorter = nullptr); + + TitledUrlIndex(const TitledUrlIndex&) = delete; + TitledUrlIndex& operator=(const TitledUrlIndex&) = delete; + ~TitledUrlIndex(); void SetNodeSorter(std::unique_ptr<TitledUrlNodeSorter> sorter); @@ -119,8 +123,6 @@ Index index_; std::unique_ptr<TitledUrlNodeSorter> sorter_; - - DISALLOW_COPY_AND_ASSIGN(TitledUrlIndex); }; } // namespace bookmarks
diff --git a/components/bookmarks/browser/typed_count_sorter.h b/components/bookmarks/browser/typed_count_sorter.h index b62b7829..191a684f 100644 --- a/components/bookmarks/browser/typed_count_sorter.h +++ b/components/bookmarks/browser/typed_count_sorter.h
@@ -18,6 +18,10 @@ class TypedCountSorter : public TitledUrlNodeSorter { public: explicit TypedCountSorter(BookmarkClient* client); + + TypedCountSorter(const TypedCountSorter&) = delete; + TypedCountSorter& operator=(const TypedCountSorter&) = delete; + ~TypedCountSorter() override; // TitledUrlNodeSorter @@ -26,8 +30,6 @@ private: BookmarkClient* client_; - - DISALLOW_COPY_AND_ASSIGN(TypedCountSorter); }; }
diff --git a/components/bookmarks/managed/managed_bookmark_service.cc b/components/bookmarks/managed/managed_bookmark_service.cc index eb7411c..99baac0 100644 --- a/components/bookmarks/managed/managed_bookmark_service.cc +++ b/components/bookmarks/managed/managed_bookmark_service.cc
@@ -39,6 +39,10 @@ DCHECK(initial_bookmarks_.is_list()); } + BookmarkPermanentNodeLoader(const BookmarkPermanentNodeLoader&) = delete; + BookmarkPermanentNodeLoader& operator=(const BookmarkPermanentNodeLoader&) = + delete; + ~BookmarkPermanentNodeLoader() {} // Initializes |node_| from |initial_bookmarks_| and |title_id_| and returns @@ -56,8 +60,6 @@ std::unique_ptr<BookmarkPermanentNode> node_; base::Value initial_bookmarks_; int title_id_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNodeLoader); }; // Returns a std::unique_ptr<BookmarkPermanentNode> using |next_node_id| for
diff --git a/components/bookmarks/managed/managed_bookmark_service.h b/components/bookmarks/managed/managed_bookmark_service.h index a467409..100e798 100644 --- a/components/bookmarks/managed/managed_bookmark_service.h +++ b/components/bookmarks/managed/managed_bookmark_service.h
@@ -31,6 +31,10 @@ ManagedBookmarkService(PrefService* prefs, GetManagementDomainCallback callback); + + ManagedBookmarkService(const ManagedBookmarkService&) = delete; + ManagedBookmarkService& operator=(const ManagedBookmarkService&) = delete; + ~ManagedBookmarkService() override; // Called upon creation of the BookmarkModel. @@ -84,8 +88,6 @@ std::unique_ptr<ManagedBookmarksTracker> managed_bookmarks_tracker_; GetManagementDomainCallback managed_domain_callback_; BookmarkPermanentNode* managed_node_; - - DISALLOW_COPY_AND_ASSIGN(ManagedBookmarkService); }; } // namespace bookmarks
diff --git a/components/bookmarks/managed/managed_bookmarks_policy_handler.h b/components/bookmarks/managed/managed_bookmarks_policy_handler.h index 061d5c5..758f9fd 100644 --- a/components/bookmarks/managed/managed_bookmarks_policy_handler.h +++ b/components/bookmarks/managed/managed_bookmarks_policy_handler.h
@@ -16,6 +16,11 @@ : public policy::SchemaValidatingPolicyHandler { public: explicit ManagedBookmarksPolicyHandler(policy::Schema chrome_schema); + + ManagedBookmarksPolicyHandler(const ManagedBookmarksPolicyHandler&) = delete; + ManagedBookmarksPolicyHandler& operator=( + const ManagedBookmarksPolicyHandler&) = delete; + ~ManagedBookmarksPolicyHandler() override; // ConfigurationPolicyHandler methods: @@ -25,8 +30,6 @@ private: std::string GetFolderName(const base::Value& list); base::Value::ListStorage FilterBookmarks(base::Value::ListStorage bookmarks); - - DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksPolicyHandler); }; } // namespace bookmarks
diff --git a/components/bookmarks/managed/managed_bookmarks_tracker.h b/components/bookmarks/managed/managed_bookmarks_tracker.h index ed42ff0..27b7b10 100644 --- a/components/bookmarks/managed/managed_bookmarks_tracker.h +++ b/components/bookmarks/managed/managed_bookmarks_tracker.h
@@ -43,6 +43,10 @@ ManagedBookmarksTracker(BookmarkModel* model, PrefService* prefs, GetManagementDomainCallback callback); + + ManagedBookmarksTracker(const ManagedBookmarksTracker&) = delete; + ManagedBookmarksTracker& operator=(const ManagedBookmarksTracker&) = delete; + ~ManagedBookmarksTracker(); // Returns the initial list of managed bookmarks, which can be passed to @@ -77,11 +81,8 @@ PrefService* prefs_; PrefChangeRegistrar registrar_; GetManagementDomainCallback get_management_domain_callback_; - - DISALLOW_COPY_AND_ASSIGN(ManagedBookmarksTracker); }; } // namespace bookmarks #endif // COMPONENTS_BOOKMARKS_MANAGED_MANAGED_BOOKMARKS_TRACKER_H_ -
diff --git a/components/bookmarks/test/bookmark_test_helpers.cc b/components/bookmarks/test/bookmark_test_helpers.cc index 228bf7e..6e55ca2 100644 --- a/components/bookmarks/test/bookmark_test_helpers.cc +++ b/components/bookmarks/test/bookmark_test_helpers.cc
@@ -27,6 +27,10 @@ public: explicit BookmarkLoadObserver(base::OnceClosure quit_task) : quit_task_(std::move(quit_task)) {} + + BookmarkLoadObserver(const BookmarkLoadObserver&) = delete; + BookmarkLoadObserver& operator=(const BookmarkLoadObserver&) = delete; + ~BookmarkLoadObserver() override = default; private: @@ -37,8 +41,6 @@ } base::OnceClosure quit_task_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkLoadObserver); }; // Helper function which does the actual work of creating the nodes for
diff --git a/components/bookmarks/test/test_bookmark_client.h b/components/bookmarks/test/test_bookmark_client.h index 0a836482..8ced65f 100644 --- a/components/bookmarks/test/test_bookmark_client.h +++ b/components/bookmarks/test/test_bookmark_client.h
@@ -25,6 +25,10 @@ class TestBookmarkClient : public BookmarkClient { public: TestBookmarkClient(); + + TestBookmarkClient(const TestBookmarkClient&) = delete; + TestBookmarkClient& operator=(const TestBookmarkClient&) = delete; + ~TestBookmarkClient() override; // Returns a new BookmarkModel using a TestBookmarkClient. @@ -92,8 +96,6 @@ base::CancelableTaskTracker::TaskId next_task_id_ = 1; std::map<GURL, std::list<favicon_base::FaviconImageCallback>> requests_per_page_url_; - - DISALLOW_COPY_AND_ASSIGN(TestBookmarkClient); }; } // namespace bookmarks
diff --git a/components/browser_sync/browser_sync_client.h b/components/browser_sync/browser_sync_client.h index df61e182..e9af8ff 100644 --- a/components/browser_sync/browser_sync_client.h +++ b/components/browser_sync/browser_sync_client.h
@@ -52,6 +52,10 @@ class BrowserSyncClient : public syncer::SyncClient { public: BrowserSyncClient() = default; + + BrowserSyncClient(const BrowserSyncClient&) = delete; + BrowserSyncClient& operator=(const BrowserSyncClient&) = delete; + ~BrowserSyncClient() override = default; virtual syncer::ModelTypeStoreService* GetModelTypeStoreService() = 0; @@ -71,9 +75,6 @@ virtual send_tab_to_self::SendTabToSelfSyncService* GetSendTabToSelfSyncService() = 0; virtual BookmarkUndoService* GetBookmarkUndoService() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(BrowserSyncClient); }; } // namespace browser_sync
diff --git a/components/browser_ui/sms/android/sms_infobar.h b/components/browser_ui/sms/android/sms_infobar.h index c38a267..fdb2809 100644 --- a/components/browser_ui/sms/android/sms_infobar.h +++ b/components/browser_ui/sms/android/sms_infobar.h
@@ -27,6 +27,10 @@ public: SmsInfoBar(content::WebContents* web_contents, std::unique_ptr<SmsInfoBarDelegate> delegate); + + SmsInfoBar(const SmsInfoBar&) = delete; + SmsInfoBar& operator=(const SmsInfoBar&) = delete; + ~SmsInfoBar() override; // Creates an SMS receiver infobar and delegate and adds it to @@ -45,8 +49,6 @@ const ResourceIdMapper& resource_id_mapper) override; content::WebContents* web_contents_; - - DISALLOW_COPY_AND_ASSIGN(SmsInfoBar); }; } // namespace sms
diff --git a/components/browser_ui/sms/android/sms_infobar_delegate.h b/components/browser_ui/sms/android/sms_infobar_delegate.h index b298ee2e..95c9813 100644 --- a/components/browser_ui/sms/android/sms_infobar_delegate.h +++ b/components/browser_ui/sms/android/sms_infobar_delegate.h
@@ -22,6 +22,10 @@ const std::string& one_time_code, base::OnceClosure on_confirm, base::OnceClosure on_cancel); + + SmsInfoBarDelegate(const SmsInfoBarDelegate&) = delete; + SmsInfoBarDelegate& operator=(const SmsInfoBarDelegate&) = delete; + ~SmsInfoBarDelegate() override; // ConfirmInfoBarDelegate: @@ -40,7 +44,6 @@ const std::string one_time_code_; base::OnceClosure on_confirm_; base::OnceClosure on_cancel_; - DISALLOW_COPY_AND_ASSIGN(SmsInfoBarDelegate); }; } // namespace sms
diff --git a/components/browser_watcher/exit_code_watcher_win.h b/components/browser_watcher/exit_code_watcher_win.h index b018726..19222860 100644 --- a/components/browser_watcher/exit_code_watcher_win.h +++ b/components/browser_watcher/exit_code_watcher_win.h
@@ -15,6 +15,10 @@ class ExitCodeWatcher { public: ExitCodeWatcher(); + + ExitCodeWatcher(const ExitCodeWatcher&) = delete; + ExitCodeWatcher& operator=(const ExitCodeWatcher&) = delete; + ~ExitCodeWatcher(); // This function expects |process| to be open with sufficient privilege to @@ -48,8 +52,6 @@ // Event handle to use to stop exit watcher thread base::win::ScopedHandle stop_watching_handle_; - - DISALLOW_COPY_AND_ASSIGN(ExitCodeWatcher); }; } // namespace browser_watcher
diff --git a/components/browsing_data/content/browsing_data_helper_unittest.cc b/components/browsing_data/content/browsing_data_helper_unittest.cc index f974592..c4564c64 100644 --- a/components/browsing_data/content/browsing_data_helper_unittest.cc +++ b/components/browsing_data/content/browsing_data_helper_unittest.cc
@@ -16,15 +16,16 @@ class BrowsingDataHelperTest : public testing::Test { public: BrowsingDataHelperTest() {} + + BrowsingDataHelperTest(const BrowsingDataHelperTest&) = delete; + BrowsingDataHelperTest& operator=(const BrowsingDataHelperTest&) = delete; + ~BrowsingDataHelperTest() override {} bool IsWebScheme(const std::string& scheme) { GURL test(scheme + "://example.com"); return (HasWebScheme(test) && browsing_data::IsWebScheme(scheme)); } - - private: - DISALLOW_COPY_AND_ASSIGN(BrowsingDataHelperTest); }; TEST_F(BrowsingDataHelperTest, WebStorageSchemesAreWebSchemes) {
diff --git a/components/browsing_data/content/local_shared_objects_container.h b/components/browsing_data/content/local_shared_objects_container.h index 2156a2bef..990ef2e 100644 --- a/components/browsing_data/content/local_shared_objects_container.h +++ b/components/browsing_data/content/local_shared_objects_container.h
@@ -37,6 +37,11 @@ content::BrowserContext* browser_context, const std::vector<storage::FileSystemType>& additional_file_system_types, browsing_data::CookieHelper::IsDeletionDisabledCallback callback); + + LocalSharedObjectsContainer(const LocalSharedObjectsContainer&) = delete; + LocalSharedObjectsContainer& operator=(const LocalSharedObjectsContainer&) = + delete; + ~LocalSharedObjectsContainer(); // Returns the number of objects stored in the container. @@ -83,8 +88,6 @@ scoped_refptr<CannedSharedWorkerHelper> shared_workers_; scoped_refptr<CannedCacheStorageHelper> cache_storages_; scoped_refptr<CannedLocalStorageHelper> session_storages_; - - DISALLOW_COPY_AND_ASSIGN(LocalSharedObjectsContainer); }; } // namespace browsing_data
diff --git a/components/browsing_data/core/counters/autofill_counter.h b/components/browsing_data/core/counters/autofill_counter.h index ccf8cdc..62421cb 100644 --- a/components/browsing_data/core/counters/autofill_counter.h +++ b/components/browsing_data/core/counters/autofill_counter.h
@@ -29,6 +29,10 @@ ResultInt num_credit_cards, ResultInt num_addresses, bool autofill_sync_enabled_); + + AutofillResult(const AutofillResult&) = delete; + AutofillResult& operator=(const AutofillResult&) = delete; + ~AutofillResult() override; ResultInt num_credit_cards() const { return num_credit_cards_; } @@ -37,8 +41,6 @@ private: ResultInt num_credit_cards_; ResultInt num_addresses_; - - DISALLOW_COPY_AND_ASSIGN(AutofillResult); }; explicit AutofillCounter(
diff --git a/components/browsing_data/core/counters/browsing_data_counter.h b/components/browsing_data/core/counters/browsing_data_counter.h index 9d8aa95e..0a80f51 100644 --- a/components/browsing_data/core/counters/browsing_data_counter.h +++ b/components/browsing_data/core/counters/browsing_data_counter.h
@@ -29,6 +29,10 @@ class Result { public: explicit Result(const BrowsingDataCounter* source); + + Result(const Result&) = delete; + Result& operator=(const Result&) = delete; + virtual ~Result(); const BrowsingDataCounter* source() const { return source_; } @@ -36,8 +40,6 @@ private: const BrowsingDataCounter* source_; - - DISALLOW_COPY_AND_ASSIGN(Result); }; // A subclass of Result returned when the computation has finished. The result @@ -47,6 +49,10 @@ class FinishedResult : public Result { public: FinishedResult(const BrowsingDataCounter* source, ResultInt value); + + FinishedResult(const FinishedResult&) = delete; + FinishedResult& operator=(const FinishedResult&) = delete; + ~FinishedResult() override; // Result: @@ -56,8 +62,6 @@ private: ResultInt value_; - - DISALLOW_COPY_AND_ASSIGN(FinishedResult); }; // A subclass of FinishedResult that besides |Value()| also stores whether @@ -67,14 +71,16 @@ SyncResult(const BrowsingDataCounter* source, ResultInt value, bool sync_enabled); + + SyncResult(const SyncResult&) = delete; + SyncResult& operator=(const SyncResult&) = delete; + ~SyncResult() override; bool is_sync_enabled() const { return sync_enabled_; } private: bool sync_enabled_; - - DISALLOW_COPY_AND_ASSIGN(SyncResult); }; typedef base::RepeatingCallback<void(std::unique_ptr<Result>)> ResultCallback;
diff --git a/components/browsing_data/core/counters/passwords_counter.h b/components/browsing_data/core/counters/passwords_counter.h index 3909382b..254ac06 100644 --- a/components/browsing_data/core/counters/passwords_counter.h +++ b/components/browsing_data/core/counters/passwords_counter.h
@@ -34,6 +34,10 @@ bool sync_enabled, std::vector<std::string> domain_examples, std::vector<std::string> account_domain_examples); + + PasswordsResult(const PasswordsResult&) = delete; + PasswordsResult& operator=(const PasswordsResult&) = delete; + ~PasswordsResult() override; ResultInt account_passwords() const { return account_passwords_; } @@ -50,8 +54,6 @@ ResultInt account_passwords_ = 0; std::vector<std::string> domain_examples_; std::vector<std::string> account_domain_examples_; - - DISALLOW_COPY_AND_ASSIGN(PasswordsResult); }; PasswordsCounter(
diff --git a/components/captive_portal/content/captive_portal_login_detector.h b/components/captive_portal/content/captive_portal_login_detector.h index 65f7c5a..ac28449 100644 --- a/components/captive_portal/content/captive_portal_login_detector.h +++ b/components/captive_portal/content/captive_portal_login_detector.h
@@ -23,6 +23,10 @@ explicit CaptivePortalLoginDetector( CaptivePortalService* captive_portal_service); + CaptivePortalLoginDetector(const CaptivePortalLoginDetector&) = delete; + CaptivePortalLoginDetector& operator=(const CaptivePortalLoginDetector&) = + delete; + ~CaptivePortalLoginDetector(); void OnStoppedLoading(); @@ -42,8 +46,6 @@ // Page is on its first load since being tagged as a login tab. Used to // prevent a second captive portal check on the first load of the login page. bool first_login_tab_load_; - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalLoginDetector); }; } // namespace captive_portal
diff --git a/components/captive_portal/content/captive_portal_service.h b/components/captive_portal/content/captive_portal_service.h index da0dba5..461669b 100644 --- a/components/captive_portal/content/captive_portal_service.h +++ b/components/captive_portal/content/captive_portal_service.h
@@ -67,6 +67,10 @@ PrefService* pref_service, const base::TickClock* clock_for_testing = nullptr, network::mojom::URLLoaderFactory* loader_factory_for_testing = nullptr); + + CaptivePortalService(const CaptivePortalService&) = delete; + CaptivePortalService& operator=(const CaptivePortalService&) = delete; + ~CaptivePortalService() override; // Triggers a check for a captive portal. If there's already a check in @@ -215,8 +219,6 @@ // Test tick clock used by unit tests. const base::TickClock* const tick_clock_for_testing_; // Not owned. - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalService); }; } // namespace captive_portal
diff --git a/components/captive_portal/content/captive_portal_tab_helper.h b/components/captive_portal/content/captive_portal_tab_helper.h index c8c186f3..6da0fbd0 100644 --- a/components/captive_portal/content/captive_portal_tab_helper.h +++ b/components/captive_portal/content/captive_portal_tab_helper.h
@@ -56,6 +56,9 @@ : public content::WebContentsObserver, public content::WebContentsUserData<CaptivePortalTabHelper> { public: + CaptivePortalTabHelper(const CaptivePortalTabHelper&) = delete; + CaptivePortalTabHelper& operator=(const CaptivePortalTabHelper&) = delete; + ~CaptivePortalTabHelper() override; // content::WebContentsObserver: @@ -117,8 +120,6 @@ base::CallbackListSubscription subscription_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabHelper); }; } // namespace captive_portal
diff --git a/components/captive_portal/content/captive_portal_tab_helper_unittest.cc b/components/captive_portal/content/captive_portal_tab_helper_unittest.cc index 75670ee8..77c310c 100644 --- a/components/captive_portal/content/captive_portal_tab_helper_unittest.cc +++ b/components/captive_portal/content/captive_portal_tab_helper_unittest.cc
@@ -58,6 +58,11 @@ public: CaptivePortalTabHelperTest() : mock_reloader_(new testing::StrictMock<MockCaptivePortalTabReloader>) {} + + CaptivePortalTabHelperTest(const CaptivePortalTabHelperTest&) = delete; + CaptivePortalTabHelperTest& operator=(const CaptivePortalTabHelperTest&) = + delete; + ~CaptivePortalTabHelperTest() override {} void SetUp() override { @@ -189,8 +194,6 @@ // Owned by |tab_helper_|. testing::StrictMock<MockCaptivePortalTabReloader>* mock_reloader_; - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabHelperTest); }; TEST_F(CaptivePortalTabHelperTest, HttpSuccess) {
diff --git a/components/captive_portal/content/captive_portal_tab_reloader.h b/components/captive_portal/content/captive_portal_tab_reloader.h index f02fa09b..40c6de1d 100644 --- a/components/captive_portal/content/captive_portal_tab_reloader.h +++ b/components/captive_portal/content/captive_portal_tab_reloader.h
@@ -82,6 +82,9 @@ content::WebContents* web_contents, const OpenLoginTabCallback& open_login_tab_callback); + CaptivePortalTabReloader(const CaptivePortalTabReloader&) = delete; + CaptivePortalTabReloader& operator=(const CaptivePortalTabReloader&) = delete; + virtual ~CaptivePortalTabReloader(); // The following functions are all invoked by the CaptivePortalTabHelper: @@ -187,8 +190,6 @@ const OpenLoginTabCallback open_login_tab_callback_; base::WeakPtrFactory<CaptivePortalTabReloader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalTabReloader); }; } // namespace captive_portal
diff --git a/components/captive_portal/content/captive_portal_tab_reloader_unittest.cc b/components/captive_portal/content/captive_portal_tab_reloader_unittest.cc index 9766c8a..acd024e 100644 --- a/components/captive_portal/content/captive_portal_tab_reloader_unittest.cc +++ b/components/captive_portal/content/captive_portal_tab_reloader_unittest.cc
@@ -29,6 +29,10 @@ explicit TestCaptivePortalTabReloader(content::WebContents* web_contents) : CaptivePortalTabReloader(nullptr, web_contents, base::NullCallback()) {} + TestCaptivePortalTabReloader(const TestCaptivePortalTabReloader&) = delete; + TestCaptivePortalTabReloader& operator=(const TestCaptivePortalTabReloader&) = + delete; + ~TestCaptivePortalTabReloader() override {} bool TimerRunning() { return slow_ssl_load_timer_.IsRunning(); } @@ -47,9 +51,6 @@ MOCK_METHOD0(ReloadTab, void()); MOCK_METHOD0(MaybeOpenCaptivePortalLoginTab, void()); MOCK_METHOD0(CheckForCaptivePortal, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(TestCaptivePortalTabReloader); }; class CaptivePortalTabReloaderTest : public content::RenderViewHostTestHarness {
diff --git a/components/captive_portal/core/captive_portal_detector.h b/components/captive_portal/core/captive_portal_detector.h index f1c0a76..c8cb03e9c 100644 --- a/components/captive_portal/core/captive_portal_detector.h +++ b/components/captive_portal/core/captive_portal_detector.h
@@ -50,6 +50,10 @@ explicit CaptivePortalDetector( network::mojom::URLLoaderFactory* loader_factory); + + CaptivePortalDetector(const CaptivePortalDetector&) = delete; + CaptivePortalDetector& operator=(const CaptivePortalDetector&) = delete; + ~CaptivePortalDetector(); // Triggers a check for a captive portal. After completion, runs the @@ -119,8 +123,6 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) base::WeakPtrFactory<CaptivePortalDetector> weak_factory_; #endif - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetector); }; } // namespace captive_portal
diff --git a/components/captive_portal/core/captive_portal_testing_utils.h b/components/captive_portal/core/captive_portal_testing_utils.h index 22619a1a..35dbf3b6 100644 --- a/components/captive_portal/core/captive_portal_testing_utils.h +++ b/components/captive_portal/core/captive_portal_testing_utils.h
@@ -18,6 +18,11 @@ class CaptivePortalDetectorTestBase { public: CaptivePortalDetectorTestBase(); + + CaptivePortalDetectorTestBase(const CaptivePortalDetectorTestBase&) = delete; + CaptivePortalDetectorTestBase& operator=( + const CaptivePortalDetectorTestBase&) = delete; + virtual ~CaptivePortalDetectorTestBase(); // Sets test time for captive portal detector. @@ -46,8 +51,6 @@ protected: CaptivePortalDetector* detector_; network::TestURLLoaderFactory test_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetectorTestBase); }; } // namespace captive_portal
diff --git a/components/cast/api_bindings/manager.h b/components/cast/api_bindings/manager.h index 9f833af9..82ce30240 100644 --- a/components/cast/api_bindings/manager.h +++ b/components/cast/api_bindings/manager.h
@@ -24,6 +24,10 @@ std::unique_ptr<cast_api_bindings::MessagePort>)>; Manager(); + + Manager(const Manager&) = delete; + Manager& operator=(const Manager&) = delete; + virtual ~Manager(); // Registers a |handler| which will receive MessagePorts originating from @@ -53,8 +57,6 @@ private: base::flat_map<std::string, MessagePortConnectedHandler> port_handlers_; - - DISALLOW_COPY_AND_ASSIGN(Manager); }; } // namespace cast_api_bindings
diff --git a/components/cast_certificate/cast_cert_validator.h b/components/cast_certificate/cast_cert_validator.h index ecf9f01..8de71f2 100644 --- a/components/cast_certificate/cast_cert_validator.h +++ b/components/cast_certificate/cast_cert_validator.h
@@ -66,6 +66,10 @@ class CertVerificationContext { public: CertVerificationContext() {} + + CertVerificationContext(const CertVerificationContext&) = delete; + CertVerificationContext& operator=(const CertVerificationContext&) = delete; + virtual ~CertVerificationContext() {} // Use the public key from the verified certificate to verify a @@ -81,9 +85,6 @@ // the verified certificate, if present. Returns an empty string if no Common // Name is found. virtual std::string GetCommonName() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(CertVerificationContext); }; // Verifies a cast device certficate given a chain of DER-encoded certificates,
diff --git a/components/cast_certificate/cast_crl.cc b/components/cast_certificate/cast_crl.cc index e990dcd..dba7bbc 100644 --- a/components/cast_certificate/cast_crl.cc +++ b/components/cast_certificate/cast_crl.cc
@@ -227,6 +227,10 @@ public: CastCRLImpl(const TbsCrl& tbs_crl, const net::der::GeneralizedTime& overall_not_after); + + CastCRLImpl(const CastCRLImpl&) = delete; + CastCRLImpl& operator=(const CastCRLImpl&) = delete; + ~CastCRLImpl() override; bool CheckRevocation(const net::ParsedCertificateList& trusted_chain, @@ -250,7 +254,6 @@ // The value is a list of revoked serial number ranges. std::unordered_map<std::string, std::vector<SerialNumberRange>> revoked_serial_numbers_; - DISALLOW_COPY_AND_ASSIGN(CastCRLImpl); }; CastCRLImpl::CastCRLImpl(const TbsCrl& tbs_crl,
diff --git a/components/cast_channel/cast_framer.h b/components/cast_channel/cast_framer.h index 84904f2d..000ff6e 100644 --- a/components/cast_channel/cast_framer.h +++ b/components/cast_channel/cast_framer.h
@@ -28,6 +28,10 @@ // |input_buffer|: The input buffer used by all socket read operations that // feed data into the framer. explicit MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer); + + MessageFramer(const MessageFramer&) = delete; + MessageFramer& operator=(const MessageFramer&) = delete; + ~MessageFramer(); // The number of bytes required from |input_buffer| to complete the @@ -98,8 +102,6 @@ // Disables Ingest functionality is the parser receives invalid data. bool error_; - - DISALLOW_COPY_AND_ASSIGN(MessageFramer); }; } // namespace cast_channel #endif // COMPONENTS_CAST_CHANNEL_CAST_FRAMER_H_
diff --git a/components/cast_channel/cast_message_handler.h b/components/cast_channel/cast_message_handler.h index 0d2848af..092c3b8d 100644 --- a/components/cast_channel/cast_message_handler.h +++ b/components/cast_channel/cast_message_handler.h
@@ -142,6 +142,10 @@ const std::string& user_agent, const std::string& browser_version, const std::string& locale); + + CastMessageHandler(const CastMessageHandler&) = delete; + CastMessageHandler& operator=(const CastMessageHandler&) = delete; + ~CastMessageHandler() override; // Ensures a virtual connection exists for (|source_id|, |destination_id|) on @@ -347,8 +351,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<CastMessageHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CastMessageHandler); }; } // namespace cast_channel
diff --git a/components/cast_channel/cast_message_handler_unittest.cc b/components/cast_channel/cast_message_handler_unittest.cc index c2456c4..62754ca 100644 --- a/components/cast_channel/cast_message_handler_unittest.cc +++ b/components/cast_channel/cast_message_handler_unittest.cc
@@ -108,6 +108,9 @@ .WillByDefault(testing::Return(&cast_socket_)); } + CastMessageHandlerTest(const CastMessageHandlerTest&) = delete; + CastMessageHandlerTest& operator=(const CastMessageHandlerTest&) = delete; + ~CastMessageHandlerTest() override = default; void OnMessage(const CastMessage& message) { @@ -234,9 +237,6 @@ base::MockCallback<GetAppAvailabilityCallback> get_app_availability_callback_; base::MockCallback<ResultCallback> set_volume_callback_; base::MockCallback<ResultCallback> stop_session_callback_; - - private: - DISALLOW_COPY_AND_ASSIGN(CastMessageHandlerTest); }; TEST_F(CastMessageHandlerTest, VirtualConnectionCreatedOnlyOnce) {
diff --git a/components/cast_channel/cast_socket.h b/components/cast_channel/cast_socket.h index f676b5ab7..89b99ea56 100644 --- a/components/cast_channel/cast_socket.h +++ b/components/cast_channel/cast_socket.h
@@ -193,6 +193,9 @@ const scoped_refptr<Logger>& logger, const AuthContext& auth_context); + CastSocketImpl(const CastSocketImpl&) = delete; + CastSocketImpl& operator=(const CastSocketImpl&) = delete; + // Ensures that the socket is closed. ~CastSocketImpl() override; @@ -240,6 +243,11 @@ class CastSocketMessageDelegate : public CastTransport::Delegate { public: CastSocketMessageDelegate(CastSocketImpl* socket); + + CastSocketMessageDelegate(const CastSocketMessageDelegate&) = delete; + CastSocketMessageDelegate& operator=(const CastSocketMessageDelegate&) = + delete; + ~CastSocketMessageDelegate() override; // CastTransport::Delegate implementation. @@ -249,7 +257,6 @@ private: CastSocketImpl* const socket_; - DISALLOW_COPY_AND_ASSIGN(CastSocketMessageDelegate); }; // Replaces the internally-constructed transport object with one provided @@ -422,8 +429,6 @@ base::ObserverList<Observer>::Unchecked observers_; base::WeakPtrFactory<CastSocketImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CastSocketImpl); }; } // namespace cast_channel
diff --git a/components/cast_channel/cast_socket_service.h b/components/cast_channel/cast_socket_service.h index f241d95..077e714 100644 --- a/components/cast_channel/cast_socket_service.h +++ b/components/cast_channel/cast_socket_service.h
@@ -92,6 +92,9 @@ public: using CastSocketService::NetworkContextGetter; + CastSocketServiceImpl(const CastSocketServiceImpl&) = delete; + CastSocketServiceImpl& operator=(const CastSocketServiceImpl&) = delete; + ~CastSocketServiceImpl() override; // CastSocketService overrides. @@ -123,8 +126,6 @@ // List of socket observers. base::ObserverList<CastSocket::Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(CastSocketServiceImpl); }; } // namespace cast_channel
diff --git a/components/cast_channel/cast_socket_unittest.cc b/components/cast_channel/cast_socket_unittest.cc index d4bb2347..b2d48f9 100644 --- a/components/cast_channel/cast_socket_unittest.cc +++ b/components/cast_channel/cast_socket_unittest.cc
@@ -165,6 +165,10 @@ SetPeerCertForTesting( net::ImportCertFromFile(GetTestCertsDirectory(), "self_signed.pem")); } + + TestCastSocketBase(const TestCastSocketBase&) = delete; + TestCastSocketBase& operator=(const TestCastSocketBase&) = delete; + ~TestCastSocketBase() override {} void SetVerifyChallengeResult(bool value) { @@ -192,9 +196,6 @@ bool verify_challenge_result_; bool verify_challenge_disallow_; std::unique_ptr<base::MockOneShotTimer> mock_timer_; - - private: - DISALLOW_COPY_AND_ASSIGN(TestCastSocketBase); }; class MockTestCastSocket : public TestCastSocketBase { @@ -214,6 +215,9 @@ Logger* logger) : TestCastSocketBase(network_context, open_params, logger) {} + MockTestCastSocket(const MockTestCastSocket&) = delete; + MockTestCastSocket& operator=(const MockTestCastSocket&) = delete; + ~MockTestCastSocket() override {} void SetupMockTransport() { @@ -234,14 +238,16 @@ private: MockCastTransport* mock_transport_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(MockTestCastSocket); }; // TODO(https://crbug.com/928467): Remove this class. class TestSocketFactory : public net::ClientSocketFactory { public: explicit TestSocketFactory(net::IPEndPoint ip) : ip_(ip) {} + + TestSocketFactory(const TestSocketFactory&) = delete; + TestSocketFactory& operator=(const TestSocketFactory&) = delete; + ~TestSocketFactory() override = default; // Socket connection helpers. @@ -370,8 +376,6 @@ bool tcp_unresponsive_ = false; std::unique_ptr<net::TransportClientSocket> tcp_client_socket_; base::OnceClosure tls_socket_created_; - - DISALLOW_COPY_AND_ASSIGN(TestSocketFactory); }; class CastSocketTestBase : public testing::Test {
diff --git a/components/cast_channel/cast_test_util.h b/components/cast_channel/cast_test_util.h index 40eac4d..3a03fee0 100644 --- a/components/cast_channel/cast_test_util.h +++ b/components/cast_channel/cast_test_util.h
@@ -30,6 +30,10 @@ class MockCastTransport : public CastTransport { public: MockCastTransport(); + + MockCastTransport(const MockCastTransport&) = delete; + MockCastTransport& operator=(const MockCastTransport&) = delete; + ~MockCastTransport() override; void SetReadDelegate( @@ -53,21 +57,21 @@ private: std::unique_ptr<CastTransport::Delegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(MockCastTransport); }; class MockCastTransportDelegate : public CastTransport::Delegate { public: MockCastTransportDelegate(); + + MockCastTransportDelegate(const MockCastTransportDelegate&) = delete; + MockCastTransportDelegate& operator=(const MockCastTransportDelegate&) = + delete; + ~MockCastTransportDelegate() override; MOCK_METHOD1(OnError, void(ChannelError error)); MOCK_METHOD1(OnMessage, void(const CastMessage& message)); MOCK_METHOD0(Start, void(void)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCastTransportDelegate); }; class MockCastSocketObserver : public CastSocket::Observer { @@ -103,6 +107,10 @@ using MockOnOpenCallback = base::RepeatingCallback<void(CastSocket* socket)>; MockCastSocket(); + + MockCastSocket(const MockCastSocket&) = delete; + MockCastSocket& operator=(const MockCastSocket&) = delete; + ~MockCastSocket() override; void Connect(CastSocket::OnOpenCallback callback) override { @@ -152,13 +160,15 @@ std::unique_ptr<MockCastTransport> mock_transport_; std::unique_ptr<Observer> observer_; - - DISALLOW_COPY_AND_ASSIGN(MockCastSocket); }; class MockCastMessageHandler : public CastMessageHandler { public: explicit MockCastMessageHandler(MockCastSocketService* socket_service); + + MockCastMessageHandler(const MockCastMessageHandler&) = delete; + MockCastMessageHandler& operator=(const MockCastMessageHandler&) = delete; + ~MockCastMessageHandler() override; MOCK_METHOD4(EnsureConnection, @@ -203,9 +213,6 @@ const base::Value& body, const std::string& source_id, ResultCallback callback)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCastMessageHandler); }; // Creates the IPEndpoint 192.168.1.1.
diff --git a/components/cast_channel/cast_transport.h b/components/cast_channel/cast_transport.h index 6904d99..20bcfa2d 100644 --- a/components/cast_channel/cast_transport.h +++ b/components/cast_channel/cast_transport.h
@@ -99,6 +99,9 @@ const net::IPEndPoint& ip_endpoint_, scoped_refptr<Logger> logger); + CastTransportImpl(const CastTransportImpl&) = delete; + CastTransportImpl& operator=(const CastTransportImpl&) = delete; + ~CastTransportImpl() override; // CastTransport interface. @@ -201,8 +204,6 @@ scoped_refptr<Logger> logger_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(CastTransportImpl); }; } // namespace cast_channel
diff --git a/components/cast_channel/cast_transport_unittest.cc b/components/cast_channel/cast_transport_unittest.cc index a3d0ce5..6abeac2 100644 --- a/components/cast_channel/cast_transport_unittest.cc +++ b/components/cast_channel/cast_transport_unittest.cc
@@ -74,6 +74,10 @@ class CompletionQueue { public: CompletionQueue() {} + + CompletionQueue(const CompletionQueue&) = delete; + CompletionQueue& operator=(const CompletionQueue&) = delete; + ~CompletionQueue() { CHECK_EQ(0u, cb_queue_.size()); } // Enqueues a pending completion callback. @@ -87,7 +91,6 @@ private: base::queue<net::CompletionOnceCallback> cb_queue_; - DISALLOW_COPY_AND_ASSIGN(CompletionQueue); }; // GMock action that reads data from an IOBuffer and writes it to a string
diff --git a/components/cast_channel/keep_alive_delegate.h b/components/cast_channel/keep_alive_delegate.h index 0ad91ae6d..c124c346 100644 --- a/components/cast_channel/keep_alive_delegate.h +++ b/components/cast_channel/keep_alive_delegate.h
@@ -39,6 +39,9 @@ base::TimeDelta ping_interval, base::TimeDelta liveness_timeout); + KeepAliveDelegate(const KeepAliveDelegate&) = delete; + KeepAliveDelegate& operator=(const KeepAliveDelegate&) = delete; + ~KeepAliveDelegate() override; void SetTimersForTest( @@ -55,8 +58,6 @@ std::unique_ptr<CastTransport::Delegate> inner_delegate_; KeepAliveHandler handler_; - - DISALLOW_COPY_AND_ASSIGN(KeepAliveDelegate); }; } // namespace cast_channel
diff --git a/components/cast_channel/keep_alive_delegate_unittest.cc b/components/cast_channel/keep_alive_delegate_unittest.cc index 11df5242..a89d964 100644 --- a/components/cast_channel/keep_alive_delegate_unittest.cc +++ b/components/cast_channel/keep_alive_delegate_unittest.cc
@@ -76,6 +76,10 @@ using ChannelError = ::cast_channel::ChannelError; KeepAliveDelegateTest() {} + + KeepAliveDelegateTest(const KeepAliveDelegateTest&) = delete; + KeepAliveDelegateTest& operator=(const KeepAliveDelegateTest&) = delete; + ~KeepAliveDelegateTest() override {} protected: @@ -107,9 +111,6 @@ MockCastTransportDelegate* inner_delegate_; MockTimerWithMonitoredReset* liveness_timer_; MockTimerWithMonitoredReset* ping_timer_; - - private: - DISALLOW_COPY_AND_ASSIGN(KeepAliveDelegateTest); }; TEST_F(KeepAliveDelegateTest, TestErrorHandledBeforeStarting) {
diff --git a/components/cast_channel/keep_alive_handler.h b/components/cast_channel/keep_alive_handler.h index 41a6de3b..fdf218d 100644 --- a/components/cast_channel/keep_alive_handler.h +++ b/components/cast_channel/keep_alive_handler.h
@@ -34,6 +34,10 @@ base::TimeDelta ping_interval, base::TimeDelta liveness_timeout, OnErrorCallback on_error_cb); + + KeepAliveHandler(const KeepAliveHandler&) = delete; + KeepAliveHandler& operator=(const KeepAliveHandler&) = delete; + ~KeepAliveHandler(); // Restarts the ping/liveness timeout timers. Called when a message @@ -96,8 +100,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<KeepAliveHandler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(KeepAliveHandler); }; } // namespace cast_channel
diff --git a/components/cast_channel/libcast_socket_service.h b/components/cast_channel/libcast_socket_service.h index c0d2005c..836608b 100644 --- a/components/cast_channel/libcast_socket_service.h +++ b/components/cast_channel/libcast_socket_service.h
@@ -32,6 +32,9 @@ public: using CastSocketService::NetworkContextGetter; + LibcastSocketService(const LibcastSocketService&) = delete; + LibcastSocketService& operator=(const LibcastSocketService&) = delete; + ~LibcastSocketService() override; // CastSocketService overrides. @@ -120,8 +123,6 @@ std::map<openscreen::IPEndpoint, SavedOpenParams> open_params_; std::unique_ptr<LibcastSocket> libcast_socket_for_test_; - - DISALLOW_COPY_AND_ASSIGN(LibcastSocketService); }; } // namespace cast_channel
diff --git a/components/cast_channel/mojo_data_pump.h b/components/cast_channel/mojo_data_pump.h index a28f437..0e0c270 100644 --- a/components/cast_channel/mojo_data_pump.h +++ b/components/cast_channel/mojo_data_pump.h
@@ -25,6 +25,9 @@ MojoDataPump(mojo::ScopedDataPipeConsumerHandle receive_stream, mojo::ScopedDataPipeProducerHandle send_stream); + MojoDataPump(const MojoDataPump&) = delete; + MojoDataPump& operator=(const MojoDataPump&) = delete; + ~MojoDataPump() override; // CastTransportImpl::Channel implementation: @@ -58,8 +61,6 @@ scoped_refptr<net::IOBuffer> pending_write_buffer_; int pending_write_buffer_size_ = 0; uint32_t read_size_ = 0; - - DISALLOW_COPY_AND_ASSIGN(MojoDataPump); }; } // namespace cast_channel
diff --git a/components/cbor/reader.h b/components/cbor/reader.h index 058cd88..6190bd74 100644 --- a/components/cbor/reader.h +++ b/components/cbor/reader.h
@@ -79,6 +79,10 @@ // Config contains configuration for a CBOR parsing operation. struct CBOR_EXPORT Config { Config(); + + Config(const Config&) = delete; + Config& operator=(const Config&) = delete; + ~Config(); // Used to report the number of bytes of input consumed. This suppresses the @@ -103,11 +107,11 @@ // the motivating case and because it adds complexity to handle the ordering // correctly.) bool allow_invalid_utf8 = false; - - private: - DISALLOW_COPY_AND_ASSIGN(Config); }; + Reader(const Reader&) = delete; + Reader& operator=(const Reader&) = delete; + ~Reader(); // Reads and parses |input_data| into a Value. Returns an empty Optional @@ -186,8 +190,6 @@ base::span<const uint8_t> rest_; DecoderError error_code_; - - DISALLOW_COPY_AND_ASSIGN(Reader); }; } // namespace cbor
diff --git a/components/cbor/values.h b/components/cbor/values.h index 1225ca7..a848a02e 100644 --- a/components/cbor/values.h +++ b/components/cbor/values.h
@@ -147,6 +147,9 @@ Value& operator=(Value&& that) noexcept; + Value(const Value&) = delete; + Value& operator=(const Value&) = delete; + ~Value(); // Value's copy constructor and copy assignment operator are deleted. @@ -206,8 +209,6 @@ void InternalMoveConstructFrom(Value&& that); void InternalCleanup(); - - DISALLOW_COPY_AND_ASSIGN(Value); }; } // namespace cbor
diff --git a/components/cbor/writer.h b/components/cbor/writer.h index c4596b88..2eecbe8 100644 --- a/components/cbor/writer.h +++ b/components/cbor/writer.h
@@ -72,6 +72,9 @@ bool allow_invalid_utf8_for_testing = false; }; + Writer(const Writer&) = delete; + Writer& operator=(const Writer&) = delete; + ~Writer(); // Returns the CBOR byte string representation of |node|, unless its nesting @@ -109,8 +112,6 @@ // Holds the encoded CBOR data. std::vector<uint8_t>* encoded_cbor_; - - DISALLOW_COPY_AND_ASSIGN(Writer); }; } // namespace cbor
diff --git a/components/cdm/browser/media_drm_storage_impl.cc b/components/cdm/browser/media_drm_storage_impl.cc index 37b13d6..cc42a4236 100644 --- a/components/cdm/browser/media_drm_storage_impl.cc +++ b/components/cdm/browser/media_drm_storage_impl.cc
@@ -509,6 +509,10 @@ } InitializationSerializer() = default; + + InitializationSerializer(const InitializationSerializer&) = delete; + InitializationSerializer& operator=(const InitializationSerializer&) = delete; + ~InitializationSerializer() = default; void FetchOriginId( @@ -592,7 +596,6 @@ pending_requests_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(InitializationSerializer); }; } // namespace
diff --git a/components/cdm/common/widevine_drm_delegate_android.h b/components/cdm/common/widevine_drm_delegate_android.h index 2fd50d7c..d3eb5203 100644 --- a/components/cdm/common/widevine_drm_delegate_android.h +++ b/components/cdm/common/widevine_drm_delegate_android.h
@@ -15,6 +15,11 @@ class WidevineDrmDelegateAndroid : public media::MediaDrmBridgeDelegate { public: WidevineDrmDelegateAndroid(); + + WidevineDrmDelegateAndroid(const WidevineDrmDelegateAndroid&) = delete; + WidevineDrmDelegateAndroid& operator=(const WidevineDrmDelegateAndroid&) = + delete; + ~WidevineDrmDelegateAndroid() override; // media::MediaDrmBridgeDelegate implementation: @@ -24,9 +29,6 @@ const std::vector<uint8_t>& init_data, std::vector<uint8_t>* init_data_out, std::vector<std::string>* optional_parameters_out) override; - - private: - DISALLOW_COPY_AND_ASSIGN(WidevineDrmDelegateAndroid); }; } // namespace cdm
diff --git a/components/certificate_transparency/chrome_require_ct_delegate.h b/components/certificate_transparency/chrome_require_ct_delegate.h index 3b947f5..827429f 100644 --- a/components/certificate_transparency/chrome_require_ct_delegate.h +++ b/components/certificate_transparency/chrome_require_ct_delegate.h
@@ -37,6 +37,10 @@ : public net::TransportSecurityState::RequireCTDelegate { public: explicit ChromeRequireCTDelegate(); + + ChromeRequireCTDelegate(const ChromeRequireCTDelegate&) = delete; + ChromeRequireCTDelegate& operator=(const ChromeRequireCTDelegate&) = delete; + ~ChromeRequireCTDelegate() override; // RequireCTDelegate implementation @@ -98,8 +102,6 @@ // Both SPKI lists are sorted. net::HashValueVector spkis_; net::HashValueVector legacy_spkis_; - - DISALLOW_COPY_AND_ASSIGN(ChromeRequireCTDelegate); }; } // namespace certificate_transparency
diff --git a/components/chromeos_camera/fake_mjpeg_decode_accelerator.h b/components/chromeos_camera/fake_mjpeg_decode_accelerator.h index c1a71c7..64d27969 100644 --- a/components/chromeos_camera/fake_mjpeg_decode_accelerator.h +++ b/components/chromeos_camera/fake_mjpeg_decode_accelerator.h
@@ -28,6 +28,11 @@ public: FakeMjpegDecodeAccelerator( const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); + + FakeMjpegDecodeAccelerator(const FakeMjpegDecodeAccelerator&) = delete; + FakeMjpegDecodeAccelerator& operator=(const FakeMjpegDecodeAccelerator&) = + delete; + ~FakeMjpegDecodeAccelerator() override; // MjpegDecodeAccelerator implementation. @@ -67,8 +72,6 @@ scoped_refptr<base::SingleThreadTaskRunner> decoder_task_runner_; base::WeakPtrFactory<FakeMjpegDecodeAccelerator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeMjpegDecodeAccelerator); }; } // namespace chromeos_camera
diff --git a/components/chromeos_camera/jpeg_encode_accelerator_unittest.cc b/components/chromeos_camera/jpeg_encode_accelerator_unittest.cc index babab98..89ea7d6 100644 --- a/components/chromeos_camera/jpeg_encode_accelerator_unittest.cc +++ b/components/chromeos_camera/jpeg_encode_accelerator_unittest.cc
@@ -274,6 +274,10 @@ const std::vector<TestImage*>& test_images, media::test::ClientStateNotification<ClientState>* note, size_t exif_size); + + JpegClient(const JpegClient&) = delete; + JpegClient& operator=(const JpegClient&) = delete; + ~JpegClient() override; void CreateJpegEncoder(); void DestroyJpegEncoder(); @@ -352,8 +356,6 @@ std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_; base::WeakPtrFactory<JpegClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(JpegClient); }; JpegClient::JpegClient(const std::vector<TestImage*>& test_aligned_images,
diff --git a/components/chromeos_camera/mjpeg_decode_accelerator_unittest.cc b/components/chromeos_camera/mjpeg_decode_accelerator_unittest.cc index 89f9a9a..563ca1e2 100644 --- a/components/chromeos_camera/mjpeg_decode_accelerator_unittest.cc +++ b/components/chromeos_camera/mjpeg_decode_accelerator_unittest.cc
@@ -525,6 +525,10 @@ std::unique_ptr<media::test::ClientStateNotification<ClientState>> note, bool use_dmabuf, bool skip_result_checking); + + JpegClient(const JpegClient&) = delete; + JpegClient& operator=(const JpegClient&) = delete; + ~JpegClient() override; void CreateJpegDecoder(); void StartDecode(int32_t task_id, bool do_prepare_memory); @@ -598,8 +602,6 @@ std::vector<base::TimeDelta> decode_map_times_; base::WeakPtrFactory<JpegClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(JpegClient); }; JpegClient::JpegClient( @@ -949,6 +951,10 @@ ScopedJpegClient(scoped_refptr<base::SingleThreadTaskRunner> task_runner, std::unique_ptr<JpegClient> client) : task_runner_(task_runner), client_(std::move(client)) {} + + ScopedJpegClient(const ScopedJpegClient&) = delete; + ScopedJpegClient& operator=(const ScopedJpegClient&) = delete; + ~ScopedJpegClient() { task_runner_->DeleteSoon(FROM_HERE, std::move(client_)); } @@ -957,8 +963,6 @@ private: scoped_refptr<base::SingleThreadTaskRunner> task_runner_; std::unique_ptr<JpegClient> client_; - - DISALLOW_COPY_AND_ASSIGN(ScopedJpegClient); }; class MjpegDecodeAcceleratorTest : public ::testing::TestWithParam<bool> {
diff --git a/components/chromeos_camera/mojo_jpeg_encode_accelerator_service.h b/components/chromeos_camera/mojo_jpeg_encode_accelerator_service.h index 3fd742e2..c63a230 100644 --- a/components/chromeos_camera/mojo_jpeg_encode_accelerator_service.h +++ b/components/chromeos_camera/mojo_jpeg_encode_accelerator_service.h
@@ -29,6 +29,11 @@ mojo::PendingReceiver<chromeos_camera::mojom::JpegEncodeAccelerator> receiver); + MojoJpegEncodeAcceleratorService(const MojoJpegEncodeAcceleratorService&) = + delete; + MojoJpegEncodeAcceleratorService& operator=( + const MojoJpegEncodeAcceleratorService&) = delete; + ~MojoJpegEncodeAcceleratorService() override; // JpegEncodeAccelerator::Client implementation. @@ -103,8 +108,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<MojoJpegEncodeAcceleratorService> weak_this_factory_; - - DISALLOW_COPY_AND_ASSIGN(MojoJpegEncodeAcceleratorService); }; } // namespace chromeos_camera
diff --git a/components/chromeos_camera/mojo_mjpeg_decode_accelerator.h b/components/chromeos_camera/mojo_mjpeg_decode_accelerator.h index d2e16ca8..760e8fd 100644 --- a/components/chromeos_camera/mojo_mjpeg_decode_accelerator.h +++ b/components/chromeos_camera/mojo_mjpeg_decode_accelerator.h
@@ -28,6 +28,11 @@ scoped_refptr<base::SequencedTaskRunner> io_task_runner, mojo::PendingRemote<chromeos_camera::mojom::MjpegDecodeAccelerator> jpeg_decoder); + + MojoMjpegDecodeAccelerator(const MojoMjpegDecodeAccelerator&) = delete; + MojoMjpegDecodeAccelerator& operator=(const MojoMjpegDecodeAccelerator&) = + delete; + ~MojoMjpegDecodeAccelerator() override; // MjpegDecodeAccelerator implementation. @@ -64,8 +69,6 @@ jpeg_decoder_remote_; mojo::Remote<chromeos_camera::mojom::MjpegDecodeAccelerator> jpeg_decoder_; - - DISALLOW_COPY_AND_ASSIGN(MojoMjpegDecodeAccelerator); }; } // namespace chromeos_camera
diff --git a/components/chromeos_camera/mojo_mjpeg_decode_accelerator_service.h b/components/chromeos_camera/mojo_mjpeg_decode_accelerator_service.h index 11f99699..b1640afb 100644 --- a/components/chromeos_camera/mojo_mjpeg_decode_accelerator_service.h +++ b/components/chromeos_camera/mojo_mjpeg_decode_accelerator_service.h
@@ -31,6 +31,11 @@ mojo::PendingReceiver<chromeos_camera::mojom::MjpegDecodeAccelerator> receiver); + MojoMjpegDecodeAcceleratorService(const MojoMjpegDecodeAcceleratorService&) = + delete; + MojoMjpegDecodeAcceleratorService& operator=( + const MojoMjpegDecodeAcceleratorService&) = delete; + ~MojoMjpegDecodeAcceleratorService() override; // MjpegDecodeAccelerator::Client implementation. @@ -90,8 +95,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<MojoMjpegDecodeAcceleratorService> weak_this_factory_; - - DISALLOW_COPY_AND_ASSIGN(MojoMjpegDecodeAcceleratorService); }; } // namespace chromeos_camera
diff --git a/components/client_hints/browser/client_hints.h b/components/client_hints/browser/client_hints.h index 733b56f4..2fd2335c 100644 --- a/components/client_hints/browser/client_hints.h +++ b/components/client_hints/browser/client_hints.h
@@ -24,6 +24,10 @@ network::NetworkQualityTracker* network_quality_tracker, HostContentSettingsMap* settings_map, const blink::UserAgentMetadata& user_agent_metadata); + + ClientHints(const ClientHints&) = delete; + ClientHints& operator=(const ClientHints&) = delete; + ~ClientHints() override; // content::ClientHintsControllerDelegate: @@ -53,8 +57,6 @@ HostContentSettingsMap* settings_map_ = nullptr; blink::UserAgentMetadata user_agent_metadata_; std::vector<network::mojom::WebClientHintsType> additional_hints_; - - DISALLOW_COPY_AND_ASSIGN(ClientHints); }; } // namespace client_hints
diff --git a/components/cloud_devices/common/cloud_device_description.h b/components/cloud_devices/common/cloud_device_description.h index c8c87a6..a58b66fb 100644 --- a/components/cloud_devices/common/cloud_device_description.h +++ b/components/cloud_devices/common/cloud_device_description.h
@@ -21,6 +21,10 @@ class CloudDeviceDescription { public: CloudDeviceDescription(); + + CloudDeviceDescription(const CloudDeviceDescription&) = delete; + CloudDeviceDescription& operator=(const CloudDeviceDescription&) = delete; + ~CloudDeviceDescription(); bool InitFromString(const std::string& json); @@ -44,8 +48,6 @@ private: base::Value root_; - - DISALLOW_COPY_AND_ASSIGN(CloudDeviceDescription); }; } // namespace cloud_devices
diff --git a/components/cloud_devices/common/description_items.h b/components/cloud_devices/common/description_items.h index a112511..06388f0 100644 --- a/components/cloud_devices/common/description_items.h +++ b/components/cloud_devices/common/description_items.h
@@ -46,6 +46,10 @@ public: ListCapability(); ListCapability(ListCapability&& other); + + ListCapability(const ListCapability&) = delete; + ListCapability& operator=(const ListCapability&) = delete; + ~ListCapability(); bool LoadFrom(const CloudDeviceDescription& description); @@ -70,8 +74,6 @@ private: using OptionVector = std::vector<Option>; OptionVector options_; - - DISALLOW_COPY_AND_ASSIGN(ListCapability); }; // Represents CDD capability stored as JSON list with default_value value. @@ -84,6 +86,10 @@ public: SelectionCapability(); SelectionCapability(SelectionCapability&& other); + + SelectionCapability(const SelectionCapability&) = delete; + SelectionCapability& operator=(const SelectionCapability&) = delete; + ~SelectionCapability(); SelectionCapability& operator=(SelectionCapability&& other); @@ -134,8 +140,6 @@ OptionVector options_; int default_idx_; - - DISALLOW_COPY_AND_ASSIGN(SelectionCapability); }; // Represents CDD capability that can be true or false. @@ -145,6 +149,10 @@ class BooleanCapability { public: BooleanCapability(); + + BooleanCapability(const BooleanCapability&) = delete; + BooleanCapability& operator=(const BooleanCapability&) = delete; + ~BooleanCapability(); bool LoadFrom(const CloudDeviceDescription& description); @@ -158,8 +166,6 @@ private: bool default_value_; - - DISALLOW_COPY_AND_ASSIGN(BooleanCapability); }; // Represents CDD capability for which existence is only important. @@ -169,13 +175,14 @@ class EmptyCapability { public: EmptyCapability() {} + + EmptyCapability(const EmptyCapability&) = delete; + EmptyCapability& operator=(const EmptyCapability&) = delete; + ~EmptyCapability() {} bool LoadFrom(const CloudDeviceDescription& description); void SaveTo(CloudDeviceDescription* description) const; - - private: - DISALLOW_COPY_AND_ASSIGN(EmptyCapability); }; // Represents an item that is of a specific value type. @@ -186,6 +193,10 @@ class ValueCapability { public: ValueCapability(); + + ValueCapability(const ValueCapability&) = delete; + ValueCapability& operator=(const ValueCapability&) = delete; + ~ValueCapability(); bool LoadFrom(const CloudDeviceDescription& description); @@ -201,8 +212,6 @@ private: Option value_; - - DISALLOW_COPY_AND_ASSIGN(ValueCapability); }; // Represents CJT items. @@ -213,6 +222,10 @@ class TicketItem { public: TicketItem(); + + TicketItem(const TicketItem&) = delete; + TicketItem& operator=(const TicketItem&) = delete; + ~TicketItem(); bool LoadFrom(const CloudDeviceDescription& description); @@ -228,8 +241,6 @@ private: Option value_; - - DISALLOW_COPY_AND_ASSIGN(TicketItem); }; } // namespace cloud_devices
diff --git a/components/cloud_devices/common/printer_description.h b/components/cloud_devices/common/printer_description.h index 0b127a1..9b8c73c 100644 --- a/components/cloud_devices/common/printer_description.h +++ b/components/cloud_devices/common/printer_description.h
@@ -76,6 +76,10 @@ const std::string& max_value, const std::string& default_value); RangeVendorCapability(RangeVendorCapability&& other); + + RangeVendorCapability(const RangeVendorCapability&) = delete; + RangeVendorCapability& operator=(const RangeVendorCapability&) = delete; + ~RangeVendorCapability(); RangeVendorCapability& operator=(RangeVendorCapability&& other); @@ -94,8 +98,6 @@ std::string min_value_; std::string max_value_; std::string default_value_; - - DISALLOW_COPY_AND_ASSIGN(RangeVendorCapability); }; struct SelectVendorCapabilityOption { @@ -128,6 +130,11 @@ TypedValueVendorCapability(ValueType value_type, const std::string& default_value); TypedValueVendorCapability(TypedValueVendorCapability&& other); + + TypedValueVendorCapability(const TypedValueVendorCapability&) = delete; + TypedValueVendorCapability& operator=(const TypedValueVendorCapability&) = + delete; + ~TypedValueVendorCapability(); TypedValueVendorCapability& operator=(TypedValueVendorCapability&& other); @@ -144,8 +151,6 @@ private: ValueType value_type_; std::string default_value_; - - DISALLOW_COPY_AND_ASSIGN(TypedValueVendorCapability); }; class VendorCapability { @@ -168,6 +173,10 @@ const std::string& display_name, TypedValueVendorCapability typed_value_capability); VendorCapability(VendorCapability&& other); + + VendorCapability(const VendorCapability&) = delete; + VendorCapability& operator=(const VendorCapability&) = delete; + ~VendorCapability(); bool operator==(const VendorCapability& other) const; @@ -192,8 +201,6 @@ SelectVendorCapability select_capability_; TypedValueVendorCapability typed_value_capability_; }; - - DISALLOW_COPY_AND_ASSIGN(VendorCapability); }; enum class ColorType {
diff --git a/components/component_updater/android/background_task_update_scheduler.h b/components/component_updater/android/background_task_update_scheduler.h index a76cd7fe..bed3029 100644 --- a/components/component_updater/android/background_task_update_scheduler.h +++ b/components/component_updater/android/background_task_update_scheduler.h
@@ -23,6 +23,11 @@ static bool IsAvailable(); BackgroundTaskUpdateScheduler(); + + BackgroundTaskUpdateScheduler(const BackgroundTaskUpdateScheduler&) = delete; + BackgroundTaskUpdateScheduler& operator=( + const BackgroundTaskUpdateScheduler&) = delete; + ~BackgroundTaskUpdateScheduler() override; // UpdateScheduler: @@ -45,8 +50,6 @@ OnStopTaskCallback on_stop_; base::WeakPtrFactory<BackgroundTaskUpdateScheduler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BackgroundTaskUpdateScheduler); }; } // namespace component_updater
diff --git a/components/component_updater/component_updater_service_internal.h b/components/component_updater/component_updater_service_internal.h index 65f0174a..0e1cfa1 100644 --- a/components/component_updater/component_updater_service_internal.h +++ b/components/component_updater/component_updater_service_internal.h
@@ -41,6 +41,10 @@ CrxUpdateService(scoped_refptr<Configurator> config, std::unique_ptr<UpdateScheduler> scheduler, scoped_refptr<UpdateClient> update_client); + + CrxUpdateService(const CrxUpdateService&) = delete; + CrxUpdateService& operator=(const CrxUpdateService&) = delete; + ~CrxUpdateService() override; // Overrides for ComponentUpdateService. @@ -123,8 +127,6 @@ // for that media type. Only the most recently-registered component is // tracked. May include the IDs of un-registered components. std::map<std::string, std::string> component_ids_by_mime_type_; - - DISALLOW_COPY_AND_ASSIGN(CrxUpdateService); }; } // namespace component_updater
diff --git a/components/component_updater/configurator_impl.h b/components/component_updater/configurator_impl.h index 1b9e7fb..807b0cea 100644 --- a/components/component_updater/configurator_impl.h +++ b/components/component_updater/configurator_impl.h
@@ -32,6 +32,9 @@ ConfiguratorImpl(const update_client::CommandLineConfigPolicy& config_policy, bool require_encryption); + ConfiguratorImpl(const ConfiguratorImpl&) = delete; + ConfiguratorImpl& operator=(const ConfiguratorImpl&) = delete; + ~ConfiguratorImpl(); // Delay in seconds from calling Start() to the first update check. @@ -101,8 +104,6 @@ const bool require_encryption_; const GURL url_source_override_; const double initial_delay_; - - DISALLOW_COPY_AND_ASSIGN(ConfiguratorImpl); }; } // namespace component_updater
diff --git a/components/component_updater/configurator_impl_unittest.cc b/components/component_updater/configurator_impl_unittest.cc index e47fe7a..c22ebb0 100644 --- a/components/component_updater/configurator_impl_unittest.cc +++ b/components/component_updater/configurator_impl_unittest.cc
@@ -25,10 +25,13 @@ class ComponentUpdaterConfiguratorImplTest : public testing::Test { public: ComponentUpdaterConfiguratorImplTest() = default; - ~ComponentUpdaterConfiguratorImplTest() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(ComponentUpdaterConfiguratorImplTest); + ComponentUpdaterConfiguratorImplTest( + const ComponentUpdaterConfiguratorImplTest&) = delete; + ComponentUpdaterConfiguratorImplTest& operator=( + const ComponentUpdaterConfiguratorImplTest&) = delete; + + ~ComponentUpdaterConfiguratorImplTest() override = default; }; TEST_F(ComponentUpdaterConfiguratorImplTest, FastUpdate) {
diff --git a/components/component_updater/installer_policies/on_device_head_suggest_component_installer.h b/components/component_updater/installer_policies/on_device_head_suggest_component_installer.h index 35b3d9e9..c24163e 100644 --- a/components/component_updater/installer_policies/on_device_head_suggest_component_installer.h +++ b/components/component_updater/installer_policies/on_device_head_suggest_component_installer.h
@@ -23,6 +23,12 @@ class OnDeviceHeadSuggestInstallerPolicy : public ComponentInstallerPolicy { public: OnDeviceHeadSuggestInstallerPolicy(const std::string& locale); + + OnDeviceHeadSuggestInstallerPolicy( + const OnDeviceHeadSuggestInstallerPolicy&) = delete; + OnDeviceHeadSuggestInstallerPolicy& operator=( + const OnDeviceHeadSuggestInstallerPolicy&) = delete; + ~OnDeviceHeadSuggestInstallerPolicy() override; private: @@ -46,8 +52,6 @@ // The application (normalized) locale when this policy is created. Models // which do not match this locale will be rejected. std::string accept_locale_; - - DISALLOW_COPY_AND_ASSIGN(OnDeviceHeadSuggestInstallerPolicy); }; // Registers an OnDeviceHeadSuggest component with |cus|.
diff --git a/components/component_updater/installer_policies/optimization_hints_component_installer.h b/components/component_updater/installer_policies/optimization_hints_component_installer.h index fe8f4bfd..752f7e3 100644 --- a/components/component_updater/installer_policies/optimization_hints_component_installer.h +++ b/components/component_updater/installer_policies/optimization_hints_component_installer.h
@@ -28,6 +28,12 @@ static const char kManifestRulesetFormatKey[]; OptimizationHintsComponentInstallerPolicy(); + + OptimizationHintsComponentInstallerPolicy( + const OptimizationHintsComponentInstallerPolicy&) = delete; + OptimizationHintsComponentInstallerPolicy& operator=( + const OptimizationHintsComponentInstallerPolicy&) = delete; + ~OptimizationHintsComponentInstallerPolicy() override; private: @@ -51,8 +57,6 @@ update_client::InstallerAttributes GetInstallerAttributes() const override; const base::Version ruleset_format_version_; - - DISALLOW_COPY_AND_ASSIGN(OptimizationHintsComponentInstallerPolicy); }; void RegisterOptimizationHintsComponent(ComponentUpdateService* cus);
diff --git a/components/component_updater/installer_policies/optimization_hints_component_installer_unittest.cc b/components/component_updater/installer_policies/optimization_hints_component_installer_unittest.cc index 8a0a7f11..49f0463 100644 --- a/components/component_updater/installer_policies/optimization_hints_component_installer_unittest.cc +++ b/components/component_updater/installer_policies/optimization_hints_component_installer_unittest.cc
@@ -31,10 +31,13 @@ : public component_updater::MockComponentUpdateService { public: OptimizationHintsMockComponentUpdateService() = default; - ~OptimizationHintsMockComponentUpdateService() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(OptimizationHintsMockComponentUpdateService); + OptimizationHintsMockComponentUpdateService( + const OptimizationHintsMockComponentUpdateService&) = delete; + OptimizationHintsMockComponentUpdateService& operator=( + const OptimizationHintsMockComponentUpdateService&) = delete; + + ~OptimizationHintsMockComponentUpdateService() override = default; }; } // namespace @@ -44,6 +47,12 @@ class OptimizationHintsComponentInstallerTest : public PlatformTest { public: OptimizationHintsComponentInstallerTest() = default; + + OptimizationHintsComponentInstallerTest( + const OptimizationHintsComponentInstallerTest&) = delete; + OptimizationHintsComponentInstallerTest& operator=( + const OptimizationHintsComponentInstallerTest&) = delete; + ~OptimizationHintsComponentInstallerTest() override = default; void SetUp() override { @@ -94,8 +103,6 @@ base::ScopedTempDir component_install_dir_; std::unique_ptr<OptimizationHintsComponentInstallerPolicy> policy_; - - DISALLOW_COPY_AND_ASSIGN(OptimizationHintsComponentInstallerTest); }; TEST_F(OptimizationHintsComponentInstallerTest,
diff --git a/components/component_updater/installer_policies/safety_tips_component_installer.h b/components/component_updater/installer_policies/safety_tips_component_installer.h index ae8c5b4..0f92a9f 100644 --- a/components/component_updater/installer_policies/safety_tips_component_installer.h +++ b/components/component_updater/installer_policies/safety_tips_component_installer.h
@@ -21,6 +21,12 @@ class SafetyTipsComponentInstallerPolicy : public ComponentInstallerPolicy { public: SafetyTipsComponentInstallerPolicy(); + + SafetyTipsComponentInstallerPolicy( + const SafetyTipsComponentInstallerPolicy&) = delete; + SafetyTipsComponentInstallerPolicy& operator=( + const SafetyTipsComponentInstallerPolicy&) = delete; + ~SafetyTipsComponentInstallerPolicy() override; private: @@ -42,8 +48,6 @@ update_client::InstallerAttributes GetInstallerAttributes() const override; static base::FilePath GetInstalledPath(const base::FilePath& base); - - DISALLOW_COPY_AND_ASSIGN(SafetyTipsComponentInstallerPolicy); }; void RegisterSafetyTipsComponent(ComponentUpdateService* cus);
diff --git a/components/component_updater/timer.h b/components/component_updater/timer.h index 8d9a6009..d2cf86a7 100644 --- a/components/component_updater/timer.h +++ b/components/component_updater/timer.h
@@ -16,6 +16,10 @@ class Timer { public: Timer(); + + Timer(const Timer&) = delete; + Timer& operator=(const Timer&) = delete; + ~Timer(); void Start(base::TimeDelta initial_delay, @@ -33,8 +37,6 @@ base::TimeDelta delay_; base::RepeatingClosure user_task_; - - DISALLOW_COPY_AND_ASSIGN(Timer); }; } // namespace component_updater
diff --git a/components/component_updater/timer_update_scheduler.h b/components/component_updater/timer_update_scheduler.h index 3394572..2137aeb 100644 --- a/components/component_updater/timer_update_scheduler.h +++ b/components/component_updater/timer_update_scheduler.h
@@ -16,6 +16,10 @@ class TimerUpdateScheduler : public UpdateScheduler { public: TimerUpdateScheduler(); + + TimerUpdateScheduler(const TimerUpdateScheduler&) = delete; + TimerUpdateScheduler& operator=(const TimerUpdateScheduler&) = delete; + ~TimerUpdateScheduler() override; // UpdateScheduler: @@ -28,8 +32,6 @@ private: Timer timer_; base::RepeatingClosure user_task_; - - DISALLOW_COPY_AND_ASSIGN(TimerUpdateScheduler); }; } // namespace component_updater
diff --git a/components/consent_auditor/consent_auditor.h b/components/consent_auditor/consent_auditor.h index 59043f0..1f8a50a 100644 --- a/components/consent_auditor/consent_auditor.h +++ b/components/consent_auditor/consent_auditor.h
@@ -45,6 +45,10 @@ class ConsentAuditor : public KeyedService { public: ConsentAuditor() = default; + + ConsentAuditor(const ConsentAuditor&) = delete; + ConsentAuditor& operator=(const ConsentAuditor&) = delete; + ~ConsentAuditor() override = default; // Records the ARC Play |consent| for the signed-in GAIA account with the ID @@ -97,9 +101,6 @@ // Returns the underlying Sync integration point. virtual base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ConsentAuditor); }; } // namespace consent_auditor
diff --git a/components/consent_auditor/consent_auditor_impl.h b/components/consent_auditor/consent_auditor_impl.h index 4ce47a0..554b9ae 100644 --- a/components/consent_auditor/consent_auditor_impl.h +++ b/components/consent_auditor/consent_auditor_impl.h
@@ -26,6 +26,10 @@ const std::string& app_version, const std::string& app_locale, base::Clock* clock); + + ConsentAuditorImpl(const ConsentAuditorImpl&) = delete; + ConsentAuditorImpl& operator=(const ConsentAuditorImpl&) = delete; + ~ConsentAuditorImpl() override; // KeyedService (through ConsentAuditor) implementation. @@ -69,8 +73,6 @@ std::string app_version_; std::string app_locale_; base::Clock* clock_; - - DISALLOW_COPY_AND_ASSIGN(ConsentAuditorImpl); }; } // namespace consent_auditor
diff --git a/components/consent_auditor/consent_sync_bridge.h b/components/consent_auditor/consent_sync_bridge.h index 50e6de1..61448122 100644 --- a/components/consent_auditor/consent_sync_bridge.h +++ b/components/consent_auditor/consent_sync_bridge.h
@@ -22,6 +22,10 @@ class ConsentSyncBridge { public: ConsentSyncBridge() = default; + + ConsentSyncBridge(const ConsentSyncBridge&) = delete; + ConsentSyncBridge& operator=(const ConsentSyncBridge&) = delete; + virtual ~ConsentSyncBridge() = default; virtual void RecordConsent( @@ -30,9 +34,6 @@ // Returns the delegate for the controller, i.e. sync integration point. virtual base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ConsentSyncBridge); }; } // namespace consent_auditor
diff --git a/components/consent_auditor/consent_sync_bridge_impl.h b/components/consent_auditor/consent_sync_bridge_impl.h index 8e1f62c..ae4c672 100644 --- a/components/consent_auditor/consent_sync_bridge_impl.h +++ b/components/consent_auditor/consent_sync_bridge_impl.h
@@ -27,6 +27,10 @@ ConsentSyncBridgeImpl( syncer::OnceModelTypeStoreFactory store_factory, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + ConsentSyncBridgeImpl(const ConsentSyncBridgeImpl&) = delete; + ConsentSyncBridgeImpl& operator=(const ConsentSyncBridgeImpl&) = delete; + ~ConsentSyncBridgeImpl() override; // ModelTypeSyncBridge implementation. @@ -95,8 +99,6 @@ deferred_consents_while_initializing_; base::WeakPtrFactory<ConsentSyncBridgeImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ConsentSyncBridgeImpl); }; } // namespace consent_auditor
diff --git a/components/consent_auditor/fake_consent_auditor.h b/components/consent_auditor/fake_consent_auditor.h index 4b2385c..e1fce8a2 100644 --- a/components/consent_auditor/fake_consent_auditor.h +++ b/components/consent_auditor/fake_consent_auditor.h
@@ -19,6 +19,10 @@ class FakeConsentAuditor : public ConsentAuditor { public: FakeConsentAuditor(); + + FakeConsentAuditor(const FakeConsentAuditor&) = delete; + FakeConsentAuditor& operator=(const FakeConsentAuditor&) = delete; + ~FakeConsentAuditor() override; // ConsentAuditor implementation. @@ -95,8 +99,6 @@ std::vector<int> recorded_confirmation_ids_; std::vector<Feature> recorded_features_; std::vector<ConsentStatus> recorded_statuses_; - - DISALLOW_COPY_AND_ASSIGN(FakeConsentAuditor); }; MATCHER_P(ArcPlayConsentEq, expected_consent, "") {
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc index 0e01d5b..0a7cea9 100644 --- a/components/constrained_window/constrained_window_views.cc +++ b/components/constrained_window/constrained_window_views.cc
@@ -56,6 +56,11 @@ target_widget_->AddObserver(this); } + WidgetModalDialogHostObserverViews( + const WidgetModalDialogHostObserverViews&) = delete; + WidgetModalDialogHostObserverViews& operator=( + const WidgetModalDialogHostObserverViews&) = delete; + ~WidgetModalDialogHostObserverViews() override { if (host_) host_->RemoveObserver(this); @@ -81,8 +86,6 @@ ModalDialogHost* host_; views::Widget* target_widget_; const char* const native_window_property_; - - DISALLOW_COPY_AND_ASSIGN(WidgetModalDialogHostObserverViews); }; void UpdateModalDialogPosition(views::Widget* widget,
diff --git a/components/constrained_window/constrained_window_views_unittest.cc b/components/constrained_window/constrained_window_views_unittest.cc index 63c10ae..404d9a2 100644 --- a/components/constrained_window/constrained_window_views_unittest.cc +++ b/components/constrained_window/constrained_window_views_unittest.cc
@@ -72,6 +72,11 @@ class ConstrainedWindowViewsTest : public views::ViewsTestBase { public: ConstrainedWindowViewsTest() = default; + + ConstrainedWindowViewsTest(const ConstrainedWindowViewsTest&) = delete; + ConstrainedWindowViewsTest& operator=(const ConstrainedWindowViewsTest&) = + delete; + ~ConstrainedWindowViewsTest() override = default; void SetUp() override { @@ -124,8 +129,6 @@ views::View* contents_ = nullptr; std::unique_ptr<web_modal::TestWebContentsModalDialogHost> dialog_host_; Widget* dialog_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViewsTest); }; } // namespace
diff --git a/components/constrained_window/native_web_contents_modal_dialog_manager_views.h b/components/constrained_window/native_web_contents_modal_dialog_manager_views.h index 03eaacd..801fc0b 100644 --- a/components/constrained_window/native_web_contents_modal_dialog_manager_views.h +++ b/components/constrained_window/native_web_contents_modal_dialog_manager_views.h
@@ -29,6 +29,11 @@ gfx::NativeWindow dialog, web_modal::SingleWebContentsDialogManagerDelegate* native_delegate); + NativeWebContentsModalDialogManagerViews( + const NativeWebContentsModalDialogManagerViews&) = delete; + NativeWebContentsModalDialogManagerViews& operator=( + const NativeWebContentsModalDialogManagerViews&) = delete; + ~NativeWebContentsModalDialogManagerViews() override; // Sets up this object to manage the |dialog_|. Registers for closing events @@ -78,8 +83,6 @@ bool host_destroying_ = false; std::set<views::Widget*> observed_widgets_; std::set<views::Widget*> shown_widgets_; - - DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViews); }; } // namespace constrained_window
diff --git a/components/content_capture/browser/content_capture_receiver.h b/components/content_capture/browser/content_capture_receiver.h index 914fe90..ac90668 100644 --- a/components/content_capture/browser/content_capture_receiver.h +++ b/components/content_capture/browser/content_capture_receiver.h
@@ -30,6 +30,10 @@ public: static int64_t GetIdFrom(content::RenderFrameHost* rfh); explicit ContentCaptureReceiver(content::RenderFrameHost* rfh); + + ContentCaptureReceiver(const ContentCaptureReceiver&) = delete; + ContentCaptureReceiver& operator=(const ContentCaptureReceiver&) = delete; + ~ContentCaptureReceiver() override; // Binds to mojom. @@ -110,7 +114,6 @@ static bool disable_get_favicon_from_web_contents_for_testing_; mojo::AssociatedRemote<mojom::ContentCaptureSender> content_capture_sender_; - DISALLOW_COPY_AND_ASSIGN(ContentCaptureReceiver); }; } // namespace content_capture
diff --git a/components/content_capture/renderer/content_capture_sender.h b/components/content_capture/renderer/content_capture_sender.h index 5f5ddc3..2430bcd 100644 --- a/components/content_capture/renderer/content_capture_sender.h +++ b/components/content_capture/renderer/content_capture_sender.h
@@ -31,6 +31,10 @@ public: explicit ContentCaptureSender(content::RenderFrame* render_frame, blink::AssociatedInterfaceRegistry* registry); + + ContentCaptureSender(const ContentCaptureSender&) = delete; + ContentCaptureSender& operator=(const ContentCaptureSender&) = delete; + ~ContentCaptureSender() override; void BindPendingReceiver( @@ -63,8 +67,6 @@ mojo::AssociatedRemote<mojom::ContentCaptureReceiver> content_capture_receiver_; mojo::AssociatedReceiver<mojom::ContentCaptureSender> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(ContentCaptureSender); }; } // namespace content_capture
diff --git a/components/content_settings/android/cookie_controls_bridge.h b/components/content_settings/android/cookie_controls_bridge.h index 62e0a3a..c36e9505 100644 --- a/components/content_settings/android/cookie_controls_bridge.h +++ b/components/content_settings/android/cookie_controls_bridge.h
@@ -27,6 +27,9 @@ const base::android::JavaParamRef<jobject>& joriginal_browser_context_handle); + CookieControlsBridge(const CookieControlsBridge&) = delete; + CookieControlsBridge& operator=(const CookieControlsBridge&) = delete; + ~CookieControlsBridge() override; // Called by the Java counterpart when it is getting garbage collected. @@ -54,8 +57,6 @@ std::unique_ptr<CookieControlsController> controller_; base::ScopedObservation<CookieControlsController, CookieControlsView> observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(CookieControlsBridge); }; } // namespace content_settings
diff --git a/components/content_settings/browser/page_specific_content_settings.h b/components/content_settings/browser/page_specific_content_settings.h index e219bdbe..2ad6571 100644 --- a/components/content_settings/browser/page_specific_content_settings.h +++ b/components/content_settings/browser/page_specific_content_settings.h
@@ -172,6 +172,10 @@ class SiteDataObserver { public: explicit SiteDataObserver(content::WebContents* web_contents); + + SiteDataObserver(const SiteDataObserver&) = delete; + SiteDataObserver& operator=(const SiteDataObserver&) = delete; + virtual ~SiteDataObserver(); // Called whenever site data is accessed. @@ -185,8 +189,6 @@ private: content::WebContents* web_contents_; - - DISALLOW_COPY_AND_ASSIGN(SiteDataObserver); }; ~PageSpecificContentSettings() override;
diff --git a/components/content_settings/browser/page_specific_content_settings_unittest.cc b/components/content_settings/browser/page_specific_content_settings_unittest.cc index a34cace5..a5cd15d3 100644 --- a/components/content_settings/browser/page_specific_content_settings_unittest.cc +++ b/components/content_settings/browser/page_specific_content_settings_unittest.cc
@@ -38,12 +38,12 @@ explicit MockSiteDataObserver(content::WebContents* web_contents) : SiteDataObserver(web_contents) {} + MockSiteDataObserver(const MockSiteDataObserver&) = delete; + MockSiteDataObserver& operator=(const MockSiteDataObserver&) = delete; + ~MockSiteDataObserver() override = default; MOCK_METHOD0(OnSiteDataAccessed, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSiteDataObserver); }; class MockPageSpecificContentSettingsDelegate
diff --git a/components/content_settings/core/browser/content_settings_default_provider.h b/components/content_settings/core/browser/content_settings_default_provider.h index 8c66a93..1485e6cd 100644 --- a/components/content_settings/core/browser/content_settings_default_provider.h +++ b/components/content_settings/core/browser/content_settings_default_provider.h
@@ -30,6 +30,10 @@ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); DefaultProvider(PrefService* prefs, bool off_the_record); + + DefaultProvider(const DefaultProvider&) = delete; + DefaultProvider& operator=(const DefaultProvider&) = delete; + ~DefaultProvider() override; // ProviderInterface implementations. @@ -90,8 +94,6 @@ // Whether we are currently updating preferences, this is used to ignore // notifications from the preferences service that we triggered ourself. bool updating_preferences_; - - DISALLOW_COPY_AND_ASSIGN(DefaultProvider); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_global_value_map.h b/components/content_settings/core/browser/content_settings_global_value_map.h index 816e0e5..0a12675 100644 --- a/components/content_settings/core/browser/content_settings_global_value_map.h +++ b/components/content_settings/core/browser/content_settings_global_value_map.h
@@ -22,6 +22,10 @@ class GlobalValueMap { public: GlobalValueMap(); + + GlobalValueMap(const GlobalValueMap&) = delete; + GlobalValueMap& operator=(const GlobalValueMap&) = delete; + ~GlobalValueMap(); // Returns nullptr to indicate the RuleIterator is empty. @@ -33,8 +37,6 @@ private: std::map<ContentSettingsType, ContentSetting> settings_; - - DISALLOW_COPY_AND_ASSIGN(GlobalValueMap); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_info.h b/components/content_settings/core/browser/content_settings_info.h index ab59abe..5947877 100644 --- a/components/content_settings/core/browser/content_settings_info.h +++ b/components/content_settings/core/browser/content_settings_info.h
@@ -53,6 +53,10 @@ IncognitoBehavior incognito_behavior, StorageBehavior storage_behavior, OriginRestriction origin_restriction); + + ContentSettingsInfo(const ContentSettingsInfo&) = delete; + ContentSettingsInfo& operator=(const ContentSettingsInfo&) = delete; + ~ContentSettingsInfo(); const WebsiteSettingsInfo* website_settings_info() const { @@ -79,8 +83,6 @@ const IncognitoBehavior incognito_behavior_; const StorageBehavior storage_behavior_; const OriginRestriction origin_restriction_; - - DISALLOW_COPY_AND_ASSIGN(ContentSettingsInfo); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_origin_identifier_value_map.h b/components/content_settings/core/browser/content_settings_origin_identifier_value_map.h index 0aa7660f..47853dc 100644 --- a/components/content_settings/core/browser/content_settings_origin_identifier_value_map.h +++ b/components/content_settings/core/browser/content_settings_origin_identifier_value_map.h
@@ -85,6 +85,10 @@ base::Lock* lock) const; OriginIdentifierValueMap(); + + OriginIdentifierValueMap(const OriginIdentifierValueMap&) = delete; + OriginIdentifierValueMap& operator=(const OriginIdentifierValueMap&) = delete; + ~OriginIdentifierValueMap(); // Returns a weak pointer to the value for the given |primary_pattern|, @@ -124,8 +128,6 @@ private: EntryMap entries_; - - DISALLOW_COPY_AND_ASSIGN(OriginIdentifierValueMap); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_policy_provider.h b/components/content_settings/core/browser/content_settings_policy_provider.h index aca2850..a82df1a5 100644 --- a/components/content_settings/core/browser/content_settings_policy_provider.h +++ b/components/content_settings/core/browser/content_settings_policy_provider.h
@@ -26,6 +26,10 @@ class PolicyProvider : public ObservableProvider { public: explicit PolicyProvider(PrefService* prefs); + + PolicyProvider(const PolicyProvider&) = delete; + PolicyProvider& operator=(const PolicyProvider&) = delete; + ~PolicyProvider() override; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); @@ -77,8 +81,6 @@ // Used around accesses to the |value_map_| object to guarantee // thread safety. mutable base::Lock lock_; - - DISALLOW_COPY_AND_ASSIGN(PolicyProvider); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_pref.h b/components/content_settings/core/browser/content_settings_pref.h index 60e8c5e..31ac49a 100644 --- a/components/content_settings/core/browser/content_settings_pref.h +++ b/components/content_settings/core/browser/content_settings_pref.h
@@ -42,6 +42,10 @@ bool off_the_record, bool restore_session, NotifyObserversCallback notify_callback); + + ContentSettingsPref(const ContentSettingsPref&) = delete; + ContentSettingsPref& operator=(const ContentSettingsPref&) = delete; + ~ContentSettingsPref(); // Returns nullptr to indicate the RuleIterator is empty. @@ -121,8 +125,6 @@ mutable base::Lock lock_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(ContentSettingsPref); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/content_settings_pref_provider.h b/components/content_settings/core/browser/content_settings_pref_provider.h index c1c888d..7981f8c5 100644 --- a/components/content_settings/core/browser/content_settings_pref_provider.h +++ b/components/content_settings/core/browser/content_settings_pref_provider.h
@@ -39,6 +39,10 @@ bool off_the_record, bool store_last_modified, bool restore_session); + + PrefProvider(const PrefProvider&) = delete; + PrefProvider& operator=(const PrefProvider&) = delete; + ~PrefProvider() override; // UserModifiableProvider implementations. @@ -93,8 +97,6 @@ base::ThreadChecker thread_checker_; base::Clock* clock_; - - DISALLOW_COPY_AND_ASSIGN(PrefProvider); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/cookie_settings_policy_handler.h b/components/content_settings/core/browser/cookie_settings_policy_handler.h index d391c28e..a1c4b43 100644 --- a/components/content_settings/core/browser/cookie_settings_policy_handler.h +++ b/components/content_settings/core/browser/cookie_settings_policy_handler.h
@@ -17,14 +17,16 @@ class CookieSettingsPolicyHandler : public policy::TypeCheckingPolicyHandler { public: CookieSettingsPolicyHandler(); + + CookieSettingsPolicyHandler(const CookieSettingsPolicyHandler&) = delete; + CookieSettingsPolicyHandler& operator=(const CookieSettingsPolicyHandler&) = + delete; + ~CookieSettingsPolicyHandler() override; // TypeCheckingPolicyHandler: void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; - - private: - DISALLOW_COPY_AND_ASSIGN(CookieSettingsPolicyHandler); }; } // namespace content_settings
diff --git a/components/content_settings/core/browser/website_settings_info.h b/components/content_settings/core/browser/website_settings_info.h index 981db04..f809add6 100644 --- a/components/content_settings/core/browser/website_settings_info.h +++ b/components/content_settings/core/browser/website_settings_info.h
@@ -74,6 +74,10 @@ LossyStatus lossy_status, ScopingType scoping_type, IncognitoBehavior incognito_behavior); + + WebsiteSettingsInfo(const WebsiteSettingsInfo&) = delete; + WebsiteSettingsInfo& operator=(const WebsiteSettingsInfo&) = delete; + ~WebsiteSettingsInfo(); ContentSettingsType type() const { return type_; } @@ -105,8 +109,6 @@ const LossyStatus lossy_status_; const ScopingType scoping_type_; const IncognitoBehavior incognito_behavior_; - - DISALLOW_COPY_AND_ASSIGN(WebsiteSettingsInfo); }; } // namespace content_settings
diff --git a/components/content_settings/core/common/content_settings_pattern.cc b/components/content_settings/core/common/content_settings_pattern.cc index 07142d8..96b39ee 100644 --- a/components/content_settings/core/common/content_settings_pattern.cc +++ b/components/content_settings/core/common/content_settings_pattern.cc
@@ -126,6 +126,10 @@ public ContentSettingsPattern::BuilderInterface { public: Builder(); + + Builder(const Builder&) = delete; + Builder& operator=(const Builder&) = delete; + ~Builder() override; // BuilderInterface: @@ -152,8 +156,6 @@ bool is_valid_; PatternParts parts_; - - DISALLOW_COPY_AND_ASSIGN(Builder); }; ContentSettingsPattern::Builder::Builder() : is_valid_(true) {}
diff --git a/components/content_settings/core/common/cookie_settings_base.h b/components/content_settings/core/common/cookie_settings_base.h index 3843fd1..0178669 100644 --- a/components/content_settings/core/common/cookie_settings_base.h +++ b/components/content_settings/core/common/cookie_settings_base.h
@@ -67,6 +67,10 @@ class CookieSettingsBase { public: CookieSettingsBase() = default; + + CookieSettingsBase(const CookieSettingsBase&) = delete; + CookieSettingsBase& operator=(const CookieSettingsBase&) = delete; + virtual ~CookieSettingsBase() = default; // Returns true if the cookie associated with |domain| should be deleted @@ -191,8 +195,6 @@ const GURL& first_party_url, bool is_third_party_request, content_settings::SettingSource* source) const = 0; - - DISALLOW_COPY_AND_ASSIGN(CookieSettingsBase); }; } // namespace content_settings
diff --git a/components/content_settings/core/test/content_settings_mock_provider.h b/components/content_settings/core/test/content_settings_mock_provider.h index d8ec282..4a7e90a5 100644 --- a/components/content_settings/core/test/content_settings_mock_provider.h +++ b/components/content_settings/core/test/content_settings_mock_provider.h
@@ -19,6 +19,10 @@ public: MockProvider(); explicit MockProvider(bool read_only); + + MockProvider(const MockProvider&) = delete; + MockProvider& operator=(const MockProvider&) = delete; + ~MockProvider() override; std::unique_ptr<RuleIterator> GetRuleIterator( @@ -44,8 +48,6 @@ private: OriginIdentifierValueMap value_map_; bool read_only_; - - DISALLOW_COPY_AND_ASSIGN(MockProvider); }; } // namespace content_settings
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h index 6073817..e618979c 100644 --- a/components/content_settings/renderer/content_settings_agent_impl.h +++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -63,6 +63,10 @@ ContentSettingsAgentImpl(content::RenderFrame* render_frame, bool should_allowlist, std::unique_ptr<Delegate> delegate); + + ContentSettingsAgentImpl(const ContentSettingsAgentImpl&) = delete; + ContentSettingsAgentImpl& operator=(const ContentSettingsAgentImpl&) = delete; + ~ContentSettingsAgentImpl() override; // Sets the content setting rules which back `allowImage()`, `allowScript()`, @@ -181,8 +185,6 @@ std::unique_ptr<Delegate> delegate_; mojo::AssociatedReceiverSet<mojom::ContentSettingsAgent> receivers_; - - DISALLOW_COPY_AND_ASSIGN(ContentSettingsAgentImpl); }; } // namespace content_settings
diff --git a/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc b/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc index cb93a33..11e1d076 100644 --- a/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc +++ b/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc
@@ -95,6 +95,11 @@ class MockContentSettingsAgentImpl : public ContentSettingsAgentImpl { public: MockContentSettingsAgentImpl(content::RenderFrame* render_frame); + + MockContentSettingsAgentImpl(const MockContentSettingsAgentImpl&) = delete; + MockContentSettingsAgentImpl& operator=(const MockContentSettingsAgentImpl&) = + delete; + ~MockContentSettingsAgentImpl() override {} const GURL& image_url() const { return image_url_; } @@ -116,8 +121,6 @@ MockContentSettingsManagerImpl::Log log_; const GURL image_url_; const std::string image_origin_; - - DISALLOW_COPY_AND_ASSIGN(MockContentSettingsAgentImpl); }; MockContentSettingsAgentImpl::MockContentSettingsAgentImpl(
diff --git a/components/contextual_search/content/browser/contextual_search_js_api_handler.h b/components/contextual_search/content/browser/contextual_search_js_api_handler.h index 69850c5..ab0b5910 100644 --- a/components/contextual_search/content/browser/contextual_search_js_api_handler.h +++ b/components/contextual_search/content/browser/contextual_search_js_api_handler.h
@@ -17,6 +17,11 @@ class ContextualSearchJsApiHandler { public: ContextualSearchJsApiHandler() {} + + ContextualSearchJsApiHandler(const ContextualSearchJsApiHandler&) = delete; + ContextualSearchJsApiHandler& operator=(const ContextualSearchJsApiHandler&) = + delete; + virtual ~ContextualSearchJsApiHandler() {} // Enabling API, determines if the JS API should be enabled for the given URL. @@ -38,9 +43,6 @@ // The panel cannot be set to any opened position if it's not already opened. virtual void ChangeOverlayPosition( mojom::OverlayPosition desired_position) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ContextualSearchJsApiHandler); }; } // namespace contextual_search
diff --git a/components/contextual_search/content/browser/contextual_search_js_api_service_impl.h b/components/contextual_search/content/browser/contextual_search_js_api_service_impl.h index b9c965c9..30549611 100644 --- a/components/contextual_search/content/browser/contextual_search_js_api_service_impl.h +++ b/components/contextual_search/content/browser/contextual_search_js_api_service_impl.h
@@ -19,6 +19,12 @@ public: explicit ContextualSearchJsApiServiceImpl( ContextualSearchJsApiHandler* contextual_search_js_api_handler); + + ContextualSearchJsApiServiceImpl(const ContextualSearchJsApiServiceImpl&) = + delete; + ContextualSearchJsApiServiceImpl& operator=( + const ContextualSearchJsApiServiceImpl&) = delete; + ~ContextualSearchJsApiServiceImpl() override; // Mojo ContextualSearchApiService implementation. @@ -42,8 +48,6 @@ private: // The UI handler for calls through the JavaScript API. ContextualSearchJsApiHandler* contextual_search_js_api_handler_; - - DISALLOW_COPY_AND_ASSIGN(ContextualSearchJsApiServiceImpl); }; // static
diff --git a/components/contextual_search/content/renderer/overlay_js_render_frame_observer.h b/components/contextual_search/content/renderer/overlay_js_render_frame_observer.h index a6046c3..e760bab 100644 --- a/components/contextual_search/content/renderer/overlay_js_render_frame_observer.h +++ b/components/contextual_search/content/renderer/overlay_js_render_frame_observer.h
@@ -25,6 +25,11 @@ public: OverlayJsRenderFrameObserver(content::RenderFrame* render_frame, service_manager::BinderRegistry* registry); + + OverlayJsRenderFrameObserver(const OverlayJsRenderFrameObserver&) = delete; + OverlayJsRenderFrameObserver& operator=(const OverlayJsRenderFrameObserver&) = + delete; + ~OverlayJsRenderFrameObserver() override; // RenderFrameObserver implementation. @@ -52,8 +57,6 @@ bool did_start_enabling_js_api_ = false; base::WeakPtrFactory<OverlayJsRenderFrameObserver> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OverlayJsRenderFrameObserver); }; } // namespace contextual_search
diff --git a/components/contextual_search/core/browser/ctr_aggregator.h b/components/contextual_search/core/browser/ctr_aggregator.h index 96baddf..7c97d61b 100644 --- a/components/contextual_search/core/browser/ctr_aggregator.h +++ b/components/contextual_search/core/browser/ctr_aggregator.h
@@ -37,6 +37,10 @@ // so the |storage| must be fully initialized when this constructor is // called. CtrAggregator(WeeklyActivityStorage& storage); + + CtrAggregator(const CtrAggregator&) = delete; + CtrAggregator& operator=(const CtrAggregator&) = delete; + ~CtrAggregator(); // Records an impression. Records a click if |did_click| is true. @@ -107,8 +111,6 @@ // The current week number, expressed as the number of weeks since Epoch. int week_number_; - - DISALLOW_COPY_AND_ASSIGN(CtrAggregator); }; } // namespace contextual_search
diff --git a/components/contextual_search/core/browser/ctr_aggregator_unittest.cc b/components/contextual_search/core/browser/ctr_aggregator_unittest.cc index f0b3cbdb..3a3f3d5 100644 --- a/components/contextual_search/core/browser/ctr_aggregator_unittest.cc +++ b/components/contextual_search/core/browser/ctr_aggregator_unittest.cc
@@ -22,6 +22,10 @@ class CtrAggregatorTest : public testing::Test { public: CtrAggregatorTest() {} + + CtrAggregatorTest(const CtrAggregatorTest&) = delete; + CtrAggregatorTest& operator=(const CtrAggregatorTest&) = delete; + ~CtrAggregatorTest() override {} class WeeklyActivityStorageStub : public WeeklyActivityStorage { @@ -61,9 +65,6 @@ } void TearDown() override {} - - private: - DISALLOW_COPY_AND_ASSIGN(CtrAggregatorTest); }; CtrAggregatorTest::WeeklyActivityStorageStub::WeeklyActivityStorageStub()
diff --git a/components/contextual_search/core/browser/weekly_activity_storage.h b/components/contextual_search/core/browser/weekly_activity_storage.h index 35abb7b..04ca2a4 100644 --- a/components/contextual_search/core/browser/weekly_activity_storage.h +++ b/components/contextual_search/core/browser/weekly_activity_storage.h
@@ -21,6 +21,10 @@ // Constructs an instance that will manage at least |weeks_needed| weeks of // data. WeeklyActivityStorage(int weeks_needed); + + WeeklyActivityStorage(const WeeklyActivityStorage&) = delete; + WeeklyActivityStorage& operator=(const WeeklyActivityStorage&) = delete; + virtual ~WeeklyActivityStorage(); // Advances the accessible storage range to end at the given |week_number|. @@ -67,8 +71,6 @@ // The number of weeks of data that this instance needs to support. int weeks_needed_; - - DISALLOW_COPY_AND_ASSIGN(WeeklyActivityStorage); }; } // namespace contextual_search
diff --git a/components/crash/content/browser/child_process_crash_observer_android.h b/components/crash/content/browser/child_process_crash_observer_android.h index a401459..e8bb9f6 100644 --- a/components/crash/content/browser/child_process_crash_observer_android.h +++ b/components/crash/content/browser/child_process_crash_observer_android.h
@@ -18,6 +18,11 @@ : public crash_reporter::ChildExitObserver::Client { public: ChildProcessCrashObserver(); + + ChildProcessCrashObserver(const ChildProcessCrashObserver&) = delete; + ChildProcessCrashObserver& operator=(const ChildProcessCrashObserver&) = + delete; + ~ChildProcessCrashObserver() override; // crash_reporter::ChildExitObserver::Client implementation: @@ -27,8 +32,6 @@ void OnChildExitImpl(const ChildExitObserver::TerminationInfo& info); scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(ChildProcessCrashObserver); }; } // namespace crash_reporter
diff --git a/components/crash/content/browser/crash_handler_host_linux.h b/components/crash/content/browser/crash_handler_host_linux.h index 7728a1f..f26a6b19 100644 --- a/components/crash/content/browser/crash_handler_host_linux.h +++ b/components/crash/content/browser/crash_handler_host_linux.h
@@ -50,6 +50,10 @@ CrashHandlerHostLinux(const std::string& process_type, const base::FilePath& dumps_path, bool upload); + + CrashHandlerHostLinux(const CrashHandlerHostLinux&) = delete; + CrashHandlerHostLinux& operator=(const CrashHandlerHostLinux&) = delete; + ~CrashHandlerHostLinux() override; // Starts the uploader thread. Must be called immediately after creating the @@ -112,8 +116,6 @@ base::AtomicFlag shutting_down_; scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(CrashHandlerHostLinux); }; } // namespace breakpad
diff --git a/components/crash/content/browser/crash_memory_metrics_collector_android.h b/components/crash/content/browser/crash_memory_metrics_collector_android.h index 68604345..76f4070 100644 --- a/components/crash/content/browser/crash_memory_metrics_collector_android.h +++ b/components/crash/content/browser/crash_memory_metrics_collector_android.h
@@ -20,6 +20,11 @@ class CrashMemoryMetricsCollector : public base::SupportsUserData::Data { public: explicit CrashMemoryMetricsCollector(content::RenderProcessHost* host); + + CrashMemoryMetricsCollector(const CrashMemoryMetricsCollector&) = delete; + CrashMemoryMetricsCollector& operator=(const CrashMemoryMetricsCollector&) = + delete; + ~CrashMemoryMetricsCollector() override; // Key used to attach the handler to the RenderProcessHost. @@ -33,8 +38,6 @@ private: base::WritableSharedMemoryMapping metrics_mapping_; - - DISALLOW_COPY_AND_ASSIGN(CrashMemoryMetricsCollector); }; #endif // COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_MEMORY_METRICS_COLLECTOR_ANDROID_H_
diff --git a/components/crash/content/browser/crash_metrics_reporter_android_unittest.cc b/components/crash/content/browser/crash_metrics_reporter_android_unittest.cc index faf6c68a..7a17693 100644 --- a/components/crash/content/browser/crash_metrics_reporter_android_unittest.cc +++ b/components/crash/content/browser/crash_metrics_reporter_android_unittest.cc
@@ -19,6 +19,11 @@ class CrashMetricsReporterObserver : public CrashMetricsReporter::Observer { public: CrashMetricsReporterObserver() {} + + CrashMetricsReporterObserver(const CrashMetricsReporterObserver&) = delete; + CrashMetricsReporterObserver& operator=(const CrashMetricsReporterObserver&) = + delete; + ~CrashMetricsReporterObserver() {} // CrashMetricsReporter::Observer: @@ -39,13 +44,16 @@ private: base::RunLoop wait_run_loop_; CrashMetricsReporter::ReportedCrashTypeSet recorded_crash_types_; - DISALLOW_COPY_AND_ASSIGN(CrashMetricsReporterObserver); }; class CrashMetricsReporterTest : public testing::Test { public: CrashMetricsReporterTest() : scoped_environment_(base::test::TaskEnvironment::MainThreadType::UI) {} + + CrashMetricsReporterTest(const CrashMetricsReporterTest&) = delete; + CrashMetricsReporterTest& operator=(const CrashMetricsReporterTest&) = delete; + ~CrashMetricsReporterTest() override {} protected: @@ -83,7 +91,6 @@ private: base::test::TaskEnvironment scoped_environment_; - DISALLOW_COPY_AND_ASSIGN(CrashMetricsReporterTest); }; TEST_F(CrashMetricsReporterTest, RendereMainFrameOOM) {
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc index 00009da..bde8e59 100644 --- a/components/crash/core/app/breakpad_linux.cc +++ b/components/crash/core/app/breakpad_linux.cc
@@ -313,6 +313,10 @@ static const size_t kMaxCrashChunkSize = 64; MimeWriter(int fd, const char* const mime_boundary); + + MimeWriter(const MimeWriter&) = delete; + MimeWriter& operator=(const MimeWriter&) = delete; + ~MimeWriter(); // Append boundary. @@ -369,9 +373,6 @@ int fd_; const char* const mime_boundary_; - - private: - DISALLOW_COPY_AND_ASSIGN(MimeWriter); }; MimeWriter::MimeWriter(int fd, const char* const mime_boundary) @@ -1028,6 +1029,9 @@ : server_fd_( base::GlobalDescriptors::GetInstance()->Get(kCrashDumpSignal)) {} + NonBrowserCrashHandler(const NonBrowserCrashHandler&) = delete; + NonBrowserCrashHandler& operator=(const NonBrowserCrashHandler&) = delete; + ~NonBrowserCrashHandler() override {} bool RequestDump(const void* crash_context, @@ -1115,8 +1119,6 @@ private: // The pipe FD to the browser process, which will handle the crash dumping. const int server_fd_; - - DISALLOW_COPY_AND_ASSIGN(NonBrowserCrashHandler); }; void EnableNonBrowserCrashDumping() {
diff --git a/components/crash/core/app/fallback_crash_handler_launcher_win.h b/components/crash/core/app/fallback_crash_handler_launcher_win.h index 080f8fc..8f920af 100644 --- a/components/crash/core/app/fallback_crash_handler_launcher_win.h +++ b/components/crash/core/app/fallback_crash_handler_launcher_win.h
@@ -25,6 +25,11 @@ class FallbackCrashHandlerLauncher { public: FallbackCrashHandlerLauncher(); + + FallbackCrashHandlerLauncher(const FallbackCrashHandlerLauncher&) = delete; + FallbackCrashHandlerLauncher& operator=(const FallbackCrashHandlerLauncher&) = + delete; + ~FallbackCrashHandlerLauncher(); // Initializes everything that's needed in LaunchAndWaitForHandler. @@ -59,8 +64,6 @@ // An inheritable handle to our own process, the raw handle is necessary // for pre-computing the startup info. base::win::ScopedHandle self_process_handle_; - - DISALLOW_COPY_AND_ASSIGN(FallbackCrashHandlerLauncher); }; } // namespace crash_reporter
diff --git a/components/crash/core/app/fallback_crash_handler_win.h b/components/crash/core/app/fallback_crash_handler_win.h index e9ac6ca..280f4595 100644 --- a/components/crash/core/app/fallback_crash_handler_win.h +++ b/components/crash/core/app/fallback_crash_handler_win.h
@@ -21,6 +21,10 @@ class FallbackCrashHandler { public: FallbackCrashHandler(); + + FallbackCrashHandler(const FallbackCrashHandler&) = delete; + FallbackCrashHandler& operator=(const FallbackCrashHandler&) = delete; + ~FallbackCrashHandler(); // Parses |cmd_line| for the following arguments: @@ -53,8 +57,6 @@ // This is a pointer in process_, which is hopefully not this process. uintptr_t exception_ptrs_; base::FilePath database_dir_; - - DISALLOW_COPY_AND_ASSIGN(FallbackCrashHandler); }; } // namespace crash_reporter
diff --git a/components/crash/core/common/crash_key.h b/components/crash/core/common/crash_key.h index 9d193ea..75ca4dd 100644 --- a/components/crash/core/common/crash_key.h +++ b/components/crash/core/common/crash_key.h
@@ -254,11 +254,13 @@ crash_key->Set(value); } + ScopedCrashKeyString(const ScopedCrashKeyString&) = delete; + ScopedCrashKeyString& operator=(const ScopedCrashKeyString&) = delete; + ~ScopedCrashKeyString() { crash_key_->Clear(); } private: CrashKeyType* const crash_key_; - DISALLOW_COPY_AND_ASSIGN(ScopedCrashKeyString); }; namespace internal {
diff --git a/components/crash/core/common/crash_key_base_support.cc b/components/crash/core/common/crash_key_base_support.cc index 4202d76..8aa5c66 100644 --- a/components/crash/core/common/crash_key_base_support.cc +++ b/components/crash/core/common/crash_key_base_support.cc
@@ -47,6 +47,9 @@ public: CrashKeyBaseSupport() = default; + CrashKeyBaseSupport(const CrashKeyBaseSupport&) = delete; + CrashKeyBaseSupport& operator=(const CrashKeyBaseSupport&) = delete; + ~CrashKeyBaseSupport() override = default; base::debug::CrashKeyString* Allocate( @@ -96,9 +99,6 @@ } #endif } - - private: - DISALLOW_COPY_AND_ASSIGN(CrashKeyBaseSupport); }; #undef SIZE_CLASS_OPERATION
diff --git a/components/crash/core/common/crash_keys.h b/components/crash/core/common/crash_keys.h index 3934be3..cc21d04 100644 --- a/components/crash/core/common/crash_keys.h +++ b/components/crash/core/common/crash_keys.h
@@ -42,10 +42,11 @@ class ScopedPrinterInfo { public: explicit ScopedPrinterInfo(base::StringPiece data); - ~ScopedPrinterInfo(); - private: - DISALLOW_COPY_AND_ASSIGN(ScopedPrinterInfo); + ScopedPrinterInfo(const ScopedPrinterInfo&) = delete; + ScopedPrinterInfo& operator=(const ScopedPrinterInfo&) = delete; + + ~ScopedPrinterInfo(); }; } // namespace crash_keys
diff --git a/components/cronet/android/cronet_bidirectional_stream_adapter.h b/components/cronet/android/cronet_bidirectional_stream_adapter.h index 7934fb2..def97f5 100644 --- a/components/cronet/android/cronet_bidirectional_stream_adapter.h +++ b/components/cronet/android/cronet_bidirectional_stream_adapter.h
@@ -75,6 +75,12 @@ int32_t traffic_stats_tag, bool traffic_stats_uid_set, int32_t traffic_stats_uid); + + CronetBidirectionalStreamAdapter(const CronetBidirectionalStreamAdapter&) = + delete; + CronetBidirectionalStreamAdapter& operator=( + const CronetBidirectionalStreamAdapter&) = delete; + ~CronetBidirectionalStreamAdapter() override; // Validates method and headers, initializes and starts the request. If @@ -182,8 +188,6 @@ // Whether BidirectionalStream::Delegate::OnFailed callback is invoked. bool stream_failed_; - - DISALLOW_COPY_AND_ASSIGN(CronetBidirectionalStreamAdapter); }; } // namespace cronet
diff --git a/components/cronet/android/cronet_upload_data_stream_adapter.h b/components/cronet/android/cronet_upload_data_stream_adapter.h index 4f60696..96d786be 100644 --- a/components/cronet/android/cronet_upload_data_stream_adapter.h +++ b/components/cronet/android/cronet_upload_data_stream_adapter.h
@@ -36,6 +36,11 @@ class CronetUploadDataStreamAdapter : public CronetUploadDataStream::Delegate { public: CronetUploadDataStreamAdapter(JNIEnv* env, jobject jupload_data_stream); + + CronetUploadDataStreamAdapter(const CronetUploadDataStreamAdapter&) = delete; + CronetUploadDataStreamAdapter& operator=( + const CronetUploadDataStreamAdapter&) = delete; + ~CronetUploadDataStreamAdapter() override; // CronetUploadDataStream::Delegate implementation. Called on network thread. @@ -68,8 +73,6 @@ // Keeps the net::IOBuffer and Java ByteBuffer alive until the next Read(). std::unique_ptr<ByteBufferWithIOBuffer> buffer_; - - DISALLOW_COPY_AND_ASSIGN(CronetUploadDataStreamAdapter); }; } // namespace cronet
diff --git a/components/cronet/android/cronet_url_request_adapter.h b/components/cronet/android/cronet_url_request_adapter.h index eef19328..78cc400 100644 --- a/components/cronet/android/cronet_url_request_adapter.h +++ b/components/cronet/android/cronet_url_request_adapter.h
@@ -56,6 +56,10 @@ jboolean jtraffic_stats_uid_set, jint jtraffic_stats_uid, net::Idempotency idempotency); + + CronetURLRequestAdapter(const CronetURLRequestAdapter&) = delete; + CronetURLRequestAdapter& operator=(const CronetURLRequestAdapter&) = delete; + ~CronetURLRequestAdapter() override; // Methods called prior to Start are never called on network thread. @@ -156,8 +160,6 @@ // Java object that owns this CronetURLRequestContextAdapter. base::android::ScopedJavaGlobalRef<jobject> owner_; - - DISALLOW_COPY_AND_ASSIGN(CronetURLRequestAdapter); }; } // namespace cronet
diff --git a/components/cronet/android/cronet_url_request_context_adapter.h b/components/cronet/android/cronet_url_request_context_adapter.h index 311278ae..4f9454c 100644 --- a/components/cronet/android/cronet_url_request_context_adapter.h +++ b/components/cronet/android/cronet_url_request_context_adapter.h
@@ -41,6 +41,11 @@ explicit CronetURLRequestContextAdapter( std::unique_ptr<URLRequestContextConfig> context_config); + CronetURLRequestContextAdapter(const CronetURLRequestContextAdapter&) = + delete; + CronetURLRequestContextAdapter& operator=( + const CronetURLRequestContextAdapter&) = delete; + ~CronetURLRequestContextAdapter() override; // Called on init Java thread to initialize URLRequestContext. @@ -143,8 +148,6 @@ // Java object that owns this CronetURLRequestContextAdapter. base::android::ScopedJavaGlobalRef<jobject> jcronet_url_request_context_; - - DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContextAdapter); }; } // namespace cronet
diff --git a/components/cronet/android/io_buffer_with_byte_buffer.h b/components/cronet/android/io_buffer_with_byte_buffer.h index 3e47704..3868b99 100644 --- a/components/cronet/android/io_buffer_with_byte_buffer.h +++ b/components/cronet/android/io_buffer_with_byte_buffer.h
@@ -56,6 +56,9 @@ scoped_refptr<net::IOBuffer> io_buffer, int io_buffer_len); + ByteBufferWithIOBuffer(const ByteBufferWithIOBuffer&) = delete; + ByteBufferWithIOBuffer& operator=(const ByteBufferWithIOBuffer&) = delete; + ~ByteBufferWithIOBuffer(); const net::IOBuffer* io_buffer() const { return io_buffer_.get(); } int io_buffer_len() const { return io_buffer_len_; } @@ -69,8 +72,6 @@ int io_buffer_len_; base::android::ScopedJavaGlobalRef<jobject> byte_buffer_; - - DISALLOW_COPY_AND_ASSIGN(ByteBufferWithIOBuffer); }; } // namespace cronet
diff --git a/components/cronet/android/test/test_upload_data_stream_handler.h b/components/cronet/android/test/test_upload_data_stream_handler.h index b02fbcb..39403b4 100644 --- a/components/cronet/android/test/test_upload_data_stream_handler.h +++ b/components/cronet/android/test/test_upload_data_stream_handler.h
@@ -30,6 +30,10 @@ jobject jtest_upload_data_stream_handler, jlong jcontext_adapter); + TestUploadDataStreamHandler(const TestUploadDataStreamHandler&) = delete; + TestUploadDataStreamHandler& operator=(const TestUploadDataStreamHandler&) = + delete; + ~TestUploadDataStreamHandler(); // Destroys |network_thread_| created by this class. @@ -95,8 +99,6 @@ // A Java reference pointer for calling methods on the Java // TestUploadDataStreamHandler object. Initialized during construction. base::android::ScopedJavaGlobalRef<jobject> jtest_upload_data_stream_handler_; - - DISALLOW_COPY_AND_ASSIGN(TestUploadDataStreamHandler); }; } // namespace cronet
diff --git a/components/cronet/android/test/url_request_intercepting_job_factory.h b/components/cronet/android/test/url_request_intercepting_job_factory.h index 8cdc925..81e6cab 100644 --- a/components/cronet/android/test/url_request_intercepting_job_factory.h +++ b/components/cronet/android/test/url_request_intercepting_job_factory.h
@@ -34,6 +34,12 @@ // Does not take ownership of |job_factory| and |interceptor|. URLRequestInterceptingJobFactory(net::URLRequestJobFactory* job_factory, net::URLRequestInterceptor* interceptor); + + URLRequestInterceptingJobFactory(const URLRequestInterceptingJobFactory&) = + delete; + URLRequestInterceptingJobFactory& operator=( + const URLRequestInterceptingJobFactory&) = delete; + ~URLRequestInterceptingJobFactory() override; // URLRequestJobFactory implementation @@ -44,8 +50,6 @@ private: net::URLRequestJobFactory* const job_factory_; net::URLRequestInterceptor* const interceptor_; - - DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptingJobFactory); }; } // namespace cronet
diff --git a/components/cronet/cronet_prefs_manager.cc b/components/cronet/cronet_prefs_manager.cc index acec3dd..abb260d 100644 --- a/components/cronet/cronet_prefs_manager.cc +++ b/components/cronet/cronet_prefs_manager.cc
@@ -107,6 +107,9 @@ pref_change_registrar_.Init(pref_service_); } + PrefServiceAdapter(const PrefServiceAdapter&) = delete; + PrefServiceAdapter& operator=(const PrefServiceAdapter&) = delete; + ~PrefServiceAdapter() override {} // PrefDelegate implementation. @@ -132,8 +135,6 @@ PrefService* pref_service_; const std::string path_; PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(PrefServiceAdapter); }; // class PrefServiceAdapter class NetworkQualitiesPrefDelegateImpl @@ -145,6 +146,11 @@ DCHECK(pref_service_); } + NetworkQualitiesPrefDelegateImpl(const NetworkQualitiesPrefDelegateImpl&) = + delete; + NetworkQualitiesPrefDelegateImpl& operator=( + const NetworkQualitiesPrefDelegateImpl&) = delete; + ~NetworkQualitiesPrefDelegateImpl() override {} // net::NetworkQualitiesPrefsManager::PrefDelegate implementation. @@ -197,8 +203,6 @@ base::WeakPtrFactory<NetworkQualitiesPrefDelegateImpl> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefDelegateImpl); }; } // namespace
diff --git a/components/cronet/cronet_prefs_manager.h b/components/cronet/cronet_prefs_manager.h index 6805f56..d9b7d4ca5 100644 --- a/components/cronet/cronet_prefs_manager.h +++ b/components/cronet/cronet_prefs_manager.h
@@ -46,6 +46,9 @@ net::NetLog* net_log, net::URLRequestContextBuilder* context_builder); + CronetPrefsManager(const CronetPrefsManager&) = delete; + CronetPrefsManager& operator=(const CronetPrefsManager&) = delete; + virtual ~CronetPrefsManager(); void SetupNqePersistence(net::NetworkQualityEstimator* nqe); @@ -76,8 +79,6 @@ // Checks that all methods are called on the network thread. THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(CronetPrefsManager); - }; // class CronetPrefsManager } // namespace cronet
diff --git a/components/cronet/cronet_url_request.h b/components/cronet/cronet_url_request.h index 120a6dd9..fee7450 100644 --- a/components/cronet/cronet_url_request.h +++ b/components/cronet/cronet_url_request.h
@@ -212,6 +212,9 @@ int32_t traffic_stats_uid, net::Idempotency idempotency); + NetworkTasks(const NetworkTasks&) = delete; + NetworkTasks& operator=(const NetworkTasks&) = delete; + // Invoked on the network thread. ~NetworkTasks() override; @@ -295,7 +298,6 @@ std::unique_ptr<net::URLRequest> url_request_; THREAD_CHECKER(network_thread_checker_); - DISALLOW_COPY_AND_ASSIGN(NetworkTasks); }; CronetURLRequestContext* context_;
diff --git a/components/cronet/cronet_url_request_context.cc b/components/cronet/cronet_url_request_context.cc index 99acc1f..bcee856c 100644 --- a/components/cronet/cronet_url_request_context.cc +++ b/components/cronet/cronet_url_request_context.cc
@@ -108,6 +108,10 @@ class BasicNetworkDelegate : public net::NetworkDelegateImpl { public: BasicNetworkDelegate() {} + + BasicNetworkDelegate(const BasicNetworkDelegate&) = delete; + BasicNetworkDelegate& operator=(const BasicNetworkDelegate&) = delete; + ~BasicNetworkDelegate() override {} private: @@ -130,8 +134,6 @@ // Disallow saving cookies by default. return false; } - - DISALLOW_COPY_AND_ASSIGN(BasicNetworkDelegate); }; } // namespace
diff --git a/components/cronet/cronet_url_request_context.h b/components/cronet/cronet_url_request_context.h index f277b96..6833d59 100644 --- a/components/cronet/cronet_url_request_context.h +++ b/components/cronet/cronet_url_request_context.h
@@ -100,6 +100,9 @@ scoped_refptr<base::SingleThreadTaskRunner> network_task_runner = nullptr); + CronetURLRequestContext(const CronetURLRequestContext&) = delete; + CronetURLRequestContext& operator=(const CronetURLRequestContext&) = delete; + // Releases all resources for the request context and deletes the object. // Blocks until network thread is destroyed after running all pending tasks. virtual ~CronetURLRequestContext(); @@ -170,6 +173,10 @@ // Invoked off the network thread. NetworkTasks(std::unique_ptr<URLRequestContextConfig> config, std::unique_ptr<CronetURLRequestContext::Callback> callback); + + NetworkTasks(const NetworkTasks&) = delete; + NetworkTasks& operator=(const NetworkTasks&) = delete; + // Invoked on the network thread. ~NetworkTasks() override; @@ -277,7 +284,6 @@ std::unique_ptr<CronetURLRequestContext::Callback> callback_; THREAD_CHECKER(network_thread_checker_); - DISALLOW_COPY_AND_ASSIGN(NetworkTasks); }; scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() const; @@ -299,8 +305,6 @@ // Task runner that runs network tasks. scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(CronetURLRequestContext); }; } // namespace cronet
diff --git a/components/cronet/host_cache_persistence_manager.h b/components/cronet/host_cache_persistence_manager.h index 9962eb3..8243442e 100644 --- a/components/cronet/host_cache_persistence_manager.h +++ b/components/cronet/host_cache_persistence_manager.h
@@ -47,6 +47,11 @@ std::string pref_name, base::TimeDelta delay, net::NetLog* net_log); + + HostCachePersistenceManager(const HostCachePersistenceManager&) = delete; + HostCachePersistenceManager& operator=(const HostCachePersistenceManager&) = + delete; + virtual ~HostCachePersistenceManager(); // net::HostCache::PersistenceDelegate implementation @@ -72,8 +77,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<HostCachePersistenceManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostCachePersistenceManager); }; } // namespace cronet
diff --git a/components/cronet/ios/cronet_environment.h b/components/cronet/ios/cronet_environment.h index f058483..b3a544f 100644 --- a/components/cronet/ios/cronet_environment.h +++ b/components/cronet/ios/cronet_environment.h
@@ -51,6 +51,10 @@ // |user_agent_partial| is true, or will be used as the complete user-agent // otherwise. CronetEnvironment(const std::string& user_agent, bool user_agent_partial); + + CronetEnvironment(const CronetEnvironment&) = delete; + CronetEnvironment& operator=(const CronetEnvironment&) = delete; + ~CronetEnvironment(); // Starts this instance of Cronet environment. @@ -206,8 +210,6 @@ bool enable_pkp_bypass_for_local_trust_anchors_; double network_thread_priority_; std::unique_ptr<CronetPrefsManager> cronet_prefs_manager_; - - DISALLOW_COPY_AND_ASSIGN(CronetEnvironment); }; } // namespace cronet
diff --git a/components/cronet/native/buffer.cc b/components/cronet/native/buffer.cc index 3f26486..f6a26ed 100644 --- a/components/cronet/native/buffer.cc +++ b/components/cronet/native/buffer.cc
@@ -14,18 +14,24 @@ class Cronet_BufferCallbackFree : public Cronet_BufferCallback { public: Cronet_BufferCallbackFree() = default; + + Cronet_BufferCallbackFree(const Cronet_BufferCallbackFree&) = delete; + Cronet_BufferCallbackFree& operator=(const Cronet_BufferCallbackFree&) = + delete; + ~Cronet_BufferCallbackFree() override = default; void OnDestroy(Cronet_BufferPtr buffer) override { free(buffer->GetData()); } - - private: - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferCallbackFree); }; // Concrete implementation of abstract Cronet_Buffer interface. class Cronet_BufferImpl : public Cronet_Buffer { public: Cronet_BufferImpl() = default; + + Cronet_BufferImpl(const Cronet_BufferImpl&) = delete; + Cronet_BufferImpl& operator=(const Cronet_BufferImpl&) = delete; + ~Cronet_BufferImpl() override; // Cronet_Buffer implementation @@ -40,8 +46,6 @@ Cronet_RawDataPtr data_ = nullptr; uint64_t size_ = 0; Cronet_BufferCallbackPtr callback_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferImpl); }; Cronet_BufferImpl::~Cronet_BufferImpl() {
diff --git a/components/cronet/native/engine.cc b/components/cronet/native/engine.cc index 17aa56f..4f7f277 100644 --- a/components/cronet/native/engine.cc +++ b/components/cronet/native/engine.cc
@@ -370,6 +370,10 @@ class Cronet_EngineImpl::Callback : public CronetURLRequestContext::Callback { public: explicit Callback(Cronet_EngineImpl* engine); + + Callback(const Callback&) = delete; + Callback& operator=(const Callback&) = delete; + ~Callback() override; // CronetURLRequestContext::Callback implementation: @@ -396,7 +400,6 @@ // All methods are invoked on the network thread. THREAD_CHECKER(network_thread_checker_); - DISALLOW_COPY_AND_ASSIGN(Callback); }; Cronet_EngineImpl::Callback::Callback(Cronet_EngineImpl* engine)
diff --git a/components/cronet/native/engine.h b/components/cronet/native/engine.h index 4eeed32..15a9d606 100644 --- a/components/cronet/native/engine.h +++ b/components/cronet/native/engine.h
@@ -30,6 +30,10 @@ class Cronet_EngineImpl : public Cronet_Engine { public: Cronet_EngineImpl(); + + Cronet_EngineImpl(const Cronet_EngineImpl&) = delete; + Cronet_EngineImpl& operator=(const Cronet_EngineImpl&) = delete; + ~Cronet_EngineImpl() override; // Cronet_Engine implementation: @@ -107,8 +111,6 @@ // Executors. base::flat_map<Cronet_RequestFinishedInfoListenerPtr, Cronet_ExecutorPtr> request_finished_registrations_ GUARDED_BY(lock_); - - DISALLOW_COPY_AND_ASSIGN(Cronet_EngineImpl); }; } // namespace cronet
diff --git a/components/cronet/native/generated/cronet.idl_impl_interface.cc b/components/cronet/native/generated/cronet.idl_impl_interface.cc index f94e7e4..86f9324 100644 --- a/components/cronet/native/generated/cronet.idl_impl_interface.cc +++ b/components/cronet/native/generated/cronet.idl_impl_interface.cc
@@ -62,6 +62,9 @@ GetSizeFunc_(GetSizeFunc), GetDataFunc_(GetDataFunc) {} + Cronet_BufferStub(const Cronet_BufferStub&) = delete; + Cronet_BufferStub& operator=(const Cronet_BufferStub&) = delete; + ~Cronet_BufferStub() override {} protected: @@ -82,8 +85,6 @@ const Cronet_Buffer_InitWithAllocFunc InitWithAllocFunc_; const Cronet_Buffer_GetSizeFunc GetSizeFunc_; const Cronet_Buffer_GetDataFunc GetDataFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferStub); }; Cronet_BufferPtr Cronet_Buffer_CreateWith( @@ -129,6 +130,10 @@ Cronet_BufferCallback_OnDestroyFunc OnDestroyFunc) : OnDestroyFunc_(OnDestroyFunc) {} + Cronet_BufferCallbackStub(const Cronet_BufferCallbackStub&) = delete; + Cronet_BufferCallbackStub& operator=(const Cronet_BufferCallbackStub&) = + delete; + ~Cronet_BufferCallbackStub() override {} protected: @@ -138,8 +143,6 @@ private: const Cronet_BufferCallback_OnDestroyFunc OnDestroyFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferCallbackStub); }; Cronet_BufferCallbackPtr Cronet_BufferCallback_CreateWith( @@ -176,6 +179,9 @@ explicit Cronet_RunnableStub(Cronet_Runnable_RunFunc RunFunc) : RunFunc_(RunFunc) {} + Cronet_RunnableStub(const Cronet_RunnableStub&) = delete; + Cronet_RunnableStub& operator=(const Cronet_RunnableStub&) = delete; + ~Cronet_RunnableStub() override {} protected: @@ -183,8 +189,6 @@ private: const Cronet_Runnable_RunFunc RunFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_RunnableStub); }; Cronet_RunnablePtr Cronet_Runnable_CreateWith(Cronet_Runnable_RunFunc RunFunc) { @@ -221,6 +225,9 @@ explicit Cronet_ExecutorStub(Cronet_Executor_ExecuteFunc ExecuteFunc) : ExecuteFunc_(ExecuteFunc) {} + Cronet_ExecutorStub(const Cronet_ExecutorStub&) = delete; + Cronet_ExecutorStub& operator=(const Cronet_ExecutorStub&) = delete; + ~Cronet_ExecutorStub() override {} protected: @@ -230,8 +237,6 @@ private: const Cronet_Executor_ExecuteFunc ExecuteFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_ExecutorStub); }; Cronet_ExecutorPtr Cronet_Executor_CreateWith( @@ -328,6 +333,9 @@ AddRequestFinishedListenerFunc_(AddRequestFinishedListenerFunc), RemoveRequestFinishedListenerFunc_(RemoveRequestFinishedListenerFunc) {} + Cronet_EngineStub(const Cronet_EngineStub&) = delete; + Cronet_EngineStub& operator=(const Cronet_EngineStub&) = delete; + ~Cronet_EngineStub() override {} protected: @@ -373,8 +381,6 @@ AddRequestFinishedListenerFunc_; const Cronet_Engine_RemoveRequestFinishedListenerFunc RemoveRequestFinishedListenerFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_EngineStub); }; Cronet_EnginePtr Cronet_Engine_CreateWith( @@ -430,6 +436,11 @@ Cronet_UrlRequestStatusListener_OnStatusFunc OnStatusFunc) : OnStatusFunc_(OnStatusFunc) {} + Cronet_UrlRequestStatusListenerStub( + const Cronet_UrlRequestStatusListenerStub&) = delete; + Cronet_UrlRequestStatusListenerStub& operator=( + const Cronet_UrlRequestStatusListenerStub&) = delete; + ~Cronet_UrlRequestStatusListenerStub() override {} protected: @@ -439,8 +450,6 @@ private: const Cronet_UrlRequestStatusListener_OnStatusFunc OnStatusFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UrlRequestStatusListenerStub); }; Cronet_UrlRequestStatusListenerPtr Cronet_UrlRequestStatusListener_CreateWith( @@ -535,6 +544,10 @@ OnFailedFunc_(OnFailedFunc), OnCanceledFunc_(OnCanceledFunc) {} + Cronet_UrlRequestCallbackStub(const Cronet_UrlRequestCallbackStub&) = delete; + Cronet_UrlRequestCallbackStub& operator=( + const Cronet_UrlRequestCallbackStub&) = delete; + ~Cronet_UrlRequestCallbackStub() override {} protected: @@ -580,8 +593,6 @@ const Cronet_UrlRequestCallback_OnSucceededFunc OnSucceededFunc_; const Cronet_UrlRequestCallback_OnFailedFunc OnFailedFunc_; const Cronet_UrlRequestCallback_OnCanceledFunc OnCanceledFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UrlRequestCallbackStub); }; Cronet_UrlRequestCallbackPtr Cronet_UrlRequestCallback_CreateWith( @@ -654,6 +665,10 @@ OnRewindSucceededFunc_(OnRewindSucceededFunc), OnRewindErrorFunc_(OnRewindErrorFunc) {} + Cronet_UploadDataSinkStub(const Cronet_UploadDataSinkStub&) = delete; + Cronet_UploadDataSinkStub& operator=(const Cronet_UploadDataSinkStub&) = + delete; + ~Cronet_UploadDataSinkStub() override {} protected: @@ -676,8 +691,6 @@ const Cronet_UploadDataSink_OnReadErrorFunc OnReadErrorFunc_; const Cronet_UploadDataSink_OnRewindSucceededFunc OnRewindSucceededFunc_; const Cronet_UploadDataSink_OnRewindErrorFunc OnRewindErrorFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UploadDataSinkStub); }; Cronet_UploadDataSinkPtr Cronet_UploadDataSink_CreateWith( @@ -748,6 +761,10 @@ RewindFunc_(RewindFunc), CloseFunc_(CloseFunc) {} + Cronet_UploadDataProviderStub(const Cronet_UploadDataProviderStub&) = delete; + Cronet_UploadDataProviderStub& operator=( + const Cronet_UploadDataProviderStub&) = delete; + ~Cronet_UploadDataProviderStub() override {} protected: @@ -769,8 +786,6 @@ const Cronet_UploadDataProvider_ReadFunc ReadFunc_; const Cronet_UploadDataProvider_RewindFunc RewindFunc_; const Cronet_UploadDataProvider_CloseFunc CloseFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UploadDataProviderStub); }; Cronet_UploadDataProviderPtr Cronet_UploadDataProvider_CreateWith( @@ -862,6 +877,9 @@ IsDoneFunc_(IsDoneFunc), GetStatusFunc_(GetStatusFunc) {} + Cronet_UrlRequestStub(const Cronet_UrlRequestStub&) = delete; + Cronet_UrlRequestStub& operator=(const Cronet_UrlRequestStub&) = delete; + ~Cronet_UrlRequestStub() override {} protected: @@ -897,8 +915,6 @@ const Cronet_UrlRequest_CancelFunc CancelFunc_; const Cronet_UrlRequest_IsDoneFunc IsDoneFunc_; const Cronet_UrlRequest_GetStatusFunc GetStatusFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UrlRequestStub); }; Cronet_UrlRequestPtr Cronet_UrlRequest_CreateWith( @@ -954,6 +970,11 @@ OnRequestFinishedFunc) : OnRequestFinishedFunc_(OnRequestFinishedFunc) {} + Cronet_RequestFinishedInfoListenerStub( + const Cronet_RequestFinishedInfoListenerStub&) = delete; + Cronet_RequestFinishedInfoListenerStub& operator=( + const Cronet_RequestFinishedInfoListenerStub&) = delete; + ~Cronet_RequestFinishedInfoListenerStub() override {} protected: @@ -966,8 +987,6 @@ private: const Cronet_RequestFinishedInfoListener_OnRequestFinishedFunc OnRequestFinishedFunc_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_RequestFinishedInfoListenerStub); }; Cronet_RequestFinishedInfoListenerPtr
diff --git a/components/cronet/native/io_buffer_with_cronet_buffer.cc b/components/cronet/native/io_buffer_with_cronet_buffer.cc index 2235517..6a4c595 100644 --- a/components/cronet/native/io_buffer_with_cronet_buffer.cc +++ b/components/cronet/native/io_buffer_with_cronet_buffer.cc
@@ -13,12 +13,14 @@ class Cronet_BufferCallbackUnowned : public Cronet_BufferCallback { public: Cronet_BufferCallbackUnowned() = default; + + Cronet_BufferCallbackUnowned(const Cronet_BufferCallbackUnowned&) = delete; + Cronet_BufferCallbackUnowned& operator=(const Cronet_BufferCallbackUnowned&) = + delete; + ~Cronet_BufferCallbackUnowned() override = default; void OnDestroy(Cronet_BufferPtr buffer) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferCallbackUnowned); }; } // namespace
diff --git a/components/cronet/native/io_buffer_with_cronet_buffer.h b/components/cronet/native/io_buffer_with_cronet_buffer.h index 06a5c3a..fc70999 100644 --- a/components/cronet/native/io_buffer_with_cronet_buffer.h +++ b/components/cronet/native/io_buffer_with_cronet_buffer.h
@@ -38,6 +38,11 @@ public: Cronet_BufferWithIOBuffer(scoped_refptr<net::IOBuffer> io_buffer, size_t io_buffer_len); + + Cronet_BufferWithIOBuffer(const Cronet_BufferWithIOBuffer&) = delete; + Cronet_BufferWithIOBuffer& operator=(const Cronet_BufferWithIOBuffer&) = + delete; + ~Cronet_BufferWithIOBuffer(); const net::IOBuffer* io_buffer() const { return io_buffer_.get(); } @@ -55,8 +60,6 @@ // Cronet buffer owned by |this|. std::unique_ptr<Cronet_Buffer> cronet_buffer_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_BufferWithIOBuffer); }; } // namespace cronet
diff --git a/components/cronet/native/runnables.h b/components/cronet/native/runnables.h index edb85fc6..69106745 100644 --- a/components/cronet/native/runnables.h +++ b/components/cronet/native/runnables.h
@@ -16,6 +16,10 @@ class OnceClosureRunnable : public Cronet_Runnable { public: explicit OnceClosureRunnable(base::OnceClosure task); + + OnceClosureRunnable(const OnceClosureRunnable&) = delete; + OnceClosureRunnable& operator=(const OnceClosureRunnable&) = delete; + ~OnceClosureRunnable() override; void Run() override; @@ -23,8 +27,6 @@ private: // Closure to run. base::OnceClosure task_; - - DISALLOW_COPY_AND_ASSIGN(OnceClosureRunnable); }; } // namespace cronet
diff --git a/components/cronet/native/runnables_unittest.cc b/components/cronet/native/runnables_unittest.cc index ed1732a..9bc2f65 100644 --- a/components/cronet/native/runnables_unittest.cc +++ b/components/cronet/native/runnables_unittest.cc
@@ -21,6 +21,10 @@ class RunnablesTest : public ::testing::Test { public: RunnablesTest() = default; + + RunnablesTest(const RunnablesTest&) = delete; + RunnablesTest& operator=(const RunnablesTest&) = delete; + ~RunnablesTest() override {} protected: @@ -47,7 +51,6 @@ private: bool callback_called_ = false; - DISALLOW_COPY_AND_ASSIGN(RunnablesTest); }; class OnRedirectReceived_Runnable : public Cronet_Runnable {
diff --git a/components/cronet/native/test/buffer_test.cc b/components/cronet/native/test/buffer_test.cc index 334dae3a..bbd450c 100644 --- a/components/cronet/native/test/buffer_test.cc +++ b/components/cronet/native/test/buffer_test.cc
@@ -20,6 +20,10 @@ class BufferTest : public ::testing::Test { public: BufferTest() = default; + + BufferTest(const BufferTest&) = delete; + BufferTest& operator=(const BufferTest&) = delete; + ~BufferTest() override {} protected: @@ -35,7 +39,6 @@ void set_on_destroy_called(bool value) { on_destroy_called_ = value; } bool on_destroy_called_ = false; - DISALLOW_COPY_AND_ASSIGN(BufferTest); }; const uint64_t kTestBufferSize = 20;
diff --git a/components/cronet/native/test/executors_test.cc b/components/cronet/native/test/executors_test.cc index 0aa882e..4cbc8f87 100644 --- a/components/cronet/native/test/executors_test.cc +++ b/components/cronet/native/test/executors_test.cc
@@ -16,6 +16,10 @@ class ExecutorsTest : public ::testing::Test { public: ExecutorsTest() = default; + + ExecutorsTest(const ExecutorsTest&) = delete; + ExecutorsTest& operator=(const ExecutorsTest&) = delete; + ~ExecutorsTest() override = default; protected: @@ -30,7 +34,6 @@ void set_runnable_called(bool value) { runnable_called_ = value; } bool runnable_called_ = false; - DISALLOW_COPY_AND_ASSIGN(ExecutorsTest); }; // App implementation of Cronet_Executor methods.
diff --git a/components/cronet/native/test/url_request_test.cc b/components/cronet/native/test/url_request_test.cc index 4b81106..365341c 100644 --- a/components/cronet/native/test/url_request_test.cc +++ b/components/cronet/native/test/url_request_test.cc
@@ -45,6 +45,9 @@ Cronet_UrlRequestStatusListener_SetClientContext(status_listener_, this); } + StatusListener(const StatusListener&) = delete; + StatusListener& operator=(const StatusListener&) = delete; + ~StatusListener() { Cronet_UrlRequestStatusListener_Destroy(status_listener_); } @@ -89,8 +92,6 @@ // this variable races the reading of it, but it's initialized to a safe // value. std::atomic_bool expect_request_not_done_; - - DISALLOW_COPY_AND_ASSIGN(StatusListener); }; // Query and return status of |request|. |callback| is verified to not yet have
diff --git a/components/cronet/native/upload_data_sink.cc b/components/cronet/native/upload_data_sink.cc index 8399b87..349eeb666 100644 --- a/components/cronet/native/upload_data_sink.cc +++ b/components/cronet/native/upload_data_sink.cc
@@ -34,6 +34,10 @@ public: NetworkTasks(Cronet_UploadDataSinkImpl* upload_data_sink, Cronet_Executor* upload_data_provider_executor); + + NetworkTasks(const NetworkTasks&) = delete; + NetworkTasks& operator=(const NetworkTasks&) = delete; + ~NetworkTasks() override; private: @@ -56,7 +60,6 @@ Cronet_ExecutorPtr const upload_data_provider_executor_ = nullptr; THREAD_CHECKER(network_thread_checker_); - DISALLOW_COPY_AND_ASSIGN(NetworkTasks); }; Cronet_UploadDataSinkImpl::NetworkTasks::NetworkTasks(
diff --git a/components/cronet/native/upload_data_sink.h b/components/cronet/native/upload_data_sink.h index d233761a..8bcbd13 100644 --- a/components/cronet/native/upload_data_sink.h +++ b/components/cronet/native/upload_data_sink.h
@@ -27,6 +27,11 @@ Cronet_UploadDataSinkImpl(Cronet_UrlRequestImpl* url_request, Cronet_UploadDataProvider* upload_data_provider, Cronet_Executor* upload_data_provider_executor); + + Cronet_UploadDataSinkImpl(const Cronet_UploadDataSinkImpl&) = delete; + Cronet_UploadDataSinkImpl& operator=(const Cronet_UploadDataSinkImpl&) = + delete; + ~Cronet_UploadDataSinkImpl() override; // Initialize length and attach upload to request. Called on client thread. @@ -84,8 +89,6 @@ bool close_when_not_in_callback_ = false; // Keeps the net::IOBuffer and Cronet ByteBuffer alive until the next Read(). std::unique_ptr<Cronet_BufferWithIOBuffer> buffer_; - - DISALLOW_COPY_AND_ASSIGN(Cronet_UploadDataSinkImpl); }; } // namespace cronet
diff --git a/components/cronet/native/url_request.cc b/components/cronet/native/url_request.cc index 29d1b67..49defaa 100644 --- a/components/cronet/native/url_request.cc +++ b/components/cronet/native/url_request.cc
@@ -162,6 +162,11 @@ public: VerifyDestructionRunnable(base::WaitableEvent* destroyed) : destroyed_(destroyed) {} + + VerifyDestructionRunnable(const VerifyDestructionRunnable&) = delete; + VerifyDestructionRunnable& operator=(const VerifyDestructionRunnable&) = + delete; + // Signal event indicating Runnable was properly Destroyed. ~VerifyDestructionRunnable() override { destroyed_->Signal(); } @@ -170,8 +175,6 @@ private: // Event indicating destructor is called. base::WaitableEvent* const destroyed_; - - DISALLOW_COPY_AND_ASSIGN(VerifyDestructionRunnable); }; #endif // DCHECK_IS_ON() @@ -242,6 +245,10 @@ class Cronet_UrlRequestImpl::NetworkTasks : public CronetURLRequest::Callback { public: NetworkTasks(const std::string& url, Cronet_UrlRequestImpl* url_request); + + NetworkTasks(const NetworkTasks&) = delete; + NetworkTasks& operator=(const NetworkTasks&) = delete; + ~NetworkTasks() override = default; // Callback function used for GetStatus(). @@ -309,7 +316,6 @@ // All methods except constructor are invoked on the network thread. THREAD_CHECKER(network_thread_checker_); - DISALLOW_COPY_AND_ASSIGN(NetworkTasks); }; Cronet_UrlRequestImpl::Cronet_UrlRequestImpl() = default;
diff --git a/components/cronet/native/url_request.h b/components/cronet/native/url_request.h index 02992ef4..e6b2be01 100644 --- a/components/cronet/native/url_request.h +++ b/components/cronet/native/url_request.h
@@ -30,6 +30,10 @@ class Cronet_UrlRequestImpl : public Cronet_UrlRequest { public: Cronet_UrlRequestImpl(); + + Cronet_UrlRequestImpl(const Cronet_UrlRequestImpl&) = delete; + Cronet_UrlRequestImpl& operator=(const Cronet_UrlRequestImpl&) = delete; + ~Cronet_UrlRequestImpl() override; // Cronet_UrlRequest @@ -198,8 +202,6 @@ // Event indicating Executor is properly destroying Runnables. base::WaitableEvent runnable_destroyed_; #endif // DCHECK_IS_ON() - - DISALLOW_COPY_AND_ASSIGN(Cronet_UrlRequestImpl); }; } // namespace cronet
diff --git a/components/cronet/stale_host_resolver.h b/components/cronet/stale_host_resolver.h index 57b88e5..d00292b4 100644 --- a/components/cronet/stale_host_resolver.h +++ b/components/cronet/stale_host_resolver.h
@@ -70,6 +70,9 @@ StaleHostResolver(std::unique_ptr<net::ContextHostResolver> inner_resolver, const StaleOptions& stale_options); + StaleHostResolver(const StaleHostResolver&) = delete; + StaleHostResolver& operator=(const StaleHostResolver&) = delete; + ~StaleHostResolver() override; // HostResolver implementation: @@ -134,8 +137,6 @@ detached_requests_; base::WeakPtrFactory<StaleHostResolver> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(StaleHostResolver); }; } // namespace cronet
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h index f35fb70..f378e672 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_compression_stats.h
@@ -77,6 +77,12 @@ DataReductionProxyCompressionStats(DataReductionProxyService* service, PrefService* pref_service, const base::TimeDelta& delay); + + DataReductionProxyCompressionStats( + const DataReductionProxyCompressionStats&) = delete; + DataReductionProxyCompressionStats& operator=( + const DataReductionProxyCompressionStats&) = delete; + ~DataReductionProxyCompressionStats(); // Records detailed data usage broken down by |mime_type|. Also records daily @@ -293,8 +299,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<DataReductionProxyCompressionStats> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataReductionProxyCompressionStats); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h index 900a6b4..6ede930 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
@@ -53,6 +53,10 @@ const scoped_refptr<base::SequencedTaskRunner>& db_task_runner, const base::TimeDelta& commit_delay); + DataReductionProxyService(const DataReductionProxyService&) = delete; + DataReductionProxyService& operator=(const DataReductionProxyService&) = + delete; + virtual ~DataReductionProxyService(); void Shutdown(); @@ -143,8 +147,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<DataReductionProxyService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataReductionProxyService); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h index 3eb4098..119e5d2 100644 --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
@@ -70,6 +70,11 @@ base::RepeatingCallback<bool(base::StringPiece, base::StringPiece)>; explicit DataReductionProxySettings(bool is_off_the_record_profile); + + DataReductionProxySettings(const DataReductionProxySettings&) = delete; + DataReductionProxySettings& operator=(const DataReductionProxySettings&) = + delete; + virtual ~DataReductionProxySettings(); // Initializes the Data Reduction Proxy with the profile prefs. The caller @@ -258,8 +263,6 @@ const bool is_off_the_record_profile_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(DataReductionProxySettings); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_store.h b/components/data_reduction_proxy/core/browser/data_store.h index f275da7..2209f7f 100644 --- a/components/data_reduction_proxy/core/browser/data_store.h +++ b/components/data_reduction_proxy/core/browser/data_store.h
@@ -23,6 +23,10 @@ enum Status { OK, NOT_FOUND, CORRUPTED, IO_ERROR, MISC_ERROR, STATUS_MAX }; DataStore(); + + DataStore(const DataStore&) = delete; + DataStore& operator=(const DataStore&) = delete; + virtual ~DataStore(); // Initializes the store on DB sequenced task runner. @@ -38,9 +42,6 @@ // Deletes the LevelDB and recreates it. virtual Status RecreateDB(); - - private: - DISALLOW_COPY_AND_ASSIGN(DataStore); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_store_impl.h b/components/data_reduction_proxy/core/browser/data_store_impl.h index 950de079..df8aec46 100644 --- a/components/data_reduction_proxy/core/browser/data_store_impl.h +++ b/components/data_reduction_proxy/core/browser/data_store_impl.h
@@ -25,6 +25,10 @@ class DataStoreImpl : public DataStore { public: explicit DataStoreImpl(const base::FilePath& profile_path); + + DataStoreImpl(const DataStoreImpl&) = delete; + DataStoreImpl& operator=(const DataStoreImpl&) = delete; + ~DataStoreImpl() override; // Overrides of DataStore. @@ -51,8 +55,6 @@ const base::FilePath profile_path_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(DataStoreImpl); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/data_usage_store.h b/components/data_reduction_proxy/core/browser/data_usage_store.h index 07f6599..53526634 100644 --- a/components/data_reduction_proxy/core/browser/data_usage_store.h +++ b/components/data_reduction_proxy/core/browser/data_usage_store.h
@@ -30,6 +30,9 @@ public: explicit DataUsageStore(DataStore* db); + DataUsageStore(const DataUsageStore&) = delete; + DataUsageStore& operator=(const DataUsageStore&) = delete; + ~DataUsageStore(); // Loads the historic data usage into |data_usage|. @@ -108,8 +111,6 @@ base::Time current_bucket_last_updated_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(DataUsageStore); }; } // namespace data_reduction_proxy
diff --git a/components/data_reduction_proxy/core/browser/db_data_owner.h b/components/data_reduction_proxy/core/browser/db_data_owner.h index ea1032b..6065284 100644 --- a/components/data_reduction_proxy/core/browser/db_data_owner.h +++ b/components/data_reduction_proxy/core/browser/db_data_owner.h
@@ -35,6 +35,10 @@ class DBDataOwner { public: explicit DBDataOwner(std::unique_ptr<DataStore> store); + + DBDataOwner(const DBDataOwner&) = delete; + DBDataOwner& operator=(const DBDataOwner&) = delete; + virtual ~DBDataOwner(); // Initializes all the DB objects. Must be called on the DB task runner. @@ -63,8 +67,6 @@ std::unique_ptr<DataUsageStore> data_usage_; base::SequenceChecker sequence_checker_; base::WeakPtrFactory<DBDataOwner> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DBDataOwner); }; } // namespace data_reduction_proxy
diff --git a/components/data_use_measurement/core/data_use.h b/components/data_use_measurement/core/data_use.h index 8d4812a..da5f414 100644 --- a/components/data_use_measurement/core/data_use.h +++ b/components/data_use_measurement/core/data_use.h
@@ -37,6 +37,10 @@ }; explicit DataUse(TrafficType traffic_type); + + DataUse(const DataUse&) = delete; + DataUse& operator=(const DataUse&) = delete; + ~DataUse() override; // Returns the page URL. @@ -67,8 +71,6 @@ int64_t total_bytes_sent_; int64_t total_bytes_received_; - - DISALLOW_COPY_AND_ASSIGN(DataUse); }; } // namespace data_use_measurement
diff --git a/components/data_use_measurement/core/data_use_measurement.h b/components/data_use_measurement/core/data_use_measurement.h index cac4f56..8f18d53 100644 --- a/components/data_use_measurement/core/data_use_measurement.h +++ b/components/data_use_measurement/core/data_use_measurement.h
@@ -61,6 +61,10 @@ DataUseMeasurement( PrefService* pref_service, network::NetworkConnectionTracker* network_connection_tracker); + + DataUseMeasurement(const DataUseMeasurement&) = delete; + DataUseMeasurement& operator=(const DataUseMeasurement&) = delete; + ~DataUseMeasurement() override; #if defined(OS_ANDROID) @@ -191,8 +195,6 @@ DataUseTrackerPrefs data_use_tracker_prefs_; base::WeakPtrFactory<DataUseMeasurement> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataUseMeasurement); }; } // namespace data_use_measurement
diff --git a/components/data_use_measurement/core/data_use_user_data.h b/components/data_use_measurement/core/data_use_user_data.h index e7eaaef..488fcc1 100644 --- a/components/data_use_measurement/core/data_use_user_data.h +++ b/components/data_use_measurement/core/data_use_user_data.h
@@ -40,6 +40,10 @@ enum AppState { UNKNOWN, BACKGROUND, FOREGROUND }; explicit DataUseUserData(AppState app_state); + + DataUseUserData(const DataUseUserData&) = delete; + DataUseUserData& operator=(const DataUseUserData&) = delete; + ~DataUseUserData() override; AppState app_state() const { return app_state_; } @@ -60,8 +64,6 @@ AppState app_state_; DataUseContentType content_type_; - - DISALLOW_COPY_AND_ASSIGN(DataUseUserData); }; } // namespace data_use_measurement
diff --git a/components/dbus/menu/menu.h b/components/dbus/menu/menu.h index 82f053e7..ae22051a 100644 --- a/components/dbus/menu/menu.h +++ b/components/dbus/menu/menu.h
@@ -36,6 +36,10 @@ // The exported DBus object will not be unregistered upon deletion. It is the // responsibility of the caller to remove it after |this| is deleted. DbusMenu(dbus::ExportedObject* exported_object, InitializedCallback callback); + + DbusMenu(const DbusMenu&) = delete; + DbusMenu& operator=(const DbusMenu&) = delete; + ~DbusMenu(); // Should be called when there's a new root menu. @@ -59,6 +63,10 @@ ui::MenuModel* menu, ui::MenuModel* containing_menu, int containing_menu_index); + + MenuItem(const MenuItem&) = delete; + MenuItem& operator=(const MenuItem&) = delete; + ~MenuItem(); const int32_t id; @@ -72,8 +80,6 @@ // |containing_menu_index| is meaningless. ui::MenuModel* const containing_menu; const int containing_menu_index; - - DISALLOW_COPY_AND_ASSIGN(MenuItem); }; class ScopedMethodResponse { @@ -159,8 +165,6 @@ std::map<int32_t, std::unique_ptr<MenuItem>> items_; base::WeakPtrFactory<DbusMenu> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DbusMenu); }; #endif // COMPONENTS_DBUS_MENU_MENU_H_
diff --git a/components/dbus/properties/dbus_properties.h b/components/dbus/properties/dbus_properties.h index 65ecdcc5..6624c885 100644 --- a/components/dbus/properties/dbus_properties.h +++ b/components/dbus/properties/dbus_properties.h
@@ -22,6 +22,10 @@ // not be removed until the bus is shut down. DbusProperties(dbus::ExportedObject* exported_object, InitializedCallback callback); + + DbusProperties(const DbusProperties&) = delete; + DbusProperties& operator=(const DbusProperties&) = delete; + ~DbusProperties(); void RegisterInterface(const std::string& interface); @@ -77,8 +81,6 @@ std::map<std::string, std::map<std::string, DbusVariant>> properties_; base::WeakPtrFactory<DbusProperties> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DbusProperties); }; #endif // COMPONENTS_DBUS_PROPERTIES_DBUS_PROPERTIES_H_
diff --git a/components/device_event_log/device_event_log.h b/components/device_event_log/device_event_log.h index 10b3bc95..e72eff8 100644 --- a/components/device_event_log/device_event_log.h +++ b/components/device_event_log/device_event_log.h
@@ -219,6 +219,10 @@ int line, device_event_log::LogType type, device_event_log::LogLevel level); + + DeviceEventLogInstance(const DeviceEventLogInstance&) = delete; + DeviceEventLogInstance& operator=(const DeviceEventLogInstance&) = delete; + ~DeviceEventLogInstance(); std::ostream& stream() { return stream_; } @@ -229,8 +233,6 @@ device_event_log::LogType type_; device_event_log::LogLevel level_; std::ostringstream stream_; - - DISALLOW_COPY_AND_ASSIGN(DeviceEventLogInstance); }; // Implementation class for DEVICE_PLOG macros. Provides a stream for creating @@ -243,6 +245,12 @@ device_event_log::LogType type, device_event_log::LogLevel level, logging::SystemErrorCode err); + + DeviceEventSystemErrorLogInstance(const DeviceEventSystemErrorLogInstance&) = + delete; + DeviceEventSystemErrorLogInstance& operator=( + const DeviceEventSystemErrorLogInstance&) = delete; + ~DeviceEventSystemErrorLogInstance(); std::ostream& stream() { return log_instance_.stream(); } @@ -253,8 +261,6 @@ // log when it is destroyed (after a string description of |err_| is appended // to the stream). DeviceEventLogInstance log_instance_; - - DISALLOW_COPY_AND_ASSIGN(DeviceEventSystemErrorLogInstance); }; // Implementation class for SCOPED_LOG_IF_SLOW macros. Tests the elapsed time on
diff --git a/components/device_event_log/device_event_log_impl.h b/components/device_event_log/device_event_log_impl.h index 692fd43..0bb0727 100644 --- a/components/device_event_log/device_event_log_impl.h +++ b/components/device_event_log/device_event_log_impl.h
@@ -48,6 +48,10 @@ explicit DeviceEventLogImpl( scoped_refptr<base::SingleThreadTaskRunner> task_runner, size_t max_entries); + + DeviceEventLogImpl(const DeviceEventLogImpl&) = delete; + DeviceEventLogImpl& operator=(const DeviceEventLogImpl&) = delete; + ~DeviceEventLogImpl(); // Implements device_event_log::AddEntry. @@ -101,8 +105,6 @@ size_t max_entries_; LogEntryList entries_; base::WeakPtrFactory<DeviceEventLogImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceEventLogImpl); }; } // namespace device_event_log
diff --git a/components/digital_asset_links/digital_asset_links_handler.h b/components/digital_asset_links/digital_asset_links_handler.h index cf8dbfd7..ee36b65 100644 --- a/components/digital_asset_links/digital_asset_links_handler.h +++ b/components/digital_asset_links/digital_asset_links_handler.h
@@ -51,6 +51,10 @@ explicit DigitalAssetLinksHandler( scoped_refptr<network::SharedURLLoaderFactory> factory, content::WebContents* web_contents = nullptr); + + DigitalAssetLinksHandler(const DigitalAssetLinksHandler&) = delete; + DigitalAssetLinksHandler& operator=(const DigitalAssetLinksHandler&) = delete; + ~DigitalAssetLinksHandler(); // Checks whether the given "relationship" has been declared by the target @@ -126,8 +130,6 @@ base::WeakPtr<content::WebContents> web_contents_; base::WeakPtrFactory<DigitalAssetLinksHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DigitalAssetLinksHandler); }; } // namespace digital_asset_links
diff --git a/components/discardable_memory/common/discardable_shared_memory_heap.h b/components/discardable_memory/common/discardable_shared_memory_heap.h index 9605510..155e719 100644 --- a/components/discardable_memory/common/discardable_shared_memory_heap.h +++ b/components/discardable_memory/common/discardable_shared_memory_heap.h
@@ -38,6 +38,9 @@ public: class DISCARDABLE_MEMORY_EXPORT Span : public base::LinkNode<Span> { public: + Span(const Span&) = delete; + Span& operator=(const Span&) = delete; + ~Span() = default; base::DiscardableSharedMemory* shared_memory() { return shared_memory_; } @@ -67,8 +70,6 @@ size_t start_; size_t length_; bool is_locked_; - - DISALLOW_COPY_AND_ASSIGN(Span); }; DiscardableSharedMemoryHeap(); @@ -139,6 +140,10 @@ size_t size, int32_t id, base::OnceClosure deleted_callback); + + ScopedMemorySegment(const ScopedMemorySegment&) = delete; + ScopedMemorySegment& operator=(const ScopedMemorySegment&) = delete; + ~ScopedMemorySegment(); bool IsUsed() const; @@ -166,8 +171,6 @@ const size_t size_; const int32_t id_; base::OnceClosure deleted_callback_; - - DISALLOW_COPY_AND_ASSIGN(ScopedMemorySegment); }; void InsertIntoFreeList(std::unique_ptr<Span> span);
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager.cc b/components/discardable_memory/service/discardable_shared_memory_manager.cc index dc1144f5..720def0 100644 --- a/components/discardable_memory/service/discardable_shared_memory_manager.cc +++ b/components/discardable_memory/service/discardable_shared_memory_manager.cc
@@ -57,6 +57,11 @@ manager) : client_id_(client_id), manager_(manager) {} + MojoDiscardableSharedMemoryManagerImpl( + const MojoDiscardableSharedMemoryManagerImpl&) = delete; + MojoDiscardableSharedMemoryManagerImpl& operator=( + const MojoDiscardableSharedMemoryManagerImpl&) = delete; + ~MojoDiscardableSharedMemoryManagerImpl() override { // Remove this client from the |manager_|, so all allocated discardable // memory belong to this client will be released. @@ -85,8 +90,6 @@ private: const int32_t client_id_; base::WeakPtr<::discardable_memory::DiscardableSharedMemoryManager> manager_; - - DISALLOW_COPY_AND_ASSIGN(MojoDiscardableSharedMemoryManagerImpl); }; class DiscardableMemoryImpl : public base::DiscardableMemory { @@ -98,6 +101,9 @@ deleted_callback_(std::move(deleted_callback)), is_locked_(true) {} + DiscardableMemoryImpl(const DiscardableMemoryImpl&) = delete; + DiscardableMemoryImpl& operator=(const DiscardableMemoryImpl&) = delete; + ~DiscardableMemoryImpl() override { if (is_locked_) shared_memory_->Unlock(0, 0); @@ -148,8 +154,6 @@ std::unique_ptr<base::DiscardableSharedMemory> shared_memory_; base::OnceClosure deleted_callback_; bool is_locked_; - - DISALLOW_COPY_AND_ASSIGN(DiscardableMemoryImpl); }; // Returns the default memory limit to use for discardable memory, taking
diff --git a/components/discardable_memory/service/discardable_shared_memory_manager.h b/components/discardable_memory/service/discardable_shared_memory_manager.h index eafa161c..2029437ae 100644 --- a/components/discardable_memory/service/discardable_shared_memory_manager.h +++ b/components/discardable_memory/service/discardable_shared_memory_manager.h
@@ -49,6 +49,12 @@ public base::CurrentThread::DestructionObserver { public: DiscardableSharedMemoryManager(); + + DiscardableSharedMemoryManager(const DiscardableSharedMemoryManager&) = + delete; + DiscardableSharedMemoryManager& operator=( + const DiscardableSharedMemoryManager&) = delete; + ~DiscardableSharedMemoryManager() override; // Returns the global instance of DiscardableSharedMemoryManager, usable from @@ -183,8 +189,6 @@ // WeakPtrFractory for generating weak pointers used in the mojo thread. base::WeakPtrFactory<DiscardableSharedMemoryManager> mojo_thread_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DiscardableSharedMemoryManager); }; } // namespace discardable_memory
diff --git a/components/dom_distiller/core/distilled_page_prefs.h b/components/dom_distiller/core/distilled_page_prefs.h index c074a139..20201c5c 100644 --- a/components/dom_distiller/core/distilled_page_prefs.h +++ b/components/dom_distiller/core/distilled_page_prefs.h
@@ -29,6 +29,10 @@ }; explicit DistilledPagePrefs(PrefService* pref_service); + + DistilledPagePrefs(const DistilledPagePrefs&) = delete; + DistilledPagePrefs& operator=(const DistilledPagePrefs&) = delete; + ~DistilledPagePrefs(); static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); @@ -63,8 +67,6 @@ base::ObserverList<Observer>::Unchecked observers_; base::WeakPtrFactory<DistilledPagePrefs> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefs); }; } // namespace dom_distiller
diff --git a/components/dom_distiller/core/distilled_page_prefs_android.h b/components/dom_distiller/core/distilled_page_prefs_android.h index 8496a1d1..c5f37a6 100644 --- a/components/dom_distiller/core/distilled_page_prefs_android.h +++ b/components/dom_distiller/core/distilled_page_prefs_android.h
@@ -19,6 +19,11 @@ DistilledPagePrefsAndroid(JNIEnv* env, jobject obj, DistilledPagePrefs* distilled_page_prefs_ptr); + + DistilledPagePrefsAndroid(const DistilledPagePrefsAndroid&) = delete; + DistilledPagePrefsAndroid& operator=(const DistilledPagePrefsAndroid&) = + delete; + virtual ~DistilledPagePrefsAndroid(); void SetFontFamily(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj, @@ -44,8 +49,6 @@ private: DistilledPagePrefs* distilled_page_prefs_; - - DISALLOW_COPY_AND_ASSIGN(DistilledPagePrefsAndroid); }; class DistilledPagePrefsObserverAndroid : public DistilledPagePrefs::Observer {
diff --git a/components/dom_distiller/ios/distiller_page_factory_ios.h b/components/dom_distiller/ios/distiller_page_factory_ios.h index ecd2285..7d391bc 100644 --- a/components/dom_distiller/ios/distiller_page_factory_ios.h +++ b/components/dom_distiller/ios/distiller_page_factory_ios.h
@@ -21,6 +21,10 @@ class DistillerPageFactoryIOS : public DistillerPageFactory { public: explicit DistillerPageFactoryIOS(web::BrowserState* browser_state); + + DistillerPageFactoryIOS(const DistillerPageFactoryIOS&) = delete; + DistillerPageFactoryIOS& operator=(const DistillerPageFactoryIOS&) = delete; + ~DistillerPageFactoryIOS() override; // Implementation of DistillerPageFactory: @@ -31,7 +35,6 @@ private: web::BrowserState* browser_state_; - DISALLOW_COPY_AND_ASSIGN(DistillerPageFactoryIOS); }; } // namespace dom_distiller
diff --git a/components/dom_distiller/ios/distiller_page_ios.h b/components/dom_distiller/ios/distiller_page_ios.h index 2e28b36..c7de56d 100644 --- a/components/dom_distiller/ios/distiller_page_ios.h +++ b/components/dom_distiller/ios/distiller_page_ios.h
@@ -28,6 +28,10 @@ class DistillerPageIOS : public DistillerPage, public web::WebStateObserver { public: explicit DistillerPageIOS(web::BrowserState* browser_state); + + DistillerPageIOS(const DistillerPageIOS&) = delete; + DistillerPageIOS& operator=(const DistillerPageIOS&) = delete; + ~DistillerPageIOS() override; protected: @@ -75,8 +79,6 @@ bool loading_ = false; base::WeakPtrFactory<DistillerPageIOS> weak_ptr_factory_; - - DISALLOW_COPY_AND_ASSIGN(DistillerPageIOS); }; } // namespace dom_distiller
diff --git a/components/domain_reliability/config.h b/components/domain_reliability/config.h index 3efa6dc..abef394a 100644 --- a/components/domain_reliability/config.h +++ b/components/domain_reliability/config.h
@@ -22,6 +22,10 @@ struct DOMAIN_RELIABILITY_EXPORT DomainReliabilityConfig { public: DomainReliabilityConfig(); + + DomainReliabilityConfig(const DomainReliabilityConfig&) = delete; + DomainReliabilityConfig& operator=(const DomainReliabilityConfig&) = delete; + ~DomainReliabilityConfig(); // Uses the JSONValueConverter to parse the JSON for a config into a struct. @@ -47,9 +51,6 @@ double success_sample_rate; double failure_sample_rate; std::vector<std::unique_ptr<std::string>> path_prefixes; - - private: - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityConfig); }; } // namespace domain_reliability
diff --git a/components/domain_reliability/context.h b/components/domain_reliability/context.h index fc14143..774b294e 100644 --- a/components/domain_reliability/context.h +++ b/components/domain_reliability/context.h
@@ -55,6 +55,10 @@ DomainReliabilityDispatcher* dispatcher, DomainReliabilityUploader* uploader, std::unique_ptr<const DomainReliabilityConfig> config); + + DomainReliabilityContext(const DomainReliabilityContext&) = delete; + DomainReliabilityContext& operator=(const DomainReliabilityContext&) = delete; + ~DomainReliabilityContext(); // Notifies the context of a beacon on its domain(s); may or may not save the @@ -135,8 +139,6 @@ const UploadAllowedCallback& upload_allowed_callback_; base::WeakPtrFactory<DomainReliabilityContext> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContext); }; } // namespace domain_reliability
diff --git a/components/domain_reliability/context_manager.h b/components/domain_reliability/context_manager.h index c4675c3f..1a3e538 100644 --- a/components/domain_reliability/context_manager.h +++ b/components/domain_reliability/context_manager.h
@@ -32,6 +32,12 @@ const std::string& upload_reporter_string, DomainReliabilityContext::UploadAllowedCallback upload_allowed_callback, DomainReliabilityDispatcher* dispatcher); + + DomainReliabilityContextManager(const DomainReliabilityContextManager&) = + delete; + DomainReliabilityContextManager& operator=( + const DomainReliabilityContextManager&) = delete; + ~DomainReliabilityContextManager(); // If |url| maps to a context added to this manager, calls |OnBeacon| on @@ -103,8 +109,6 @@ DomainReliabilityUploader* uploader_ = nullptr; ContextMap contexts_; - - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityContextManager); }; } // namespace domain_reliability
diff --git a/components/domain_reliability/dispatcher.h b/components/domain_reliability/dispatcher.h index e3e95809..1ee4512 100644 --- a/components/domain_reliability/dispatcher.h +++ b/components/domain_reliability/dispatcher.h
@@ -26,6 +26,11 @@ class DOMAIN_RELIABILITY_EXPORT DomainReliabilityDispatcher { public: explicit DomainReliabilityDispatcher(MockableTime* time); + + DomainReliabilityDispatcher(const DomainReliabilityDispatcher&) = delete; + DomainReliabilityDispatcher& operator=(const DomainReliabilityDispatcher&) = + delete; + ~DomainReliabilityDispatcher(); // Schedules |task| to be executed between |min_delay| and |max_delay| from @@ -61,8 +66,6 @@ MockableTime* time_; std::set<std::unique_ptr<Task>, base::UniquePtrComparator> tasks_; std::set<Task*> eligible_tasks_; - - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityDispatcher); }; } // namespace domain_reliability
diff --git a/components/domain_reliability/monitor.h b/components/domain_reliability/monitor.h index 5a96a529..035112c 100644 --- a/components/domain_reliability/monitor.h +++ b/components/domain_reliability/monitor.h
@@ -84,6 +84,9 @@ upload_allowed_callback, std::unique_ptr<MockableTime> time); + DomainReliabilityMonitor(const DomainReliabilityMonitor&) = delete; + DomainReliabilityMonitor& operator=(const DomainReliabilityMonitor&) = delete; + ~DomainReliabilityMonitor() override; // Shuts down the monitor prior to destruction. Currently, ensures that there @@ -154,8 +157,6 @@ DomainReliabilityContextManager context_manager_; bool discard_uploads_set_; - - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityMonitor); }; } // namespace domain_reliability
diff --git a/components/domain_reliability/scheduler.h b/components/domain_reliability/scheduler.h index 41d198e9..173984b 100644 --- a/components/domain_reliability/scheduler.h +++ b/components/domain_reliability/scheduler.h
@@ -55,6 +55,11 @@ size_t num_collectors, const Params& params, const ScheduleUploadCallback& callback); + + DomainReliabilityScheduler(const DomainReliabilityScheduler&) = delete; + DomainReliabilityScheduler& operator=(const DomainReliabilityScheduler&) = + delete; + ~DomainReliabilityScheduler(); // If there is no upload pending, schedules an upload based on the provided @@ -125,8 +130,6 @@ base::TimeTicks last_upload_end_time_; size_t last_upload_collector_index_; bool last_upload_success_; - - DISALLOW_COPY_AND_ASSIGN(DomainReliabilityScheduler); }; } // namespace domain_reliability
diff --git a/components/download/content/internal/download_driver_impl.h b/components/download/content/internal/download_driver_impl.h index 6f97194d..22729a8 100644 --- a/components/download/content/internal/download_driver_impl.h +++ b/components/download/content/internal/download_driver_impl.h
@@ -34,6 +34,10 @@ // Create the driver. DownloadDriverImpl( SimpleDownloadManagerCoordinator* download_manager_coordinator); + + DownloadDriverImpl(const DownloadDriverImpl&) = delete; + DownloadDriverImpl& operator=(const DownloadDriverImpl&) = delete; + ~DownloadDriverImpl() override; // DownloadDriver implementation. @@ -90,8 +94,6 @@ // Only used to post tasks on the same thread. base::WeakPtrFactory<DownloadDriverImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadDriverImpl); }; } // namespace download
diff --git a/components/download/content/internal/download_driver_impl_unittest.cc b/components/download/content/internal/download_driver_impl_unittest.cc index 7535bdc..5036fe82c 100644 --- a/components/download/content/internal/download_driver_impl_unittest.cc +++ b/components/download/content/internal/download_driver_impl_unittest.cc
@@ -57,6 +57,9 @@ task_runner_(new base::TestSimpleTaskRunner), handle_(task_runner_) {} + DownloadDriverImplTest(const DownloadDriverImplTest&) = delete; + DownloadDriverImplTest& operator=(const DownloadDriverImplTest&) = delete; + ~DownloadDriverImplTest() override = default; void SetUp() override { @@ -75,9 +78,6 @@ protected: scoped_refptr<base::TestSimpleTaskRunner> task_runner_; base::ThreadTaskRunnerHandle handle_; - - private: - DISALLOW_COPY_AND_ASSIGN(DownloadDriverImplTest); }; // Ensure the download manager can be initialized after the download driver.
diff --git a/components/download/content/public/all_download_item_notifier.h b/components/download/content/public/all_download_item_notifier.h index ff547ff..6c2d962 100644 --- a/components/download/content/public/all_download_item_notifier.h +++ b/components/download/content/public/all_download_item_notifier.h
@@ -44,6 +44,10 @@ class Observer { public: Observer() {} + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} virtual void OnManagerInitialized(content::DownloadManager* manager) {} @@ -58,14 +62,14 @@ download::DownloadItem* item) {} virtual void OnDownloadDestroyed(content::DownloadManager* manager, download::DownloadItem* item) {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; AllDownloadItemNotifier(content::DownloadManager* manager, Observer* observer); + AllDownloadItemNotifier(const AllDownloadItemNotifier&) = delete; + AllDownloadItemNotifier& operator=(const AllDownloadItemNotifier&) = delete; + ~AllDownloadItemNotifier() override; // Returns nullptr if the manager has gone down. @@ -91,8 +95,6 @@ AllDownloadItemNotifier::Observer* observer_; std::set<DownloadItem*> observing_; base::WeakPtrFactory<AllDownloadItemNotifier> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifier); }; } // namespace download
diff --git a/components/download/content/public/all_download_item_notifier_unittest.cc b/components/download/content/public/all_download_item_notifier_unittest.cc index 43b9814..41f793c 100644 --- a/components/download/content/public/all_download_item_notifier_unittest.cc +++ b/components/download/content/public/all_download_item_notifier_unittest.cc
@@ -22,6 +22,10 @@ class MockNotifierObserver : public AllDownloadItemNotifier::Observer { public: MockNotifierObserver() {} + + MockNotifierObserver(const MockNotifierObserver&) = delete; + MockNotifierObserver& operator=(const MockNotifierObserver&) = delete; + ~MockNotifierObserver() override {} MOCK_METHOD(void, @@ -44,9 +48,6 @@ OnDownloadDestroyed, (content::DownloadManager * manager, DownloadItem* item), (override)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNotifierObserver); }; class AllDownloadItemNotifierTest : public testing::Test { @@ -54,6 +55,10 @@ AllDownloadItemNotifierTest() : download_manager_(new content::MockDownloadManager) {} + AllDownloadItemNotifierTest(const AllDownloadItemNotifierTest&) = delete; + AllDownloadItemNotifierTest& operator=(const AllDownloadItemNotifierTest&) = + delete; + ~AllDownloadItemNotifierTest() override {} content::MockDownloadManager& manager() { return *download_manager_; } @@ -83,8 +88,6 @@ std::unique_ptr<content::MockDownloadManager> download_manager_; std::unique_ptr<AllDownloadItemNotifier> notifier_; NiceMock<MockNotifierObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(AllDownloadItemNotifierTest); }; } // namespace
diff --git a/components/download/content/public/download_navigation_observer.h b/components/download/content/public/download_navigation_observer.h index 93cf4b9e0..067e596 100644 --- a/components/download/content/public/download_navigation_observer.h +++ b/components/download/content/public/download_navigation_observer.h
@@ -20,6 +20,11 @@ public: DownloadNavigationObserver(content::WebContents* web_contents, NavigationMonitor* navigation_monitor); + + DownloadNavigationObserver(const DownloadNavigationObserver&) = delete; + DownloadNavigationObserver& operator=(const DownloadNavigationObserver&) = + delete; + ~DownloadNavigationObserver() override; private: @@ -36,8 +41,6 @@ NavigationMonitor* navigation_monitor_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(DownloadNavigationObserver); }; } // namespace download
diff --git a/components/download/database/download_db_impl.h b/components/download/database/download_db_impl.h index ba3ba58..11e96bf 100644 --- a/components/download/database/download_db_impl.h +++ b/components/download/database/download_db_impl.h
@@ -34,6 +34,10 @@ DownloadNamespace download_namespace, std::unique_ptr< leveldb_proto::ProtoDatabase<download_pb::DownloadDBEntry>> db); + + DownloadDBImpl(const DownloadDBImpl&) = delete; + DownloadDBImpl& operator=(const DownloadDBImpl&) = delete; + ~DownloadDBImpl() override; // DownloadDB implementation. @@ -84,8 +88,6 @@ int num_initialize_attempts_ = 0; base::WeakPtrFactory<DownloadDBImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadDBImpl); }; } // namespace download
diff --git a/components/download/database/download_db_impl_unittest.cc b/components/download/database/download_db_impl_unittest.cc index 4dde367..bb88265 100644 --- a/components/download/database/download_db_impl_unittest.cc +++ b/components/download/database/download_db_impl_unittest.cc
@@ -42,6 +42,9 @@ public: DownloadDBTest() : db_(nullptr), init_success_(false) {} + DownloadDBTest(const DownloadDBTest&) = delete; + DownloadDBTest& operator=(const DownloadDBTest&) = delete; + ~DownloadDBTest() override = default; void CreateDatabase() { @@ -89,7 +92,6 @@ leveldb_proto::test::FakeDB<download_pb::DownloadDBEntry>* db_; std::unique_ptr<DownloadDBImpl> download_db_; bool init_success_; - DISALLOW_COPY_AND_ASSIGN(DownloadDBTest); }; TEST_F(DownloadDBTest, InitializeSucceeded) {
diff --git a/components/download/internal/background_service/android/battery_status_listener_android.h b/components/download/internal/background_service/android/battery_status_listener_android.h index fcedf8b..96c73f9 100644 --- a/components/download/internal/background_service/android/battery_status_listener_android.h +++ b/components/download/internal/background_service/android/battery_status_listener_android.h
@@ -16,13 +16,15 @@ class BatteryStatusListenerAndroid : public BatteryStatusListenerImpl { public: BatteryStatusListenerAndroid(const base::TimeDelta& battery_query_interval); + + BatteryStatusListenerAndroid(const BatteryStatusListenerAndroid&) = delete; + BatteryStatusListenerAndroid& operator=(const BatteryStatusListenerAndroid&) = + delete; + ~BatteryStatusListenerAndroid() override; // BatteryStatusListener implementation. int GetBatteryPercentageInternal() override; - - private: - DISALLOW_COPY_AND_ASSIGN(BatteryStatusListenerAndroid); }; } // namespace download
diff --git a/components/download/internal/background_service/blob_task_proxy.h b/components/download/internal/background_service/blob_task_proxy.h index 7de3466b..59ff89b 100644 --- a/components/download/internal/background_service/blob_task_proxy.h +++ b/components/download/internal/background_service/blob_task_proxy.h
@@ -37,6 +37,10 @@ BlobTaskProxy(BlobContextGetter blob_context_getter, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + + BlobTaskProxy(const BlobTaskProxy&) = delete; + BlobTaskProxy& operator=(const BlobTaskProxy&) = delete; + ~BlobTaskProxy(); // Save blob data on UI thread. |callback| will be called on main thread after @@ -66,8 +70,6 @@ // Bounded to IO thread task runner. base::WeakPtrFactory<BlobTaskProxy> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BlobTaskProxy); }; } // namespace download
diff --git a/components/download/internal/background_service/client_set.h b/components/download/internal/background_service/client_set.h index 4bfd49a..739b4dc 100644 --- a/components/download/internal/background_service/client_set.h +++ b/components/download/internal/background_service/client_set.h
@@ -19,6 +19,10 @@ class ClientSet { public: explicit ClientSet(std::unique_ptr<DownloadClientMap> clients); + + ClientSet(const ClientSet&) = delete; + ClientSet& operator=(const ClientSet&) = delete; + virtual ~ClientSet(); std::set<DownloadClient> GetRegisteredClients() const; @@ -26,8 +30,6 @@ private: std::unique_ptr<DownloadClientMap> clients_; - - DISALLOW_COPY_AND_ASSIGN(ClientSet); }; } // namespace download
diff --git a/components/download/internal/background_service/controller.h b/components/download/internal/background_service/controller.h index e73b6d4..e052b1a0 100644 --- a/components/download/internal/background_service/controller.h +++ b/components/download/internal/background_service/controller.h
@@ -38,6 +38,10 @@ }; Controller() = default; + + Controller(const Controller&) = delete; + Controller& operator=(const Controller&) = delete; + ~Controller() override = default; // Returns the status of Controller. @@ -46,9 +50,6 @@ // Exposes the owner of the download request for |guid| if one exists. // Otherwise returns DownloadClient::INVALID for an unowned entry. virtual DownloadClient GetOwnerOfDownload(const std::string& guid) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Controller); }; } // namespace download
diff --git a/components/download/internal/background_service/controller_impl.h b/components/download/internal/background_service/controller_impl.h index 8fc9220..0a73a083 100644 --- a/components/download/internal/background_service/controller_impl.h +++ b/components/download/internal/background_service/controller_impl.h
@@ -69,6 +69,10 @@ std::unique_ptr<TaskScheduler> task_scheduler, std::unique_ptr<FileMonitor> file_monitor, const base::FilePath& download_file_dir); + + ControllerImpl(const ControllerImpl&) = delete; + ControllerImpl& operator=(const ControllerImpl&) = delete; + ~ControllerImpl() override; // Controller implementation. @@ -283,8 +287,6 @@ // Only used to post tasks on the same thread. base::WeakPtrFactory<ControllerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ControllerImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/controller_impl_unittest.cc b/components/download/internal/background_service/controller_impl_unittest.cc index bbd1b16..0004a1d 100644 --- a/components/download/internal/background_service/controller_impl_unittest.cc +++ b/components/download/internal/background_service/controller_impl_unittest.cc
@@ -73,6 +73,10 @@ class UploadClient : public test::MockClient { public: UploadClient() = default; + + UploadClient(const UploadClient&) = delete; + UploadClient& operator=(const UploadClient&) = delete; + ~UploadClient() override = default; void GetUploadData(const std::string& guid, @@ -82,8 +86,6 @@ private: std::map<std::string, unsigned int> upload_response_delay_; - - DISALLOW_COPY_AND_ASSIGN(UploadClient); }; void UploadClient::GetUploadData(const std::string& guid, @@ -140,6 +142,11 @@ base::Unretained(this)); } + DownloadServiceControllerImplTest(const DownloadServiceControllerImplTest&) = + delete; + DownloadServiceControllerImplTest& operator=( + const DownloadServiceControllerImplTest&) = delete; + ~DownloadServiceControllerImplTest() override = default; void SetUp() override { @@ -237,9 +244,6 @@ base::RepeatingCallback<void(const std::string&, DownloadParams::StartResult)> start_callback_; bool init_callback_called_; - - private: - DISALLOW_COPY_AND_ASSIGN(DownloadServiceControllerImplTest); }; } // namespace
diff --git a/components/download/internal/background_service/debugging_client.h b/components/download/internal/background_service/debugging_client.h index 252c811..b665be4e 100644 --- a/components/download/internal/background_service/debugging_client.h +++ b/components/download/internal/background_service/debugging_client.h
@@ -15,6 +15,10 @@ class DebuggingClient : public Client { public: DebuggingClient() = default; + + DebuggingClient(const DebuggingClient&) = delete; + DebuggingClient& operator=(const DebuggingClient&) = delete; + ~DebuggingClient() override = default; private: @@ -39,8 +43,6 @@ bool force_delete) override; void GetUploadData(const std::string& guid, GetUploadDataCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(DebuggingClient); }; } // namespace download
diff --git a/components/download/internal/background_service/download_store.h b/components/download/internal/background_service/download_store.h index 9914b6a..60150428 100644 --- a/components/download/internal/background_service/download_store.h +++ b/components/download/internal/background_service/download_store.h
@@ -27,6 +27,10 @@ public: DownloadStore( std::unique_ptr<leveldb_proto::ProtoDatabase<protodb::Entry>> db); + + DownloadStore(const DownloadStore&) = delete; + DownloadStore& operator=(const DownloadStore&) = delete; + ~DownloadStore() override; // Store implementation. @@ -50,8 +54,6 @@ bool is_initialized_; base::WeakPtrFactory<DownloadStore> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadStore); }; } // namespace download
diff --git a/components/download/internal/background_service/download_store_unittest.cc b/components/download/internal/background_service/download_store_unittest.cc index c9f1247..8af4f09 100644 --- a/components/download/internal/background_service/download_store_unittest.cc +++ b/components/download/internal/background_service/download_store_unittest.cc
@@ -27,6 +27,9 @@ public: DownloadStoreTest() : db_(nullptr) {} + DownloadStoreTest(const DownloadStoreTest&) = delete; + DownloadStoreTest& operator=(const DownloadStoreTest&) = delete; + ~DownloadStoreTest() override = default; void CreateDatabase() { @@ -66,8 +69,6 @@ leveldb_proto::test::FakeDB<protodb::Entry>* db_; std::unique_ptr<DownloadStore> store_; absl::optional<bool> hard_recover_result_; - - DISALLOW_COPY_AND_ASSIGN(DownloadStoreTest); }; TEST_F(DownloadStoreTest, Initialize) {
diff --git a/components/download/internal/background_service/empty_file_monitor.h b/components/download/internal/background_service/empty_file_monitor.h index f12dc15..219cbaa1 100644 --- a/components/download/internal/background_service/empty_file_monitor.h +++ b/components/download/internal/background_service/empty_file_monitor.h
@@ -17,6 +17,10 @@ class EmptyFileMonitor : public FileMonitor { public: EmptyFileMonitor(); + + EmptyFileMonitor(const EmptyFileMonitor&) = delete; + EmptyFileMonitor& operator=(const EmptyFileMonitor&) = delete; + ~EmptyFileMonitor() override; private: @@ -33,8 +37,6 @@ void HardRecover(InitCallback callback) override; base::WeakPtrFactory<EmptyFileMonitor> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(EmptyFileMonitor); }; } // namespace download
diff --git a/components/download/internal/background_service/file_monitor_impl.h b/components/download/internal/background_service/file_monitor_impl.h index f265924..4fc4b34 100644 --- a/components/download/internal/background_service/file_monitor_impl.h +++ b/components/download/internal/background_service/file_monitor_impl.h
@@ -28,6 +28,10 @@ FileMonitorImpl( const base::FilePath& download_file_dir, const scoped_refptr<base::SequencedTaskRunner>& file_thread_task_runner); + + FileMonitorImpl(const FileMonitorImpl&) = delete; + FileMonitorImpl& operator=(const FileMonitorImpl&) = delete; + ~FileMonitorImpl() override; // FileMonitor implementation. @@ -48,8 +52,6 @@ scoped_refptr<base::SequencedTaskRunner> file_thread_task_runner_; base::WeakPtrFactory<FileMonitorImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FileMonitorImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/file_monitor_unittest.cc b/components/download/internal/background_service/file_monitor_unittest.cc index 9682602..faf8430 100644 --- a/components/download/internal/background_service/file_monitor_unittest.cc +++ b/components/download/internal/background_service/file_monitor_unittest.cc
@@ -31,6 +31,9 @@ handle_(task_runner_), completion_callback_called_(false) {} + FileMonitorTest(const FileMonitorTest&) = delete; + FileMonitorTest& operator=(const FileMonitorTest&) = delete; + ~FileMonitorTest() override = default; void HardRecoveryResponse(bool result); @@ -55,9 +58,6 @@ std::unique_ptr<FileMonitor> monitor_; absl::optional<bool> hard_recovery_result_; - - private: - DISALLOW_COPY_AND_ASSIGN(FileMonitorTest); }; base::FilePath FileMonitorTest::CreateTemporaryFile(std::string file_name) {
diff --git a/components/download/internal/background_service/in_memory_download.h b/components/download/internal/background_service/in_memory_download.h index cd1a9a3..a0ed516 100644 --- a/components/download/internal/background_service/in_memory_download.h +++ b/components/download/internal/background_service/in_memory_download.h
@@ -97,6 +97,9 @@ COMPLETE, }; + InMemoryDownload(const InMemoryDownload&) = delete; + InMemoryDownload& operator=(const InMemoryDownload&) = delete; + virtual ~InMemoryDownload(); // Send the download request. @@ -148,9 +151,6 @@ uint64_t bytes_downloaded_; uint64_t bytes_uploaded_; - - private: - DISALLOW_COPY_AND_ASSIGN(InMemoryDownload); }; // Implementation of InMemoryDownload and uses SimpleURLLoader as network @@ -173,6 +173,9 @@ network::mojom::URLLoaderFactory* url_loader_factory, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + InMemoryDownloadImpl(const InMemoryDownloadImpl&) = delete; + InMemoryDownloadImpl& operator=(const InMemoryDownloadImpl&) = delete; + ~InMemoryDownloadImpl() override; private: @@ -261,8 +264,6 @@ // Bounded to main thread task runner. base::WeakPtrFactory<InMemoryDownloadImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InMemoryDownloadImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/in_memory_download_driver.h b/components/download/internal/background_service/in_memory_download_driver.h index b08db47..6b92dea 100644 --- a/components/download/internal/background_service/in_memory_download_driver.h +++ b/components/download/internal/background_service/in_memory_download_driver.h
@@ -25,6 +25,10 @@ InMemoryDownloadFactory( network::mojom::URLLoaderFactory* url_loader_factory, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + + InMemoryDownloadFactory(const InMemoryDownloadFactory&) = delete; + InMemoryDownloadFactory& operator=(const InMemoryDownloadFactory&) = delete; + ~InMemoryDownloadFactory() override; private: @@ -39,8 +43,6 @@ network::mojom::URLLoaderFactory* url_loader_factory_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(InMemoryDownloadFactory); }; // Download backend that owns the list of in memory downloads and propagate @@ -51,6 +53,10 @@ InMemoryDownloadDriver( std::unique_ptr<InMemoryDownload::Factory> download_factory, BlobContextGetterFactoryPtr blob_context_getter_factory); + + InMemoryDownloadDriver(const InMemoryDownloadDriver&) = delete; + InMemoryDownloadDriver& operator=(const InMemoryDownloadDriver&) = delete; + ~InMemoryDownloadDriver() override; private: @@ -89,8 +95,6 @@ // A map of GUID and in memory download, which holds download data. std::map<std::string, std::unique_ptr<InMemoryDownload>> downloads_; - - DISALLOW_COPY_AND_ASSIGN(InMemoryDownloadDriver); }; } // namespace download
diff --git a/components/download/internal/background_service/in_memory_download_driver_unittest.cc b/components/download/internal/background_service/in_memory_download_driver_unittest.cc index 8a5d355..6234f70 100644 --- a/components/download/internal/background_service/in_memory_download_driver_unittest.cc +++ b/components/download/internal/background_service/in_memory_download_driver_unittest.cc
@@ -28,11 +28,15 @@ class NoopBlobContextGetterFactory : public BlobContextGetterFactory { public: NoopBlobContextGetterFactory() = default; + + NoopBlobContextGetterFactory(const NoopBlobContextGetterFactory&) = delete; + NoopBlobContextGetterFactory& operator=(const NoopBlobContextGetterFactory&) = + delete; + ~NoopBlobContextGetterFactory() override = default; private: void RetrieveBlobContextGetter(BlobContextGetterCallback callback) override {} - DISALLOW_COPY_AND_ASSIGN(NoopBlobContextGetterFactory); }; // Test in memory download that doesn't do complex IO. @@ -78,6 +82,11 @@ class TestInMemoryDownloadFactory : public InMemoryDownload::Factory { public: TestInMemoryDownloadFactory() = default; + + TestInMemoryDownloadFactory(const TestInMemoryDownloadFactory&) = delete; + TestInMemoryDownloadFactory& operator=(const TestInMemoryDownloadFactory&) = + delete; + ~TestInMemoryDownloadFactory() override = default; // InMemoryDownload::Factory implementation. @@ -98,12 +107,16 @@ private: TestInMemoryDownload* download_ = nullptr; - DISALLOW_COPY_AND_ASSIGN(TestInMemoryDownloadFactory); }; class InMemoryDownloadDriverTest : public testing::Test { public: InMemoryDownloadDriverTest() = default; + + InMemoryDownloadDriverTest(const InMemoryDownloadDriverTest&) = delete; + InMemoryDownloadDriverTest& operator=(const InMemoryDownloadDriverTest&) = + delete; + ~InMemoryDownloadDriverTest() override = default; // Helper method to call public method on |driver_|. @@ -140,7 +153,6 @@ testing::NiceMock<MockDriverClient> driver_client_; std::unique_ptr<InMemoryDownloadDriver> driver_; TestInMemoryDownloadFactory* factory_; - DISALLOW_COPY_AND_ASSIGN(InMemoryDownloadDriverTest); }; // Verifies in memory download success and remove API.
diff --git a/components/download/internal/background_service/in_memory_download_unittest.cc b/components/download/internal/background_service/in_memory_download_unittest.cc index 013e6673..5f3ed6b 100644 --- a/components/download/internal/background_service/in_memory_download_unittest.cc +++ b/components/download/internal/background_service/in_memory_download_unittest.cc
@@ -88,6 +88,10 @@ class InMemoryDownloadTest : public testing::Test { public: InMemoryDownloadTest() = default; + + InMemoryDownloadTest(const InMemoryDownloadTest&) = delete; + InMemoryDownloadTest& operator=(const InMemoryDownloadTest&) = delete; + ~InMemoryDownloadTest() override = default; void SetUp() override { @@ -185,8 +189,6 @@ // Memory backed blob storage that can never page to disk. std::unique_ptr<storage::BlobStorageContext> blob_storage_context_; - - DISALLOW_COPY_AND_ASSIGN(InMemoryDownloadTest); }; TEST_F(InMemoryDownloadTest, DownloadTest) {
diff --git a/components/download/internal/background_service/init_aware_background_download_service.h b/components/download/internal/background_service/init_aware_background_download_service.h index e0b01346..f8277ac213 100644 --- a/components/download/internal/background_service/init_aware_background_download_service.h +++ b/components/download/internal/background_service/init_aware_background_download_service.h
@@ -27,6 +27,12 @@ public: explicit InitAwareBackgroundDownloadService( std::unique_ptr<InitializableBackgroundDownloadService> service); + + InitAwareBackgroundDownloadService( + const InitAwareBackgroundDownloadService&) = delete; + InitAwareBackgroundDownloadService& operator=( + const InitAwareBackgroundDownloadService&) = delete; + ~InitAwareBackgroundDownloadService() override; // BackgroundDownloadService implementation. @@ -54,8 +60,6 @@ base::WeakPtrFactory<InitAwareBackgroundDownloadService> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(InitAwareBackgroundDownloadService); }; } // namespace download
diff --git a/components/download/internal/background_service/init_aware_background_download_service_unittest.cc b/components/download/internal/background_service/init_aware_background_download_service_unittest.cc index 791a96a..c80128a 100644 --- a/components/download/internal/background_service/init_aware_background_download_service_unittest.cc +++ b/components/download/internal/background_service/init_aware_background_download_service_unittest.cc
@@ -29,6 +29,12 @@ : controller_(nullptr), task_runner_(new base::TestSimpleTaskRunner), handle_(task_runner_) {} + + InitAwareBackgroundDownloadServiceTest( + const InitAwareBackgroundDownloadServiceTest&) = delete; + InitAwareBackgroundDownloadServiceTest& operator=( + const InitAwareBackgroundDownloadServiceTest&) = delete; + ~InitAwareBackgroundDownloadServiceTest() override = default; void SetUp() override { @@ -43,8 +49,6 @@ std::unique_ptr<InitAwareBackgroundDownloadService> service_; scoped_refptr<base::TestSimpleTaskRunner> task_runner_; base::ThreadTaskRunnerHandle handle_; - - DISALLOW_COPY_AND_ASSIGN(InitAwareBackgroundDownloadServiceTest); }; } // namespace
diff --git a/components/download/internal/background_service/logger_impl.h b/components/download/internal/background_service/logger_impl.h index 7a8bfc52..4ccc630 100644 --- a/components/download/internal/background_service/logger_impl.h +++ b/components/download/internal/background_service/logger_impl.h
@@ -29,6 +29,10 @@ class LoggerImpl : public Logger, public LogSink { public: LoggerImpl(); + + LoggerImpl(const LoggerImpl&) = delete; + LoggerImpl& operator=(const LoggerImpl&) = delete; + ~LoggerImpl() override; void SetLogSource(LogSource* log_source); @@ -52,8 +56,6 @@ LogSource* log_source_; base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(LoggerImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/model_impl.h b/components/download/internal/background_service/model_impl.h index c94675c..c0cefea1 100644 --- a/components/download/internal/background_service/model_impl.h +++ b/components/download/internal/background_service/model_impl.h
@@ -24,6 +24,10 @@ class ModelImpl : public Model { public: ModelImpl(std::unique_ptr<Store> store); + + ModelImpl(const ModelImpl&) = delete; + ModelImpl& operator=(const ModelImpl&) = delete; + ~ModelImpl() override; // Model implementation. @@ -65,8 +69,6 @@ OwnedEntryMap entries_; base::WeakPtrFactory<ModelImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ModelImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/model_impl_unittest.cc b/components/download/internal/background_service/model_impl_unittest.cc index 6a9a640..5f04fb7 100644 --- a/components/download/internal/background_service/model_impl_unittest.cc +++ b/components/download/internal/background_service/model_impl_unittest.cc
@@ -31,6 +31,10 @@ public: DownloadServiceModelImplTest() : store_(nullptr) {} + DownloadServiceModelImplTest(const DownloadServiceModelImplTest&) = delete; + DownloadServiceModelImplTest& operator=(const DownloadServiceModelImplTest&) = + delete; + ~DownloadServiceModelImplTest() override = default; void SetUp() override { @@ -43,9 +47,6 @@ test::MockModelClient client_; test::TestStore* store_; std::unique_ptr<ModelImpl> model_; - - private: - DISALLOW_COPY_AND_ASSIGN(DownloadServiceModelImplTest); }; } // namespace
diff --git a/components/download/internal/background_service/navigation_monitor_impl.h b/components/download/internal/background_service/navigation_monitor_impl.h index 554f7275..10f4e5e 100644 --- a/components/download/internal/background_service/navigation_monitor_impl.h +++ b/components/download/internal/background_service/navigation_monitor_impl.h
@@ -15,6 +15,10 @@ class NavigationMonitorImpl : public NavigationMonitor { public: NavigationMonitorImpl(); + + NavigationMonitorImpl(const NavigationMonitorImpl&) = delete; + NavigationMonitorImpl& operator=(const NavigationMonitorImpl&) = delete; + ~NavigationMonitorImpl() override; // NavigationMonitor implementation. @@ -41,8 +45,6 @@ base::TimeDelta navigation_timeout_delay_; base::WeakPtrFactory<NavigationMonitorImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NavigationMonitorImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/navigation_monitor_impl_unittests.cc b/components/download/internal/background_service/navigation_monitor_impl_unittests.cc index c3b0fa47..3efa44d 100644 --- a/components/download/internal/background_service/navigation_monitor_impl_unittests.cc +++ b/components/download/internal/background_service/navigation_monitor_impl_unittests.cc
@@ -23,6 +23,11 @@ : task_runner_(task_runner), monitor_(monitor), navigation_in_progress_(false) {} + + TestNavigationMonitorObserver(const TestNavigationMonitorObserver&) = delete; + TestNavigationMonitorObserver& operator=( + const TestNavigationMonitorObserver&) = delete; + ~TestNavigationMonitorObserver() override = default; void OnNavigationEvent() override { @@ -46,14 +51,17 @@ NavigationMonitor* monitor_; bool navigation_in_progress_; base::WeakPtrFactory<TestNavigationMonitorObserver> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestNavigationMonitorObserver); }; class NavigationMonitorImplTest : public testing::Test { public: NavigationMonitorImplTest() : task_runner_(new base::TestMockTimeTaskRunner), handle_(task_runner_) {} + + NavigationMonitorImplTest(const NavigationMonitorImplTest&) = delete; + NavigationMonitorImplTest& operator=(const NavigationMonitorImplTest&) = + delete; + ~NavigationMonitorImplTest() override = default; void SetUp() override { @@ -89,9 +97,6 @@ std::unique_ptr<NavigationMonitorImpl> navigation_monitor_; std::unique_ptr<TestNavigationMonitorObserver> observer_; base::WeakPtrFactory<NavigationMonitorImplTest> weak_ptr_factory_{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(NavigationMonitorImplTest); }; TEST_F(NavigationMonitorImplTest, NoObserver) {
diff --git a/components/download/internal/background_service/noop_store.h b/components/download/internal/background_service/noop_store.h index 46a6a62..2bb7207f 100644 --- a/components/download/internal/background_service/noop_store.h +++ b/components/download/internal/background_service/noop_store.h
@@ -18,6 +18,10 @@ class NoopStore : public Store { public: NoopStore(); + + NoopStore(const NoopStore&) = delete; + NoopStore& operator=(const NoopStore&) = delete; + ~NoopStore() override; // Store implementation. @@ -35,8 +39,6 @@ bool initialized_; base::WeakPtrFactory<NoopStore> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NoopStore); }; } // namespace download
diff --git a/components/download/internal/background_service/scheduler/battery_status_listener_impl.h b/components/download/internal/background_service/scheduler/battery_status_listener_impl.h index 8f95b93..79486b14 100644 --- a/components/download/internal/background_service/scheduler/battery_status_listener_impl.h +++ b/components/download/internal/background_service/scheduler/battery_status_listener_impl.h
@@ -18,6 +18,11 @@ public: explicit BatteryStatusListenerImpl( const base::TimeDelta& battery_query_interval); + + BatteryStatusListenerImpl(const BatteryStatusListenerImpl&) = delete; + BatteryStatusListenerImpl& operator=(const BatteryStatusListenerImpl&) = + delete; + ~BatteryStatusListenerImpl() override; protected: @@ -49,8 +54,6 @@ base::Time last_battery_query_; Observer* observer_; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusListenerImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/scheduler/battery_status_listener_mac.h b/components/download/internal/background_service/scheduler/battery_status_listener_mac.h index 984ec45..df5a6f55 100644 --- a/components/download/internal/background_service/scheduler/battery_status_listener_mac.h +++ b/components/download/internal/background_service/scheduler/battery_status_listener_mac.h
@@ -17,6 +17,10 @@ class BatteryStatusListenerMac : public BatteryStatusListener { public: BatteryStatusListenerMac(); + + BatteryStatusListenerMac(const BatteryStatusListenerMac&) = delete; + BatteryStatusListenerMac& operator=(const BatteryStatusListenerMac&) = delete; + ~BatteryStatusListenerMac() override; private: @@ -25,8 +29,6 @@ bool IsOnBatteryPower() override; void Start(Observer* observer) override; void Stop() override; - - DISALLOW_COPY_AND_ASSIGN(BatteryStatusListenerMac); }; } // namespace download
diff --git a/components/download/internal/background_service/scheduler/device_status_listener.h b/components/download/internal/background_service/scheduler/device_status_listener.h index 9259921..32d130a 100644 --- a/components/download/internal/background_service/scheduler/device_status_listener.h +++ b/components/download/internal/background_service/scheduler/device_status_listener.h
@@ -30,6 +30,10 @@ const base::TimeDelta& online_delay, std::unique_ptr<BatteryStatusListener> battery_listener, std::unique_ptr<NetworkStatusListener> network_listener); + + DeviceStatusListener(const DeviceStatusListener&) = delete; + DeviceStatusListener& operator=(const DeviceStatusListener&) = delete; + ~DeviceStatusListener() override; bool is_valid_state() { return is_valid_state_; } @@ -89,8 +93,6 @@ // Used to listen to battery status. std::unique_ptr<BatteryStatusListener> battery_listener_; - - DISALLOW_COPY_AND_ASSIGN(DeviceStatusListener); }; } // namespace download
diff --git a/components/download/internal/background_service/scheduler/device_status_listener_unittest.cc b/components/download/internal/background_service/scheduler/device_status_listener_unittest.cc index 196a571..c54dd58c 100644 --- a/components/download/internal/background_service/scheduler/device_status_listener_unittest.cc +++ b/components/download/internal/background_service/scheduler/device_status_listener_unittest.cc
@@ -39,6 +39,11 @@ class TestBatteryStatusListener : public BatteryStatusListenerImpl { public: TestBatteryStatusListener() : BatteryStatusListenerImpl(base::TimeDelta()) {} + + TestBatteryStatusListener(const TestBatteryStatusListener&) = delete; + TestBatteryStatusListener& operator=(const TestBatteryStatusListener&) = + delete; + ~TestBatteryStatusListener() override = default; void set_battery_percentage(int battery_percentage) { @@ -50,7 +55,6 @@ private: int battery_percentage_ = 0; - DISALLOW_COPY_AND_ASSIGN(TestBatteryStatusListener); }; // Test target that only loads default implementation of NetworkStatusListener.
diff --git a/components/download/internal/background_service/scheduler/scheduler_impl.h b/components/download/internal/background_service/scheduler/scheduler_impl.h index 2d53b33ce..d931a48d 100644 --- a/components/download/internal/background_service/scheduler/scheduler_impl.h +++ b/components/download/internal/background_service/scheduler/scheduler_impl.h
@@ -33,6 +33,10 @@ SchedulerImpl(TaskScheduler* task_scheduler, Configuration* config, const std::vector<DownloadClient>& clients); + + SchedulerImpl(const SchedulerImpl&) = delete; + SchedulerImpl& operator=(const SchedulerImpl&) = delete; + ~SchedulerImpl() override; // Scheduler implementation. @@ -63,8 +67,6 @@ // The index of the current client. // See |download_clients_|. size_t current_client_index_; - - DISALLOW_COPY_AND_ASSIGN(SchedulerImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/scheduler/scheduler_impl_unittest.cc b/components/download/internal/background_service/scheduler/scheduler_impl_unittest.cc index 69247125..3dcb935 100644 --- a/components/download/internal/background_service/scheduler/scheduler_impl_unittest.cc +++ b/components/download/internal/background_service/scheduler/scheduler_impl_unittest.cc
@@ -34,6 +34,11 @@ class DownloadSchedulerImplTest : public testing::Test { public: DownloadSchedulerImplTest() {} + + DownloadSchedulerImplTest(const DownloadSchedulerImplTest&) = delete; + DownloadSchedulerImplTest& operator=(const DownloadSchedulerImplTest&) = + delete; + ~DownloadSchedulerImplTest() override = default; void TearDown() override { DestroyScheduler(); } @@ -94,9 +99,6 @@ // Entries owned by the test fixture. std::vector<Entry> entries_; - - private: - DISALLOW_COPY_AND_ASSIGN(DownloadSchedulerImplTest); }; // Ensures normal polling logic is correct.
diff --git a/components/download/internal/background_service/service_config_impl.h b/components/download/internal/background_service/service_config_impl.h index 0444791f..eb651fc 100644 --- a/components/download/internal/background_service/service_config_impl.h +++ b/components/download/internal/background_service/service_config_impl.h
@@ -15,6 +15,10 @@ class ServiceConfigImpl : public ServiceConfig { public: explicit ServiceConfigImpl(Configuration* config); + + ServiceConfigImpl(const ServiceConfigImpl&) = delete; + ServiceConfigImpl& operator=(const ServiceConfigImpl&) = delete; + ~ServiceConfigImpl() override; // ServiceConfig implementation. @@ -24,8 +28,6 @@ private: struct Configuration* config_; - - DISALLOW_COPY_AND_ASSIGN(ServiceConfigImpl); }; } // namespace download
diff --git a/components/download/internal/background_service/test/black_hole_log_sink.h b/components/download/internal/background_service/test/black_hole_log_sink.h index 9bde5fbe..0e63dbd 100644 --- a/components/download/internal/background_service/test/black_hole_log_sink.h +++ b/components/download/internal/background_service/test/black_hole_log_sink.h
@@ -14,6 +14,10 @@ class BlackHoleLogSink : public LogSink { public: BlackHoleLogSink() = default; + + BlackHoleLogSink(const BlackHoleLogSink&) = delete; + BlackHoleLogSink& operator=(const BlackHoleLogSink&) = delete; + ~BlackHoleLogSink() override = default; // LogSink implementation. @@ -25,9 +29,6 @@ void OnServiceRequestMade(DownloadClient client, const std::string& guid, DownloadParams::StartResult start_result) override; - - private: - DISALLOW_COPY_AND_ASSIGN(BlackHoleLogSink); }; } // namespace test
diff --git a/components/download/internal/background_service/test/mock_controller.h b/components/download/internal/background_service/test/mock_controller.h index f6e756c..59be781 100644 --- a/components/download/internal/background_service/test/mock_controller.h +++ b/components/download/internal/background_service/test/mock_controller.h
@@ -19,6 +19,10 @@ class MockController : public Controller { public: MockController(); + + MockController(const MockController&) = delete; + MockController& operator=(const MockController&) = delete; + ~MockController() override; // Controller implementation. @@ -52,7 +56,6 @@ private: base::OnceClosure init_callback_; - DISALLOW_COPY_AND_ASSIGN(MockController); }; } // namespace test
diff --git a/components/download/internal/background_service/test/test_device_status_listener.cc b/components/download/internal/background_service/test/test_device_status_listener.cc index 69dea42..39c96b9e7 100644 --- a/components/download/internal/background_service/test/test_device_status_listener.cc +++ b/components/download/internal/background_service/test/test_device_status_listener.cc
@@ -17,13 +17,15 @@ class FakeBatteryStatusListener : public BatteryStatusListenerImpl { public: FakeBatteryStatusListener() : BatteryStatusListenerImpl(base::TimeDelta()) {} + + FakeBatteryStatusListener(const FakeBatteryStatusListener&) = delete; + FakeBatteryStatusListener& operator=(const FakeBatteryStatusListener&) = + delete; + ~FakeBatteryStatusListener() override = default; // BatteryStatusListener implementation. int GetBatteryPercentageInternal() override { return 100; } - - private: - DISALLOW_COPY_AND_ASSIGN(FakeBatteryStatusListener); }; TestDeviceStatusListener::TestDeviceStatusListener()
diff --git a/components/download/internal/background_service/test/test_device_status_listener.h b/components/download/internal/background_service/test/test_device_status_listener.h index f013217..88a94819 100644 --- a/components/download/internal/background_service/test/test_device_status_listener.h +++ b/components/download/internal/background_service/test/test_device_status_listener.h
@@ -16,6 +16,10 @@ class TestDeviceStatusListener : public DeviceStatusListener { public: TestDeviceStatusListener(); + + TestDeviceStatusListener(const TestDeviceStatusListener&) = delete; + TestDeviceStatusListener& operator=(const TestDeviceStatusListener&) = delete; + ~TestDeviceStatusListener() override; // Notifies observer with current device status. @@ -33,8 +37,6 @@ void StartAfterDelay(); base::WeakPtrFactory<TestDeviceStatusListener> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestDeviceStatusListener); }; } // namespace test
diff --git a/components/download/internal/background_service/test/test_download_driver.h b/components/download/internal/background_service/test/test_download_driver.h index 831d646..f3dd692 100644 --- a/components/download/internal/background_service/test/test_download_driver.h +++ b/components/download/internal/background_service/test/test_download_driver.h
@@ -19,6 +19,10 @@ class TestDownloadDriver : public DownloadDriver { public: TestDownloadDriver(); + + TestDownloadDriver(const TestDownloadDriver&) = delete; + TestDownloadDriver& operator=(const TestDownloadDriver&) = delete; + ~TestDownloadDriver() override; // Marks download driver as ready, used to test logic that depends on @@ -57,8 +61,6 @@ // Map of guid --> DriverEntry. std::map<std::string, DriverEntry> entries_; - - DISALLOW_COPY_AND_ASSIGN(TestDownloadDriver); }; } // namespace test
diff --git a/components/download/internal/background_service/test/test_store.h b/components/download/internal/background_service/test/test_store.h index 7604baf..b9ad3fb2 100644 --- a/components/download/internal/background_service/test/test_store.h +++ b/components/download/internal/background_service/test/test_store.h
@@ -22,6 +22,10 @@ class TestStore : public Store { public: TestStore(); + + TestStore(const TestStore&) = delete; + TestStore& operator=(const TestStore&) = delete; + ~TestStore() override; // Store implementation. @@ -60,8 +64,6 @@ StoreCallback hard_recover_callback_; StoreCallback update_callback_; StoreCallback remove_callback_; - - DISALLOW_COPY_AND_ASSIGN(TestStore); }; } // namespace test
diff --git a/components/download/internal/common/all_download_event_notifier_unittest.cc b/components/download/internal/common/all_download_event_notifier_unittest.cc index e715911..24af73bb 100644 --- a/components/download/internal/common/all_download_event_notifier_unittest.cc +++ b/components/download/internal/common/all_download_event_notifier_unittest.cc
@@ -21,6 +21,10 @@ class MockNotifierObserver : public AllDownloadEventNotifier::Observer { public: MockNotifierObserver() = default; + + MockNotifierObserver(const MockNotifierObserver&) = delete; + MockNotifierObserver& operator=(const MockNotifierObserver&) = delete; + ~MockNotifierObserver() override = default; MOCK_METHOD2(OnDownloadsInitialized, @@ -38,15 +42,16 @@ MOCK_METHOD2(OnDownloadRemoved, void(SimpleDownloadManagerCoordinator* manager, DownloadItem* item)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockNotifierObserver); }; class AllDownloadEventNotifierTest : public testing::Test { public: AllDownloadEventNotifierTest() : coordinator_(base::NullCallback(), false) {} + AllDownloadEventNotifierTest(const AllDownloadEventNotifierTest&) = delete; + AllDownloadEventNotifierTest& operator=(const AllDownloadEventNotifierTest&) = + delete; + ~AllDownloadEventNotifierTest() override = default; SimpleDownloadManagerCoordinator* coordinator() { return &coordinator_; } @@ -59,7 +64,6 @@ NiceMock<MockDownloadItem> item_; SimpleDownloadManagerCoordinator coordinator_; NiceMock<MockNotifierObserver> observer_; - DISALLOW_COPY_AND_ASSIGN(AllDownloadEventNotifierTest); }; } // namespace
diff --git a/components/download/internal/common/base_file.cc b/components/download/internal/common/base_file.cc index 932ab3e..0b11104 100644 --- a/components/download/internal/common/base_file.cc +++ b/components/download/internal/common/base_file.cc
@@ -53,6 +53,9 @@ os_error_(os_error), interrupt_reason_(interrupt_reason) {} + FileErrorData(const FileErrorData&) = delete; + FileErrorData& operator=(const FileErrorData&) = delete; + ~FileErrorData() override = default; void AppendAsTraceFormat(std::string* out) const override { @@ -70,7 +73,6 @@ std::string operation_; int os_error_; DownloadInterruptReason interrupt_reason_; - DISALLOW_COPY_AND_ASSIGN(FileErrorData); }; void InitializeFile(base::File* file, const base::FilePath& file_path) {
diff --git a/components/download/internal/common/download_db_cache.h b/components/download/internal/common/download_db_cache.h index 639559a..1b504ad 100644 --- a/components/download/internal/common/download_db_cache.h +++ b/components/download/internal/common/download_db_cache.h
@@ -27,6 +27,10 @@ : public DownloadItem::Observer { public: explicit DownloadDBCache(std::unique_ptr<DownloadDB> download_db); + + DownloadDBCache(const DownloadDBCache&) = delete; + DownloadDBCache& operator=(const DownloadDBCache&) = delete; + ~DownloadDBCache() override; using InitializeCallback = @@ -81,8 +85,6 @@ base::OneShotTimer update_timer_; base::WeakPtrFactory<DownloadDBCache> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadDBCache); }; } // namespace download
diff --git a/components/download/internal/common/download_db_cache_unittest.cc b/components/download/internal/common/download_db_cache_unittest.cc index f353ad6..73381b3 100644 --- a/components/download/internal/common/download_db_cache_unittest.cc +++ b/components/download/internal/common/download_db_cache_unittest.cc
@@ -64,6 +64,9 @@ DownloadDBCacheTest() : db_(nullptr), task_runner_(new base::TestMockTimeTaskRunner) {} + DownloadDBCacheTest(const DownloadDBCacheTest&) = delete; + DownloadDBCacheTest& operator=(const DownloadDBCacheTest&) = delete; + ~DownloadDBCacheTest() override = default; void CreateDBCache() { @@ -110,7 +113,6 @@ std::unique_ptr<DownloadDBCache> db_cache_; scoped_refptr<base::TestMockTimeTaskRunner> task_runner_; base::test::TaskEnvironment task_environment_; - DISALLOW_COPY_AND_ASSIGN(DownloadDBCacheTest); }; TEST_F(DownloadDBCacheTest, InitializeAndRetrieve) {
diff --git a/components/download/internal/common/download_item_impl.cc b/components/download/internal/common/download_item_impl.cc index 8e308ee..1b3283d 100644 --- a/components/download/internal/common/download_item_impl.cc +++ b/components/download/internal/common/download_item_impl.cc
@@ -181,6 +181,10 @@ start_offset_(start_offset), has_user_gesture_(has_user_gesture) {} + DownloadItemActivatedData(const DownloadItemActivatedData&) = delete; + DownloadItemActivatedData& operator=(const DownloadItemActivatedData&) = + delete; + ~DownloadItemActivatedData() override = default; void AppendAsTraceFormat(std::string* out) const override { @@ -217,7 +221,6 @@ DownloadDangerType danger_type_; int64_t start_offset_; bool has_user_gesture_; - DISALLOW_COPY_AND_ASSIGN(DownloadItemActivatedData); }; } // namespace
diff --git a/components/download/internal/common/download_job_impl.h b/components/download/internal/common/download_job_impl.h index a78ead6..b18714d 100644 --- a/components/download/internal/common/download_job_impl.h +++ b/components/download/internal/common/download_job_impl.h
@@ -17,6 +17,10 @@ DownloadJobImpl(DownloadItem* download_item, CancelRequestCallback cancel_request_callback, bool is_parallizable); + + DownloadJobImpl(const DownloadJobImpl&) = delete; + DownloadJobImpl& operator=(const DownloadJobImpl&) = delete; + ~DownloadJobImpl() override; // DownloadJob implementation. @@ -25,8 +29,6 @@ private: // Whether the download can be parallized. bool is_parallizable_; - - DISALLOW_COPY_AND_ASSIGN(DownloadJobImpl); }; } // namespace download
diff --git a/components/download/internal/common/download_path_reservation_tracker.cc b/components/download/internal/common/download_path_reservation_tracker.cc index 36eefe4c..708f018 100644 --- a/components/download/internal/common/download_path_reservation_tracker.cc +++ b/components/download/internal/common/download_path_reservation_tracker.cc
@@ -71,6 +71,10 @@ public base::SupportsUserData::Data { public: explicit DownloadItemObserver(DownloadItem* download_item); + + DownloadItemObserver(const DownloadItemObserver&) = delete; + DownloadItemObserver& operator=(const DownloadItemObserver&) = delete; + ~DownloadItemObserver() override; private: @@ -84,8 +88,6 @@ base::FilePath last_target_path_; static const int kUserDataKey; - - DISALLOW_COPY_AND_ASSIGN(DownloadItemObserver); }; // Returns true if the given path is in use by a path reservation.
diff --git a/components/download/internal/common/download_ukm_helper_unittest.cc b/components/download/internal/common/download_ukm_helper_unittest.cc index b309c03..edf6dea0 100644 --- a/components/download/internal/common/download_ukm_helper_unittest.cc +++ b/components/download/internal/common/download_ukm_helper_unittest.cc
@@ -24,6 +24,10 @@ class DownloadUkmHelperTest : public testing::Test { public: DownloadUkmHelperTest() : download_id_(123) { ResetUkmRecorder(); } + + DownloadUkmHelperTest(const DownloadUkmHelperTest&) = delete; + DownloadUkmHelperTest& operator=(const DownloadUkmHelperTest&) = delete; + ~DownloadUkmHelperTest() override = default; void ResetUkmRecorder() { @@ -49,8 +53,6 @@ base::test::TaskEnvironment task_environment_; std::unique_ptr<ukm::TestAutoSetUkmRecorder> test_recorder_; - - DISALLOW_COPY_AND_ASSIGN(DownloadUkmHelperTest); }; TEST_F(DownloadUkmHelperTest, TestBasicReporting) {
diff --git a/components/download/internal/common/download_worker.cc b/components/download/internal/common/download_worker.cc index 87155179..3303956 100644 --- a/components/download/internal/common/download_worker.cc +++ b/components/download/internal/common/download_worker.cc
@@ -31,6 +31,10 @@ class CompletedInputStream : public InputStream { public: CompletedInputStream(DownloadInterruptReason status) : status_(status) {} + + CompletedInputStream(const CompletedInputStream&) = delete; + CompletedInputStream& operator=(const CompletedInputStream&) = delete; + ~CompletedInputStream() override = default; // InputStream @@ -45,7 +49,6 @@ private: DownloadInterruptReason status_; - DISALLOW_COPY_AND_ASSIGN(CompletedInputStream); }; void CreateUrlDownloadHandler(
diff --git a/components/download/internal/common/download_worker.h b/components/download/internal/common/download_worker.h index b1443d1..895e3ed 100644 --- a/components/download/internal/common/download_worker.h +++ b/components/download/internal/common/download_worker.h
@@ -37,6 +37,10 @@ }; DownloadWorker(DownloadWorker::Delegate* delegate, int64_t offset); + + DownloadWorker(const DownloadWorker&) = delete; + DownloadWorker& operator=(const DownloadWorker&) = delete; + virtual ~DownloadWorker(); int64_t offset() const { return offset_; } @@ -78,8 +82,6 @@ UrlDownloadHandler::UniqueUrlDownloadHandlerPtr url_download_handler_; base::WeakPtrFactory<DownloadWorker> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadWorker); }; } // namespace download
diff --git a/components/download/internal/common/parallel_download_job.h b/components/download/internal/common/parallel_download_job.h index 3387010..9f4f4595 100644 --- a/components/download/internal/common/parallel_download_job.h +++ b/components/download/internal/common/parallel_download_job.h
@@ -35,6 +35,10 @@ URLLoaderFactoryProvider::URLLoaderFactoryProviderPtr url_loader_factory_provider, DownloadJobFactory::WakeLockProviderBinder wake_lock_provider_binder); + + ParallelDownloadJob(const ParallelDownloadJob&) = delete; + ParallelDownloadJob& operator=(const ParallelDownloadJob&) = delete; + ~ParallelDownloadJob() override; // DownloadJobImpl implementation. @@ -117,8 +121,6 @@ // Callbac used for binding WakeLockProvider receivers as needed by each // subrequest. const DownloadJobFactory::WakeLockProviderBinder wake_lock_provider_binder_; - - DISALLOW_COPY_AND_ASSIGN(ParallelDownloadJob); }; } // namespace download
diff --git a/components/download/internal/common/resource_downloader.cc b/components/download/internal/common/resource_downloader.cc index 5abe9d6d..e67a707 100644 --- a/components/download/internal/common/resource_downloader.cc +++ b/components/download/internal/common/resource_downloader.cc
@@ -23,6 +23,10 @@ using URLLoaderStatusChangeCallback = base::OnceCallback<void(const network::URLLoaderCompletionStatus&)>; explicit URLLoaderStatusMonitor(URLLoaderStatusChangeCallback callback); + + URLLoaderStatusMonitor(const URLLoaderStatusMonitor&) = delete; + URLLoaderStatusMonitor& operator=(const URLLoaderStatusMonitor&) = delete; + ~URLLoaderStatusMonitor() override = default; // network::mojom::URLLoaderClient @@ -40,7 +44,6 @@ private: URLLoaderStatusChangeCallback callback_; - DISALLOW_COPY_AND_ASSIGN(URLLoaderStatusMonitor); }; URLLoaderStatusMonitor::URLLoaderStatusMonitor(
diff --git a/components/download/internal/common/resource_downloader.h b/components/download/internal/common/resource_downloader.h index dfe78b8..394c343 100644 --- a/components/download/internal/common/resource_downloader.h +++ b/components/download/internal/common/resource_downloader.h
@@ -75,6 +75,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const URLSecurityPolicy& url_security_policy, mojo::PendingRemote<device::mojom::WakeLockProvider> wake_lock_provider); + + ResourceDownloader(const ResourceDownloader&) = delete; + ResourceDownloader& operator=(const ResourceDownloader&) = delete; + ~ResourceDownloader() override; // DownloadResponseHandler::Delegate @@ -167,8 +171,6 @@ // system enters power saving mode while a download is alive, it can cause // download to be interrupted. mojo::Remote<device::mojom::WakeLock> wake_lock_; - - DISALLOW_COPY_AND_ASSIGN(ResourceDownloader); }; } // namespace download
diff --git a/components/download/internal/common/save_package_download_job.h b/components/download/internal/common/save_package_download_job.h index fdcffca..14ffb038 100644 --- a/components/download/internal/common/save_package_download_job.h +++ b/components/download/internal/common/save_package_download_job.h
@@ -16,13 +16,14 @@ SavePackageDownloadJob( DownloadItem* download_item, DownloadJob::CancelRequestCallback cancel_request_callback); + + SavePackageDownloadJob(const SavePackageDownloadJob&) = delete; + SavePackageDownloadJob& operator=(const SavePackageDownloadJob&) = delete; + ~SavePackageDownloadJob() override; // DownloadJob implementation. bool IsSavePackageDownload() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(SavePackageDownloadJob); }; } // namespace download
diff --git a/components/download/network/android/network_status_listener_android.h b/components/download/network/android/network_status_listener_android.h index 66e98238..1b6b777 100644 --- a/components/download/network/android/network_status_listener_android.h +++ b/components/download/network/android/network_status_listener_android.h
@@ -21,6 +21,11 @@ class NetworkStatusListenerAndroid : public NetworkStatusListener { public: NetworkStatusListenerAndroid(); + + NetworkStatusListenerAndroid(const NetworkStatusListenerAndroid&) = delete; + NetworkStatusListenerAndroid& operator=(const NetworkStatusListenerAndroid&) = + delete; + ~NetworkStatusListenerAndroid() override; // NetworkStatusListener implementation. @@ -39,8 +44,6 @@ private: // The Java side object owned by this class. base::android::ScopedJavaGlobalRef<jobject> java_obj_; - - DISALLOW_COPY_AND_ASSIGN(NetworkStatusListenerAndroid); }; } // namespace download
diff --git a/components/download/network/network_status_listener_impl.h b/components/download/network/network_status_listener_impl.h index 69b9473..e9f05cd 100644 --- a/components/download/network/network_status_listener_impl.h +++ b/components/download/network/network_status_listener_impl.h
@@ -20,6 +20,11 @@ public: explicit NetworkStatusListenerImpl( network::NetworkConnectionTracker* network_connection_tracker); + + NetworkStatusListenerImpl(const NetworkStatusListenerImpl&) = delete; + NetworkStatusListenerImpl& operator=(const NetworkStatusListenerImpl&) = + delete; + ~NetworkStatusListenerImpl() override; // NetworkStatusListener implementation. @@ -36,7 +41,6 @@ network::NetworkConnectionTracker* network_connection_tracker_; base::WeakPtrFactory<NetworkStatusListenerImpl> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(NetworkStatusListenerImpl); }; } // namespace download
diff --git a/components/download/public/background_service/background_download_service.h b/components/download/public/background_service/background_download_service.h index da67a7c..328ca02 100644 --- a/components/download/public/background_service/background_download_service.h +++ b/components/download/public/background_service/background_download_service.h
@@ -98,13 +98,14 @@ // components in the larger system. virtual Logger* GetLogger() = 0; + BackgroundDownloadService(const BackgroundDownloadService&) = delete; + BackgroundDownloadService& operator=(const BackgroundDownloadService&) = + delete; + ~BackgroundDownloadService() override = default; protected: BackgroundDownloadService() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(BackgroundDownloadService); }; } // namespace download
diff --git a/components/download/public/background_service/blob_context_getter_factory.h b/components/download/public/background_service/blob_context_getter_factory.h index d9cf66a..e692e973 100644 --- a/components/download/public/background_service/blob_context_getter_factory.h +++ b/components/download/public/background_service/blob_context_getter_factory.h
@@ -25,13 +25,13 @@ virtual void RetrieveBlobContextGetter( BlobContextGetterCallback callback) = 0; + BlobContextGetterFactory(const BlobContextGetterFactory&) = delete; + BlobContextGetterFactory& operator=(const BlobContextGetterFactory&) = delete; + virtual ~BlobContextGetterFactory() = default; protected: BlobContextGetterFactory() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(BlobContextGetterFactory); }; using BlobContextGetterFactoryPtr = std::unique_ptr<BlobContextGetterFactory>;
diff --git a/components/download/public/background_service/logger.h b/components/download/public/background_service/logger.h index 3156b35..6466ac8 100644 --- a/components/download/public/background_service/logger.h +++ b/components/download/public/background_service/logger.h
@@ -54,6 +54,9 @@ virtual void OnServiceRequestMade(const base::Value& service_request) = 0; }; + Logger(const Logger&) = delete; + Logger& operator=(const Logger&) = delete; + virtual ~Logger() = default; virtual void AddObserver(Observer* observer) = 0; @@ -90,9 +93,6 @@ protected: Logger() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(Logger); }; } // namespace download
diff --git a/components/download/public/background_service/test/empty_client.h b/components/download/public/background_service/test/empty_client.h index 6d134d4a..f3edffc 100644 --- a/components/download/public/background_service/test/empty_client.h +++ b/components/download/public/background_service/test/empty_client.h
@@ -15,6 +15,10 @@ class EmptyClient : public Client { public: EmptyClient() = default; + + EmptyClient(const EmptyClient&) = delete; + EmptyClient& operator=(const EmptyClient&) = delete; + ~EmptyClient() override = default; // Client implementation. @@ -38,9 +42,6 @@ bool force_delete) override; void GetUploadData(const std::string& guid, GetUploadDataCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(EmptyClient); }; } // namespace test
diff --git a/components/download/public/background_service/test/empty_logger.h b/components/download/public/background_service/test/empty_logger.h index e9e41cb2..45ffc7d 100644 --- a/components/download/public/background_service/test/empty_logger.h +++ b/components/download/public/background_service/test/empty_logger.h
@@ -14,6 +14,10 @@ class EmptyLogger : public Logger { public: EmptyLogger() = default; + + EmptyLogger(const EmptyLogger&) = delete; + EmptyLogger& operator=(const EmptyLogger&) = delete; + ~EmptyLogger() override = default; // Logger implementation. @@ -21,9 +25,6 @@ void RemoveObserver(Observer* observer) override; base::Value GetServiceStatus() override; base::Value GetServiceDownloads() override; - - private: - DISALLOW_COPY_AND_ASSIGN(EmptyLogger); }; } // namespace test
diff --git a/components/download/public/background_service/test/mock_client.h b/components/download/public/background_service/test/mock_client.h index c5721918..450d16a 100644 --- a/components/download/public/background_service/test/mock_client.h +++ b/components/download/public/background_service/test/mock_client.h
@@ -16,6 +16,10 @@ class MockClient : public Client { public: MockClient(); + + MockClient(const MockClient&) = delete; + MockClient& operator=(const MockClient&) = delete; + ~MockClient() override; // Client implementation. @@ -34,9 +38,6 @@ MOCK_METHOD2(CanServiceRemoveDownloadedFile, bool(const std::string&, bool)); void GetUploadData(const std::string& guid, GetUploadDataCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(MockClient); }; } // namespace test
diff --git a/components/download/public/background_service/test/mock_download_service.h b/components/download/public/background_service/test/mock_download_service.h index 123f7c5..159b1c5 100644 --- a/components/download/public/background_service/test/mock_download_service.h +++ b/components/download/public/background_service/test/mock_download_service.h
@@ -19,6 +19,10 @@ class MockDownloadService : public BackgroundDownloadService { public: MockDownloadService(); + + MockDownloadService(const MockDownloadService&) = delete; + MockDownloadService& operator=(const MockDownloadService&) = delete; + ~MockDownloadService() override; // BackgroundDownloadService implementation. @@ -40,9 +44,6 @@ MOCK_METHOD2(ChangeDownloadCriteria, void(const std::string& guid, const SchedulingParams& params)); MOCK_METHOD0(GetLogger, Logger*()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDownloadService); }; } // namespace test
diff --git a/components/download/public/background_service/test/test_download_service.cc b/components/download/public/background_service/test/test_download_service.cc index df335fa0..18e8a4a1 100644 --- a/components/download/public/background_service/test/test_download_service.cc +++ b/components/download/public/background_service/test/test_download_service.cc
@@ -23,6 +23,10 @@ class TestServiceConfig : public ServiceConfig { public: TestServiceConfig() = default; + + TestServiceConfig(const TestServiceConfig&) = delete; + TestServiceConfig& operator=(const TestServiceConfig&) = delete; + ~TestServiceConfig() override = default; // ServiceConfig implementation. @@ -34,8 +38,6 @@ private: base::TimeDelta time_delta_; - - DISALLOW_COPY_AND_ASSIGN(TestServiceConfig); }; } // namespace
diff --git a/components/download/public/background_service/test/test_download_service.h b/components/download/public/background_service/test/test_download_service.h index 9f5d1c52..89a78b39 100644 --- a/components/download/public/background_service/test/test_download_service.h +++ b/components/download/public/background_service/test/test_download_service.h
@@ -24,6 +24,10 @@ class TestDownloadService : public BackgroundDownloadService { public: TestDownloadService(); + + TestDownloadService(const TestDownloadService&) = delete; + TestDownloadService& operator=(const TestDownloadService&) = delete; + ~TestDownloadService() override; // DownloadService implementation. @@ -78,8 +82,6 @@ Client* client_; std::list<absl::optional<DownloadParams>> downloads_; - - DISALLOW_COPY_AND_ASSIGN(TestDownloadService); }; } // namespace test
diff --git a/components/download/public/common/all_download_event_notifier.h b/components/download/public/common/all_download_event_notifier.h index c786702..7c422be 100644 --- a/components/download/public/common/all_download_event_notifier.h +++ b/components/download/public/common/all_download_event_notifier.h
@@ -27,6 +27,10 @@ class Observer { public: Observer() = default; + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() = default; virtual void OnDownloadsInitialized( @@ -42,12 +46,13 @@ DownloadItem* item) {} virtual void OnDownloadRemoved(SimpleDownloadManagerCoordinator* manager, DownloadItem* item) {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; explicit AllDownloadEventNotifier(SimpleDownloadManagerCoordinator* manager); + + AllDownloadEventNotifier(const AllDownloadEventNotifier&) = delete; + AllDownloadEventNotifier& operator=(const AllDownloadEventNotifier&) = delete; + ~AllDownloadEventNotifier() override; void AddObserver(Observer* observer); @@ -72,8 +77,6 @@ // Observers that want to be notified of download events. base::ObserverList<Observer>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(AllDownloadEventNotifier); }; } // namespace download
diff --git a/components/download/public/common/auto_resumption_handler.h b/components/download/public/common/auto_resumption_handler.h index 8fad1562..cb6083d 100644 --- a/components/download/public/common/auto_resumption_handler.h +++ b/components/download/public/common/auto_resumption_handler.h
@@ -60,6 +60,10 @@ std::unique_ptr<download::TaskManager> task_manager, std::unique_ptr<Config> config, base::Clock* clock); + + AutoResumptionHandler(const AutoResumptionHandler&) = delete; + AutoResumptionHandler& operator=(const AutoResumptionHandler&) = delete; + ~AutoResumptionHandler() override; void SetResumableDownloads( @@ -121,8 +125,6 @@ bool recompute_task_params_scheduled_ = false; base::WeakPtrFactory<AutoResumptionHandler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutoResumptionHandler); }; } // namespace download
diff --git a/components/download/public/common/auto_resumption_handler_unittest.cc b/components/download/public/common/auto_resumption_handler_unittest.cc index b5e6a5b65..589a19b 100644 --- a/components/download/public/common/auto_resumption_handler_unittest.cc +++ b/components/download/public/common/auto_resumption_handler_unittest.cc
@@ -62,6 +62,10 @@ AutoResumptionHandlerTest() : task_runner_(new base::TestMockTimeTaskRunner), handle_(task_runner_) {} + AutoResumptionHandlerTest(const AutoResumptionHandlerTest&) = delete; + AutoResumptionHandlerTest& operator=(const AutoResumptionHandlerTest&) = + delete; + ~AutoResumptionHandlerTest() override = default; protected: @@ -132,8 +136,6 @@ download::test::MockTaskManager* task_manager_; std::unique_ptr<AutoResumptionHandler> auto_resumption_handler_; base::SimpleTestClock clock_; - - DISALLOW_COPY_AND_ASSIGN(AutoResumptionHandlerTest); }; TEST_F(AutoResumptionHandlerTest, ScheduleTaskCalledOnDownloadStart) {
diff --git a/components/download/public/common/base_file.h b/components/download/public/common/base_file.h index 0f4d3765..f92a42f 100644 --- a/components/download/public/common/base_file.h +++ b/components/download/public/common/base_file.h
@@ -43,6 +43,10 @@ // May be constructed on any thread. All other routines (including // destruction) must occur on the same sequence. BaseFile(uint32_t download_id); + + BaseFile(const BaseFile&) = delete; + BaseFile& operator=(const BaseFile&) = delete; + ~BaseFile(); // Returns DOWNLOAD_INTERRUPT_REASON_NONE on success, or a @@ -301,8 +305,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<BaseFile> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BaseFile); }; } // namespace download
diff --git a/components/download/public/common/download_file_impl.h b/components/download/public/common/download_file_impl.h index 657fe3a..cb4ce95 100644 --- a/components/download/public/common/download_file_impl.h +++ b/components/download/public/common/download_file_impl.h
@@ -52,6 +52,9 @@ uint32_t download_id, base::WeakPtr<DownloadDestinationObserver> observer); + DownloadFileImpl(const DownloadFileImpl&) = delete; + DownloadFileImpl& operator=(const DownloadFileImpl&) = delete; + ~DownloadFileImpl() override; // DownloadFile functions. @@ -101,6 +104,10 @@ SourceStream(int64_t offset, int64_t starting_file_write_offset, std::unique_ptr<InputStream> stream); + + SourceStream(const SourceStream&) = delete; + SourceStream& operator=(const SourceStream&) = delete; + ~SourceStream(); void Initialize(); @@ -190,8 +197,6 @@ // Cancelable callback to read from the |input_stream_|. base::CancelableOnceClosure read_stream_callback_; - - DISALLOW_COPY_AND_ASSIGN(SourceStream); }; // Sets the task runner for testing purpose, must be called before @@ -391,8 +396,6 @@ base::WeakPtr<DownloadDestinationObserver> observer_; base::WeakPtrFactory<DownloadFileImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); }; } // namespace download
diff --git a/components/download/public/common/download_item_impl.h b/components/download/public/common/download_item_impl.h index 2de5d29..00408552 100644 --- a/components/download/public/common/download_item_impl.h +++ b/components/download/public/common/download_item_impl.h
@@ -222,6 +222,9 @@ const std::string& mime_type, DownloadJob::CancelRequestCallback cancel_request_callback); + DownloadItemImpl(const DownloadItemImpl&) = delete; + DownloadItemImpl& operator=(const DownloadItemImpl&) = delete; + ~DownloadItemImpl() override; // DownloadItem @@ -890,8 +893,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<DownloadItemImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadItemImpl); }; } // namespace download
diff --git a/components/download/public/common/download_item_impl_delegate.h b/components/download/public/common/download_item_impl_delegate.h index bbbc5d1..92d9533 100644 --- a/components/download/public/common/download_item_impl_delegate.h +++ b/components/download/public/common/download_item_impl_delegate.h
@@ -37,6 +37,10 @@ using ShouldOpenDownloadCallback = base::OnceCallback<void(bool)>; DownloadItemImplDelegate(); + + DownloadItemImplDelegate(const DownloadItemImplDelegate&) = delete; + DownloadItemImplDelegate& operator=(const DownloadItemImplDelegate&) = delete; + virtual ~DownloadItemImplDelegate(); // Used for catching use-after-free errors. @@ -136,8 +140,6 @@ private: // For "Outlives attached DownloadItemImpl" invariant assertion. int count_; - - DISALLOW_COPY_AND_ASSIGN(DownloadItemImplDelegate); }; } // namespace download
diff --git a/components/download/public/common/download_job.h b/components/download/public/common/download_job.h index f5cc391..2b4aa7d4 100644 --- a/components/download/public/common/download_job.h +++ b/components/download/public/common/download_job.h
@@ -27,6 +27,10 @@ DownloadJob(DownloadItem* download_item, CancelRequestCallback cancel_request_callback); + + DownloadJob(const DownloadJob&) = delete; + DownloadJob& operator=(const DownloadJob&) = delete; + virtual ~DownloadJob(); // Download operations. @@ -75,8 +79,6 @@ bool is_paused_; base::WeakPtrFactory<DownloadJob> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadJob); }; } // namespace download
diff --git a/components/download/public/common/download_response_handler.h b/components/download/public/common/download_response_handler.h index ce90aaf5..a803b2b8 100644 --- a/components/download/public/common/download_response_handler.h +++ b/components/download/public/common/download_response_handler.h
@@ -56,6 +56,10 @@ DownloadSource download_source, std::vector<GURL> url_chain, bool is_background_mode); + + DownloadResponseHandler(const DownloadResponseHandler&) = delete; + DownloadResponseHandler& operator=(const DownloadResponseHandler&) = delete; + ~DownloadResponseHandler() override; // network::mojom::URLLoaderClient @@ -113,7 +117,6 @@ // Whether the download is running in background mode. bool is_background_mode_; - DISALLOW_COPY_AND_ASSIGN(DownloadResponseHandler); }; } // namespace download
diff --git a/components/download/public/common/download_url_parameters.h b/components/download/public/common/download_url_parameters.h index 5e94c13d..46812bfd 100644 --- a/components/download/public/common/download_url_parameters.h +++ b/components/download/public/common/download_url_parameters.h
@@ -88,6 +88,9 @@ int render_frame_host_routing_id, const net::NetworkTrafficAnnotationTag& traffic_annotation); + DownloadUrlParameters(const DownloadUrlParameters&) = delete; + DownloadUrlParameters& operator=(const DownloadUrlParameters&) = delete; + ~DownloadUrlParameters(); // Should be set to true if the download was initiated by a script or a web @@ -370,8 +373,6 @@ bool require_safety_checks_; absl::optional<net::IsolationInfo> isolation_info_; bool has_user_gesture_; - - DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters); }; } // namespace download
diff --git a/components/download/public/common/in_progress_download_manager.h b/components/download/public/common/in_progress_download_manager.h index 5e1f15b..2ef514e 100644 --- a/components/download/public/common/in_progress_download_manager.h +++ b/components/download/public/common/in_progress_download_manager.h
@@ -90,6 +90,11 @@ const IsOriginSecureCallback& is_origin_secure_cb, const URLSecurityPolicy& url_security_policy, WakeLockProviderBinder wake_lock_provider_binder); + + InProgressDownloadManager(const InProgressDownloadManager&) = delete; + InProgressDownloadManager& operator=(const InProgressDownloadManager&) = + delete; + ~InProgressDownloadManager() override; // SimpleDownloadManager implementation. @@ -298,8 +303,6 @@ const WakeLockProviderBinder wake_lock_provider_binder_; base::WeakPtrFactory<InProgressDownloadManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InProgressDownloadManager); }; } // namespace download
diff --git a/components/download/public/common/simple_download_manager.h b/components/download/public/common/simple_download_manager.h index 271b38e..63db6db 100644 --- a/components/download/public/common/simple_download_manager.h +++ b/components/download/public/common/simple_download_manager.h
@@ -24,14 +24,15 @@ class Observer { public: Observer() = default; + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() = default; virtual void OnDownloadsInitialized() {} virtual void OnManagerGoingDown() {} virtual void OnDownloadCreated(DownloadItem* item) {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; SimpleDownloadManager();
diff --git a/components/download/public/common/simple_download_manager_coordinator.h b/components/download/public/common/simple_download_manager_coordinator.h index c5d7a5f..aa6e944 100644 --- a/components/download/public/common/simple_download_manager_coordinator.h +++ b/components/download/public/common/simple_download_manager_coordinator.h
@@ -34,15 +34,16 @@ class Observer { public: Observer() = default; + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() = default; virtual void OnManagerGoingDown( SimpleDownloadManagerCoordinator* coordinator) {} virtual void OnDownloadsInitialized(bool active_downloads_only) {} virtual void OnDownloadCreated(DownloadItem* item) {} - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; using DownloadWhenFullManagerStartsCallBack = @@ -50,6 +51,12 @@ SimpleDownloadManagerCoordinator(const DownloadWhenFullManagerStartsCallBack& download_when_full_manager_starts_cb, bool record_full_download_manager_delay); + + SimpleDownloadManagerCoordinator(const SimpleDownloadManagerCoordinator&) = + delete; + SimpleDownloadManagerCoordinator& operator=( + const SimpleDownloadManagerCoordinator&) = delete; + ~SimpleDownloadManagerCoordinator() override; void AddObserver(Observer* observer); @@ -114,8 +121,6 @@ base::TimeTicks creation_time_ticks_; base::WeakPtrFactory<SimpleDownloadManagerCoordinator> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SimpleDownloadManagerCoordinator); }; } // namespace download
diff --git a/components/download/public/common/stream_handle_input_stream.h b/components/download/public/common/stream_handle_input_stream.h index f490b77..30eaefe90 100644 --- a/components/download/public/common/stream_handle_input_stream.h +++ b/components/download/public/common/stream_handle_input_stream.h
@@ -20,6 +20,10 @@ public: explicit StreamHandleInputStream( mojom::DownloadStreamHandlePtr stream_handle); + + StreamHandleInputStream(const StreamHandleInputStream&) = delete; + StreamHandleInputStream& operator=(const StreamHandleInputStream&) = delete; + ~StreamHandleInputStream() override; // InputStream @@ -52,8 +56,6 @@ base::OnceClosure completion_callback_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(StreamHandleInputStream); }; } // namespace download
diff --git a/components/download/public/common/url_download_handler.h b/components/download/public/common/url_download_handler.h index f672c71..61d8790 100644 --- a/components/download/public/common/url_download_handler.h +++ b/components/download/public/common/url_download_handler.h
@@ -39,9 +39,11 @@ }; UrlDownloadHandler() = default; - virtual ~UrlDownloadHandler() = default; - DISALLOW_COPY_AND_ASSIGN(UrlDownloadHandler); + UrlDownloadHandler(const UrlDownloadHandler&) = delete; + UrlDownloadHandler& operator=(const UrlDownloadHandler&) = delete; + + virtual ~UrlDownloadHandler() = default; }; } // namespace download
diff --git a/components/download/public/common/url_download_request_handle.h b/components/download/public/common/url_download_request_handle.h index 6d10c614..9342fb65 100644 --- a/components/download/public/common/url_download_request_handle.h +++ b/components/download/public/common/url_download_request_handle.h
@@ -19,13 +19,15 @@ scoped_refptr<base::SequencedTaskRunner> downloader_task_runner); UrlDownloadRequestHandle(UrlDownloadRequestHandle&& other); UrlDownloadRequestHandle& operator=(UrlDownloadRequestHandle&& other); + + UrlDownloadRequestHandle(const UrlDownloadRequestHandle&) = delete; + UrlDownloadRequestHandle& operator=(const UrlDownloadRequestHandle&) = delete; + ~UrlDownloadRequestHandle(); private: base::WeakPtr<UrlDownloadHandler> downloader_; scoped_refptr<base::SequencedTaskRunner> downloader_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(UrlDownloadRequestHandle); }; } // namespace download
diff --git a/components/download/public/common/url_loader_factory_provider.h b/components/download/public/common/url_loader_factory_provider.h index ae04d8f4..ed9cb60 100644 --- a/components/download/public/common/url_loader_factory_provider.h +++ b/components/download/public/common/url_loader_factory_provider.h
@@ -21,6 +21,10 @@ explicit URLLoaderFactoryProvider( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + URLLoaderFactoryProvider(const URLLoaderFactoryProvider&) = delete; + URLLoaderFactoryProvider& operator=(const URLLoaderFactoryProvider&) = delete; + virtual ~URLLoaderFactoryProvider(); // Called on the io thread to get the URL loader. @@ -31,8 +35,6 @@ private: scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryProvider); }; } // namespace download
diff --git a/components/download/public/task/empty_task_scheduler.h b/components/download/public/task/empty_task_scheduler.h index 4b452cc3..80c37e1 100644 --- a/components/download/public/task/empty_task_scheduler.h +++ b/components/download/public/task/empty_task_scheduler.h
@@ -16,6 +16,10 @@ class EmptyTaskScheduler : public TaskScheduler { public: EmptyTaskScheduler(); + + EmptyTaskScheduler(const EmptyTaskScheduler&) = delete; + EmptyTaskScheduler& operator=(const EmptyTaskScheduler&) = delete; + ~EmptyTaskScheduler() override; private: @@ -27,8 +31,6 @@ int64_t window_start_time_seconds, int64_t window_end_time_seconds) override; void CancelTask(DownloadTaskType task_type) override; - - DISALLOW_COPY_AND_ASSIGN(EmptyTaskScheduler); }; } // namespace download
diff --git a/components/download/public/task/task_manager.h b/components/download/public/task/task_manager.h index a61269a..0079d8f 100644 --- a/components/download/public/task/task_manager.h +++ b/components/download/public/task/task_manager.h
@@ -35,6 +35,10 @@ }; TaskManager() = default; + + TaskManager(const TaskManager&) = delete; + TaskManager& operator=(const TaskManager&) = delete; + virtual ~TaskManager() = default; // Called to schedule a new task. Overwrites the params if a task of the same @@ -66,9 +70,6 @@ // |needs_reschedule| is true. virtual void NotifyTaskFinished(DownloadTaskType task_type, bool needs_reschedule) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(TaskManager); }; } // namespace download
diff --git a/components/download/public/task/task_manager_impl.h b/components/download/public/task/task_manager_impl.h index afe4e68..81a7d4b 100644 --- a/components/download/public/task/task_manager_impl.h +++ b/components/download/public/task/task_manager_impl.h
@@ -23,6 +23,10 @@ class TaskManagerImpl : public TaskManager { public: explicit TaskManagerImpl(std::unique_ptr<TaskScheduler> task_scheduler); + + TaskManagerImpl(const TaskManagerImpl&) = delete; + TaskManagerImpl& operator=(const TaskManagerImpl&) = delete; + ~TaskManagerImpl() override; // Called to schedule a new task. Overwrites the params if a task of the same @@ -72,8 +76,6 @@ // Contains the callbacks passed through the OnStartScheduledTask(). These // will be cleared when the task is completed or stopped by the system. std::map<DownloadTaskType, TaskFinishedCallback> task_finished_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(TaskManagerImpl); }; } // namespace download
diff --git a/components/download/public/task/task_manager_unittest.cc b/components/download/public/task/task_manager_unittest.cc index 5aac8623..f45d793 100644 --- a/components/download/public/task/task_manager_unittest.cc +++ b/components/download/public/task/task_manager_unittest.cc
@@ -46,6 +46,9 @@ task_manager_ = std::make_unique<TaskManagerImpl>(std::move(scheduler)); } + TaskManagerImplTest(const TaskManagerImplTest&) = delete; + TaskManagerImplTest& operator=(const TaskManagerImplTest&) = delete; + ~TaskManagerImplTest() override = default; protected: @@ -76,9 +79,6 @@ MockTaskScheduler* task_scheduler_; std::unique_ptr<TaskManagerImpl> task_manager_; - - private: - DISALLOW_COPY_AND_ASSIGN(TaskManagerImplTest); }; } // namespace
diff --git a/components/drive/drive_notification_manager.h b/components/drive/drive_notification_manager.h index ed28c21..a55e0845 100644 --- a/components/drive/drive_notification_manager.h +++ b/components/drive/drive_notification_manager.h
@@ -40,6 +40,10 @@ explicit DriveNotificationManager( invalidation::InvalidationService* invalidation_service, const base::TickClock* clock = base::DefaultTickClock::GetInstance()); + + DriveNotificationManager(const DriveNotificationManager&) = delete; + DriveNotificationManager& operator=(const DriveNotificationManager&) = delete; + ~DriveNotificationManager() override; // KeyedService override. @@ -148,8 +152,6 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<DriveNotificationManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DriveNotificationManager); }; } // namespace drive
diff --git a/components/drive/drive_uploader.h b/components/drive/drive_uploader.h index e7cb64e..356aab5 100644 --- a/components/drive/drive_uploader.h +++ b/components/drive/drive_uploader.h
@@ -129,6 +129,9 @@ const scoped_refptr<base::TaskRunner>& blocking_task_runner, mojo::PendingRemote<device::mojom::WakeLockProvider> wake_lock_provider); + DriveUploader(const DriveUploader&) = delete; + DriveUploader& operator=(const DriveUploader&) = delete; + ~DriveUploader() override; // DriveUploaderInterface overrides. @@ -247,7 +250,6 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<DriveUploader> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DriveUploader); }; } // namespace drive
diff --git a/components/drive/event_logger.h b/components/drive/event_logger.h index e877d615..8e252af 100644 --- a/components/drive/event_logger.h +++ b/components/drive/event_logger.h
@@ -38,6 +38,10 @@ // Creates an event logger that keeps the latest kDefaultHistorySize events. EventLogger(); + + EventLogger(const EventLogger&) = delete; + EventLogger& operator=(const EventLogger&) = delete; + ~EventLogger(); // Logs a message and its severity. @@ -62,8 +66,6 @@ size_t history_size_; // guarded by lock_. int next_event_id_; // guarded by lock_. base::Lock lock_; - - DISALLOW_COPY_AND_ASSIGN(EventLogger); }; } // namespace drive
diff --git a/components/drive/resource_metadata_storage.h b/components/drive/resource_metadata_storage.h index ceab852..0b0ef1d 100644 --- a/components/drive/resource_metadata_storage.h +++ b/components/drive/resource_metadata_storage.h
@@ -46,6 +46,10 @@ class Iterator { public: explicit Iterator(std::unique_ptr<leveldb::Iterator> it); + + Iterator(const Iterator&) = delete; + Iterator& operator=(const Iterator&) = delete; + ~Iterator(); // Returns true if this iterator cannot advance any more and does not point @@ -67,8 +71,6 @@ private: ResourceEntry entry_; std::unique_ptr<leveldb::Iterator> it_; - - DISALLOW_COPY_AND_ASSIGN(Iterator); }; // Cache information recovered from trashed DB.
diff --git a/components/drive/service/drive_api_service.h b/components/drive/service/drive_api_service.h index 51f56738..66ae36e 100644 --- a/components/drive/service/drive_api_service.h +++ b/components/drive/service/drive_api_service.h
@@ -56,6 +56,10 @@ base::SequencedTaskRunner* task_runner, const google_apis::DriveApiUrlGenerator& url_generator, const google_apis::CancelCallbackRepeating& cancel_callback); + + BatchRequestConfigurator(const BatchRequestConfigurator&) = delete; + BatchRequestConfigurator& operator=(const BatchRequestConfigurator&) = delete; + ~BatchRequestConfigurator() override; // BatchRequestConfiguratorInterface overrides. @@ -86,8 +90,6 @@ google_apis::CancelCallbackRepeating cancel_callback_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(BatchRequestConfigurator); }; // This class provides Drive request calls using Drive V2 API. @@ -116,6 +118,10 @@ const GURL& base_thumbnail_url, const std::string& custom_user_agent, const net::NetworkTrafficAnnotationTag& traffic_annotation); + + DriveAPIService(const DriveAPIService&) = delete; + DriveAPIService& operator=(const DriveAPIService&) = delete; + ~DriveAPIService() override; // DriveServiceInterface Overrides @@ -276,8 +282,6 @@ google_apis::DriveApiUrlGenerator url_generator_; const std::string custom_user_agent_; const net::NetworkTrafficAnnotationTag traffic_annotation_; - - DISALLOW_COPY_AND_ASSIGN(DriveAPIService); }; } // namespace drive
diff --git a/components/drive/service/fake_drive_service.h b/components/drive/service/fake_drive_service.h index 00e4da3..f49410f 100644 --- a/components/drive/service/fake_drive_service.h +++ b/components/drive/service/fake_drive_service.h
@@ -43,6 +43,10 @@ }; FakeDriveService(); + + FakeDriveService(const FakeDriveService&) = delete; + FakeDriveService& operator=(const FakeDriveService&) = delete; + ~FakeDriveService() override; // Adds a Team Drive to the Team Drive resource list. @@ -427,8 +431,6 @@ base::ObserverList<ChangeObserver>::Unchecked change_observers_; base::WeakPtrFactory<FakeDriveService> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeDriveService); }; } // namespace drive
diff --git a/components/embedder_support/android/delegate/color_chooser_android.h b/components/embedder_support/android/delegate/color_chooser_android.h index 05da5e36..c8a393f 100644 --- a/components/embedder_support/android/delegate/color_chooser_android.h +++ b/components/embedder_support/android/delegate/color_chooser_android.h
@@ -29,6 +29,10 @@ content::WebContents* tab, SkColor initial_color, const std::vector<blink::mojom::ColorSuggestionPtr>& suggestions); + + ColorChooserAndroid(const ColorChooserAndroid&) = delete; + ColorChooserAndroid& operator=(const ColorChooserAndroid&) = delete; + ~ColorChooserAndroid() override; void OnColorChosen(JNIEnv* env, @@ -45,8 +49,6 @@ // The web contents invoking the color chooser. No ownership. because it will // outlive this class. content::WebContents* web_contents_; - - DISALLOW_COPY_AND_ASSIGN(ColorChooserAndroid); }; } // namespace web_contents_delegate_android
diff --git a/components/embedder_support/android/metrics/android_metrics_service_client_unittest.cc b/components/embedder_support/android/metrics/android_metrics_service_client_unittest.cc index fb928ed..c1285f11 100644 --- a/components/embedder_support/android/metrics/android_metrics_service_client_unittest.cc +++ b/components/embedder_support/android/metrics/android_metrics_service_client_unittest.cc
@@ -40,6 +40,9 @@ package_name_rate_per_mille_(1000), record_package_name_for_app_type_(true) {} + TestClient(const TestClient&) = delete; + TestClient& operator=(const TestClient&) = delete; + ~TestClient() override = default; void Initialize(PrefService* pref_service) { @@ -110,7 +113,6 @@ int sampled_in_rate_per_mille_; int package_name_rate_per_mille_; bool record_package_name_for_app_type_; - DISALLOW_COPY_AND_ASSIGN(TestClient); }; std::unique_ptr<TestingPrefServiceSimple> CreateTestPrefs() {
diff --git a/components/embedder_support/android/util/android_stream_reader_url_loader.h b/components/embedder_support/android/util/android_stream_reader_url_loader.h index caf7b1c..511e18f 100644 --- a/components/embedder_support/android/util/android_stream_reader_url_loader.h +++ b/components/embedder_support/android/util/android_stream_reader_url_loader.h
@@ -90,6 +90,11 @@ const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, std::unique_ptr<ResponseDelegate> response_delegate, absl::optional<SecurityOptions> security_options); + + AndroidStreamReaderURLLoader(const AndroidStreamReaderURLLoader&) = delete; + AndroidStreamReaderURLLoader& operator=(const AndroidStreamReaderURLLoader&) = + delete; + ~AndroidStreamReaderURLLoader() override; void Start(); @@ -156,8 +161,6 @@ base::ThreadChecker thread_checker_; base::WeakPtrFactory<AndroidStreamReaderURLLoader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AndroidStreamReaderURLLoader); }; } // namespace embedder_support
diff --git a/components/embedder_support/android/util/input_stream.h b/components/embedder_support/android/util/input_stream.h index 126fe4e..0c47afad 100644 --- a/components/embedder_support/android/util/input_stream.h +++ b/components/embedder_support/android/util/input_stream.h
@@ -29,6 +29,10 @@ // |stream| should be an instance of the InputStream Java class. // |stream| can't be null. InputStream(const base::android::JavaRef<jobject>& stream); + + InputStream(const InputStream&) = delete; + InputStream& operator=(const InputStream&) = delete; + virtual ~InputStream(); // Gets the underlying Java object. Guaranteed non-NULL. @@ -62,8 +66,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> jobject_; base::android::ScopedJavaGlobalRef<jbyteArray> buffer_; - - DISALLOW_COPY_AND_ASSIGN(InputStream); }; } // namespace embedder_support
diff --git a/components/embedder_support/android/util/input_stream_reader.h b/components/embedder_support/android/util/input_stream_reader.h index d1d6d74..5baa175 100644 --- a/components/embedder_support/android/util/input_stream_reader.h +++ b/components/embedder_support/android/util/input_stream_reader.h
@@ -21,6 +21,10 @@ public: // The constructor is called on the IO thread, not on the worker thread. explicit InputStreamReader(InputStream* stream); + + InputStreamReader(const InputStreamReader&) = delete; + InputStreamReader& operator=(const InputStreamReader&) = delete; + virtual ~InputStreamReader(); // Perform a seek operation on the InputStream associated with this job. @@ -51,8 +55,6 @@ int SkipToRequestedRange(const net::HttpByteRange& byte_range); InputStream* stream_; - - DISALLOW_COPY_AND_ASSIGN(InputStreamReader); }; } // namespace embedder_support
diff --git a/components/embedder_support/android/util/web_resource_response.h b/components/embedder_support/android/util/web_resource_response.h index 6c98706..f8d2e12 100644 --- a/components/embedder_support/android/util/web_resource_response.h +++ b/components/embedder_support/android/util/web_resource_response.h
@@ -26,6 +26,10 @@ // org.chromium.components.embedder_support.util.WebResourceResponseInfo // class. explicit WebResourceResponse(const base::android::JavaRef<jobject>& obj); + + WebResourceResponse(const WebResourceResponse&) = delete; + WebResourceResponse& operator=(const WebResourceResponse&) = delete; + ~WebResourceResponse(); bool HasInputStream(JNIEnv* env) const; @@ -43,8 +47,6 @@ base::android::ScopedJavaGlobalRef<jobject> java_object_; bool input_stream_transferred_; - - DISALLOW_COPY_AND_ASSIGN(WebResourceResponse); }; } // namespace embedder_support
diff --git a/components/embedder_support/origin_trials/origin_trial_policy_impl.h b/components/embedder_support/origin_trials/origin_trial_policy_impl.h index da67ce5..7e29d932 100644 --- a/components/embedder_support/origin_trials/origin_trial_policy_impl.h +++ b/components/embedder_support/origin_trials/origin_trial_policy_impl.h
@@ -20,6 +20,10 @@ class OriginTrialPolicyImpl : public blink::OriginTrialPolicy { public: OriginTrialPolicyImpl(); + + OriginTrialPolicyImpl(const OriginTrialPolicyImpl&) = delete; + OriginTrialPolicyImpl& operator=(const OriginTrialPolicyImpl&) = delete; + ~OriginTrialPolicyImpl() override; // blink::OriginTrialPolicy interface @@ -39,8 +43,6 @@ std::vector<blink::OriginTrialPublicKey> public_keys_; std::set<std::string> disabled_features_; std::set<std::string> disabled_tokens_; - - DISALLOW_COPY_AND_ASSIGN(OriginTrialPolicyImpl); }; } // namespace embedder_support
diff --git a/components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h b/components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h index d77456f0..2ce4b4ca 100644 --- a/components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h +++ b/components/enterprise/browser/controller/chrome_browser_cloud_management_controller.h
@@ -179,6 +179,12 @@ explicit ChromeBrowserCloudManagementController( std::unique_ptr<ChromeBrowserCloudManagementController::Delegate> delegate); + + ChromeBrowserCloudManagementController( + const ChromeBrowserCloudManagementController&) = delete; + ChromeBrowserCloudManagementController& operator=( + const ChromeBrowserCloudManagementController&) = delete; + ~ChromeBrowserCloudManagementController() override; // The Chrome browser cloud management is only enabled on Chrome by default. @@ -283,8 +289,6 @@ base::WeakPtrFactory<ChromeBrowserCloudManagementController> weak_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserCloudManagementController); }; } // namespace policy
diff --git a/components/enterprise/browser/controller/chrome_browser_cloud_management_helper.h b/components/enterprise/browser/controller/chrome_browser_cloud_management_helper.h index 95cde21..7d25a23a 100644 --- a/components/enterprise/browser/controller/chrome_browser_cloud_management_helper.h +++ b/components/enterprise/browser/controller/chrome_browser_cloud_management_helper.h
@@ -35,6 +35,12 @@ ChromeBrowserCloudManagementRegistrar( DeviceManagementService* device_management_service, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + ChromeBrowserCloudManagementRegistrar( + const ChromeBrowserCloudManagementRegistrar&) = delete; + ChromeBrowserCloudManagementRegistrar& operator=( + const ChromeBrowserCloudManagementRegistrar&) = delete; + ~ChromeBrowserCloudManagementRegistrar(); // The callback invoked once policy registration is complete. Passed @@ -59,8 +65,6 @@ std::unique_ptr<CloudPolicyClientRegistrationHelper> registration_helper_; DeviceManagementService* device_management_service_; scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(ChromeBrowserCloudManagementRegistrar); }; // A helper class that setup registration and fetch policy. @@ -71,6 +75,12 @@ PrefService* local_state, DeviceManagementService* device_management_service, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + MachineLevelUserCloudPolicyFetcher( + const MachineLevelUserCloudPolicyFetcher&) = delete; + MachineLevelUserCloudPolicyFetcher& operator=( + const MachineLevelUserCloudPolicyFetcher&) = delete; + ~MachineLevelUserCloudPolicyFetcher() override; // Initialize the cloud policy client and policy store then fetch @@ -99,8 +109,6 @@ PrefService* local_state_; DeviceManagementService* device_management_service_; scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(MachineLevelUserCloudPolicyFetcher); }; } // namespace policy
diff --git a/components/enterprise/browser/controller/fake_browser_dm_token_storage.h b/components/enterprise/browser/controller/fake_browser_dm_token_storage.h index 99873f47..ec62730da 100644 --- a/components/enterprise/browser/controller/fake_browser_dm_token_storage.h +++ b/components/enterprise/browser/controller/fake_browser_dm_token_storage.h
@@ -21,6 +21,11 @@ const std::string& enrollment_token, const std::string& dm_token, bool enrollment_error_option); + + FakeBrowserDMTokenStorage(const FakeBrowserDMTokenStorage&) = delete; + FakeBrowserDMTokenStorage& operator=(const FakeBrowserDMTokenStorage&) = + delete; + ~FakeBrowserDMTokenStorage() override; void SetClientId(const std::string& client_id); @@ -41,6 +46,10 @@ const std::string& enrollment_token, const std::string& dm_token, bool enrollment_error_option); + + MockDelegate(const MockDelegate&) = delete; + MockDelegate& operator=(const MockDelegate&) = delete; + ~MockDelegate() override; void SetClientId(const std::string& client_id); @@ -66,11 +75,7 @@ bool enrollment_error_option_ = true; bool storage_enabled_ = true; - - DISALLOW_COPY_AND_ASSIGN(MockDelegate); }; - - DISALLOW_COPY_AND_ASSIGN(FakeBrowserDMTokenStorage); }; } // namespace policy
diff --git a/components/enterprise/browser/reporting/report_generator.h b/components/enterprise/browser/reporting/report_generator.h index 0da3301..ef155704 100644 --- a/components/enterprise/browser/reporting/report_generator.h +++ b/components/enterprise/browser/reporting/report_generator.h
@@ -43,6 +43,10 @@ }; explicit ReportGenerator(ReportingDelegateFactory* delegate_factory); + + ReportGenerator(const ReportGenerator&) = delete; + ReportGenerator& operator=(const ReportGenerator&) = delete; + virtual ~ReportGenerator(); // Asynchronously generates a queue of report requests, providing them to @@ -95,8 +99,6 @@ BrowserReportGenerator browser_report_generator_; base::WeakPtrFactory<ReportGenerator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReportGenerator); }; } // namespace enterprise_reporting
diff --git a/components/enterprise/browser/reporting/report_uploader.h b/components/enterprise/browser/reporting/report_uploader.h index ee6ac1b8..1a68f3b0 100644 --- a/components/enterprise/browser/reporting/report_uploader.h +++ b/components/enterprise/browser/reporting/report_uploader.h
@@ -50,6 +50,10 @@ ReportUploader(policy::CloudPolicyClient* client, int maximum_number_of_retries); + + ReportUploader(const ReportUploader&) = delete; + ReportUploader& operator=(const ReportUploader&) = delete; + virtual ~ReportUploader(); // Sets a list of requests and upload it. Request will be uploaded one after @@ -84,7 +88,6 @@ const int maximum_number_of_retries_; base::WeakPtrFactory<ReportUploader> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ReportUploader); }; enum ReportResponseMetricsStatus {
diff --git a/components/enterprise/browser/reporting/report_uploader_unittest.cc b/components/enterprise/browser/reporting/report_uploader_unittest.cc index c144a10..b0c58f4d 100644 --- a/components/enterprise/browser/reporting/report_uploader_unittest.cc +++ b/components/enterprise/browser/reporting/report_uploader_unittest.cc
@@ -44,6 +44,10 @@ : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) { CreateUploader(0); } + + ReportUploaderTest(const ReportUploaderTest&) = delete; + ReportUploaderTest& operator=(const ReportUploaderTest&) = delete; + ~ReportUploaderTest() override {} void UploadReportAndSetExpectation( @@ -101,9 +105,6 @@ policy::MockCloudPolicyClient client_; bool has_responded_ = false; base::HistogramTester histogram_tester_; - - private: - DISALLOW_COPY_AND_ASSIGN(ReportUploaderTest); }; class ReportUploaderTestWithTransientError
diff --git a/components/exo/buffer.cc b/components/exo/buffer.cc index e1a57b7..0f636255 100644 --- a/components/exo/buffer.cc +++ b/components/exo/buffer.cc
@@ -63,6 +63,10 @@ unsigned query_type, base::TimeDelta wait_for_release_time, bool is_overlay_candidate); + + Texture(const Texture&) = delete; + Texture& operator=(const Texture&) = delete; + ~Texture() override; // Overridden from viz::ContextLostObserver: @@ -118,8 +122,6 @@ base::TimeTicks wait_for_release_time_; bool wait_for_release_pending_ = false; base::WeakPtrFactory<Texture> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Texture); }; Buffer::Texture::Texture(
diff --git a/components/exo/buffer.h b/components/exo/buffer.h index fcaa23f..246bb78 100644 --- a/components/exo/buffer.h +++ b/components/exo/buffer.h
@@ -34,6 +34,10 @@ bool use_zero_copy, bool is_overlay_candidate, bool y_invert); + + Buffer(const Buffer&) = delete; + Buffer& operator=(const Buffer&) = delete; + ~Buffer(); const gfx::GpuMemoryBuffer* gfx_buffer() const { @@ -182,8 +186,6 @@ // Even if we send explicit synchronization release information, Wayland // protocol requires us to send regular buffer release events. base::flat_map<uint64_t, BufferRelease> buffer_releases_; - - DISALLOW_COPY_AND_ASSIGN(Buffer); }; } // namespace exo
diff --git a/components/exo/client_controlled_accelerators.h b/components/exo/client_controlled_accelerators.h index 3e23229..762cf029 100644 --- a/components/exo/client_controlled_accelerators.h +++ b/components/exo/client_controlled_accelerators.h
@@ -24,6 +24,12 @@ public: explicit ClientControlledAcceleratorTarget( ClientControlledShellSurface* surface); + + ClientControlledAcceleratorTarget(const ClientControlledAcceleratorTarget&) = + delete; + ClientControlledAcceleratorTarget& operator=( + const ClientControlledAcceleratorTarget&) = delete; + ~ClientControlledAcceleratorTarget() override; void RegisterAccelerator(const ui::Accelerator& accelerator, @@ -38,8 +44,6 @@ private: ClientControlledShellSurface* surface_; std::map<ui::Accelerator, ClientControlledAcceleratorAction> accelerators_; - - DISALLOW_COPY_AND_ASSIGN(ClientControlledAcceleratorTarget); }; } // namespace exo
diff --git a/components/exo/client_controlled_shell_surface.cc b/components/exo/client_controlled_shell_surface.cc index c25cf64..d6a7e2a3 100644 --- a/components/exo/client_controlled_shell_surface.cc +++ b/components/exo/client_controlled_shell_surface.cc
@@ -114,6 +114,11 @@ explicit ClientControlledStateDelegate( ClientControlledShellSurface* shell_surface) : shell_surface_(shell_surface) {} + + ClientControlledStateDelegate(const ClientControlledStateDelegate&) = delete; + ClientControlledStateDelegate& operator=( + const ClientControlledStateDelegate&) = delete; + ~ClientControlledStateDelegate() override {} // Overridden from ash::ClientControlledState::Delegate: @@ -136,8 +141,6 @@ private: ClientControlledShellSurface* shell_surface_; - - DISALLOW_COPY_AND_ASSIGN(ClientControlledStateDelegate); }; // A WindowStateDelegate that implements ToggleFullscreen behavior for @@ -148,6 +151,12 @@ ClientControlledShellSurface* shell_surface, ash::ClientControlledState::Delegate* delegate) : shell_surface_(shell_surface), delegate_(delegate) {} + + ClientControlledWindowStateDelegate( + const ClientControlledWindowStateDelegate&) = delete; + ClientControlledWindowStateDelegate& operator=( + const ClientControlledWindowStateDelegate&) = delete; + ~ClientControlledWindowStateDelegate() override {} // Overridden from ash::WindowStateDelegate: @@ -216,8 +225,6 @@ private: ClientControlledShellSurface* shell_surface_; ash::ClientControlledState::Delegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(ClientControlledWindowStateDelegate); }; bool IsPinned(const ash::WindowState* window_state) { @@ -255,6 +262,9 @@ public: EventTargetingBlocker() = default; + EventTargetingBlocker(const EventTargetingBlocker&) = delete; + EventTargetingBlocker& operator=(const EventTargetingBlocker&) = delete; + ~EventTargetingBlocker() override { if (window_) Unregister(window_); @@ -291,8 +301,6 @@ std::unique_ptr<aura::ScopedWindowEventTargetingBlocker>> event_targeting_blocker_map_; aura::Window* window_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(EventTargetingBlocker); }; } // namespace @@ -303,12 +311,14 @@ : state_(shell_surface->client_controlled_state_) { state_->set_bounds_locally(true); } + + ScopedSetBoundsLocally(const ScopedSetBoundsLocally&) = delete; + ScopedSetBoundsLocally& operator=(const ScopedSetBoundsLocally&) = delete; + ~ScopedSetBoundsLocally() { state_->set_bounds_locally(false); } private: ash::ClientControlledState* const state_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSetBoundsLocally); }; class ClientControlledShellSurface::ScopedLockedToRoot { @@ -317,12 +327,14 @@ : window_(widget->GetNativeWindow()) { window_->SetProperty(ash::kLockedToRootKey, true); } + + ScopedLockedToRoot(const ScopedLockedToRoot&) = delete; + ScopedLockedToRoot& operator=(const ScopedLockedToRoot&) = delete; + ~ScopedLockedToRoot() { window_->ClearProperty(ash::kLockedToRootKey); } private: aura::Window* const window_; - - DISALLOW_COPY_AND_ASSIGN(ScopedLockedToRoot); }; ////////////////////////////////////////////////////////////////////////////////
diff --git a/components/exo/client_controlled_shell_surface.h b/components/exo/client_controlled_shell_surface.h index b9a2579..ff1a915 100644 --- a/components/exo/client_controlled_shell_surface.h +++ b/components/exo/client_controlled_shell_surface.h
@@ -67,6 +67,11 @@ bool can_minimize, int container, bool default_scale_cancellation); + + ClientControlledShellSurface(const ClientControlledShellSurface&) = delete; + ClientControlledShellSurface& operator=(const ClientControlledShellSurface&) = + delete; + ~ClientControlledShellSurface() override; Delegate* set_delegate(std::unique_ptr<Delegate> delegate) { @@ -376,8 +381,6 @@ absl::optional<int32_t> client_accessibility_id_; bool pending_resize_lock_ = false; - - DISALLOW_COPY_AND_ASSIGN(ClientControlledShellSurface); }; } // namespace exo
diff --git a/components/exo/client_controlled_shell_surface_unittest.cc b/components/exo/client_controlled_shell_surface_unittest.cc index bb66da5..4d4e0fc4 100644 --- a/components/exo/client_controlled_shell_surface_unittest.cc +++ b/components/exo/client_controlled_shell_surface_unittest.cc
@@ -105,6 +105,10 @@ class TestCanvas : public SkNoDrawCanvas { public: TestCanvas() : SkNoDrawCanvas(100, 100) {} + + TestCanvas(const TestCanvas&) = delete; + TestCanvas& operator=(const TestCanvas&) = delete; + ~TestCanvas() override {} void onDrawTextBlob(const SkTextBlob*, @@ -118,8 +122,6 @@ private: bool text_was_drawn_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestCanvas); }; } // namespace @@ -637,6 +639,10 @@ class TestEventHandler : public ui::EventHandler { public: TestEventHandler() = default; + + TestEventHandler(const TestEventHandler&) = delete; + TestEventHandler& operator=(const TestEventHandler&) = delete; + ~TestEventHandler() override = default; // ui::EventHandler: @@ -646,7 +652,6 @@ private: bool received_event_ = false; - DISALLOW_COPY_AND_ASSIGN(TestEventHandler); }; } // namespace @@ -1157,6 +1162,11 @@ has_delegate_(ash::WindowState::Get(window)->HasDelegate()) { window_->AddObserver(this); } + + ShellSurfaceWindowObserver(const ShellSurfaceWindowObserver&) = delete; + ShellSurfaceWindowObserver& operator=(const ShellSurfaceWindowObserver&) = + delete; + ~ShellSurfaceWindowObserver() override { if (window_) { window_->RemoveObserver(this); @@ -1180,8 +1190,6 @@ private: aura::Window* window_; bool has_delegate_; - - DISALLOW_COPY_AND_ASSIGN(ShellSurfaceWindowObserver); }; } // namespace @@ -1222,6 +1230,12 @@ class ClientControlledShellSurfaceDragTest : public test::ExoTestBase { public: ClientControlledShellSurfaceDragTest() = default; + + ClientControlledShellSurfaceDragTest( + const ClientControlledShellSurfaceDragTest&) = delete; + ClientControlledShellSurfaceDragTest& operator=( + const ClientControlledShellSurfaceDragTest&) = delete; + ~ClientControlledShellSurfaceDragTest() override = default; // Sends a gesture scroll sequence to TabletModeAppWindowDragController. @@ -1252,9 +1266,6 @@ } ash::WindowState::Get(window)->DeleteDragDetails(); } - - private: - DISALLOW_COPY_AND_ASSIGN(ClientControlledShellSurfaceDragTest); }; } // namespace
diff --git a/components/exo/data_device.h b/components/exo/data_device.h index adc6354..64c2f03 100644 --- a/components/exo/data_device.h +++ b/components/exo/data_device.h
@@ -39,6 +39,10 @@ public SeatObserver { public: DataDevice(DataDeviceDelegate* delegate, Seat* seat); + + DataDevice(const DataDevice&) = delete; + DataDevice& operator=(const DataDevice&) = delete; + ~DataDevice() override; // Starts drag-and-drop operation. @@ -97,8 +101,6 @@ bool drop_succeeded_; base::WeakPtrFactory<DataDevice> drop_weak_factory_{this}; base::WeakPtrFactory<DataDevice> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataDevice); }; } // namespace exo
diff --git a/components/exo/data_offer.h b/components/exo/data_offer.h index 2d95b208..e783481 100644 --- a/components/exo/data_offer.h +++ b/components/exo/data_offer.h
@@ -48,6 +48,10 @@ using AsyncSendDataCallback = base::OnceCallback<void(SendDataCallback)>; DataOffer(DataOfferDelegate* delegate); + + DataOffer(const DataOffer&) = delete; + DataOffer& operator=(const DataOffer&) = delete; + ~DataOffer() override; void AddObserver(DataOfferObserver* observer); @@ -126,21 +130,21 @@ bool finished_; base::WeakPtrFactory<DataOffer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataOffer); }; class ScopedDataOffer { public: ScopedDataOffer(DataOffer* data_offer, DataOfferObserver* observer); + + ScopedDataOffer(const ScopedDataOffer&) = delete; + ScopedDataOffer& operator=(const ScopedDataOffer&) = delete; + ~ScopedDataOffer(); DataOffer* get() { return data_offer_; } private: DataOffer* const data_offer_; DataOfferObserver* const observer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedDataOffer); }; } // namespace exo
diff --git a/components/exo/data_source.h b/components/exo/data_source.h index 057e299c..394f37b 100644 --- a/components/exo/data_source.h +++ b/components/exo/data_source.h
@@ -29,6 +29,10 @@ static constexpr int kMaxDataTypes = 6; explicit DataSource(DataSourceDelegate* delegate); + + DataSource(const DataSource&) = delete; + DataSource& operator=(const DataSource&) = delete; + ~DataSource(); void AddObserver(DataSourceObserver* observer); @@ -126,21 +130,21 @@ base::flat_set<DndAction> dnd_actions_; base::WeakPtrFactory<DataSource> read_data_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DataSource); }; class ScopedDataSource { public: ScopedDataSource(DataSource* data_source, DataSourceObserver* observer); + + ScopedDataSource(const ScopedDataSource&) = delete; + ScopedDataSource& operator=(const ScopedDataSource&) = delete; + ~ScopedDataSource(); DataSource* get() { return data_source_; } private: DataSource* const data_source_; DataSourceObserver* const observer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedDataSource); }; } // namespace exo
diff --git a/components/exo/display.h b/components/exo/display.h index fd1a76c..4daeec9 100644 --- a/components/exo/display.h +++ b/components/exo/display.h
@@ -65,6 +65,9 @@ std::unique_ptr<DataExchangeDelegate> data_exchange_delegate); #endif // BUILDFLAG(IS_CHROMEOS_ASH) + Display(const Display&) = delete; + Display& operator=(const Display&) = delete; + ~Display(); void Shutdown(); @@ -151,8 +154,6 @@ #if defined(USE_OZONE) std::unique_ptr<gfx::ClientNativePixmapFactory> client_native_pixmap_factory_; #endif // defined(USE_OZONE) - - DISALLOW_COPY_AND_ASSIGN(Display); }; } // namespace exo
diff --git a/components/exo/frame_sink_resource_manager.h b/components/exo/frame_sink_resource_manager.h index 0354fc5..8e3aca9 100644 --- a/components/exo/frame_sink_resource_manager.h +++ b/components/exo/frame_sink_resource_manager.h
@@ -19,6 +19,10 @@ using ReleaseCallback = base::OnceCallback<void(viz::ReturnedResource)>; FrameSinkResourceManager(); + + FrameSinkResourceManager(const FrameSinkResourceManager&) = delete; + FrameSinkResourceManager& operator=(const FrameSinkResourceManager&) = delete; + ~FrameSinkResourceManager(); bool HasReleaseCallbackForResource(viz::ResourceId id); @@ -37,8 +41,6 @@ // The id generator for the buffer. viz::ResourceIdGenerator id_generator_; - - DISALLOW_COPY_AND_ASSIGN(FrameSinkResourceManager); }; } // namespace exo
diff --git a/components/exo/fullscreen_shell_surface.h b/components/exo/fullscreen_shell_surface.h index 8b75541..cb58b0c 100644 --- a/components/exo/fullscreen_shell_surface.h +++ b/components/exo/fullscreen_shell_surface.h
@@ -23,6 +23,10 @@ public views::WidgetDelegate { public: FullscreenShellSurface(); + + FullscreenShellSurface(const FullscreenShellSurface&) = delete; + FullscreenShellSurface& operator=(const FullscreenShellSurface&) = delete; + ~FullscreenShellSurface() override; // Set the callback to run when the user wants the shell surface to be closed. @@ -95,8 +99,6 @@ base::RepeatingClosure close_callback_; base::OnceClosure surface_destroyed_callback_; FullscreenShellView* contents_view_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FullscreenShellSurface); }; } // namespace exo
diff --git a/components/exo/gaming_seat.h b/components/exo/gaming_seat.h index c75cf15..c346855 100644 --- a/components/exo/gaming_seat.h +++ b/components/exo/gaming_seat.h
@@ -30,6 +30,9 @@ // This class will monitor gamepad connection changes and manage gamepads. GamingSeat(GamingSeatDelegate* gaming_seat_delegate); + GamingSeat(const GamingSeat&) = delete; + GamingSeat& operator=(const GamingSeat&) = delete; + ~GamingSeat() override; // Overridden from ui::aura::client::FocusChangeObserver: @@ -50,8 +53,6 @@ // The flag if a valid target for gaming seat is focused. In other words, if // it's true, this class is observing gamepad events. bool focused_ = false; - - DISALLOW_COPY_AND_ASSIGN(GamingSeat); }; } // namespace exo
diff --git a/components/exo/input_method_surface.h b/components/exo/input_method_surface.h index 6f2f43a..3268438 100644 --- a/components/exo/input_method_surface.h +++ b/components/exo/input_method_surface.h
@@ -20,6 +20,10 @@ InputMethodSurface(InputMethodSurfaceManager* manager, Surface* surface, bool default_scale_cancellation); + + InputMethodSurface(const InputMethodSurface&) = delete; + InputMethodSurface& operator=(const InputMethodSurface&) = delete; + ~InputMethodSurface() override; static exo::InputMethodSurface* GetInputMethodSurface(); @@ -37,8 +41,6 @@ bool added_to_manager_ = false; // The bounds of this surface in DIP. gfx::Rect input_method_bounds_; - - DISALLOW_COPY_AND_ASSIGN(InputMethodSurface); }; } // namespace exo
diff --git a/components/exo/layer_tree_frame_sink_holder.h b/components/exo/layer_tree_frame_sink_holder.h index f7192f4e..7f260f56 100644 --- a/components/exo/layer_tree_frame_sink_holder.h +++ b/components/exo/layer_tree_frame_sink_holder.h
@@ -32,6 +32,10 @@ public: LayerTreeFrameSinkHolder(SurfaceTreeHost* surface_tree_host, std::unique_ptr<cc::LayerTreeFrameSink> frame_sink); + + LayerTreeFrameSinkHolder(const LayerTreeFrameSinkHolder&) = delete; + LayerTreeFrameSinkHolder& operator=(const LayerTreeFrameSinkHolder&) = delete; + ~LayerTreeFrameSinkHolder() override; // Delete frame sink after having reclaimed and called all resource @@ -88,8 +92,6 @@ bool delete_pending_ = false; WMHelper::LifetimeManager* lifetime_manager_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(LayerTreeFrameSinkHolder); }; } // namespace exo
diff --git a/components/exo/notification_surface.h b/components/exo/notification_surface.h index e136867..dc544d7 100644 --- a/components/exo/notification_surface.h +++ b/components/exo/notification_surface.h
@@ -25,6 +25,10 @@ NotificationSurface(NotificationSurfaceManager* manager, Surface* surface, const std::string& notification_key); + + NotificationSurface(const NotificationSurface&) = delete; + NotificationSurface& operator=(const NotificationSurface&) = delete; + ~NotificationSurface() override; // Get the content size of the |root_surface()|. @@ -58,8 +62,6 @@ // True if the notification is visible by e.g. being embedded in the message // center. bool is_embedded_ = false; - - DISALLOW_COPY_AND_ASSIGN(NotificationSurface); }; } // namespace exo
diff --git a/components/exo/pointer.h b/components/exo/pointer.h index ab1deb61..fd22bbf 100644 --- a/components/exo/pointer.h +++ b/components/exo/pointer.h
@@ -53,6 +53,10 @@ public aura::client::FocusChangeObserver { public: Pointer(PointerDelegate* delegate, Seat* seat); + + Pointer(const Pointer&) = delete; + Pointer& operator=(const Pointer&) = delete; + ~Pointer() override; PointerDelegate* delegate() const { return delegate_; } @@ -224,8 +228,6 @@ // Weak pointer factory used for cursor capture callbacks. base::WeakPtrFactory<Pointer> cursor_capture_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(Pointer); }; } // namespace exo
diff --git a/components/exo/server/wayland_server_controller.h b/components/exo/server/wayland_server_controller.h index 03c0b776..1094eb72 100644 --- a/components/exo/server/wayland_server_controller.h +++ b/components/exo/server/wayland_server_controller.h
@@ -36,6 +36,9 @@ std::unique_ptr<InputMethodSurfaceManager> input_method_surface_manager, std::unique_ptr<ToastSurfaceManager> toast_surface_manager); + WaylandServerController(const WaylandServerController&) = delete; + WaylandServerController& operator=(const WaylandServerController&) = delete; + ~WaylandServerController(); InputMethodSurfaceManager* input_method_surface_manager() { @@ -53,8 +56,6 @@ std::unique_ptr<Display> display_; std::unique_ptr<wayland::Server> wayland_server_; std::unique_ptr<wayland::WaylandWatcher> wayland_watcher_; - - DISALLOW_COPY_AND_ASSIGN(WaylandServerController); }; } // namespace exo
diff --git a/components/exo/shared_memory.h b/components/exo/shared_memory.h index b5e1eea..417c8d7 100644 --- a/components/exo/shared_memory.h +++ b/components/exo/shared_memory.h
@@ -21,6 +21,10 @@ class SharedMemory { public: explicit SharedMemory(base::UnsafeSharedMemoryRegion shared_memory_region); + + SharedMemory(const SharedMemory&) = delete; + SharedMemory& operator=(const SharedMemory&) = delete; + ~SharedMemory(); // Creates a buffer from the shared memory. The buffer is created offset bytes @@ -38,8 +42,6 @@ private: base::UnsafeSharedMemoryRegion shared_memory_region_; - - DISALLOW_COPY_AND_ASSIGN(SharedMemory); }; } // namespace exo
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h index 5ecbb09d..86b15985 100644 --- a/components/exo/shell_surface.h +++ b/components/exo/shell_surface.h
@@ -34,6 +34,10 @@ bool can_minimize, int container); explicit ShellSurface(Surface* surface); + + ShellSurface(const ShellSurface&) = delete; + ShellSurface& operator=(const ShellSurface&) = delete; + ~ShellSurface() override; // Set the callback to run when the client is asked to configure the surface. @@ -131,6 +135,10 @@ class ScopedConfigure { public: ScopedConfigure(ShellSurface* shell_surface, bool force_configure); + + ScopedConfigure(const ScopedConfigure&) = delete; + ScopedConfigure& operator=(const ScopedConfigure&) = delete; + ~ScopedConfigure(); void set_needs_configure() { needs_configure_ = true; } @@ -139,8 +147,6 @@ ShellSurface* const shell_surface_; const bool force_configure_; bool needs_configure_ = false; - - DISALLOW_COPY_AND_ASSIGN(ScopedConfigure); }; // Set the parent window of this surface. @@ -172,8 +178,6 @@ int pending_resize_component_ = HTCAPTION; ui::WindowShowState initial_show_state_ = ui::SHOW_STATE_DEFAULT; bool ignore_window_bounds_changes_ = false; - - DISALLOW_COPY_AND_ASSIGN(ShellSurface); }; } // namespace exo
diff --git a/components/exo/shell_surface_base.cc b/components/exo/shell_surface_base.cc index 548fd79..399c9e36f 100644 --- a/components/exo/shell_surface_base.cc +++ b/components/exo/shell_surface_base.cc
@@ -119,6 +119,9 @@ NonClientFrameViewAsh::SetShouldPaintHeader(false); } + CustomFrameView(const CustomFrameView&) = delete; + CustomFrameView& operator=(const CustomFrameView&) = delete; + ~CustomFrameView() override = default; // Overridden from ash::NonClientFrameViewAsh: @@ -189,14 +192,16 @@ private: ShellSurfaceBase* const shell_surface_; - - DISALLOW_COPY_AND_ASSIGN(CustomFrameView); }; class CustomWindowTargeter : public aura::WindowTargeter { public: explicit CustomWindowTargeter(ShellSurfaceBase* shell_surface) : shell_surface_(shell_surface), widget_(shell_surface->GetWidget()) {} + + CustomWindowTargeter(const CustomWindowTargeter&) = delete; + CustomWindowTargeter& operator=(const CustomWindowTargeter&) = delete; + ~CustomWindowTargeter() override = default; // Overridden from aura::WindowTargeter: @@ -265,8 +270,6 @@ ShellSurfaceBase* shell_surface_; views::Widget* const widget_; - - DISALLOW_COPY_AND_ASSIGN(CustomWindowTargeter); }; // A place holder to disable default implementation created by @@ -275,15 +278,17 @@ class CustomWindowStateDelegate : public ash::WindowStateDelegate { public: CustomWindowStateDelegate() {} + + CustomWindowStateDelegate(const CustomWindowStateDelegate&) = delete; + CustomWindowStateDelegate& operator=(const CustomWindowStateDelegate&) = + delete; + ~CustomWindowStateDelegate() override {} // Overridden from ash::WindowStateDelegate: bool ToggleFullscreen(ash::WindowState* window_state) override { return false; } - - private: - DISALLOW_COPY_AND_ASSIGN(CustomWindowStateDelegate); }; void CloseAllShellSurfaceTransientChildren(aura::Window* window) {
diff --git a/components/exo/shell_surface_base.h b/components/exo/shell_surface_base.h index 2e05a94..f9394c46 100644 --- a/components/exo/shell_surface_base.h +++ b/components/exo/shell_surface_base.h
@@ -59,6 +59,10 @@ const gfx::Point& origin, bool can_minimize, int container); + + ShellSurfaceBase(const ShellSurfaceBase&) = delete; + ShellSurfaceBase& operator=(const ShellSurfaceBase&) = delete; + ~ShellSurfaceBase() override; // Set the callback to run when the user wants the shell surface to be closed. @@ -387,8 +391,6 @@ bool skip_ime_processing_ = false; bool overlay_overlaps_frame_ = true; absl::optional<bool> overlay_can_resize_; - - DISALLOW_COPY_AND_ASSIGN(ShellSurfaceBase); }; } // namespace exo
diff --git a/components/exo/sub_surface.h b/components/exo/sub_surface.h index 54d8ba9..730a71f9 100644 --- a/components/exo/sub_surface.h +++ b/components/exo/sub_surface.h
@@ -27,6 +27,10 @@ class SubSurface : public SurfaceDelegate, public SurfaceObserver { public: SubSurface(Surface* surface, Surface* parent); + + SubSurface(const SubSurface&) = delete; + SubSurface& operator=(const SubSurface&) = delete; + ~SubSurface() override; // This schedules a sub-surface position change. The sub-surface will be @@ -85,8 +89,6 @@ Surface* surface_; Surface* parent_; bool is_synchronized_ = true; - - DISALLOW_COPY_AND_ASSIGN(SubSurface); }; } // namespace exo
diff --git a/components/exo/surface.cc b/components/exo/surface.cc index 87227c77..f5bc275 100644 --- a/components/exo/surface.cc +++ b/components/exo/surface.cc
@@ -130,6 +130,10 @@ class CustomWindowDelegate : public aura::WindowDelegate { public: explicit CustomWindowDelegate(Surface* surface) : surface_(surface) {} + + CustomWindowDelegate(const CustomWindowDelegate&) = delete; + CustomWindowDelegate& operator=(const CustomWindowDelegate&) = delete; + ~CustomWindowDelegate() override {} // Overridden from aura::WindowDelegate: @@ -187,13 +191,15 @@ private: Surface* const surface_; - - DISALLOW_COPY_AND_ASSIGN(CustomWindowDelegate); }; class CustomWindowTargeter : public aura::WindowTargeter { public: CustomWindowTargeter() {} + + CustomWindowTargeter(const CustomWindowTargeter&) = delete; + CustomWindowTargeter& operator=(const CustomWindowTargeter&) = delete; + ~CustomWindowTargeter() override {} // Overridden from aura::WindowTargeter: @@ -207,9 +213,6 @@ ConvertEventLocationToWindowCoordinates(window, event); return surface->HitTest(local_point); } - - private: - DISALLOW_COPY_AND_ASSIGN(CustomWindowTargeter); }; const std::string& GetApplicationId(aura::Window* window) {
diff --git a/components/exo/surface.h b/components/exo/surface.h index 79f0035..412938e 100644 --- a/components/exo/surface.h +++ b/components/exo/surface.h
@@ -77,6 +77,10 @@ using LeaveEnterCallback = base::RepeatingCallback<void(int64_t, int64_t)>; Surface(); + + Surface(const Surface&) = delete; + Surface& operator=(const Surface&) = delete; + ~Surface() override; // Type-checking downcast routine. @@ -395,6 +399,10 @@ class BufferAttachment { public: BufferAttachment(); + + BufferAttachment(const BufferAttachment&) = delete; + BufferAttachment& operator=(const BufferAttachment&) = delete; + ~BufferAttachment(); BufferAttachment& operator=(BufferAttachment&& buffer); @@ -407,8 +415,6 @@ private: base::WeakPtr<Buffer> buffer_; gfx::Size size_; - - DISALLOW_COPY_AND_ASSIGN(BufferAttachment); }; struct ExtendedState { @@ -538,21 +544,21 @@ gfx::Size embedded_surface_size_; LeaveEnterCallback leave_enter_callback_; - - DISALLOW_COPY_AND_ASSIGN(Surface); }; class ScopedSurface { public: ScopedSurface(Surface* surface, SurfaceObserver* observer); + + ScopedSurface(const ScopedSurface&) = delete; + ScopedSurface& operator=(const ScopedSurface&) = delete; + virtual ~ScopedSurface(); Surface* get() { return surface_; } private: Surface* const surface_; SurfaceObserver* const observer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSurface); }; } // namespace exo
diff --git a/components/exo/surface_tree_host.cc b/components/exo/surface_tree_host.cc index 8116c0b..c2b88f8e 100644 --- a/components/exo/surface_tree_host.cc +++ b/components/exo/surface_tree_host.cc
@@ -46,6 +46,10 @@ public: explicit CustomWindowTargeter(SurfaceTreeHost* surface_tree_host) : surface_tree_host_(surface_tree_host) {} + + CustomWindowTargeter(const CustomWindowTargeter&) = delete; + CustomWindowTargeter& operator=(const CustomWindowTargeter&) = delete; + ~CustomWindowTargeter() override = default; // Overridden from aura::WindowTargeter: @@ -78,8 +82,6 @@ private: SurfaceTreeHost* const surface_tree_host_; - - DISALLOW_COPY_AND_ASSIGN(CustomWindowTargeter); }; } // namespace
diff --git a/components/exo/surface_tree_host.h b/components/exo/surface_tree_host.h index 801e49c..7a0253b8 100644 --- a/components/exo/surface_tree_host.h +++ b/components/exo/surface_tree_host.h
@@ -36,6 +36,10 @@ public viz::ContextLostObserver { public: explicit SurfaceTreeHost(const std::string& window_name); + + SurfaceTreeHost(const SurfaceTreeHost&) = delete; + SurfaceTreeHost& operator=(const SurfaceTreeHost&) = delete; + ~SurfaceTreeHost() override; // Sets a root surface of a surface tree. This surface tree will be hosted in @@ -167,8 +171,6 @@ int64_t display_id_ = display::kInvalidDisplayId; base::WeakPtrFactory<SurfaceTreeHost> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SurfaceTreeHost); }; } // namespace exo
diff --git a/components/exo/surface_unittest.cc b/components/exo/surface_unittest.cc index daee4d9..a4f7525c 100644 --- a/components/exo/surface_unittest.cc +++ b/components/exo/surface_unittest.cc
@@ -67,6 +67,10 @@ public ::testing::WithParamInterface<float> { public: SurfaceTest() = default; + + SurfaceTest(const SurfaceTest&) = delete; + SurfaceTest& operator=(const SurfaceTest&) = delete; + ~SurfaceTest() override = default; void SetUp() override { base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -116,9 +120,6 @@ GetSurfaceManager()->GetSurfaceForId(surface_id)->GetActiveFrame(); return frame; } - - private: - DISALLOW_COPY_AND_ASSIGN(SurfaceTest); }; void ReleaseBuffer(int* release_buffer_call_count) {
diff --git a/components/exo/test/exo_test_base.h b/components/exo/test/exo_test_base.h index f8c8430c..916cc9a 100644 --- a/components/exo/test/exo_test_base.h +++ b/components/exo/test/exo_test_base.h
@@ -32,6 +32,9 @@ NOINLINE explicit ExoTestBase(TaskEnvironmentTraits&&... traits) : AshTestBase(std::forward<TaskEnvironmentTraits>(traits)...) {} + ExoTestBase(const ExoTestBase&) = delete; + ExoTestBase& operator=(const ExoTestBase&) = delete; + ~ExoTestBase() override; // ash::AshTestBase: @@ -48,8 +51,6 @@ private: ExoTestHelper exo_test_helper_; std::unique_ptr<WMHelper> wm_helper_; - - DISALLOW_COPY_AND_ASSIGN(ExoTestBase); }; } // namespace test
diff --git a/components/exo/test/exo_test_base_views.cc b/components/exo/test/exo_test_base_views.cc index 6820b73..cd97611 100644 --- a/components/exo/test/exo_test_base_views.cc +++ b/components/exo/test/exo_test_base_views.cc
@@ -24,6 +24,10 @@ public: WMHelperTester(aura::Window* root_window) : root_window_(root_window), vsync_timing_manager_(this) {} + + WMHelperTester(const WMHelperTester&) = delete; + WMHelperTester& operator=(const WMHelperTester&) = delete; + ~WMHelperTester() override {} // Overridden from WMHelper @@ -109,8 +113,6 @@ aura::Window* root_window_; LifetimeManager lifetime_manager_; VSyncTimingManager vsync_timing_manager_; - - DISALLOW_COPY_AND_ASSIGN(WMHelperTester); }; } // namespace
diff --git a/components/exo/test/exo_test_helper.h b/components/exo/test/exo_test_helper.h index 63bf68e..129b083 100644 --- a/components/exo/test/exo_test_helper.h +++ b/components/exo/test/exo_test_helper.h
@@ -65,6 +65,10 @@ class ExoTestHelper { public: ExoTestHelper(); + + ExoTestHelper(const ExoTestHelper&) = delete; + ExoTestHelper& operator=(const ExoTestHelper&) = delete; + ~ExoTestHelper(); // Creates a GpuMemoryBuffer instance that can be used for tests. @@ -84,9 +88,6 @@ Surface* surface, ToastSurfaceManager* surface_manager, bool default_scale_cancellation = true); - - private: - DISALLOW_COPY_AND_ASSIGN(ExoTestHelper); }; } // namespace test
diff --git a/components/exo/test/exo_test_suite_aura.h b/components/exo/test/exo_test_suite_aura.h index 3e534c423..8217346 100644 --- a/components/exo/test/exo_test_suite_aura.h +++ b/components/exo/test/exo_test_suite_aura.h
@@ -17,15 +17,16 @@ class ExoTestSuiteAura : public base::TestSuite { public: ExoTestSuiteAura(int argc, char** argv); + + ExoTestSuiteAura(const ExoTestSuiteAura&) = delete; + ExoTestSuiteAura& operator=(const ExoTestSuiteAura&) = delete; + ~ExoTestSuiteAura() override; protected: // base::TestSuite: void Initialize() override; void Shutdown() override; - - private: - DISALLOW_COPY_AND_ASSIGN(ExoTestSuiteAura); }; } // namespace test
diff --git a/components/exo/text_input_unittest.cc b/components/exo/text_input_unittest.cc index 90173167ad..56ce4f5c 100644 --- a/components/exo/text_input_unittest.cc +++ b/components/exo/text_input_unittest.cc
@@ -60,6 +60,10 @@ input_method_->AddObserver(this); } + TestingInputMethodObserver(const TestingInputMethodObserver&) = delete; + TestingInputMethodObserver& operator=(const TestingInputMethodObserver&) = + delete; + ~TestingInputMethodObserver() override { input_method_->RemoveObserver(this); } @@ -74,8 +78,6 @@ private: ui::InputMethod* input_method_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestingInputMethodObserver); }; class TextInputTest : public test::ExoTestBase {
diff --git a/components/exo/toast_surface.h b/components/exo/toast_surface.h index 96b7890..31d04dd 100644 --- a/components/exo/toast_surface.h +++ b/components/exo/toast_surface.h
@@ -20,6 +20,10 @@ ToastSurface(ToastSurfaceManager* manager, Surface* surface, bool default_scale_cancellation); + + ToastSurface(const ToastSurface&) = delete; + ToastSurface& operator=(const ToastSurface&) = delete; + ~ToastSurface() override; // Overridden from SurfaceDelegate: @@ -28,8 +32,6 @@ private: ToastSurfaceManager* const manager_; bool added_to_manager_ = false; - - DISALLOW_COPY_AND_ASSIGN(ToastSurface); }; } // namespace exo
diff --git a/components/exo/touch.h b/components/exo/touch.h index 44da98e..d8e20086 100644 --- a/components/exo/touch.h +++ b/components/exo/touch.h
@@ -26,6 +26,10 @@ class Touch : public ui::EventHandler, public SurfaceObserver { public: Touch(TouchDelegate* delegate, Seat* seat); + + Touch(const Touch&) = delete; + Touch& operator=(const Touch&) = delete; + ~Touch() override; TouchDelegate* delegate() const { return delegate_; } @@ -60,8 +64,6 @@ // Map of a touched surface to the count of touch pointers on that surface. base::flat_map<Surface*, int> surface_touch_count_map_; - - DISALLOW_COPY_AND_ASSIGN(Touch); }; } // namespace exo
diff --git a/components/exo/vsync_timing_manager.h b/components/exo/vsync_timing_manager.h index 841650f..e638f66 100644 --- a/components/exo/vsync_timing_manager.h +++ b/components/exo/vsync_timing_manager.h
@@ -41,6 +41,10 @@ }; explicit VSyncTimingManager(Delegate* delegate); + + VSyncTimingManager(const VSyncTimingManager&) = delete; + VSyncTimingManager& operator=(const VSyncTimingManager&) = delete; + ~VSyncTimingManager() override; void AddObserver(Observer* obs); @@ -73,8 +77,6 @@ mojo::Receiver<viz::mojom::VSyncParameterObserver> receiver_{this}; base::WeakPtrFactory<VSyncTimingManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VSyncTimingManager); }; } // namespace exo
diff --git a/components/exo/wayland/clients/blur.h b/components/exo/wayland/clients/blur.h index 7bb86b7..5fe6fd3 100644 --- a/components/exo/wayland/clients/blur.h +++ b/components/exo/wayland/clients/blur.h
@@ -18,6 +18,10 @@ class Blur : public wayland::clients::ClientBase { public: Blur(); + + Blur(const Blur&) = delete; + Blur& operator=(const Blur&) = delete; + ~Blur() override; void Run(double sigma_x, @@ -28,8 +32,6 @@ private: sk_sp<SkImage> grid_image_; - - DISALLOW_COPY_AND_ASSIGN(Blur); }; } // namespace clients
diff --git a/components/exo/wayland/clients/fullscreen_shell.h b/components/exo/wayland/clients/fullscreen_shell.h index 7eea3ba..b017a80f 100644 --- a/components/exo/wayland/clients/fullscreen_shell.h +++ b/components/exo/wayland/clients/fullscreen_shell.h
@@ -18,6 +18,10 @@ class FullscreenClient : public ClientBase { public: FullscreenClient(); + + FullscreenClient(const FullscreenClient&) = delete; + FullscreenClient& operator=(const FullscreenClient&) = delete; + ~FullscreenClient() override; bool Run(const InitParams& params); @@ -56,8 +60,6 @@ std::unique_ptr<wl_callback> frame_callback_; bool frame_callback_pending_ = false; - - DISALLOW_COPY_AND_ASSIGN(FullscreenClient); }; } // namespace clients
diff --git a/components/exo/wayland/clients/perftests.cc b/components/exo/wayland/clients/perftests.cc index 8bca2c2..85a04ad 100644 --- a/components/exo/wayland/clients/perftests.cc +++ b/components/exo/wayland/clients/perftests.cc
@@ -62,12 +62,14 @@ public ::testing::WithParamInterface<double> { public: WaylandClientBlurPerfTests() = default; + + WaylandClientBlurPerfTests(const WaylandClientBlurPerfTests&) = delete; + WaylandClientBlurPerfTests& operator=(const WaylandClientBlurPerfTests&) = + delete; + ~WaylandClientBlurPerfTests() override = default; double max_sigma() const { return GetParam(); } - - private: - DISALLOW_COPY_AND_ASSIGN(WaylandClientBlurPerfTests); }; INSTANTIATE_TEST_SUITE_P(All,
diff --git a/components/exo/wayland/clients/subsurface.cc b/components/exo/wayland/clients/subsurface.cc index 8837c2ec2..d92ded6 100644 --- a/components/exo/wayland/clients/subsurface.cc +++ b/components/exo/wayland/clients/subsurface.cc
@@ -36,12 +36,13 @@ class SubSurfaceClient : public ClientBase { public: SubSurfaceClient() = default; + + SubSurfaceClient(const SubSurfaceClient&) = delete; + SubSurfaceClient& operator=(const SubSurfaceClient&) = delete; + ~SubSurfaceClient() override = default; void Run(const ClientBase::InitParams& params); - - private: - DISALLOW_COPY_AND_ASSIGN(SubSurfaceClient); }; void SubSurfaceClient::Run(const ClientBase::InitParams& params) {
diff --git a/components/exo/wayland/clients/test/wayland_client_test.h b/components/exo/wayland/clients/test/wayland_client_test.h index fc73cab..2d5f91e9 100644 --- a/components/exo/wayland/clients/test/wayland_client_test.h +++ b/components/exo/wayland/clients/test/wayland_client_test.h
@@ -13,6 +13,10 @@ class WaylandClientTest : public testing::Test { public: WaylandClientTest(); + + WaylandClientTest(const WaylandClientTest&) = delete; + WaylandClientTest& operator=(const WaylandClientTest&) = delete; + ~WaylandClientTest() override; static void SetUIThreadTaskRunner( @@ -25,8 +29,6 @@ private: WaylandClientTestHelper test_helper_; - - DISALLOW_COPY_AND_ASSIGN(WaylandClientTest); }; } // namespace exo
diff --git a/components/exo/wayland/clients/test/wayland_client_test_helper.h b/components/exo/wayland/clients/test/wayland_client_test_helper.h index 834d36d..427c17b 100644 --- a/components/exo/wayland/clients/test/wayland_client_test_helper.h +++ b/components/exo/wayland/clients/test/wayland_client_test_helper.h
@@ -28,6 +28,10 @@ class WaylandClientTestHelper { public: WaylandClientTestHelper(); + + WaylandClientTestHelper(const WaylandClientTestHelper&) = delete; + WaylandClientTestHelper& operator=(const WaylandClientTestHelper&) = delete; + virtual ~WaylandClientTestHelper(); static void SetUIThreadTaskRunner( @@ -51,8 +55,6 @@ std::unique_ptr<Display> display_; std::unique_ptr<wayland::Server> wayland_server_; std::unique_ptr<WaylandWatcher> wayland_watcher_; - - DISALLOW_COPY_AND_ASSIGN(WaylandClientTestHelper); }; } // namespace exo
diff --git a/components/exo/wayland/clients/test/wayland_client_test_server.h b/components/exo/wayland/clients/test/wayland_client_test_server.h index 2287841..26ab90f 100644 --- a/components/exo/wayland/clients/test/wayland_client_test_server.h +++ b/components/exo/wayland/clients/test/wayland_client_test_server.h
@@ -20,6 +20,11 @@ char**)>; WaylandClientTestSuiteServer(int argc, char** argv); + + WaylandClientTestSuiteServer(const WaylandClientTestSuiteServer&) = delete; + WaylandClientTestSuiteServer& operator=(const WaylandClientTestSuiteServer&) = + delete; + ~WaylandClientTestSuiteServer() override; int Run(); @@ -47,8 +52,6 @@ // Result of RunTestsOnClientThread(). int result_ = 1; - - DISALLOW_COPY_AND_ASSIGN(WaylandClientTestSuiteServer); }; } // namespace exo
diff --git a/components/exo/wayland/clients/vulkan.cc b/components/exo/wayland/clients/vulkan.cc index 8aba594..86b0a21 100644 --- a/components/exo/wayland/clients/vulkan.cc +++ b/components/exo/wayland/clients/vulkan.cc
@@ -96,6 +96,10 @@ vkCmdBeginRenderPass(command_buffer_, &render_pass_begin_info, VK_SUBPASS_CONTENTS_INLINE); } + + ScopedVulkanRenderFrame(const ScopedVulkanRenderFrame&) = delete; + ScopedVulkanRenderFrame& operator=(const ScopedVulkanRenderFrame&) = delete; + ~ScopedVulkanRenderFrame() { vkCmdEndRenderPass(command_buffer_); @@ -116,8 +120,6 @@ private: VulkanClient* const client_; VkCommandBuffer command_buffer_ = VK_NULL_HANDLE; - - DISALLOW_COPY_AND_ASSIGN(ScopedVulkanRenderFrame); }; void VulkanClient::Run(const ClientBase::InitParams& params) {
diff --git a/components/exo/wayland/compatibility_test/client_compatibility_test.h b/components/exo/wayland/compatibility_test/client_compatibility_test.h index 37d067ea..dc8c492 100644 --- a/components/exo/wayland/compatibility_test/client_compatibility_test.h +++ b/components/exo/wayland/compatibility_test/client_compatibility_test.h
@@ -15,10 +15,11 @@ class ClientCompatibilityTest : public WaylandClientTest { public: ClientCompatibilityTest(); - ~ClientCompatibilityTest() override; - private: - DISALLOW_COPY_AND_ASSIGN(ClientCompatibilityTest); + ClientCompatibilityTest(const ClientCompatibilityTest&) = delete; + ClientCompatibilityTest& operator=(const ClientCompatibilityTest&) = delete; + + ~ClientCompatibilityTest() override; }; } // namespace test
diff --git a/components/exo/wayland/server.h b/components/exo/wayland/server.h index 68cdccc..9f7ec19 100644 --- a/components/exo/wayland/server.h +++ b/components/exo/wayland/server.h
@@ -42,6 +42,10 @@ class Server : public display::DisplayObserver { public: explicit Server(Display* display); + + Server(const Server&) = delete; + Server& operator=(const Server&) = delete; + ~Server() override; // Creates a Wayland display server that clients can connect to using the @@ -93,8 +97,6 @@ std::unique_ptr<WestonTestState> weston_test_data_; #endif #endif - - DISALLOW_COPY_AND_ASSIGN(Server); }; } // namespace wayland
diff --git a/components/exo/wayland/wayland_display_observer.h b/components/exo/wayland/wayland_display_observer.h index 4dd6df9b..ea96def 100644 --- a/components/exo/wayland/wayland_display_observer.h +++ b/components/exo/wayland/wayland_display_observer.h
@@ -39,6 +39,10 @@ public: WaylandDisplayHandler(WaylandDisplayOutput* output, wl_resource* output_resource); + + WaylandDisplayHandler(const WaylandDisplayHandler&) = delete; + WaylandDisplayHandler& operator=(const WaylandDisplayHandler&) = delete; + ~WaylandDisplayHandler() override; void AddObserver(WaylandDisplayObserver* observer); int64_t id() const; @@ -74,8 +78,6 @@ base::ObserverList<WaylandDisplayObserver> observers_; display::ScopedDisplayObserver display_observer_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaylandDisplayHandler); }; } // namespace wayland
diff --git a/components/exo/wayland/wayland_display_output.h b/components/exo/wayland/wayland_display_output.h index 11104dfd..513ef4c3 100644 --- a/components/exo/wayland/wayland_display_output.h +++ b/components/exo/wayland/wayland_display_output.h
@@ -25,6 +25,10 @@ class WaylandDisplayOutput { public: explicit WaylandDisplayOutput(int64_t display_id); + + WaylandDisplayOutput(const WaylandDisplayOutput&) = delete; + WaylandDisplayOutput& operator=(const WaylandDisplayOutput&) = delete; + ~WaylandDisplayOutput(); int64_t id() const; @@ -46,8 +50,6 @@ const int64_t id_; wl_global* global_ = nullptr; base::flat_map<wl_client*, wl_resource*> output_ids_; - - DISALLOW_COPY_AND_ASSIGN(WaylandDisplayOutput); }; } // namespace wayland
diff --git a/components/exo/wayland/wayland_watcher.h b/components/exo/wayland/wayland_watcher.h index ea16774..74bf4ca 100644 --- a/components/exo/wayland/wayland_watcher.h +++ b/components/exo/wayland/wayland_watcher.h
@@ -16,6 +16,10 @@ class WaylandWatcher : public base::MessagePumpForUI::FdWatcher { public: explicit WaylandWatcher(wayland::Server* server); + + WaylandWatcher(const WaylandWatcher&) = delete; + WaylandWatcher& operator=(const WaylandWatcher&) = delete; + ~WaylandWatcher() override; private: @@ -26,8 +30,6 @@ base::MessagePumpForUI::FdWatchController controller_; wayland::Server* const server_; - - DISALLOW_COPY_AND_ASSIGN(WaylandWatcher); }; } // namespace wayland
diff --git a/components/exo/wayland/wp_viewporter.cc b/components/exo/wayland/wp_viewporter.cc index 4fa7aa8..a169712 100644 --- a/components/exo/wayland/wp_viewporter.cc +++ b/components/exo/wayland/wp_viewporter.cc
@@ -32,6 +32,10 @@ surface_->AddSurfaceObserver(this); surface_->SetProperty(kSurfaceHasViewportKey, true); } + + Viewport(const Viewport&) = delete; + Viewport& operator=(const Viewport&) = delete; + ~Viewport() override { if (surface_) { surface_->RemoveSurfaceObserver(this); @@ -59,8 +63,6 @@ private: Surface* surface_; - - DISALLOW_COPY_AND_ASSIGN(Viewport); }; void viewport_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/xdg_shell.cc b/components/exo/wayland/xdg_shell.cc index fde702f..d85ed1d 100644 --- a/components/exo/wayland/xdg_shell.cc +++ b/components/exo/wayland/xdg_shell.cc
@@ -179,6 +179,9 @@ weak_ptr_factory_.GetWeakPtr()))); } + WaylandToplevel(const WaylandToplevel&) = delete; + WaylandToplevel& operator=(const WaylandToplevel&) = delete; + ~WaylandToplevel() override { if (shell_surface_data_) shell_surface_data_->shell_surface->host_window()->RemoveObserver(this); @@ -308,8 +311,6 @@ wl_resource* const resource_; WaylandXdgSurface* shell_surface_data_; base::WeakPtrFactory<WaylandToplevel> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaylandToplevel); }; void xdg_toplevel_destroy(wl_client* client, wl_resource* resource) { @@ -470,6 +471,10 @@ base::BindRepeating(&WaylandPopup::OnConfigure, weak_ptr_factory_.GetWeakPtr()))); } + + WaylandPopup(const WaylandPopup&) = delete; + WaylandPopup& operator=(const WaylandPopup&) = delete; + ~WaylandPopup() override { if (shell_surface_data_) shell_surface_data_->shell_surface->host_window()->RemoveObserver(this); @@ -510,8 +515,6 @@ wl_resource* const resource_; WaylandXdgSurface* shell_surface_data_; base::WeakPtrFactory<WaylandPopup> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaylandPopup); }; void xdg_popup_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zaura_shell.h b/components/exo/wayland/zaura_shell.h index 02b8456..efecd699 100644 --- a/components/exo/wayland/zaura_shell.h +++ b/components/exo/wayland/zaura_shell.h
@@ -32,6 +32,10 @@ public ::wm::ActivationChangeObserver { public: AuraSurface(Surface* surface, wl_resource* resource); + + AuraSurface(const AuraSurface&) = delete; + AuraSurface& operator=(const AuraSurface&) = delete; + ~AuraSurface() override; void SetFrame(SurfaceFrameType type); @@ -84,8 +88,6 @@ void ComputeAndSendOcclusion( const aura::Window::OcclusionState occlusion_state, const SkRegion& occluded_region); - - DISALLOW_COPY_AND_ASSIGN(AuraSurface); }; } // namespace wayland
diff --git a/components/exo/wayland/zaura_shell_unittest.cc b/components/exo/wayland/zaura_shell_unittest.cc index a110a1c..f34919d 100644 --- a/components/exo/wayland/zaura_shell_unittest.cc +++ b/components/exo/wayland/zaura_shell_unittest.cc
@@ -122,6 +122,10 @@ public ::wm::ActivationChangeObserver { public: ZAuraSurfaceTest() {} + + ZAuraSurfaceTest(const ZAuraSurfaceTest&) = delete; + ZAuraSurfaceTest& operator=(const ZAuraSurfaceTest&) = delete; + ~ZAuraSurfaceTest() override {} // test::ExoTestBase overrides: @@ -191,8 +195,6 @@ std::unique_ptr<Surface> surface_; std::unique_ptr<views::Widget> parent_widget_; float occlusion_fraction_on_activation_loss_ = -1.0f; - - DISALLOW_COPY_AND_ASSIGN(ZAuraSurfaceTest); }; TEST_F(ZAuraSurfaceTest, OcclusionTrackingStartsAfterCommit) {
diff --git a/components/exo/wayland/zcr_alpha_compositing.cc b/components/exo/wayland/zcr_alpha_compositing.cc index 414b4600..afc5ea2 100644 --- a/components/exo/wayland/zcr_alpha_compositing.cc +++ b/components/exo/wayland/zcr_alpha_compositing.cc
@@ -31,6 +31,10 @@ surface_->AddSurfaceObserver(this); surface_->SetProperty(kSurfaceHasBlendingKey, true); } + + Blending(const Blending&) = delete; + Blending& operator=(const Blending&) = delete; + ~Blending() override { if (surface_) { surface_->RemoveSurfaceObserver(this); @@ -58,8 +62,6 @@ private: Surface* surface_; - - DISALLOW_COPY_AND_ASSIGN(Blending); }; void blending_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zcr_gaming_input.cc b/components/exo/wayland/zcr_gaming_input.cc index b84b252..9c06c2d 100644 --- a/components/exo/wayland/zcr_gaming_input.cc +++ b/components/exo/wayland/zcr_gaming_input.cc
@@ -118,6 +118,9 @@ explicit WaylandGamepadDelegate(wl_resource* gamepad_resource) : gamepad_resource_(gamepad_resource) {} + WaylandGamepadDelegate(const WaylandGamepadDelegate&) = delete; + WaylandGamepadDelegate& operator=(const WaylandGamepadDelegate&) = delete; + ~WaylandGamepadDelegate() override = default; // If gamepad_resource_ is destroyed first, ResetGamepadResource will @@ -204,8 +207,6 @@ // The gamepad resource associated with the gamepad. wl_resource* gamepad_resource_; - - DISALLOW_COPY_AND_ASSIGN(WaylandGamepadDelegate); }; void gamepad_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zcr_notification_shell.cc b/components/exo/wayland/zcr_notification_shell.cc index f5006631..0d9e614 100644 --- a/components/exo/wayland/zcr_notification_shell.cc +++ b/components/exo/wayland/zcr_notification_shell.cc
@@ -96,6 +96,9 @@ public: WaylandNotificationShell() : id_(g_next_notification_shell_id.GetNext()) {} + WaylandNotificationShell(const WaylandNotificationShell&) = delete; + WaylandNotificationShell& operator=(const WaylandNotificationShell&) = delete; + ~WaylandNotificationShell() = default; // Creates a notification on message center from textual information. @@ -117,8 +120,6 @@ private: // Id for this notification shell instance. const uint32_t id_; - - DISALLOW_COPY_AND_ASSIGN(WaylandNotificationShell); }; void notification_shell_create_notification(wl_client* client,
diff --git a/components/exo/wayland/zcr_secure_output.cc b/components/exo/wayland/zcr_secure_output.cc index c070f6d..6b74ff0d 100644 --- a/components/exo/wayland/zcr_secure_output.cc +++ b/components/exo/wayland/zcr_secure_output.cc
@@ -31,6 +31,10 @@ surface_->AddSurfaceObserver(this); surface_->SetProperty(kSurfaceHasSecurityKey, true); } + + Security(const Security&) = delete; + Security& operator=(const Security&) = delete; + ~Security() override { if (surface_) { surface_->RemoveSurfaceObserver(this); @@ -52,8 +56,6 @@ private: Surface* surface_; - - DISALLOW_COPY_AND_ASSIGN(Security); }; void security_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zcr_stylus.cc b/components/exo/wayland/zcr_stylus.cc index ac7961d..f3eeaef0 100644 --- a/components/exo/wayland/zcr_stylus.cc +++ b/components/exo/wayland/zcr_stylus.cc
@@ -25,6 +25,11 @@ : resource_(resource), touch_(touch) { touch_->SetStylusDelegate(this); } + + WaylandTouchStylusDelegate(const WaylandTouchStylusDelegate&) = delete; + WaylandTouchStylusDelegate& operator=(const WaylandTouchStylusDelegate&) = + delete; + ~WaylandTouchStylusDelegate() override { if (touch_ != nullptr) touch_->SetStylusDelegate(nullptr); @@ -56,8 +61,6 @@ private: wl_resource* resource_; Touch* touch_; - - DISALLOW_COPY_AND_ASSIGN(WaylandTouchStylusDelegate); }; void touch_stylus_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zcr_stylus_tools.cc b/components/exo/wayland/zcr_stylus_tools.cc index 5253269..6c0a4c9 100644 --- a/components/exo/wayland/zcr_stylus_tools.cc +++ b/components/exo/wayland/zcr_stylus_tools.cc
@@ -30,6 +30,10 @@ surface_->AddSurfaceObserver(this); surface_->SetProperty(kSurfaceHasStylusToolKey, true); } + + StylusTool(const StylusTool&) = delete; + StylusTool& operator=(const StylusTool&) = delete; + ~StylusTool() override { if (surface_) { surface_->RemoveSurfaceObserver(this); @@ -47,8 +51,6 @@ private: Surface* surface_; - - DISALLOW_COPY_AND_ASSIGN(StylusTool); }; void stylus_tool_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zcr_vsync_feedback.cc b/components/exo/wayland/zcr_vsync_feedback.cc index c704c3216..28bda2f4 100644 --- a/components/exo/wayland/zcr_vsync_feedback.cc +++ b/components/exo/wayland/zcr_vsync_feedback.cc
@@ -23,6 +23,10 @@ : timing_resource_(timing_resource) { WMHelper::GetInstance()->GetVSyncTimingManager().AddObserver(this); } + + VSyncTiming(const VSyncTiming&) = delete; + VSyncTiming& operator=(const VSyncTiming&) = delete; + ~VSyncTiming() override { WMHelper::GetInstance()->GetVSyncTimingManager().RemoveObserver(this); } @@ -42,8 +46,6 @@ private: // The VSync timing resource. wl_resource* const timing_resource_; - - DISALLOW_COPY_AND_ASSIGN(VSyncTiming); }; void vsync_timing_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zwp_input_timestamps_manager.cc b/components/exo/wayland/zwp_input_timestamps_manager.cc index e104eddf..dd756f4 100644 --- a/components/exo/wayland/zwp_input_timestamps_manager.cc +++ b/components/exo/wayland/zwp_input_timestamps_manager.cc
@@ -32,6 +32,9 @@ delegate_->AddObserver(this); } + WaylandInputTimestamps(const WaylandInputTimestamps&) = delete; + WaylandInputTimestamps& operator=(const WaylandInputTimestamps&) = delete; + ~WaylandInputTimestamps() override { if (delegate_) delegate_->RemoveObserver(this); @@ -53,8 +56,6 @@ private: wl_resource* const resource_; WaylandInputDelegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(WaylandInputTimestamps); }; void input_timestamps_destroy(struct wl_client* client,
diff --git a/components/exo/wayland/zwp_linux_explicit_synchronization.cc b/components/exo/wayland/zwp_linux_explicit_synchronization.cc index 650226e..16fdb445 100644 --- a/components/exo/wayland/zwp_linux_explicit_synchronization.cc +++ b/components/exo/wayland/zwp_linux_explicit_synchronization.cc
@@ -74,6 +74,11 @@ surface_->AddSurfaceObserver(this); surface_->SetProperty(kSurfaceSynchronizationResource, resource); } + + LinuxSurfaceSynchronization(const LinuxSurfaceSynchronization&) = delete; + LinuxSurfaceSynchronization& operator=(const LinuxSurfaceSynchronization&) = + delete; + ~LinuxSurfaceSynchronization() override { if (surface_) { surface_->RemoveSurfaceObserver(this); @@ -93,8 +98,6 @@ private: Surface* surface_; - - DISALLOW_COPY_AND_ASSIGN(LinuxSurfaceSynchronization); }; void linux_surface_synchronization_destroy(struct wl_client* client,
diff --git a/components/exo/wayland/zwp_pointer_gestures.cc b/components/exo/wayland/zwp_pointer_gestures.cc index 4548a13..d5e848c 100644 --- a/components/exo/wayland/zwp_pointer_gestures.cc +++ b/components/exo/wayland/zwp_pointer_gestures.cc
@@ -38,6 +38,11 @@ pointer_->SetGesturePinchDelegate(this); } + WaylandPointerGesturePinchDelegate( + const WaylandPointerGesturePinchDelegate&) = delete; + WaylandPointerGesturePinchDelegate& operator=( + const WaylandPointerGesturePinchDelegate&) = delete; + ~WaylandPointerGesturePinchDelegate() override { if (pointer_) pointer_->SetGesturePinchDelegate(nullptr); @@ -67,8 +72,6 @@ private: wl_resource* const resource_; Pointer* pointer_; - - DISALLOW_COPY_AND_ASSIGN(WaylandPointerGesturePinchDelegate); }; void pointer_gesture_pinch_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zwp_relative_pointer_manager.cc b/components/exo/wayland/zwp_relative_pointer_manager.cc index 5598e7f..3203339 100644 --- a/components/exo/wayland/zwp_relative_pointer_manager.cc +++ b/components/exo/wayland/zwp_relative_pointer_manager.cc
@@ -29,6 +29,11 @@ pointer->RegisterRelativePointerDelegate(this); } + WaylandRelativePointerDelegate(const WaylandRelativePointerDelegate&) = + delete; + WaylandRelativePointerDelegate& operator=( + const WaylandRelativePointerDelegate&) = delete; + ~WaylandRelativePointerDelegate() override { if (pointer_) pointer_->UnregisterRelativePointerDelegate(this); @@ -50,8 +55,6 @@ private: wl_resource* const resource_; Pointer* pointer_; - - DISALLOW_COPY_AND_ASSIGN(WaylandRelativePointerDelegate); }; void relative_pointer_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wayland/zxdg_shell.cc b/components/exo/wayland/zxdg_shell.cc index d5cd01a..c65c679 100644 --- a/components/exo/wayland/zxdg_shell.cc +++ b/components/exo/wayland/zxdg_shell.cc
@@ -198,6 +198,10 @@ base::BindRepeating(&WaylandToplevel::OnConfigure, weak_ptr_factory_.GetWeakPtr()))); } + + WaylandToplevel(const WaylandToplevel&) = delete; + WaylandToplevel& operator=(const WaylandToplevel&) = delete; + ~WaylandToplevel() override { if (shell_surface_data_) shell_surface_data_->shell_surface->host_window()->RemoveObserver(this); @@ -322,8 +326,6 @@ wl_resource* const resource_; WaylandXdgSurface* shell_surface_data_; base::WeakPtrFactory<WaylandToplevel> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaylandToplevel); }; void xdg_toplevel_v6_destroy(wl_client* client, wl_resource* resource) { @@ -447,6 +449,10 @@ base::BindRepeating(&WaylandPopup::OnConfigure, weak_ptr_factory_.GetWeakPtr()))); } + + WaylandPopup(const WaylandPopup&) = delete; + WaylandPopup& operator=(const WaylandPopup&) = delete; + ~WaylandPopup() override { if (shell_surface_data_) shell_surface_data_->shell_surface->host_window()->RemoveObserver(this); @@ -487,8 +493,6 @@ wl_resource* const resource_; WaylandXdgSurface* shell_surface_data_; base::WeakPtrFactory<WaylandPopup> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WaylandPopup); }; void xdg_popup_v6_destroy(wl_client* client, wl_resource* resource) {
diff --git a/components/exo/wm_helper.h b/components/exo/wm_helper.h index 03e093805..99b62a41 100644 --- a/components/exo/wm_helper.h +++ b/components/exo/wm_helper.h
@@ -81,6 +81,10 @@ }; LifetimeManager(); + + LifetimeManager(const LifetimeManager&) = delete; + LifetimeManager& operator=(const LifetimeManager&) = delete; + ~LifetimeManager(); void AddObserver(Observer* observer); @@ -88,8 +92,6 @@ private: base::ObserverList<Observer> observers_; - - DISALLOW_COPY_AND_ASSIGN(LifetimeManager); }; // Used to resolve the properties to be set to the window @@ -109,6 +111,10 @@ }; WMHelper(); + + WMHelper(const WMHelper&) = delete; + WMHelper& operator=(const WMHelper&) = delete; + ~WMHelper() override; static WMHelper* GetInstance(); @@ -182,8 +188,6 @@ protected: std::vector<std::unique_ptr<AppPropertyResolver>> resolver_list_; - - DISALLOW_COPY_AND_ASSIGN(WMHelper); }; } // namespace exo
diff --git a/components/exo/wm_helper_chromeos.h b/components/exo/wm_helper_chromeos.h index 74847b6..96826d03 100644 --- a/components/exo/wm_helper_chromeos.h +++ b/components/exo/wm_helper_chromeos.h
@@ -53,6 +53,10 @@ class WMHelperChromeOS : public WMHelper, public VSyncTimingManager::Delegate { public: WMHelperChromeOS(); + + WMHelperChromeOS(const WMHelperChromeOS&) = delete; + WMHelperChromeOS& operator=(const WMHelperChromeOS&) = delete; + ~WMHelperChromeOS() override; static WMHelperChromeOS* GetInstance(); void AddTabletModeObserver(ash::TabletModeObserver* observer); @@ -134,8 +138,6 @@ VSyncTimingManager vsync_timing_manager_; bool default_scale_cancellation_ = true; base::WeakPtrFactory<WMHelperChromeOS> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WMHelperChromeOS); }; // Returnsn the default device scale factor used for
diff --git a/components/exo/xdg_shell_surface.h b/components/exo/xdg_shell_surface.h index b630d37..38210e2a 100644 --- a/components/exo/xdg_shell_surface.h +++ b/components/exo/xdg_shell_surface.h
@@ -42,6 +42,10 @@ const gfx::Point& origin, bool can_minimize, int container); + + XdgShellSurface(const XdgShellSurface&) = delete; + XdgShellSurface& operator=(const XdgShellSurface&) = delete; + ~XdgShellSurface() override; // ShellSurfaceBase:: @@ -52,8 +56,6 @@ // their bounds are larger or equal to the display area. This behaviour is // implemented in linux display managers (e.g. Muffin/Cinnamon). bool ShouldAutoMaximize(); - - DISALLOW_COPY_AND_ASSIGN(XdgShellSurface); }; } // namespace exo
diff --git a/components/favicon/content/content_favicon_driver.h b/components/favicon/content/content_favicon_driver.h index cac93989..35608240 100644 --- a/components/favicon/content/content_favicon_driver.h +++ b/components/favicon/content/content_favicon_driver.h
@@ -30,6 +30,9 @@ public content::WebContentsUserData<ContentFaviconDriver>, public FaviconDriverImpl { public: + ContentFaviconDriver(const ContentFaviconDriver&) = delete; + ContentFaviconDriver& operator=(const ContentFaviconDriver&) = delete; + ~ContentFaviconDriver() override; // FaviconDriver implementation. @@ -100,8 +103,6 @@ GURL bypass_cache_page_url_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ContentFaviconDriver); }; } // namespace favicon
diff --git a/components/favicon/core/favicon_client.h b/components/favicon/core/favicon_client.h index 3d0d078..91a2e01 100644 --- a/components/favicon/core/favicon_client.h +++ b/components/favicon/core/favicon_client.h
@@ -20,6 +20,10 @@ class FaviconClient { public: FaviconClient() {} + + FaviconClient(const FaviconClient&) = delete; + FaviconClient& operator=(const FaviconClient&) = delete; + virtual ~FaviconClient() {} // Returns true if the specified URL is a native application page URL. @@ -44,9 +48,6 @@ const std::vector<int>& desired_sizes_in_pixel, favicon_base::FaviconResultsCallback callback, base::CancelableTaskTracker* tracker) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FaviconClient); }; } // namespace favicon
diff --git a/components/favicon/core/favicon_database.h b/components/favicon/core/favicon_database.h index 1d2692b8..07a0ca1e 100644 --- a/components/favicon/core/favicon_database.h +++ b/components/favicon/core/favicon_database.h
@@ -238,6 +238,10 @@ class IconMappingEnumerator { public: IconMappingEnumerator(); + + IconMappingEnumerator(const IconMappingEnumerator&) = delete; + IconMappingEnumerator& operator=(const IconMappingEnumerator&) = delete; + ~IconMappingEnumerator(); // Get the next icon mapping, return false if no more are available. @@ -249,8 +253,6 @@ // Used to query database and return the data for filling IconMapping in // each call of GetNextIconMapping(). sql::Statement statement_; - - DISALLOW_COPY_AND_ASSIGN(IconMappingEnumerator); }; // Return all icon mappings of the given |icon_type|.
diff --git a/components/favicon/core/favicon_driver_observer.h b/components/favicon/core/favicon_driver_observer.h index fc88087..b56b661 100644 --- a/components/favicon/core/favicon_driver_observer.h +++ b/components/favicon/core/favicon_driver_observer.h
@@ -37,6 +37,10 @@ }; FaviconDriverObserver() {} + + FaviconDriverObserver(const FaviconDriverObserver&) = delete; + FaviconDriverObserver& operator=(const FaviconDriverObserver&) = delete; + virtual ~FaviconDriverObserver() {} // Called when either: @@ -66,9 +70,6 @@ const GURL& icon_url, bool icon_url_changed, const gfx::Image& image) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FaviconDriverObserver); }; } // namespace favicon
diff --git a/components/favicon/core/favicon_handler.h b/components/favicon/core/favicon_handler.h index 631d3bf5..6e12c9a 100644 --- a/components/favicon/core/favicon_handler.h +++ b/components/favicon/core/favicon_handler.h
@@ -132,6 +132,10 @@ FaviconHandler(CoreFaviconService* service, Delegate* delegate, FaviconDriverObserver::NotificationIconType handler_type); + + FaviconHandler(const FaviconHandler&) = delete; + FaviconHandler& operator=(const FaviconHandler&) = delete; + ~FaviconHandler(); // Initiates loading the favicon for the specified url. |is_same_document| is @@ -376,8 +380,6 @@ // UpdateFaviconCandidate()), the favicon service and the delegate are // notified. DownloadedFavicon best_favicon_; - - DISALLOW_COPY_AND_ASSIGN(FaviconHandler); }; } // namespace favicon
diff --git a/components/favicon/core/favicon_service_impl.h b/components/favicon/core/favicon_service_impl.h index 9daed8c..453ca12d 100644 --- a/components/favicon/core/favicon_service_impl.h +++ b/components/favicon/core/favicon_service_impl.h
@@ -39,6 +39,10 @@ // |history_service| most not be nullptr and must outlive this object. FaviconServiceImpl(std::unique_ptr<FaviconClient> favicon_client, history::HistoryService* history_service); + + FaviconServiceImpl(const FaviconServiceImpl&) = delete; + FaviconServiceImpl& operator=(const FaviconServiceImpl&) = delete; + ~FaviconServiceImpl() override; // FaviconService implementation. @@ -162,8 +166,6 @@ std::unordered_set<MissingFaviconURLHash> missing_favicon_urls_; std::unique_ptr<FaviconClient> favicon_client_; history::HistoryService* history_service_; - - DISALLOW_COPY_AND_ASSIGN(FaviconServiceImpl); }; } // namespace favicon
diff --git a/components/favicon/core/history_ui_favicon_request_handler_impl.h b/components/favicon/core/history_ui_favicon_request_handler_impl.h index cd5a04d..604df7eb 100644 --- a/components/favicon/core/history_ui_favicon_request_handler_impl.h +++ b/components/favicon/core/history_ui_favicon_request_handler_impl.h
@@ -41,6 +41,11 @@ FaviconService* favicon_service, LargeIconService* large_icon_service); + HistoryUiFaviconRequestHandlerImpl( + const HistoryUiFaviconRequestHandlerImpl&) = delete; + HistoryUiFaviconRequestHandlerImpl& operator=( + const HistoryUiFaviconRequestHandlerImpl&) = delete; + ~HistoryUiFaviconRequestHandlerImpl() override; void GetRawFaviconForPageURL( @@ -104,8 +109,6 @@ base::WeakPtrFactory<HistoryUiFaviconRequestHandlerImpl> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(HistoryUiFaviconRequestHandlerImpl); }; } // namespace favicon
diff --git a/components/favicon/core/history_ui_favicon_request_handler_impl_unittest.cc b/components/favicon/core/history_ui_favicon_request_handler_impl_unittest.cc index ca0a50a..af7f76d 100644 --- a/components/favicon/core/history_ui_favicon_request_handler_impl_unittest.cc +++ b/components/favicon/core/history_ui_favicon_request_handler_impl_unittest.cc
@@ -88,6 +88,10 @@ }); } + MockFaviconServiceWithFake(const MockFaviconServiceWithFake&) = delete; + MockFaviconServiceWithFake& operator=(const MockFaviconServiceWithFake&) = + delete; + ~MockFaviconServiceWithFake() override = default; // Simulates the service having an icon stored for |page_url|, the URL of the @@ -111,9 +115,6 @@ return kTaskId; }); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockFaviconServiceWithFake); }; class MockLargeIconServiceWithFake : public LargeIconService { @@ -134,6 +135,10 @@ }); } + MockLargeIconServiceWithFake(const MockLargeIconServiceWithFake&) = delete; + MockLargeIconServiceWithFake& operator=(const MockLargeIconServiceWithFake&) = + delete; + ~MockLargeIconServiceWithFake() override = default; // Simulates the Google Server having an icon stored for |page_url|, of @@ -192,8 +197,6 @@ private: MockFaviconServiceWithFake* const mock_favicon_service_with_fake_; - - DISALLOW_COPY_AND_ASSIGN(MockLargeIconServiceWithFake); }; class HistoryUiFaviconRequestHandlerImplTest : public ::testing::Test {
diff --git a/components/favicon/core/large_icon_service_impl.h b/components/favicon/core/large_icon_service_impl.h index 344d858c..4818d448 100644 --- a/components/favicon/core/large_icon_service_impl.h +++ b/components/favicon/core/large_icon_service_impl.h
@@ -37,6 +37,10 @@ int desired_size_in_dip_for_server_requests, favicon_base::IconType icon_type_for_server_requests, const std::string& google_server_client_param); + + LargeIconServiceImpl(const LargeIconServiceImpl&) = delete; + LargeIconServiceImpl& operator=(const LargeIconServiceImpl&) = delete; + ~LargeIconServiceImpl() override; // LargeIconService Implementation. @@ -108,8 +112,6 @@ GURL server_url_; base::WeakPtrFactory<LargeIconServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LargeIconServiceImpl); }; } // namespace favicon
diff --git a/components/favicon/core/large_icon_service_impl_unittest.cc b/components/favicon/core/large_icon_service_impl_unittest.cc index 9a522886..443c7e9 100644 --- a/components/favicon/core/large_icon_service_impl_unittest.cc +++ b/components/favicon/core/large_icon_service_impl_unittest.cc
@@ -114,6 +114,9 @@ favicon_base::IconType::kTouchIcon, /*google_server_client_param=*/"test_chrome") {} + LargeIconServiceTest(const LargeIconServiceTest&) = delete; + LargeIconServiceTest& operator=(const LargeIconServiceTest&) = delete; + ~LargeIconServiceTest() override {} protected: @@ -124,9 +127,6 @@ testing::NiceMock<MockFaviconService> mock_favicon_service_; LargeIconServiceImpl large_icon_service_; base::HistogramTester histogram_tester_; - - private: - DISALLOW_COPY_AND_ASSIGN(LargeIconServiceTest); }; TEST_F(LargeIconServiceTest, ShouldGetFromGoogleServer) { @@ -418,6 +418,11 @@ public ::testing::WithParamInterface<bool> { public: LargeIconServiceGetterTest() {} + + LargeIconServiceGetterTest(const LargeIconServiceGetterTest&) = delete; + LargeIconServiceGetterTest& operator=(const LargeIconServiceGetterTest&) = + delete; + ~LargeIconServiceGetterTest() override {} void GetLargeIconOrFallbackStyleAndWaitForCallback( @@ -488,9 +493,6 @@ std::unique_ptr<favicon_base::FallbackIconStyle> returned_fallback_style_; std::unique_ptr<gfx::Size> returned_bitmap_size_; - - private: - DISALLOW_COPY_AND_ASSIGN(LargeIconServiceGetterTest); }; TEST_P(LargeIconServiceGetterTest, SameSize) {
diff --git a/components/favicon/ios/web_favicon_driver.h b/components/favicon/ios/web_favicon_driver.h index d0ffedd..3315c492 100644 --- a/components/favicon/ios/web_favicon_driver.h +++ b/components/favicon/ios/web_favicon_driver.h
@@ -26,6 +26,9 @@ public web::WebStateUserData<WebFaviconDriver>, public FaviconDriverImpl { public: + WebFaviconDriver(const WebFaviconDriver&) = delete; + WebFaviconDriver& operator=(const WebFaviconDriver&) = delete; + ~WebFaviconDriver() override; static void CreateForWebState(web::WebState* web_state, @@ -79,8 +82,6 @@ web::WebState* web_state_ = nullptr; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(WebFaviconDriver); }; } // namespace favicon
diff --git a/components/favicon_base/favicon_url_parser_unittest.cc b/components/favicon_base/favicon_url_parser_unittest.cc index 7a58e855..f8705fb 100644 --- a/components/favicon_base/favicon_url_parser_unittest.cc +++ b/components/favicon_base/favicon_url_parser_unittest.cc
@@ -13,11 +13,11 @@ class FaviconUrlParserTest : public testing::Test { public: FaviconUrlParserTest() = default; + + FaviconUrlParserTest(const FaviconUrlParserTest&) = delete; + FaviconUrlParserTest& operator=(const FaviconUrlParserTest&) = delete; + ~FaviconUrlParserTest() override = default; - - private: - - DISALLOW_COPY_AND_ASSIGN(FaviconUrlParserTest); }; // Test parsing path with no extra parameters.
diff --git a/components/favicon_base/select_favicon_frames.cc b/components/favicon_base/select_favicon_frames.cc index f70d35e..875eb4c9 100644 --- a/components/favicon_base/select_favicon_frames.cc +++ b/components/favicon_base/select_favicon_frames.cc
@@ -174,6 +174,10 @@ class FaviconImageSource : public gfx::ImageSkiaSource { public: FaviconImageSource() {} + + FaviconImageSource(const FaviconImageSource&) = delete; + FaviconImageSource& operator=(const FaviconImageSource&) = delete; + ~FaviconImageSource() override {} // gfx::ImageSkiaSource: @@ -207,7 +211,6 @@ private: std::vector<gfx::ImageSkiaRep> image_skia_reps_; - DISALLOW_COPY_AND_ASSIGN(FaviconImageSource); }; } // namespace
diff --git a/components/feature_engagement/internal/android/tracker_impl_android.h b/components/feature_engagement/internal/android/tracker_impl_android.h index 16548f4..b9004de 100644 --- a/components/feature_engagement/internal/android/tracker_impl_android.h +++ b/components/feature_engagement/internal/android/tracker_impl_android.h
@@ -34,6 +34,10 @@ public: DisplayLockHandleAndroid( std::unique_ptr<DisplayLockHandle> display_lock_handle); + + DisplayLockHandleAndroid(const DisplayLockHandleAndroid&) = delete; + DisplayLockHandleAndroid& operator=(const DisplayLockHandleAndroid&) = delete; + ~DisplayLockHandleAndroid(); // Returns the Java-side of this JNI bridge. @@ -48,8 +52,6 @@ // The Java-side of this JNI bridge. base::android::ScopedJavaGlobalRef<jobject> java_obj_; - - DISALLOW_COPY_AND_ASSIGN(DisplayLockHandleAndroid); }; // JNI bridge between TrackerImpl in Java and C++. See the @@ -62,6 +64,10 @@ const base::android::JavaRef<jobject>& jobj); TrackerImplAndroid(Tracker* tracker, FeatureVector features); + + TrackerImplAndroid(const TrackerImplAndroid&) = delete; + TrackerImplAndroid& operator=(const TrackerImplAndroid&) = delete; + ~TrackerImplAndroid() override; base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); @@ -123,8 +129,6 @@ // The Java-side of this JNI bridge. base::android::ScopedJavaGlobalRef<jobject> java_obj_; - - DISALLOW_COPY_AND_ASSIGN(TrackerImplAndroid); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/availability_model.h b/components/feature_engagement/internal/availability_model.h index fdf4f03d..0e3df2a6 100644 --- a/components/feature_engagement/internal/availability_model.h +++ b/components/feature_engagement/internal/availability_model.h
@@ -26,6 +26,9 @@ // GetAvailability(...). using OnInitializedCallback = base::OnceCallback<void(bool success)>; + AvailabilityModel(const AvailabilityModel&) = delete; + AvailabilityModel& operator=(const AvailabilityModel&) = delete; + virtual ~AvailabilityModel() = default; // Starts initialization of the AvailabilityModel. @@ -44,9 +47,6 @@ protected: AvailabilityModel() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(AvailabilityModel); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/availability_model_impl.h b/components/feature_engagement/internal/availability_model_impl.h index 23721d77..30f0898 100644 --- a/components/feature_engagement/internal/availability_model_impl.h +++ b/components/feature_engagement/internal/availability_model_impl.h
@@ -31,6 +31,10 @@ uint32_t current_day)>; explicit AvailabilityModelImpl(StoreLoadCallback load_callback); + + AvailabilityModelImpl(const AvailabilityModelImpl&) = delete; + AvailabilityModelImpl& operator=(const AvailabilityModelImpl&) = delete; + ~AvailabilityModelImpl() override; // AvailabilityModel implementation. @@ -60,8 +64,6 @@ StoreLoadCallback store_load_callback_; base::WeakPtrFactory<AvailabilityModelImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AvailabilityModelImpl); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/availability_model_impl_unittest.cc b/components/feature_engagement/internal/availability_model_impl_unittest.cc index 143ce3e..5a60599f 100644 --- a/components/feature_engagement/internal/availability_model_impl_unittest.cc +++ b/components/feature_engagement/internal/availability_model_impl_unittest.cc
@@ -34,6 +34,10 @@ &AvailabilityModelImplTest::OnInitialized, base::Unretained(this)); } + AvailabilityModelImplTest(const AvailabilityModelImplTest&) = delete; + AvailabilityModelImplTest& operator=(const AvailabilityModelImplTest&) = + delete; + ~AvailabilityModelImplTest() override = default; // SetUpModel exists so that the filter can be changed for any test. @@ -64,9 +68,6 @@ AvailabilityModel::OnInitializedCallback initialized_callback_; absl::optional<bool> success_; absl::optional<uint32_t> current_day_; - - private: - DISALLOW_COPY_AND_ASSIGN(AvailabilityModelImplTest); }; } // namespace
diff --git a/components/feature_engagement/internal/chrome_variations_configuration.h b/components/feature_engagement/internal/chrome_variations_configuration.h index f2e756e..f5aa07d 100644 --- a/components/feature_engagement/internal/chrome_variations_configuration.h +++ b/components/feature_engagement/internal/chrome_variations_configuration.h
@@ -21,6 +21,11 @@ class ChromeVariationsConfiguration : public Configuration { public: ChromeVariationsConfiguration(); + + ChromeVariationsConfiguration(const ChromeVariationsConfiguration&) = delete; + ChromeVariationsConfiguration& operator=( + const ChromeVariationsConfiguration&) = delete; + ~ChromeVariationsConfiguration() override; // Configuration implementation. @@ -44,8 +49,6 @@ // The current configurations. ConfigMap configs_; - - DISALLOW_COPY_AND_ASSIGN(ChromeVariationsConfiguration); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/condition_validator.h b/components/feature_engagement/internal/condition_validator.h index 90d367d..8fb2f47 100644 --- a/components/feature_engagement/internal/condition_validator.h +++ b/components/feature_engagement/internal/condition_validator.h
@@ -82,6 +82,9 @@ bool NoErrors() const; }; + ConditionValidator(const ConditionValidator&) = delete; + ConditionValidator& operator=(const ConditionValidator&) = delete; + virtual ~ConditionValidator() = default; // Returns a Result object that describes whether each condition has been met. @@ -104,9 +107,6 @@ protected: ConditionValidator() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(ConditionValidator); }; std::ostream& operator<<(std::ostream& os,
diff --git a/components/feature_engagement/internal/display_lock_controller.h b/components/feature_engagement/internal/display_lock_controller.h index e1a9696a..247d5f89 100644 --- a/components/feature_engagement/internal/display_lock_controller.h +++ b/components/feature_engagement/internal/display_lock_controller.h
@@ -17,6 +17,9 @@ // held. class DisplayLockController { public: + DisplayLockController(const DisplayLockController&) = delete; + DisplayLockController& operator=(const DisplayLockController&) = delete; + virtual ~DisplayLockController() = default; // Acquiring a display lock means that no in-product help can be displayed @@ -28,9 +31,6 @@ protected: DisplayLockController() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(DisplayLockController); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/display_lock_controller_impl.h b/components/feature_engagement/internal/display_lock_controller_impl.h index 79fb7b76..099b7b6 100644 --- a/components/feature_engagement/internal/display_lock_controller_impl.h +++ b/components/feature_engagement/internal/display_lock_controller_impl.h
@@ -21,6 +21,11 @@ class DisplayLockControllerImpl : public DisplayLockController { public: DisplayLockControllerImpl(); + + DisplayLockControllerImpl(const DisplayLockControllerImpl&) = delete; + DisplayLockControllerImpl& operator=(const DisplayLockControllerImpl&) = + delete; + ~DisplayLockControllerImpl() override; // DisplayLockController implementation. @@ -40,8 +45,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<DisplayLockControllerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DisplayLockControllerImpl); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/editable_configuration.h b/components/feature_engagement/internal/editable_configuration.h index 47cd085..4d6f1ec 100644 --- a/components/feature_engagement/internal/editable_configuration.h +++ b/components/feature_engagement/internal/editable_configuration.h
@@ -20,6 +20,10 @@ class EditableConfiguration : public Configuration { public: EditableConfiguration(); + + EditableConfiguration(const EditableConfiguration&) = delete; + EditableConfiguration& operator=(const EditableConfiguration&) = delete; + ~EditableConfiguration() override; // Configuration implementation. @@ -38,8 +42,6 @@ private: // The current configurations. ConfigMap configs_; - - DISALLOW_COPY_AND_ASSIGN(EditableConfiguration); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/event_model.h b/components/feature_engagement/internal/event_model.h index aa22ef6..51d192b8 100644 --- a/components/feature_engagement/internal/event_model.h +++ b/components/feature_engagement/internal/event_model.h
@@ -22,6 +22,9 @@ // argument denotes whether the model was successfully initialized. using OnModelInitializationFinished = base::OnceCallback<void(bool success)>; + EventModel(const EventModel&) = delete; + EventModel& operator=(const EventModel&) = delete; + virtual ~EventModel() = default; // Initialize the model, including all underlying sub systems. When all @@ -79,9 +82,6 @@ protected: EventModel() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(EventModel); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/event_model_impl.h b/components/feature_engagement/internal/event_model_impl.h index 7f82696..def541d 100644 --- a/components/feature_engagement/internal/event_model_impl.h +++ b/components/feature_engagement/internal/event_model_impl.h
@@ -24,6 +24,10 @@ public: EventModelImpl(std::unique_ptr<EventStore> store, std::unique_ptr<EventStorageValidator> storage_validator); + + EventModelImpl(const EventModelImpl&) = delete; + EventModelImpl& operator=(const EventModelImpl&) = delete; + ~EventModelImpl() override; // EventModel implementation. @@ -77,8 +81,6 @@ bool ready_; base::WeakPtrFactory<EventModelImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(EventModelImpl); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/event_storage_validator.h b/components/feature_engagement/internal/event_storage_validator.h index db41c84..9643a84 100644 --- a/components/feature_engagement/internal/event_storage_validator.h +++ b/components/feature_engagement/internal/event_storage_validator.h
@@ -15,6 +15,9 @@ // event, and checks if all conditions are met for storing it. class EventStorageValidator { public: + EventStorageValidator(const EventStorageValidator&) = delete; + EventStorageValidator& operator=(const EventStorageValidator&) = delete; + virtual ~EventStorageValidator() = default; // Returns true iff new events of this type should be stored. @@ -30,9 +33,6 @@ protected: EventStorageValidator() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(EventStorageValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/event_store.h b/components/feature_engagement/internal/event_store.h index e77a5e5f..df49edee 100644 --- a/components/feature_engagement/internal/event_store.h +++ b/components/feature_engagement/internal/event_store.h
@@ -20,6 +20,9 @@ base::OnceCallback<void(bool success, std::unique_ptr<std::vector<Event>>)>; + EventStore(const EventStore&) = delete; + EventStore& operator=(const EventStore&) = delete; + virtual ~EventStore() = default; // Loads the database from storage and asynchronously posts the result back @@ -39,9 +42,6 @@ protected: EventStore() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(EventStore); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/feature_config_condition_validator.h b/components/feature_engagement/internal/feature_config_condition_validator.h index 12da9371..1fc8dbef 100644 --- a/components/feature_engagement/internal/feature_config_condition_validator.h +++ b/components/feature_engagement/internal/feature_config_condition_validator.h
@@ -21,6 +21,12 @@ class FeatureConfigConditionValidator : public ConditionValidator { public: FeatureConfigConditionValidator(); + + FeatureConfigConditionValidator(const FeatureConfigConditionValidator&) = + delete; + FeatureConfigConditionValidator& operator=( + const FeatureConfigConditionValidator&) = delete; + ~FeatureConfigConditionValidator() override; // ConditionValidator implementation. @@ -57,8 +63,6 @@ // By default, all features impact each other, but some features override this // through the use of |session_rate_impact|. std::map<std::string, uint32_t> times_shown_for_feature_; - - DISALLOW_COPY_AND_ASSIGN(FeatureConfigConditionValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/feature_config_condition_validator_unittest.cc b/components/feature_engagement/internal/feature_config_condition_validator_unittest.cc index 4b6018fd..5f48c3e 100644 --- a/components/feature_engagement/internal/feature_config_condition_validator_unittest.cc +++ b/components/feature_engagement/internal/feature_config_condition_validator_unittest.cc
@@ -161,6 +161,10 @@ class TestAvailabilityModel : public AvailabilityModel { public: TestAvailabilityModel() : ready_(true) {} + + TestAvailabilityModel(const TestAvailabilityModel&) = delete; + TestAvailabilityModel& operator=(const TestAvailabilityModel&) = delete; + ~TestAvailabilityModel() override = default; void Initialize(AvailabilityModel::OnInitializedCallback callback, @@ -188,13 +192,16 @@ bool ready_; std::map<std::string, absl::optional<uint32_t>> availabilities_; - - DISALLOW_COPY_AND_ASSIGN(TestAvailabilityModel); }; class TestDisplayLockController : public DisplayLockController { public: TestDisplayLockController() = default; + + TestDisplayLockController(const TestDisplayLockController&) = delete; + TestDisplayLockController& operator=(const TestDisplayLockController&) = + delete; + ~TestDisplayLockController() override = default; std::unique_ptr<DisplayLockHandle> AcquireDisplayLock() override { @@ -210,8 +217,6 @@ private: // The next result to return from IsDisplayLocked(). bool next_display_locked_result_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestDisplayLockController); }; class FeatureConfigConditionValidatorTest : public ::testing::Test {
diff --git a/components/feature_engagement/internal/feature_config_event_storage_validator.h b/components/feature_engagement/internal/feature_config_event_storage_validator.h index b7dd068..70b239f 100644 --- a/components/feature_engagement/internal/feature_config_event_storage_validator.h +++ b/components/feature_engagement/internal/feature_config_event_storage_validator.h
@@ -22,6 +22,12 @@ class FeatureConfigEventStorageValidator : public EventStorageValidator { public: FeatureConfigEventStorageValidator(); + + FeatureConfigEventStorageValidator( + const FeatureConfigEventStorageValidator&) = delete; + FeatureConfigEventStorageValidator& operator=( + const FeatureConfigEventStorageValidator&) = delete; + ~FeatureConfigEventStorageValidator() override; // EventStorageValidator implementation. @@ -54,8 +60,6 @@ // Contains the longest time to store each event across all EventConfigs, // as a number of days. std::unordered_map<std::string, uint32_t> longest_storage_times_; - - DISALLOW_COPY_AND_ASSIGN(FeatureConfigEventStorageValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/in_memory_event_store.h b/components/feature_engagement/internal/in_memory_event_store.h index 178b80d1..5912e270 100644 --- a/components/feature_engagement/internal/in_memory_event_store.h +++ b/components/feature_engagement/internal/in_memory_event_store.h
@@ -18,6 +18,10 @@ public: explicit InMemoryEventStore(std::unique_ptr<std::vector<Event>> events); InMemoryEventStore(); + + InMemoryEventStore(const InMemoryEventStore&) = delete; + InMemoryEventStore& operator=(const InMemoryEventStore&) = delete; + ~InMemoryEventStore() override; // EventStore implementation. @@ -39,8 +43,6 @@ // Whether the store is ready or not. It is true after Load(...) has been // invoked. bool ready_; - - DISALLOW_COPY_AND_ASSIGN(InMemoryEventStore); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/init_aware_event_model.h b/components/feature_engagement/internal/init_aware_event_model.h index 5ad9d2f..3154266 100644 --- a/components/feature_engagement/internal/init_aware_event_model.h +++ b/components/feature_engagement/internal/init_aware_event_model.h
@@ -20,6 +20,10 @@ class InitAwareEventModel : public EventModel { public: InitAwareEventModel(std::unique_ptr<EventModel> event_model); + + InitAwareEventModel(const InitAwareEventModel&) = delete; + InitAwareEventModel& operator=(const InitAwareEventModel&) = delete; + ~InitAwareEventModel() override; // EventModel implementation. @@ -58,8 +62,6 @@ bool initialization_complete_; base::WeakPtrFactory<InitAwareEventModel> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InitAwareEventModel); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/init_aware_event_model_unittest.cc b/components/feature_engagement/internal/init_aware_event_model_unittest.cc index a44480bf..427c00b 100644 --- a/components/feature_engagement/internal/init_aware_event_model_unittest.cc +++ b/components/feature_engagement/internal/init_aware_event_model_unittest.cc
@@ -27,6 +27,10 @@ class MockEventModel : public EventModel { public: MockEventModel() = default; + + MockEventModel(const MockEventModel&) = delete; + MockEventModel& operator=(const MockEventModel&) = delete; + ~MockEventModel() override = default; // EventModel implementation. @@ -42,9 +46,6 @@ MOCK_CONST_METHOD3(GetSnoozeCount, uint32_t(const std::string&, uint32_t, uint32_t)); MOCK_CONST_METHOD1(IsSnoozeDismissed, bool(const std::string&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockEventModel); }; class InitAwareEventModelTest : public testing::Test { @@ -54,6 +55,9 @@ &InitAwareEventModelTest::OnModelInitialized, base::Unretained(this)); } + InitAwareEventModelTest(const InitAwareEventModelTest&) = delete; + InitAwareEventModelTest& operator=(const InitAwareEventModelTest&) = delete; + ~InitAwareEventModelTest() override = default; void SetUp() override { @@ -71,9 +75,6 @@ // Load callback tracking. absl::optional<bool> load_success_; EventModel::OnModelInitializationFinished load_callback_; - - private: - DISALLOW_COPY_AND_ASSIGN(InitAwareEventModelTest); }; } // namespace
diff --git a/components/feature_engagement/internal/never_availability_model.h b/components/feature_engagement/internal/never_availability_model.h index 27fef7fe..7d38b42e 100644 --- a/components/feature_engagement/internal/never_availability_model.h +++ b/components/feature_engagement/internal/never_availability_model.h
@@ -17,6 +17,10 @@ class NeverAvailabilityModel : public AvailabilityModel { public: NeverAvailabilityModel(); + + NeverAvailabilityModel(const NeverAvailabilityModel&) = delete; + NeverAvailabilityModel& operator=(const NeverAvailabilityModel&) = delete; + ~NeverAvailabilityModel() override; // AvailabilityModel implementation. @@ -34,8 +38,6 @@ // Whether the model has been successfully initialized. bool ready_; - - DISALLOW_COPY_AND_ASSIGN(NeverAvailabilityModel); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/never_condition_validator.h b/components/feature_engagement/internal/never_condition_validator.h index 65888d2c..834f8b3 100644 --- a/components/feature_engagement/internal/never_condition_validator.h +++ b/components/feature_engagement/internal/never_condition_validator.h
@@ -23,6 +23,10 @@ class NeverConditionValidator : public ConditionValidator { public: NeverConditionValidator(); + + NeverConditionValidator(const NeverConditionValidator&) = delete; + NeverConditionValidator& operator=(const NeverConditionValidator&) = delete; + ~NeverConditionValidator() override; // ConditionValidator implementation. @@ -38,9 +42,6 @@ const FeatureConfig& config, const std::vector<std::string>& all_feature_names) override; void NotifyDismissed(const base::Feature& feature) override; - - private: - DISALLOW_COPY_AND_ASSIGN(NeverConditionValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/never_event_storage_validator.h b/components/feature_engagement/internal/never_event_storage_validator.h index 10ed679..55aebc7 100644 --- a/components/feature_engagement/internal/never_event_storage_validator.h +++ b/components/feature_engagement/internal/never_event_storage_validator.h
@@ -17,6 +17,11 @@ class NeverEventStorageValidator : public EventStorageValidator { public: NeverEventStorageValidator(); + + NeverEventStorageValidator(const NeverEventStorageValidator&) = delete; + NeverEventStorageValidator& operator=(const NeverEventStorageValidator&) = + delete; + ~NeverEventStorageValidator() override; // EventStorageValidator implementation. @@ -24,9 +29,6 @@ bool ShouldKeep(const std::string& event_name, uint32_t event_day, uint32_t current_day) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(NeverEventStorageValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/noop_display_lock_controller.h b/components/feature_engagement/internal/noop_display_lock_controller.h index 6f2950b..cad33f0 100644 --- a/components/feature_engagement/internal/noop_display_lock_controller.h +++ b/components/feature_engagement/internal/noop_display_lock_controller.h
@@ -18,14 +18,16 @@ class NoopDisplayLockController : public DisplayLockController { public: NoopDisplayLockController(); + + NoopDisplayLockController(const NoopDisplayLockController&) = delete; + NoopDisplayLockController& operator=(const NoopDisplayLockController&) = + delete; + ~NoopDisplayLockController() override; // DisplayLockController implementation. std::unique_ptr<DisplayLockHandle> AcquireDisplayLock() override; bool IsDisplayLocked() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(NoopDisplayLockController); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/once_condition_validator.h b/components/feature_engagement/internal/once_condition_validator.h index 434e1bdd..497b1ee 100644 --- a/components/feature_engagement/internal/once_condition_validator.h +++ b/components/feature_engagement/internal/once_condition_validator.h
@@ -36,6 +36,10 @@ class OnceConditionValidator : public ConditionValidator { public: OnceConditionValidator(); + + OnceConditionValidator(const OnceConditionValidator&) = delete; + OnceConditionValidator& operator=(const OnceConditionValidator&) = delete; + ~OnceConditionValidator() override; // ConditionValidator implementation. @@ -59,8 +63,6 @@ // Which feature that is currently being shown, or nullptr if nothing is // currently showing. std::string currently_showing_feature_; - - DISALLOW_COPY_AND_ASSIGN(OnceConditionValidator); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/persistent_availability_store_unittest.cc b/components/feature_engagement/internal/persistent_availability_store_unittest.cc index d2c32972..9b7928e 100644 --- a/components/feature_engagement/internal/persistent_availability_store_unittest.cc +++ b/components/feature_engagement/internal/persistent_availability_store_unittest.cc
@@ -51,6 +51,11 @@ &PersistentAvailabilityStoreTest::LoadCallback, base::Unretained(this)); } + PersistentAvailabilityStoreTest(const PersistentAvailabilityStoreTest&) = + delete; + PersistentAvailabilityStoreTest& operator=( + const PersistentAvailabilityStoreTest&) = delete; + ~PersistentAvailabilityStoreTest() override = default; // Creates a DB and stores off a pointer to it as a member. @@ -87,9 +92,6 @@ // Constant test data. base::FilePath storage_dir_; - - private: - DISALLOW_COPY_AND_ASSIGN(PersistentAvailabilityStoreTest); }; } // namespace
diff --git a/components/feature_engagement/internal/persistent_event_store.h b/components/feature_engagement/internal/persistent_event_store.h index 9a72760..e438a31 100644 --- a/components/feature_engagement/internal/persistent_event_store.h +++ b/components/feature_engagement/internal/persistent_event_store.h
@@ -25,6 +25,10 @@ public: // Builds a PersistentEventStore backed by the ProtoDatabase |db|. PersistentEventStore(std::unique_ptr<leveldb_proto::ProtoDatabase<Event>> db); + + PersistentEventStore(const PersistentEventStore&) = delete; + PersistentEventStore& operator=(const PersistentEventStore&) = delete; + ~PersistentEventStore() override; // EventStore implementation. @@ -49,8 +53,6 @@ bool ready_; base::WeakPtrFactory<PersistentEventStore> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PersistentEventStore); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/single_invalid_configuration.h b/components/feature_engagement/internal/single_invalid_configuration.h index bcf2335..68c24e7 100644 --- a/components/feature_engagement/internal/single_invalid_configuration.h +++ b/components/feature_engagement/internal/single_invalid_configuration.h
@@ -22,6 +22,11 @@ class SingleInvalidConfiguration : public Configuration { public: SingleInvalidConfiguration(); + + SingleInvalidConfiguration(const SingleInvalidConfiguration&) = delete; + SingleInvalidConfiguration& operator=(const SingleInvalidConfiguration&) = + delete; + ~SingleInvalidConfiguration() override; // Configuration implementation. @@ -38,8 +43,6 @@ // An empty map. ConfigMap configs_; - - DISALLOW_COPY_AND_ASSIGN(SingleInvalidConfiguration); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/system_time_provider.h b/components/feature_engagement/internal/system_time_provider.h index bd48c68..0c605c0 100644 --- a/components/feature_engagement/internal/system_time_provider.h +++ b/components/feature_engagement/internal/system_time_provider.h
@@ -15,6 +15,10 @@ class SystemTimeProvider : public TimeProvider { public: SystemTimeProvider(); + + SystemTimeProvider(const SystemTimeProvider&) = delete; + SystemTimeProvider& operator=(const SystemTimeProvider&) = delete; + ~SystemTimeProvider() override; // TimeProvider implementation. @@ -24,9 +28,6 @@ // Return the current time. // virtual for testing. virtual base::Time Now() const; - - private: - DISALLOW_COPY_AND_ASSIGN(SystemTimeProvider); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/time_provider.h b/components/feature_engagement/internal/time_provider.h index 50c73ee..48ee5ab 100644 --- a/components/feature_engagement/internal/time_provider.h +++ b/components/feature_engagement/internal/time_provider.h
@@ -14,6 +14,9 @@ // A TimeProvider provides functionality related to time. class TimeProvider { public: + TimeProvider(const TimeProvider&) = delete; + TimeProvider& operator=(const TimeProvider&) = delete; + virtual ~TimeProvider() = default; // Returns the number of days since epoch (1970-01-01) in the local timezone. @@ -21,9 +24,6 @@ protected: TimeProvider() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(TimeProvider); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/tracker_impl.h b/components/feature_engagement/internal/tracker_impl.h index 329c02a6..05fd637a 100644 --- a/components/feature_engagement/internal/tracker_impl.h +++ b/components/feature_engagement/internal/tracker_impl.h
@@ -32,6 +32,10 @@ std::unique_ptr<DisplayLockController> display_lock_controller, std::unique_ptr<ConditionValidator> condition_validator, std::unique_ptr<TimeProvider> time_provider); + + TrackerImpl(const TrackerImpl&) = delete; + TrackerImpl& operator=(const TrackerImpl&) = delete; + ~TrackerImpl() override; // Tracker implementation. @@ -100,8 +104,6 @@ std::vector<OnInitializedCallback> on_initialized_callbacks_; base::WeakPtrFactory<TrackerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TrackerImpl); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/internal/tracker_impl_unittest.cc b/components/feature_engagement/internal/tracker_impl_unittest.cc index bf92e5a..8a45cf4 100644 --- a/components/feature_engagement/internal/tracker_impl_unittest.cc +++ b/components/feature_engagement/internal/tracker_impl_unittest.cc
@@ -108,6 +108,12 @@ class StoreEverythingEventStorageValidator : public EventStorageValidator { public: StoreEverythingEventStorageValidator() = default; + + StoreEverythingEventStorageValidator( + const StoreEverythingEventStorageValidator&) = delete; + StoreEverythingEventStorageValidator& operator=( + const StoreEverythingEventStorageValidator&) = delete; + ~StoreEverythingEventStorageValidator() override = default; bool ShouldStore(const std::string& event_name) const override { @@ -119,26 +125,29 @@ uint32_t current_day) const override { return true; } - - private: - DISALLOW_COPY_AND_ASSIGN(StoreEverythingEventStorageValidator); }; class TestTimeProvider : public TimeProvider { public: TestTimeProvider() = default; + + TestTimeProvider(const TestTimeProvider&) = delete; + TestTimeProvider& operator=(const TestTimeProvider&) = delete; + ~TestTimeProvider() override = default; // TimeProvider implementation. uint32_t GetCurrentDay() const override { return 1u; } - - private: - DISALLOW_COPY_AND_ASSIGN(TestTimeProvider); }; class TestTrackerAvailabilityModel : public AvailabilityModel { public: TestTrackerAvailabilityModel() : ready_(true) {} + + TestTrackerAvailabilityModel(const TestTrackerAvailabilityModel&) = delete; + TestTrackerAvailabilityModel& operator=(const TestTrackerAvailabilityModel&) = + delete; + ~TestTrackerAvailabilityModel() override = default; void Initialize(AvailabilityModel::OnInitializedCallback callback, @@ -158,13 +167,17 @@ private: bool ready_; - - DISALLOW_COPY_AND_ASSIGN(TestTrackerAvailabilityModel); }; class TestTrackerDisplayLockController : public DisplayLockController { public: TestTrackerDisplayLockController() = default; + + TestTrackerDisplayLockController(const TestTrackerDisplayLockController&) = + delete; + TestTrackerDisplayLockController& operator=( + const TestTrackerDisplayLockController&) = delete; + ~TestTrackerDisplayLockController() override = default; std::unique_ptr<DisplayLockHandle> AcquireDisplayLock() override { @@ -181,8 +194,6 @@ private: // The next DisplayLockHandle to return. std::unique_ptr<DisplayLockHandle> next_display_lock_handle_; - - DISALLOW_COPY_AND_ASSIGN(TestTrackerDisplayLockController); }; class TrackerImplTest : public ::testing::Test {
diff --git a/components/feature_engagement/public/android/wrapping_test_tracker.h b/components/feature_engagement/public/android/wrapping_test_tracker.h index cc06a5f..cecbf4fa 100644 --- a/components/feature_engagement/public/android/wrapping_test_tracker.h +++ b/components/feature_engagement/public/android/wrapping_test_tracker.h
@@ -18,6 +18,10 @@ class WrappingTestTracker : public Tracker { public: explicit WrappingTestTracker(const base::android::JavaRef<jobject>& jtracker); + + WrappingTestTracker(const WrappingTestTracker&) = delete; + WrappingTestTracker& operator=(const WrappingTestTracker&) = delete; + ~WrappingTestTracker() override; // TrackerImpl: @@ -39,8 +43,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> java_tracker_; - - DISALLOW_COPY_AND_ASSIGN(WrappingTestTracker); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/public/configuration.h b/components/feature_engagement/public/configuration.h index 4dbf881..cf0b99cd 100644 --- a/components/feature_engagement/public/configuration.h +++ b/components/feature_engagement/public/configuration.h
@@ -177,6 +177,9 @@ // Convenience alias for typical implementations of Configuration. using ConfigMap = std::map<std::string, FeatureConfig>; + Configuration(const Configuration&) = delete; + Configuration& operator=(const Configuration&) = delete; + virtual ~Configuration() = default; // Returns the FeatureConfig for the given |feature|. The |feature| must @@ -197,9 +200,6 @@ protected: Configuration() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(Configuration); }; } // namespace feature_engagement
diff --git a/components/feature_engagement/public/tracker.h b/components/feature_engagement/public/tracker.h index 3387ae6f..efeb5ab 100644 --- a/components/feature_engagement/public/tracker.h +++ b/components/feature_engagement/public/tracker.h
@@ -35,11 +35,14 @@ public: typedef base::OnceClosure ReleaseCallback; explicit DisplayLockHandle(ReleaseCallback callback); + + DisplayLockHandle(const DisplayLockHandle&) = delete; + DisplayLockHandle& operator=(const DisplayLockHandle&) = delete; + ~DisplayLockHandle(); private: ReleaseCallback release_callback_; - DISALLOW_COPY_AND_ASSIGN(DisplayLockHandle); }; // The Tracker provides a backend for displaying feature
diff --git a/components/feature_engagement/test/mock_tracker.h b/components/feature_engagement/test/mock_tracker.h index d4507f0..07def98e 100644 --- a/components/feature_engagement/test/mock_tracker.h +++ b/components/feature_engagement/test/mock_tracker.h
@@ -18,6 +18,10 @@ class MockTracker : public Tracker { public: MockTracker(); + + MockTracker(const MockTracker&) = delete; + MockTracker& operator=(const MockTracker&) = delete; + ~MockTracker() override; // Tracker implememtation. @@ -37,9 +41,6 @@ absl::optional<SnoozeAction> snooze_action)); MOCK_METHOD0(AcquireDisplayLock, std::unique_ptr<DisplayLockHandle>()); MOCK_METHOD1(AddOnInitializedCallback, void(OnInitializedCallback callback)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockTracker); }; } // namespace test
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc index a2d8aaf9..e19e1b07 100644 --- a/components/feed/feed_feature_list.cc +++ b/components/feed/feed_feature_list.cc
@@ -68,6 +68,8 @@ base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kFeedImageMemoryCacheSizePercentage{ "FeedImageMemoryCacheSizePercentage", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kFeedClearImageMemoryCache{ + "FeedClearImageMemoryCache", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kFeedBackToTop{"FeedBackToTop", base::FEATURE_DISABLED_BY_DEFAULT}; const base::Feature kFeedStamp{"FeedStamp", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/components/feed/feed_feature_list.h b/components/feed/feed_feature_list.h index f58b1d0..b27ba1a 100644 --- a/components/feed/feed_feature_list.h +++ b/components/feed/feed_feature_list.h
@@ -67,6 +67,10 @@ // percentage of the maximum size calculated for the device. extern const base::Feature kFeedImageMemoryCacheSizePercentage; +// Feature that enables clearing the image memory cache when the feed is +// destroyed. +extern const base::Feature kFeedClearImageMemoryCache; + // Feature that enables showing a callout to help users return to the top of the // feeds quickly. extern const base::Feature kFeedBackToTop;
diff --git a/components/feedback/feedback_uploader.h b/components/feedback/feedback_uploader.h index 52c8f14..e9b83e8a 100644 --- a/components/feedback/feedback_uploader.h +++ b/components/feedback/feedback_uploader.h
@@ -51,6 +51,10 @@ bool is_off_the_record, const base::FilePath& state_path, scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory); + + FeedbackUploader(const FeedbackUploader&) = delete; + FeedbackUploader& operator=(const FeedbackUploader&) = delete; + ~FeedbackUploader() override; static void SetMinimumRetryDelayForTesting(base::TimeDelta delay); @@ -169,8 +173,6 @@ const bool is_off_the_record_ = false; UrlLoaderList uploads_in_progress_; - - DISALLOW_COPY_AND_ASSIGN(FeedbackUploader); }; } // namespace feedback
diff --git a/components/feedback/feedback_uploader_unittest.cc b/components/feedback/feedback_uploader_unittest.cc index be033ad..af84378d 100644 --- a/components/feedback/feedback_uploader_unittest.cc +++ b/components/feedback/feedback_uploader_unittest.cc
@@ -123,6 +123,9 @@ RecreateUploader(); } + FeedbackUploaderTest(const FeedbackUploaderTest&) = delete; + FeedbackUploaderTest& operator=(const FeedbackUploaderTest&) = delete; + ~FeedbackUploaderTest() override = default; void RecreateUploader() { @@ -143,8 +146,6 @@ base::test::TaskEnvironment task_environment_; base::ScopedTempDir scoped_temp_dir_; std::unique_ptr<MockFeedbackUploader> uploader_; - - DISALLOW_COPY_AND_ASSIGN(FeedbackUploaderTest); }; TEST_F(FeedbackUploaderTest, QueueMultiple) {
diff --git a/components/feedback/system_logs/system_logs_fetcher.h b/components/feedback/system_logs/system_logs_fetcher.h index 2cb73c5..fd3de5a 100644 --- a/components/feedback/system_logs/system_logs_fetcher.h +++ b/components/feedback/system_logs/system_logs_fetcher.h
@@ -51,6 +51,10 @@ // that value if it's OK to redact those URLs or they won't be present. explicit SystemLogsFetcher(bool scrub_data, const char* const first_party_extension_ids[]); + + SystemLogsFetcher(const SystemLogsFetcher&) = delete; + SystemLogsFetcher& operator=(const SystemLogsFetcher&) = delete; + ~SystemLogsFetcher(); // Adds a source to use when fetching. @@ -95,8 +99,6 @@ std::unique_ptr<feedback::RedactionTool> redactor_; base::WeakPtrFactory<SystemLogsFetcher> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SystemLogsFetcher); }; } // namespace system_logs
diff --git a/components/flags_ui/pref_service_flags_storage.h b/components/flags_ui/pref_service_flags_storage.h index 5d1a3863c..a7670b3 100644 --- a/components/flags_ui/pref_service_flags_storage.h +++ b/components/flags_ui/pref_service_flags_storage.h
@@ -24,6 +24,10 @@ class PrefServiceFlagsStorage : public FlagsStorage { public: explicit PrefServiceFlagsStorage(PrefService* prefs); + + PrefServiceFlagsStorage(const PrefServiceFlagsStorage&) = delete; + PrefServiceFlagsStorage& operator=(const PrefServiceFlagsStorage&) = delete; + ~PrefServiceFlagsStorage() override; std::set<std::string> GetFlags() const override; @@ -42,8 +46,6 @@ private: PrefService* prefs_; - - DISALLOW_COPY_AND_ASSIGN(PrefServiceFlagsStorage); }; } // namespace flags_ui
diff --git a/components/fullscreen_control/fullscreen_control_popup.h b/components/fullscreen_control/fullscreen_control_popup.h index 1ce95d1e..85be2f7 100644 --- a/components/fullscreen_control/fullscreen_control_popup.h +++ b/components/fullscreen_control/fullscreen_control_popup.h
@@ -28,6 +28,10 @@ FullscreenControlPopup(gfx::NativeView parent_view, const base::RepeatingClosure& on_button_pressed, const base::RepeatingClosure& on_visibility_changed); + + FullscreenControlPopup(const FullscreenControlPopup&) = delete; + FullscreenControlPopup& operator=(const FullscreenControlPopup&) = delete; + ~FullscreenControlPopup() override; // Returns the final bottom of the button as a y offset to its parent view. @@ -75,8 +79,6 @@ gfx::Rect parent_bounds_in_screen_; const base::RepeatingClosure on_visibility_changed_; - - DISALLOW_COPY_AND_ASSIGN(FullscreenControlPopup); }; #endif // COMPONENTS_FULLSCREEN_CONTROL_FULLSCREEN_CONTROL_POPUP_H_
diff --git a/components/fullscreen_control/fullscreen_control_popup_unittest.cc b/components/fullscreen_control/fullscreen_control_popup_unittest.cc index 53ec2f6..7f284e1 100644 --- a/components/fullscreen_control/fullscreen_control_popup_unittest.cc +++ b/components/fullscreen_control/fullscreen_control_popup_unittest.cc
@@ -20,6 +20,11 @@ class FullscreenControlPopupTest : public views::test::WidgetTest { public: FullscreenControlPopupTest() {} + + FullscreenControlPopupTest(const FullscreenControlPopupTest&) = delete; + FullscreenControlPopupTest& operator=(const FullscreenControlPopupTest&) = + delete; + ~FullscreenControlPopupTest() override {} // views::test::WidgetTest: @@ -63,8 +68,6 @@ private: std::unique_ptr<gfx::AnimationTestApi> animation_api_; views::Widget* parent_widget_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FullscreenControlPopupTest); }; TEST_F(FullscreenControlPopupTest, ShowPopupAnimated) {
diff --git a/components/gcm_driver/crypto/gcm_encryption_provider.h b/components/gcm_driver/crypto/gcm_encryption_provider.h index a6820368..b1affc4 100644 --- a/components/gcm_driver/crypto/gcm_encryption_provider.h +++ b/components/gcm_driver/crypto/gcm_encryption_provider.h
@@ -59,6 +59,10 @@ static const char kContentCodingAes128Gcm[]; GCMEncryptionProvider(); + + GCMEncryptionProvider(const GCMEncryptionProvider&) = delete; + GCMEncryptionProvider& operator=(const GCMEncryptionProvider&) = delete; + ~GCMEncryptionProvider(); // Initializes the encryption provider with the |store_path| and the @@ -147,8 +151,6 @@ std::unique_ptr<GCMKeyStore> key_store_; base::WeakPtrFactory<GCMEncryptionProvider> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMEncryptionProvider); }; } // namespace gcm
diff --git a/components/gcm_driver/crypto/gcm_key_store.h b/components/gcm_driver/crypto/gcm_key_store.h index 6badcab..4f65a436 100644 --- a/components/gcm_driver/crypto/gcm_key_store.h +++ b/components/gcm_driver/crypto/gcm_key_store.h
@@ -43,6 +43,10 @@ GCMKeyStore( const base::FilePath& key_store_path, const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + + GCMKeyStore(const GCMKeyStore&) = delete; + GCMKeyStore& operator=(const GCMKeyStore&) = delete; + ~GCMKeyStore(); // Retrieves the public/private key-pair associated with the |app_id| + @@ -140,8 +144,6 @@ key_data_; base::WeakPtrFactory<GCMKeyStore> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMKeyStore); }; } // namespace gcm
diff --git a/components/gcm_driver/crypto/gcm_message_cryptographer.cc b/components/gcm_driver/crypto/gcm_message_cryptographer.cc index b4bd755..51363dcf 100644 --- a/components/gcm_driver/crypto/gcm_message_cryptographer.cc +++ b/components/gcm_driver/crypto/gcm_message_cryptographer.cc
@@ -48,6 +48,10 @@ : public GCMMessageCryptographer::EncryptionScheme { public: WebPushEncryptionDraft03() = default; + + WebPushEncryptionDraft03(const WebPushEncryptionDraft03&) = delete; + WebPushEncryptionDraft03& operator=(const WebPushEncryptionDraft03&) = delete; + ~WebPushEncryptionDraft03() override = default; // GCMMessageCryptographer::EncryptionScheme implementation. @@ -164,9 +168,6 @@ record.remove_prefix(padding_length); return true; } - - private: - DISALLOW_COPY_AND_ASSIGN(WebPushEncryptionDraft03); }; // Implementation of draft 08 of the Web Push Encryption standard: @@ -176,6 +177,10 @@ : public GCMMessageCryptographer::EncryptionScheme { public: WebPushEncryptionDraft08() = default; + + WebPushEncryptionDraft08(const WebPushEncryptionDraft08&) = delete; + WebPushEncryptionDraft08& operator=(const WebPushEncryptionDraft08&) = delete; + ~WebPushEncryptionDraft08() override = default; // GCMMessageCryptographer::EncryptionScheme implementation. @@ -266,9 +271,6 @@ record.remove_suffix(padding_length); return true; } - - private: - DISALLOW_COPY_AND_ASSIGN(WebPushEncryptionDraft08); }; } // namespace
diff --git a/components/gcm_driver/crypto/message_payload_parser.h b/components/gcm_driver/crypto/message_payload_parser.h index d629b7a3..2b18268 100644 --- a/components/gcm_driver/crypto/message_payload_parser.h +++ b/components/gcm_driver/crypto/message_payload_parser.h
@@ -37,6 +37,10 @@ class MessagePayloadParser { public: explicit MessagePayloadParser(base::StringPiece message); + + MessagePayloadParser(const MessagePayloadParser&) = delete; + MessagePayloadParser& operator=(const MessagePayloadParser&) = delete; + ~MessagePayloadParser(); // Returns whether the parser represents a valid message. @@ -87,8 +91,6 @@ uint32_t record_size_ = 0; std::string public_key_; std::string ciphertext_; - - DISALLOW_COPY_AND_ASSIGN(MessagePayloadParser); }; } // namespace gcm
diff --git a/components/gcm_driver/fake_gcm_app_handler.h b/components/gcm_driver/fake_gcm_app_handler.h index 50bc38bf..190774f7 100644 --- a/components/gcm_driver/fake_gcm_app_handler.h +++ b/components/gcm_driver/fake_gcm_app_handler.h
@@ -28,6 +28,10 @@ }; FakeGCMAppHandler(); + + FakeGCMAppHandler(const FakeGCMAppHandler&) = delete; + FakeGCMAppHandler& operator=(const FakeGCMAppHandler&) = delete; + ~FakeGCMAppHandler() override; const Event& received_event() const { return received_event_; } @@ -65,8 +69,6 @@ std::string acked_message_id_; IncomingMessage message_; GCMClient::SendErrorDetails send_error_details_; - - DISALLOW_COPY_AND_ASSIGN(FakeGCMAppHandler); }; } // namespace gcm
diff --git a/components/gcm_driver/fake_gcm_client.h b/components/gcm_driver/fake_gcm_client.h index 58ffb6b..0a6c33c 100644 --- a/components/gcm_driver/fake_gcm_client.h +++ b/components/gcm_driver/fake_gcm_client.h
@@ -40,6 +40,10 @@ FakeGCMClient(const scoped_refptr<base::SequencedTaskRunner>& ui_thread, const scoped_refptr<base::SequencedTaskRunner>& io_thread); + + FakeGCMClient(const FakeGCMClient&) = delete; + FakeGCMClient& operator=(const FakeGCMClient&) = delete; + ~FakeGCMClient() override; // Overridden from GCMClient: @@ -128,8 +132,6 @@ std::map<std::string, std::pair<std::string, std::string>> instance_id_data_; GCMStatsRecorderImpl recorder_; base::WeakPtrFactory<FakeGCMClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeGCMClient); }; } // namespace gcm
diff --git a/components/gcm_driver/fake_gcm_client_factory.h b/components/gcm_driver/fake_gcm_client_factory.h index 4ab893d..5bf1888c 100644 --- a/components/gcm_driver/fake_gcm_client_factory.h +++ b/components/gcm_driver/fake_gcm_client_factory.h
@@ -23,6 +23,10 @@ FakeGCMClientFactory( const scoped_refptr<base::SequencedTaskRunner>& ui_thread, const scoped_refptr<base::SequencedTaskRunner>& io_thread); + + FakeGCMClientFactory(const FakeGCMClientFactory&) = delete; + FakeGCMClientFactory& operator=(const FakeGCMClientFactory&) = delete; + ~FakeGCMClientFactory() override; // GCMClientFactory: @@ -31,8 +35,6 @@ private: scoped_refptr<base::SequencedTaskRunner> ui_thread_; scoped_refptr<base::SequencedTaskRunner> io_thread_; - - DISALLOW_COPY_AND_ASSIGN(FakeGCMClientFactory); }; } // namespace gcm
diff --git a/components/gcm_driver/fake_gcm_driver.h b/components/gcm_driver/fake_gcm_driver.h index 2e106a5..fe943f3 100644 --- a/components/gcm_driver/fake_gcm_driver.h +++ b/components/gcm_driver/fake_gcm_driver.h
@@ -22,6 +22,9 @@ explicit FakeGCMDriver( const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + FakeGCMDriver(const FakeGCMDriver&) = delete; + FakeGCMDriver& operator=(const FakeGCMDriver&) = delete; + ~FakeGCMDriver() override; // GCMDriver overrides: @@ -62,9 +65,6 @@ const OutgoingMessage& message) override; void RecordDecryptionFailure(const std::string& app_id, GCMDecryptionResult result) override; - - private: - DISALLOW_COPY_AND_ASSIGN(FakeGCMDriver); }; } // namespace gcm
diff --git a/components/gcm_driver/fake_gcm_profile_service.cc b/components/gcm_driver/fake_gcm_profile_service.cc index 3be4335..b0bfb46 100644 --- a/components/gcm_driver/fake_gcm_profile_service.cc +++ b/components/gcm_driver/fake_gcm_profile_service.cc
@@ -27,6 +27,10 @@ : public instance_id::FakeGCMDriverForInstanceID { public: explicit CustomFakeGCMDriver(FakeGCMProfileService* service); + + CustomFakeGCMDriver(const CustomFakeGCMDriver&) = delete; + CustomFakeGCMDriver& operator=(const CustomFakeGCMDriver&) = delete; + ~CustomFakeGCMDriver() override; void OnRegisterFinished(const std::string& app_id, @@ -85,8 +89,6 @@ base::WeakPtrFactory<CustomFakeGCMDriver> weak_factory_{ this}; // Must be last. - - DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver); }; FakeGCMProfileService::CustomFakeGCMDriver::CustomFakeGCMDriver(
diff --git a/components/gcm_driver/fake_gcm_profile_service.h b/components/gcm_driver/fake_gcm_profile_service.h index 8302eb63..38818677 100644 --- a/components/gcm_driver/fake_gcm_profile_service.h +++ b/components/gcm_driver/fake_gcm_profile_service.h
@@ -28,6 +28,10 @@ static std::unique_ptr<KeyedService> Build(content::BrowserContext* context); FakeGCMProfileService(); + + FakeGCMProfileService(const FakeGCMProfileService&) = delete; + FakeGCMProfileService& operator=(const FakeGCMProfileService&) = delete; + ~FakeGCMProfileService() override; void AddExpectedUnregisterResponse(GCMClient::Result result); @@ -69,8 +73,6 @@ std::list<GCMClient::Result> unregister_responses_; OutgoingMessage last_sent_message_; std::string last_receiver_id_; - - DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_account_mapper.h b/components/gcm_driver/gcm_account_mapper.h index ef8a932..5b9a6f9 100644 --- a/components/gcm_driver/gcm_account_mapper.h +++ b/components/gcm_driver/gcm_account_mapper.h
@@ -35,6 +35,10 @@ const IncomingMessage& message)>; explicit GCMAccountMapper(GCMDriver* gcm_driver); + + GCMAccountMapper(const GCMAccountMapper&) = delete; + GCMAccountMapper& operator=(const GCMAccountMapper&) = delete; + ~GCMAccountMapper() override; void Initialize(const AccountMappings& account_mappings, @@ -125,8 +129,6 @@ bool initialized_; base::WeakPtrFactory<GCMAccountMapper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMAccountMapper); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_account_tracker.h b/components/gcm_driver/gcm_account_tracker.h index 64deabc..15c79c8b 100644 --- a/components/gcm_driver/gcm_account_tracker.h +++ b/components/gcm_driver/gcm_account_tracker.h
@@ -77,6 +77,10 @@ GCMAccountTracker(std::unique_ptr<AccountTracker> account_tracker, signin::IdentityManager* identity_manager, GCMDriver* driver); + + GCMAccountTracker(const GCMAccountTracker&) = delete; + GCMAccountTracker& operator=(const GCMAccountTracker&) = delete; + ~GCMAccountTracker() override; // Shuts down the tracker ensuring a proper clean up. After Shutdown() is @@ -161,8 +165,6 @@ // Creates weak pointers used to postpone reporting tokens. See // ScheduleReportTokens. base::WeakPtrFactory<GCMAccountTracker> reporting_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMAccountTracker); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_account_tracker_unittest.cc b/components/gcm_driver/gcm_account_tracker_unittest.cc index a8dfbd4..5b148aa 100644 --- a/components/gcm_driver/gcm_account_tracker_unittest.cc +++ b/components/gcm_driver/gcm_account_tracker_unittest.cc
@@ -69,6 +69,10 @@ class CustomFakeGCMDriver : public FakeGCMDriver { public: CustomFakeGCMDriver(); + + CustomFakeGCMDriver(const CustomFakeGCMDriver&) = delete; + CustomFakeGCMDriver& operator=(const CustomFakeGCMDriver&) = delete; + ~CustomFakeGCMDriver() override; // GCMDriver overrides: @@ -102,8 +106,6 @@ GCMConnectionObserver* removed_connection_observer_; net::IPEndPoint ip_endpoint_; base::Time last_token_fetch_time_; - - DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver); }; CustomFakeGCMDriver::CustomFakeGCMDriver()
diff --git a/components/gcm_driver/gcm_client_factory.h b/components/gcm_driver/gcm_client_factory.h index 963b863..40be456 100644 --- a/components/gcm_driver/gcm_client_factory.h +++ b/components/gcm_driver/gcm_client_factory.h
@@ -16,14 +16,15 @@ class GCMClientFactory { public: GCMClientFactory(); + + GCMClientFactory(const GCMClientFactory&) = delete; + GCMClientFactory& operator=(const GCMClientFactory&) = delete; + virtual ~GCMClientFactory(); // Creates a new instance of GCMClient. The testing code could override this // to provide a mocked instance. virtual std::unique_ptr<GCMClient> BuildInstance(); - - private: - DISALLOW_COPY_AND_ASSIGN(GCMClientFactory); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_client_impl.h b/components/gcm_driver/gcm_client_impl.h index 6460f0b6..4deec1e 100644 --- a/components/gcm_driver/gcm_client_impl.h +++ b/components/gcm_driver/gcm_client_impl.h
@@ -109,6 +109,10 @@ explicit GCMClientImpl( std::unique_ptr<GCMInternalsBuilder> internals_builder); + + GCMClientImpl(const GCMClientImpl&) = delete; + GCMClientImpl& operator=(const GCMClientImpl&) = delete; + ~GCMClientImpl() override; // GCMClient implementation. @@ -419,8 +423,6 @@ // Factory for creating references in callbacks. base::WeakPtrFactory<GCMClientImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMClientImpl); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_client_impl_unittest.cc b/components/gcm_driver/gcm_client_impl_unittest.cc index fdfb25ad..57d6cb8 100644 --- a/components/gcm_driver/gcm_client_impl_unittest.cc +++ b/components/gcm_driver/gcm_client_impl_unittest.cc
@@ -186,6 +186,10 @@ class AutoAdvancingTestClock : public base::Clock { public: explicit AutoAdvancingTestClock(base::TimeDelta auto_increment_time_delta); + + AutoAdvancingTestClock(const AutoAdvancingTestClock&) = delete; + AutoAdvancingTestClock& operator=(const AutoAdvancingTestClock&) = delete; + ~AutoAdvancingTestClock() override; base::Time Now() const override; @@ -196,8 +200,6 @@ mutable int call_count_; base::TimeDelta auto_increment_time_delta_; mutable base::Time now_; - - DISALLOW_COPY_AND_ASSIGN(AutoAdvancingTestClock); }; AutoAdvancingTestClock::AutoAdvancingTestClock(
diff --git a/components/gcm_driver/gcm_delayed_task_controller.h b/components/gcm_driver/gcm_delayed_task_controller.h index bdd500fe..fb3dfcf 100644 --- a/components/gcm_driver/gcm_delayed_task_controller.h +++ b/components/gcm_driver/gcm_delayed_task_controller.h
@@ -16,6 +16,10 @@ class GCMDelayedTaskController { public: GCMDelayedTaskController(); + + GCMDelayedTaskController(const GCMDelayedTaskController&) = delete; + GCMDelayedTaskController& operator=(const GCMDelayedTaskController&) = delete; + ~GCMDelayedTaskController(); // Adds a task that will be invoked once we're ready. @@ -34,8 +38,6 @@ bool ready_; std::vector<base::OnceClosure> delayed_tasks_; - - DISALLOW_COPY_AND_ASSIGN(GCMDelayedTaskController); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h index 2fbb1c5..aed39899 100644 --- a/components/gcm_driver/gcm_driver.h +++ b/components/gcm_driver/gcm_driver.h
@@ -45,6 +45,10 @@ const std::string& extra_data)>; InstanceIDHandler(); + + InstanceIDHandler(const InstanceIDHandler&) = delete; + InstanceIDHandler& operator=(const InstanceIDHandler&) = delete; + virtual ~InstanceIDHandler(); // Token service. @@ -72,9 +76,6 @@ virtual void RemoveInstanceIDData(const std::string& app_id) = 0; virtual void GetInstanceIDData(const std::string& app_id, GetInstanceIDDataCallback callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(InstanceIDHandler); }; // Bridge between GCM users in Chrome and the platform-specific implementation. @@ -111,6 +112,10 @@ GCMDriver( const base::FilePath& store_path, const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + + GCMDriver(const GCMDriver&) = delete; + GCMDriver& operator=(const GCMDriver&) = delete; + virtual ~GCMDriver(); // Registers |sender_ids| for an app. *Use |InstanceID| instead in new code.* @@ -384,8 +389,6 @@ GCMAppHandlerMap app_handlers_; base::WeakPtrFactory<GCMDriver> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMDriver); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_driver_android.h b/components/gcm_driver/gcm_driver_android.h index 0840eb8..769f98dbb 100644 --- a/components/gcm_driver/gcm_driver_android.h +++ b/components/gcm_driver/gcm_driver_android.h
@@ -29,6 +29,10 @@ GCMDriverAndroid( const base::FilePath& store_path, const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + + GCMDriverAndroid(const GCMDriverAndroid&) = delete; + GCMDriverAndroid& operator=(const GCMDriverAndroid&) = delete; + ~GCMDriverAndroid() override; // Methods called from Java via JNI: @@ -105,8 +109,6 @@ // Recorder that logs GCM activities. GCMStatsRecorderAndroid recorder_; - - DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc index 0e0f2ea..a12205e 100644 --- a/components/gcm_driver/gcm_driver_desktop.cc +++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -37,6 +37,10 @@ // Called on UI thread. IOWorker(const scoped_refptr<base::SequencedTaskRunner>& ui_thread, const scoped_refptr<base::SequencedTaskRunner>& io_thread); + + IOWorker(const IOWorker&) = delete; + IOWorker& operator=(const IOWorker&) = delete; + virtual ~IOWorker(); // Overridden from GCMClient::Delegate: @@ -126,8 +130,6 @@ base::WeakPtr<GCMDriverDesktop> service_; std::unique_ptr<GCMClient> gcm_client_; - - DISALLOW_COPY_AND_ASSIGN(IOWorker); }; GCMDriverDesktop::IOWorker::IOWorker(
diff --git a/components/gcm_driver/gcm_driver_desktop.h b/components/gcm_driver/gcm_driver_desktop.h index 0acec2c..14f83e4 100644 --- a/components/gcm_driver/gcm_driver_desktop.h +++ b/components/gcm_driver/gcm_driver_desktop.h
@@ -66,6 +66,10 @@ const scoped_refptr<base::SequencedTaskRunner>& ui_thread, const scoped_refptr<base::SequencedTaskRunner>& io_thread, const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + + GCMDriverDesktop(const GCMDriverDesktop&) = delete; + GCMDriverDesktop& operator=(const GCMDriverDesktop&) = delete; + ~GCMDriverDesktop() override; // GCMDriver implementation: @@ -249,8 +253,6 @@ // Used to pass a weak pointer to the IO worker. base::WeakPtrFactory<GCMDriverDesktop> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMDriverDesktop); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_driver_desktop_unittest.cc b/components/gcm_driver/gcm_driver_desktop_unittest.cc index 543cc3c..917162a 100644 --- a/components/gcm_driver/gcm_driver_desktop_unittest.cc +++ b/components/gcm_driver/gcm_driver_desktop_unittest.cc
@@ -101,6 +101,10 @@ }; GCMDriverTest(); + + GCMDriverTest(const GCMDriverTest&) = delete; + GCMDriverTest& operator=(const GCMDriverTest&) = delete; + ~GCMDriverTest() override; // testing::Test: @@ -182,8 +186,6 @@ GCMClient::Result unregistration_result_; std::string p256dh_; std::string auth_secret_; - - DISALLOW_COPY_AND_ASSIGN(GCMDriverTest); }; GCMDriverTest::GCMDriverTest() @@ -525,13 +527,14 @@ class GCMDriverFunctionalTest : public GCMDriverTest { public: GCMDriverFunctionalTest(); + + GCMDriverFunctionalTest(const GCMDriverFunctionalTest&) = delete; + GCMDriverFunctionalTest& operator=(const GCMDriverFunctionalTest&) = delete; + ~GCMDriverFunctionalTest() override; // GCMDriverTest: void SetUp() override; - - private: - DISALLOW_COPY_AND_ASSIGN(GCMDriverFunctionalTest); }; GCMDriverFunctionalTest::GCMDriverFunctionalTest() { @@ -882,6 +885,10 @@ class GCMDriverInstanceIDTest : public GCMDriverTest { public: GCMDriverInstanceIDTest(); + + GCMDriverInstanceIDTest(const GCMDriverInstanceIDTest&) = delete; + GCMDriverInstanceIDTest& operator=(const GCMDriverInstanceIDTest&) = delete; + ~GCMDriverInstanceIDTest() override; void GetReady(); @@ -913,8 +920,6 @@ std::string extra_data_; int instance_id_resolved_counter_ = 0; - - DISALLOW_COPY_AND_ASSIGN(GCMDriverInstanceIDTest); }; GCMDriverInstanceIDTest::GCMDriverInstanceIDTest() {
diff --git a/components/gcm_driver/gcm_driver_unittest.cc b/components/gcm_driver/gcm_driver_unittest.cc index 92a9a88..8ff5507 100644 --- a/components/gcm_driver/gcm_driver_unittest.cc +++ b/components/gcm_driver/gcm_driver_unittest.cc
@@ -51,6 +51,10 @@ enum WaitToFinish { DO_NOT_WAIT, WAIT }; GCMDriverBaseTest(); + + GCMDriverBaseTest(const GCMDriverBaseTest&) = delete; + GCMDriverBaseTest& operator=(const GCMDriverBaseTest&) = delete; + ~GCMDriverBaseTest() override; // testing::Test: @@ -109,8 +113,6 @@ std::string encrypted_message_; GCMDecryptionResult decryption_result_ = GCMDecryptionResult::UNENCRYPTED; std::string decrypted_message_; - - DISALLOW_COPY_AND_ASSIGN(GCMDriverBaseTest); }; GCMDriverBaseTest::GCMDriverBaseTest() : io_thread_("IOThread") {}
diff --git a/components/gcm_driver/gcm_profile_service.cc b/components/gcm_driver/gcm_profile_service.cc index ea682b2..ca59b2f 100644 --- a/components/gcm_driver/gcm_profile_service.cc +++ b/components/gcm_driver/gcm_profile_service.cc
@@ -42,6 +42,10 @@ signin::IdentityManager* identity_manager, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, GCMDriver* driver); + + IdentityObserver(const IdentityObserver&) = delete; + IdentityObserver& operator=(const IdentityObserver&) = delete; + ~IdentityObserver() override; // signin::IdentityManager::Observer: @@ -63,8 +67,6 @@ base::WeakPtrFactory<GCMProfileService::IdentityObserver> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(IdentityObserver); }; GCMProfileService::IdentityObserver::IdentityObserver(
diff --git a/components/gcm_driver/gcm_profile_service.h b/components/gcm_driver/gcm_profile_service.h index 44b8ba1..26442a6 100644 --- a/components/gcm_driver/gcm_profile_service.h +++ b/components/gcm_driver/gcm_profile_service.h
@@ -69,6 +69,10 @@ const scoped_refptr<base::SequencedTaskRunner>& io_task_runner, scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); #endif + + GCMProfileService(const GCMProfileService&) = delete; + GCMProfileService& operator=(const GCMProfileService&) = delete; + ~GCMProfileService() override; // KeyedService: @@ -100,8 +104,6 @@ // WeakPtr generated by the factory must be dereferenced on the UI thread. base::WeakPtrFactory<GCMProfileService> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GCMProfileService); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_stats_recorder_android.h b/components/gcm_driver/gcm_stats_recorder_android.h index bde0b43..ceda7a4c 100644 --- a/components/gcm_driver/gcm_stats_recorder_android.h +++ b/components/gcm_driver/gcm_stats_recorder_android.h
@@ -34,6 +34,10 @@ // A weak reference to |delegate| is stored, so it must outlive the recorder. explicit GCMStatsRecorderAndroid(Delegate* delegate); + + GCMStatsRecorderAndroid(const GCMStatsRecorderAndroid&) = delete; + GCMStatsRecorderAndroid& operator=(const GCMStatsRecorderAndroid&) = delete; + ~GCMStatsRecorderAndroid(); // Clears the recorded activities. @@ -88,8 +92,6 @@ // Recorded message decryption failure activities. base::circular_deque<DecryptionFailureActivity> decryption_failure_activities_; - - DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderAndroid); }; } // namespace gcm
diff --git a/components/gcm_driver/gcm_stats_recorder_impl.h b/components/gcm_driver/gcm_stats_recorder_impl.h index c58ed45..73eb78d9 100644 --- a/components/gcm_driver/gcm_stats_recorder_impl.h +++ b/components/gcm_driver/gcm_stats_recorder_impl.h
@@ -31,6 +31,10 @@ class GCMStatsRecorderImpl : public GCMStatsRecorder { public: GCMStatsRecorderImpl(); + + GCMStatsRecorderImpl(const GCMStatsRecorderImpl&) = delete; + GCMStatsRecorderImpl& operator=(const GCMStatsRecorderImpl&) = delete; + ~GCMStatsRecorderImpl() override; // Set a delegate to receive callback from the recorder. @@ -160,8 +164,6 @@ decryption_failure_activities_; base::TimeTicks last_connection_initiation_time_; - - DISALLOW_COPY_AND_ASSIGN(GCMStatsRecorderImpl); }; } // namespace gcm
diff --git a/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h b/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h index b829808..35140a2 100644 --- a/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h +++ b/components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h
@@ -25,6 +25,11 @@ FakeGCMDriverForInstanceID(); explicit FakeGCMDriverForInstanceID( const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner); + + FakeGCMDriverForInstanceID(const FakeGCMDriverForInstanceID&) = delete; + FakeGCMDriverForInstanceID& operator=(const FakeGCMDriverForInstanceID&) = + delete; + ~FakeGCMDriverForInstanceID() override; // FakeGCMDriver overrides: @@ -69,8 +74,6 @@ std::string last_gettoken_app_id_; std::string last_gettoken_authorized_entity_; std::string last_deletetoken_app_id_; - - DISALLOW_COPY_AND_ASSIGN(FakeGCMDriverForInstanceID); }; } // namespace instance_id
diff --git a/components/gcm_driver/instance_id/instance_id.h b/components/gcm_driver/instance_id/instance_id.h index b26ed52..64057b7 100644 --- a/components/gcm_driver/instance_id/instance_id.h +++ b/components/gcm_driver/instance_id/instance_id.h
@@ -85,6 +85,9 @@ static std::unique_ptr<InstanceID> CreateInternal(const std::string& app_id, gcm::GCMDriver* gcm_driver); + InstanceID(const InstanceID&) = delete; + InstanceID& operator=(const InstanceID&) = delete; + virtual ~InstanceID(); // Returns the Instance ID. @@ -172,8 +175,6 @@ std::string app_id_; base::WeakPtrFactory<InstanceID> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InstanceID); }; } // namespace instance_id
diff --git a/components/gcm_driver/instance_id/instance_id_android.h b/components/gcm_driver/instance_id/instance_id_android.h index 8cec526..cff8674 100644 --- a/components/gcm_driver/instance_id/instance_id_android.h +++ b/components/gcm_driver/instance_id/instance_id_android.h
@@ -29,11 +29,16 @@ class ScopedBlockOnAsyncTasksForTesting { public: ScopedBlockOnAsyncTasksForTesting(); + + ScopedBlockOnAsyncTasksForTesting( + const ScopedBlockOnAsyncTasksForTesting&) = delete; + ScopedBlockOnAsyncTasksForTesting& operator=( + const ScopedBlockOnAsyncTasksForTesting&) = delete; + ~ScopedBlockOnAsyncTasksForTesting(); private: bool previous_value_; - DISALLOW_COPY_AND_ASSIGN(ScopedBlockOnAsyncTasksForTesting); }; InstanceIDAndroid(const std::string& app_id, gcm::GCMDriver* gcm_driver);
diff --git a/components/gcm_driver/instance_id/instance_id_driver.h b/components/gcm_driver/instance_id/instance_id_driver.h index 68e9413c..a732c2b 100644 --- a/components/gcm_driver/instance_id/instance_id_driver.h +++ b/components/gcm_driver/instance_id/instance_id_driver.h
@@ -26,6 +26,10 @@ class InstanceIDDriver { public: explicit InstanceIDDriver(gcm::GCMDriver* gcm_driver); + + InstanceIDDriver(const InstanceIDDriver&) = delete; + InstanceIDDriver& operator=(const InstanceIDDriver&) = delete; + virtual ~InstanceIDDriver(); // Returns the InstanceID that provides the Instance ID service for the given @@ -47,8 +51,6 @@ gcm::GCMDriver* gcm_driver_; std::map<std::string, std::unique_ptr<InstanceID>> instance_id_map_; - - DISALLOW_COPY_AND_ASSIGN(InstanceIDDriver); }; } // namespace instance_id
diff --git a/components/gcm_driver/instance_id/instance_id_driver_unittest.cc b/components/gcm_driver/instance_id/instance_id_driver_unittest.cc index 94489e7..678f332 100644 --- a/components/gcm_driver/instance_id/instance_id_driver_unittest.cc +++ b/components/gcm_driver/instance_id/instance_id_driver_unittest.cc
@@ -55,6 +55,10 @@ class InstanceIDDriverTest : public testing::Test { public: InstanceIDDriverTest(); + + InstanceIDDriverTest(const InstanceIDDriverTest&) = delete; + InstanceIDDriverTest& operator=(const InstanceIDDriverTest&) = delete; + ~InstanceIDDriverTest() override; // testing::Test: @@ -103,8 +107,6 @@ bool async_operation_completed_; base::OnceClosure async_operation_completed_callback_; - - DISALLOW_COPY_AND_ASSIGN(InstanceIDDriverTest); }; InstanceIDDriverTest::InstanceIDDriverTest()
diff --git a/components/gcm_driver/instance_id/instance_id_impl.h b/components/gcm_driver/instance_id/instance_id_impl.h index b1552890..a53d341c 100644 --- a/components/gcm_driver/instance_id/instance_id_impl.h +++ b/components/gcm_driver/instance_id/instance_id_impl.h
@@ -27,6 +27,10 @@ class InstanceIDImpl : public InstanceID { public: InstanceIDImpl(const std::string& app_id, gcm::GCMDriver* gcm_driver); + + InstanceIDImpl(const InstanceIDImpl&) = delete; + InstanceIDImpl& operator=(const InstanceIDImpl&) = delete; + ~InstanceIDImpl() override; // InstanceID: @@ -88,8 +92,6 @@ base::Time creation_time_; base::WeakPtrFactory<InstanceIDImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InstanceIDImpl); }; } // namespace instance_id
diff --git a/components/gcm_driver/instance_id/instance_id_profile_service.h b/components/gcm_driver/instance_id/instance_id_profile_service.h index 2f6a84e..2a303fca 100644 --- a/components/gcm_driver/instance_id/instance_id_profile_service.h +++ b/components/gcm_driver/instance_id/instance_id_profile_service.h
@@ -23,14 +23,15 @@ public: InstanceIDProfileService(gcm::GCMDriver* driver, bool is_off_the_record); + InstanceIDProfileService(const InstanceIDProfileService&) = delete; + InstanceIDProfileService& operator=(const InstanceIDProfileService&) = delete; + ~InstanceIDProfileService() override; InstanceIDDriver* driver() const { return driver_.get(); } private: std::unique_ptr<InstanceIDDriver> driver_; - - DISALLOW_COPY_AND_ASSIGN(InstanceIDProfileService); }; } // namespace instance_id
diff --git a/components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.h b/components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.h index 6fbe9dc..c652eef 100644 --- a/components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.h +++ b/components/gcm_driver/instance_id/scoped_use_fake_instance_id_android.h
@@ -16,12 +16,16 @@ class ScopedUseFakeInstanceIDAndroid { public: ScopedUseFakeInstanceIDAndroid(); + + ScopedUseFakeInstanceIDAndroid(const ScopedUseFakeInstanceIDAndroid&) = + delete; + ScopedUseFakeInstanceIDAndroid& operator=( + const ScopedUseFakeInstanceIDAndroid&) = delete; + ~ScopedUseFakeInstanceIDAndroid(); private: bool previous_value_; - - DISALLOW_COPY_AND_ASSIGN(ScopedUseFakeInstanceIDAndroid); }; } // namespace instance_id
diff --git a/components/grpc_support/bidirectional_stream.h b/components/grpc_support/bidirectional_stream.h index b8767fb..17ef049 100644 --- a/components/grpc_support/bidirectional_stream.h +++ b/components/grpc_support/bidirectional_stream.h
@@ -60,6 +60,10 @@ BidirectionalStream(net::URLRequestContextGetter* request_context_getter, Delegate* delegate); + + BidirectionalStream(const BidirectionalStream&) = delete; + BidirectionalStream& operator=(const BidirectionalStream&) = delete; + ~BidirectionalStream() override; // Disables automatic flushing of each buffer passed to WriteData(). @@ -141,6 +145,10 @@ class WriteBuffers { public: WriteBuffers(); + + WriteBuffers(const WriteBuffers&) = delete; + WriteBuffers& operator=(const WriteBuffers&) = delete; + ~WriteBuffers(); // Clears Write Buffers list. @@ -167,8 +175,6 @@ std::vector<scoped_refptr<net::IOBuffer>> write_buffer_list; // A list of the length of each IOBuffer in |write_buffer_list|. std::vector<int> write_buffer_len_list; - - DISALLOW_COPY_AND_ASSIGN(WriteBuffers); }; // net::BidirectionalStream::Delegate implementations: @@ -234,8 +240,6 @@ base::WeakPtr<BidirectionalStream> weak_this_; base::WeakPtrFactory<BidirectionalStream> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BidirectionalStream); }; } // namespace grpc_support
diff --git a/components/grpc_support/bidirectional_stream_c.cc b/components/grpc_support/bidirectional_stream_c.cc index bdb8dc9..3ee0786 100644 --- a/components/grpc_support/bidirectional_stream_c.cc +++ b/components/grpc_support/bidirectional_stream_c.cc
@@ -39,11 +39,14 @@ class HeadersArray : public bidirectional_stream_header_array { public: explicit HeadersArray(const spdy::Http2HeaderBlock& header_block); + + HeadersArray(const HeadersArray&) = delete; + HeadersArray& operator=(const HeadersArray&) = delete; + ~HeadersArray(); private: base::StringPairs headers_strings_; - DISALLOW_COPY_AND_ASSIGN(HeadersArray); }; HeadersArray::HeadersArray(const spdy::Http2HeaderBlock& header_block)
diff --git a/components/grpc_support/bidirectional_stream_unittest.cc b/components/grpc_support/bidirectional_stream_unittest.cc index e93b18ab..1776b2e 100644 --- a/components/grpc_support/bidirectional_stream_unittest.cc +++ b/components/grpc_support/bidirectional_stream_unittest.cc
@@ -95,9 +95,11 @@ bool flush; WriteData(const std::string& buffer, bool flush); - ~WriteData(); - DISALLOW_COPY_AND_ASSIGN(WriteData); + WriteData(const WriteData&) = delete; + WriteData& operator=(const WriteData&) = delete; + + ~WriteData(); }; bidirectional_stream* stream;
diff --git a/components/guest_os/guest_os_engagement_metrics.h b/components/guest_os/guest_os_engagement_metrics.h index fd06e8c9..c33c666 100644 --- a/components/guest_os/guest_os_engagement_metrics.h +++ b/components/guest_os/guest_os_engagement_metrics.h
@@ -49,6 +49,10 @@ WindowMatcher window_matcher, const std::string& pref_prefix, const std::string& uma_name); + + GuestOsEngagementMetrics(const GuestOsEngagementMetrics&) = delete; + GuestOsEngagementMetrics& operator=(const GuestOsEngagementMetrics&) = delete; + ~GuestOsEngagementMetrics() override; // Instead of using |window_matcher_|, we let consumers define when the Guest @@ -136,8 +140,6 @@ base::TimeDelta engagement_time_total_; base::TimeDelta engagement_time_foreground_; base::TimeDelta engagement_time_background_; - - DISALLOW_COPY_AND_ASSIGN(GuestOsEngagementMetrics); }; } // namespace guest_os
diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc index 90e4e95..4bd38d2 100644 --- a/components/guest_view/browser/guest_view_base.cc +++ b/components/guest_view/browser/guest_view_base.cc
@@ -62,6 +62,9 @@ destroyed_(false), guest_(guest) {} + OwnerContentsObserver(const OwnerContentsObserver&) = delete; + OwnerContentsObserver& operator=(const OwnerContentsObserver&) = delete; + ~OwnerContentsObserver() override = default; // WebContentsObserver implementation. @@ -140,8 +143,6 @@ bool also_delete = !guest_->web_contents()->GetOuterWebContents(); guest_->Destroy(also_delete); } - - DISALLOW_COPY_AND_ASSIGN(OwnerContentsObserver); }; // This observer ensures that the GuestViewBase destroys itself if its opener @@ -152,6 +153,9 @@ : WebContentsObserver(guest->GetOpener()->web_contents()), guest_(guest) {} + OpenerLifetimeObserver(const OpenerLifetimeObserver&) = delete; + OpenerLifetimeObserver& operator=(const OpenerLifetimeObserver&) = delete; + ~OpenerLifetimeObserver() override = default; // WebContentsObserver implementation. @@ -165,8 +169,6 @@ private: GuestViewBase* guest_; - - DISALLOW_COPY_AND_ASSIGN(OpenerLifetimeObserver); }; GuestViewBase::GuestViewBase(WebContents* owner_web_contents)
diff --git a/components/guest_view/browser/guest_view_event.h b/components/guest_view/browser/guest_view_event.h index 07789a3..119deb0 100644 --- a/components/guest_view/browser/guest_view_event.h +++ b/components/guest_view/browser/guest_view_event.h
@@ -23,6 +23,10 @@ public: GuestViewEvent(const std::string& name, std::unique_ptr<base::DictionaryValue> args); + + GuestViewEvent(const GuestViewEvent&) = delete; + GuestViewEvent& operator=(const GuestViewEvent&) = delete; + ~GuestViewEvent(); // This method will dispatch the event to the specified |guest|'s embedder and @@ -32,8 +36,6 @@ private: const std::string name_; std::unique_ptr<base::DictionaryValue> args_; - - DISALLOW_COPY_AND_ASSIGN(GuestViewEvent); }; } // namespace guest_view
diff --git a/components/guest_view/browser/guest_view_manager.h b/components/guest_view/browser/guest_view_manager.h index 1947870..f78d158 100644 --- a/components/guest_view/browser/guest_view_manager.h +++ b/components/guest_view/browser/guest_view_manager.h
@@ -38,6 +38,10 @@ public: GuestViewManager(content::BrowserContext* context, std::unique_ptr<GuestViewManagerDelegate> delegate); + + GuestViewManager(const GuestViewManager&) = delete; + GuestViewManager& operator=(const GuestViewManager&) = delete; + ~GuestViewManager() override; // Returns the GuestViewManager associated with |context|. If one isn't @@ -270,9 +274,6 @@ // This is used to ensure that an EmbedderRenderProcessHostObserver will not // call into this GuestViewManager after it has been destroyed. base::WeakPtrFactory<GuestViewManager> weak_ptr_factory_{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(GuestViewManager); }; } // namespace guest_view
diff --git a/components/guest_view/browser/guest_view_manager_unittest.cc b/components/guest_view/browser/guest_view_manager_unittest.cc index 45ebeda..e9f5bf2b 100644 --- a/components/guest_view/browser/guest_view_manager_unittest.cc +++ b/components/guest_view/browser/guest_view_manager_unittest.cc
@@ -24,14 +24,15 @@ class GuestViewManagerTest : public content::RenderViewHostTestHarness { public: GuestViewManagerTest() {} + + GuestViewManagerTest(const GuestViewManagerTest&) = delete; + GuestViewManagerTest& operator=(const GuestViewManagerTest&) = delete; + ~GuestViewManagerTest() override {} std::unique_ptr<WebContents> CreateWebContents() { return WebContentsTester::CreateTestWebContents(browser_context(), nullptr); } - - private: - DISALLOW_COPY_AND_ASSIGN(GuestViewManagerTest); }; } // namespace
diff --git a/components/guest_view/browser/test_guest_view_manager.h b/components/guest_view/browser/test_guest_view_manager.h index 53f73b6..d41830f 100644 --- a/components/guest_view/browser/test_guest_view_manager.h +++ b/components/guest_view/browser/test_guest_view_manager.h
@@ -22,6 +22,10 @@ public: TestGuestViewManager(content::BrowserContext* context, std::unique_ptr<GuestViewManagerDelegate> delegate); + + TestGuestViewManager(const TestGuestViewManager&) = delete; + TestGuestViewManager& operator=(const TestGuestViewManager&) = delete; + ~TestGuestViewManager() override; void WaitForAllGuestsDeleted(); @@ -110,14 +114,17 @@ GuestViewBase* waiting_for_attach_; scoped_refptr<content::MessageLoopRunner> attached_message_loop_runner_; scoped_refptr<content::MessageLoopRunner> gc_message_loop_runner_; - - DISALLOW_COPY_AND_ASSIGN(TestGuestViewManager); }; // Test factory for creating test instances of GuestViewManager. class TestGuestViewManagerFactory : public GuestViewManagerFactory { public: TestGuestViewManagerFactory(); + + TestGuestViewManagerFactory(const TestGuestViewManagerFactory&) = delete; + TestGuestViewManagerFactory& operator=(const TestGuestViewManagerFactory&) = + delete; + ~TestGuestViewManagerFactory() override; GuestViewManager* CreateGuestViewManager( @@ -126,8 +133,6 @@ private: TestGuestViewManager* test_guest_view_manager_; - - DISALLOW_COPY_AND_ASSIGN(TestGuestViewManagerFactory); }; } // namespace guest_view
diff --git a/components/guest_view/renderer/guest_view_container_dispatcher.h b/components/guest_view/renderer/guest_view_container_dispatcher.h index f3ed251..8ca020cc 100644 --- a/components/guest_view/renderer/guest_view_container_dispatcher.h +++ b/components/guest_view/renderer/guest_view_container_dispatcher.h
@@ -15,6 +15,11 @@ class GuestViewContainerDispatcher : public content::RenderThreadObserver { public: GuestViewContainerDispatcher(); + + GuestViewContainerDispatcher(const GuestViewContainerDispatcher&) = delete; + GuestViewContainerDispatcher& operator=(const GuestViewContainerDispatcher&) = + delete; + ~GuestViewContainerDispatcher() override; protected: @@ -23,9 +28,6 @@ // content::RenderThreadObserver implementation. bool OnControlMessageReceived(const IPC::Message& message) override; - - private: - DISALLOW_COPY_AND_ASSIGN(GuestViewContainerDispatcher); }; } // namespace guest_view
diff --git a/components/guest_view/renderer/guest_view_request.h b/components/guest_view/renderer/guest_view_request.h index 4b151d3..cbdf59ce 100644 --- a/components/guest_view/renderer/guest_view_request.h +++ b/components/guest_view/renderer/guest_view_request.h
@@ -27,6 +27,10 @@ GuestViewRequest(GuestViewContainer* container, v8::Local<v8::Function> callback, v8::Isolate* isolate); + + GuestViewRequest(const GuestViewRequest&) = delete; + GuestViewRequest& operator=(const GuestViewRequest&) = delete; + virtual ~GuestViewRequest(); // Performs the associated request. @@ -51,8 +55,6 @@ GuestViewContainer* const container_; v8::Global<v8::Function> callback_; v8::Isolate* const isolate_; - - DISALLOW_COPY_AND_ASSIGN(GuestViewRequest); }; } // namespace guest_view
diff --git a/components/guest_view/renderer/iframe_guest_view_container.h b/components/guest_view/renderer/iframe_guest_view_container.h index 8522015..caf8b08d 100644 --- a/components/guest_view/renderer/iframe_guest_view_container.h +++ b/components/guest_view/renderer/iframe_guest_view_container.h
@@ -17,13 +17,14 @@ class IframeGuestViewContainer : public GuestViewContainer { public: explicit IframeGuestViewContainer(content::RenderFrame* render_frame); + + IframeGuestViewContainer(const IframeGuestViewContainer&) = delete; + IframeGuestViewContainer& operator=(const IframeGuestViewContainer&) = delete; + ~IframeGuestViewContainer() override; // GuestViewContainer overrides. bool OnMessage(const IPC::Message& message) override; - - private: - DISALLOW_COPY_AND_ASSIGN(IframeGuestViewContainer); }; } // namespace guest_view
diff --git a/components/guest_view/renderer/iframe_guest_view_request.h b/components/guest_view/renderer/iframe_guest_view_request.h index 1700d28..794cc4d 100644 --- a/components/guest_view/renderer/iframe_guest_view_request.h +++ b/components/guest_view/renderer/iframe_guest_view_request.h
@@ -27,6 +27,11 @@ std::unique_ptr<base::DictionaryValue> params, v8::Local<v8::Function> callback, v8::Isolate* isolate); + + GuestViewAttachIframeRequest(const GuestViewAttachIframeRequest&) = delete; + GuestViewAttachIframeRequest& operator=(const GuestViewAttachIframeRequest&) = + delete; + ~GuestViewAttachIframeRequest() override; void PerformRequest() override; @@ -36,8 +41,6 @@ const int render_frame_routing_id_; const int guest_instance_id_; std::unique_ptr<base::DictionaryValue> params_; - - DISALLOW_COPY_AND_ASSIGN(GuestViewAttachIframeRequest); }; } // namespace guest_view
diff --git a/components/heap_profiling/in_process/heap_profiler_controller.h b/components/heap_profiling/in_process/heap_profiler_controller.h index 139f54e4..ed56f99 100644 --- a/components/heap_profiling/in_process/heap_profiler_controller.h +++ b/components/heap_profiling/in_process/heap_profiler_controller.h
@@ -18,6 +18,10 @@ class HeapProfilerController { public: HeapProfilerController(); + + HeapProfilerController(const HeapProfilerController&) = delete; + HeapProfilerController& operator=(const HeapProfilerController&) = delete; + ~HeapProfilerController(); // Starts periodic heap snapshot collection. @@ -56,8 +60,6 @@ static void RetrieveAndSendSnapshot(); scoped_refptr<StoppedFlag> stopped_; - - DISALLOW_COPY_AND_ASSIGN(HeapProfilerController); }; #endif // COMPONENTS_HEAP_PROFILING_IN_PROCESS_HEAP_PROFILER_CONTROLLER_H_
diff --git a/components/heap_profiling/multi_process/client_connection_manager.h b/components/heap_profiling/multi_process/client_connection_manager.h index 3b8a0eb..ddc7878 100644 --- a/components/heap_profiling/multi_process/client_connection_manager.h +++ b/components/heap_profiling/multi_process/client_connection_manager.h
@@ -49,6 +49,10 @@ // class. // |controller| must be bound to the IO thread. ClientConnectionManager(base::WeakPtr<Controller> controller, Mode mode); + + ClientConnectionManager(const ClientConnectionManager&) = delete; + ClientConnectionManager& operator=(const ClientConnectionManager&) = delete; + ~ClientConnectionManager() override; // Start must be called immediately after the constructor. The only reason @@ -116,8 +120,6 @@ // profiled. That information is only known by the profiling service, and for // simplicity, it's easier to just track this variable in this process. std::unordered_set<void*> profiled_renderers_; - - DISALLOW_COPY_AND_ASSIGN(ClientConnectionManager); }; } // namespace heap_profiling
diff --git a/components/heap_profiling/multi_process/test_driver.h b/components/heap_profiling/multi_process/test_driver.h index 95a798a..691efedc 100644 --- a/components/heap_profiling/multi_process/test_driver.h +++ b/components/heap_profiling/multi_process/test_driver.h
@@ -56,6 +56,10 @@ }; TestDriver(); + + TestDriver(const TestDriver&) = delete; + TestDriver& operator=(const TestDriver&) = delete; + ~TestDriver(); // If this is called on the content::BrowserThread::UI thread, then the @@ -147,8 +151,6 @@ bool wait_for_profiling_to_start_ = false; base::WaitableEvent wait_for_ui_thread_; - - DISALLOW_COPY_AND_ASSIGN(TestDriver); }; } // namespace heap_profiling
diff --git a/components/heavy_ad_intervention/heavy_ad_blocklist.h b/components/heavy_ad_intervention/heavy_ad_blocklist.h index 68c1908..9c90563 100644 --- a/components/heavy_ad_intervention/heavy_ad_blocklist.h +++ b/components/heavy_ad_intervention/heavy_ad_blocklist.h
@@ -36,6 +36,10 @@ HeavyAdBlocklist(std::unique_ptr<blocklist::OptOutStore> opt_out_store, base::Clock* clock, blocklist::OptOutBlocklistDelegate* blocklist_delegate); + + HeavyAdBlocklist(const HeavyAdBlocklist&) = delete; + HeavyAdBlocklist& operator=(const HeavyAdBlocklist&) = delete; + ~HeavyAdBlocklist() override; protected: @@ -55,9 +59,6 @@ int* threshold) const override; blocklist::BlocklistData::AllowedTypesAndVersions GetAllowedTypes() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(HeavyAdBlocklist); }; } // namespace heavy_ad_intervention
diff --git a/components/heavy_ad_intervention/heavy_ad_blocklist_unittest.cc b/components/heavy_ad_intervention/heavy_ad_blocklist_unittest.cc index 2e8bdba..ae93f41 100644 --- a/components/heavy_ad_intervention/heavy_ad_blocklist_unittest.cc +++ b/components/heavy_ad_intervention/heavy_ad_blocklist_unittest.cc
@@ -46,6 +46,10 @@ class HeavyAdBlocklistTest : public testing::Test { public: HeavyAdBlocklistTest() = default; + + HeavyAdBlocklistTest(const HeavyAdBlocklistTest&) = delete; + HeavyAdBlocklistTest& operator=(const HeavyAdBlocklistTest&) = delete; + ~HeavyAdBlocklistTest() override = default; void SetUp() override { ConfigBlocklistWithParams({}); } @@ -75,8 +79,6 @@ EmptyOptOutBlocklistDelegate blocklist_delegate_; base::test::ScopedFeatureList scoped_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(HeavyAdBlocklistTest); }; TEST_F(HeavyAdBlocklistTest, DefaultParams) {
diff --git a/components/heavy_ad_intervention/heavy_ad_service.h b/components/heavy_ad_intervention/heavy_ad_service.h index 7a795d1..fdedbba 100644 --- a/components/heavy_ad_intervention/heavy_ad_service.h +++ b/components/heavy_ad_intervention/heavy_ad_service.h
@@ -25,6 +25,10 @@ public blocklist::OptOutBlocklistDelegate { public: HeavyAdService(); + + HeavyAdService(const HeavyAdService&) = delete; + HeavyAdService& operator=(const HeavyAdService&) = delete; + ~HeavyAdService() override; // Initializes the UI Service. |profile_path| is the path to user data on @@ -58,8 +62,6 @@ base::OnceClosure on_blocklist_loaded_callback_; base::OnceClosure on_blocklist_cleared_callback_; bool blocklist_is_loaded_ = false; - - DISALLOW_COPY_AND_ASSIGN(HeavyAdService); }; } // namespace heavy_ad_intervention
diff --git a/components/history/OWNERS b/components/history/OWNERS index 90b3e80..d6464d3 100644 --- a/components/history/OWNERS +++ b/components/history/OWNERS
@@ -1 +1,4 @@ +manukh@chromium.org sky@chromium.org +sophiechang@chromium.org +tommycli@chromium.org
diff --git a/components/history/content/browser/content_visit_delegate.cc b/components/history/content/browser/content_visit_delegate.cc index becf500d..dc68aa02 100644 --- a/components/history/content/browser/content_visit_delegate.cc +++ b/components/history/content/browser/content_visit_delegate.cc
@@ -42,6 +42,10 @@ public: explicit IterateUrlsDBTask(const scoped_refptr< visitedlink::VisitedLinkDelegate::URLEnumerator>& enumerator); + + IterateUrlsDBTask(const IterateUrlsDBTask&) = delete; + IterateUrlsDBTask& operator=(const IterateUrlsDBTask&) = delete; + ~IterateUrlsDBTask() override; private: @@ -50,8 +54,6 @@ void DoneRunOnMainThread() override; scoped_refptr<visitedlink::VisitedLinkDelegate::URLEnumerator> enumerator_; - - DISALLOW_COPY_AND_ASSIGN(IterateUrlsDBTask); }; IterateUrlsDBTask::IterateUrlsDBTask(const scoped_refptr<
diff --git a/components/history/content/browser/content_visit_delegate.h b/components/history/content/browser/content_visit_delegate.h index 73536a8..4c2dce9 100644 --- a/components/history/content/browser/content_visit_delegate.h +++ b/components/history/content/browser/content_visit_delegate.h
@@ -29,6 +29,10 @@ public visitedlink::VisitedLinkDelegate { public: explicit ContentVisitDelegate(content::BrowserContext* browser_context); + + ContentVisitDelegate(const ContentVisitDelegate&) = delete; + ContentVisitDelegate& operator=(const ContentVisitDelegate&) = delete; + ~ContentVisitDelegate() override; private: @@ -46,8 +50,6 @@ HistoryService* history_service_; // Weak. std::unique_ptr<visitedlink::VisitedLinkWriter> visitedlink_writer_; base::CancelableTaskTracker task_tracker_; - - DISALLOW_COPY_AND_ASSIGN(ContentVisitDelegate); }; } // namespace history
diff --git a/components/history/content/browser/web_contents_top_sites_observer.h b/components/history/content/browser/web_contents_top_sites_observer.h index 9532912..932fc03 100644 --- a/components/history/content/browser/web_contents_top_sites_observer.h +++ b/components/history/content/browser/web_contents_top_sites_observer.h
@@ -19,6 +19,10 @@ : public content::WebContentsObserver, public content::WebContentsUserData<WebContentsTopSitesObserver> { public: + WebContentsTopSitesObserver(const WebContentsTopSitesObserver&) = delete; + WebContentsTopSitesObserver& operator=(const WebContentsTopSitesObserver&) = + delete; + ~WebContentsTopSitesObserver() override; private: @@ -35,8 +39,6 @@ TopSites* top_sites_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(WebContentsTopSitesObserver); }; } // namespace history
diff --git a/components/history/core/browser/android/android_cache_database.h b/components/history/core/browser/android/android_cache_database.h index c2c087c8..b4de8b6 100644 --- a/components/history/core/browser/android/android_cache_database.h +++ b/components/history/core/browser/android/android_cache_database.h
@@ -21,6 +21,10 @@ class AndroidCacheDatabase { public: AndroidCacheDatabase(); + + AndroidCacheDatabase(const AndroidCacheDatabase&) = delete; + AndroidCacheDatabase& operator=(const AndroidCacheDatabase&) = delete; + virtual ~AndroidCacheDatabase(); // Creates the database, deletes existing one if any; also attach it to the @@ -112,8 +116,6 @@ bool DoAttach(); base::FilePath db_name_; - - DISALLOW_COPY_AND_ASSIGN(AndroidCacheDatabase); }; } // namespace history
diff --git a/components/history/core/browser/android/android_history_types.h b/components/history/core/browser/android/android_history_types.h index ab37d9ef..8724e23 100644 --- a/components/history/core/browser/android/android_history_types.h +++ b/components/history/core/browser/android/android_history_types.h
@@ -269,6 +269,10 @@ class AndroidStatement { public: AndroidStatement(sql::Statement* statement, int favicon_index); + + AndroidStatement(const AndroidStatement&) = delete; + AndroidStatement& operator=(const AndroidStatement&) = delete; + ~AndroidStatement(); sql::Statement* statement() { return statement_.get(); } @@ -280,8 +284,6 @@ private: std::unique_ptr<sql::Statement> statement_; int favicon_index_; - - DISALLOW_COPY_AND_ASSIGN(AndroidStatement); }; } // namespace history
diff --git a/components/history/core/browser/android/android_urls_database.h b/components/history/core/browser/android/android_urls_database.h index 9b465e5..dac6c6e 100644 --- a/components/history/core/browser/android/android_urls_database.h +++ b/components/history/core/browser/android/android_urls_database.h
@@ -28,6 +28,10 @@ class AndroidURLsDatabase { public: AndroidURLsDatabase(); + + AndroidURLsDatabase(const AndroidURLsDatabase&) = delete; + AndroidURLsDatabase& operator=(const AndroidURLsDatabase&) = delete; + virtual ~AndroidURLsDatabase(); // Creates the android_urls table if it doesn't exist. Returns true if the @@ -68,9 +72,6 @@ // Returns the database for the functions in this interface. The decendent of // this class implements these functions to return its objects. virtual sql::Database& GetDB() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AndroidURLsDatabase); }; } // namespace history
diff --git a/components/history/core/browser/android/android_urls_sql_handler.h b/components/history/core/browser/android/android_urls_sql_handler.h index 00700b9..fe0af79a1 100644 --- a/components/history/core/browser/android/android_urls_sql_handler.h +++ b/components/history/core/browser/android/android_urls_sql_handler.h
@@ -16,6 +16,10 @@ class AndroidURLsSQLHandler : public SQLHandler { public: explicit AndroidURLsSQLHandler(AndroidURLsDatabase* android_urls_db); + + AndroidURLsSQLHandler(const AndroidURLsSQLHandler&) = delete; + AndroidURLsSQLHandler& operator=(const AndroidURLsSQLHandler&) = delete; + ~AndroidURLsSQLHandler() override; bool Update(const HistoryAndBookmarkRow& row, @@ -27,8 +31,6 @@ private: AndroidURLsDatabase* android_urls_db_; - - DISALLOW_COPY_AND_ASSIGN(AndroidURLsSQLHandler); }; } // namespace history.
diff --git a/components/history/core/browser/android/favicon_sql_handler.h b/components/history/core/browser/android/favicon_sql_handler.h index d18aea16..d7058d912 100644 --- a/components/history/core/browser/android/favicon_sql_handler.h +++ b/components/history/core/browser/android/favicon_sql_handler.h
@@ -18,6 +18,10 @@ class FaviconSQLHandler : public SQLHandler { public: explicit FaviconSQLHandler(favicon::FaviconDatabase* favicon_db); + + FaviconSQLHandler(const FaviconSQLHandler&) = delete; + FaviconSQLHandler& operator=(const FaviconSQLHandler&) = delete; + ~FaviconSQLHandler() override; // SQLHandler overrides: @@ -32,8 +36,6 @@ bool DeleteUnusedFavicon(const std::vector<favicon_base::FaviconID>& ids); favicon::FaviconDatabase* favicon_db_; - - DISALLOW_COPY_AND_ASSIGN(FaviconSQLHandler); }; } // namespace history.
diff --git a/components/history/core/browser/android/sql_handler.h b/components/history/core/browser/android/sql_handler.h index a257abb..125a26611 100644 --- a/components/history/core/browser/android/sql_handler.h +++ b/components/history/core/browser/android/sql_handler.h
@@ -41,6 +41,10 @@ // `columns` is the implementation's columns. // `column_count` is the number of column in `columns`. SQLHandler(const HistoryAndBookmarkRow::ColumnID columns[], int column_count); + + SQLHandler(const SQLHandler&) = delete; + SQLHandler& operator=(const SQLHandler&) = delete; + virtual ~SQLHandler(); // Updates the rows whose URLID or URL is in the given `ids_set` with new @@ -67,8 +71,6 @@ private: // The columns of this handler. const std::set<HistoryAndBookmarkRow::ColumnID> columns_; - - DISALLOW_COPY_AND_ASSIGN(SQLHandler); }; } // namespace history.
diff --git a/components/history/core/browser/android/urls_sql_handler.h b/components/history/core/browser/android/urls_sql_handler.h index 73a1a5d6..d9b4ad8 100644 --- a/components/history/core/browser/android/urls_sql_handler.h +++ b/components/history/core/browser/android/urls_sql_handler.h
@@ -16,6 +16,10 @@ class UrlsSQLHandler : public SQLHandler { public: explicit UrlsSQLHandler(URLDatabase* url_db); + + UrlsSQLHandler(const UrlsSQLHandler&) = delete; + UrlsSQLHandler& operator=(const UrlsSQLHandler&) = delete; + ~UrlsSQLHandler() override; // Overriden from SQLHandler. @@ -26,8 +30,6 @@ private: URLDatabase* url_db_; - - DISALLOW_COPY_AND_ASSIGN(UrlsSQLHandler); }; } // namespace history.
diff --git a/components/history/core/browser/android/visit_sql_handler.h b/components/history/core/browser/android/visit_sql_handler.h index c23335d..f28ee1d 100644 --- a/components/history/core/browser/android/visit_sql_handler.h +++ b/components/history/core/browser/android/visit_sql_handler.h
@@ -21,6 +21,10 @@ class VisitSQLHandler : public SQLHandler { public: VisitSQLHandler(URLDatabase* url_db, VisitDatabase* visit_db); + + VisitSQLHandler(const VisitSQLHandler&) = delete; + VisitSQLHandler& operator=(const VisitSQLHandler&) = delete; + ~VisitSQLHandler() override; // Overriden from SQLHandler. @@ -44,8 +48,6 @@ URLDatabase* url_db_; VisitDatabase* visit_db_; - - DISALLOW_COPY_AND_ASSIGN(VisitSQLHandler); }; } // namespace history.
diff --git a/components/history/core/browser/browsing_history_service.h b/components/history/core/browser/browsing_history_service.h index dc42428..f17257d 100644 --- a/components/history/core/browser/browsing_history_service.h +++ b/components/history/core/browser/browsing_history_service.h
@@ -138,6 +138,10 @@ BrowsingHistoryService(BrowsingHistoryDriver* driver, HistoryService* local_history, syncer::SyncService* sync_service); + + BrowsingHistoryService(const BrowsingHistoryService&) = delete; + BrowsingHistoryService& operator=(const BrowsingHistoryService&) = delete; + ~BrowsingHistoryService() override; // Start a new query with the given parameters. @@ -284,8 +288,6 @@ std::unique_ptr<base::Clock> clock_; base::WeakPtrFactory<BrowsingHistoryService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryService); }; } // namespace history
diff --git a/components/history/core/browser/download_database.h b/components/history/core/browser/download_database.h index 4039df1..34751ef 100644 --- a/components/history/core/browser/download_database.h +++ b/components/history/core/browser/download_database.h
@@ -32,6 +32,10 @@ // Must call InitDownloadTable before using any other functions. DownloadDatabase(DownloadInterruptReason download_interrupt_reason_none, DownloadInterruptReason download_interrupt_reason_crash); + + DownloadDatabase(const DownloadDatabase&) = delete; + DownloadDatabase& operator=(const DownloadDatabase&) = delete; + virtual ~DownloadDatabase(); uint32_t GetNextDownloadId(); @@ -167,8 +171,6 @@ // to use for respectively an undefined value and in case of a crash. DownloadInterruptReason download_interrupt_reason_none_; DownloadInterruptReason download_interrupt_reason_crash_; - - DISALLOW_COPY_AND_ASSIGN(DownloadDatabase); }; } // namespace history
diff --git a/components/history/core/browser/expire_history_backend.h b/components/history/core/browser/expire_history_backend.h index 889c1a2..73102de 100644 --- a/components/history/core/browser/expire_history_backend.h +++ b/components/history/core/browser/expire_history_backend.h
@@ -65,6 +65,10 @@ ExpireHistoryBackend(HistoryBackendNotifier* notifier, HistoryBackendClient* backend_client, scoped_refptr<base::SequencedTaskRunner> task_runner); + + ExpireHistoryBackend(const ExpireHistoryBackend&) = delete; + ExpireHistoryBackend& operator=(const ExpireHistoryBackend&) = delete; + ~ExpireHistoryBackend(); // Completes initialization by setting the databases that this class will use. @@ -303,8 +307,6 @@ // Used to generate runnable methods to do timers on this class. They will be // automatically canceled when this class is deleted. base::WeakPtrFactory<ExpireHistoryBackend> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ExpireHistoryBackend); }; } // namespace history
diff --git a/components/history/core/browser/history_backend.h b/components/history/core/browser/history_backend.h index fb3f8f9..b9627b7 100644 --- a/components/history/core/browser/history_backend.h +++ b/components/history/core/browser/history_backend.h
@@ -87,6 +87,10 @@ std::unique_ptr<HistoryDBTask> task, scoped_refptr<base::SingleThreadTaskRunner> origin_loop, const base::CancelableTaskTracker::IsCanceledCallback& is_canceled); + + QueuedHistoryDBTask(const QueuedHistoryDBTask&) = delete; + QueuedHistoryDBTask& operator=(const QueuedHistoryDBTask&) = delete; + ~QueuedHistoryDBTask(); bool is_canceled(); @@ -97,8 +101,6 @@ std::unique_ptr<HistoryDBTask> task_; scoped_refptr<base::SingleThreadTaskRunner> origin_loop_; base::CancelableTaskTracker::IsCanceledCallback is_canceled_; - - DISALLOW_COPY_AND_ASSIGN(QueuedHistoryDBTask); }; // *See the .cc file for more information on the design.*
diff --git a/components/history/core/browser/history_backend_client.h b/components/history/core/browser/history_backend_client.h index 75391575..d1088cf 100644 --- a/components/history/core/browser/history_backend_client.h +++ b/components/history/core/browser/history_backend_client.h
@@ -21,6 +21,10 @@ class HistoryBackendClient { public: HistoryBackendClient() {} + + HistoryBackendClient(const HistoryBackendClient&) = delete; + HistoryBackendClient& operator=(const HistoryBackendClient&) = delete; + virtual ~HistoryBackendClient() {} // Returns true if the specified URL is pinned due to being bookmarked or used @@ -33,9 +37,6 @@ // Returns whether `url` should be considered web-safe (see // content::ChildProcessSecurityPolicy). virtual bool IsWebSafe(const GURL& url) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HistoryBackendClient); }; } // namespace history
diff --git a/components/history/core/browser/history_backend_observer.h b/components/history/core/browser/history_backend_observer.h index ead1241..a98add6b 100644 --- a/components/history/core/browser/history_backend_observer.h +++ b/components/history/core/browser/history_backend_observer.h
@@ -15,6 +15,10 @@ class HistoryBackendObserver { public: HistoryBackendObserver() {} + + HistoryBackendObserver(const HistoryBackendObserver&) = delete; + HistoryBackendObserver& operator=(const HistoryBackendObserver&) = delete; + virtual ~HistoryBackendObserver() {} // Called when user visits an URL. @@ -54,9 +58,6 @@ bool expired, const URLRows& deleted_rows, const std::set<GURL>& favicon_urls) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HistoryBackendObserver); }; } // namespace history
diff --git a/components/history/core/browser/history_client.h b/components/history/core/browser/history_client.h index 4a5b533..f0e300d1 100644 --- a/components/history/core/browser/history_client.h +++ b/components/history/core/browser/history_client.h
@@ -22,6 +22,10 @@ class HistoryClient { public: HistoryClient() {} + + HistoryClient(const HistoryClient&) = delete; + HistoryClient& operator=(const HistoryClient&) = delete; + virtual ~HistoryClient() {} // Called upon HistoryService creation. @@ -40,9 +44,6 @@ // Returns a new HistoryBackendClient instance. virtual std::unique_ptr<HistoryBackendClient> CreateBackendClient() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HistoryClient); }; } // namespace history
diff --git a/components/history/core/browser/history_service.h b/components/history/core/browser/history_service.h index c15e82d..292742c 100644 --- a/components/history/core/browser/history_service.h +++ b/components/history/core/browser/history_service.h
@@ -93,6 +93,10 @@ HistoryService(); HistoryService(std::unique_ptr<HistoryClient> history_client, std::unique_ptr<VisitDelegate> visit_delegate); + + HistoryService(const HistoryService&) = delete; + HistoryService& operator=(const HistoryService&) = delete; + ~HistoryService() override; // Initializes the history service, returning true on success. On false, do @@ -982,8 +986,6 @@ // All vended weak pointers are invalidated in Cleanup(). base::WeakPtrFactory<HistoryService> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HistoryService); }; } // namespace history
diff --git a/components/history/core/browser/history_service_observer.h b/components/history/core/browser/history_service_observer.h index bbd397d..968a390 100644 --- a/components/history/core/browser/history_service_observer.h +++ b/components/history/core/browser/history_service_observer.h
@@ -16,6 +16,10 @@ class HistoryServiceObserver { public: HistoryServiceObserver() {} + + HistoryServiceObserver(const HistoryServiceObserver&) = delete; + HistoryServiceObserver& operator=(const HistoryServiceObserver&) = delete; + virtual ~HistoryServiceObserver() {} // Called when user visits an URL. @@ -64,9 +68,6 @@ // `url_id` is the id of the url row. virtual void OnKeywordSearchTermDeleted(HistoryService* history_service, URLID url_id) {} - - private: - DISALLOW_COPY_AND_ASSIGN(HistoryServiceObserver); }; } // namespace history
diff --git a/components/history/core/browser/history_types.h b/components/history/core/browser/history_types.h index 5f6c262..6bf19b81 100644 --- a/components/history/core/browser/history_types.h +++ b/components/history/core/browser/history_types.h
@@ -145,6 +145,10 @@ typedef std::vector<URLResult> URLResultVector; QueryResults(); + + QueryResults(const QueryResults&) = delete; + QueryResults& operator=(const QueryResults&) = delete; + ~QueryResults(); QueryResults(QueryResults&& other) noexcept; @@ -218,8 +222,6 @@ // Maps URLs to entries in results_. URLToResultIndices url_to_results_; - - DISALLOW_COPY_AND_ASSIGN(QueryResults); }; // QueryOptions ---------------------------------------------------------------- @@ -618,6 +620,9 @@ std::set<GURL> favicon_urls, absl::optional<std::set<GURL>> restrict_urls); + DeletionInfo(const DeletionInfo&) = delete; + DeletionInfo& operator=(const DeletionInfo&) = delete; + ~DeletionInfo(); // Move-only because of potentially large containers. DeletionInfo(DeletionInfo&& other) noexcept; @@ -668,8 +673,6 @@ std::set<GURL> favicon_urls_; absl::optional<std::set<GURL>> restrict_urls_; OriginCountAndLastVisitMap deleted_urls_origin_map_; - - DISALLOW_COPY_AND_ASSIGN(DeletionInfo); }; // Represents a visit to a domain.
diff --git a/components/history/core/browser/in_memory_database.h b/components/history/core/browser/in_memory_database.h index 6a3a238..475e307 100644 --- a/components/history/core/browser/in_memory_database.h +++ b/components/history/core/browser/in_memory_database.h
@@ -21,6 +21,10 @@ class InMemoryDatabase : public URLDatabase { public: InMemoryDatabase(); + + InMemoryDatabase(const InMemoryDatabase&) = delete; + InMemoryDatabase& operator=(const InMemoryDatabase&) = delete; + ~InMemoryDatabase() override; // Creates an empty in-memory database. @@ -42,8 +46,6 @@ bool InitDB(); sql::Database db_; - - DISALLOW_COPY_AND_ASSIGN(InMemoryDatabase); }; } // namespace history
diff --git a/components/history/core/browser/in_memory_history_backend.h b/components/history/core/browser/in_memory_history_backend.h index c6ae62c..8d2b46849 100644 --- a/components/history/core/browser/in_memory_history_backend.h +++ b/components/history/core/browser/in_memory_history_backend.h
@@ -44,6 +44,10 @@ class InMemoryHistoryBackend : public HistoryServiceObserver { public: InMemoryHistoryBackend(); + + InMemoryHistoryBackend(const InMemoryHistoryBackend&) = delete; + InMemoryHistoryBackend& operator=(const InMemoryHistoryBackend&) = delete; + ~InMemoryHistoryBackend() override; // Initializes the backend from the history database pointed to by the @@ -93,8 +97,6 @@ base::ScopedObservation<HistoryService, HistoryServiceObserver> history_service_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(InMemoryHistoryBackend); }; } // namespace history
diff --git a/components/history/core/browser/sync/delete_directive_handler.h b/components/history/core/browser/sync/delete_directive_handler.h index 6316ba95..ea984ca 100644 --- a/components/history/core/browser/sync/delete_directive_handler.h +++ b/components/history/core/browser/sync/delete_directive_handler.h
@@ -41,6 +41,10 @@ base::CancelableTaskTracker* tracker)>; explicit DeleteDirectiveHandler(BackendTaskScheduler backend_task_scheduler); + + DeleteDirectiveHandler(const DeleteDirectiveHandler&) = delete; + DeleteDirectiveHandler& operator=(const DeleteDirectiveHandler&) = delete; + ~DeleteDirectiveHandler() override; // Notifies that HistoryBackend has been fully loaded and hence is ready to @@ -96,8 +100,6 @@ std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_; base::ThreadChecker thread_checker_; base::WeakPtrFactory<DeleteDirectiveHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeleteDirectiveHandler); }; } // namespace history
diff --git a/components/history/core/browser/sync/delete_directive_handler_unittest.cc b/components/history/core/browser/sync/delete_directive_handler_unittest.cc index d876fd1d..3b3c9d2 100644 --- a/components/history/core/browser/sync/delete_directive_handler_unittest.cc +++ b/components/history/core/browser/sync/delete_directive_handler_unittest.cc
@@ -118,6 +118,11 @@ return history_backend_->QueryURL(url, /*want_visits=*/true); } + HistoryDeleteDirectiveHandlerTest(const HistoryDeleteDirectiveHandlerTest&) = + delete; + HistoryDeleteDirectiveHandlerTest& operator=( + const HistoryDeleteDirectiveHandlerTest&) = delete; + ~HistoryDeleteDirectiveHandlerTest() override { history_backend_->Closing(); } scoped_refptr<HistoryBackend> history_backend() { return history_backend_; } @@ -134,8 +139,6 @@ base::ScopedTempDir test_dir_; scoped_refptr<HistoryBackend> history_backend_; std::unique_ptr<DeleteDirectiveHandler> delete_directive_handler_; - - DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectiveHandlerTest); }; // Tests calling WaitUntilReadyToSync() after the backend has already been
diff --git a/components/history/core/browser/sync/history_delete_directives_model_type_controller.h b/components/history/core/browser/sync/history_delete_directives_model_type_controller.h index fe78e6c..1d6c28c5 100644 --- a/components/history/core/browser/sync/history_delete_directives_model_type_controller.h +++ b/components/history/core/browser/sync/history_delete_directives_model_type_controller.h
@@ -32,6 +32,12 @@ syncer::SyncService* sync_service, syncer::ModelTypeStoreService* model_type_store_service, HistoryService* history_service); + + HistoryDeleteDirectivesModelTypeController( + const HistoryDeleteDirectivesModelTypeController&) = delete; + HistoryDeleteDirectivesModelTypeController& operator=( + const HistoryDeleteDirectivesModelTypeController&) = delete; + ~HistoryDeleteDirectivesModelTypeController() override; // DataTypeController overrides. @@ -46,8 +52,6 @@ private: syncer::SyncService* const sync_service_; - - DISALLOW_COPY_AND_ASSIGN(HistoryDeleteDirectivesModelTypeController); }; } // namespace history
diff --git a/components/history/core/browser/sync/typed_url_model_type_controller.h b/components/history/core/browser/sync/typed_url_model_type_controller.h index cd4c8fc3..f7596db 100644 --- a/components/history/core/browser/sync/typed_url_model_type_controller.h +++ b/components/history/core/browser/sync/typed_url_model_type_controller.h
@@ -18,6 +18,11 @@ public: TypedURLModelTypeController(HistoryService* history_service, PrefService* pref_service); + + TypedURLModelTypeController(const TypedURLModelTypeController&) = delete; + TypedURLModelTypeController& operator=(const TypedURLModelTypeController&) = + delete; + ~TypedURLModelTypeController() override; // syncer::DataTypeController implementation. @@ -30,8 +35,6 @@ PrefService* const pref_service_; PrefChangeRegistrar pref_registrar_; - - DISALLOW_COPY_AND_ASSIGN(TypedURLModelTypeController); }; } // namespace history
diff --git a/components/history/core/browser/sync/typed_url_sync_bridge.h b/components/history/core/browser/sync/typed_url_sync_bridge.h index 01e011f7..f36439e 100644 --- a/components/history/core/browser/sync/typed_url_sync_bridge.h +++ b/components/history/core/browser/sync/typed_url_sync_bridge.h
@@ -32,6 +32,10 @@ HistoryBackend* history_backend, TypedURLSyncMetadataDatabase* sync_metadata_store, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + TypedURLSyncBridge(const TypedURLSyncBridge&) = delete; + TypedURLSyncBridge& operator=(const TypedURLSyncBridge&) = delete; + ~TypedURLSyncBridge() override; // syncer::ModelTypeSyncBridge implementation. @@ -249,8 +253,6 @@ // backend. base::ScopedObservation<HistoryBackend, HistoryBackendObserver> history_backend_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(TypedURLSyncBridge); }; } // namespace history
diff --git a/components/history/core/browser/sync/typed_url_sync_metadata_database.h b/components/history/core/browser/sync/typed_url_sync_metadata_database.h index b3d10bdc..b96b0f0cf 100644 --- a/components/history/core/browser/sync/typed_url_sync_metadata_database.h +++ b/components/history/core/browser/sync/typed_url_sync_metadata_database.h
@@ -30,6 +30,11 @@ // Must call InitVisitTable() before using to make sure the database is // initialized. TypedURLSyncMetadataDatabase(); + + TypedURLSyncMetadataDatabase(const TypedURLSyncMetadataDatabase&) = delete; + TypedURLSyncMetadataDatabase& operator=(const TypedURLSyncMetadataDatabase&) = + delete; + ~TypedURLSyncMetadataDatabase() override; // Read all the stored metadata for typed URL and fill `metadata_batch` @@ -76,8 +81,6 @@ // Read sync_pb::ModelTypeState for typed URL and fill `state` with it. bool GetModelTypeState(sync_pb::ModelTypeState* state); - - DISALLOW_COPY_AND_ASSIGN(TypedURLSyncMetadataDatabase); }; } // namespace history
diff --git a/components/history/core/browser/sync/typed_url_sync_metadata_database_unittest.cc b/components/history/core/browser/sync/typed_url_sync_metadata_database_unittest.cc index 5f92eac..046d3eda 100644 --- a/components/history/core/browser/sync/typed_url_sync_metadata_database_unittest.cc +++ b/components/history/core/browser/sync/typed_url_sync_metadata_database_unittest.cc
@@ -34,6 +34,12 @@ public TypedURLSyncMetadataDatabase { public: TypedURLSyncMetadataDatabaseTest() {} + + TypedURLSyncMetadataDatabaseTest(const TypedURLSyncMetadataDatabaseTest&) = + delete; + TypedURLSyncMetadataDatabaseTest& operator=( + const TypedURLSyncMetadataDatabaseTest&) = delete; + ~TypedURLSyncMetadataDatabaseTest() override {} protected: @@ -58,9 +64,6 @@ base::ScopedTempDir temp_dir_; sql::Database db_; sql::MetaTable meta_table_; - - private: - DISALLOW_COPY_AND_ASSIGN(TypedURLSyncMetadataDatabaseTest); }; TEST_F(TypedURLSyncMetadataDatabaseTest, TypedURLNoMetadata) {
diff --git a/components/history/core/browser/top_sites_database.h b/components/history/core/browser/top_sites_database.h index 6078cd1..ab19c8e 100644 --- a/components/history/core/browser/top_sites_database.h +++ b/components/history/core/browser/top_sites_database.h
@@ -26,6 +26,10 @@ class TopSitesDatabase { public: TopSitesDatabase(); + + TopSitesDatabase(const TopSitesDatabase&) = delete; + TopSitesDatabase& operator=(const TopSitesDatabase&) = delete; + ~TopSitesDatabase(); // Must be called after creation but before any other methods are called. @@ -94,8 +98,6 @@ std::unique_ptr<sql::Database> db_; sql::MetaTable meta_table_; - - DISALLOW_COPY_AND_ASSIGN(TopSitesDatabase); }; } // namespace history
diff --git a/components/history/core/browser/top_sites_observer.h b/components/history/core/browser/top_sites_observer.h index cfa26a5..da371e4c 100644 --- a/components/history/core/browser/top_sites_observer.h +++ b/components/history/core/browser/top_sites_observer.h
@@ -25,6 +25,10 @@ }; TopSitesObserver() {} + + TopSitesObserver(const TopSitesObserver&) = delete; + TopSitesObserver& operator=(const TopSitesObserver&) = delete; + virtual ~TopSitesObserver() {} // Is called when TopSites finishes loading. @@ -34,9 +38,6 @@ // changed, or one of the images changes. virtual void TopSitesChanged(TopSites* top_sites, ChangeReason change_reason) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(TopSitesObserver); }; } // namespace history
diff --git a/components/history/core/browser/url_database.h b/components/history/core/browser/url_database.h index a96eb8c..b31d0e07 100644 --- a/components/history/core/browser/url_database.h +++ b/components/history/core/browser/url_database.h
@@ -47,6 +47,9 @@ // sure the database is initialized. URLDatabase(); + URLDatabase(const URLDatabase&) = delete; + URLDatabase& operator=(const URLDatabase&) = delete; + // This object must be destroyed on the thread where all accesses are // happening to avoid thread-safety problems. virtual ~URLDatabase(); @@ -117,6 +120,10 @@ class URLEnumeratorBase { public: URLEnumeratorBase(); + + URLEnumeratorBase(const URLEnumeratorBase&) = delete; + URLEnumeratorBase& operator=(const URLEnumeratorBase&) = delete; + virtual ~URLEnumeratorBase(); private: @@ -124,8 +131,6 @@ bool initialized_; sql::Statement statement_; - - DISALLOW_COPY_AND_ASSIGN(URLEnumeratorBase); }; // A basic enumerator to enumerate urls @@ -308,8 +313,6 @@ // True if InitKeywordSearchTermsTable() has been invoked. Not all subclasses // have keyword search terms. bool has_keyword_search_terms_; - - DISALLOW_COPY_AND_ASSIGN(URLDatabase); }; // The fields and order expected by FillURLRow(). ID is guaranteed to be first
diff --git a/components/history/core/browser/visit_database.h b/components/history/core/browser/visit_database.h index 1a83937..1faff6b 100644 --- a/components/history/core/browser/visit_database.h +++ b/components/history/core/browser/visit_database.h
@@ -28,6 +28,10 @@ // Must call InitVisitTable() before using to make sure the database is // initialized. VisitDatabase(); + + VisitDatabase(const VisitDatabase&) = delete; + VisitDatabase& operator=(const VisitDatabase&) = delete; + virtual ~VisitDatabase(); // Deletes the visit table. Used for rapidly clearing all visits. In this @@ -276,9 +280,6 @@ // A subprocedure in the process of migration to version 40. bool GetAllVisitedURLRowidsForMigrationToVersion40( std::vector<URLID>* visited_url_rowids_sorted); - - private: - DISALLOW_COPY_AND_ASSIGN(VisitDatabase); }; // Columns, in order, of the visit table.
diff --git a/components/history/core/browser/visit_delegate.h b/components/history/core/browser/visit_delegate.h index f7eb58e..c79ad2a 100644 --- a/components/history/core/browser/visit_delegate.h +++ b/components/history/core/browser/visit_delegate.h
@@ -20,6 +20,10 @@ class VisitDelegate { public: VisitDelegate(); + + VisitDelegate(const VisitDelegate&) = delete; + VisitDelegate& operator=(const VisitDelegate&) = delete; + virtual ~VisitDelegate(); // Called once HistoryService initialization is complete. Returns true if the @@ -37,9 +41,6 @@ // Called when all URLs are removed from HistoryService. virtual void DeleteAllURLs() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(VisitDelegate); }; } // namespace history
diff --git a/components/history/core/browser/visitsegment_database.h b/components/history/core/browser/visitsegment_database.h index a3b5aef3..6519351 100644 --- a/components/history/core/browser/visitsegment_database.h +++ b/components/history/core/browser/visitsegment_database.h
@@ -25,6 +25,10 @@ public: // Must call InitSegmentTables before using any other part of this class. VisitSegmentDatabase(); + + VisitSegmentDatabase(const VisitSegmentDatabase&) = delete; + VisitSegmentDatabase& operator=(const VisitSegmentDatabase&) = delete; + virtual ~VisitSegmentDatabase(); // Compute a segment name given a URL. The segment name is currently the @@ -91,8 +95,6 @@ // `from_segment_id` are updated to `to_segment_id` and `from_segment_id` is // deleted. Returns true on success. bool MergeSegments(SegmentID from_segment_id, SegmentID to_segment_id); - - DISALLOW_COPY_AND_ASSIGN(VisitSegmentDatabase); }; } // namespace history
diff --git a/components/history/core/browser/web_history_service_unittest.cc b/components/history/core/browser/web_history_service_unittest.cc index 452f6142..a3c45c2 100644 --- a/components/history/core/browser/web_history_service_unittest.cc +++ b/components/history/core/browser/web_history_service_unittest.cc
@@ -42,6 +42,10 @@ expected_url_(GURL()), expected_audio_history_value_(false), current_expected_post_data_("") {} + + TestingWebHistoryService(const TestingWebHistoryService&) = delete; + TestingWebHistoryService& operator=(const TestingWebHistoryService&) = delete; + ~TestingWebHistoryService() override {} WebHistoryService::Request* CreateRequest( @@ -85,8 +89,6 @@ bool expected_audio_history_value_; std::string current_expected_post_data_; std::map<Request*, std::string> expected_post_data_; - - DISALLOW_COPY_AND_ASSIGN(TestingWebHistoryService); }; // A testing request class that allows expected values to be filled in. @@ -119,6 +121,9 @@ ("}"); } + TestRequest(const TestRequest&) = delete; + TestRequest& operator=(const TestRequest&) = delete; + ~TestRequest() override {} // history::Request overrides @@ -156,8 +161,6 @@ std::string response_body_; std::string post_data_; bool is_pending_; - - DISALLOW_COPY_AND_ASSIGN(TestRequest); }; WebHistoryService::Request* TestingWebHistoryService::CreateRequest( @@ -218,6 +221,9 @@ &test_url_loader_factory_)), web_history_service_(test_shared_loader_factory_) {} + WebHistoryServiceTest(const WebHistoryServiceTest&) = delete; + WebHistoryServiceTest& operator=(const WebHistoryServiceTest&) = delete; + ~WebHistoryServiceTest() override {} void TearDown() override { @@ -236,8 +242,6 @@ network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; TestingWebHistoryService web_history_service_; - - DISALLOW_COPY_AND_ASSIGN(WebHistoryServiceTest); }; TEST_F(WebHistoryServiceTest, GetAudioHistoryEnabled) {
diff --git a/components/history/core/test/fake_web_history_service.h b/components/history/core/test/fake_web_history_service.h index d9478f3..1ec2a32 100644 --- a/components/history/core/test/fake_web_history_service.h +++ b/components/history/core/test/fake_web_history_service.h
@@ -30,6 +30,10 @@ class FakeWebHistoryService : public WebHistoryService { public: FakeWebHistoryService(); + + FakeWebHistoryService(const FakeWebHistoryService&) = delete; + FakeWebHistoryService& operator=(const FakeWebHistoryService&) = delete; + ~FakeWebHistoryService() override; // Sets up the behavior of the fake response returned when calling @@ -96,8 +100,6 @@ // Fake visits storage. std::vector<Visit> visits_; - - DISALLOW_COPY_AND_ASSIGN(FakeWebHistoryService); }; } // namespace history
diff --git a/components/history/core/test/history_client_fake_bookmarks.cc b/components/history/core/test/history_client_fake_bookmarks.cc index 3dee003..f8fa065 100644 --- a/components/history/core/test/history_client_fake_bookmarks.cc +++ b/components/history/core/test/history_client_fake_bookmarks.cc
@@ -77,6 +77,12 @@ public: explicit HistoryBackendClientFakeBookmarks( const scoped_refptr<FakeBookmarkDatabase>& bookmarks); + + HistoryBackendClientFakeBookmarks(const HistoryBackendClientFakeBookmarks&) = + delete; + HistoryBackendClientFakeBookmarks& operator=( + const HistoryBackendClientFakeBookmarks&) = delete; + ~HistoryBackendClientFakeBookmarks() override; // HistoryBackendClient implementation. @@ -86,8 +92,6 @@ private: scoped_refptr<FakeBookmarkDatabase> bookmarks_; - - DISALLOW_COPY_AND_ASSIGN(HistoryBackendClientFakeBookmarks); }; HistoryBackendClientFakeBookmarks::HistoryBackendClientFakeBookmarks(
diff --git a/components/history/core/test/history_client_fake_bookmarks.h b/components/history/core/test/history_client_fake_bookmarks.h index ee7b0633..983022b 100644 --- a/components/history/core/test/history_client_fake_bookmarks.h +++ b/components/history/core/test/history_client_fake_bookmarks.h
@@ -23,6 +23,11 @@ class HistoryClientFakeBookmarks : public HistoryClient { public: HistoryClientFakeBookmarks(); + + HistoryClientFakeBookmarks(const HistoryClientFakeBookmarks&) = delete; + HistoryClientFakeBookmarks& operator=(const HistoryClientFakeBookmarks&) = + delete; + ~HistoryClientFakeBookmarks() override; void ClearAllBookmarks(); @@ -41,8 +46,6 @@ private: scoped_refptr<FakeBookmarkDatabase> bookmarks_; - - DISALLOW_COPY_AND_ASSIGN(HistoryClientFakeBookmarks); }; } // namespace history
diff --git a/components/history/core/test/history_unittest_base.h b/components/history/core/test/history_unittest_base.h index 26ae0d9..5263afa3 100644 --- a/components/history/core/test/history_unittest_base.h +++ b/components/history/core/test/history_unittest_base.h
@@ -17,6 +17,9 @@ // class HistoryUnitTestBase : public testing::Test { public: + HistoryUnitTestBase(const HistoryUnitTestBase&) = delete; + HistoryUnitTestBase& operator=(const HistoryUnitTestBase&) = delete; + ~HistoryUnitTestBase() override; // Executes the sql from the file `sql_path` in the database at `db_path`. @@ -27,9 +30,6 @@ protected: HistoryUnitTestBase(); - - private: - DISALLOW_COPY_AND_ASSIGN(HistoryUnitTestBase); }; } // namespace history
diff --git a/components/history/core/test/wait_top_sites_loaded_observer.h b/components/history/core/test/wait_top_sites_loaded_observer.h index 7c9c4ee..706111d 100644 --- a/components/history/core/test/wait_top_sites_loaded_observer.h +++ b/components/history/core/test/wait_top_sites_loaded_observer.h
@@ -18,6 +18,11 @@ class WaitTopSitesLoadedObserver : public TopSitesObserver { public: explicit WaitTopSitesLoadedObserver(scoped_refptr<TopSites> top_sites); + + WaitTopSitesLoadedObserver(const WaitTopSitesLoadedObserver&) = delete; + WaitTopSitesLoadedObserver& operator=(const WaitTopSitesLoadedObserver&) = + delete; + ~WaitTopSitesLoadedObserver() override; // Wait until TopSites has finished loading. Returns immediately if it has @@ -32,8 +37,6 @@ scoped_refptr<TopSites> top_sites_; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(WaitTopSitesLoadedObserver); }; } // namespace history
diff --git a/components/history/ios/browser/web_state_top_sites_observer.h b/components/history/ios/browser/web_state_top_sites_observer.h index 743a8a60..050bd48d 100644 --- a/components/history/ios/browser/web_state_top_sites_observer.h +++ b/components/history/ios/browser/web_state_top_sites_observer.h
@@ -19,6 +19,9 @@ : public web::WebStateObserver, public web::WebStateUserData<WebStateTopSitesObserver> { public: + WebStateTopSitesObserver(const WebStateTopSitesObserver&) = delete; + WebStateTopSitesObserver& operator=(const WebStateTopSitesObserver&) = delete; + ~WebStateTopSitesObserver() override; static void CreateForWebState(web::WebState* web_state, TopSites* top_sites); @@ -37,8 +40,6 @@ TopSites* top_sites_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(WebStateTopSitesObserver); }; } // namespace history
diff --git a/components/history/metrics/domain_diversity_reporter.h b/components/history/metrics/domain_diversity_reporter.h index 134e456..2867fb3b 100644 --- a/components/history/metrics/domain_diversity_reporter.h +++ b/components/history/metrics/domain_diversity_reporter.h
@@ -25,6 +25,10 @@ DomainDiversityReporter(history::HistoryService* history_service, PrefService* prefs, base::Clock* clock); + + DomainDiversityReporter(const DomainDiversityReporter&) = delete; + DomainDiversityReporter& operator=(const DomainDiversityReporter&) = delete; + ~DomainDiversityReporter() override; // Registers Profile preferences in `registry`. @@ -65,8 +69,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<DomainDiversityReporter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DomainDiversityReporter); }; #endif // COMPONENTS_HISTORY_METRICS_DOMAIN_DIVERSITY_REPORTER_H_
diff --git a/components/image_fetcher/core/cache/image_data_store_disk.h b/components/image_fetcher/core/cache/image_data_store_disk.h index 1dbf965..e797a391 100644 --- a/components/image_fetcher/core/cache/image_data_store_disk.h +++ b/components/image_fetcher/core/cache/image_data_store_disk.h
@@ -26,6 +26,10 @@ // be postfixed with a special directory. ImageDataStoreDisk(base::FilePath generic_storage_path, scoped_refptr<base::SequencedTaskRunner> task_runner); + + ImageDataStoreDisk(const ImageDataStoreDisk&) = delete; + ImageDataStoreDisk& operator=(const ImageDataStoreDisk&) = delete; + ~ImageDataStoreDisk() override; // ImageDataStorage: @@ -61,8 +65,6 @@ scoped_refptr<base::SequencedTaskRunner> task_runner_; base::WeakPtrFactory<ImageDataStoreDisk> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImageDataStoreDisk); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/cache/image_metadata_store_leveldb.h b/components/image_fetcher/core/cache/image_metadata_store_leveldb.h index f07959a..539ef043 100644 --- a/components/image_fetcher/core/cache/image_metadata_store_leveldb.h +++ b/components/image_fetcher/core/cache/image_metadata_store_leveldb.h
@@ -44,6 +44,11 @@ std::unique_ptr<leveldb_proto::ProtoDatabase<CachedImageMetadataProto>> database, base::Clock* clock); + + ImageMetadataStoreLevelDB(const ImageMetadataStoreLevelDB&) = delete; + ImageMetadataStoreLevelDB& operator=(const ImageMetadataStoreLevelDB&) = + delete; + ~ImageMetadataStoreLevelDB() override; // ImageMetadataStorage: @@ -105,8 +110,6 @@ // Clock is owned by the service that creates this object. base::Clock* clock_; base::WeakPtrFactory<ImageMetadataStoreLevelDB> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImageMetadataStoreLevelDB); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/cached_image_fetcher.h b/components/image_fetcher/core/cached_image_fetcher.h index 8f966d8..25f9a4ab 100644 --- a/components/image_fetcher/core/cached_image_fetcher.h +++ b/components/image_fetcher/core/cached_image_fetcher.h
@@ -34,6 +34,10 @@ CachedImageFetcher(ImageFetcher* image_fetcher, scoped_refptr<ImageCache> image_cache, bool read_only); + + CachedImageFetcher(const CachedImageFetcher&) = delete; + CachedImageFetcher& operator=(const CachedImageFetcher&) = delete; + ~CachedImageFetcher() override; // ImageFetcher: @@ -110,8 +114,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<CachedImageFetcher> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CachedImageFetcher); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/cached_image_fetcher_unittest.cc b/components/image_fetcher/core/cached_image_fetcher_unittest.cc index 43cc427..f799c0b 100644 --- a/components/image_fetcher/core/cached_image_fetcher_unittest.cc +++ b/components/image_fetcher/core/cached_image_fetcher_unittest.cc
@@ -60,6 +60,9 @@ public: CachedImageFetcherTest() {} + CachedImageFetcherTest(const CachedImageFetcherTest&) = delete; + CachedImageFetcherTest& operator=(const CachedImageFetcherTest&) = delete; + ~CachedImageFetcherTest() override { cached_image_fetcher_.reset(); // We need to run until idle after deleting the database, because @@ -143,8 +146,6 @@ base::test::TaskEnvironment task_environment_; base::HistogramTester histogram_tester_; - - DISALLOW_COPY_AND_ASSIGN(CachedImageFetcherTest); }; MATCHER(EmptyImage, "") {
diff --git a/components/image_fetcher/core/image_data_fetcher.h b/components/image_fetcher/core/image_data_fetcher.h index 3d8d134..9d7fcb8 100644 --- a/components/image_fetcher/core/image_data_fetcher.h +++ b/components/image_fetcher/core/image_data_fetcher.h
@@ -35,6 +35,10 @@ // thread is required. explicit ImageDataFetcher( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + ImageDataFetcher(const ImageDataFetcher&) = delete; + ImageDataFetcher& operator=(const ImageDataFetcher&) = delete; + ~ImageDataFetcher(); // Sets an upper limit for image downloads. @@ -102,8 +106,6 @@ absl::optional<int64_t> max_download_bytes_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ImageDataFetcher); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/image_data_fetcher_unittest.cc b/components/image_fetcher/core/image_data_fetcher_unittest.cc index a67e79b..9a96a47f 100644 --- a/components/image_fetcher/core/image_data_fetcher_unittest.cc +++ b/components/image_fetcher/core/image_data_fetcher_unittest.cc
@@ -46,6 +46,10 @@ base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory_)), image_data_fetcher_(shared_factory_) {} + + ImageDataFetcherTest(const ImageDataFetcherTest&) = delete; + ImageDataFetcherTest& operator=(const ImageDataFetcherTest&) = delete; + ~ImageDataFetcherTest() override {} base::HistogramTester& histogram_tester() { return histogram_tester_; } @@ -67,9 +71,6 @@ scoped_refptr<network::SharedURLLoaderFactory> shared_factory_; ImageDataFetcher image_data_fetcher_; - - private: - DISALLOW_COPY_AND_ASSIGN(ImageDataFetcherTest); }; TEST_F(ImageDataFetcherTest, FetchImageData) {
diff --git a/components/image_fetcher/core/image_decoder.h b/components/image_fetcher/core/image_decoder.h index 250a69f3..ee8f0e7 100644 --- a/components/image_fetcher/core/image_decoder.h +++ b/components/image_fetcher/core/image_decoder.h
@@ -25,6 +25,10 @@ class ImageDecoder { public: ImageDecoder() {} + + ImageDecoder(const ImageDecoder&) = delete; + ImageDecoder& operator=(const ImageDecoder&) = delete; + virtual ~ImageDecoder() {} // Decodes the passed |image_data| and runs the given callback. The callback @@ -38,9 +42,6 @@ virtual void DecodeImage(const std::string& image_data, const gfx::Size& desired_image_frame_size, ImageDecodedCallback callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ImageDecoder); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/image_fetcher.h b/components/image_fetcher/core/image_fetcher.h index 3c073ac..cb68bd3 100644 --- a/components/image_fetcher/core/image_fetcher.h +++ b/components/image_fetcher/core/image_fetcher.h
@@ -134,6 +134,10 @@ class ImageFetcher { public: ImageFetcher() {} + + ImageFetcher(const ImageFetcher&) = delete; + ImageFetcher& operator=(const ImageFetcher&) = delete; + virtual ~ImageFetcher() {} // Fetch an image and optionally decode it. |image_data_callback| is called @@ -167,9 +171,6 @@ } virtual ImageDecoder* GetImageDecoder() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ImageFetcher); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/image_fetcher_impl.h b/components/image_fetcher/core/image_fetcher_impl.h index 433c6ac..44f9757 100644 --- a/components/image_fetcher/core/image_fetcher_impl.h +++ b/components/image_fetcher/core/image_fetcher_impl.h
@@ -37,6 +37,10 @@ ImageFetcherImpl( std::unique_ptr<ImageDecoder> image_decoder, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + ImageFetcherImpl(const ImageFetcherImpl&) = delete; + ImageFetcherImpl& operator=(const ImageFetcherImpl&) = delete; + ~ImageFetcherImpl() override; void FetchImageAndData(const GURL& image_url, @@ -96,8 +100,6 @@ ImageRequestMap pending_net_requests_; base::WeakPtrFactory<ImageFetcherImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/image_fetcher_metrics_reporter_unittest.cc b/components/image_fetcher/core/image_fetcher_metrics_reporter_unittest.cc index c936d4e..31d55fb 100644 --- a/components/image_fetcher/core/image_fetcher_metrics_reporter_unittest.cc +++ b/components/image_fetcher/core/image_fetcher_metrics_reporter_unittest.cc
@@ -36,14 +36,18 @@ class ImageFetcherMetricsReporterTest : public testing::Test { public: ImageFetcherMetricsReporterTest() {} + + ImageFetcherMetricsReporterTest(const ImageFetcherMetricsReporterTest&) = + delete; + ImageFetcherMetricsReporterTest& operator=( + const ImageFetcherMetricsReporterTest&) = delete; + ~ImageFetcherMetricsReporterTest() override = default; base::HistogramTester& histogram_tester() { return histogram_tester_; } private: base::HistogramTester histogram_tester_; - - DISALLOW_COPY_AND_ASSIGN(ImageFetcherMetricsReporterTest); }; TEST_F(ImageFetcherMetricsReporterTest, TestReportEvent) {
diff --git a/components/image_fetcher/core/image_fetcher_service.h b/components/image_fetcher/core/image_fetcher_service.h index 279b9e25..d84e573a 100644 --- a/components/image_fetcher/core/image_fetcher_service.h +++ b/components/image_fetcher/core/image_fetcher_service.h
@@ -51,6 +51,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, scoped_refptr<ImageCache> image_cache, bool read_only); + + ImageFetcherService(const ImageFetcherService&) = delete; + ImageFetcherService& operator=(const ImageFetcherService&) = delete; + ~ImageFetcherService() override; // Get an image fetcher according to the given config. @@ -69,8 +73,6 @@ // This fetcher goes through a disk cache before going to the network, but // defers image transcoding when fetching. std::unique_ptr<ImageFetcher> reduced_mode_image_fetcher_; - - DISALLOW_COPY_AND_ASSIGN(ImageFetcherService); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/reduced_mode_image_fetcher.h b/components/image_fetcher/core/reduced_mode_image_fetcher.h index 4524caf..81b5f87 100644 --- a/components/image_fetcher/core/reduced_mode_image_fetcher.h +++ b/components/image_fetcher/core/reduced_mode_image_fetcher.h
@@ -21,6 +21,10 @@ class ReducedModeImageFetcher : public ImageFetcher { public: ReducedModeImageFetcher(ImageFetcher* image_fetcher); + + ReducedModeImageFetcher(const ReducedModeImageFetcher&) = delete; + ReducedModeImageFetcher& operator=(const ReducedModeImageFetcher&) = delete; + ~ReducedModeImageFetcher() override; // ImageFetcher: @@ -37,8 +41,6 @@ // Used to ensure that operations are performed on the sequence that this // object was created on. SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(ReducedModeImageFetcher); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/core/reduced_mode_image_fetcher_unittest.cc b/components/image_fetcher/core/reduced_mode_image_fetcher_unittest.cc index 47a63ad..b81a9605 100644 --- a/components/image_fetcher/core/reduced_mode_image_fetcher_unittest.cc +++ b/components/image_fetcher/core/reduced_mode_image_fetcher_unittest.cc
@@ -54,6 +54,10 @@ public: ReducedModeImageFetcherTest() {} + ReducedModeImageFetcherTest(const ReducedModeImageFetcherTest&) = delete; + ReducedModeImageFetcherTest& operator=(const ReducedModeImageFetcherTest&) = + delete; + ~ReducedModeImageFetcherTest() override { reduced_mode_image_fetcher_.reset(); // We need to run until idle after deleting the database, because @@ -155,8 +159,6 @@ base::test::TaskEnvironment task_environment_; base::HistogramTester histogram_tester_; - - DISALLOW_COPY_AND_ASSIGN(ReducedModeImageFetcherTest); }; TEST_F(ReducedModeImageFetcherTest, FetchNeedsTranscodingImageFromCache) {
diff --git a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h index 15d7c24..20b0ca26 100644 --- a/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h +++ b/components/image_fetcher/ios/ios_image_data_fetcher_wrapper.h
@@ -25,6 +25,11 @@ // The TaskRunner is used to decode the image if it is WebP-encoded. explicit IOSImageDataFetcherWrapper( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + IOSImageDataFetcherWrapper(const IOSImageDataFetcherWrapper&) = delete; + IOSImageDataFetcherWrapper& operator=(const IOSImageDataFetcherWrapper&) = + delete; + virtual ~IOSImageDataFetcherWrapper(); // Helper to start downloading and possibly decoding the image without a @@ -55,8 +60,6 @@ ImageDataFetcherBlock callback); ImageDataFetcher image_data_fetcher_; - - DISALLOW_COPY_AND_ASSIGN(IOSImageDataFetcherWrapper); }; } // namespace image_fetcher
diff --git a/components/image_fetcher/ios/ios_image_decoder_impl.mm b/components/image_fetcher/ios/ios_image_decoder_impl.mm index 65476545..a22b0ee 100644 --- a/components/image_fetcher/ios/ios_image_decoder_impl.mm +++ b/components/image_fetcher/ios/ios_image_decoder_impl.mm
@@ -28,6 +28,10 @@ class IOSImageDecoderImpl : public ImageDecoder { public: explicit IOSImageDecoderImpl(); + + IOSImageDecoderImpl(const IOSImageDecoderImpl&) = delete; + IOSImageDecoderImpl& operator=(const IOSImageDecoderImpl&) = delete; + ~IOSImageDecoderImpl() override; // Note, that |desired_image_frame_size| is not supported @@ -49,8 +53,6 @@ // The WeakPtrFactory is used to cancel callbacks if ImageFetcher is // destroyed during WebP decoding. base::WeakPtrFactory<IOSImageDecoderImpl> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(IOSImageDecoderImpl); }; IOSImageDecoderImpl::IOSImageDecoderImpl() : weak_factory_(this) {
diff --git a/components/infobars/android/confirm_infobar.h b/components/infobars/android/confirm_infobar.h index 0bdf560..261d70a 100644 --- a/components/infobars/android/confirm_infobar.h +++ b/components/infobars/android/confirm_infobar.h
@@ -17,6 +17,10 @@ class ConfirmInfoBar : public InfoBarAndroid { public: explicit ConfirmInfoBar(std::unique_ptr<ConfirmInfoBarDelegate> delegate); + + ConfirmInfoBar(const ConfirmInfoBar&) = delete; + ConfirmInfoBar& operator=(const ConfirmInfoBar&) = delete; + ~ConfirmInfoBar() override; protected: @@ -32,9 +36,6 @@ const base::android::JavaParamRef<jobject>& obj) override; void ProcessButton(int action) override; - - private: - DISALLOW_COPY_AND_ASSIGN(ConfirmInfoBar); }; } // namespace infobars
diff --git a/components/infobars/android/infobar_android.h b/components/infobars/android/infobar_android.h index 38881e8..f09a209a2 100644 --- a/components/infobars/android/infobar_android.h +++ b/components/infobars/android/infobar_android.h
@@ -31,6 +31,10 @@ using ResourceIdMapper = base::RepeatingCallback<int(int)>; explicit InfoBarAndroid(std::unique_ptr<InfoBarDelegate> delegate); + + InfoBarAndroid(const InfoBarAndroid&) = delete; + InfoBarAndroid& operator=(const InfoBarAndroid&) = delete; + ~InfoBarAndroid() override; // InfoBar: @@ -68,8 +72,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> java_info_bar_; - - DISALLOW_COPY_AND_ASSIGN(InfoBarAndroid); }; } // namespace infobars
diff --git a/components/infobars/content/content_infobar_manager.h b/components/infobars/content/content_infobar_manager.h index fedd7f41..7d08bdb 100644 --- a/components/infobars/content/content_infobar_manager.h +++ b/components/infobars/content/content_infobar_manager.h
@@ -30,6 +30,10 @@ public content::WebContentsUserData<ContentInfoBarManager> { public: explicit ContentInfoBarManager(content::WebContents* web_contents); + + ContentInfoBarManager(const ContentInfoBarManager&) = delete; + ContentInfoBarManager& operator=(const ContentInfoBarManager&) = delete; + ~ContentInfoBarManager() override; static InfoBarDelegate::NavigationDetails @@ -70,8 +74,6 @@ // See description in set_ignore_next_reload(). bool ignore_next_reload_; - - DISALLOW_COPY_AND_ASSIGN(ContentInfoBarManager); }; } // namespace infobars
diff --git a/components/infobars/core/infobar.h b/components/infobars/core/infobar.h index a62c47c..f4d979f 100644 --- a/components/infobars/core/infobar.h +++ b/components/infobars/core/infobar.h
@@ -37,6 +37,10 @@ class InfoBar : public gfx::AnimationDelegate { public: explicit InfoBar(std::unique_ptr<InfoBarDelegate> delegate); + + InfoBar(const InfoBar&) = delete; + InfoBar& operator=(const InfoBar&) = delete; + ~InfoBar() override; InfoBarManager* owner() { return owner_; } @@ -116,8 +120,6 @@ // The current and target heights. int height_; // Includes both fill and bottom separator. int target_height_; - - DISALLOW_COPY_AND_ASSIGN(InfoBar); }; } // namespace infobars
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h index 81001cc..f2112e5 100644 --- a/components/infobars/core/infobar_delegate.h +++ b/components/infobars/core/infobar_delegate.h
@@ -196,6 +196,9 @@ // Value to use when the InfoBar has no icon to show. static const int kNoIconID; + InfoBarDelegate(const InfoBarDelegate&) = delete; + InfoBarDelegate& operator=(const InfoBarDelegate&) = delete; + // Called when the InfoBar that owns this delegate is being destroyed. At // this point nothing is visible onscreen. virtual ~InfoBarDelegate(); @@ -291,8 +294,6 @@ // The ID of the active navigation entry at the time we became owned. int nav_entry_id_ = 0; - - DISALLOW_COPY_AND_ASSIGN(InfoBarDelegate); }; } // namespace infobars
diff --git a/components/infobars/core/infobar_manager.h b/components/infobars/core/infobar_manager.h index eb53254..917b18f1 100644 --- a/components/infobars/core/infobar_manager.h +++ b/components/infobars/core/infobar_manager.h
@@ -38,6 +38,10 @@ }; InfoBarManager(); + + InfoBarManager(const InfoBarManager&) = delete; + InfoBarManager& operator=(const InfoBarManager&) = delete; + virtual ~InfoBarManager(); // Must be called before destruction. @@ -124,8 +128,6 @@ bool animations_enabled_ = true; base::ObserverList<Observer, true>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(InfoBarManager); }; } // namespace infobars
diff --git a/components/infobars/core/simple_alert_infobar_delegate.h b/components/infobars/core/simple_alert_infobar_delegate.h index 173543c7..6a4817b0 100644 --- a/components/infobars/core/simple_alert_infobar_delegate.h +++ b/components/infobars/core/simple_alert_infobar_delegate.h
@@ -23,6 +23,11 @@ const std::u16string& message, bool auto_expire, bool should_animate); + + SimpleAlertInfoBarDelegate(const SimpleAlertInfoBarDelegate&) = delete; + SimpleAlertInfoBarDelegate& operator=(const SimpleAlertInfoBarDelegate&) = + delete; + ~SimpleAlertInfoBarDelegate() override; private: @@ -39,8 +44,6 @@ std::u16string message_; bool auto_expire_; // Should it expire automatically on navigation? bool should_animate_; - - DISALLOW_COPY_AND_ASSIGN(SimpleAlertInfoBarDelegate); }; #endif // COMPONENTS_INFOBARS_CORE_SIMPLE_ALERT_INFOBAR_DELEGATE_H_
diff --git a/components/invalidation/impl/invalidation_service_test_template.h b/components/invalidation/impl/invalidation_service_test_template.h index e559972..5ee55b0 100644 --- a/components/invalidation/impl/invalidation_service_test_template.h +++ b/components/invalidation/impl/invalidation_service_test_template.h
@@ -333,6 +333,11 @@ class BoundFakeInvalidationHandler : public FakeInvalidationHandler { public: explicit BoundFakeInvalidationHandler(const InvalidationService& invalidator); + + BoundFakeInvalidationHandler(const BoundFakeInvalidationHandler&) = delete; + BoundFakeInvalidationHandler& operator=(const BoundFakeInvalidationHandler&) = + delete; + ~BoundFakeInvalidationHandler() override; // Returns the last return value of GetInvalidatorState() on the @@ -346,8 +351,6 @@ private: const InvalidationService& invalidator_; InvalidatorState last_retrieved_state_; - - DISALLOW_COPY_AND_ASSIGN(BoundFakeInvalidationHandler); }; TYPED_TEST_P(InvalidationServiceTest, GetInvalidatorStateAlwaysCurrent) {
diff --git a/components/invalidation/impl/per_user_topic_subscription_request_unittest.cc b/components/invalidation/impl/per_user_topic_subscription_request_unittest.cc index 98e4ae0..44d8b2e 100644 --- a/components/invalidation/impl/per_user_topic_subscription_request_unittest.cc +++ b/components/invalidation/impl/per_user_topic_subscription_request_unittest.cc
@@ -333,10 +333,13 @@ public testing::WithParamInterface<net::HttpStatusCode> { public: PerUserTopicSubscriptionRequestParamTest() = default; - ~PerUserTopicSubscriptionRequestParamTest() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(PerUserTopicSubscriptionRequestParamTest); + PerUserTopicSubscriptionRequestParamTest( + const PerUserTopicSubscriptionRequestParamTest&) = delete; + PerUserTopicSubscriptionRequestParamTest& operator=( + const PerUserTopicSubscriptionRequestParamTest&) = delete; + + ~PerUserTopicSubscriptionRequestParamTest() override = default; }; TEST_P(PerUserTopicSubscriptionRequestParamTest,
diff --git a/components/javascript_dialogs/android/app_modal_dialog_view_android.h b/components/javascript_dialogs/android/app_modal_dialog_view_android.h index b277538..886fce9 100644 --- a/components/javascript_dialogs/android/app_modal_dialog_view_android.h +++ b/components/javascript_dialogs/android/app_modal_dialog_view_android.h
@@ -22,6 +22,11 @@ AppModalDialogViewAndroid(JNIEnv* env, AppModalDialogController* controller, gfx::NativeWindow parent); + + AppModalDialogViewAndroid(const AppModalDialogViewAndroid&) = delete; + AppModalDialogViewAndroid& operator=(const AppModalDialogViewAndroid&) = + delete; + ~AppModalDialogViewAndroid() override; // AppModalDialogView: @@ -48,8 +53,6 @@ std::unique_ptr<AppModalDialogController> controller_; base::android::ScopedJavaGlobalRef<jobject> dialog_jobject_; JavaObjectWeakGlobalRef parent_jobject_weak_ref_; - - DISALLOW_COPY_AND_ASSIGN(AppModalDialogViewAndroid); }; } // namespace javascript_dialogs
diff --git a/components/javascript_dialogs/android/tab_modal_dialog_view_android.h b/components/javascript_dialogs/android/tab_modal_dialog_view_android.h index a0aa249..42e6028a 100644 --- a/components/javascript_dialogs/android/tab_modal_dialog_view_android.h +++ b/components/javascript_dialogs/android/tab_modal_dialog_view_android.h
@@ -22,6 +22,10 @@ // are browser tabs. class TabModalDialogViewAndroid : public TabModalDialogView { public: + TabModalDialogViewAndroid(const TabModalDialogViewAndroid&) = delete; + TabModalDialogViewAndroid& operator=(const TabModalDialogViewAndroid&) = + delete; + ~TabModalDialogViewAndroid() override; static base::WeakPtr<TabModalDialogViewAndroid> Create( @@ -67,8 +71,6 @@ base::OnceClosure callback_on_cancelled_; base::WeakPtrFactory<TabModalDialogViewAndroid> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TabModalDialogViewAndroid); }; } // namespace javascript_dialogs
diff --git a/components/javascript_dialogs/app_modal_dialog_controller.h b/components/javascript_dialogs/app_modal_dialog_controller.h index 69463ed..9d52869 100644 --- a/components/javascript_dialogs/app_modal_dialog_controller.h +++ b/components/javascript_dialogs/app_modal_dialog_controller.h
@@ -45,6 +45,10 @@ bool is_before_unload_dialog, bool is_reload, content::JavaScriptDialogManager::DialogClosedCallback callback); + + AppModalDialogController(const AppModalDialogController&) = delete; + AppModalDialogController& operator=(const AppModalDialogController&) = delete; + ~AppModalDialogController(); // Called by the AppModalDialogQueue to show this dialog. @@ -136,21 +140,20 @@ // used when notifying the delegate, if |use_override_prompt_text_| is true. std::u16string override_prompt_text_; bool use_override_prompt_text_; - - DISALLOW_COPY_AND_ASSIGN(AppModalDialogController); }; // An interface to observe that a modal dialog is shown. class AppModalDialogObserver { public: AppModalDialogObserver(); + + AppModalDialogObserver(const AppModalDialogObserver&) = delete; + AppModalDialogObserver& operator=(const AppModalDialogObserver&) = delete; + virtual ~AppModalDialogObserver(); // Called when the modal dialog is shown. virtual void Notify(AppModalDialogController* dialog) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AppModalDialogObserver); }; } // namespace javascript_dialogs
diff --git a/components/javascript_dialogs/app_modal_dialog_manager.cc b/components/javascript_dialogs/app_modal_dialog_manager.cc index 0fd52e9..51cc967 100644 --- a/components/javascript_dialogs/app_modal_dialog_manager.cc +++ b/components/javascript_dialogs/app_modal_dialog_manager.cc
@@ -31,6 +31,10 @@ class DefaultExtensionsClient : public ExtensionsClient { public: DefaultExtensionsClient() = default; + + DefaultExtensionsClient(const DefaultExtensionsClient&) = delete; + DefaultExtensionsClient& operator=(const DefaultExtensionsClient&) = delete; + ~DefaultExtensionsClient() override = default; private: @@ -42,8 +46,6 @@ std::string* name_out) override { return false; } - - DISALLOW_COPY_AND_ASSIGN(DefaultExtensionsClient); }; bool ShouldDisplaySuppressCheckbox(
diff --git a/components/javascript_dialogs/tab_modal_dialog_manager.h b/components/javascript_dialogs/tab_modal_dialog_manager.h index bc2b1d8..56d5aba 100644 --- a/components/javascript_dialogs/tab_modal_dialog_manager.h +++ b/components/javascript_dialogs/tab_modal_dialog_manager.h
@@ -90,6 +90,9 @@ kMaxValue = kDialogClosed, }; + TabModalDialogManager(const TabModalDialogManager&) = delete; + TabModalDialogManager& operator=(const TabModalDialogManager&) = delete; + ~TabModalDialogManager() override; void BrowserActiveStateChanged(); @@ -192,8 +195,6 @@ std::unique_ptr<TabModalDialogManagerDelegate> delegate_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(TabModalDialogManager); }; } // namespace javascript_dialogs
diff --git a/components/javascript_dialogs/views/app_modal_dialog_view_views.h b/components/javascript_dialogs/views/app_modal_dialog_view_views.h index 76c5c626..ce4ac7d0 100644 --- a/components/javascript_dialogs/views/app_modal_dialog_view_views.h +++ b/components/javascript_dialogs/views/app_modal_dialog_view_views.h
@@ -28,6 +28,10 @@ public views::DialogDelegate { public: explicit AppModalDialogViewViews(AppModalDialogController* controller); + + AppModalDialogViewViews(const AppModalDialogViewViews&) = delete; + AppModalDialogViewViews& operator=(const AppModalDialogViewViews&) = delete; + ~AppModalDialogViewViews() override; // AppModalDialogView: @@ -57,8 +61,6 @@ // The message box view whose commands we handle. views::MessageBoxView* message_box_view_; - - DISALLOW_COPY_AND_ASSIGN(AppModalDialogViewViews); }; } // namespace javascript_dialogs
diff --git a/components/javascript_dialogs/views/layer_dimmer.h b/components/javascript_dialogs/views/layer_dimmer.h index 9beec6c..77e6d64 100644 --- a/components/javascript_dialogs/views/layer_dimmer.h +++ b/components/javascript_dialogs/views/layer_dimmer.h
@@ -18,6 +18,10 @@ class LayerDimmer : public aura::WindowObserver { public: explicit LayerDimmer(aura::Window* parent, aura::Window* dialog); + + LayerDimmer(const LayerDimmer&) = delete; + LayerDimmer& operator=(const LayerDimmer&) = delete; + ~LayerDimmer() override; void Show(); @@ -42,8 +46,6 @@ aura::Window* parent_; aura::Window* dialog_; - - DISALLOW_COPY_AND_ASSIGN(LayerDimmer); }; } // namespace javascript_dialogs
diff --git a/components/js_injection/browser/js_communication_host.h b/components/js_injection/browser/js_communication_host.h index 5f15854..bfa4aa9 100644 --- a/components/js_injection/browser/js_communication_host.h +++ b/components/js_injection/browser/js_communication_host.h
@@ -33,6 +33,10 @@ class JsCommunicationHost : public content::WebContentsObserver { public: explicit JsCommunicationHost(content::WebContents* web_contents); + + JsCommunicationHost(const JsCommunicationHost&) = delete; + JsCommunicationHost& operator=(const JsCommunicationHost&) = delete; + ~JsCommunicationHost() override; // Captures the result of adding script. There are two possibilities when @@ -104,8 +108,6 @@ std::map<content::RenderFrameHost*, std::vector<std::unique_ptr<JsToBrowserMessaging>>> js_to_browser_messagings_; - - DISALLOW_COPY_AND_ASSIGN(JsCommunicationHost); }; } // namespace js_injection
diff --git a/components/js_injection/browser/js_to_browser_messaging.h b/components/js_injection/browser/js_to_browser_messaging.h index ed1531b9b..e6ef0d2 100644 --- a/components/js_injection/browser/js_to_browser_messaging.h +++ b/components/js_injection/browser/js_to_browser_messaging.h
@@ -37,6 +37,10 @@ mojo::PendingAssociatedReceiver<mojom::JsToBrowserMessaging> receiver, WebMessageHostFactory* factory, const OriginMatcher& origin_matcher); + + JsToBrowserMessaging(const JsToBrowserMessaging&) = delete; + JsToBrowserMessaging& operator=(const JsToBrowserMessaging&) = delete; + ~JsToBrowserMessaging() override; void OnBackForwardCacheStateChanged(); @@ -61,8 +65,6 @@ std::string origin_string_; bool is_main_frame_; #endif - - DISALLOW_COPY_AND_ASSIGN(JsToBrowserMessaging); }; } // namespace js_injection
diff --git a/components/js_injection/renderer/js_binding.h b/components/js_injection/renderer/js_binding.h index d82529f..6a26cf43 100644 --- a/components/js_injection/renderer/js_binding.h +++ b/components/js_injection/renderer/js_binding.h
@@ -46,6 +46,9 @@ void ReleaseV8GlobalObjects(); + JsBinding(const JsBinding&) = delete; + JsBinding& operator=(const JsBinding&) = delete; + ~JsBinding() override; private: @@ -77,8 +80,6 @@ JsCommunication* js_java_configurator_; mojo::AssociatedReceiver<mojom::BrowserToJsMessaging> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(JsBinding); }; } // namespace js_injection
diff --git a/components/js_injection/renderer/js_communication.h b/components/js_injection/renderer/js_communication.h index 4f9757bf..87103c1 100644 --- a/components/js_injection/renderer/js_communication.h +++ b/components/js_injection/renderer/js_communication.h
@@ -29,6 +29,10 @@ public content::RenderFrameObserverTracker<JsCommunication> { public: explicit JsCommunication(content::RenderFrame* render_frame); + + JsCommunication(const JsCommunication&) = delete; + JsCommunication& operator=(const JsCommunication&) = delete; + ~JsCommunication() override; // mojom::JsCommunication implementation @@ -67,8 +71,6 @@ // Associated with legacy IPC channel. mojo::AssociatedReceiver<mojom::JsCommunication> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(JsCommunication); }; } // namespace js_injection
diff --git a/components/keep_alive_registry/scoped_keep_alive.h b/components/keep_alive_registry/scoped_keep_alive.h index 8260c80..f9ae545a 100644 --- a/components/keep_alive_registry/scoped_keep_alive.h +++ b/components/keep_alive_registry/scoped_keep_alive.h
@@ -17,13 +17,15 @@ class ScopedKeepAlive { public: ScopedKeepAlive(KeepAliveOrigin origin, KeepAliveRestartOption restart); + + ScopedKeepAlive(const ScopedKeepAlive&) = delete; + ScopedKeepAlive& operator=(const ScopedKeepAlive&) = delete; + ~ScopedKeepAlive(); private: const KeepAliveOrigin origin_; const KeepAliveRestartOption restart_; - - DISALLOW_COPY_AND_ASSIGN(ScopedKeepAlive); }; #endif // COMPONENTS_KEEP_ALIVE_REGISTRY_SCOPED_KEEP_ALIVE_H_
diff --git a/components/keyed_service/core/dependency_graph.h b/components/keyed_service/core/dependency_graph.h index 6540ad3..90c51374 100644 --- a/components/keyed_service/core/dependency_graph.h +++ b/components/keyed_service/core/dependency_graph.h
@@ -20,6 +20,10 @@ class KEYED_SERVICE_EXPORT DependencyGraph { public: DependencyGraph(); + + DependencyGraph(const DependencyGraph&) = delete; + DependencyGraph& operator=(const DependencyGraph&) = delete; + ~DependencyGraph(); // Adds/Removes a node from our list of live nodes. Removing will @@ -62,8 +66,6 @@ // Cached construction order (needs rebuild with BuildConstructionOrder // when empty). std::vector<DependencyNode*> construction_order_; - - DISALLOW_COPY_AND_ASSIGN(DependencyGraph); }; #endif // COMPONENTS_KEYED_SERVICE_CORE_DEPENDENCY_GRAPH_H_
diff --git a/components/keyed_service/core/dependency_graph_unittest.cc b/components/keyed_service/core/dependency_graph_unittest.cc index 4fb91ff7..9a278df 100644 --- a/components/keyed_service/core/dependency_graph_unittest.cc +++ b/components/keyed_service/core/dependency_graph_unittest.cc
@@ -21,12 +21,13 @@ dependency_graph_->AddNode(this); } + DummyNode(const DummyNode&) = delete; + DummyNode& operator=(const DummyNode&) = delete; + ~DummyNode() { dependency_graph_->RemoveNode(this); } private: DependencyGraph* dependency_graph_; - - DISALLOW_COPY_AND_ASSIGN(DummyNode); }; // Tests that we can deal with a single component.
diff --git a/components/keyed_service/core/keyed_service.h b/components/keyed_service/core/keyed_service.h index df300b3..51c2e85 100644 --- a/components/keyed_service/core/keyed_service.h +++ b/components/keyed_service/core/keyed_service.h
@@ -26,6 +26,9 @@ public: KeyedService(); + KeyedService(const KeyedService&) = delete; + KeyedService& operator=(const KeyedService&) = delete; + // The second pass is the actual deletion of each object. virtual ~KeyedService(); @@ -33,9 +36,6 @@ // Shutdown will be called automatically for you. Don't directly invoke this // unless you have a specific reason and understand the implications. virtual void Shutdown(); - - private: - DISALLOW_COPY_AND_ASSIGN(KeyedService); }; #endif // COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_H_
diff --git a/components/keyed_service/core/keyed_service_shutdown_notifier.h b/components/keyed_service/core/keyed_service_shutdown_notifier.h index 47603d1..436d263 100644 --- a/components/keyed_service/core/keyed_service_shutdown_notifier.h +++ b/components/keyed_service/core/keyed_service_shutdown_notifier.h
@@ -19,6 +19,11 @@ class KEYED_SERVICE_EXPORT KeyedServiceShutdownNotifier : public KeyedService { public: KeyedServiceShutdownNotifier(); + + KeyedServiceShutdownNotifier(const KeyedServiceShutdownNotifier&) = delete; + KeyedServiceShutdownNotifier& operator=(const KeyedServiceShutdownNotifier&) = + delete; + ~KeyedServiceShutdownNotifier() override; // Subscribe for a notification when the keyed services this object depends on @@ -31,8 +36,6 @@ void Shutdown() override; base::OnceClosureList closure_list_; - - DISALLOW_COPY_AND_ASSIGN(KeyedServiceShutdownNotifier); }; #endif // COMPONENTS_KEYED_SERVICE_CORE_KEYED_SERVICE_SHUTDOWN_NOTIFIER_H_
diff --git a/components/keyed_service/core/simple_factory_key.h b/components/keyed_service/core/simple_factory_key.h index 6467ff0f..51ff9b4 100644 --- a/components/keyed_service/core/simple_factory_key.h +++ b/components/keyed_service/core/simple_factory_key.h
@@ -18,6 +18,10 @@ class KEYED_SERVICE_EXPORT SimpleFactoryKey { public: SimpleFactoryKey(const base::FilePath& path, bool is_off_the_record = false); + + SimpleFactoryKey(const SimpleFactoryKey&) = delete; + SimpleFactoryKey& operator=(const SimpleFactoryKey&) = delete; + virtual ~SimpleFactoryKey(); const base::FilePath& GetPath() const { return path_; } @@ -27,8 +31,6 @@ private: base::FilePath path_; bool is_off_the_record_; - - DISALLOW_COPY_AND_ASSIGN(SimpleFactoryKey); }; #endif // COMPONENTS_KEYED_SERVICE_CORE_SIMPLE_FACTORY_KEY_H_
diff --git a/components/language/content/browser/geo_language_model.h b/components/language/content/browser/geo_language_model.h index 1269be7..8ca3ed4 100644 --- a/components/language/content/browser/geo_language_model.h +++ b/components/language/content/browser/geo_language_model.h
@@ -18,6 +18,10 @@ class GeoLanguageModel : public LanguageModel { public: GeoLanguageModel(const GeoLanguageProvider* const geo_language_provider); + + GeoLanguageModel(const GeoLanguageModel&) = delete; + GeoLanguageModel& operator=(const GeoLanguageModel&) = delete; + ~GeoLanguageModel() override; std::vector<LanguageDetails> GetLanguages() override; @@ -28,8 +32,6 @@ // is injected from the creator of this model to make testing easier by // passing in a mock. const GeoLanguageProvider* const geo_language_provider_; - - DISALLOW_COPY_AND_ASSIGN(GeoLanguageModel); }; } // namespace language
diff --git a/components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h b/components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h index f28a68d0..ac04ff3 100644 --- a/components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h +++ b/components/language/content/browser/ulp_language_code_locator/ulp_language_code_locator.h
@@ -28,6 +28,10 @@ UlpLanguageCodeLocator(std::vector<std::unique_ptr<SerializedLanguageTree>>&& serialized_langtrees, PrefService* prefs); + + UlpLanguageCodeLocator(const UlpLanguageCodeLocator&) = delete; + UlpLanguageCodeLocator& operator=(const UlpLanguageCodeLocator&) = delete; + ~UlpLanguageCodeLocator() override; static void RegisterLocalStatePrefs(PrefRegistrySimple* registry); @@ -39,8 +43,6 @@ private: std::vector<std::unique_ptr<SerializedLanguageTree>> serialized_langtrees_; PrefService* prefs_; - - DISALLOW_COPY_AND_ASSIGN(UlpLanguageCodeLocator); }; } // namespace language
diff --git a/components/language/core/browser/language_prefs.h b/components/language/core/browser/language_prefs.h index 3cdafa9..6deda87 100644 --- a/components/language/core/browser/language_prefs.h +++ b/components/language/core/browser/language_prefs.h
@@ -34,6 +34,10 @@ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); explicit LanguagePrefs(PrefService* user_prefs); + + LanguagePrefs(const LanguagePrefs&) = delete; + LanguagePrefs& operator=(const LanguagePrefs&) = delete; + ~LanguagePrefs(); // Gets the language settings list containing combination of policy-forced and @@ -69,8 +73,6 @@ PrefService* prefs_; // Weak. PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(LanguagePrefs); }; void ResetLanguagePrefs(PrefService* prefs);
diff --git a/components/language/core/browser/url_language_histogram.h b/components/language/core/browser/url_language_histogram.h index fa5f2be..8703653a 100644 --- a/components/language/core/browser/url_language_histogram.h +++ b/components/language/core/browser/url_language_histogram.h
@@ -46,6 +46,10 @@ }; explicit UrlLanguageHistogram(PrefService* pref_service); + + UrlLanguageHistogram(const UrlLanguageHistogram&) = delete; + UrlLanguageHistogram& operator=(const UrlLanguageHistogram&) = delete; + ~UrlLanguageHistogram() override; // Registers profile prefs for the histogram. @@ -68,8 +72,6 @@ private: PrefService* pref_service_; - - DISALLOW_COPY_AND_ASSIGN(UrlLanguageHistogram); }; } // namespace language
diff --git a/components/language/ios/browser/ios_language_detection_tab_helper.h b/components/language/ios/browser/ios_language_detection_tab_helper.h index b62bdf2..6a168b6 100644 --- a/components/language/ios/browser/ios_language_detection_tab_helper.h +++ b/components/language/ios/browser/ios_language_detection_tab_helper.h
@@ -35,6 +35,10 @@ virtual ~Observer() {} }; + IOSLanguageDetectionTabHelper(const IOSLanguageDetectionTabHelper&) = delete; + IOSLanguageDetectionTabHelper& operator=( + const IOSLanguageDetectionTabHelper&) = delete; + ~IOSLanguageDetectionTabHelper() override; // Adds or Removes observers. @@ -60,8 +64,6 @@ UrlLanguageHistogram* const url_language_histogram_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(IOSLanguageDetectionTabHelper); }; } // namespace language
diff --git a/components/language/ios/browser/ios_language_detection_tab_helper_observer_bridge.h b/components/language/ios/browser/ios_language_detection_tab_helper_observer_bridge.h index 55e24f89..d2519f3 100644 --- a/components/language/ios/browser/ios_language_detection_tab_helper_observer_bridge.h +++ b/components/language/ios/browser/ios_language_detection_tab_helper_observer_bridge.h
@@ -30,6 +30,12 @@ IOSLanguageDetectionTabHelperObserverBridge( IOSLanguageDetectionTabHelper* tab_helper, id<IOSLanguageDetectionTabHelperObserving> owner); + + IOSLanguageDetectionTabHelperObserverBridge( + const IOSLanguageDetectionTabHelperObserverBridge&) = delete; + IOSLanguageDetectionTabHelperObserverBridge& operator=( + const IOSLanguageDetectionTabHelperObserverBridge&) = delete; + ~IOSLanguageDetectionTabHelperObserverBridge() override; // IOSLanguageDetectionTabHelper::Observer. @@ -41,8 +47,6 @@ private: IOSLanguageDetectionTabHelper* tab_helper_ = nullptr; __weak id<IOSLanguageDetectionTabHelperObserving> owner_; - - DISALLOW_COPY_AND_ASSIGN(IOSLanguageDetectionTabHelperObserverBridge); }; } // namespace language
diff --git a/components/leveldb_proto/internal/leveldb_database.h b/components/leveldb_proto/internal/leveldb_database.h index c1e202b3..f708e89 100644 --- a/components/leveldb_proto/internal/leveldb_database.h +++ b/components/leveldb_proto/internal/leveldb_database.h
@@ -46,6 +46,10 @@ // for UMA statics as so: LevelDB.<value>.<client name>. It is best to not // change once shipped. explicit LevelDB(const char* client_name); + + LevelDB(const LevelDB&) = delete; + LevelDB& operator=(const LevelDB&) = delete; + virtual ~LevelDB(); // Initializes a leveldb with the given options. If |database_dir| is @@ -136,8 +140,6 @@ base::FilePath database_dir_; leveldb_env::Options open_options_; base::HistogramBase* approx_memtable_mem_histogram_; - - DISALLOW_COPY_AND_ASSIGN(LevelDB); }; } // namespace leveldb_proto
diff --git a/components/leveldb_proto/internal/proto_database_impl_unittest.cc b/components/leveldb_proto/internal/proto_database_impl_unittest.cc index b02aa9c..7cee807 100644 --- a/components/leveldb_proto/internal/proto_database_impl_unittest.cc +++ b/components/leveldb_proto/internal/proto_database_impl_unittest.cc
@@ -33,6 +33,10 @@ id_ = std::move(other.id_); data_ = std::move(other.data_); } + + ClientStruct(const ClientStruct&) = delete; + ClientStruct& operator=(const ClientStruct&) = delete; + ~ClientStruct() = default; // The methods below are convenience methods to have a similar API as protocol @@ -43,9 +47,6 @@ std::string id_; std::string data_; - - private: - DISALLOW_COPY_AND_ASSIGN(ClientStruct); }; void CreateData(const std::string& key,
diff --git a/components/leveldb_proto/internal/proto_leveldb_wrapper.h b/components/leveldb_proto/internal/proto_leveldb_wrapper.h index caeda8d..9aea4ea3 100644 --- a/components/leveldb_proto/internal/proto_leveldb_wrapper.h +++ b/components/leveldb_proto/internal/proto_leveldb_wrapper.h
@@ -56,6 +56,9 @@ const scoped_refptr<base::SequencedTaskRunner>& task_runner, LevelDB* db); + ProtoLevelDBWrapper(const ProtoLevelDBWrapper&) = delete; + ProtoLevelDBWrapper& operator=(const ProtoLevelDBWrapper&) = delete; + virtual ~ProtoLevelDBWrapper(); void UpdateEntries(std::unique_ptr<KeyValueVector> entries_to_save, @@ -156,8 +159,6 @@ std::string metrics_id_ = "Default"; base::WeakPtrFactory<ProtoLevelDBWrapper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProtoLevelDBWrapper); }; } // namespace leveldb_proto
diff --git a/components/leveldb_proto/internal/shared_proto_database_client.h b/components/leveldb_proto/internal/shared_proto_database_client.h index 82201dc..29b29edb 100644 --- a/components/leveldb_proto/internal/shared_proto_database_client.h +++ b/components/leveldb_proto/internal/shared_proto_database_client.h
@@ -73,6 +73,10 @@ // with a |LAST| to mark the end of list. static void SetObsoleteClientListForTesting(const ProtoDbType* list); + SharedProtoDatabaseClient(const SharedProtoDatabaseClient&) = delete; + SharedProtoDatabaseClient& operator=(const SharedProtoDatabaseClient&) = + delete; + ~SharedProtoDatabaseClient() override; void Init(const std::string& client_uma_name, @@ -191,8 +195,6 @@ scoped_refptr<SharedProtoDatabase> parent_db_; base::WeakPtrFactory<SharedProtoDatabaseClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SharedProtoDatabaseClient); }; } // namespace leveldb_proto
diff --git a/components/leveldb_proto/public/proto_database_provider.h b/components/leveldb_proto/public/proto_database_provider.h index 8036009..2b7ecd9 100644 --- a/components/leveldb_proto/public/proto_database_provider.h +++ b/components/leveldb_proto/public/proto_database_provider.h
@@ -61,6 +61,9 @@ const base::FilePath& unique_db_dir, const scoped_refptr<base::SequencedTaskRunner>& task_runner); + ProtoDatabaseProvider(const ProtoDatabaseProvider&) = delete; + ProtoDatabaseProvider& operator=(const ProtoDatabaseProvider&) = delete; + virtual ~ProtoDatabaseProvider(); // This method is thread safe. @@ -87,8 +90,6 @@ scoped_refptr<base::SequencedTaskRunner> client_task_runner_; base::WeakPtrFactory<ProtoDatabaseProvider> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProtoDatabaseProvider); }; template <typename P, typename T>
diff --git a/components/location/android/location_settings_impl.h b/components/location/android/location_settings_impl.h index bc85b03..7d7c919 100644 --- a/components/location/android/location_settings_impl.h +++ b/components/location/android/location_settings_impl.h
@@ -13,6 +13,10 @@ class LocationSettingsImpl : public LocationSettings { public: LocationSettingsImpl(); + + LocationSettingsImpl(const LocationSettingsImpl&) = delete; + LocationSettingsImpl& operator=(const LocationSettingsImpl&) = delete; + ~LocationSettingsImpl() override; // LocationSettings implementation: @@ -25,9 +29,6 @@ const LocationSettingsDialogContext prompt_context, ui::WindowAndroid* window, LocationSettingsDialogOutcomeCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(LocationSettingsImpl); }; #endif // COMPONENTS_LOCATION_ANDROID_LOCATION_SETTINGS_IMPL_H_
diff --git a/components/location/android/mock_location_settings.h b/components/location/android/mock_location_settings.h index 03b00e94..c2aebbd 100644 --- a/components/location/android/mock_location_settings.h +++ b/components/location/android/mock_location_settings.h
@@ -14,6 +14,10 @@ class MockLocationSettings : public LocationSettings { public: MockLocationSettings(); + + MockLocationSettings(const MockLocationSettings&) = delete; + MockLocationSettings& operator=(const MockLocationSettings&) = delete; + ~MockLocationSettings() override; static void SetLocationStatus(bool has_android_location_permission, @@ -38,8 +42,6 @@ const LocationSettingsDialogContext prompt_context, ui::WindowAndroid* window, LocationSettingsDialogOutcomeCallback callback) override; - - DISALLOW_COPY_AND_ASSIGN(MockLocationSettings); }; #endif // COMPONENTS_LOCATION_ANDROID_MOCK_LOCATION_SETTINGS_H_
diff --git a/components/media_message_center/media_controls_progress_view_unittest.cc b/components/media_message_center/media_controls_progress_view_unittest.cc index fc0c538..3379ef36 100644 --- a/components/media_message_center/media_controls_progress_view_unittest.cc +++ b/components/media_message_center/media_controls_progress_view_unittest.cc
@@ -22,6 +22,11 @@ MediaControlsProgressViewTest() : views::ViewsTestBase( base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} + + MediaControlsProgressViewTest(const MediaControlsProgressViewTest&) = delete; + MediaControlsProgressViewTest& operator=( + const MediaControlsProgressViewTest&) = delete; + ~MediaControlsProgressViewTest() override = default; // ViewsTestBase: @@ -52,8 +57,6 @@ private: views::Widget widget_; - - DISALLOW_COPY_AND_ASSIGN(MediaControlsProgressViewTest); }; // TODO(crbug.com/1009356): many of these tests are failing on TSan builds.
diff --git a/components/media_message_center/media_notification_background_impl.h b/components/media_message_center/media_notification_background_impl.h index c6882dc..fc76a3e5 100644 --- a/components/media_message_center/media_notification_background_impl.h +++ b/components/media_message_center/media_notification_background_impl.h
@@ -31,6 +31,12 @@ MediaNotificationBackgroundImpl(int top_radius, int bottom_radius, double artwork_max_width_pct); + + MediaNotificationBackgroundImpl(const MediaNotificationBackgroundImpl&) = + delete; + MediaNotificationBackgroundImpl& operator=( + const MediaNotificationBackgroundImpl&) = delete; + ~MediaNotificationBackgroundImpl() override; // views::Background @@ -76,8 +82,6 @@ absl::optional<SkColor> background_color_; absl::optional<SkColor> foreground_color_; - - DISALLOW_COPY_AND_ASSIGN(MediaNotificationBackgroundImpl); }; } // namespace media_message_center
diff --git a/components/media_message_center/media_notification_background_impl_unittest.cc b/components/media_message_center/media_notification_background_impl_unittest.cc index c303d0d7..2f05bc2b 100644 --- a/components/media_message_center/media_notification_background_impl_unittest.cc +++ b/components/media_message_center/media_notification_background_impl_unittest.cc
@@ -91,6 +91,12 @@ class MediaNotificationBackgroundImplTest : public views::ViewsTestBase { public: MediaNotificationBackgroundImplTest() = default; + + MediaNotificationBackgroundImplTest( + const MediaNotificationBackgroundImplTest&) = delete; + MediaNotificationBackgroundImplTest& operator=( + const MediaNotificationBackgroundImplTest&) = delete; + ~MediaNotificationBackgroundImplTest() override = default; void SetUp() override { @@ -123,8 +129,6 @@ private: std::unique_ptr<MediaNotificationBackgroundImpl> background_; - - DISALLOW_COPY_AND_ASSIGN(MediaNotificationBackgroundImplTest); }; // If we have no artwork then we should use the default background color.
diff --git a/components/media_router/browser/android/flinging_controller_bridge.h b/components/media_router/browser/android/flinging_controller_bridge.h index 958a5f9..1542b076 100644 --- a/components/media_router/browser/android/flinging_controller_bridge.h +++ b/components/media_router/browser/android/flinging_controller_bridge.h
@@ -18,6 +18,10 @@ public: explicit FlingingControllerBridge( base::android::ScopedJavaGlobalRef<jobject> controller); + + FlingingControllerBridge(const FlingingControllerBridge&) = delete; + FlingingControllerBridge& operator=(const FlingingControllerBridge&) = delete; + ~FlingingControllerBridge() override; // FlingingController implementation. @@ -47,8 +51,6 @@ // NOTE: We don't manage a collection of observers because FlingingRenderer is // the only observer that subscribes to |this|, with a 1:1 relationship. media::MediaStatusObserver* observer_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FlingingControllerBridge); }; } // namespace media_router
diff --git a/components/media_router/browser/android/media_router_android.h b/components/media_router/browser/android/media_router_android.h index 73f97ef..497a4c2 100644 --- a/components/media_router/browser/android/media_router_android.h +++ b/components/media_router/browser/android/media_router_android.h
@@ -25,6 +25,10 @@ class MediaRouterAndroid : public MediaRouterBase { public: MediaRouterAndroid(); + + MediaRouterAndroid(const MediaRouterAndroid&) = delete; + MediaRouterAndroid& operator=(const MediaRouterAndroid&) = delete; + ~MediaRouterAndroid() override; const MediaRoute* FindRouteBySource(const MediaSource::Id& source_id) const; @@ -101,6 +105,11 @@ PresentationConnectionProxy(MediaRouterAndroid* media_router_android, const MediaRoute::Id& route_id); + + PresentationConnectionProxy(const PresentationConnectionProxy&) = delete; + PresentationConnectionProxy& operator=(const PresentationConnectionProxy&) = + delete; + ~PresentationConnectionProxy() override; // Initializes the connection binding and interface request and returns that @@ -130,8 +139,6 @@ // |media_router_android_| owns |this|, so it will outlive |this|. MediaRouterAndroid* media_router_android_; MediaRoute::Id route_id_; - - DISALLOW_COPY_AND_ASSIGN(PresentationConnectionProxy); }; // Removes the route with the given id from |active_routes_| and updates the @@ -189,8 +196,6 @@ std::unordered_map<MediaRoute::Id, std::vector<std::unique_ptr<PresentationConnectionProxy>>> presentation_connections_; - - DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroid); }; } // namespace media_router
diff --git a/components/media_router/browser/android/media_router_android_bridge.h b/components/media_router/browser/android/media_router_android_bridge.h index bc02e596..7b59a240 100644 --- a/components/media_router/browser/android/media_router_android_bridge.h +++ b/components/media_router/browser/android/media_router_android_bridge.h
@@ -25,6 +25,10 @@ class MediaRouterAndroidBridge { public: explicit MediaRouterAndroidBridge(MediaRouterAndroid* router); + + MediaRouterAndroidBridge(const MediaRouterAndroidBridge&) = delete; + MediaRouterAndroidBridge& operator=(const MediaRouterAndroidBridge&) = delete; + virtual ~MediaRouterAndroidBridge(); // Implement the corresponding calls for the MediaRouterAndroid class. @@ -86,8 +90,6 @@ private: MediaRouterAndroid* native_media_router_; base::android::ScopedJavaGlobalRef<jobject> java_media_router_; - - DISALLOW_COPY_AND_ASSIGN(MediaRouterAndroidBridge); }; } // namespace media_router
diff --git a/components/media_router/browser/android/media_router_dialog_controller_android.h b/components/media_router/browser/android/media_router_dialog_controller_android.h index 1f34b057..4121a3b 100644 --- a/components/media_router/browser/android/media_router_dialog_controller_android.h +++ b/components/media_router/browser/android/media_router_dialog_controller_android.h
@@ -17,6 +17,11 @@ : public content::WebContentsUserData<MediaRouterDialogControllerAndroid>, public MediaRouterDialogController { public: + MediaRouterDialogControllerAndroid( + const MediaRouterDialogControllerAndroid&) = delete; + MediaRouterDialogControllerAndroid& operator=( + const MediaRouterDialogControllerAndroid&) = delete; + ~MediaRouterDialogControllerAndroid() override; // The methods called by the Java counterpart. @@ -61,8 +66,6 @@ base::android::ScopedJavaGlobalRef<jobject> java_dialog_controller_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogControllerAndroid); }; } // namespace media_router
diff --git a/components/media_router/browser/issue_manager.h b/components/media_router/browser/issue_manager.h index bd3143f..132bbf70 100644 --- a/components/media_router/browser/issue_manager.h +++ b/components/media_router/browser/issue_manager.h
@@ -27,6 +27,10 @@ class IssueManager { public: IssueManager(); + + IssueManager(const IssueManager&) = delete; + IssueManager& operator=(const IssueManager&) = delete; + ~IssueManager(); // Returns the amount of time before |issue_info| is dismissed after it is @@ -105,8 +109,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(IssueManager); }; } // namespace media_router
diff --git a/components/media_router/browser/issues_observer.h b/components/media_router/browser/issues_observer.h index 1f8e7c6..e71d79a 100644 --- a/components/media_router/browser/issues_observer.h +++ b/components/media_router/browser/issues_observer.h
@@ -18,6 +18,10 @@ class IssuesObserver { public: explicit IssuesObserver(IssueManager* issue_manager); + + IssuesObserver(const IssuesObserver&) = delete; + IssuesObserver& operator=(const IssuesObserver&) = delete; + virtual ~IssuesObserver(); // Registers with |issue_manager_| to start observing for Issues. No-ops if @@ -36,8 +40,6 @@ private: IssueManager* const issue_manager_; bool initialized_; - - DISALLOW_COPY_AND_ASSIGN(IssuesObserver); }; } // namespace media_router
diff --git a/components/media_router/browser/media_router_base.cc b/components/media_router/browser/media_router_base.cc index b449e20..a96dc1f 100644 --- a/components/media_router/browser/media_router_base.cc +++ b/components/media_router/browser/media_router_base.cc
@@ -21,6 +21,11 @@ public: explicit InternalMediaRoutesObserver(MediaRouter* router) : MediaRoutesObserver(router), has_route(false) {} + + InternalMediaRoutesObserver(const InternalMediaRoutesObserver&) = delete; + InternalMediaRoutesObserver& operator=(const InternalMediaRoutesObserver&) = + delete; + ~InternalMediaRoutesObserver() override {} // MediaRoutesObserver @@ -41,9 +46,6 @@ bool has_route; std::vector<MediaRoute> current_routes; std::vector<MediaRoute::Id> off_the_record_route_ids; - - private: - DISALLOW_COPY_AND_ASSIGN(InternalMediaRoutesObserver); }; MediaRouterBase::~MediaRouterBase() {
diff --git a/components/media_router/browser/media_router_base.h b/components/media_router/browser/media_router_base.h index ce5f661b..7560e62b 100644 --- a/components/media_router/browser/media_router_base.h +++ b/components/media_router/browser/media_router_base.h
@@ -29,6 +29,9 @@ class MediaRouterBase : public MediaRouter { public: + MediaRouterBase(const MediaRouterBase&) = delete; + MediaRouterBase& operator=(const MediaRouterBase&) = delete; + ~MediaRouterBase() override; // Must be called before invoking any other method. @@ -115,8 +118,6 @@ std::unique_ptr<InternalMediaRoutesObserver> internal_routes_observer_; bool initialized_; - - DISALLOW_COPY_AND_ASSIGN(MediaRouterBase); }; } // namespace media_router
diff --git a/components/media_router/browser/media_router_dialog_controller.h b/components/media_router/browser/media_router_dialog_controller.h index ac6880fc..2d3135e8b 100644 --- a/components/media_router/browser/media_router_dialog_controller.h +++ b/components/media_router/browser/media_router_dialog_controller.h
@@ -29,6 +29,10 @@ // This class is not thread safe and must be called on the UI thread. class MediaRouterDialogController { public: + MediaRouterDialogController(const MediaRouterDialogController&) = delete; + MediaRouterDialogController& operator=(const MediaRouterDialogController&) = + delete; + virtual ~MediaRouterDialogController(); using GetOrCreate = base::RepeatingCallback<MediaRouterDialogController*( @@ -100,8 +104,6 @@ // is destroyed or navigated. std::unique_ptr<InitiatorWebContentsObserver> initiator_observer_; content::WebContents* const initiator_; - - DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogController); }; } // namespace media_router
diff --git a/components/media_router/browser/media_routes_observer.h b/components/media_router/browser/media_routes_observer.h index e47a7c1a..b5ff7d3a 100644 --- a/components/media_router/browser/media_routes_observer.h +++ b/components/media_router/browser/media_routes_observer.h
@@ -25,6 +25,10 @@ explicit MediaRoutesObserver(MediaRouter* router) : MediaRoutesObserver(router, MediaSource::Id()) {} MediaRoutesObserver(MediaRouter* router, const MediaSource::Id& source_id); + + MediaRoutesObserver(const MediaRoutesObserver&) = delete; + MediaRoutesObserver& operator=(const MediaRoutesObserver&) = delete; + virtual ~MediaRoutesObserver(); // Invoked when the list of routes and their associated sinks have been @@ -44,8 +48,6 @@ private: MediaRouter* const router_; const MediaSource::Id source_id_; - - DISALLOW_COPY_AND_ASSIGN(MediaRoutesObserver); }; } // namespace media_router
diff --git a/components/media_router/browser/media_sinks_observer.h b/components/media_router/browser/media_sinks_observer.h index f52d9837..7f90e407 100644 --- a/components/media_router/browser/media_sinks_observer.h +++ b/components/media_router/browser/media_sinks_observer.h
@@ -35,6 +35,10 @@ // source, so the returned sink list may be incomplete. // TODO(crbug.com/929937): Fix this. explicit MediaSinksObserver(MediaRouter* router); + + MediaSinksObserver(const MediaSinksObserver&) = delete; + MediaSinksObserver& operator=(const MediaSinksObserver&) = delete; + virtual ~MediaSinksObserver(); // Registers with MediaRouter to start observing. Must be called before the @@ -70,8 +74,6 @@ #if DCHECK_IS_ON() bool in_on_sinks_updated_ = false; #endif - - DISALLOW_COPY_AND_ASSIGN(MediaSinksObserver); }; } // namespace media_router
diff --git a/components/media_router/browser/presentation/local_presentation_manager.h b/components/media_router/browser/presentation/local_presentation_manager.h index 9af75128..af12735 100644 --- a/components/media_router/browser/presentation/local_presentation_manager.h +++ b/components/media_router/browser/presentation/local_presentation_manager.h
@@ -110,6 +110,9 @@ // thread. class LocalPresentationManager : public KeyedService { public: + LocalPresentationManager(const LocalPresentationManager&) = delete; + LocalPresentationManager& operator=(const LocalPresentationManager&) = delete; + ~LocalPresentationManager() override; // Registers controller PresentationConnectionPtr to presentation with @@ -170,6 +173,10 @@ public: explicit LocalPresentation( const blink::mojom::PresentationInfo& presentation_info); + + LocalPresentation(const LocalPresentation&) = delete; + LocalPresentation& operator=(const LocalPresentation&) = delete; + ~LocalPresentation(); // Register controller with |render_frame_id|. If |receiver_callback_| has @@ -240,8 +247,6 @@ std::unique_ptr<ControllerConnection>, content::GlobalRenderFrameHostIdHasher> pending_controllers_; - - DISALLOW_COPY_AND_ASSIGN(LocalPresentation); }; private: @@ -265,8 +270,6 @@ LocalPresentationMap local_presentations_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(LocalPresentationManager); }; } // namespace media_router
diff --git a/components/media_router/browser/presentation/presentation_media_sinks_observer.h b/components/media_router/browser/presentation/presentation_media_sinks_observer.h index 85fd0cb..b326e23 100644 --- a/components/media_router/browser/presentation/presentation_media_sinks_observer.h +++ b/components/media_router/browser/presentation/presentation_media_sinks_observer.h
@@ -37,6 +37,12 @@ content::PresentationScreenAvailabilityListener* listener, const MediaSource& source, const url::Origin& origin); + + PresentationMediaSinksObserver(const PresentationMediaSinksObserver&) = + delete; + PresentationMediaSinksObserver& operator=( + const PresentationMediaSinksObserver&) = delete; + ~PresentationMediaSinksObserver() override; // MediaSinksObserver implementation. @@ -49,8 +55,6 @@ private: content::PresentationScreenAvailabilityListener* listener_; blink::mojom::ScreenAvailability previous_availability_; - - DISALLOW_COPY_AND_ASSIGN(PresentationMediaSinksObserver); }; } // namespace media_router
diff --git a/components/media_router/browser/presentation/presentation_media_sinks_observer_unittest.cc b/components/media_router/browser/presentation/presentation_media_sinks_observer_unittest.cc index 88dea652..8f5d3cfe 100644 --- a/components/media_router/browser/presentation/presentation_media_sinks_observer_unittest.cc +++ b/components/media_router/browser/presentation/presentation_media_sinks_observer_unittest.cc
@@ -29,6 +29,12 @@ public: PresentationMediaSinksObserverTest() : listener_(GURL("http://example.com/presentation.html")) {} + + PresentationMediaSinksObserverTest( + const PresentationMediaSinksObserverTest&) = delete; + PresentationMediaSinksObserverTest& operator=( + const PresentationMediaSinksObserverTest&) = delete; + ~PresentationMediaSinksObserverTest() override {} void SetUp() override { @@ -53,9 +59,6 @@ MockMediaRouter router_; MockScreenAvailabilityListener listener_; std::unique_ptr<PresentationMediaSinksObserver> observer_; - - private: - DISALLOW_COPY_AND_ASSIGN(PresentationMediaSinksObserverTest); }; TEST_F(PresentationMediaSinksObserverTest, AvailableScreens) {
diff --git a/components/media_router/browser/presentation/presentation_service_delegate_impl.h b/components/media_router/browser/presentation/presentation_service_delegate_impl.h index b7d7f0bb..92023ff 100644 --- a/components/media_router/browser/presentation/presentation_service_delegate_impl.h +++ b/components/media_router/browser/presentation/presentation_service_delegate_impl.h
@@ -63,6 +63,11 @@ static PresentationServiceDelegateImpl* GetOrCreateForWebContents( content::WebContents* web_contents); + PresentationServiceDelegateImpl(const PresentationServiceDelegateImpl&) = + delete; + PresentationServiceDelegateImpl& operator=( + const PresentationServiceDelegateImpl&) = delete; + ~PresentationServiceDelegateImpl() override; // content::PresentationServiceDelegate implementation. @@ -261,8 +266,6 @@ base::WeakPtrFactory<PresentationServiceDelegateImpl> weak_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PresentationServiceDelegateImpl); }; } // namespace media_router
diff --git a/components/media_router/browser/route_message_observer.h b/components/media_router/browser/route_message_observer.h index 675b503..14bc234 100644 --- a/components/media_router/browser/route_message_observer.h +++ b/components/media_router/browser/route_message_observer.h
@@ -25,6 +25,9 @@ // |route_id|: ID of MediaRoute to listen for messages. RouteMessageObserver(MediaRouter* router, const MediaRoute::Id& route_id); + RouteMessageObserver(const RouteMessageObserver&) = delete; + RouteMessageObserver& operator=(const RouteMessageObserver&) = delete; + virtual ~RouteMessageObserver(); // Invoked by |router_| whenever messages are received from the route sink. @@ -37,8 +40,6 @@ private: MediaRouter* const router_; const MediaRoute::Id route_id_; - - DISALLOW_COPY_AND_ASSIGN(RouteMessageObserver); }; } // namespace media_router
diff --git a/components/media_router/common/discovery/media_sink_service_base.h b/components/media_router/common/discovery/media_sink_service_base.h index 3ce00d6..5512197d 100644 --- a/components/media_router/common/discovery/media_sink_service_base.h +++ b/components/media_router/common/discovery/media_sink_service_base.h
@@ -53,6 +53,10 @@ // |callback|: Callback to inform the MediaRouter extension of discovered // sinks updates. Other uses should implement Observer::OnSinksDiscovered(). explicit MediaSinkServiceBase(const OnSinksDiscoveredCallback& callback); + + MediaSinkServiceBase(const MediaSinkServiceBase&) = delete; + MediaSinkServiceBase& operator=(const MediaSinkServiceBase&) = delete; + virtual ~MediaSinkServiceBase(); // Adds |observer| to observe |this| for sink updates. @@ -127,7 +131,6 @@ base::flat_map<MediaSink::Id, MediaSinkInternal> previous_sinks_; SEQUENCE_CHECKER(sequence_checker_); - DISALLOW_COPY_AND_ASSIGN(MediaSinkServiceBase); }; } // namespace media_router
diff --git a/components/media_router/common/discovery/media_sink_service_base_unittest.cc b/components/media_router/common/discovery/media_sink_service_base_unittest.cc index c2b4bc1..6080c89a 100644 --- a/components/media_router/common/discovery/media_sink_service_base_unittest.cc +++ b/components/media_router/common/discovery/media_sink_service_base_unittest.cc
@@ -48,6 +48,10 @@ public: MediaSinkServiceBaseTest() : media_sink_service_(mock_sink_discovered_cb_.Get()) {} + + MediaSinkServiceBaseTest(const MediaSinkServiceBaseTest&) = delete; + MediaSinkServiceBaseTest& operator=(const MediaSinkServiceBaseTest&) = delete; + ~MediaSinkServiceBaseTest() override = default; void PopulateSinks(const std::vector<MediaSinkInternal>& old_sinks, @@ -73,8 +77,6 @@ protected: base::MockCallback<OnSinksDiscoveredCallback> mock_sink_discovered_cb_; TestMediaSinkService media_sink_service_; - - DISALLOW_COPY_AND_ASSIGN(MediaSinkServiceBaseTest); }; TEST_F(MediaSinkServiceBaseTest, TestOnDiscoveryComplete_SameSink) {
diff --git a/components/media_router/common/route_request_result.h b/components/media_router/common/route_request_result.h index e695301..c8ae565 100644 --- a/components/media_router/common/route_request_result.h +++ b/components/media_router/common/route_request_result.h
@@ -63,6 +63,9 @@ const std::string& error, ResultCode result_code); + RouteRequestResult(const RouteRequestResult&) = delete; + RouteRequestResult& operator=(const RouteRequestResult&) = delete; + ~RouteRequestResult(); // Note the caller does not own the returned MediaRoute. The caller must @@ -79,8 +82,6 @@ GURL presentation_url_; std::string error_; ResultCode result_code_; - - DISALLOW_COPY_AND_ASSIGN(RouteRequestResult); }; } // namespace media_router
diff --git a/components/media_router/common/test/test_helper.h b/components/media_router/common/test/test_helper.h index 58254e4..234daae2 100644 --- a/components/media_router/common/test/test_helper.h +++ b/components/media_router/common/test/test_helper.h
@@ -24,6 +24,10 @@ public: TestMediaSinkService(); explicit TestMediaSinkService(const OnSinksDiscoveredCallback& callback); + + TestMediaSinkService(const TestMediaSinkService&) = delete; + TestMediaSinkService& operator=(const TestMediaSinkService&) = delete; + ~TestMediaSinkService() override; base::MockOneShotTimer* timer() { return timer_; } @@ -31,7 +35,6 @@ private: // Owned by MediaSinkService. base::MockOneShotTimer* timer_; - DISALLOW_COPY_AND_ASSIGN(TestMediaSinkService); }; #endif // !defined(OS_ANDROID)
diff --git a/components/metrics/android_metrics_provider.h b/components/metrics/android_metrics_provider.h index 922660d6..59269cfd 100644 --- a/components/metrics/android_metrics_provider.h +++ b/components/metrics/android_metrics_provider.h
@@ -16,6 +16,10 @@ class AndroidMetricsProvider : public metrics::MetricsProvider { public: AndroidMetricsProvider(); + + AndroidMetricsProvider(const AndroidMetricsProvider&) = delete; + AndroidMetricsProvider& operator=(const AndroidMetricsProvider&) = delete; + ~AndroidMetricsProvider() override; // metrics::MetricsProvider: @@ -23,9 +27,6 @@ metrics::ChromeUserMetricsExtension* uma_proto) override; void ProvideCurrentSessionData( metrics::ChromeUserMetricsExtension* uma_proto) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AndroidMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/call_stack_profile_builder.h b/components/metrics/call_stack_profile_builder.h index 569ed3e..fb1f2438 100644 --- a/components/metrics/call_stack_profile_builder.h +++ b/components/metrics/call_stack_profile_builder.h
@@ -61,6 +61,9 @@ const WorkIdRecorder* work_id_recorder = nullptr, base::OnceClosure completed_callback = base::OnceClosure()); + CallStackProfileBuilder(const CallStackProfileBuilder&) = delete; + CallStackProfileBuilder& operator=(const CallStackProfileBuilder&) = delete; + ~CallStackProfileBuilder() override; // Both weight and count are used by the heap profiler only. @@ -139,8 +142,6 @@ // Maintains the current metadata to apply to samples. CallStackProfileMetadata metadata_; - - DISALLOW_COPY_AND_ASSIGN(CallStackProfileBuilder); }; } // namespace metrics
diff --git a/components/metrics/call_stack_profile_collector.h b/components/metrics/call_stack_profile_collector.h index 7021f4d..920dc84 100644 --- a/components/metrics/call_stack_profile_collector.h +++ b/components/metrics/call_stack_profile_collector.h
@@ -14,6 +14,11 @@ class CallStackProfileCollector : public mojom::CallStackProfileCollector { public: CallStackProfileCollector(); + + CallStackProfileCollector(const CallStackProfileCollector&) = delete; + CallStackProfileCollector& operator=(const CallStackProfileCollector&) = + delete; + ~CallStackProfileCollector() override; // Create a collector to receive profiles from |expected_process|. @@ -23,9 +28,6 @@ // mojom::CallStackProfileCollector: void Collect(base::TimeTicks start_timestamp, mojom::SampledProfilePtr profile) override; - - private: - DISALLOW_COPY_AND_ASSIGN(CallStackProfileCollector); }; } // namespace metrics
diff --git a/components/metrics/call_stack_profile_metrics_provider.h b/components/metrics/call_stack_profile_metrics_provider.h index 22e00c6..085fe45 100644 --- a/components/metrics/call_stack_profile_metrics_provider.h +++ b/components/metrics/call_stack_profile_metrics_provider.h
@@ -27,6 +27,12 @@ base::RepeatingCallback<void(SampledProfile profile)>; CallStackProfileMetricsProvider(); + + CallStackProfileMetricsProvider(const CallStackProfileMetricsProvider&) = + delete; + CallStackProfileMetricsProvider& operator=( + const CallStackProfileMetricsProvider&) = delete; + ~CallStackProfileMetricsProvider() override; // Receives SampledProfile protobuf instances. May be called on any thread. @@ -63,9 +69,6 @@ // Reset the static state to the defaults after startup. static void ResetStaticStateForTesting(); - - private: - DISALLOW_COPY_AND_ASSIGN(CallStackProfileMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/child_call_stack_profile_collector.h b/components/metrics/child_call_stack_profile_collector.h index b082b1cb..5bca044 100644 --- a/components/metrics/child_call_stack_profile_collector.h +++ b/components/metrics/child_call_stack_profile_collector.h
@@ -53,6 +53,12 @@ class ChildCallStackProfileCollector { public: ChildCallStackProfileCollector(); + + ChildCallStackProfileCollector(const ChildCallStackProfileCollector&) = + delete; + ChildCallStackProfileCollector& operator=( + const ChildCallStackProfileCollector&) = delete; + ~ChildCallStackProfileCollector(); // Sets the CallStackProfileCollector interface from |parent_collector|. This @@ -114,8 +120,6 @@ // Profiles being cached by this object, pending a parent interface to be // supplied. std::vector<ProfileState> profiles_; - - DISALLOW_COPY_AND_ASSIGN(ChildCallStackProfileCollector); }; } // namespace metrics
diff --git a/components/metrics/child_call_stack_profile_collector_unittest.cc b/components/metrics/child_call_stack_profile_collector_unittest.cc index 30bdd1e..8e32791e 100644 --- a/components/metrics/child_call_stack_profile_collector_unittest.cc +++ b/components/metrics/child_call_stack_profile_collector_unittest.cc
@@ -25,6 +25,10 @@ explicit Receiver( mojo::PendingReceiver<mojom::CallStackProfileCollector> receiver) : receiver_(this, std::move(receiver)) {} + + Receiver(const Receiver&) = delete; + Receiver& operator=(const Receiver&) = delete; + ~Receiver() override {} void Collect(base::TimeTicks start_timestamp, @@ -36,8 +40,6 @@ private: mojo::Receiver<mojom::CallStackProfileCollector> receiver_; - - DISALLOW_COPY_AND_ASSIGN(Receiver); }; ChildCallStackProfileCollectorTest()
diff --git a/components/metrics/cloned_install_detector.h b/components/metrics/cloned_install_detector.h index 3d744ab..8818f91 100644 --- a/components/metrics/cloned_install_detector.h +++ b/components/metrics/cloned_install_detector.h
@@ -27,6 +27,10 @@ class ClonedInstallDetector { public: ClonedInstallDetector(); + + ClonedInstallDetector(const ClonedInstallDetector&) = delete; + ClonedInstallDetector& operator=(const ClonedInstallDetector&) = delete; + virtual ~ClonedInstallDetector(); // Posts a task to |task_runner| to generate a machine ID and store it to a @@ -77,8 +81,6 @@ bool should_reset_client_ids_ = false; base::WeakPtrFactory<ClonedInstallDetector> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ClonedInstallDetector); }; } // namespace metrics
diff --git a/components/metrics/component_metrics_provider.h b/components/metrics/component_metrics_provider.h index f1804922..4671deaf 100644 --- a/components/metrics/component_metrics_provider.h +++ b/components/metrics/component_metrics_provider.h
@@ -33,6 +33,10 @@ explicit ComponentMetricsProvider( std::unique_ptr<ComponentMetricsProviderDelegate> components_info_delegate); + + ComponentMetricsProvider(const ComponentMetricsProvider&) = delete; + ComponentMetricsProvider& operator=(const ComponentMetricsProvider&) = delete; + ~ComponentMetricsProvider() override; // MetricsProvider: @@ -41,8 +45,6 @@ private: std::unique_ptr<ComponentMetricsProviderDelegate> components_info_delegate_; - - DISALLOW_COPY_AND_ASSIGN(ComponentMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/component_metrics_provider_unittest.cc b/components/metrics/component_metrics_provider_unittest.cc index 0780993..ea8c5107 100644 --- a/components/metrics/component_metrics_provider_unittest.cc +++ b/components/metrics/component_metrics_provider_unittest.cc
@@ -34,10 +34,12 @@ class ComponentMetricsProviderTest : public testing::Test { public: ComponentMetricsProviderTest() {} - ~ComponentMetricsProviderTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(ComponentMetricsProviderTest); + ComponentMetricsProviderTest(const ComponentMetricsProviderTest&) = delete; + ComponentMetricsProviderTest& operator=(const ComponentMetricsProviderTest&) = + delete; + + ~ComponentMetricsProviderTest() override {} }; TEST_F(ComponentMetricsProviderTest, ProvideComponentMetrics) {
diff --git a/components/metrics/content/accessibility_metrics_provider.h b/components/metrics/content/accessibility_metrics_provider.h index f239606..99a29946 100644 --- a/components/metrics/content/accessibility_metrics_provider.h +++ b/components/metrics/content/accessibility_metrics_provider.h
@@ -20,14 +20,16 @@ class AccessibilityMetricsProvider : public metrics::MetricsProvider { public: AccessibilityMetricsProvider(); + + AccessibilityMetricsProvider(const AccessibilityMetricsProvider&) = delete; + AccessibilityMetricsProvider& operator=(const AccessibilityMetricsProvider&) = + delete; + ~AccessibilityMetricsProvider() override; // MetricsProvider: void ProvideCurrentSessionData( metrics::ChromeUserMetricsExtension* uma_proto) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AccessibilityMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/content/gpu_metrics_provider.h b/components/metrics/content/gpu_metrics_provider.h index d429be83..fecaa5d 100644 --- a/components/metrics/content/gpu_metrics_provider.h +++ b/components/metrics/content/gpu_metrics_provider.h
@@ -14,14 +14,15 @@ class GPUMetricsProvider : public MetricsProvider { public: GPUMetricsProvider(); + + GPUMetricsProvider(const GPUMetricsProvider&) = delete; + GPUMetricsProvider& operator=(const GPUMetricsProvider&) = delete; + ~GPUMetricsProvider() override; // MetricsProvider: void ProvideSystemProfileMetrics( SystemProfileProto* system_profile_proto) override; - - private: - DISALLOW_COPY_AND_ASSIGN(GPUMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/content/rendering_perf_metrics_provider.h b/components/metrics/content/rendering_perf_metrics_provider.h index 90ac73b..850d33c 100644 --- a/components/metrics/content/rendering_perf_metrics_provider.h +++ b/components/metrics/content/rendering_perf_metrics_provider.h
@@ -15,14 +15,16 @@ class RenderingPerfMetricsProvider : public MetricsProvider { public: RenderingPerfMetricsProvider(); + + RenderingPerfMetricsProvider(const RenderingPerfMetricsProvider&) = delete; + RenderingPerfMetricsProvider& operator=(const RenderingPerfMetricsProvider&) = + delete; + ~RenderingPerfMetricsProvider() override; // MetricsProvider: void ProvideCurrentSessionData( metrics::ChromeUserMetricsExtension* uma_proto) override; - - private: - DISALLOW_COPY_AND_ASSIGN(RenderingPerfMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/content/subprocess_metrics_provider.h b/components/metrics/content/subprocess_metrics_provider.h index 199e2961..02c1b3a 100644 --- a/components/metrics/content/subprocess_metrics_provider.h +++ b/components/metrics/content/subprocess_metrics_provider.h
@@ -38,6 +38,11 @@ public content::RenderProcessHostObserver { public: SubprocessMetricsProvider(); + + SubprocessMetricsProvider(const SubprocessMetricsProvider&) = delete; + SubprocessMetricsProvider& operator=(const SubprocessMetricsProvider&) = + delete; + ~SubprocessMetricsProvider() override; // Merge histograms for all subprocesses. This is used by tests that don't @@ -114,8 +119,6 @@ scoped_observations_{this}; base::WeakPtrFactory<SubprocessMetricsProvider> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SubprocessMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/cpu_metrics_provider.h b/components/metrics/cpu_metrics_provider.h index 067822b..c9aea5e 100644 --- a/components/metrics/cpu_metrics_provider.h +++ b/components/metrics/cpu_metrics_provider.h
@@ -16,13 +16,14 @@ class CPUMetricsProvider : public MetricsProvider { public: CPUMetricsProvider(); + + CPUMetricsProvider(const CPUMetricsProvider&) = delete; + CPUMetricsProvider& operator=(const CPUMetricsProvider&) = delete; + ~CPUMetricsProvider() override; void ProvideSystemProfileMetrics( SystemProfileProto* system_profile_proto) override; - - private: - DISALLOW_COPY_AND_ASSIGN(CPUMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/daily_event.h b/components/metrics/daily_event.h index 39f8308..6e89a373 100644 --- a/components/metrics/daily_event.h +++ b/components/metrics/daily_event.h
@@ -40,13 +40,14 @@ class Observer { public: Observer(); + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer(); // Called when the daily event is fired. virtual void OnDailyEvent(IntervalType type) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Observer); }; // Constructs DailyEvent monitor which stores the time it last fired in the @@ -60,6 +61,10 @@ DailyEvent(PrefService* pref_service, const char* pref_name, const std::string& histogram_name); + + DailyEvent(const DailyEvent&) = delete; + DailyEvent& operator=(const DailyEvent&) = delete; + ~DailyEvent(); // Adds a observer to be notified when a day elapses. All observers should @@ -95,8 +100,6 @@ // The time that the daily event was last fired. base::Time last_fired_; - - DISALLOW_COPY_AND_ASSIGN(DailyEvent); }; } // namespace metrics
diff --git a/components/metrics/data_use_tracker.h b/components/metrics/data_use_tracker.h index e6ad4b3..af9c0a02 100644 --- a/components/metrics/data_use_tracker.h +++ b/components/metrics/data_use_tracker.h
@@ -23,6 +23,10 @@ class DataUseTracker { public: explicit DataUseTracker(PrefService* local_state); + + DataUseTracker(const DataUseTracker&) = delete; + DataUseTracker& operator=(const DataUseTracker&) = delete; + virtual ~DataUseTracker(); // Returns an instance of |DataUseTracker| with provided |local_state| if @@ -83,8 +87,6 @@ PrefService* local_state_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(DataUseTracker); }; } // namespace metrics
diff --git a/components/metrics/delegating_provider.h b/components/metrics/delegating_provider.h index d69fc42..6026b943 100644 --- a/components/metrics/delegating_provider.h +++ b/components/metrics/delegating_provider.h
@@ -18,6 +18,10 @@ class DelegatingProvider final : public MetricsProvider { public: DelegatingProvider(); + + DelegatingProvider(const DelegatingProvider&) = delete; + DelegatingProvider& operator=(const DelegatingProvider&) = delete; + ~DelegatingProvider() override; // Registers an additional MetricsProvider to forward calls to. @@ -53,8 +57,6 @@ private: std::vector<std::unique_ptr<MetricsProvider>> metrics_providers_; - - DISALLOW_COPY_AND_ASSIGN(DelegatingProvider); }; } // namespace metrics
diff --git a/components/metrics/demographics/demographic_metrics_provider.h b/components/metrics/demographics/demographic_metrics_provider.h index 58b68d73..52abf6fe 100644 --- a/components/metrics/demographics/demographic_metrics_provider.h +++ b/components/metrics/demographics/demographic_metrics_provider.h
@@ -65,6 +65,11 @@ DemographicMetricsProvider( std::unique_ptr<ProfileClient> profile_client, MetricsLogUploader::MetricServiceType metrics_service_type); + + DemographicMetricsProvider(const DemographicMetricsProvider&) = delete; + DemographicMetricsProvider& operator=(const DemographicMetricsProvider&) = + delete; + ~DemographicMetricsProvider() override; // Provides the synced user's noised birth year and gender to a metrics report @@ -108,8 +113,6 @@ // The type of the metrics service for which to emit the user demographics // status histogram (e.g., UMA). const MetricsLogUploader::MetricServiceType metrics_service_type_; - - DISALLOW_COPY_AND_ASSIGN(DemographicMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/demographics/demographic_metrics_provider_unittest.cc b/components/metrics/demographics/demographic_metrics_provider_unittest.cc index 758eb25a..a6694cdc6 100644 --- a/components/metrics/demographics/demographic_metrics_provider_unittest.cc +++ b/components/metrics/demographics/demographic_metrics_provider_unittest.cc
@@ -40,6 +40,9 @@ // Profile client for testing that gets fake Profile information and services. class TestProfileClient : public DemographicMetricsProvider::ProfileClient { public: + TestProfileClient(const TestProfileClient&) = delete; + TestProfileClient& operator=(const TestProfileClient&) = delete; + ~TestProfileClient() override = default; TestProfileClient(int number_of_profiles, @@ -124,8 +127,6 @@ std::unique_ptr<syncer::TestSyncService> sync_service_; const int number_of_profiles_; base::SimpleTestClock clock_; - - DISALLOW_COPY_AND_ASSIGN(TestProfileClient); }; TEST(DemographicMetricsProviderTest,
diff --git a/components/metrics/drive_metrics_provider.h b/components/metrics/drive_metrics_provider.h index 2c431a2..b5688460 100644 --- a/components/metrics/drive_metrics_provider.h +++ b/components/metrics/drive_metrics_provider.h
@@ -25,6 +25,10 @@ class DriveMetricsProvider : public metrics::MetricsProvider { public: explicit DriveMetricsProvider(int local_state_path_key); + + DriveMetricsProvider(const DriveMetricsProvider&) = delete; + DriveMetricsProvider& operator=(const DriveMetricsProvider&) = delete; + ~DriveMetricsProvider() override; // metrics::MetricsDataProvider: @@ -81,8 +85,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<DriveMetricsProvider> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DriveMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/environment_recorder.h b/components/metrics/environment_recorder.h index 0042d2e..ede0b71 100644 --- a/components/metrics/environment_recorder.h +++ b/components/metrics/environment_recorder.h
@@ -21,6 +21,10 @@ class EnvironmentRecorder { public: explicit EnvironmentRecorder(PrefService* local_state); + + EnvironmentRecorder(const EnvironmentRecorder&) = delete; + EnvironmentRecorder& operator=(const EnvironmentRecorder&) = delete; + ~EnvironmentRecorder(); // Serializes the system profile and records it in prefs for the next @@ -50,8 +54,6 @@ private: PrefService* local_state_; - - DISALLOW_COPY_AND_ASSIGN(EnvironmentRecorder); }; } // namespace metrics
diff --git a/components/metrics/environment_recorder_unittest.cc b/components/metrics/environment_recorder_unittest.cc index 14c6cb7b..2a73bc45 100644 --- a/components/metrics/environment_recorder_unittest.cc +++ b/components/metrics/environment_recorder_unittest.cc
@@ -17,13 +17,13 @@ EnvironmentRecorder::RegisterPrefs(prefs_.registry()); } + EnvironmentRecorderTest(const EnvironmentRecorderTest&) = delete; + EnvironmentRecorderTest& operator=(const EnvironmentRecorderTest&) = delete; + ~EnvironmentRecorderTest() override {} protected: TestingPrefServiceSimple prefs_; - - private: - DISALLOW_COPY_AND_ASSIGN(EnvironmentRecorderTest); }; TEST_F(EnvironmentRecorderTest, LoadEnvironmentFromPrefs) {
diff --git a/components/metrics/expired_histograms_checker.h b/components/metrics/expired_histograms_checker.h index 4fddd0c2..ebea605 100644 --- a/components/metrics/expired_histograms_checker.h +++ b/components/metrics/expired_histograms_checker.h
@@ -25,6 +25,10 @@ ExpiredHistogramsChecker(const uint32_t* expired_histogram_hashes, size_t size, const std::string& allowlist_str); + + ExpiredHistogramsChecker(const ExpiredHistogramsChecker&) = delete; + ExpiredHistogramsChecker& operator=(const ExpiredHistogramsChecker&) = delete; + ~ExpiredHistogramsChecker() override; // Checks if the given |histogram_hash| corresponds to an expired histogram. @@ -43,8 +47,6 @@ // Set of expired histogram hashes that should be recorded. std::set<uint32_t> allowlist_; - - DISALLOW_COPY_AND_ASSIGN(ExpiredHistogramsChecker); }; } // namespace metrics
diff --git a/components/metrics/field_trials_provider.h b/components/metrics/field_trials_provider.h index d2b4e0ed..8a66ff9 100644 --- a/components/metrics/field_trials_provider.h +++ b/components/metrics/field_trials_provider.h
@@ -23,6 +23,10 @@ // |registry| must outlive this metrics provider. FieldTrialsProvider(SyntheticTrialRegistry* registry, base::StringPiece suffix); + + FieldTrialsProvider(const FieldTrialsProvider&) = delete; + FieldTrialsProvider& operator=(const FieldTrialsProvider&) = delete; + ~FieldTrialsProvider() override; // metrics::MetricsProvider: @@ -55,8 +59,6 @@ // Suffix used for the field trial names before they are hashed for uploads. std::string suffix_; - - DISALLOW_COPY_AND_ASSIGN(FieldTrialsProvider); }; } // namespace variations
diff --git a/components/metrics/file_metrics_provider.h b/components/metrics/file_metrics_provider.h index fe78275..7c5045de 100644 --- a/components/metrics/file_metrics_provider.h +++ b/components/metrics/file_metrics_provider.h
@@ -163,6 +163,10 @@ }; explicit FileMetricsProvider(PrefService* local_state); + + FileMetricsProvider(const FileMetricsProvider&) = delete; + FileMetricsProvider& operator=(const FileMetricsProvider&) = delete; + ~FileMetricsProvider() override; // Indicates a file or directory to be monitored and how the file or files @@ -355,8 +359,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<FileMetricsProvider> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FileMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/library_support/histogram_manager.h b/components/metrics/library_support/histogram_manager.h index 1465284..a306afd 100644 --- a/components/metrics/library_support/histogram_manager.h +++ b/components/metrics/library_support/histogram_manager.h
@@ -25,6 +25,10 @@ class HistogramManager : public base::HistogramFlattener { public: HistogramManager(); + + HistogramManager(const HistogramManager&) = delete; + HistogramManager& operator=(const HistogramManager&) = delete; + ~HistogramManager() override; // Snapshot all histograms to record the delta into |uma_proto_| and then @@ -50,8 +54,6 @@ // Should be acquired whenever GetDeltas() is executing to maintain // thread-safety. base::Lock get_deltas_lock_; - - DISALLOW_COPY_AND_ASSIGN(HistogramManager); }; } // namespace metrics
diff --git a/components/metrics/metrics_log.cc b/components/metrics/metrics_log.cc index 4f40f4e..036f9cc 100644 --- a/components/metrics/metrics_log.cc +++ b/components/metrics/metrics_log.cc
@@ -76,6 +76,10 @@ class IndependentFlattener : public base::HistogramFlattener { public: explicit IndependentFlattener(MetricsLog* log) : log_(log) {} + + IndependentFlattener(const IndependentFlattener&) = delete; + IndependentFlattener& operator=(const IndependentFlattener&) = delete; + ~IndependentFlattener() override {} // base::HistogramFlattener: @@ -86,8 +90,6 @@ private: MetricsLog* const log_; - - DISALLOW_COPY_AND_ASSIGN(IndependentFlattener); }; // Convenience function to return the given time at a resolution in seconds.
diff --git a/components/metrics/metrics_log.h b/components/metrics/metrics_log.h index 9042ae5..e9db88d 100644 --- a/components/metrics/metrics_log.h +++ b/components/metrics/metrics_log.h
@@ -79,6 +79,11 @@ class IndependentMetricsLoader { public: explicit IndependentMetricsLoader(std::unique_ptr<MetricsLog> log); + + IndependentMetricsLoader(const IndependentMetricsLoader&) = delete; + IndependentMetricsLoader& operator=(const IndependentMetricsLoader&) = + delete; + ~IndependentMetricsLoader(); // Call ProvideIndependentMetrics (which may execute on a background thread) @@ -96,8 +101,6 @@ std::unique_ptr<MetricsLog> log_; std::unique_ptr<base::HistogramFlattener> flattener_; std::unique_ptr<base::HistogramSnapshotManager> snapshot_manager_; - - DISALLOW_COPY_AND_ASSIGN(IndependentMetricsLoader); }; // Creates a new metrics log of the specified type.
diff --git a/components/metrics/metrics_log_manager.h b/components/metrics/metrics_log_manager.h index 94fd624..d30250f 100644 --- a/components/metrics/metrics_log_manager.h +++ b/components/metrics/metrics_log_manager.h
@@ -21,6 +21,10 @@ class MetricsLogManager { public: MetricsLogManager(); + + MetricsLogManager(const MetricsLogManager&) = delete; + MetricsLogManager& operator=(const MetricsLogManager&) = delete; + ~MetricsLogManager(); // Makes |log| the current_log. This should only be called if there is not a @@ -54,8 +58,6 @@ // A paused, previously-current log. std::unique_ptr<MetricsLog> paused_log_; - - DISALLOW_COPY_AND_ASSIGN(MetricsLogManager); }; } // namespace metrics
diff --git a/components/metrics/metrics_log_manager_unittest.cc b/components/metrics/metrics_log_manager_unittest.cc index 894861c0..00716e3 100644 --- a/components/metrics/metrics_log_manager_unittest.cc +++ b/components/metrics/metrics_log_manager_unittest.cc
@@ -30,6 +30,10 @@ MetricsLogStore::RegisterPrefs(pref_service_.registry()); log_store()->LoadPersistedUnsentLogs(); } + + MetricsLogManagerTest(const MetricsLogManagerTest&) = delete; + MetricsLogManagerTest& operator=(const MetricsLogManagerTest&) = delete; + ~MetricsLogManagerTest() override {} MetricsLogStore* log_store() { return &log_store_; } @@ -46,8 +50,6 @@ TestMetricsServiceClient client_; TestingPrefServiceSimple pref_service_; MetricsLogStore log_store_; - - DISALLOW_COPY_AND_ASSIGN(MetricsLogManagerTest); }; } // namespace
diff --git a/components/metrics/metrics_log_store.h b/components/metrics/metrics_log_store.h index 6c07f28..f9f2d411 100644 --- a/components/metrics/metrics_log_store.h +++ b/components/metrics/metrics_log_store.h
@@ -65,6 +65,10 @@ MetricsLogStore(PrefService* local_state, StorageLimits storage_limits, const std::string& signing_key); + + MetricsLogStore(const MetricsLogStore&) = delete; + MetricsLogStore& operator=(const MetricsLogStore&) = delete; + ~MetricsLogStore() override; // Registers local state prefs used by this class. @@ -135,8 +139,6 @@ // been sent yet. If initialized, all logs of type ONGOING_LOG will be stored // here instead of |ongoing_log_queue_|. std::unique_ptr<UnsentLogStore> alternate_ongoing_log_queue_; - - DISALLOW_COPY_AND_ASSIGN(MetricsLogStore); }; } // namespace metrics
diff --git a/components/metrics/metrics_log_store_unittest.cc b/components/metrics/metrics_log_store_unittest.cc index fc1d3cd..b35cacb8 100644 --- a/components/metrics/metrics_log_store_unittest.cc +++ b/components/metrics/metrics_log_store_unittest.cc
@@ -44,6 +44,10 @@ MetricsLogStore::RegisterPrefs(pref_service_.registry()); TestUnsentLogStore::RegisterPrefs(pref_service_.registry()); } + + MetricsLogStoreTest(const MetricsLogStoreTest&) = delete; + MetricsLogStoreTest& operator=(const MetricsLogStoreTest&) = delete; + ~MetricsLogStoreTest() override {} MetricsLog* CreateLog(MetricsLog::LogType log_type) { @@ -60,9 +64,6 @@ TestMetricsServiceClient client_; TestingPrefServiceSimple pref_service_; - - private: - DISALLOW_COPY_AND_ASSIGN(MetricsLogStoreTest); }; } // namespace
diff --git a/components/metrics/metrics_log_unittest.cc b/components/metrics/metrics_log_unittest.cc index ee9e551..f8b0a8f 100644 --- a/components/metrics/metrics_log_unittest.cc +++ b/components/metrics/metrics_log_unittest.cc
@@ -56,6 +56,9 @@ MetricsServiceClient* client) : MetricsLog(client_id, session_id, log_type, client) {} + TestMetricsLog(const TestMetricsLog&) = delete; + TestMetricsLog& operator=(const TestMetricsLog&) = delete; + ~TestMetricsLog() override {} const ChromeUserMetricsExtension& uma_proto() const { @@ -69,9 +72,6 @@ const SystemProfileProto& system_profile() const { return uma_proto().system_profile(); } - - private: - DISALLOW_COPY_AND_ASSIGN(TestMetricsLog); }; // Returns the expected hardware class for a metrics log. @@ -97,6 +97,10 @@ class MetricsLogTest : public testing::Test { public: MetricsLogTest() {} + + MetricsLogTest(const MetricsLogTest&) = delete; + MetricsLogTest& operator=(const MetricsLogTest&) = delete; + ~MetricsLogTest() override {} protected: @@ -129,9 +133,6 @@ // TODO(isherman): Verify other data written into the protobuf as a result // of this call. } - - private: - DISALLOW_COPY_AND_ASSIGN(MetricsLogTest); }; TEST_F(MetricsLogTest, LogType) {
diff --git a/components/metrics/metrics_provider.h b/components/metrics/metrics_provider.h index 0a11370..e5d0544b 100644 --- a/components/metrics/metrics_provider.h +++ b/components/metrics/metrics_provider.h
@@ -23,6 +23,10 @@ class MetricsProvider { public: MetricsProvider(); + + MetricsProvider(const MetricsProvider&) = delete; + MetricsProvider& operator=(const MetricsProvider&) = delete; + virtual ~MetricsProvider(); // Called after initialization of MetricsService and field trials. @@ -130,9 +134,6 @@ // PrepareDelta(), not PrepareDeltas (plural), should be made. virtual void RecordInitialHistogramSnapshots( base::HistogramSnapshotManager* snapshot_manager); - - private: - DISALLOW_COPY_AND_ASSIGN(MetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/metrics_reporting_service.h b/components/metrics/metrics_reporting_service.h index e6b23a1..7b559abc 100644 --- a/components/metrics/metrics_reporting_service.h +++ b/components/metrics/metrics_reporting_service.h
@@ -33,6 +33,10 @@ // the lifetime of this class. MetricsReportingService(MetricsServiceClient* client, PrefService* local_state); + + MetricsReportingService(const MetricsReportingService&) = delete; + MetricsReportingService& operator=(const MetricsReportingService&) = delete; + ~MetricsReportingService() override; MetricsLogStore* metrics_log_store() { return &metrics_log_store_; } @@ -60,8 +64,6 @@ void LogLargeRejection(size_t log_size) override; MetricsLogStore metrics_log_store_; - - DISALLOW_COPY_AND_ASSIGN(MetricsReportingService); }; } // namespace metrics
diff --git a/components/metrics/metrics_rotation_scheduler.h b/components/metrics/metrics_rotation_scheduler.h index eea3817..84b3b48 100644 --- a/components/metrics/metrics_rotation_scheduler.h +++ b/components/metrics/metrics_rotation_scheduler.h
@@ -23,6 +23,10 @@ const base::RepeatingClosure& rotation_callback, const base::RepeatingCallback<base::TimeDelta(void)>& interval_callback, bool fast_startup_for_testing); + + MetricsRotationScheduler(const MetricsRotationScheduler&) = delete; + MetricsRotationScheduler& operator=(const MetricsRotationScheduler&) = delete; + ~MetricsRotationScheduler() override; // Callback from MetricsService when the startup init task has completed. @@ -54,8 +58,6 @@ // Callback function used to get the standard upload time. base::RepeatingCallback<base::TimeDelta(void)> upload_interval_callback_; - - DISALLOW_COPY_AND_ASSIGN(MetricsRotationScheduler); }; } // namespace metrics
diff --git a/components/metrics/metrics_scheduler.h b/components/metrics/metrics_scheduler.h index afb4a76..334ab8a 100644 --- a/components/metrics/metrics_scheduler.h +++ b/components/metrics/metrics_scheduler.h
@@ -19,6 +19,10 @@ // callback to call when a task should happen. MetricsScheduler(const base::RepeatingClosure& task_callback, bool fast_startup_for_testing); + + MetricsScheduler(const MetricsScheduler&) = delete; + MetricsScheduler& operator=(const MetricsScheduler&) = delete; + virtual ~MetricsScheduler(); // Starts scheduling uploads. This in a no-op if the scheduler is already @@ -57,8 +61,6 @@ // Indicates that the last triggered task hasn't resolved yet. bool callback_pending_; - - DISALLOW_COPY_AND_ASSIGN(MetricsScheduler); }; } // namespace metrics
diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h index f5bc248b..5c19c65 100644 --- a/components/metrics/metrics_service.h +++ b/components/metrics/metrics_service.h
@@ -60,6 +60,10 @@ MetricsService(MetricsStateManager* state_manager, MetricsServiceClient* client, PrefService* local_state); + + MetricsService(const MetricsService&) = delete; + MetricsService& operator=(const MetricsService&) = delete; + ~MetricsService() override; // Initializes metrics recording state. Updates various bookkeeping values in @@ -415,8 +419,6 @@ // Weak pointers factory used to post task on different threads. All weak // pointers managed by this factory have the same lifetime as MetricsService. base::WeakPtrFactory<MetricsService> self_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MetricsService); }; } // namespace metrics
diff --git a/components/metrics/metrics_service_client.h b/components/metrics/metrics_service_client.h index 7015abd0..ca713718 100644 --- a/components/metrics/metrics_service_client.h +++ b/components/metrics/metrics_service_client.h
@@ -36,6 +36,10 @@ class MetricsServiceClient { public: MetricsServiceClient(); + + MetricsServiceClient(const MetricsServiceClient&) = delete; + MetricsServiceClient& operator=(const MetricsServiceClient&) = delete; + virtual ~MetricsServiceClient(); // Returns the MetricsService instance that this client is associated with. @@ -180,8 +184,6 @@ private: base::RepeatingClosure update_running_services_; - - DISALLOW_COPY_AND_ASSIGN(MetricsServiceClient); }; } // namespace metrics
diff --git a/components/metrics/metrics_service_client_unittest.cc b/components/metrics/metrics_service_client_unittest.cc index 4f6735d..766b2a8 100644 --- a/components/metrics/metrics_service_client_unittest.cc +++ b/components/metrics/metrics_service_client_unittest.cc
@@ -19,10 +19,11 @@ class MetricsServiceClientTest : public testing::Test { public: MetricsServiceClientTest() {} - ~MetricsServiceClientTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(MetricsServiceClientTest); + MetricsServiceClientTest(const MetricsServiceClientTest&) = delete; + MetricsServiceClientTest& operator=(const MetricsServiceClientTest&) = delete; + + ~MetricsServiceClientTest() override {} }; } // namespace
diff --git a/components/metrics/metrics_service_unittest.cc b/components/metrics/metrics_service_unittest.cc index fe0ab85..c5560b3 100644 --- a/components/metrics/metrics_service_unittest.cc +++ b/components/metrics/metrics_service_unittest.cc
@@ -75,6 +75,10 @@ MetricsServiceClient* client, PrefService* local_state) : MetricsService(state_manager, client, local_state) {} + + TestMetricsService(const TestMetricsService&) = delete; + TestMetricsService& operator=(const TestMetricsService&) = delete; + ~TestMetricsService() override = default; using MetricsService::INIT_TASK_SCHEDULED; @@ -99,8 +103,6 @@ private: bool persistent_system_profile_provided_ = false; bool persistent_system_profile_complete_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestMetricsService); }; class TestMetricsLog : public MetricsLog { @@ -110,10 +112,10 @@ MetricsServiceClient* client) : MetricsLog(client_id, session_id, MetricsLog::ONGOING_LOG, client) {} - ~TestMetricsLog() override {} + TestMetricsLog(const TestMetricsLog&) = delete; + TestMetricsLog& operator=(const TestMetricsLog&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(TestMetricsLog); + ~TestMetricsLog() override {} }; const char kOnDidCreateMetricsLogHistogramName[] = "Test.OnDidCreateMetricsLog"; @@ -138,6 +140,9 @@ MetricsService::RegisterPrefs(testing_local_state_.registry()); } + MetricsServiceTest(const MetricsServiceTest&) = delete; + MetricsServiceTest& operator=(const MetricsServiceTest&) = delete; + ~MetricsServiceTest() override {} MetricsStateManager* GetMetricsStateManager( @@ -227,8 +232,6 @@ std::unique_ptr<TestEnabledStateProvider> enabled_state_provider_; TestingPrefServiceSimple testing_local_state_; std::unique_ptr<MetricsStateManager> metrics_state_manager_; - - DISALLOW_COPY_AND_ASSIGN(MetricsServiceTest); }; struct StartupVisibilityTestParams {
diff --git a/components/metrics/metrics_state_manager.h b/components/metrics/metrics_state_manager.h index 3d15287..81e8d2f 100644 --- a/components/metrics/metrics_state_manager.h +++ b/components/metrics/metrics_state_manager.h
@@ -63,6 +63,9 @@ typedef base::RepeatingCallback<std::unique_ptr<ClientInfo>(void)> LoadClientInfoCallback; + MetricsStateManager(const MetricsStateManager&) = delete; + MetricsStateManager& operator=(const MetricsStateManager&) = delete; + ~MetricsStateManager(); std::unique_ptr<MetricsProvider> GetProvider(); @@ -348,8 +351,6 @@ // used only during startup. On Android WebLayer, Android WebView, and iOS, // the visibility is unknown at this point in startup. const StartupVisibility startup_visibility_; - - DISALLOW_COPY_AND_ASSIGN(MetricsStateManager); }; } // namespace metrics
diff --git a/components/metrics/metrics_upload_scheduler.h b/components/metrics/metrics_upload_scheduler.h index 709b89d..0d858542 100644 --- a/components/metrics/metrics_upload_scheduler.h +++ b/components/metrics/metrics_upload_scheduler.h
@@ -21,6 +21,10 @@ // arrange to call either UploadFinished or UploadCancelled on completion. MetricsUploadScheduler(const base::RepeatingClosure& upload_callback, bool fast_startup_for_testing); + + MetricsUploadScheduler(const MetricsUploadScheduler&) = delete; + MetricsUploadScheduler& operator=(const MetricsUploadScheduler&) = delete; + ~MetricsUploadScheduler() override; // Callback from MetricsService when a triggered upload finishes. @@ -43,8 +47,6 @@ // Time to wait for the next upload attempt if the next one fails. base::TimeDelta backoff_interval_; - - DISALLOW_COPY_AND_ASSIGN(MetricsUploadScheduler); }; } // namespace metrics
diff --git a/components/metrics/net/net_metrics_log_uploader.h b/components/metrics/net/net_metrics_log_uploader.h index c7439d7..0774521 100644 --- a/components/metrics/net/net_metrics_log_uploader.h +++ b/components/metrics/net/net_metrics_log_uploader.h
@@ -46,6 +46,9 @@ MetricsLogUploader::MetricServiceType service_type, const MetricsLogUploader::UploadCallback& on_upload_complete); + NetMetricsLogUploader(const NetMetricsLogUploader&) = delete; + NetMetricsLogUploader& operator=(const NetMetricsLogUploader&) = delete; + ~NetMetricsLogUploader() override; // MetricsLogUploader: @@ -80,8 +83,6 @@ const MetricsLogUploader::UploadCallback on_upload_complete_; // The outstanding transmission appears as a URL Fetch operation. std::unique_ptr<network::SimpleURLLoader> url_loader_; - - DISALLOW_COPY_AND_ASSIGN(NetMetricsLogUploader); }; } // namespace metrics
diff --git a/components/metrics/net/network_metrics_provider.h b/components/metrics/net/network_metrics_provider.h index 54c2800e..95b5fae 100644 --- a/components/metrics/net/network_metrics_provider.h +++ b/components/metrics/net/network_metrics_provider.h
@@ -36,6 +36,11 @@ // Class that provides |this| with the network quality estimator. class NetworkQualityEstimatorProvider { public: + NetworkQualityEstimatorProvider(const NetworkQualityEstimatorProvider&) = + delete; + NetworkQualityEstimatorProvider& operator=( + const NetworkQualityEstimatorProvider&) = delete; + virtual ~NetworkQualityEstimatorProvider() {} // Provides |this| with |callback| that would be invoked by |this| every @@ -46,9 +51,6 @@ protected: NetworkQualityEstimatorProvider() {} - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkQualityEstimatorProvider); }; // Creates a NetworkMetricsProvider, where
diff --git a/components/metrics/persistent_system_profile.h b/components/metrics/persistent_system_profile.h index 1aa92791..6e26b4a3 100644 --- a/components/metrics/persistent_system_profile.h +++ b/components/metrics/persistent_system_profile.h
@@ -23,6 +23,10 @@ class PersistentSystemProfile { public: PersistentSystemProfile(); + + PersistentSystemProfile(const PersistentSystemProfile&) = delete; + PersistentSystemProfile& operator=(const PersistentSystemProfile&) = delete; + ~PersistentSystemProfile(); // This object can store records in multiple memory allocators. @@ -139,8 +143,6 @@ bool all_have_complete_profile_ = false; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(PersistentSystemProfile); }; // A singleton instance of the above.
diff --git a/components/metrics/persistent_system_profile_unittest.cc b/components/metrics/persistent_system_profile_unittest.cc index 3285a6c..2681f00 100644 --- a/components/metrics/persistent_system_profile_unittest.cc +++ b/components/metrics/persistent_system_profile_unittest.cc
@@ -19,6 +19,11 @@ const int32_t kAllocatorMemorySize = 1 << 20; // 1 MiB PersistentSystemProfileTest() {} + + PersistentSystemProfileTest(const PersistentSystemProfileTest&) = delete; + PersistentSystemProfileTest& operator=(const PersistentSystemProfileTest&) = + delete; + ~PersistentSystemProfileTest() override {} void SetUp() override { @@ -58,8 +63,6 @@ PersistentSystemProfile persistent_profile_; std::unique_ptr<base::PersistentMemoryAllocator> memory_allocator_; std::unique_ptr<PersistentSystemProfile::RecordAllocator> records_; - - DISALLOW_COPY_AND_ASSIGN(PersistentSystemProfileTest); }; TEST_F(PersistentSystemProfileTest, Create) {
diff --git a/components/metrics/reporting_service.h b/components/metrics/reporting_service.h index acddc48..2f17e2bf 100644 --- a/components/metrics/reporting_service.h +++ b/components/metrics/reporting_service.h
@@ -42,6 +42,10 @@ ReportingService(MetricsServiceClient* client, PrefService* local_state, size_t max_retransmit_size); + + ReportingService(const ReportingService&) = delete; + ReportingService& operator=(const ReportingService&) = delete; + virtual ~ReportingService(); // Completes setup tasks that can't be done at construction time. @@ -141,8 +145,6 @@ // pointers managed by this factory have the same lifetime as // ReportingService. base::WeakPtrFactory<ReportingService> self_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReportingService); }; } // namespace metrics
diff --git a/components/metrics/reporting_service_unittest.cc b/components/metrics/reporting_service_unittest.cc index adac9f7c..4da62ba 100644 --- a/components/metrics/reporting_service_unittest.cc +++ b/components/metrics/reporting_service_unittest.cc
@@ -87,6 +87,10 @@ : ReportingService(client, local_state, 100) { Initialize(); } + + TestReportingService(const TestReportingService&) = delete; + TestReportingService& operator=(const TestReportingService&) = delete; + ~TestReportingService() override {} void AddLog(const TestLog& log) { log_store_.AddLog(log); } @@ -102,8 +106,6 @@ } TestLogStore log_store_; - - DISALLOW_COPY_AND_ASSIGN(TestReportingService); }; class ReportingServiceTest : public testing::Test { @@ -114,6 +116,9 @@ ReportingService::RegisterPrefs(testing_local_state_.registry()); } + ReportingServiceTest(const ReportingServiceTest&) = delete; + ReportingServiceTest& operator=(const ReportingServiceTest&) = delete; + ~ReportingServiceTest() override {} PrefService* GetLocalState() { return &testing_local_state_; } @@ -125,8 +130,6 @@ private: TestingPrefServiceSimple testing_local_state_; - - DISALLOW_COPY_AND_ASSIGN(ReportingServiceTest); }; } // namespace
diff --git a/components/metrics/serialization/metric_sample.h b/components/metrics/serialization/metric_sample.h index 76a21aa8..f9c42de 100644 --- a/components/metrics/serialization/metric_sample.h +++ b/components/metrics/serialization/metric_sample.h
@@ -37,6 +37,9 @@ const int max, const int bucket_count); + MetricSample(const MetricSample&) = delete; + MetricSample& operator=(const MetricSample&) = delete; + ~MetricSample(); // Returns true if the sample is valid (can be serialized without ambiguity). @@ -113,8 +116,6 @@ const int min_; const int max_; const int bucket_count_; - - DISALLOW_COPY_AND_ASSIGN(MetricSample); }; } // namespace metrics
diff --git a/components/metrics/single_sample_metrics.cc b/components/metrics/single_sample_metrics.cc index dd8b88dc..9a262b4 100644 --- a/components/metrics/single_sample_metrics.cc +++ b/components/metrics/single_sample_metrics.cc
@@ -25,6 +25,10 @@ uint32_t bucket_count, int32_t flags) : metric_(histogram_name, min, max, bucket_count, flags) {} + + MojoSingleSampleMetric(const MojoSingleSampleMetric&) = delete; + MojoSingleSampleMetric& operator=(const MojoSingleSampleMetric&) = delete; + ~MojoSingleSampleMetric() override {} private: @@ -34,14 +38,18 @@ } base::DefaultSingleSampleMetric metric_; - - DISALLOW_COPY_AND_ASSIGN(MojoSingleSampleMetric); }; class MojoSingleSampleMetricsProvider : public mojom::SingleSampleMetricsProvider { public: MojoSingleSampleMetricsProvider() {} + + MojoSingleSampleMetricsProvider(const MojoSingleSampleMetricsProvider&) = + delete; + MojoSingleSampleMetricsProvider& operator=( + const MojoSingleSampleMetricsProvider&) = delete; + ~MojoSingleSampleMetricsProvider() override { DCHECK(thread_checker_.CalledOnValidThread()); } @@ -64,8 +72,6 @@ // Providers must be created, used on, and destroyed on the same thread. base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(MojoSingleSampleMetricsProvider); }; } // namespace
diff --git a/components/metrics/single_sample_metrics_factory_impl.cc b/components/metrics/single_sample_metrics_factory_impl.cc index 28d6160..bc5f32f 100644 --- a/components/metrics/single_sample_metrics_factory_impl.cc +++ b/components/metrics/single_sample_metrics_factory_impl.cc
@@ -19,6 +19,9 @@ SingleSampleMetricImpl(mojo::PendingRemote<mojom::SingleSampleMetric> metric) : metric_(std::move(metric)) {} + SingleSampleMetricImpl(const SingleSampleMetricImpl&) = delete; + SingleSampleMetricImpl& operator=(const SingleSampleMetricImpl&) = delete; + ~SingleSampleMetricImpl() override { DCHECK(thread_checker_.CalledOnValidThread()); } @@ -31,8 +34,6 @@ private: base::ThreadChecker thread_checker_; mojo::Remote<mojom::SingleSampleMetric> metric_; - - DISALLOW_COPY_AND_ASSIGN(SingleSampleMetricImpl); }; } // namespace
diff --git a/components/metrics/single_sample_metrics_factory_impl.h b/components/metrics/single_sample_metrics_factory_impl.h index 7200f06..0570f5ba 100644 --- a/components/metrics/single_sample_metrics_factory_impl.h +++ b/components/metrics/single_sample_metrics_factory_impl.h
@@ -32,6 +32,12 @@ // service_manager::Connector() for simplicitly and to avoid the need for // using the service test harness just for instantiating this class. explicit SingleSampleMetricsFactoryImpl(CreateProviderCB create_provider_cb); + + SingleSampleMetricsFactoryImpl(const SingleSampleMetricsFactoryImpl&) = + delete; + SingleSampleMetricsFactoryImpl& operator=( + const SingleSampleMetricsFactoryImpl&) = delete; + ~SingleSampleMetricsFactoryImpl() override; // base::SingleSampleMetricsFactory: @@ -64,8 +70,6 @@ // Per thread storage slot for the mojo provider. base::ThreadLocalPointer<mojo::Remote<mojom::SingleSampleMetricsProvider>> provider_tls_; - - DISALLOW_COPY_AND_ASSIGN(SingleSampleMetricsFactoryImpl); }; } // namespace metrics
diff --git a/components/metrics/single_sample_metrics_factory_impl_unittest.cc b/components/metrics/single_sample_metrics_factory_impl_unittest.cc index fe85c4a..597dc1fd 100644 --- a/components/metrics/single_sample_metrics_factory_impl_unittest.cc +++ b/components/metrics/single_sample_metrics_factory_impl_unittest.cc
@@ -34,6 +34,11 @@ base::SingleSampleMetricsFactory::Get()); } + SingleSampleMetricsFactoryImplTest( + const SingleSampleMetricsFactoryImplTest&) = delete; + SingleSampleMetricsFactoryImplTest& operator=( + const SingleSampleMetricsFactoryImplTest&) = delete; + ~SingleSampleMetricsFactoryImplTest() override { factory_->DestroyProviderForTesting(); if (thread_.IsRunning()) @@ -81,9 +86,6 @@ SingleSampleMetricsFactoryImpl* factory_; base::Thread thread_; size_t provider_count_ = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SingleSampleMetricsFactoryImplTest); }; } // namespace
diff --git a/components/metrics/stability_metrics_helper.h b/components/metrics/stability_metrics_helper.h index 7105af9..89c1f0ae6 100644 --- a/components/metrics/stability_metrics_helper.h +++ b/components/metrics/stability_metrics_helper.h
@@ -43,6 +43,10 @@ class StabilityMetricsHelper { public: explicit StabilityMetricsHelper(PrefService* local_state); + + StabilityMetricsHelper(const StabilityMetricsHelper&) = delete; + StabilityMetricsHelper& operator=(const StabilityMetricsHelper&) = delete; + ~StabilityMetricsHelper(); // Provides stability metrics. @@ -98,8 +102,6 @@ void LogRendererLaunchFailed(bool was_extension_process); PrefService* local_state_; - - DISALLOW_COPY_AND_ASSIGN(StabilityMetricsHelper); }; } // namespace metrics
diff --git a/components/metrics/stability_metrics_provider.h b/components/metrics/stability_metrics_provider.h index 75b7adac..ac7a14e7 100644 --- a/components/metrics/stability_metrics_provider.h +++ b/components/metrics/stability_metrics_provider.h
@@ -20,6 +20,10 @@ class StabilityMetricsProvider : public MetricsProvider { public: explicit StabilityMetricsProvider(PrefService* local_state); + + StabilityMetricsProvider(const StabilityMetricsProvider&) = delete; + StabilityMetricsProvider& operator=(const StabilityMetricsProvider&) = delete; + ~StabilityMetricsProvider() override; static void RegisterPrefs(PrefRegistrySimple* registry); @@ -52,8 +56,6 @@ SystemProfileProto* system_profile_proto) override; PrefService* local_state_; - - DISALLOW_COPY_AND_ASSIGN(StabilityMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/stability_metrics_provider_unittest.cc b/components/metrics/stability_metrics_provider_unittest.cc index d3876ac..3ebcd8cf 100644 --- a/components/metrics/stability_metrics_provider_unittest.cc +++ b/components/metrics/stability_metrics_provider_unittest.cc
@@ -19,13 +19,14 @@ StabilityMetricsProvider::RegisterPrefs(prefs_.registry()); } + StabilityMetricsProviderTest(const StabilityMetricsProviderTest&) = delete; + StabilityMetricsProviderTest& operator=(const StabilityMetricsProviderTest&) = + delete; + ~StabilityMetricsProviderTest() override {} protected: TestingPrefServiceSimple prefs_; - - private: - DISALLOW_COPY_AND_ASSIGN(StabilityMetricsProviderTest); }; TEST_F(StabilityMetricsProviderTest, ProvideStabilityMetrics) {
diff --git a/components/metrics/structured/BUILD.gn b/components/metrics/structured/BUILD.gn index a33b187..b09f4da6b 100644 --- a/components/metrics/structured/BUILD.gn +++ b/components/metrics/structured/BUILD.gn
@@ -44,6 +44,8 @@ "enums.h", "event.cc", "event.h", + "structured_metrics_client.cc", + "structured_metrics_client.h", ] deps = [ "//base",
diff --git a/components/metrics/structured/event.cc b/components/metrics/structured/event.cc index 623e4bd..ef2010a 100644 --- a/components/metrics/structured/event.cc +++ b/components/metrics/structured/event.cc
@@ -9,6 +9,7 @@ #include <string> #include "base/values.h" +#include "components/metrics/structured/structured_metrics_client.h" namespace metrics { namespace structured { @@ -33,7 +34,7 @@ Event::Event(Event&& other) : project_name_(std::move(other.project_name_)), - event_name_(std::move(other.project_name_)) { + event_name_(std::move(other.event_name_)) { metric_values_.insert(std::make_move_iterator(other.metric_values_.begin()), std::make_move_iterator(other.metric_values_.end())); } @@ -46,6 +47,10 @@ return *this; } +void Event::Record() { + StructuredMetricsClient::Get()->Record(std::move(*this)); +} + const std::string& Event::project_name() const { return project_name_; }
diff --git a/components/metrics/structured/event.h b/components/metrics/structured/event.h index c1771aa..ca76dcc 100644 --- a/components/metrics/structured/event.h +++ b/components/metrics/structured/event.h
@@ -61,6 +61,10 @@ virtual ~Event(); + // Records |this|. Once this method is called, |this| will be unsafe to + // access. + void Record(); + // Returns true if the value was added successfully. |type| and type of // |value| must be consistent and will be enforced. If the data in |value| and // |type| do match, then |value| will be moved into |this| when called.
diff --git a/components/metrics/structured/recorder.cc b/components/metrics/structured/recorder.cc index a0f87b6..fdd3658 100644 --- a/components/metrics/structured/recorder.cc +++ b/components/metrics/structured/recorder.cc
@@ -23,7 +23,13 @@ return recorder.get(); } -void Recorder::Record(const EventBase& event) { +void Recorder::RecordEvent(Event&& event) { + auto event_base = EventBase::FromEvent(std::move(event)); + if (event_base.has_value()) + Record(std::move(event_base.value())); +} + +void Recorder::Record(EventBase&& event) { // All calls to StructuredMetricsProvider (the observer) must be on the UI // sequence, so re-call Record if needed. If a UI task runner hasn't been set // yet, ignore this Record. @@ -48,6 +54,11 @@ } } +bool Recorder::IsReadyToRecord() const { + // No initialization needed. Always ready to record. + return true; +} + void Recorder::ProfileAdded(const base::FilePath& profile_path) { // All calls to the StructuredMetricsProvider (the observer) must be on the UI // sequence.
diff --git a/components/metrics/structured/recorder.h b/components/metrics/structured/recorder.h index 920fb8f..20f57baab 100644 --- a/components/metrics/structured/recorder.h +++ b/components/metrics/structured/recorder.h
@@ -11,6 +11,9 @@ #include "base/observer_list.h" #include "base/observer_list_types.h" #include "base/sequenced_task_runner.h" +#include "components/metrics/structured/event.h" +#include "components/metrics/structured/event_base.h" +#include "components/metrics/structured/structured_metrics_client.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace base { @@ -20,8 +23,6 @@ namespace metrics { namespace structured { -class EventBase; - // Recorder is a singleton to help communicate with the // StructuredMetricsProvider. It serves three purposes: // 1. Begin the initialization of the StructuredMetricsProvider (see class @@ -35,7 +36,10 @@ // record events. The StructuredMetricsProvider registers itself as an observer // of this singleton when recording is enabled, and calls to Record (for // recording) or ProfileAdded (for initialization) are then forwarded to it. -class Recorder { +// +// Recorder is embedded within StructuredMetricsClient for Ash Chrome and should +// only be used in Ash Chrome. +class Recorder : public StructuredMetricsClient::RecordingDelegate { public: class RecorderImpl : public base::CheckedObserver { public: @@ -51,8 +55,10 @@ static Recorder* GetInstance(); - // Notifies observers of |event|, - void Record(const EventBase& event); + // RecordingDelegate: + void RecordEvent(Event&& event) override; + void Record(EventBase&& event) override; + bool IsReadyToRecord() const override; // Notifies the StructuredMetricsProvider that a profile has been added with // path |profile_path|. The first call to ProfileAdded initializes the @@ -78,7 +84,7 @@ friend class StructuredMetricsProvider; Recorder(); - ~Recorder(); + ~Recorder() override; Recorder(const Recorder&) = delete; Recorder& operator=(const Recorder&) = delete;
diff --git a/components/metrics/structured/structured_metrics_client.cc b/components/metrics/structured/structured_metrics_client.cc new file mode 100644 index 0000000..879940a --- /dev/null +++ b/components/metrics/structured/structured_metrics_client.cc
@@ -0,0 +1,44 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/metrics/structured/structured_metrics_client.h" + +#include <utility> + +#include "base/no_destructor.h" + +#include "components/metrics/structured/event.h" + +namespace metrics { +namespace structured { + +StructuredMetricsClient::StructuredMetricsClient() = default; +StructuredMetricsClient::~StructuredMetricsClient() = default; + +// static +StructuredMetricsClient* StructuredMetricsClient::Get() { + static base::NoDestructor<StructuredMetricsClient> client; + return client.get(); +} + +void StructuredMetricsClient::Record(Event&& event) { + if (delegate_ && delegate_->IsReadyToRecord()) + delegate_->RecordEvent(std::move(event)); +} + +void StructuredMetricsClient::Record(EventBase&& event_base) { + if (delegate_ && delegate_->IsReadyToRecord()) + delegate_->Record(std::move(event_base)); +} + +void StructuredMetricsClient::SetDelegate(RecordingDelegate* delegate) { + delegate_ = delegate; +} + +void StructuredMetricsClient::UnsetDelegate() { + delegate_ = nullptr; +} + +} // namespace structured +} // namespace metrics
diff --git a/components/metrics/structured/structured_metrics_client.h b/components/metrics/structured/structured_metrics_client.h new file mode 100644 index 0000000..ee547ccc --- /dev/null +++ b/components/metrics/structured/structured_metrics_client.h
@@ -0,0 +1,69 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_METRICS_STRUCTURED_STRUCTURED_METRICS_CLIENT_H_ +#define COMPONENTS_METRICS_STRUCTURED_STRUCTURED_METRICS_CLIENT_H_ + +#include "base/no_destructor.h" + +#include "components/metrics/structured/event.h" + +namespace metrics { +namespace structured { + +// TODO(crbug.com/1249222): Remove forward-declaration as well as EventBase +// calls once migration is complete. +class EventBase; + +// Singleton to interact with StructuredMetrics. +// +// It allows a delegate to be set to control the recording logic as different +// embedders have different requirements (ie ash vs lacros). +class StructuredMetricsClient { + public: + class RecordingDelegate { + public: + virtual ~RecordingDelegate() = default; + + // Return true when the delegate is ready to write events. + virtual bool IsReadyToRecord() const = 0; + + // Recording logic. + virtual void RecordEvent(Event&& event) = 0; + virtual void Record(EventBase&& event_base) = 0; + }; + + StructuredMetricsClient(const StructuredMetricsClient& client) = delete; + StructuredMetricsClient& operator=(const StructuredMetricsClient& client) = + delete; + + // Provides access to global StructuredMetricsClient instance to record + // metrics. This is typically used in the codegen. + static StructuredMetricsClient* Get(); + + // Forwards to |delegate_|. If no delegate has been set, then no-op. + void Record(Event&& event); + void Record(EventBase&& event_base); + + // Sets the delegate for the client's recording logic. Should be called before + // anything else. |this| does not take ownership of |delegate| and assumes + // that the caller will properly manage the lifetime of delegate and call + // |UnsetDelegate| before |delegate| is destructed. + void SetDelegate(RecordingDelegate* delegate); + void UnsetDelegate(); + + private: + friend class base::NoDestructor<StructuredMetricsClient>; + + StructuredMetricsClient(); + ~StructuredMetricsClient(); + + // Not owned. Assumes that the delegate's lifetime will exceed |this|. + RecordingDelegate* delegate_ = nullptr; +}; + +} // namespace structured +} // namespace metrics + +#endif // COMPONENTS_METRICS_STRUCTURED_STRUCTURED_METRICS_CLIENT_H_
diff --git a/components/metrics/system_session_analyzer/system_session_analyzer_win.h b/components/metrics/system_session_analyzer/system_session_analyzer_win.h index a2ededf..e81b74c 100644 --- a/components/metrics/system_session_analyzer/system_session_analyzer_win.h +++ b/components/metrics/system_session_analyzer/system_session_analyzer_win.h
@@ -69,6 +69,10 @@ // events pertaining to as many as |max_session_cnt| of the most recent system // sessions. explicit SystemSessionAnalyzer(uint32_t max_session_cnt); + + SystemSessionAnalyzer(const SystemSessionAnalyzer&) = delete; + SystemSessionAnalyzer& operator=(const SystemSessionAnalyzer&) = delete; + virtual ~SystemSessionAnalyzer(); // Returns an analysis status for the system session that contains @@ -128,8 +132,6 @@ // Track details of what failures occurred. ExtendedStatus extended_status_ = ExtendedStatus::NO_FAILURE; - - DISALLOW_COPY_AND_ASSIGN(SystemSessionAnalyzer); }; } // namespace metrics
diff --git a/components/metrics/test/test_enabled_state_provider.h b/components/metrics/test/test_enabled_state_provider.h index ed1c1e6..5fd1eca 100644 --- a/components/metrics/test/test_enabled_state_provider.h +++ b/components/metrics/test/test_enabled_state_provider.h
@@ -16,6 +16,10 @@ public: TestEnabledStateProvider(bool consent, bool enabled) : consent_(consent), enabled_(enabled) {} + + TestEnabledStateProvider(const TestEnabledStateProvider&) = delete; + TestEnabledStateProvider& operator=(const TestEnabledStateProvider&) = delete; + ~TestEnabledStateProvider() override {} // EnabledStateProvider @@ -28,8 +32,6 @@ private: bool consent_; bool enabled_; - - DISALLOW_COPY_AND_ASSIGN(TestEnabledStateProvider); }; } // namespace metrics
diff --git a/components/metrics/test/test_metrics_log_uploader.h b/components/metrics/test/test_metrics_log_uploader.h index 1670d7f..6100a1b7 100644 --- a/components/metrics/test/test_metrics_log_uploader.h +++ b/components/metrics/test/test_metrics_log_uploader.h
@@ -14,6 +14,10 @@ public: explicit TestMetricsLogUploader( const MetricsLogUploader::UploadCallback& on_upload_complete); + + TestMetricsLogUploader(const TestMetricsLogUploader&) = delete; + TestMetricsLogUploader& operator=(const TestMetricsLogUploader&) = delete; + ~TestMetricsLogUploader() override; // Mark the current upload complete with the given response code. @@ -34,8 +38,6 @@ const MetricsLogUploader::UploadCallback on_upload_complete_; ReportingInfo last_reporting_info_; bool is_uploading_; - - DISALLOW_COPY_AND_ASSIGN(TestMetricsLogUploader); }; } // namespace metrics
diff --git a/components/metrics/ui/screen_info_metrics_provider.h b/components/metrics/ui/screen_info_metrics_provider.h index edf9fae4..81c923c 100644 --- a/components/metrics/ui/screen_info_metrics_provider.h +++ b/components/metrics/ui/screen_info_metrics_provider.h
@@ -16,6 +16,11 @@ class ScreenInfoMetricsProvider : public MetricsProvider { public: ScreenInfoMetricsProvider(); + + ScreenInfoMetricsProvider(const ScreenInfoMetricsProvider&) = delete; + ScreenInfoMetricsProvider& operator=(const ScreenInfoMetricsProvider&) = + delete; + ~ScreenInfoMetricsProvider() override; // MetricsProvider: @@ -33,9 +38,6 @@ // Returns the number of monitors the user is using. virtual int GetScreenCount() const; - - private: - DISALLOW_COPY_AND_ASSIGN(ScreenInfoMetricsProvider); }; } // namespace metrics
diff --git a/components/metrics/ui/screen_info_metrics_provider_unittest.cc b/components/metrics/ui/screen_info_metrics_provider_unittest.cc index 16125ad..a3a0e11 100644 --- a/components/metrics/ui/screen_info_metrics_provider_unittest.cc +++ b/components/metrics/ui/screen_info_metrics_provider_unittest.cc
@@ -21,6 +21,11 @@ class TestScreenInfoMetricsProvider : public ScreenInfoMetricsProvider { public: TestScreenInfoMetricsProvider() {} + + TestScreenInfoMetricsProvider(const TestScreenInfoMetricsProvider&) = delete; + TestScreenInfoMetricsProvider& operator=( + const TestScreenInfoMetricsProvider&) = delete; + ~TestScreenInfoMetricsProvider() override {} private: @@ -33,8 +38,6 @@ } int GetScreenCount() const override { return kScreenCount; } - - DISALLOW_COPY_AND_ASSIGN(TestScreenInfoMetricsProvider); }; } // namespace @@ -42,10 +45,12 @@ class ScreenInfoMetricsProviderTest : public testing::Test { public: ScreenInfoMetricsProviderTest() {} - ~ScreenInfoMetricsProviderTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(ScreenInfoMetricsProviderTest); + ScreenInfoMetricsProviderTest(const ScreenInfoMetricsProviderTest&) = delete; + ScreenInfoMetricsProviderTest& operator=( + const ScreenInfoMetricsProviderTest&) = delete; + + ~ScreenInfoMetricsProviderTest() override {} }; TEST_F(ScreenInfoMetricsProviderTest, ProvideSystemProfileMetrics) {
diff --git a/components/metrics/unsent_log_store.h b/components/metrics/unsent_log_store.h index b3d7a2e..d1bda77 100644 --- a/components/metrics/unsent_log_store.h +++ b/components/metrics/unsent_log_store.h
@@ -55,6 +55,10 @@ size_t min_log_bytes, size_t max_log_size, const std::string& signing_key); + + UnsentLogStore(const UnsentLogStore&) = delete; + UnsentLogStore& operator=(const UnsentLogStore&) = delete; + ~UnsentLogStore() override; // LogStore: @@ -196,8 +200,6 @@ // The total number of samples that have been sent from this LogStore. base::HistogramBase::Count total_samples_sent_ = 0; - - DISALLOW_COPY_AND_ASSIGN(UnsentLogStore); }; } // namespace metrics
diff --git a/components/metrics/unsent_log_store_metrics.h b/components/metrics/unsent_log_store_metrics.h index 013a0651..634aefed 100644 --- a/components/metrics/unsent_log_store_metrics.h +++ b/components/metrics/unsent_log_store_metrics.h
@@ -33,6 +33,10 @@ }; UnsentLogStoreMetrics(); + + UnsentLogStoreMetrics(const UnsentLogStoreMetrics&) = delete; + UnsentLogStoreMetrics& operator=(const UnsentLogStoreMetrics&) = delete; + virtual ~UnsentLogStoreMetrics(); virtual void RecordLogReadStatus(LogReadStatus status); @@ -51,9 +55,6 @@ // The feature to record the unsent log info metrics, refer to // UnsentLogStoreMetricsImpl::RecordLastUnsentLogMetadataMetrics. static const base::Feature kRecordLastUnsentLogMetadataMetrics; - - private: - DISALLOW_COPY_AND_ASSIGN(UnsentLogStoreMetrics); }; } // namespace metrics
diff --git a/components/metrics/unsent_log_store_metrics_impl.h b/components/metrics/unsent_log_store_metrics_impl.h index e579e00..d9977b0 100644 --- a/components/metrics/unsent_log_store_metrics_impl.h +++ b/components/metrics/unsent_log_store_metrics_impl.h
@@ -14,6 +14,11 @@ class UnsentLogStoreMetricsImpl : public UnsentLogStoreMetrics { public: UnsentLogStoreMetricsImpl() {} + + UnsentLogStoreMetricsImpl(const UnsentLogStoreMetricsImpl&) = delete; + UnsentLogStoreMetricsImpl& operator=(const UnsentLogStoreMetricsImpl&) = + delete; + ~UnsentLogStoreMetricsImpl() override {} // UnsentLogStoreMetrics: @@ -24,9 +29,6 @@ void RecordLastUnsentLogMetadataMetrics(int unsent_samples_count, int sent_samples_count, int persisted_size_in_kb) override; - - private: - DISALLOW_COPY_AND_ASSIGN(UnsentLogStoreMetricsImpl); }; } // namespace metrics
diff --git a/components/metrics_services_manager/metrics_services_manager.h b/components/metrics_services_manager/metrics_services_manager.h index 5d5725a..cc490e8 100644 --- a/components/metrics_services_manager/metrics_services_manager.h +++ b/components/metrics_services_manager/metrics_services_manager.h
@@ -40,6 +40,10 @@ // Creates the MetricsServicesManager with the given client. explicit MetricsServicesManager( std::unique_ptr<MetricsServicesManagerClient> client); + + MetricsServicesManager(const MetricsServicesManager&) = delete; + MetricsServicesManager& operator=(const MetricsServicesManager&) = delete; + virtual ~MetricsServicesManager(); // Instantiates the FieldTrialList using Chrome's default entropy provider. @@ -113,8 +117,6 @@ // The VariationsService, for server-side experiments infrastructure. std::unique_ptr<variations::VariationsService> variations_service_; - - DISALLOW_COPY_AND_ASSIGN(MetricsServicesManager); }; } // namespace metrics_services_manager
diff --git a/components/mirroring/browser/single_client_video_capture_host.cc b/components/mirroring/browser/single_client_video_capture_host.cc index 19977fd..2f645be 100644 --- a/components/mirroring/browser/single_client_video_capture_host.cc +++ b/components/mirroring/browser/single_client_video_capture_host.cc
@@ -23,6 +23,9 @@ base::WeakPtr<SingleClientVideoCaptureHost> host) : video_capture_host_(host) {} + DeviceLauncherCallbacks(const DeviceLauncherCallbacks&) = delete; + DeviceLauncherCallbacks& operator=(const DeviceLauncherCallbacks&) = delete; + ~DeviceLauncherCallbacks() override {} // content::VideoCaptureDeviceLauncher::Callbacks implementations @@ -44,8 +47,6 @@ private: base::WeakPtr<SingleClientVideoCaptureHost> video_capture_host_; - - DISALLOW_COPY_AND_ASSIGN(DeviceLauncherCallbacks); }; } // namespace
diff --git a/components/mirroring/browser/single_client_video_capture_host.h b/components/mirroring/browser/single_client_video_capture_host.h index 5b7a2fd..918615c 100644 --- a/components/mirroring/browser/single_client_video_capture_host.h +++ b/components/mirroring/browser/single_client_video_capture_host.h
@@ -41,6 +41,11 @@ SingleClientVideoCaptureHost(const std::string& device_id, blink::mojom::MediaStreamType type, DeviceLauncherCreateCallback callback); + + SingleClientVideoCaptureHost(const SingleClientVideoCaptureHost&) = delete; + SingleClientVideoCaptureHost& operator=(const SingleClientVideoCaptureHost&) = + delete; + ~SingleClientVideoCaptureHost() override; // media::mojom::VideoCaptureHost implementations @@ -128,8 +133,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<SingleClientVideoCaptureHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SingleClientVideoCaptureHost); }; } // namespace mirroring
diff --git a/components/mirroring/browser/single_client_video_capture_host_unittest.cc b/components/mirroring/browser/single_client_video_capture_host_unittest.cc index 7ad8247..a363057 100644 --- a/components/mirroring/browser/single_client_video_capture_host_unittest.cc +++ b/components/mirroring/browser/single_client_video_capture_host_unittest.cc
@@ -28,6 +28,10 @@ : public content::LaunchedVideoCaptureDevice { public: MockVideoCaptureDevice() {} + + MockVideoCaptureDevice(const MockVideoCaptureDevice&) = delete; + MockVideoCaptureDevice& operator=(const MockVideoCaptureDevice&) = delete; + ~MockVideoCaptureDevice() override {} void GetPhotoState( VideoCaptureDevice::GetPhotoStateCallback callback) override {} @@ -41,9 +45,6 @@ MOCK_METHOD0(ResumeDevice, void()); MOCK_METHOD0(RequestRefreshFrame, void()); MOCK_METHOD2(OnUtilizationReport, void(int, media::VideoCaptureFeedback)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockVideoCaptureDevice); }; class FakeDeviceLauncher final : public content::VideoCaptureDeviceLauncher { @@ -55,6 +56,9 @@ explicit FakeDeviceLauncher(DeviceLaunchedCallback launched_cb) : after_launch_cb_(std::move(launched_cb)) {} + FakeDeviceLauncher(const FakeDeviceLauncher&) = delete; + FakeDeviceLauncher& operator=(const FakeDeviceLauncher&) = delete; + ~FakeDeviceLauncher() override {} // content::VideoCaptureDeviceLauncher implementation. @@ -86,17 +90,17 @@ DeviceLaunchedCallback after_launch_cb_; base::WeakPtrFactory<FakeDeviceLauncher> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(FakeDeviceLauncher); }; class StubReadWritePermission final : public VideoCaptureDevice::Client::Buffer::ScopedAccessPermission { public: StubReadWritePermission() {} - ~StubReadWritePermission() override {} - private: - DISALLOW_COPY_AND_ASSIGN(StubReadWritePermission); + StubReadWritePermission(const StubReadWritePermission&) = delete; + StubReadWritePermission& operator=(const StubReadWritePermission&) = delete; + + ~StubReadWritePermission() override {} }; class MockVideoCaptureObserver final
diff --git a/components/mirroring/service/captured_audio_input.h b/components/mirroring/service/captured_audio_input.h index a67abf32..cc4d557 100644 --- a/components/mirroring/service/captured_audio_input.h +++ b/components/mirroring/service/captured_audio_input.h
@@ -31,6 +31,10 @@ const media::AudioParameters& params, uint32_t total_segments)>; explicit CapturedAudioInput(StreamCreatorCallback callback); + + CapturedAudioInput(const CapturedAudioInput&) = delete; + CapturedAudioInput& operator=(const CapturedAudioInput&) = delete; + ~CapturedAudioInput() override; private: @@ -63,8 +67,6 @@ stream_creator_client_receiver_{this}; media::AudioInputIPCDelegate* delegate_ = nullptr; mojo::Remote<media::mojom::AudioInputStream> stream_; - - DISALLOW_COPY_AND_ASSIGN(CapturedAudioInput); }; } // namespace mirroring
diff --git a/components/mirroring/service/captured_audio_input_unittest.cc b/components/mirroring/service/captured_audio_input_unittest.cc index 102263db..117363c 100644 --- a/components/mirroring/service/captured_audio_input_unittest.cc +++ b/components/mirroring/service/captured_audio_input_unittest.cc
@@ -56,6 +56,9 @@ public: CapturedAudioInputTest() {} + CapturedAudioInputTest(const CapturedAudioInputTest&) = delete; + CapturedAudioInputTest& operator=(const CapturedAudioInputTest&) = delete; + ~CapturedAudioInputTest() override { task_environment_.RunUntilIdle(); } void CreateMockStream( @@ -155,8 +158,6 @@ MockStream* stream_ = nullptr; mojo::Remote<media::mojom::AudioInputStreamClient> stream_client_; base::CancelableSyncSocket socket_; - - DISALLOW_COPY_AND_ASSIGN(CapturedAudioInputTest); }; TEST_F(CapturedAudioInputTest, CreateStream) {
diff --git a/components/mirroring/service/fake_network_service.h b/components/mirroring/service/fake_network_service.h index b8c9c94b..bc985eb 100644 --- a/components/mirroring/service/fake_network_service.h +++ b/components/mirroring/service/fake_network_service.h
@@ -23,6 +23,10 @@ MockUdpSocket( mojo::PendingReceiver<network::mojom::UDPSocket> receiver, mojo::PendingRemote<network::mojom::UDPSocketListener> listener); + + MockUdpSocket(const MockUdpSocket&) = delete; + MockUdpSocket& operator=(const MockUdpSocket&) = delete; + ~MockUdpSocket() override; MOCK_METHOD0(OnSend, void()); @@ -65,14 +69,16 @@ mojo::Remote<network::mojom::UDPSocketListener> listener_; std::unique_ptr<media::cast::Packet> sending_packet_; int num_ask_for_receive_ = 0; - - DISALLOW_COPY_AND_ASSIGN(MockUdpSocket); }; class MockNetworkContext : public network::TestNetworkContext { public: explicit MockNetworkContext( mojo::PendingReceiver<network::mojom::NetworkContext> receiver); + + MockNetworkContext(const MockNetworkContext&) = delete; + MockNetworkContext& operator=(const MockNetworkContext&) = delete; + ~MockNetworkContext() override; MOCK_METHOD0(OnUDPSocketCreated, void()); @@ -90,7 +96,6 @@ private: mojo::Receiver<network::mojom::NetworkContext> receiver_; std::unique_ptr<MockUdpSocket> udp_socket_; - DISALLOW_COPY_AND_ASSIGN(MockNetworkContext); }; } // namespace mirroring
diff --git a/components/mirroring/service/fake_video_capture_host.h b/components/mirroring/service/fake_video_capture_host.h index 7a5bd6d..fc7e2cab0 100644 --- a/components/mirroring/service/fake_video_capture_host.h +++ b/components/mirroring/service/fake_video_capture_host.h
@@ -20,6 +20,10 @@ public: explicit FakeVideoCaptureHost( mojo::PendingReceiver<media::mojom::VideoCaptureHost> receiver); + + FakeVideoCaptureHost(const FakeVideoCaptureHost&) = delete; + FakeVideoCaptureHost& operator=(const FakeVideoCaptureHost&) = delete; + ~FakeVideoCaptureHost() override; // mojom::VideoCaptureHost implementations @@ -60,8 +64,6 @@ private: mojo::Receiver<media::mojom::VideoCaptureHost> receiver_; mojo::Remote<media::mojom::VideoCaptureObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(FakeVideoCaptureHost); }; } // namespace mirroring
diff --git a/components/mirroring/service/media_remoter.h b/components/mirroring/service/media_remoter.h index 950fd1cd..803bf32 100644 --- a/components/mirroring/service/media_remoter.h +++ b/components/mirroring/service/media_remoter.h
@@ -65,6 +65,9 @@ const media::mojom::RemotingSinkMetadata& sink_metadata, MessageDispatcher* message_dispatcher); + MediaRemoter(const MediaRemoter&) = delete; + MediaRemoter& operator=(const MediaRemoter&) = delete; + ~MediaRemoter() override; // Callback from |message_dispatcher_| for received RPC messages. @@ -144,8 +147,6 @@ } state_; base::WeakPtrFactory<MediaRemoter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MediaRemoter); }; } // namespace mirroring
diff --git a/components/mirroring/service/message_dispatcher.cc b/components/mirroring/service/message_dispatcher.cc index 27cc61c..124b2cfe 100644 --- a/components/mirroring/service/message_dispatcher.cc +++ b/components/mirroring/service/message_dispatcher.cc
@@ -19,6 +19,9 @@ public: RequestHolder() {} + RequestHolder(const RequestHolder&) = delete; + RequestHolder& operator=(const RequestHolder&) = delete; + ~RequestHolder() {} void Start(const base::TimeDelta& timeout, @@ -45,8 +48,6 @@ OnceResponseCallback response_callback_; base::OneShotTimer timer_; int32_t sequence_number_ = -1; - - DISALLOW_COPY_AND_ASSIGN(RequestHolder); }; MessageDispatcher::MessageDispatcher(
diff --git a/components/mirroring/service/message_dispatcher.h b/components/mirroring/service/message_dispatcher.h index d5433ab..4596c9f 100644 --- a/components/mirroring/service/message_dispatcher.h +++ b/components/mirroring/service/message_dispatcher.h
@@ -29,6 +29,10 @@ mojo::PendingRemote<mojom::CastMessageChannel> outbound_channel, mojo::PendingReceiver<mojom::CastMessageChannel> inbound_channel, ErrorCallback error_callback); + + MessageDispatcher(const MessageDispatcher&) = delete; + MessageDispatcher& operator=(const MessageDispatcher&) = delete; + ~MessageDispatcher() override; using ResponseCallback = @@ -75,8 +79,6 @@ // Holds callbacks for different types of responses. base::flat_map<ResponseType, ResponseCallback> callback_map_; - - DISALLOW_COPY_AND_ASSIGN(MessageDispatcher); }; } // namespace mirroring
diff --git a/components/mirroring/service/message_dispatcher_unittest.cc b/components/mirroring/service/message_dispatcher_unittest.cc index 6312d4e..5cec51d 100644 --- a/components/mirroring/service/message_dispatcher_unittest.cc +++ b/components/mirroring/service/message_dispatcher_unittest.cc
@@ -75,6 +75,10 @@ base::BindRepeating(&MessageDispatcherTest::OnRpcMessage, base::Unretained(this))); } + + MessageDispatcherTest(const MessageDispatcherTest&) = delete; + MessageDispatcherTest& operator=(const MessageDispatcherTest&) = delete; + ~MessageDispatcherTest() override { task_environment_.RunUntilIdle(); } void OnParsingError(const std::string& error_message) { @@ -111,7 +115,6 @@ private: mojo::Receiver<mojom::CastMessageChannel> receiver_{this}; mojo::Remote<mojom::CastMessageChannel> inbound_channel_; - DISALLOW_COPY_AND_ASSIGN(MessageDispatcherTest); }; TEST_F(MessageDispatcherTest, SendsOutboundMessage) {
diff --git a/components/mirroring/service/mirror_settings.h b/components/mirroring/service/mirror_settings.h index a8ce601..aa03cec 100644 --- a/components/mirroring/service/mirror_settings.h +++ b/components/mirroring/service/mirror_settings.h
@@ -23,6 +23,10 @@ class COMPONENT_EXPORT(MIRRORING_SERVICE) MirrorSettings { public: MirrorSettings(); + + MirrorSettings(const MirrorSettings&) = delete; + MirrorSettings& operator=(const MirrorSettings&) = delete; + ~MirrorSettings(); // Get the audio/video config with given codec. @@ -52,8 +56,6 @@ int max_width_; int max_height_; bool enable_sender_side_letterboxing_ = true; - - DISALLOW_COPY_AND_ASSIGN(MirrorSettings); }; } // namespace mirroring
diff --git a/components/mirroring/service/mirroring_service.h b/components/mirroring/service/mirroring_service.h index e2590aa..671dbd69 100644 --- a/components/mirroring/service/mirroring_service.h +++ b/components/mirroring/service/mirroring_service.h
@@ -21,6 +21,10 @@ public: MirroringService(mojo::PendingReceiver<mojom::MirroringService> receiver, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + + MirroringService(const MirroringService&) = delete; + MirroringService& operator=(const MirroringService&) = delete; + ~MirroringService() override; private: @@ -38,8 +42,6 @@ mojo::Receiver<mojom::MirroringService> receiver_; const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; std::unique_ptr<Session> session_; // Current mirroring session. - - DISALLOW_COPY_AND_ASSIGN(MirroringService); }; } // namespace mirroring
diff --git a/components/mirroring/service/receiver_response_unittest.cc b/components/mirroring/service/receiver_response_unittest.cc index 9005612d..5c306fc 100644 --- a/components/mirroring/service/receiver_response_unittest.cc +++ b/components/mirroring/service/receiver_response_unittest.cc
@@ -22,10 +22,11 @@ class ReceiverResponseTest : public ::testing::Test { public: ReceiverResponseTest() {} - ~ReceiverResponseTest() override {} - private: - DISALLOW_COPY_AND_ASSIGN(ReceiverResponseTest); + ReceiverResponseTest(const ReceiverResponseTest&) = delete; + ReceiverResponseTest& operator=(const ReceiverResponseTest&) = delete; + + ~ReceiverResponseTest() override {} }; TEST_F(ReceiverResponseTest, ParseValidJson) {
diff --git a/components/mirroring/service/receiver_setup_querier_unittest.cc b/components/mirroring/service/receiver_setup_querier_unittest.cc index 5709a74..3f234f28 100644 --- a/components/mirroring/service/receiver_setup_querier_unittest.cc +++ b/components/mirroring/service/receiver_setup_querier_unittest.cc
@@ -27,6 +27,10 @@ public: ReceiverSetupQuerierTest() : receiver_address_(media::cast::test::GetFreeLocalPort().address()) {} + + ReceiverSetupQuerierTest(const ReceiverSetupQuerierTest&) = delete; + ReceiverSetupQuerierTest& operator=(const ReceiverSetupQuerierTest&) = delete; + ~ReceiverSetupQuerierTest() override = default; protected: @@ -57,8 +61,6 @@ const net::IPAddress receiver_address_; network::TestURLLoaderFactory* url_loader_factory_ = nullptr; std::unique_ptr<ReceiverSetupQuerier> setup_querier_; - - DISALLOW_COPY_AND_ASSIGN(ReceiverSetupQuerierTest); }; TEST_F(ReceiverSetupQuerierTest, ValidSetupInfo) {
diff --git a/components/mirroring/service/remoting_sender.h b/components/mirroring/service/remoting_sender.h index ac3ac21..b865c41e 100644 --- a/components/mirroring/service/remoting_sender.h +++ b/components/mirroring/service/remoting_sender.h
@@ -43,6 +43,10 @@ mojo::PendingReceiver<media::mojom::RemotingDataStreamSender> stream_sender, base::OnceClosure error_callback); + + RemotingSender(const RemotingSender&) = delete; + RemotingSender& operator=(const RemotingSender&) = delete; + ~RemotingSender() override; private: @@ -118,8 +122,6 @@ // NOTE: Weak pointers must be invalidated before all other member variables. base::WeakPtrFactory<RemotingSender> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RemotingSender); }; } // namespace mirroring
diff --git a/components/mirroring/service/remoting_sender_unittest.cc b/components/mirroring/service/remoting_sender_unittest.cc index ec55a8f..ed7aa7d9 100644 --- a/components/mirroring/service/remoting_sender_unittest.cc +++ b/components/mirroring/service/remoting_sender_unittest.cc
@@ -33,6 +33,10 @@ class FakeTransport final : public media::cast::CastTransport { public: FakeTransport() = default; + + FakeTransport(const FakeTransport&) = delete; + FakeTransport& operator=(const FakeTransport&) = delete; + ~FakeTransport() override = default; void TakeSentFrames(std::vector<media::cast::EncodedFrame>* frames) { @@ -97,8 +101,6 @@ base::RepeatingClosure kickstarted_callback_; media::cast::FrameId kickstarted_frame_id_; - - DISALLOW_COPY_AND_ASSIGN(FakeTransport); }; } // namespace
diff --git a/components/mirroring/service/rtp_stream.h b/components/mirroring/service/rtp_stream.h index 48ec8331..2a7d7f6 100644 --- a/components/mirroring/service/rtp_stream.h +++ b/components/mirroring/service/rtp_stream.h
@@ -60,6 +60,10 @@ public: VideoRtpStream(std::unique_ptr<media::cast::VideoSender> video_sender, base::WeakPtr<RtpStreamClient> client); + + VideoRtpStream(const VideoRtpStream&) = delete; + VideoRtpStream& operator=(const VideoRtpStream&) = delete; + ~VideoRtpStream(); // Called by VideoCaptureClient when a video frame is received. @@ -84,8 +88,6 @@ // Set to true when a request for a refresh frame has been made. This is // cleared once the next frame is received. bool expecting_a_refresh_frame_; - - DISALLOW_COPY_AND_ASSIGN(VideoRtpStream); }; // Receives audio data and submits the data to media::cast::AudioSender. @@ -94,6 +96,10 @@ public: AudioRtpStream(std::unique_ptr<media::cast::AudioSender> audio_sender, base::WeakPtr<RtpStreamClient> client); + + AudioRtpStream(const AudioRtpStream&) = delete; + AudioRtpStream& operator=(const AudioRtpStream&) = delete; + ~AudioRtpStream(); // Called by AudioCaptureClient when new audio data is available. @@ -105,8 +111,6 @@ private: const std::unique_ptr<media::cast::AudioSender> audio_sender_; const base::WeakPtr<RtpStreamClient> client_; - - DISALLOW_COPY_AND_ASSIGN(AudioRtpStream); }; } // namespace mirroring
diff --git a/components/mirroring/service/rtp_stream_unittest.cc b/components/mirroring/service/rtp_stream_unittest.cc index 3810392..85142b2 100644 --- a/components/mirroring/service/rtp_stream_unittest.cc +++ b/components/mirroring/service/rtp_stream_unittest.cc
@@ -32,6 +32,10 @@ class DummyClient final : public RtpStreamClient { public: DummyClient() {} + + DummyClient(const DummyClient&) = delete; + DummyClient& operator=(const DummyClient&) = delete; + ~DummyClient() override {} // RtpStreamClient implementation. @@ -46,8 +50,6 @@ private: base::WeakPtrFactory<DummyClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DummyClient); }; } // namespace @@ -63,6 +65,9 @@ testing_clock_.Advance(base::TimeTicks::Now() - base::TimeTicks()); } + RtpStreamTest(const RtpStreamTest&) = delete; + RtpStreamTest& operator=(const RtpStreamTest&) = delete; + ~RtpStreamTest() override { task_environment_.RunUntilIdle(); } protected: @@ -71,9 +76,6 @@ const scoped_refptr<media::cast::CastEnvironment> cast_environment_; DummyClient client_; media::cast::MockCastTransport transport_; - - private: - DISALLOW_COPY_AND_ASSIGN(RtpStreamTest); }; // Test the video streaming pipeline.
diff --git a/components/mirroring/service/session.cc b/components/mirroring/service/session.cc index 9e6f4ad1..6fd1d021 100644 --- a/components/mirroring/service/session.cc +++ b/components/mirroring/service/session.cc
@@ -100,6 +100,10 @@ class TransportClient final : public media::cast::CastTransport::Client { public: explicit TransportClient(Session* session) : session_(session) {} + + TransportClient(const TransportClient&) = delete; + TransportClient& operator=(const TransportClient&) = delete; + ~TransportClient() override {} // media::cast::CastTransport::Client implementation. @@ -121,8 +125,6 @@ private: Session* const session_; // Outlives this class. - - DISALLOW_COPY_AND_ASSIGN(TransportClient); }; // Generates a string with cryptographically secure random bytes. @@ -335,6 +337,9 @@ DCHECK(!audio_data_callback_.is_null()); } + AudioCapturingCallback(const AudioCapturingCallback&) = delete; + AudioCapturingCallback& operator=(const AudioCapturingCallback&) = delete; + ~AudioCapturingCallback() override {} private: @@ -364,8 +369,6 @@ const AudioDataCallback audio_data_callback_; base::OnceClosure error_callback_; - - DISALLOW_COPY_AND_ASSIGN(AudioCapturingCallback); }; Session::Session(
diff --git a/components/mirroring/service/udp_socket_client.h b/components/mirroring/service/udp_socket_client.h index 420b742..5a908ea 100644 --- a/components/mirroring/service/udp_socket_client.h +++ b/components/mirroring/service/udp_socket_client.h
@@ -30,6 +30,9 @@ network::mojom::NetworkContext* context, base::OnceClosure error_callback); + UdpSocketClient(const UdpSocketClient&) = delete; + UdpSocketClient& operator=(const UdpSocketClient&) = delete; + ~UdpSocketClient() override; // media::cast::PacketTransport implementations. @@ -83,8 +86,6 @@ int num_packets_pending_receive_; base::WeakPtrFactory<UdpSocketClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UdpSocketClient); }; } // namespace mirroring
diff --git a/components/mirroring/service/udp_socket_client_unittest.cc b/components/mirroring/service/udp_socket_client_unittest.cc index 28e27b9..60d7c93 100644 --- a/components/mirroring/service/udp_socket_client_unittest.cc +++ b/components/mirroring/service/udp_socket_client_unittest.cc
@@ -37,6 +37,9 @@ base::OnceClosure()); } + UdpSocketClientTest(const UdpSocketClientTest&) = delete; + UdpSocketClientTest& operator=(const UdpSocketClientTest&) = delete; + ~UdpSocketClientTest() override = default; MOCK_METHOD0(OnReceivedPacketCall, void()); @@ -52,9 +55,6 @@ std::unique_ptr<MockNetworkContext> network_context_; std::unique_ptr<UdpSocketClient> udp_transport_client_; std::unique_ptr<Packet> received_packet_; - - private: - DISALLOW_COPY_AND_ASSIGN(UdpSocketClientTest); }; TEST_F(UdpSocketClientTest, SendAndReceive) {
diff --git a/components/mirroring/service/video_capture_client.h b/components/mirroring/service/video_capture_client.h index 5ae4be39..9cdf437 100644 --- a/components/mirroring/service/video_capture_client.h +++ b/components/mirroring/service/video_capture_client.h
@@ -35,6 +35,10 @@ public: VideoCaptureClient(const media::VideoCaptureParams& params, mojo::PendingRemote<media::mojom::VideoCaptureHost> host); + + VideoCaptureClient(const VideoCaptureClient&) = delete; + VideoCaptureClient& operator=(const VideoCaptureClient&) = delete; + ~VideoCaptureClient() override; using FrameDeliverCallback = base::RepeatingCallback<void( @@ -118,8 +122,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<VideoCaptureClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VideoCaptureClient); }; } // namespace mirroring
diff --git a/components/mirroring/service/video_capture_client_unittest.cc b/components/mirroring/service/video_capture_client_unittest.cc index 18e10462..de729206 100644 --- a/components/mirroring/service/video_capture_client_unittest.cc +++ b/components/mirroring/service/video_capture_client_unittest.cc
@@ -51,6 +51,9 @@ std::move(host)); } + VideoCaptureClientTest(const VideoCaptureClientTest&) = delete; + VideoCaptureClientTest& operator=(const VideoCaptureClientTest&) = delete; + ~VideoCaptureClientTest() override { if (client_) { base::RunLoop run_loop; @@ -118,8 +121,6 @@ base::MockCallback<base::OnceClosure> error_cb_; std::unique_ptr<FakeVideoCaptureHost> host_impl_; std::unique_ptr<VideoCaptureClient> client_; - - DISALLOW_COPY_AND_ASSIGN(VideoCaptureClientTest); }; TEST_P(VideoCaptureClientTest, Basic) {
diff --git a/components/nacl/broker/nacl_broker_listener.h b/components/nacl/broker/nacl_broker_listener.h index 6776ee2..58f8c956 100644 --- a/components/nacl/broker/nacl_broker_listener.h +++ b/components/nacl/broker/nacl_broker_listener.h
@@ -27,6 +27,10 @@ public IPC::Listener { public: NaClBrokerListener(); + + NaClBrokerListener(const NaClBrokerListener&) = delete; + NaClBrokerListener& operator=(const NaClBrokerListener&) = delete; + ~NaClBrokerListener() override; void Listen(); @@ -51,8 +55,6 @@ base::RunLoop run_loop_; base::Process browser_process_; std::unique_ptr<IPC::Channel> channel_; - - DISALLOW_COPY_AND_ASSIGN(NaClBrokerListener); }; #endif // COMPONENTS_NACL_BROKER_NACL_BROKER_LISTENER_H_
diff --git a/components/nacl/browser/nacl_broker_host_win.h b/components/nacl/browser/nacl_broker_host_win.h index 58071de..4c982633 100644 --- a/components/nacl/browser/nacl_broker_host_win.h +++ b/components/nacl/browser/nacl_broker_host_win.h
@@ -24,6 +24,10 @@ class NaClBrokerHost : public content::BrowserChildProcessHostDelegate { public: NaClBrokerHost(); + + NaClBrokerHost(const NaClBrokerHost&) = delete; + NaClBrokerHost& operator=(const NaClBrokerHost&) = delete; + ~NaClBrokerHost() override; // This function starts the broker process. It needs to be called @@ -59,8 +63,6 @@ std::unique_ptr<content::BrowserChildProcessHost> process_; bool is_terminating_; - - DISALLOW_COPY_AND_ASSIGN(NaClBrokerHost); }; } // namespace nacl
diff --git a/components/nacl/browser/nacl_process_host.h b/components/nacl/browser/nacl_process_host.h index d6833c90..b666810 100644 --- a/components/nacl/browser/nacl_process_host.h +++ b/components/nacl/browser/nacl_process_host.h
@@ -83,6 +83,10 @@ bool off_the_record, NaClAppProcessType process_type, const base::FilePath& profile_directory); + + NaClProcessHost(const NaClProcessHost&) = delete; + NaClProcessHost& operator=(const NaClProcessHost&) = delete; + ~NaClProcessHost() override; void OnProcessCrashed(int exit_status) override; @@ -247,8 +251,6 @@ static unsigned keepalive_throttle_interval_milliseconds_; base::WeakPtrFactory<NaClProcessHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NaClProcessHost); }; } // namespace nacl
diff --git a/components/nacl/browser/nacl_validation_cache.h b/components/nacl/browser/nacl_validation_cache.h index f6ef4bb..81d773e 100644 --- a/components/nacl/browser/nacl_validation_cache.h +++ b/components/nacl/browser/nacl_validation_cache.h
@@ -21,6 +21,10 @@ class NaClValidationCache { public: NaClValidationCache(); + + NaClValidationCache(const NaClValidationCache&) = delete; + NaClValidationCache& operator=(const NaClValidationCache&) = delete; + ~NaClValidationCache(); // Get the key used for HMACing validation signatures. This should be a @@ -64,8 +68,6 @@ ValidationCacheType validation_cache_; std::string validation_cache_key_; - - DISALLOW_COPY_AND_ASSIGN(NaClValidationCache); }; } // namespace nacl
diff --git a/components/nacl/browser/pnacl_host.h b/components/nacl/browser/pnacl_host.h index d89f695..4955da42 100644 --- a/components/nacl/browser/pnacl_host.h +++ b/components/nacl/browser/pnacl_host.h
@@ -46,6 +46,9 @@ // ever been started. static PnaclHost* GetInstance(); + PnaclHost(const PnaclHost&) = delete; + PnaclHost& operator=(const PnaclHost&) = delete; + // The PnaclHost instance is intentionally leaked on shutdown. DeInitIfSafe() // attempts to cleanup |disk_cache_| earlier, but if it fails to do so in // time, it will be too late when AtExitManager kicks in anway so subscribing @@ -191,7 +194,6 @@ std::unique_ptr<PnaclTranslationCache> disk_cache_; PendingTranslationMap pending_translations_; base::ThreadChecker thread_checker_; - DISALLOW_COPY_AND_ASSIGN(PnaclHost); }; } // namespace pnacl
diff --git a/components/nacl/browser/pnacl_translation_cache.h b/components/nacl/browser/pnacl_translation_cache.h index 6002e16..562ca72 100644 --- a/components/nacl/browser/pnacl_translation_cache.h +++ b/components/nacl/browser/pnacl_translation_cache.h
@@ -38,6 +38,10 @@ : public base::SupportsWeakPtr<PnaclTranslationCache> { public: PnaclTranslationCache(); + + PnaclTranslationCache(const PnaclTranslationCache&) = delete; + PnaclTranslationCache& operator=(const PnaclTranslationCache&) = delete; + virtual ~PnaclTranslationCache(); // Initialize the translation cache in |cache_dir|. If the return value is @@ -96,8 +100,6 @@ CompletionOnceCallback init_callback_; bool in_memory_; std::map<void*, scoped_refptr<PnaclTranslationCacheEntry> > open_entries_; - - DISALLOW_COPY_AND_ASSIGN(PnaclTranslationCache); }; } // namespace pnacl
diff --git a/components/nacl/browser/test_nacl_browser_delegate.h b/components/nacl/browser/test_nacl_browser_delegate.h index 5ee3d72e..7d9ec6f 100644 --- a/components/nacl/browser/test_nacl_browser_delegate.h +++ b/components/nacl/browser/test_nacl_browser_delegate.h
@@ -21,6 +21,10 @@ class TestNaClBrowserDelegate : public NaClBrowserDelegate { public: TestNaClBrowserDelegate(); + + TestNaClBrowserDelegate(const TestNaClBrowserDelegate&) = delete; + TestNaClBrowserDelegate& operator=(const TestNaClBrowserDelegate&) = delete; + ~TestNaClBrowserDelegate() override; void ShowMissingArchInfobar(int render_process_id, int render_view_id) override; @@ -38,9 +42,6 @@ bool URLMatchesDebugPatterns(const GURL& manifest_url) override; bool IsNonSfiModeAllowed(const base::FilePath& profile_directory, const GURL& manifest_url) override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestNaClBrowserDelegate); }; #endif // COMPONENTS_NACL_BROWSER_TEST_NACL_BROWSER_DELEGATE_H_
diff --git a/components/nacl/loader/nacl_ipc_adapter.cc b/components/nacl/loader/nacl_ipc_adapter.cc index d66a8d9..687d4a8f 100644 --- a/components/nacl/loader/nacl_ipc_adapter.cc +++ b/components/nacl/loader/nacl_ipc_adapter.cc
@@ -225,6 +225,10 @@ class NaClDescWrapper { public: explicit NaClDescWrapper(NaClDesc* desc): desc_(desc) {} + + NaClDescWrapper(const NaClDescWrapper&) = delete; + NaClDescWrapper& operator=(const NaClDescWrapper&) = delete; + ~NaClDescWrapper() { NaClDescUnref(desc_); } @@ -233,7 +237,6 @@ private: NaClDesc* desc_; - DISALLOW_COPY_AND_ASSIGN(NaClDescWrapper); }; std::unique_ptr<NaClDescWrapper> MakeShmRegionNaClDesc(
diff --git a/components/nacl/loader/nacl_listener.h b/components/nacl/loader/nacl_listener.h index 602503b..1d5f223 100644 --- a/components/nacl/loader/nacl_listener.h +++ b/components/nacl/loader/nacl_listener.h
@@ -33,6 +33,10 @@ class NaClListener : public IPC::Listener { public: NaClListener(); + + NaClListener(const NaClListener&) = delete; + NaClListener& operator=(const NaClListener&) = delete; + ~NaClListener() override; // Listen for a request to launch a NaCl module. void Listen(); @@ -118,8 +122,6 @@ PrefetchedResourceFilesMap prefetched_resource_files_; bool is_started_; - - DISALLOW_COPY_AND_ASSIGN(NaClListener); }; #endif // COMPONENTS_NACL_LOADER_NACL_LISTENER_H_
diff --git a/components/nacl/loader/nacl_trusted_listener.h b/components/nacl/loader/nacl_trusted_listener.h index 423076d..51cdd2b 100644 --- a/components/nacl/loader/nacl_trusted_listener.h +++ b/components/nacl/loader/nacl_trusted_listener.h
@@ -19,6 +19,10 @@ NaClTrustedListener( mojo::PendingRemote<nacl::mojom::NaClRendererHost> renderer_host, base::SingleThreadTaskRunner* io_task_runner); + + NaClTrustedListener(const NaClTrustedListener&) = delete; + NaClTrustedListener& operator=(const NaClTrustedListener&) = delete; + ~NaClTrustedListener(); nacl::mojom::NaClRendererHost* renderer_host() { @@ -27,8 +31,6 @@ private: mojo::Remote<nacl::mojom::NaClRendererHost> renderer_host_; - - DISALLOW_COPY_AND_ASSIGN(NaClTrustedListener); }; #endif // COMPONENTS_NACL_LOADER_NACL_TRUSTED_LISTENER_H_
diff --git a/components/nacl/loader/nacl_validation_db.h b/components/nacl/loader/nacl_validation_db.h index 59c8bc7..6c293ea 100644 --- a/components/nacl/loader/nacl_validation_db.h +++ b/components/nacl/loader/nacl_validation_db.h
@@ -12,13 +12,14 @@ class NaClValidationDB { public: NaClValidationDB() {} + + NaClValidationDB(const NaClValidationDB&) = delete; + NaClValidationDB& operator=(const NaClValidationDB&) = delete; + virtual ~NaClValidationDB() {} virtual bool QueryKnownToValidate(const std::string& signature) = 0; virtual void SetKnownToValidate(const std::string& signature) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(NaClValidationDB); }; #endif // COMPONENTS_NACL_LOADER_NACL_VALIDATION_DB_H_
diff --git a/components/nacl/loader/nonsfi/nonsfi_listener.h b/components/nacl/loader/nonsfi/nonsfi_listener.h index d673c291..72e7e05 100644 --- a/components/nacl/loader/nonsfi/nonsfi_listener.h +++ b/components/nacl/loader/nonsfi/nonsfi_listener.h
@@ -31,6 +31,10 @@ class NonSfiListener : public IPC::Listener { public: NonSfiListener(); + + NonSfiListener(const NonSfiListener&) = delete; + NonSfiListener& operator=(const NonSfiListener&) = delete; + ~NonSfiListener() override; // Listen for a request to launch a non-SFI NaCl module. @@ -48,8 +52,6 @@ std::unique_ptr<NaClTrustedListener> trusted_listener_; std::unique_ptr<std::map<std::string, int>> key_fd_map_; - - DISALLOW_COPY_AND_ASSIGN(NonSfiListener); }; } // namespace nonsfi
diff --git a/components/nacl/loader/nonsfi/nonsfi_main.cc b/components/nacl/loader/nonsfi/nonsfi_main.cc index 52dff46..30986c7 100644 --- a/components/nacl/loader/nonsfi/nonsfi_main.cc +++ b/components/nacl/loader/nonsfi/nonsfi_main.cc
@@ -20,10 +20,16 @@ namespace nacl { namespace nonsfi { + namespace { typedef void (*EntryPointType)(uintptr_t*); +// Default stack size of the plugin main thread. We heuristically chose 16M. +const size_t kStackSize = (16 << 20); + +} // namespace + class PluginMainDelegate : public base::PlatformThread::Delegate { public: explicit PluginMainDelegate(EntryPointType entry_point) @@ -37,7 +43,7 @@ // This will only happen once per process, so we give the permission to // create Singletons. - base::ThreadRestrictions::SetSingletonAllowed(true); + base::PermanentSingletonAllowance::AllowSingleton(); uintptr_t info[] = { 0, // Do not use fini. 0, // envc. @@ -56,11 +62,6 @@ EntryPointType entry_point_; }; -// Default stack size of the plugin main thread. We heuristically chose 16M. -const size_t kStackSize = (16 << 20); - -} // namespace - void MainStart(int nexe_file) { EntryPointType entry_point = reinterpret_cast<EntryPointType>(NaClLoadElfFile(nexe_file));
diff --git a/components/nacl/loader/nonsfi/nonsfi_sandbox.h b/components/nacl/loader/nonsfi/nonsfi_sandbox.h index ba7f0f48..4dbc2fa 100644 --- a/components/nacl/loader/nonsfi/nonsfi_sandbox.h +++ b/components/nacl/loader/nonsfi/nonsfi_sandbox.h
@@ -19,6 +19,11 @@ class NaClNonSfiBPFSandboxPolicy : public sandbox::bpf_dsl::Policy { public: explicit NaClNonSfiBPFSandboxPolicy(); + + NaClNonSfiBPFSandboxPolicy(const NaClNonSfiBPFSandboxPolicy&) = delete; + NaClNonSfiBPFSandboxPolicy& operator=(const NaClNonSfiBPFSandboxPolicy&) = + delete; + ~NaClNonSfiBPFSandboxPolicy() override; sandbox::bpf_dsl::ResultExpr EvaluateSyscall(int sysno) const override; @@ -27,8 +32,6 @@ private: // The PID that the policy applies to (should be equal to the current pid). const pid_t policy_pid_; - - DISALLOW_COPY_AND_ASSIGN(NaClNonSfiBPFSandboxPolicy); }; // Initializes seccomp-bpf sandbox for non-SFI NaCl. Returns false on
diff --git a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc index 553b861..55241d4 100644 --- a/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc +++ b/components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc
@@ -605,6 +605,10 @@ class TgkillDelegate : public sandbox::BPFTesterDelegate { public: TgkillDelegate() {} + + TgkillDelegate(const TgkillDelegate&) = delete; + TgkillDelegate& operator=(const TgkillDelegate&) = delete; + ~TgkillDelegate() override {} std::unique_ptr<sandbox::bpf_dsl::Policy> GetSandboxBPFPolicy() override { @@ -625,9 +629,6 @@ // These are longs as a temporary workaround for crbug.com/532992. long pid_; long tid_; - - private: - DISALLOW_COPY_AND_ASSIGN(TgkillDelegate); }; void BPF_TEST_D_tgkill_with_invalid_signal(int pid, int tid) {
diff --git a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc index 15f950d3..547633f 100644 --- a/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc +++ b/components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc
@@ -56,6 +56,10 @@ // whenever kEnableNaClDebug is passed. enable_nacl_debug_ = command_line->HasSwitch(switches::kEnableNaClDebug); } + + NaClBPFSandboxPolicy(const NaClBPFSandboxPolicy&) = delete; + NaClBPFSandboxPolicy& operator=(const NaClBPFSandboxPolicy&) = delete; + ~NaClBPFSandboxPolicy() override {} ResultExpr EvaluateSyscall(int system_call_number) const override; @@ -67,8 +71,6 @@ std::unique_ptr<sandbox::bpf_dsl::Policy> baseline_policy_; bool enable_nacl_debug_; const pid_t policy_pid_; - - DISALLOW_COPY_AND_ASSIGN(NaClBPFSandboxPolicy); }; ResultExpr NaClBPFSandboxPolicy::EvaluateSyscall(int sysno) const {
diff --git a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h index 1f0b308..cc811ba 100644 --- a/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h +++ b/components/nacl/loader/sandbox_linux/nacl_sandbox_linux.h
@@ -38,6 +38,10 @@ class NaClSandbox { public: NaClSandbox(); + + NaClSandbox(const NaClSandbox&) = delete; + NaClSandbox& operator=(const NaClSandbox&) = delete; + ~NaClSandbox(); // This API will only work if the layer-1 sandbox is not sealed and the @@ -79,7 +83,6 @@ // enforcing. base::ScopedFD proc_fd_; std::unique_ptr<sandbox::SetuidSandboxClient> setuid_sandbox_client_; - DISALLOW_COPY_AND_ASSIGN(NaClSandbox); }; } // namespace nacl
diff --git a/components/nacl/renderer/manifest_service_channel.h b/components/nacl/renderer/manifest_service_channel.h index 8350799..16077df2 100644 --- a/components/nacl/renderer/manifest_service_channel.h +++ b/components/nacl/renderer/manifest_service_channel.h
@@ -51,6 +51,10 @@ base::OnceCallback<void(int32_t)> connected_callback, std::unique_ptr<Delegate> delegate, base::WaitableEvent* waitable_event); + + ManifestServiceChannel(const ManifestServiceChannel&) = delete; + ManifestServiceChannel& operator=(const ManifestServiceChannel&) = delete; + ~ManifestServiceChannel() override; void Send(IPC::Message* message); @@ -76,8 +80,6 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate the weak pointers before any other members are destroyed. base::WeakPtrFactory<ManifestServiceChannel> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ManifestServiceChannel); }; } // namespace nacl
diff --git a/components/nacl/renderer/nacl_helper.h b/components/nacl/renderer/nacl_helper.h index ea08a10..8b0df7a 100644 --- a/components/nacl/renderer/nacl_helper.h +++ b/components/nacl/renderer/nacl_helper.h
@@ -18,6 +18,10 @@ class NaClHelper : public content::RenderFrameObserver { public: explicit NaClHelper(content::RenderFrame* render_frame); + + NaClHelper(const NaClHelper&) = delete; + NaClHelper& operator=(const NaClHelper&) = delete; + ~NaClHelper() override; // RenderFrameObserver. @@ -26,8 +30,6 @@ private: // RenderFrameObserver implementation. void OnDestruct() override; - - DISALLOW_COPY_AND_ASSIGN(NaClHelper); }; } // namespace nacl
diff --git a/components/nacl/renderer/nexe_load_manager.h b/components/nacl/renderer/nexe_load_manager.h index 56c6f568..781095d 100644 --- a/components/nacl/renderer/nexe_load_manager.h +++ b/components/nacl/renderer/nexe_load_manager.h
@@ -33,6 +33,10 @@ class NexeLoadManager { public: explicit NexeLoadManager(PP_Instance instance); + + NexeLoadManager(const NexeLoadManager&) = delete; + NexeLoadManager& operator=(const NexeLoadManager&) = delete; + ~NexeLoadManager(); void NexeFileDidOpen(int32_t pp_error, @@ -123,9 +127,6 @@ bool nonsfi() const { return nonsfi_; } void set_nonsfi(bool nonsfi) { nonsfi_ = nonsfi; } - private: - DISALLOW_COPY_AND_ASSIGN(NexeLoadManager); - void ReportDeadNexe(); // Copies a crash log to the console, one line at a time.
diff --git a/components/nacl/renderer/plugin/nacl_subprocess.h b/components/nacl/renderer/plugin/nacl_subprocess.h index 2265ed9..75aaa44 100644 --- a/components/nacl/renderer/plugin/nacl_subprocess.h +++ b/components/nacl/renderer/plugin/nacl_subprocess.h
@@ -27,6 +27,10 @@ class NaClSubprocess { public: NaClSubprocess(); + + NaClSubprocess(const NaClSubprocess&) = delete; + NaClSubprocess& operator=(const NaClSubprocess&) = delete; + virtual ~NaClSubprocess(); ServiceRuntime* service_runtime() const { return service_runtime_.get(); } @@ -40,8 +44,6 @@ private: // The service runtime representing the NaCl module instance. std::unique_ptr<ServiceRuntime> service_runtime_; - - DISALLOW_COPY_AND_ASSIGN(NaClSubprocess); }; } // namespace plugin
diff --git a/components/nacl/renderer/plugin/pnacl_coordinator.h b/components/nacl/renderer/plugin/pnacl_coordinator.h index 31d9fe68..dceeeac 100644 --- a/components/nacl/renderer/plugin/pnacl_coordinator.h +++ b/components/nacl/renderer/plugin/pnacl_coordinator.h
@@ -49,6 +49,9 @@ // (2) ld links the object code in obj_file_ and produces a nexe in nexe_file_. class PnaclCoordinator { public: + PnaclCoordinator(const PnaclCoordinator&) = delete; + PnaclCoordinator& operator=(const PnaclCoordinator&) = delete; + virtual ~PnaclCoordinator(); // The factory method for translations. @@ -180,8 +183,6 @@ // It accesses fields of PnaclCoordinator so it must have a // shorter lifetime. std::unique_ptr<PnaclTranslateThread> translate_thread_; - - DISALLOW_COPY_AND_ASSIGN(PnaclCoordinator); }; //----------------------------------------------------------------------
diff --git a/components/nacl/renderer/plugin/pnacl_resources.h b/components/nacl/renderer/plugin/pnacl_resources.h index 85288df..1dfbafa2 100644 --- a/components/nacl/renderer/plugin/pnacl_resources.h +++ b/components/nacl/renderer/plugin/pnacl_resources.h
@@ -30,6 +30,10 @@ class PnaclResources { public: PnaclResources(Plugin* plugin, bool use_subzero); + + PnaclResources(const PnaclResources&) = delete; + PnaclResources& operator=(const PnaclResources&) = delete; + virtual ~PnaclResources(); // Read the resource info JSON file. This is the first step after @@ -51,8 +55,6 @@ bool use_subzero_; PnaclResourceEntry resources_[NUM_TYPES + 1]; - - DISALLOW_COPY_AND_ASSIGN(PnaclResources); }; } // namespace plugin
diff --git a/components/nacl/renderer/plugin/pnacl_translate_thread.h b/components/nacl/renderer/plugin/pnacl_translate_thread.h index 8405f58..787ecfad 100644 --- a/components/nacl/renderer/plugin/pnacl_translate_thread.h +++ b/components/nacl/renderer/plugin/pnacl_translate_thread.h
@@ -30,6 +30,10 @@ class PnaclTranslateThread { public: PnaclTranslateThread(); + + PnaclTranslateThread(const PnaclTranslateThread&) = delete; + PnaclTranslateThread& operator=(const PnaclTranslateThread&) = delete; + ~PnaclTranslateThread(); // Set up the state for RunCompile and RunLink. When an error is @@ -168,9 +172,6 @@ // These IPC::SyncMessageFilters can be used by the child thread. scoped_refptr<IPC::SyncMessageFilter> compiler_channel_filter_; scoped_refptr<IPC::SyncMessageFilter> ld_channel_filter_; - - private: - DISALLOW_COPY_AND_ASSIGN(PnaclTranslateThread); }; }
diff --git a/components/nacl/renderer/plugin/service_runtime.h b/components/nacl/renderer/plugin/service_runtime.h index 392b905..31aea13 100644 --- a/components/nacl/renderer/plugin/service_runtime.h +++ b/components/nacl/renderer/plugin/service_runtime.h
@@ -48,6 +48,10 @@ PP_Instance pp_instance, bool main_service_runtime, bool uses_nonsfi_mode); + + ServiceRuntime(const ServiceRuntime&) = delete; + ServiceRuntime& operator=(const ServiceRuntime&) = delete; + // The destructor terminates the sel_ldr process. ~ServiceRuntime(); @@ -71,8 +75,6 @@ bool uses_nonsfi_mode_; std::unique_ptr<IPC::SyncChannel> translator_channel_; - - DISALLOW_COPY_AND_ASSIGN(ServiceRuntime); }; } // namespace plugin
diff --git a/components/nacl/renderer/ppb_nacl_private_impl.cc b/components/nacl/renderer/ppb_nacl_private_impl.cc index cf259cea..63a39ed 100644 --- a/components/nacl/renderer/ppb_nacl_private_impl.cc +++ b/components/nacl/renderer/ppb_nacl_private_impl.cc
@@ -232,6 +232,9 @@ ManifestServiceProxy(PP_Instance pp_instance, NaClAppProcessType process_type) : pp_instance_(pp_instance), process_type_(process_type) {} + ManifestServiceProxy(const ManifestServiceProxy&) = delete; + ManifestServiceProxy& operator=(const ManifestServiceProxy&) = delete; + ~ManifestServiceProxy() override {} void StartupInitializationComplete() override { @@ -319,7 +322,6 @@ PP_Instance pp_instance_; NaClAppProcessType process_type_; - DISALLOW_COPY_AND_ASSIGN(ManifestServiceProxy); }; std::unique_ptr<blink::WebAssociatedURLLoader> CreateAssociatedURLLoader(
diff --git a/components/nacl/renderer/trusted_plugin_channel.h b/components/nacl/renderer/trusted_plugin_channel.h index c87cb21..03dc1742 100644 --- a/components/nacl/renderer/trusted_plugin_channel.h +++ b/components/nacl/renderer/trusted_plugin_channel.h
@@ -23,6 +23,10 @@ TrustedPluginChannel(NexeLoadManager* nexe_load_manager, mojo::PendingReceiver<mojom::NaClRendererHost> receiver, bool is_helper_nexe); + + TrustedPluginChannel(const TrustedPluginChannel&) = delete; + TrustedPluginChannel& operator=(const TrustedPluginChannel&) = delete; + ~TrustedPluginChannel() override; private: @@ -42,8 +46,6 @@ mojo::Receiver<mojom::NaClRendererHost> receiver_; mojo::Remote<mojom::NaClExitControl> exit_control_; const bool is_helper_nexe_; - - DISALLOW_COPY_AND_ASSIGN(TrustedPluginChannel); }; } // namespace nacl
diff --git a/components/nacl/zygote/nacl_fork_delegate_linux.h b/components/nacl/zygote/nacl_fork_delegate_linux.h index 7d90d13..6aa8cb2 100644 --- a/components/nacl/zygote/nacl_fork_delegate_linux.h +++ b/components/nacl/zygote/nacl_fork_delegate_linux.h
@@ -32,6 +32,10 @@ class NaClForkDelegate : public content::ZygoteForkDelegate { public: explicit NaClForkDelegate(bool nonsfi_mode); + + NaClForkDelegate(const NaClForkDelegate&) = delete; + NaClForkDelegate& operator=(const NaClForkDelegate&) = delete; + ~NaClForkDelegate() override; void Init(int sandboxdesc, bool enable_layer1_sandbox) override; @@ -71,8 +75,6 @@ int fd_; FRIEND_TEST_ALL_PREFIXES(NaClForkDelegateLinuxTest, EnvPassthrough); - - DISALLOW_COPY_AND_ASSIGN(NaClForkDelegate); }; } // namespace nacl
diff --git a/components/navigation_interception/intercept_navigation_delegate.h b/components/navigation_interception/intercept_navigation_delegate.h index accf14ef..47beffc 100644 --- a/components/navigation_interception/intercept_navigation_delegate.h +++ b/components/navigation_interception/intercept_navigation_delegate.h
@@ -41,6 +41,11 @@ InterceptNavigationDelegate(JNIEnv* env, jobject jdelegate, bool escape_external_handler_value = false); + + InterceptNavigationDelegate(const InterceptNavigationDelegate&) = delete; + InterceptNavigationDelegate& operator=(const InterceptNavigationDelegate&) = + delete; + ~InterceptNavigationDelegate() override; // Associates the InterceptNavigationDelegate with a WebContents using the @@ -70,8 +75,6 @@ JavaObjectWeakGlobalRef weak_jdelegate_; base::TimeTicks last_user_gesture_carryover_timestamp_; bool escape_external_handler_value_ = false; - - DISALLOW_COPY_AND_ASSIGN(InterceptNavigationDelegate); }; } // namespace navigation_interception
diff --git a/components/navigation_interception/intercept_navigation_throttle.h b/components/navigation_interception/intercept_navigation_throttle.h index cd0de4d..a8a979de 100644 --- a/components/navigation_interception/intercept_navigation_throttle.h +++ b/components/navigation_interception/intercept_navigation_throttle.h
@@ -44,6 +44,11 @@ InterceptNavigationThrottle(content::NavigationHandle* navigation_handle, CheckCallback should_ignore_callback, SynchronyMode async_mode); + + InterceptNavigationThrottle(const InterceptNavigationThrottle&) = delete; + InterceptNavigationThrottle& operator=(const InterceptNavigationThrottle&) = + delete; + ~InterceptNavigationThrottle() override; // content::NavigationThrottle implementation: @@ -86,8 +91,6 @@ bool deferring_ = false; base::WeakPtrFactory<InterceptNavigationThrottle> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InterceptNavigationThrottle); }; } // namespace navigation_interception
diff --git a/components/net_log/net_export_file_writer.h b/components/net_log/net_export_file_writer.h index eb27c1ba..8480950 100644 --- a/components/net_log/net_export_file_writer.h +++ b/components/net_log/net_export_file_writer.h
@@ -85,6 +85,9 @@ // process. NetExportFileWriter(); + NetExportFileWriter(const NetExportFileWriter&) = delete; + NetExportFileWriter& operator=(const NetExportFileWriter&) = delete; + ~NetExportFileWriter(); // Attaches a StateObserver. |observer| will be notified of state changes to @@ -224,8 +227,6 @@ DirectoryGetter default_log_base_dir_getter_; base::WeakPtrFactory<NetExportFileWriter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NetExportFileWriter); }; } // namespace net_log
diff --git a/components/network_hints/browser/simple_network_hints_handler_impl.h b/components/network_hints/browser/simple_network_hints_handler_impl.h index 95397ac..dc1db15 100644 --- a/components/network_hints/browser/simple_network_hints_handler_impl.h +++ b/components/network_hints/browser/simple_network_hints_handler_impl.h
@@ -19,6 +19,11 @@ class SimpleNetworkHintsHandlerImpl : public mojom::NetworkHintsHandler { public: SimpleNetworkHintsHandlerImpl(int render_process_id, int render_frame_id); + + SimpleNetworkHintsHandlerImpl(const SimpleNetworkHintsHandlerImpl&) = delete; + SimpleNetworkHintsHandlerImpl& operator=( + const SimpleNetworkHintsHandlerImpl&) = delete; + ~SimpleNetworkHintsHandlerImpl() override; static void Create( @@ -32,8 +37,6 @@ private: const int render_process_id_; const int render_frame_id_; - - DISALLOW_COPY_AND_ASSIGN(SimpleNetworkHintsHandlerImpl); }; } // namespace network_hints
diff --git a/components/network_hints/renderer/dns_prefetch_queue.h b/components/network_hints/renderer/dns_prefetch_queue.h index 6f451eb..ebf5a05 100644 --- a/components/network_hints/renderer/dns_prefetch_queue.h +++ b/components/network_hints/renderer/dns_prefetch_queue.h
@@ -51,6 +51,10 @@ // length K to fit, you should actually construct a buffer with // an internal size of N*(K+1). explicit DnsQueue(BufferSize size); + + DnsQueue(const DnsQueue&) = delete; + DnsQueue& operator=(const DnsQueue&) = delete; + ~DnsQueue(void); size_t Size() const { return size_; } @@ -88,8 +92,6 @@ // Number of queued strings size_t size_; - - DISALLOW_COPY_AND_ASSIGN(DnsQueue); }; // class DnsQueue } // namespace network_hints
diff --git a/components/network_hints/renderer/renderer_dns_prefetch.h b/components/network_hints/renderer/renderer_dns_prefetch.h index 3ead6b3a..bd7be5c 100644 --- a/components/network_hints/renderer/renderer_dns_prefetch.h +++ b/components/network_hints/renderer/renderer_dns_prefetch.h
@@ -49,6 +49,10 @@ // expected to outlive instances of this class. It is safe to delete // instances of this class when |batch_handler| is called. explicit RendererDnsPrefetch(BatchHandler batch_handler); + + RendererDnsPrefetch(const RendererDnsPrefetch&) = delete; + RendererDnsPrefetch& operator=(const RendererDnsPrefetch&) = delete; + ~RendererDnsPrefetch(); // Push a name into the queue to be resolved. @@ -119,8 +123,6 @@ int numeric_ip_discard_count_; base::WeakPtrFactory<RendererDnsPrefetch> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RendererDnsPrefetch); }; // class RendererDnsPrefetch } // namespace network_hints
diff --git a/components/network_hints/renderer/web_prescient_networking_impl.h b/components/network_hints/renderer/web_prescient_networking_impl.h index 02ab643..f73224b5 100644 --- a/components/network_hints/renderer/web_prescient_networking_impl.h +++ b/components/network_hints/renderer/web_prescient_networking_impl.h
@@ -22,6 +22,11 @@ class WebPrescientNetworkingImpl : public blink::WebPrescientNetworking { public: explicit WebPrescientNetworkingImpl(content::RenderFrame* render_frame); + + WebPrescientNetworkingImpl(const WebPrescientNetworkingImpl&) = delete; + WebPrescientNetworkingImpl& operator=(const WebPrescientNetworkingImpl&) = + delete; + ~WebPrescientNetworkingImpl() override; // blink::WebPrescientNetworking methods: @@ -31,8 +36,6 @@ private: mojo::Remote<mojom::NetworkHintsHandler> handler_; RendererDnsPrefetch dns_prefetch_; - - DISALLOW_COPY_AND_ASSIGN(WebPrescientNetworkingImpl); }; } // namespace network_hints
diff --git a/components/network_time/network_time_test_utils.h b/components/network_time/network_time_test_utils.h index 7c797ec..f306189 100644 --- a/components/network_time/network_time_test_utils.h +++ b/components/network_time/network_time_test_utils.h
@@ -47,6 +47,10 @@ class FieldTrialTest { public: FieldTrialTest(); + + FieldTrialTest(const FieldTrialTest&) = delete; + FieldTrialTest& operator=(const FieldTrialTest&) = delete; + virtual ~FieldTrialTest(); void SetNetworkQueriesWithVariationsService( @@ -56,8 +60,6 @@ private: base::test::ScopedFeatureList scoped_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(FieldTrialTest); }; } // namespace network_time
diff --git a/components/network_time/network_time_tracker.h b/components/network_time/network_time_tracker.h index 65b8b4c..3a09c8a 100644 --- a/components/network_time/network_time_tracker.h +++ b/components/network_time/network_time_tracker.h
@@ -99,6 +99,10 @@ std::unique_ptr<const base::TickClock> tick_clock, PrefService* pref_service, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + NetworkTimeTracker(const NetworkTimeTracker&) = delete; + NetworkTimeTracker& operator=(const NetworkTimeTracker&) = delete; + ~NetworkTimeTracker(); // Sets |network_time| to an estimate of the true time. Returns @@ -226,8 +230,6 @@ std::vector<base::OnceClosure> fetch_completion_callbacks_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(NetworkTimeTracker); }; } // namespace network_time
diff --git a/components/network_time/network_time_tracker_unittest.cc b/components/network_time/network_time_tracker_unittest.cc index b0e484f..937bae7 100644 --- a/components/network_time/network_time_tracker_unittest.cc +++ b/components/network_time/network_time_tracker_unittest.cc
@@ -835,6 +835,12 @@ class MultipleGoodTimeResponseHandler { public: MultipleGoodTimeResponseHandler() {} + + MultipleGoodTimeResponseHandler(const MultipleGoodTimeResponseHandler&) = + delete; + MultipleGoodTimeResponseHandler& operator=( + const MultipleGoodTimeResponseHandler&) = delete; + ~MultipleGoodTimeResponseHandler() {} std::unique_ptr<net::test_server::HttpResponse> ResponseHandler( @@ -850,8 +856,6 @@ // and |kGoodTimeResponseServerProofHeaders| that will be used in the // response in the next ResponseHandler() call. unsigned int next_time_index_ = 0; - - DISALLOW_COPY_AND_ASSIGN(MultipleGoodTimeResponseHandler); }; std::unique_ptr<net::test_server::HttpResponse>
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_contents.h b/components/no_state_prefetch/browser/no_state_prefetch_contents.h index 1ce8556..9a7c195 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_contents.h +++ b/components/no_state_prefetch/browser/no_state_prefetch_contents.h
@@ -55,6 +55,10 @@ class Factory { public: Factory() {} + + Factory(const Factory&) = delete; + Factory& operator=(const Factory&) = delete; + virtual ~Factory() {} // Ownership is not transferred through this interface as @@ -68,9 +72,6 @@ const content::Referrer& referrer, const absl::optional<url::Origin>& initiator_origin, Origin origin) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Factory); }; class Observer {
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_link_manager.h b/components/no_state_prefetch/browser/no_state_prefetch_link_manager.h index ce29a4c..71ca9f4 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_link_manager.h +++ b/components/no_state_prefetch/browser/no_state_prefetch_link_manager.h
@@ -35,6 +35,11 @@ public NoStatePrefetchHandle::Observer { public: explicit NoStatePrefetchLinkManager(NoStatePrefetchManager* manager); + + NoStatePrefetchLinkManager(const NoStatePrefetchLinkManager&) = delete; + NoStatePrefetchLinkManager& operator=(const NoStatePrefetchLinkManager&) = + delete; + ~NoStatePrefetchLinkManager() override; // Called when a <link rel=prerender ...> element has been inserted into the @@ -145,8 +150,6 @@ // youngest at the back. Using std::unique_ptr<> here as LinkTrigger is not // copyable. std::list<std::unique_ptr<LinkTrigger>> triggers_; - - DISALLOW_COPY_AND_ASSIGN(NoStatePrefetchLinkManager); }; } // namespace prerender
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_manager.h b/components/no_state_prefetch/browser/no_state_prefetch_manager.h index 9c27c05..b7ab9cc 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_manager.h +++ b/components/no_state_prefetch/browser/no_state_prefetch_manager.h
@@ -85,6 +85,10 @@ NoStatePrefetchManager( content::BrowserContext* browser_context, std::unique_ptr<NoStatePrefetchManagerDelegate> delegate); + + NoStatePrefetchManager(const NoStatePrefetchManager&) = delete; + NoStatePrefetchManager& operator=(const NoStatePrefetchManager&) = delete; + ~NoStatePrefetchManager() override; // From KeyedService: @@ -299,6 +303,9 @@ std::unique_ptr<NoStatePrefetchContents> contents, base::TimeTicks expiry_time); + NoStatePrefetchData(const NoStatePrefetchData&) = delete; + NoStatePrefetchData& operator=(const NoStatePrefetchData&) = delete; + ~NoStatePrefetchData(); // A new NoStatePrefetchHandle has been created for this @@ -346,8 +353,6 @@ // After this time, this prefetch is no longer fresh, and should be removed. base::TimeTicks expiry_time_; - - DISALLOW_COPY_AND_ASSIGN(NoStatePrefetchData); }; // Called by a NoStatePrefetchData to signal that the launcher has navigated @@ -540,8 +545,6 @@ std::vector<std::unique_ptr<NoStatePrefetchManagerObserver>> observers_; base::WeakPtrFactory<NoStatePrefetchManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NoStatePrefetchManager); }; } // namespace prerender
diff --git a/components/no_state_prefetch/browser/prerender_history.h b/components/no_state_prefetch/browser/prerender_history.h index 0d77976..9b89cf6 100644 --- a/components/no_state_prefetch/browser/prerender_history.h +++ b/components/no_state_prefetch/browser/prerender_history.h
@@ -59,6 +59,10 @@ // Creates a history with capacity for |max_items| entries. explicit PrerenderHistory(size_t max_items); + + PrerenderHistory(const PrerenderHistory&) = delete; + PrerenderHistory& operator=(const PrerenderHistory&) = delete; + ~PrerenderHistory(); // Adds |entry| to the history. If at capacity, the oldest entry is dropped. @@ -75,8 +79,6 @@ size_t max_items_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PrerenderHistory); }; } // namespace prerender
diff --git a/components/no_state_prefetch/renderer/no_state_prefetch_helper.h b/components/no_state_prefetch/renderer/no_state_prefetch_helper.h index 6c7d64a..06a5000 100644 --- a/components/no_state_prefetch/renderer/no_state_prefetch_helper.h +++ b/components/no_state_prefetch/renderer/no_state_prefetch_helper.h
@@ -28,6 +28,9 @@ NoStatePrefetchHelper(content::RenderFrame* render_frame, const std::string& histogram_prefix); + NoStatePrefetchHelper(const NoStatePrefetchHelper&) = delete; + NoStatePrefetchHelper& operator=(const NoStatePrefetchHelper&) = delete; + ~NoStatePrefetchHelper() override; // Configures and returns a new PrerenderURLLoaderThrottle instance if the @@ -57,8 +60,6 @@ base::TimeTicks parsed_time_; base::WeakPtrFactory<NoStatePrefetchHelper> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NoStatePrefetchHelper); }; } // namespace prerender
diff --git a/components/no_state_prefetch/renderer/no_state_prefetch_utils.cc b/components/no_state_prefetch/renderer/no_state_prefetch_utils.cc index 37c010c..c2e231d 100644 --- a/components/no_state_prefetch/renderer/no_state_prefetch_utils.cc +++ b/components/no_state_prefetch/renderer/no_state_prefetch_utils.cc
@@ -22,6 +22,10 @@ base::OnceClosure continue_loading_cb) : blink::WebViewObserver(web_view), continue_loading_cb_(std::move(continue_loading_cb)) {} + + MediaLoadDeferrer(const MediaLoadDeferrer&) = delete; + MediaLoadDeferrer& operator=(const MediaLoadDeferrer&) = delete; + ~MediaLoadDeferrer() override = default; // blink::WebViewObserver implementation: @@ -36,8 +40,6 @@ private: base::OnceClosure continue_loading_cb_; - - DISALLOW_COPY_AND_ASSIGN(MediaLoadDeferrer); }; } // namespace
diff --git a/components/ntp_tiles/custom_links_manager_impl.h b/components/ntp_tiles/custom_links_manager_impl.h index d0c72d1..bb40632 100644 --- a/components/ntp_tiles/custom_links_manager_impl.h +++ b/components/ntp_tiles/custom_links_manager_impl.h
@@ -36,6 +36,9 @@ // Can be nullptr in unittests. history::HistoryService* history_service); + CustomLinksManagerImpl(const CustomLinksManagerImpl&) = delete; + CustomLinksManagerImpl& operator=(const CustomLinksManagerImpl&) = delete; + ~CustomLinksManagerImpl() override; // CustomLinksManager implementation. @@ -107,8 +110,6 @@ bool updating_preferences_ = false; base::WeakPtrFactory<CustomLinksManagerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CustomLinksManagerImpl); }; } // namespace ntp_tiles
diff --git a/components/ntp_tiles/custom_links_store.h b/components/ntp_tiles/custom_links_store.h index eabb3af..e8a591c2 100644 --- a/components/ntp_tiles/custom_links_store.h +++ b/components/ntp_tiles/custom_links_store.h
@@ -22,6 +22,10 @@ class CustomLinksStore { public: explicit CustomLinksStore(PrefService* prefs); + + CustomLinksStore(const CustomLinksStore&) = delete; + CustomLinksStore& operator=(const CustomLinksStore&) = delete; + // Virtual for testing. virtual ~CustomLinksStore(); @@ -46,8 +50,6 @@ private: // The pref service used to persist the custom link data. PrefService* prefs_; - - DISALLOW_COPY_AND_ASSIGN(CustomLinksStore); }; } // namespace ntp_tiles
diff --git a/components/ntp_tiles/icon_cacher_impl.h b/components/ntp_tiles/icon_cacher_impl.h index 96e7a72..2e919a8 100644 --- a/components/ntp_tiles/icon_cacher_impl.h +++ b/components/ntp_tiles/icon_cacher_impl.h
@@ -45,6 +45,10 @@ IconCacherImpl(favicon::FaviconService* favicon_service, favicon::LargeIconService* large_icon_service, std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher); + + IconCacherImpl(const IconCacherImpl&) = delete; + IconCacherImpl& operator=(const IconCacherImpl&) = delete; + ~IconCacherImpl() override; void StartFetchPopularSites( @@ -99,8 +103,6 @@ std::map<GURL, std::vector<base::OnceClosure>> in_flight_requests_; base::WeakPtrFactory<IconCacherImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IconCacherImpl); }; } // namespace ntp_tiles
diff --git a/components/ntp_tiles/most_visited_sites.h b/components/ntp_tiles/most_visited_sites.h index 922e63a..942e49a 100644 --- a/components/ntp_tiles/most_visited_sites.h +++ b/components/ntp_tiles/most_visited_sites.h
@@ -114,6 +114,9 @@ std::unique_ptr<IconCacher> icon_cacher, std::unique_ptr<MostVisitedSitesSupervisor> supervisor); + MostVisitedSites(const MostVisitedSites&) = delete; + MostVisitedSites& operator=(const MostVisitedSites&) = delete; + ~MostVisitedSites() override; // Returns true if this object was created with a non-null provider for the @@ -364,8 +367,6 @@ // For callbacks may be run after destruction, used exclusively for TopSites // (since it's used to detect whether there's a query in flight). base::WeakPtrFactory<MostVisitedSites> top_sites_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); }; } // namespace ntp_tiles
diff --git a/components/ntp_tiles/popular_sites_impl.h b/components/ntp_tiles/popular_sites_impl.h index 80ddc82..b78ebdc6 100644 --- a/components/ntp_tiles/popular_sites_impl.h +++ b/components/ntp_tiles/popular_sites_impl.h
@@ -44,6 +44,9 @@ variations::VariationsService* variations_service, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + PopularSitesImpl(const PopularSitesImpl&) = delete; + PopularSitesImpl& operator=(const PopularSitesImpl&) = delete; + ~PopularSitesImpl() override; // PopularSites implementation. @@ -87,8 +90,6 @@ int version_in_pending_url_; base::WeakPtrFactory<PopularSitesImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PopularSitesImpl); }; } // namespace ntp_tiles
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h index fdf1f13..f53ed86 100644 --- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h +++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
@@ -38,6 +38,12 @@ // |favicon_service| must not be null and must outlive this object. explicit NTPTilesInternalsMessageHandler( favicon::FaviconService* favicon_service); + + NTPTilesInternalsMessageHandler(const NTPTilesInternalsMessageHandler&) = + delete; + NTPTilesInternalsMessageHandler& operator=( + const NTPTilesInternalsMessageHandler&) = delete; + ~NTPTilesInternalsMessageHandler() override; // Called when the WebUI page's JavaScript has loaded and it is ready to @@ -81,8 +87,6 @@ base::CancelableTaskTracker cancelable_task_tracker_; base::WeakPtrFactory<NTPTilesInternalsMessageHandler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(NTPTilesInternalsMessageHandler); }; } // namespace ntp_tiles
diff --git a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h index 8213b21..fb094c2 100644 --- a/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h +++ b/components/offline_items_collection/core/android/offline_content_aggregator_bridge.h
@@ -34,6 +34,11 @@ static base::android::ScopedJavaLocalRef<jobject> GetBridgeForOfflineContentAggregator(OfflineContentAggregator* aggregator); + OfflineContentAggregatorBridge(const OfflineContentAggregatorBridge&) = + delete; + OfflineContentAggregatorBridge& operator=( + const OfflineContentAggregatorBridge&) = delete; + ~OfflineContentAggregatorBridge() override; // Methods called from Java via JNI. @@ -110,8 +115,6 @@ base::android::ScopedJavaGlobalRef<jobject> java_ref_; std::unique_ptr<ThrottledOfflineContentProvider> provider_; - - DISALLOW_COPY_AND_ASSIGN(OfflineContentAggregatorBridge); }; } // namespace android
diff --git a/components/offline_items_collection/core/offline_content_aggregator.h b/components/offline_items_collection/core/offline_content_aggregator.h index 1ef233f..ad3140f 100644 --- a/components/offline_items_collection/core/offline_content_aggregator.h +++ b/components/offline_items_collection/core/offline_content_aggregator.h
@@ -39,6 +39,10 @@ public KeyedService { public: OfflineContentAggregator(); + + OfflineContentAggregator(const OfflineContentAggregator&) = delete; + OfflineContentAggregator& operator=(const OfflineContentAggregator&) = delete; + ~OfflineContentAggregator() override; // Creates a unique namespace with the given prefix. Should be called to get @@ -111,8 +115,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<OfflineContentAggregator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OfflineContentAggregator); }; } // namespace offline_items_collection
diff --git a/components/offline_items_collection/core/test_support/mock_filtered_offline_item_observer.h b/components/offline_items_collection/core/test_support/mock_filtered_offline_item_observer.h index 92ded27..6e44375 100644 --- a/components/offline_items_collection/core/test_support/mock_filtered_offline_item_observer.h +++ b/components/offline_items_collection/core/test_support/mock_filtered_offline_item_observer.h
@@ -29,13 +29,15 @@ public: ScopedMockObserver(FilteredOfflineItemObserver* observer, const ContentId& id); + + ScopedMockObserver(const ScopedMockObserver&) = delete; + ScopedMockObserver& operator=(const ScopedMockObserver&) = delete; + ~ScopedMockObserver() override; private: ContentId id_; FilteredOfflineItemObserver* observer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedMockObserver); }; private:
diff --git a/components/offline_items_collection/core/throttled_offline_content_provider.h b/components/offline_items_collection/core/throttled_offline_content_provider.h index 5e463a5..5a27e5d6 100644 --- a/components/offline_items_collection/core/throttled_offline_content_provider.h +++ b/components/offline_items_collection/core/throttled_offline_content_provider.h
@@ -30,6 +30,12 @@ explicit ThrottledOfflineContentProvider(OfflineContentProvider* provider); ThrottledOfflineContentProvider(const base::TimeDelta& delay_between_updates, OfflineContentProvider* provider); + + ThrottledOfflineContentProvider(const ThrottledOfflineContentProvider&) = + delete; + ThrottledOfflineContentProvider& operator=( + const ThrottledOfflineContentProvider&) = delete; + ~ThrottledOfflineContentProvider() override; // Taking actions on the OfflineContentProvider will flush any queued updates @@ -98,8 +104,6 @@ OfflineItemMap updates_; base::WeakPtrFactory<ThrottledOfflineContentProvider> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ThrottledOfflineContentProvider); }; } // namespace offline_items_collection
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h index c5c5a7b..75eff969 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents.h +++ b/components/offline_pages/content/background_loader/background_loader_contents.h
@@ -34,6 +34,10 @@ // Creates BackgroundLoaderContents with specified |browser_context|. Uses // default session storage space. explicit BackgroundLoaderContents(content::BrowserContext* browser_context); + + BackgroundLoaderContents(const BackgroundLoaderContents&) = delete; + BackgroundLoaderContents& operator=(const BackgroundLoaderContents&) = delete; + ~BackgroundLoaderContents() override; // Loads the URL in a WebContents. Will call observe on all current observers @@ -96,8 +100,6 @@ std::unique_ptr<content::WebContents> web_contents_; content::BrowserContext* browser_context_; Delegate* delegate_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderContents); }; } // namespace background_loader
diff --git a/components/offline_pages/content/background_loader/background_loader_contents_stub.h b/components/offline_pages/content/background_loader/background_loader_contents_stub.h index 5b13baba..b96c9393 100644 --- a/components/offline_pages/content/background_loader/background_loader_contents_stub.h +++ b/components/offline_pages/content/background_loader/background_loader_contents_stub.h
@@ -17,6 +17,11 @@ class BackgroundLoaderContentsStub : public BackgroundLoaderContents { public: BackgroundLoaderContentsStub(content::BrowserContext* browser_context); + + BackgroundLoaderContentsStub(const BackgroundLoaderContentsStub&) = delete; + BackgroundLoaderContentsStub& operator=(const BackgroundLoaderContentsStub&) = + delete; + ~BackgroundLoaderContentsStub() override; void LoadPage(const GURL& url) override; @@ -24,7 +29,6 @@ private: bool is_loading_; - DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderContentsStub); }; } // namespace background_loader
diff --git a/components/offline_pages/core/archive_manager.h b/components/offline_pages/core/archive_manager.h index b0ec8fa..f578d04e 100644 --- a/components/offline_pages/core/archive_manager.h +++ b/components/offline_pages/core/archive_manager.h
@@ -52,6 +52,10 @@ const base::FilePath& private_archives_dir_, const base::FilePath& public_archives_dir, const scoped_refptr<base::SequencedTaskRunner>& task_runner); + + ArchiveManager(const ArchiveManager&) = delete; + ArchiveManager& operator=(const ArchiveManager&) = delete; + virtual ~ArchiveManager(); // Creates archives directory if one does not exist yet; @@ -82,8 +86,6 @@ // second task will start after the first one. This is an important assumption // for |ArchiveManager::EnsureArchivesDirCreated|. scoped_refptr<base::SequencedTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(ArchiveManager); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/archive_validator.h b/components/offline_pages/core/archive_validator.h index 018024b3..e8bd6870 100644 --- a/components/offline_pages/core/archive_validator.h +++ b/components/offline_pages/core/archive_validator.h
@@ -26,6 +26,10 @@ class ArchiveValidator { public: ArchiveValidator(); + + ArchiveValidator(const ArchiveValidator&) = delete; + ArchiveValidator& operator=(const ArchiveValidator&) = delete; + virtual ~ArchiveValidator(); void Update(const char* input, size_t len); @@ -51,8 +55,6 @@ private: std::unique_ptr<crypto::SecureHash> secure_hash_; - - DISALLOW_COPY_AND_ASSIGN(ArchiveValidator); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/change_requests_state_task.h b/components/offline_pages/core/background/change_requests_state_task.h index 4251f6d..7620473 100644 --- a/components/offline_pages/core/background/change_requests_state_task.h +++ b/components/offline_pages/core/background/change_requests_state_task.h
@@ -24,6 +24,10 @@ const std::vector<int64_t>& request_ids, const SavePageRequest::RequestState new_state, RequestQueueStore::UpdateCallback callback); + + ChangeRequestsStateTask(const ChangeRequestsStateTask&) = delete; + ChangeRequestsStateTask& operator=(const ChangeRequestsStateTask&) = delete; + ~ChangeRequestsStateTask() override; private: @@ -47,8 +51,6 @@ RequestQueueStore::UpdateCallback callback_; base::WeakPtrFactory<ChangeRequestsStateTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ChangeRequestsStateTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/connection_notifier.h b/components/offline_pages/core/background/connection_notifier.h index b51d7d3..041c25ca 100644 --- a/components/offline_pages/core/background/connection_notifier.h +++ b/components/offline_pages/core/background/connection_notifier.h
@@ -17,6 +17,10 @@ typedef base::OnceCallback<void()> ConnectedCallback; ConnectionNotifier(ConnectionNotifier::ConnectedCallback callback); + + ConnectionNotifier(const ConnectionNotifier&) = delete; + ConnectionNotifier& operator=(const ConnectionNotifier&) = delete; + ~ConnectionNotifier() override; // net::NetworkChangeNotifier::NetworkChangeObserver implementation. @@ -25,8 +29,6 @@ private: base::OnceCallback<void()> callback_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionNotifier); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/get_requests_task.h b/components/offline_pages/core/background/get_requests_task.h index 287b96c3..02b821e 100644 --- a/components/offline_pages/core/background/get_requests_task.h +++ b/components/offline_pages/core/background/get_requests_task.h
@@ -18,6 +18,10 @@ public: GetRequestsTask(RequestQueueStore* store, RequestQueueStore::GetRequestsCallback callback); + + GetRequestsTask(const GetRequestsTask&) = delete; + GetRequestsTask& operator=(const GetRequestsTask&) = delete; + ~GetRequestsTask() override; private: @@ -36,7 +40,6 @@ RequestQueueStore::GetRequestsCallback callback_; base::WeakPtrFactory<GetRequestsTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(GetRequestsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/initialize_store_task.h b/components/offline_pages/core/background/initialize_store_task.h index ff6dc1e..8f9bf9c36 100644 --- a/components/offline_pages/core/background/initialize_store_task.h +++ b/components/offline_pages/core/background/initialize_store_task.h
@@ -26,6 +26,10 @@ public: InitializeStoreTask(RequestQueueStore* store, RequestQueueStore::InitializeCallback callback); + + InitializeStoreTask(const InitializeStoreTask&) = delete; + InitializeStoreTask& operator=(const InitializeStoreTask&) = delete; + ~InitializeStoreTask() override; private: @@ -49,7 +53,6 @@ RequestQueueStore::InitializeCallback callback_; base::WeakPtrFactory<InitializeStoreTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(InitializeStoreTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/load_termination_listener.h b/components/offline_pages/core/background/load_termination_listener.h index 09b61ca..dd475600 100644 --- a/components/offline_pages/core/background/load_termination_listener.h +++ b/components/offline_pages/core/background/load_termination_listener.h
@@ -16,6 +16,10 @@ class LoadTerminationListener { public: LoadTerminationListener() = default; + + LoadTerminationListener(const LoadTerminationListener&) = delete; + LoadTerminationListener& operator=(const LoadTerminationListener&) = delete; + virtual ~LoadTerminationListener() = default; // Called by Offliner when it takes ownership of this listener. Used to @@ -25,7 +29,6 @@ protected: // Raw pointer because this class is owned by Offliner. Offliner* offliner_ = nullptr; - DISALLOW_COPY_AND_ASSIGN(LoadTerminationListener); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/remove_requests_task.h b/components/offline_pages/core/background/remove_requests_task.h index e9ced3e..d0c1e5e 100644 --- a/components/offline_pages/core/background/remove_requests_task.h +++ b/components/offline_pages/core/background/remove_requests_task.h
@@ -22,6 +22,10 @@ RemoveRequestsTask(RequestQueueStore* store, const std::vector<int64_t>& request_ids, RequestQueueStore::UpdateCallback callback); + + RemoveRequestsTask(const RemoveRequestsTask&) = delete; + RemoveRequestsTask& operator=(const RemoveRequestsTask&) = delete; + ~RemoveRequestsTask() override; private: @@ -42,8 +46,6 @@ RequestQueueStore::UpdateCallback callback_; base::WeakPtrFactory<RemoveRequestsTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RemoveRequestsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/request_coordinator.h b/components/offline_pages/core/background/request_coordinator.h index bb919ed..4634b7f 100644 --- a/components/offline_pages/core/background/request_coordinator.h +++ b/components/offline_pages/core/background/request_coordinator.h
@@ -130,6 +130,9 @@ network::NetworkQualityTracker* network_quality_tracker, std::unique_ptr<ActiveTabInfo> active_tab_info); + RequestCoordinator(const RequestCoordinator&) = delete; + RequestCoordinator& operator=(const RequestCoordinator&) = delete; + ~RequestCoordinator() override; // Queues |request| to later load and save when system conditions allow. @@ -505,8 +508,6 @@ std::unique_ptr<ActiveTabInfo> active_tab_info_; // Allows us to pass a weak pointer to callbacks. base::WeakPtrFactory<RequestCoordinator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RequestCoordinator); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/request_queue.h b/components/offline_pages/core/background/request_queue.h index 2bd0b69..00fa8ce 100644 --- a/components/offline_pages/core/background/request_queue.h +++ b/components/offline_pages/core/background/request_queue.h
@@ -63,6 +63,10 @@ }; explicit RequestQueue(std::unique_ptr<RequestQueueStore> store); + + RequestQueue(const RequestQueue&) = delete; + RequestQueue& operator=(const RequestQueue&) = delete; + ~RequestQueue() override; // TaskQueue::Delegate @@ -167,8 +171,6 @@ // Allows us to pass a weak pointer to callbacks. base::WeakPtrFactory<RequestQueue> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RequestQueue); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/background/update_request_task.h b/components/offline_pages/core/background/update_request_task.h index 3ad4eb3..9a1d249 100644 --- a/components/offline_pages/core/background/update_request_task.h +++ b/components/offline_pages/core/background/update_request_task.h
@@ -21,6 +21,10 @@ UpdateRequestTask(RequestQueueStore* store, int64_t request_id, RequestQueueStore::UpdateCallback callback); + + UpdateRequestTask(const UpdateRequestTask&) = delete; + UpdateRequestTask& operator=(const UpdateRequestTask&) = delete; + ~UpdateRequestTask() override; protected: @@ -54,7 +58,6 @@ RequestQueueStore::UpdateCallback callback_; base::WeakPtrFactory<UpdateRequestTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(UpdateRequestTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/downloads/download_ui_adapter.h b/components/offline_pages/core/downloads/download_ui_adapter.h index 7721510..2242384 100644 --- a/components/offline_pages/core/downloads/download_ui_adapter.h +++ b/components/offline_pages/core/downloads/download_ui_adapter.h
@@ -77,6 +77,10 @@ RequestCoordinator* coordinator, std::unique_ptr<VisualsDecoder> visuals_decoder, std::unique_ptr<Delegate> delegate); + + DownloadUIAdapter(const DownloadUIAdapter&) = delete; + DownloadUIAdapter& operator=(const DownloadUIAdapter&) = delete; + ~DownloadUIAdapter() override; static DownloadUIAdapter* FromOfflinePageModel(OfflinePageModel* model); @@ -192,8 +196,6 @@ std::unique_ptr<Delegate> delegate_; base::WeakPtrFactory<DownloadUIAdapter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadUIAdapter); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc index 4a127fe..e9eebf0 100644 --- a/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc +++ b/components/offline_pages/core/downloads/download_ui_adapter_unittest.cc
@@ -113,6 +113,9 @@ explicit MockOfflinePageModel(base::TestMockTimeTaskRunner* task_runner) : observer_(nullptr), task_runner_(task_runner) {} + MockOfflinePageModel(const MockOfflinePageModel&) = delete; + MockOfflinePageModel& operator=(const MockOfflinePageModel&) = delete; + ~MockOfflinePageModel() override {} void AddInitialPage(ClientId client_id) { @@ -207,8 +210,6 @@ private: OfflinePageModel::Observer* observer_; base::TestMockTimeTaskRunner* task_runner_; - - DISALLOW_COPY_AND_ASSIGN(MockOfflinePageModel); }; // Creates mock versions for OfflinePageModel, RequestCoordinator and their
diff --git a/components/offline_pages/core/model/add_page_task.h b/components/offline_pages/core/model/add_page_task.h index 3ce6adec..78082da 100644 --- a/components/offline_pages/core/model/add_page_task.h +++ b/components/offline_pages/core/model/add_page_task.h
@@ -28,6 +28,10 @@ AddPageTask(OfflinePageMetadataStore* store, const OfflinePageItem& offline_page, AddPageTaskCallback callback); + + AddPageTask(const AddPageTask&) = delete; + AddPageTask& operator=(const AddPageTask&) = delete; + ~AddPageTask() override; private: @@ -44,7 +48,6 @@ AddPageTaskCallback callback_; base::WeakPtrFactory<AddPageTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(AddPageTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/cleanup_visuals_task.h b/components/offline_pages/core/model/cleanup_visuals_task.h index 3c6da77..2f739e7 100644 --- a/components/offline_pages/core/model/cleanup_visuals_task.h +++ b/components/offline_pages/core/model/cleanup_visuals_task.h
@@ -26,6 +26,10 @@ CleanupVisualsTask(OfflinePageMetadataStore* store, base::Time now, CleanupVisualsCallback complete_callback); + + CleanupVisualsTask(const CleanupVisualsTask&) = delete; + CleanupVisualsTask& operator=(const CleanupVisualsTask&) = delete; + ~CleanupVisualsTask() override; private: @@ -38,7 +42,6 @@ CleanupVisualsCallback complete_callback_; base::WeakPtrFactory<CleanupVisualsTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(CleanupVisualsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/clear_storage_task.h b/components/offline_pages/core/model/clear_storage_task.h index 927c038..8be40d4c 100644 --- a/components/offline_pages/core/model/clear_storage_task.h +++ b/components/offline_pages/core/model/clear_storage_task.h
@@ -48,6 +48,10 @@ ArchiveManager* archive_manager, const base::Time& clearup_time, ClearStorageCallback callback); + + ClearStorageTask(const ClearStorageTask&) = delete; + ClearStorageTask& operator=(const ClearStorageTask&) = delete; + ~ClearStorageTask() override; private: @@ -67,7 +71,6 @@ base::Time clearup_time_; base::WeakPtrFactory<ClearStorageTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ClearStorageTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/delete_page_task.h b/components/offline_pages/core/model/delete_page_task.h index 5bb209d9..01264f8 100644 --- a/components/offline_pages/core/model/delete_page_task.h +++ b/components/offline_pages/core/model/delete_page_task.h
@@ -58,6 +58,9 @@ DeletePageTask::DeletePageTaskCallback callback, const OfflinePageItem& page); + DeletePageTask(const DeletePageTask&) = delete; + DeletePageTask& operator=(const DeletePageTask&) = delete; + ~DeletePageTask() override; // Deletes a single page from the database. This function reads @@ -97,7 +100,6 @@ DeletePageTaskCallback callback_; base::WeakPtrFactory<DeletePageTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DeletePageTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/get_pages_task.h b/components/offline_pages/core/model/get_pages_task.h index efb64633..248a0604 100644 --- a/components/offline_pages/core/model/get_pages_task.h +++ b/components/offline_pages/core/model/get_pages_task.h
@@ -35,6 +35,9 @@ const PageCriteria& criteria, MultipleOfflinePageItemCallback callback); + GetPagesTask(const GetPagesTask&) = delete; + GetPagesTask& operator=(const GetPagesTask&) = delete; + ~GetPagesTask() override; // Reads and returns all pages matching |criteria|. This function reads @@ -55,7 +58,6 @@ MultipleOfflinePageItemCallback callback_; base::WeakPtrFactory<GetPagesTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(GetPagesTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/get_visuals_task.h b/components/offline_pages/core/model/get_visuals_task.h index c2ecb2f7..e7a5532 100644 --- a/components/offline_pages/core/model/get_visuals_task.h +++ b/components/offline_pages/core/model/get_visuals_task.h
@@ -24,6 +24,10 @@ GetVisualsTask(OfflinePageMetadataStore* store, int64_t offline_id, CompleteCallback complete_callback); + + GetVisualsTask(const GetVisualsTask&) = delete; + GetVisualsTask& operator=(const GetVisualsTask&) = delete; + ~GetVisualsTask() override; private: @@ -39,7 +43,6 @@ base::OnceCallback<void(std::unique_ptr<OfflinePageVisuals>)> complete_callback_; base::WeakPtrFactory<GetVisualsTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(GetVisualsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/mark_page_accessed_task.h b/components/offline_pages/core/model/mark_page_accessed_task.h index ab49591..2412f7a4 100644 --- a/components/offline_pages/core/model/mark_page_accessed_task.h +++ b/components/offline_pages/core/model/mark_page_accessed_task.h
@@ -22,6 +22,10 @@ MarkPageAccessedTask(OfflinePageMetadataStore* store, int64_t offline_id, const base::Time& access_time); + + MarkPageAccessedTask(const MarkPageAccessedTask&) = delete; + MarkPageAccessedTask& operator=(const MarkPageAccessedTask&) = delete; + ~MarkPageAccessedTask() override; private: @@ -37,7 +41,6 @@ base::Time access_time_; base::WeakPtrFactory<MarkPageAccessedTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(MarkPageAccessedTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/offline_page_model_taskified.h b/components/offline_pages/core/model/offline_page_model_taskified.h index f11be8da..eef30d28 100644 --- a/components/offline_pages/core/model/offline_page_model_taskified.h +++ b/components/offline_pages/core/model/offline_page_model_taskified.h
@@ -67,6 +67,11 @@ std::unique_ptr<ArchiveManager> archive_manager, std::unique_ptr<OfflinePageArchivePublisher> archive_publisher, const scoped_refptr<base::SequencedTaskRunner>& task_runner); + + OfflinePageModelTaskified(const OfflinePageModelTaskified&) = delete; + OfflinePageModelTaskified& operator=(const OfflinePageModelTaskified&) = + delete; + ~OfflinePageModelTaskified() override; // TaskQueue::Delegate implementation. @@ -225,8 +230,6 @@ const scoped_refptr<base::SequencedTaskRunner> task_runner_; base::WeakPtrFactory<OfflinePageModelTaskified> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OfflinePageModelTaskified); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/persistent_page_consistency_check_task.h b/components/offline_pages/core/model/persistent_page_consistency_check_task.h index 9997ec0..efff43a 100644 --- a/components/offline_pages/core/model/persistent_page_consistency_check_task.h +++ b/components/offline_pages/core/model/persistent_page_consistency_check_task.h
@@ -44,6 +44,12 @@ ArchiveManager* archive_manager, base::Time check_time, PersistentPageConsistencyCheckCallback callback); + + PersistentPageConsistencyCheckTask( + const PersistentPageConsistencyCheckTask&) = delete; + PersistentPageConsistencyCheckTask& operator=( + const PersistentPageConsistencyCheckTask&) = delete; + ~PersistentPageConsistencyCheckTask() override; private: @@ -62,7 +68,6 @@ base::WeakPtrFactory<PersistentPageConsistencyCheckTask> weak_ptr_factory_{ this}; - DISALLOW_COPY_AND_ASSIGN(PersistentPageConsistencyCheckTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/startup_maintenance_task.h b/components/offline_pages/core/model/startup_maintenance_task.h index dc197756..4daad060 100644 --- a/components/offline_pages/core/model/startup_maintenance_task.h +++ b/components/offline_pages/core/model/startup_maintenance_task.h
@@ -21,6 +21,10 @@ public: StartupMaintenanceTask(OfflinePageMetadataStore* store, ArchiveManager* archive_manager); + + StartupMaintenanceTask(const StartupMaintenanceTask&) = delete; + StartupMaintenanceTask& operator=(const StartupMaintenanceTask&) = delete; + ~StartupMaintenanceTask() override; private: @@ -35,7 +39,6 @@ ArchiveManager* archive_manager_; base::WeakPtrFactory<StartupMaintenanceTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(StartupMaintenanceTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/store_visuals_task.h b/components/offline_pages/core/model/store_visuals_task.h index 1167cfb4..43f924d 100644 --- a/components/offline_pages/core/model/store_visuals_task.h +++ b/components/offline_pages/core/model/store_visuals_task.h
@@ -26,6 +26,9 @@ using RowUpdatedCallback = base::OnceCallback<void(bool, std::string, std::string)>; + StoreVisualsTask(const StoreVisualsTask&) = delete; + StoreVisualsTask& operator=(const StoreVisualsTask&) = delete; + ~StoreVisualsTask() override; static std::unique_ptr<StoreVisualsTask> MakeStoreThumbnailTask( @@ -57,7 +60,6 @@ std::string favicon_; RowUpdatedCallback complete_callback_; base::WeakPtrFactory<StoreVisualsTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(StoreVisualsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/update_publish_id_task.h b/components/offline_pages/core/model/update_publish_id_task.h index 5b4e1ca..a4ea9db 100644 --- a/components/offline_pages/core/model/update_publish_id_task.h +++ b/components/offline_pages/core/model/update_publish_id_task.h
@@ -28,6 +28,10 @@ int64_t offline_id, const PublishedArchiveId& publish_id, base::OnceCallback<void(bool)> callback); + + UpdatePublishIdTask(const UpdatePublishIdTask&) = delete; + UpdatePublishIdTask& operator=(const UpdatePublishIdTask&) = delete; + ~UpdatePublishIdTask() override; private: @@ -44,7 +48,6 @@ base::OnceCallback<void(bool)> callback_; base::WeakPtrFactory<UpdatePublishIdTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(UpdatePublishIdTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/model/visuals_availability_task.h b/components/offline_pages/core/model/visuals_availability_task.h index a9a8089..fb451e2 100644 --- a/components/offline_pages/core/model/visuals_availability_task.h +++ b/components/offline_pages/core/model/visuals_availability_task.h
@@ -23,6 +23,10 @@ VisualsAvailabilityTask(OfflinePageMetadataStore* store, int64_t offline_id, VisualsAvailableCallback exists_callback); + + VisualsAvailabilityTask(const VisualsAvailabilityTask&) = delete; + VisualsAvailabilityTask& operator=(const VisualsAvailabilityTask&) = delete; + ~VisualsAvailabilityTask() override; private: @@ -35,7 +39,6 @@ int64_t offline_id_; VisualsAvailableCallback exists_callback_; base::WeakPtrFactory<VisualsAvailabilityTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(VisualsAvailabilityTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/offline_page_metadata_store_test_util.h b/components/offline_pages/core/offline_page_metadata_store_test_util.h index edaee28..2bad50b 100644 --- a/components/offline_pages/core/offline_page_metadata_store_test_util.h +++ b/components/offline_pages/core/offline_page_metadata_store_test_util.h
@@ -25,6 +25,12 @@ class OfflinePageMetadataStoreTestUtil { public: OfflinePageMetadataStoreTestUtil(); + + OfflinePageMetadataStoreTestUtil(const OfflinePageMetadataStoreTestUtil&) = + delete; + OfflinePageMetadataStoreTestUtil& operator=( + const OfflinePageMetadataStoreTestUtil&) = delete; + ~OfflinePageMetadataStoreTestUtil(); // Builds a new store in a temporary directory. @@ -59,8 +65,6 @@ std::unique_ptr<OfflinePageMetadataStore> store_; OfflinePageMetadataStore* store_ptr_; base::SimpleTestClock clock_; - - DISALLOW_COPY_AND_ASSIGN(OfflinePageMetadataStoreTestUtil); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/offline_page_test_archiver.h b/components/offline_pages/core/offline_page_test_archiver.h index e7c7200..e3eeb06a 100644 --- a/components/offline_pages/core/offline_page_test_archiver.h +++ b/components/offline_pages/core/offline_page_test_archiver.h
@@ -41,6 +41,10 @@ int64_t size_to_report, const std::string& digest_to_report, const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); + + OfflinePageTestArchiver(const OfflinePageTestArchiver&) = delete; + OfflinePageTestArchiver& operator=(const OfflinePageTestArchiver&) = delete; + ~OfflinePageTestArchiver() override; // OfflinePageArchiver implementation: @@ -89,8 +93,6 @@ std::string digest_to_report_; CreateArchiveCallback callback_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(OfflinePageTestArchiver); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/generate_page_bundle_request.h b/components/offline_pages/core/prefetch/generate_page_bundle_request.h index e412b585..4affbd8 100644 --- a/components/offline_pages/core/prefetch/generate_page_bundle_request.h +++ b/components/offline_pages/core/prefetch/generate_page_bundle_request.h
@@ -32,6 +32,11 @@ const std::string& testing_header_value, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, PrefetchRequestFinishedCallback callback); + + GeneratePageBundleRequest(const GeneratePageBundleRequest&) = delete; + GeneratePageBundleRequest& operator=(const GeneratePageBundleRequest&) = + delete; + ~GeneratePageBundleRequest(); const std::vector<std::string>& requested_urls() { return requested_urls_; } @@ -42,8 +47,6 @@ PrefetchRequestFinishedCallback callback_; std::vector<std::string> requested_urls_; std::unique_ptr<PrefetchRequestFetcher> fetcher_; - - DISALLOW_COPY_AND_ASSIGN(GeneratePageBundleRequest); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/get_operation_request.h b/components/offline_pages/core/prefetch/get_operation_request.h index 7004665..49ed95a 100644 --- a/components/offline_pages/core/prefetch/get_operation_request.h +++ b/components/offline_pages/core/prefetch/get_operation_request.h
@@ -31,6 +31,10 @@ version_info::Channel channel, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, PrefetchRequestFinishedCallback callback); + + GetOperationRequest(const GetOperationRequest&) = delete; + GetOperationRequest& operator=(const GetOperationRequest&) = delete; + ~GetOperationRequest(); // Returns the stored callback. Note that this moves the internal value @@ -44,8 +48,6 @@ PrefetchRequestFinishedCallback callback_; std::unique_ptr<PrefetchRequestFetcher> fetcher_; - - DISALLOW_COPY_AND_ASSIGN(GetOperationRequest); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_background_task.h b/components/offline_pages/core/prefetch/prefetch_background_task.h index 80ac974..40d998d4 100644 --- a/components/offline_pages/core/prefetch/prefetch_background_task.h +++ b/components/offline_pages/core/prefetch/prefetch_background_task.h
@@ -15,6 +15,10 @@ class PrefetchBackgroundTask { public: explicit PrefetchBackgroundTask(PrefetchService* service); + + PrefetchBackgroundTask(const PrefetchBackgroundTask&) = delete; + PrefetchBackgroundTask& operator=(const PrefetchBackgroundTask&) = delete; + virtual ~PrefetchBackgroundTask(); // Tells the system how to reschedule the running of next background task when @@ -34,8 +38,6 @@ // The PrefetchService owns |this|, so a raw pointer is OK. PrefetchService* service_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchBackgroundTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h index d5e148d..861a191 100644 --- a/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_dispatcher_impl.h
@@ -32,6 +32,10 @@ public TaskQueue::Delegate { public: explicit PrefetchDispatcherImpl(PrefService* pref_service); + + PrefetchDispatcherImpl(const PrefetchDispatcherImpl&) = delete; + PrefetchDispatcherImpl& operator=(const PrefetchDispatcherImpl&) = delete; + ~PrefetchDispatcherImpl() override; // PrefetchDispatcher implementation: @@ -145,8 +149,6 @@ bool suspended_ = false; std::unique_ptr<PrefetchBackgroundTask> background_task_; base::WeakPtrFactory<PrefetchDispatcherImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PrefetchDispatcherImpl); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_downloader_impl.h b/components/offline_pages/core/prefetch/prefetch_downloader_impl.h index b991b49..37c7295 100644 --- a/components/offline_pages/core/prefetch/prefetch_downloader_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_downloader_impl.h
@@ -33,6 +33,10 @@ PrefetchDownloaderImpl(download::BackgroundDownloadService* download_service, version_info::Channel channel, PrefService* prefs); + + PrefetchDownloaderImpl(const PrefetchDownloaderImpl&) = delete; + PrefetchDownloaderImpl& operator=(const PrefetchDownloaderImpl&) = delete; + ~PrefetchDownloaderImpl() override; // PrefetchDownloader implementation: @@ -95,8 +99,6 @@ PrefService* prefs_; base::WeakPtrFactory<PrefetchDownloaderImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PrefetchDownloaderImpl); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h index 3150ee9b..ca25e85 100644 --- a/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h +++ b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler.h
@@ -23,6 +23,10 @@ public PrefetchGCMHandler { public: explicit PrefetchGCMAppHandler(); + + PrefetchGCMAppHandler(const PrefetchGCMAppHandler&) = delete; + PrefetchGCMAppHandler& operator=(const PrefetchGCMAppHandler&) = delete; + ~PrefetchGCMAppHandler() override; // gcm::GCMAppHandler implementation. @@ -46,8 +50,6 @@ private: // Not owned, PrefetchService owns |this|. PrefetchService* prefetch_service_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(PrefetchGCMAppHandler); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_gcm_app_handler_unittest.cc b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler_unittest.cc index 3866a273..90f6e8b3 100644 --- a/components/offline_pages/core/prefetch/prefetch_gcm_app_handler_unittest.cc +++ b/components/offline_pages/core/prefetch/prefetch_gcm_app_handler_unittest.cc
@@ -32,6 +32,10 @@ prefetch_service_taco_->CreatePrefetchService(); } + PrefetchGCMAppHandlerTest(const PrefetchGCMAppHandlerTest&) = delete; + PrefetchGCMAppHandlerTest& operator=(const PrefetchGCMAppHandlerTest&) = + delete; + ~PrefetchGCMAppHandlerTest() override { // Ensures that the store is properly disposed off. prefetch_service_taco_.reset(); @@ -49,8 +53,6 @@ TestPrefetchDispatcher* test_dispatcher_; // Owned by the taco. PrefetchGCMAppHandler* handler_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchGCMAppHandlerTest); }; TEST_F(PrefetchGCMAppHandlerTest, TestOnMessage) {
diff --git a/components/offline_pages/core/prefetch/prefetch_importer.h b/components/offline_pages/core/prefetch/prefetch_importer.h index 17e41c7..8019791 100644 --- a/components/offline_pages/core/prefetch/prefetch_importer.h +++ b/components/offline_pages/core/prefetch/prefetch_importer.h
@@ -18,6 +18,10 @@ class PrefetchImporter { public: explicit PrefetchImporter(PrefetchDispatcher* dispatcher); + + PrefetchImporter(const PrefetchImporter&) = delete; + PrefetchImporter& operator=(const PrefetchImporter&) = delete; + virtual ~PrefetchImporter() = default; // Imports the downloaded archive by moving the file into archive directory @@ -43,8 +47,6 @@ private: PrefetchDispatcher* dispatcher_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchImporter); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_importer_impl.h b/components/offline_pages/core/prefetch/prefetch_importer_impl.h index b892ba72..deecd95 100644 --- a/components/offline_pages/core/prefetch/prefetch_importer_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_importer_impl.h
@@ -26,6 +26,10 @@ PrefetchImporterImpl(PrefetchDispatcher* dispatcher, OfflinePageModel* context, scoped_refptr<base::TaskRunner> background_task_runner); + + PrefetchImporterImpl(const PrefetchImporterImpl&) = delete; + PrefetchImporterImpl& operator=(const PrefetchImporterImpl&) = delete; + ~PrefetchImporterImpl() override; // PrefetchImporter implementation. @@ -41,8 +45,6 @@ scoped_refptr<base::TaskRunner> background_task_runner_; std::set<int64_t> outstanding_import_offline_ids_; base::WeakPtrFactory<PrefetchImporterImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PrefetchImporterImpl); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_importer_impl_unittest.cc b/components/offline_pages/core/prefetch/prefetch_importer_impl_unittest.cc index 7da3a7a..cdbb504e 100644 --- a/components/offline_pages/core/prefetch/prefetch_importer_impl_unittest.cc +++ b/components/offline_pages/core/prefetch/prefetch_importer_impl_unittest.cc
@@ -36,6 +36,10 @@ class TestOfflinePageModel : public StubOfflinePageModel { public: TestOfflinePageModel() { ignore_result(archive_dir_.CreateUniqueTempDir()); } + + TestOfflinePageModel(const TestOfflinePageModel&) = delete; + TestOfflinePageModel& operator=(const TestOfflinePageModel&) = delete; + ~TestOfflinePageModel() override = default; void AddPage(const OfflinePageItem& page, AddPageCallback callback) override { @@ -59,8 +63,6 @@ base::ScopedTempDir archive_dir_; bool page_added_ = false; OfflinePageItem last_added_page_; - - DISALLOW_COPY_AND_ASSIGN(TestOfflinePageModel); }; } // namespace @@ -68,6 +70,10 @@ class PrefetchImporterImplTest : public testing::Test { public: PrefetchImporterImplTest() = default; + + PrefetchImporterImplTest(const PrefetchImporterImplTest&) = delete; + PrefetchImporterImplTest& operator=(const PrefetchImporterImplTest&) = delete; + ~PrefetchImporterImplTest() override = default; void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } @@ -105,8 +111,6 @@ TestOfflinePageModel model_; base::ScopedTempDir temp_dir_; TestPrefetchDispatcher dispatcher_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchImporterImplTest); }; TEST_F(PrefetchImporterImplTest, ImportSuccess) {
diff --git a/components/offline_pages/core/prefetch/prefetch_network_request_factory_impl.h b/components/offline_pages/core/prefetch/prefetch_network_request_factory_impl.h index ed1e1d463..3b048ea4a 100644 --- a/components/offline_pages/core/prefetch/prefetch_network_request_factory_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_network_request_factory_impl.h
@@ -33,6 +33,11 @@ const std::string& user_agent, PrefService* prefs); + PrefetchNetworkRequestFactoryImpl(const PrefetchNetworkRequestFactoryImpl&) = + delete; + PrefetchNetworkRequestFactoryImpl& operator=( + const PrefetchNetworkRequestFactoryImpl&) = delete; + ~PrefetchNetworkRequestFactoryImpl() override; bool HasOutstandingRequests() const override; @@ -94,8 +99,6 @@ PrefService* prefs_; base::WeakPtrFactory<PrefetchNetworkRequestFactoryImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PrefetchNetworkRequestFactoryImpl); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_request_fetcher.h b/components/offline_pages/core/prefetch/prefetch_request_fetcher.h index 4c5c30d..60bee1c 100644 --- a/components/offline_pages/core/prefetch/prefetch_request_fetcher.h +++ b/components/offline_pages/core/prefetch/prefetch_request_fetcher.h
@@ -39,6 +39,9 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, FinishedCallback callback); + PrefetchRequestFetcher(const PrefetchRequestFetcher&) = delete; + PrefetchRequestFetcher& operator=(const PrefetchRequestFetcher&) = delete; + ~PrefetchRequestFetcher(); void OnURLLoadComplete(std::unique_ptr<std::string> response_body); @@ -64,8 +67,6 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; std::unique_ptr<network::SimpleURLLoader> url_loader_; FinishedCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchRequestFetcher); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_service_impl.h b/components/offline_pages/core/prefetch/prefetch_service_impl.h index e672e82..2400eb0 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_impl.h +++ b/components/offline_pages/core/prefetch/prefetch_service_impl.h
@@ -33,6 +33,9 @@ image_fetcher::ImageFetcher* image_fetcher_, PrefService* prefs); + PrefetchServiceImpl(const PrefetchServiceImpl&) = delete; + PrefetchServiceImpl& operator=(const PrefetchServiceImpl&) = delete; + ~PrefetchServiceImpl() override; // PrefetchService implementation: @@ -94,8 +97,6 @@ SuggestionsProvider* suggestions_provider_ = nullptr; base::WeakPtrFactory<PrefetchServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PrefetchServiceImpl); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc index 6fc93fd..09399658 100644 --- a/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc +++ b/components/offline_pages/core/prefetch/prefetch_service_test_taco.cc
@@ -42,6 +42,12 @@ class StubPrefetchBackgroundTaskHandler : public PrefetchBackgroundTaskHandler { public: StubPrefetchBackgroundTaskHandler() = default; + + StubPrefetchBackgroundTaskHandler(const StubPrefetchBackgroundTaskHandler&) = + delete; + StubPrefetchBackgroundTaskHandler& operator=( + const StubPrefetchBackgroundTaskHandler&) = delete; + ~StubPrefetchBackgroundTaskHandler() override = default; void CancelBackgroundTask() override {} void EnsureTaskScheduled() override {} @@ -51,9 +57,6 @@ void Suspend() override {} void RemoveSuspension() override {} int GetAdditionalBackoffSeconds() const override { return 0; } - - private: - DISALLOW_COPY_AND_ASSIGN(StubPrefetchBackgroundTaskHandler); }; } // namespace
diff --git a/components/offline_pages/core/prefetch/store/prefetch_downloader_quota.h b/components/offline_pages/core/prefetch/store/prefetch_downloader_quota.h index 411aafff..7ab0c48b 100644 --- a/components/offline_pages/core/prefetch/store/prefetch_downloader_quota.h +++ b/components/offline_pages/core/prefetch/store/prefetch_downloader_quota.h
@@ -26,6 +26,10 @@ static const int64_t kDefaultMaxDailyQuotaBytes; PrefetchDownloaderQuota(sql::Database* db, const base::Clock* clock); + + PrefetchDownloaderQuota(const PrefetchDownloaderQuota&) = delete; + PrefetchDownloaderQuota& operator=(const PrefetchDownloaderQuota&) = delete; + ~PrefetchDownloaderQuota(); // Gets the max daily quota from Finch. @@ -45,8 +49,6 @@ // Clock used for time related calculation and quota updates in DB. Not owned. const base::Clock* clock_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchDownloaderQuota); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h b/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h index c3a7f14..a3f5ba5 100644 --- a/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h +++ b/components/offline_pages/core/prefetch/store/prefetch_store_test_util.h
@@ -34,6 +34,10 @@ class PrefetchStoreTestUtil { public: PrefetchStoreTestUtil(); + + PrefetchStoreTestUtil(const PrefetchStoreTestUtil&) = delete; + PrefetchStoreTestUtil& operator=(const PrefetchStoreTestUtil&) = delete; + ~PrefetchStoreTestUtil(); // Builds a new store in a temporary directory. @@ -91,8 +95,6 @@ std::unique_ptr<PrefetchStore> owned_store_; PrefetchStore* store_; base::SimpleTestClock clock_; - - DISALLOW_COPY_AND_ASSIGN(PrefetchStoreTestUtil); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/add_unique_urls_task.h b/components/offline_pages/core/prefetch/tasks/add_unique_urls_task.h index a5f9682..d364c93 100644 --- a/components/offline_pages/core/prefetch/tasks/add_unique_urls_task.h +++ b/components/offline_pages/core/prefetch/tasks/add_unique_urls_task.h
@@ -37,6 +37,10 @@ PrefetchStore* prefetch_store, const std::string& name_space, const std::vector<PrefetchURL>& prefetch_urls); + + AddUniqueUrlsTask(const AddUniqueUrlsTask&) = delete; + AddUniqueUrlsTask& operator=(const AddUniqueUrlsTask&) = delete; + ~AddUniqueUrlsTask() override; private: void Run() override; @@ -50,7 +54,6 @@ std::vector<PrefetchURL> prefetch_urls_; base::WeakPtrFactory<AddUniqueUrlsTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(AddUniqueUrlsTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/download_archives_task.h b/components/offline_pages/core/prefetch/tasks/download_archives_task.h index 6cab857..c915f129 100644 --- a/components/offline_pages/core/prefetch/tasks/download_archives_task.h +++ b/components/offline_pages/core/prefetch/tasks/download_archives_task.h
@@ -45,6 +45,10 @@ DownloadArchivesTask(PrefetchStore* prefetch_store, PrefetchDownloader* prefetch_downloader, PrefService* prefs); + + DownloadArchivesTask(const DownloadArchivesTask&) = delete; + DownloadArchivesTask& operator=(const DownloadArchivesTask&) = delete; + ~DownloadArchivesTask() override; private: @@ -60,8 +64,6 @@ PrefService* prefs_; base::WeakPtrFactory<DownloadArchivesTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadArchivesTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/download_cleanup_task.h b/components/offline_pages/core/prefetch/tasks/download_cleanup_task.h index 599512892..97fe0ec 100644 --- a/components/offline_pages/core/prefetch/tasks/download_cleanup_task.h +++ b/components/offline_pages/core/prefetch/tasks/download_cleanup_task.h
@@ -33,6 +33,10 @@ const std::set<std::string>& outstanding_download_ids, const std::map<std::string, std::pair<base::FilePath, int64_t>>& success_downloads); + + DownloadCleanupTask(const DownloadCleanupTask&) = delete; + DownloadCleanupTask& operator=(const DownloadCleanupTask&) = delete; + ~DownloadCleanupTask() override; private: @@ -45,8 +49,6 @@ std::map<std::string, std::pair<base::FilePath, int64_t>> success_downloads_; base::WeakPtrFactory<DownloadCleanupTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadCleanupTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/download_completed_task.h b/components/offline_pages/core/prefetch/tasks/download_completed_task.h index 0b770e1..49fd5aac 100644 --- a/components/offline_pages/core/prefetch/tasks/download_completed_task.h +++ b/components/offline_pages/core/prefetch/tasks/download_completed_task.h
@@ -20,6 +20,10 @@ DownloadCompletedTask(PrefetchDispatcher* prefetch_dispatcher, PrefetchStore* prefetch_store, const PrefetchDownloadResult& download_result); + + DownloadCompletedTask(const DownloadCompletedTask&) = delete; + DownloadCompletedTask& operator=(const DownloadCompletedTask&) = delete; + ~DownloadCompletedTask() override; struct UpdateInfo { @@ -38,8 +42,6 @@ PrefetchDownloadResult download_result_; base::WeakPtrFactory<DownloadCompletedTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DownloadCompletedTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/finalize_dismissed_url_suggestion_task.h b/components/offline_pages/core/prefetch/tasks/finalize_dismissed_url_suggestion_task.h index 2ccdc98..fdafc136 100644 --- a/components/offline_pages/core/prefetch/tasks/finalize_dismissed_url_suggestion_task.h +++ b/components/offline_pages/core/prefetch/tasks/finalize_dismissed_url_suggestion_task.h
@@ -32,6 +32,12 @@ FinalizeDismissedUrlSuggestionTask(PrefetchStore* prefetch_store, const ClientId& client_id); + + FinalizeDismissedUrlSuggestionTask( + const FinalizeDismissedUrlSuggestionTask&) = delete; + FinalizeDismissedUrlSuggestionTask& operator=( + const FinalizeDismissedUrlSuggestionTask&) = delete; + ~FinalizeDismissedUrlSuggestionTask() override; private: @@ -42,7 +48,6 @@ ClientId client_id_; base::WeakPtrFactory<FinalizeDismissedUrlSuggestionTask> weak_ptr_factory_{ this}; - DISALLOW_COPY_AND_ASSIGN(FinalizeDismissedUrlSuggestionTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/generate_page_bundle_reconcile_task.h b/components/offline_pages/core/prefetch/tasks/generate_page_bundle_reconcile_task.h index e5dd7134..7084b25 100644 --- a/components/offline_pages/core/prefetch/tasks/generate_page_bundle_reconcile_task.h +++ b/components/offline_pages/core/prefetch/tasks/generate_page_bundle_reconcile_task.h
@@ -23,6 +23,12 @@ GeneratePageBundleReconcileTask( PrefetchStore* prefetch_store, PrefetchNetworkRequestFactory* request_factory); + + GeneratePageBundleReconcileTask(const GeneratePageBundleReconcileTask&) = + delete; + GeneratePageBundleReconcileTask& operator=( + const GeneratePageBundleReconcileTask&) = delete; + ~GeneratePageBundleReconcileTask() override; private: @@ -34,7 +40,6 @@ PrefetchNetworkRequestFactory* request_factory_; base::WeakPtrFactory<GeneratePageBundleReconcileTask> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(GeneratePageBundleReconcileTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/generate_page_bundle_task.h b/components/offline_pages/core/prefetch/tasks/generate_page_bundle_task.h index 5c5dd2c5..c45e73cf 100644 --- a/components/offline_pages/core/prefetch/tasks/generate_page_bundle_task.h +++ b/components/offline_pages/core/prefetch/tasks/generate_page_bundle_task.h
@@ -29,6 +29,10 @@ const std::string& gcm_token, PrefetchNetworkRequestFactory* request_factory, PrefetchRequestFinishedCallback callback); + + GeneratePageBundleTask(const GeneratePageBundleTask&) = delete; + GeneratePageBundleTask& operator=(const GeneratePageBundleTask&) = delete; + ~GeneratePageBundleTask() override; private: @@ -43,7 +47,6 @@ PrefetchRequestFinishedCallback callback_; base::WeakPtrFactory<GeneratePageBundleTask> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(GeneratePageBundleTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/get_operation_task.h b/components/offline_pages/core/prefetch/tasks/get_operation_task.h index 0bbe745..a25e9121 100644 --- a/components/offline_pages/core/prefetch/tasks/get_operation_task.h +++ b/components/offline_pages/core/prefetch/tasks/get_operation_task.h
@@ -34,6 +34,10 @@ GetOperationTask(PrefetchStore* store, PrefetchNetworkRequestFactory* request_factory, GetOperationFinishedCallback callback); + + GetOperationTask(const GetOperationTask&) = delete; + GetOperationTask& operator=(const GetOperationTask&) = delete; + ~GetOperationTask() override; private: @@ -46,8 +50,6 @@ GetOperationFinishedCallback callback_; base::WeakPtrFactory<GetOperationTask> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GetOperationTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/get_visuals_info_task.h b/components/offline_pages/core/prefetch/tasks/get_visuals_info_task.h index 1341248..e13928e 100644 --- a/components/offline_pages/core/prefetch/tasks/get_visuals_info_task.h +++ b/components/offline_pages/core/prefetch/tasks/get_visuals_info_task.h
@@ -28,6 +28,10 @@ GetVisualsInfoTask(PrefetchStore* store, int64_t offline_id, ResultCallback callback); + + GetVisualsInfoTask(const GetVisualsInfoTask&) = delete; + GetVisualsInfoTask& operator=(const GetVisualsInfoTask&) = delete; + ~GetVisualsInfoTask() override; private: @@ -39,8 +43,6 @@ ResultCallback callback_; base::WeakPtrFactory<GetVisualsInfoTask> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GetVisualsInfoTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/import_archives_task.h b/components/offline_pages/core/prefetch/tasks/import_archives_task.h index 88f124e..3e67f8ec 100644 --- a/components/offline_pages/core/prefetch/tasks/import_archives_task.h +++ b/components/offline_pages/core/prefetch/tasks/import_archives_task.h
@@ -21,6 +21,10 @@ public: ImportArchivesTask(PrefetchStore* prefetch_store, PrefetchImporter* prefetch_importer); + + ImportArchivesTask(const ImportArchivesTask&) = delete; + ImportArchivesTask& operator=(const ImportArchivesTask&) = delete; + ~ImportArchivesTask() override; private: @@ -33,8 +37,6 @@ PrefetchArchiveInfo archive_; base::WeakPtrFactory<ImportArchivesTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImportArchivesTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/import_cleanup_task.h b/components/offline_pages/core/prefetch/tasks/import_cleanup_task.h index 4d60844a..e499b7ff 100644 --- a/components/offline_pages/core/prefetch/tasks/import_cleanup_task.h +++ b/components/offline_pages/core/prefetch/tasks/import_cleanup_task.h
@@ -20,6 +20,10 @@ public: ImportCleanupTask(PrefetchStore* prefetch_store, PrefetchImporter* prefetch_importer); + + ImportCleanupTask(const ImportCleanupTask&) = delete; + ImportCleanupTask& operator=(const ImportCleanupTask&) = delete; + ~ImportCleanupTask() override; private: @@ -30,8 +34,6 @@ PrefetchImporter* prefetch_importer_; // Outlives this class. base::WeakPtrFactory<ImportCleanupTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImportCleanupTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/import_completed_task.h b/components/offline_pages/core/prefetch/tasks/import_completed_task.h index 3b548e5..930d32a 100644 --- a/components/offline_pages/core/prefetch/tasks/import_completed_task.h +++ b/components/offline_pages/core/prefetch/tasks/import_completed_task.h
@@ -23,6 +23,10 @@ PrefetchImporter* prefetch_importer, int64_t offline_id, bool success); + + ImportCompletedTask(const ImportCompletedTask&) = delete; + ImportCompletedTask& operator=(const ImportCompletedTask&) = delete; + ~ImportCompletedTask() override; private: @@ -36,8 +40,6 @@ bool success_; base::WeakPtrFactory<ImportCompletedTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ImportCompletedTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/mark_operation_done_task.h b/components/offline_pages/core/prefetch/tasks/mark_operation_done_task.h index bd2d00e..8c9d159 100644 --- a/components/offline_pages/core/prefetch/tasks/mark_operation_done_task.h +++ b/components/offline_pages/core/prefetch/tasks/mark_operation_done_task.h
@@ -37,6 +37,10 @@ MarkOperationDoneTask(PrefetchDispatcher* prefetch_dispatcher, PrefetchStore* prefetch_store, const std::string& operation_name); + + MarkOperationDoneTask(const MarkOperationDoneTask&) = delete; + MarkOperationDoneTask& operator=(const MarkOperationDoneTask&) = delete; + ~MarkOperationDoneTask() override; StoreResult store_result() const { return std::get<0>(result_); } @@ -57,8 +61,6 @@ TaskResult result_ = std::make_pair(StoreResult::UNFINISHED, -1); base::WeakPtrFactory<MarkOperationDoneTask> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MarkOperationDoneTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/metrics_finalization_task.h b/components/offline_pages/core/prefetch/tasks/metrics_finalization_task.h index 5ce7536..2d18519 100644 --- a/components/offline_pages/core/prefetch/tasks/metrics_finalization_task.h +++ b/components/offline_pages/core/prefetch/tasks/metrics_finalization_task.h
@@ -21,6 +21,10 @@ class MetricsFinalizationTask : public Task { public: explicit MetricsFinalizationTask(PrefetchStore* prefetch_store); + + MetricsFinalizationTask(const MetricsFinalizationTask&) = delete; + MetricsFinalizationTask& operator=(const MetricsFinalizationTask&) = delete; + ~MetricsFinalizationTask() override; private: @@ -31,7 +35,6 @@ PrefetchStore* prefetch_store_; base::WeakPtrFactory<MetricsFinalizationTask> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(MetricsFinalizationTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/page_bundle_update_task.h b/components/offline_pages/core/prefetch/tasks/page_bundle_update_task.h index af1e26a4..8c5f345d 100644 --- a/components/offline_pages/core/prefetch/tasks/page_bundle_update_task.h +++ b/components/offline_pages/core/prefetch/tasks/page_bundle_update_task.h
@@ -41,6 +41,10 @@ PrefetchDispatcher* dispatcher, const std::string& operation_name, const std::vector<RenderPageInfo>& pages); + + PageBundleUpdateTask(const PageBundleUpdateTask&) = delete; + PageBundleUpdateTask& operator=(const PageBundleUpdateTask&) = delete; + ~PageBundleUpdateTask() override; private: @@ -58,8 +62,6 @@ std::vector<RenderPageInfo> pages_; base::WeakPtrFactory<PageBundleUpdateTask> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PageBundleUpdateTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/sent_get_operation_cleanup_task.h b/components/offline_pages/core/prefetch/tasks/sent_get_operation_cleanup_task.h index 844a429d..9b4c1fc 100644 --- a/components/offline_pages/core/prefetch/tasks/sent_get_operation_cleanup_task.h +++ b/components/offline_pages/core/prefetch/tasks/sent_get_operation_cleanup_task.h
@@ -22,6 +22,11 @@ SentGetOperationCleanupTask(PrefetchStore* prefetch_store, PrefetchNetworkRequestFactory* request_factory); + + SentGetOperationCleanupTask(const SentGetOperationCleanupTask&) = delete; + SentGetOperationCleanupTask& operator=(const SentGetOperationCleanupTask&) = + delete; + ~SentGetOperationCleanupTask() override; private: @@ -32,8 +37,6 @@ PrefetchNetworkRequestFactory* request_factory_; // Outlives this class. base::WeakPtrFactory<SentGetOperationCleanupTask> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SentGetOperationCleanupTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/tasks/stale_entry_finalizer_task.h b/components/offline_pages/core/prefetch/tasks/stale_entry_finalizer_task.h index 29c3bb3..36b4a58 100644 --- a/components/offline_pages/core/prefetch/tasks/stale_entry_finalizer_task.h +++ b/components/offline_pages/core/prefetch/tasks/stale_entry_finalizer_task.h
@@ -30,6 +30,10 @@ StaleEntryFinalizerTask(PrefetchDispatcher* prefetch_dispatcher, PrefetchStore* prefetch_store); + + StaleEntryFinalizerTask(const StaleEntryFinalizerTask&) = delete; + StaleEntryFinalizerTask& operator=(const StaleEntryFinalizerTask&) = delete; + ~StaleEntryFinalizerTask() override; // Will be set to true upon after an error-free run. @@ -48,7 +52,6 @@ Result final_status_ = Result::NO_MORE_WORK; base::WeakPtrFactory<StaleEntryFinalizerTask> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(StaleEntryFinalizerTask); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/test_download_client.h b/components/offline_pages/core/prefetch/test_download_client.h index 7ab9a58..683593bc 100644 --- a/components/offline_pages/core/prefetch/test_download_client.h +++ b/components/offline_pages/core/prefetch/test_download_client.h
@@ -15,6 +15,10 @@ class TestDownloadClient : public download::test::EmptyClient { public: explicit TestDownloadClient(PrefetchDownloader* downloader); + + TestDownloadClient(const TestDownloadClient&) = delete; + TestDownloadClient& operator=(const TestDownloadClient&) = delete; + ~TestDownloadClient() override = default; void OnDownloadFailed(const std::string& guid, @@ -26,8 +30,6 @@ private: PrefetchDownloader* downloader_; - - DISALLOW_COPY_AND_ASSIGN(TestDownloadClient); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/prefetch/test_download_service.cc b/components/offline_pages/core/prefetch/test_download_service.cc index 729d4b74..af900fa 100644 --- a/components/offline_pages/core/prefetch/test_download_service.cc +++ b/components/offline_pages/core/prefetch/test_download_service.cc
@@ -24,6 +24,10 @@ class TestServiceConfig : public download::ServiceConfig { public: TestServiceConfig() = default; + + TestServiceConfig(const TestServiceConfig&) = delete; + TestServiceConfig& operator=(const TestServiceConfig&) = delete; + ~TestServiceConfig() override = default; // ServiceConfig implementation. @@ -35,8 +39,6 @@ private: base::TimeDelta time_delta_; - - DISALLOW_COPY_AND_ASSIGN(TestServiceConfig); }; } // namespace
diff --git a/components/offline_pages/core/prefetch/test_download_service.h b/components/offline_pages/core/prefetch/test_download_service.h index d13f4ee9..5d5cdca 100644 --- a/components/offline_pages/core/prefetch/test_download_service.h +++ b/components/offline_pages/core/prefetch/test_download_service.h
@@ -20,6 +20,10 @@ class TestDownloadService : public download::BackgroundDownloadService { public: TestDownloadService(); + + TestDownloadService(const TestDownloadService&) = delete; + TestDownloadService& operator=(const TestDownloadService&) = delete; + ~TestDownloadService() override; // BackgroundDownloadService implementation. @@ -48,7 +52,6 @@ TestDownloadClient* client_ = nullptr; int next_file_id_ = 0; std::string test_file_data_; - DISALLOW_COPY_AND_ASSIGN(TestDownloadService); }; } // namespace offline_pages
diff --git a/components/offline_pages/core/test_scoped_offline_clock.h b/components/offline_pages/core/test_scoped_offline_clock.h index 322afe9..4d5fdda 100644 --- a/components/offline_pages/core/test_scoped_offline_clock.h +++ b/components/offline_pages/core/test_scoped_offline_clock.h
@@ -15,10 +15,13 @@ class TestScopedOfflineClockOverride { public: explicit TestScopedOfflineClockOverride(const base::Clock* clock); - ~TestScopedOfflineClockOverride(); - private: - DISALLOW_COPY_AND_ASSIGN(TestScopedOfflineClockOverride); + TestScopedOfflineClockOverride(const TestScopedOfflineClockOverride&) = + delete; + TestScopedOfflineClockOverride& operator=( + const TestScopedOfflineClockOverride&) = delete; + + ~TestScopedOfflineClockOverride(); }; // Overrides |OfflineClock()| with |this| upon construction. Returns @@ -26,12 +29,14 @@ class TestScopedOfflineClock : public base::SimpleTestClock { public: TestScopedOfflineClock(); + + TestScopedOfflineClock(const TestScopedOfflineClock&) = delete; + TestScopedOfflineClock& operator=(const TestScopedOfflineClock&) = delete; + ~TestScopedOfflineClock() override; private: TestScopedOfflineClockOverride override_; - - DISALLOW_COPY_AND_ASSIGN(TestScopedOfflineClock); }; } // namespace offline_pages
diff --git a/components/offline_pages/task/sql_store_base.h b/components/offline_pages/task/sql_store_base.h index 6913c4a..40e66dcc 100644 --- a/components/offline_pages/task/sql_store_base.h +++ b/components/offline_pages/task/sql_store_base.h
@@ -53,6 +53,10 @@ SqlStoreBase(const std::string& histogram_tag, scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, const base::FilePath& file_path); + + SqlStoreBase(const SqlStoreBase&) = delete; + SqlStoreBase& operator=(const SqlStoreBase&) = delete; + virtual ~SqlStoreBase(); // Gets the initialization status of the store. @@ -180,8 +184,6 @@ base::WeakPtrFactory<SqlStoreBase> weak_ptr_factory_{this}; base::WeakPtrFactory<SqlStoreBase> closing_weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SqlStoreBase); }; } // namespace offline_pages
diff --git a/components/offline_pages/task/task_queue.h b/components/offline_pages/task/task_queue.h index 71c91a8..7e3ac1f 100644 --- a/components/offline_pages/task/task_queue.h +++ b/components/offline_pages/task/task_queue.h
@@ -47,6 +47,10 @@ }; explicit TaskQueue(Delegate* delegate); + + TaskQueue(const TaskQueue&) = delete; + TaskQueue& operator=(const TaskQueue&) = delete; + ~TaskQueue(); // Adds a task to the queue. Queue takes ownership of the task. @@ -99,8 +103,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<TaskQueue> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TaskQueue); }; } // namespace offline_pages
diff --git a/components/open_from_clipboard/clipboard_recent_content.h b/components/open_from_clipboard/clipboard_recent_content.h index ee4a116..11bf5b3 100644 --- a/components/open_from_clipboard/clipboard_recent_content.h +++ b/components/open_from_clipboard/clipboard_recent_content.h
@@ -24,6 +24,10 @@ class ClipboardRecentContent { public: ClipboardRecentContent(); + + ClipboardRecentContent(const ClipboardRecentContent&) = delete; + ClipboardRecentContent& operator=(const ClipboardRecentContent&) = delete; + virtual ~ClipboardRecentContent(); // Returns the global instance of the ClipboardRecentContent singleton. This @@ -93,9 +97,6 @@ // GetRecentURLFromClipboard() should never return a URL from a clipboard // older than this. static base::TimeDelta MaximumAgeOfClipboard(); - - private: - DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent); }; #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_H_
diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.h b/components/open_from_clipboard/clipboard_recent_content_generic.h index df9d4a33..81962f1fb 100644 --- a/components/open_from_clipboard/clipboard_recent_content_generic.h +++ b/components/open_from_clipboard/clipboard_recent_content_generic.h
@@ -21,6 +21,11 @@ class ClipboardRecentContentGeneric : public ClipboardRecentContent { public: ClipboardRecentContentGeneric(); + + ClipboardRecentContentGeneric(const ClipboardRecentContentGeneric&) = delete; + ClipboardRecentContentGeneric& operator=( + const ClipboardRecentContentGeneric&) = delete; + ~ClipboardRecentContentGeneric() override; // ClipboardRecentContent implementation. @@ -39,8 +44,6 @@ private: // Returns true if the URL is appropriate to be suggested. static bool IsAppropriateSuggestion(const GURL& url); - - DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContentGeneric); }; #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_GENERIC_H_
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.h b/components/open_from_clipboard/clipboard_recent_content_ios.h index d7734ff..63f0a94 100644 --- a/components/open_from_clipboard/clipboard_recent_content_ios.h +++ b/components/open_from_clipboard/clipboard_recent_content_ios.h
@@ -37,6 +37,10 @@ explicit ClipboardRecentContentIOS( ClipboardRecentContentImplIOS* implementation); + ClipboardRecentContentIOS(const ClipboardRecentContentIOS&) = delete; + ClipboardRecentContentIOS& operator=(const ClipboardRecentContentIOS&) = + delete; + ~ClipboardRecentContentIOS() override; // ClipboardRecentContent implementation. @@ -59,8 +63,6 @@ // The implementation instance. __strong ClipboardRecentContentImplIOS* implementation_; - - DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContentIOS); }; #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IOS_H_
diff --git a/components/open_from_clipboard/fake_clipboard_recent_content.h b/components/open_from_clipboard/fake_clipboard_recent_content.h index c5490f64..44b50594 100644 --- a/components/open_from_clipboard/fake_clipboard_recent_content.h +++ b/components/open_from_clipboard/fake_clipboard_recent_content.h
@@ -16,6 +16,11 @@ class FakeClipboardRecentContent : public ClipboardRecentContent { public: FakeClipboardRecentContent(); + + FakeClipboardRecentContent(const FakeClipboardRecentContent&) = delete; + FakeClipboardRecentContent& operator=(const FakeClipboardRecentContent&) = + delete; + ~FakeClipboardRecentContent() override; // ClipboardRecentContent implementation. @@ -45,8 +50,6 @@ absl::optional<gfx::Image> clipboard_image_content_; base::TimeDelta content_age_; bool suppress_content_; - - DISALLOW_COPY_AND_ASSIGN(FakeClipboardRecentContent); }; #endif // COMPONENTS_OPEN_FROM_CLIPBOARD_FAKE_CLIPBOARD_RECENT_CONTENT_H_
diff --git a/components/optimization_guide/core/bloom_filter.h b/components/optimization_guide/core/bloom_filter.h index 36ac371..1430c0b 100644 --- a/components/optimization_guide/core/bloom_filter.h +++ b/components/optimization_guide/core/bloom_filter.h
@@ -33,6 +33,9 @@ uint32_t num_bits, std::string filter_data); + BloomFilter(const BloomFilter&) = delete; + BloomFilter& operator=(const BloomFilter&) = delete; + ~BloomFilter(); // Returns whether this Bloom filter contains |str|. @@ -55,8 +58,6 @@ ByteVector bytes_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(BloomFilter); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/command_line_top_host_provider.h b/components/optimization_guide/core/command_line_top_host_provider.h index 4d7dfec..185ea50 100644 --- a/components/optimization_guide/core/command_line_top_host_provider.h +++ b/components/optimization_guide/core/command_line_top_host_provider.h
@@ -22,6 +22,11 @@ // Creates a TopHostProvider if the flag for overriding top hosts has been // enabled. static std::unique_ptr<CommandLineTopHostProvider> CreateIfEnabled(); + + CommandLineTopHostProvider(const CommandLineTopHostProvider&) = delete; + CommandLineTopHostProvider& operator=(const CommandLineTopHostProvider&) = + delete; + ~CommandLineTopHostProvider() override; // TopHostProvider implementation: @@ -32,8 +37,6 @@ const std::vector<std::string>& top_hosts); std::vector<std::string> top_hosts_; - - DISALLOW_COPY_AND_ASSIGN(CommandLineTopHostProvider); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/decision_tree_prediction_model.h b/components/optimization_guide/core/decision_tree_prediction_model.h index 289203d..bbd991d 100644 --- a/components/optimization_guide/core/decision_tree_prediction_model.h +++ b/components/optimization_guide/core/decision_tree_prediction_model.h
@@ -22,6 +22,10 @@ explicit DecisionTreePredictionModel( const proto::PredictionModel& prediction_model); + DecisionTreePredictionModel(const DecisionTreePredictionModel&) = delete; + DecisionTreePredictionModel& operator=(const DecisionTreePredictionModel&) = + delete; + ~DecisionTreePredictionModel() override; // PredictionModel implementation: @@ -87,8 +91,6 @@ bool ValidateTreeNode(const proto::DecisionTree& tree, const proto::TreeNode& node, int node_index) const; - - DISALLOW_COPY_AND_ASSIGN(DecisionTreePredictionModel); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/hint_cache.h b/components/optimization_guide/core/hint_cache.h index 3995d4d..74862fc0 100644 --- a/components/optimization_guide/core/hint_cache.h +++ b/components/optimization_guide/core/hint_cache.h
@@ -38,6 +38,10 @@ // stored in-memory. explicit HintCache(OptimizationGuideStore* optimization_guide_store, int max_host_keyed_memory_cache_size); + + HintCache(const HintCache&) = delete; + HintCache& operator=(const HintCache&) = delete; + ~HintCache(); // Initializes the backing store contained within the hint cache, if provided, @@ -203,8 +207,6 @@ // Weak ptr factory to get weak pointer of |this|. base::WeakPtrFactory<HintCache> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HintCache); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/hint_cache_unittest.cc b/components/optimization_guide/core/hint_cache_unittest.cc index 9cf384f..eafc548d 100644 --- a/components/optimization_guide/core/hint_cache_unittest.cc +++ b/components/optimization_guide/core/hint_cache_unittest.cc
@@ -35,6 +35,9 @@ public: HintCacheTest() : loaded_hint_(nullptr) {} + HintCacheTest(const HintCacheTest&) = delete; + HintCacheTest& operator=(const HintCacheTest&) = delete; + ~HintCacheTest() override {} void SetUp() override { ProtoDatabaseProviderTestBase::SetUp(); } @@ -174,8 +177,6 @@ bool are_component_hints_updated_; bool on_load_hint_callback_called_; bool are_fetched_hints_updated_; - - DISALLOW_COPY_AND_ASSIGN(HintCacheTest); }; INSTANTIATE_TEST_SUITE_P(WithPersistentStore,
diff --git a/components/optimization_guide/core/hints_component_util_unittest.cc b/components/optimization_guide/core/hints_component_util_unittest.cc index 094d4b8d..7235fba 100644 --- a/components/optimization_guide/core/hints_component_util_unittest.cc +++ b/components/optimization_guide/core/hints_component_util_unittest.cc
@@ -27,6 +27,9 @@ public: HintsComponentUtilTest() {} + HintsComponentUtilTest(const HintsComponentUtilTest&) = delete; + HintsComponentUtilTest& operator=(const HintsComponentUtilTest&) = delete; + ~HintsComponentUtilTest() override {} void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } @@ -44,8 +47,6 @@ private: base::ScopedTempDir temp_dir_; - - DISALLOW_COPY_AND_ASSIGN(HintsComponentUtilTest); }; TEST_F(HintsComponentUtilTest, RecordProcessHintsComponentResult) {
diff --git a/components/optimization_guide/core/hints_fetcher.h b/components/optimization_guide/core/hints_fetcher.h index 9ff4697..c5ea37a 100644 --- a/components/optimization_guide/core/hints_fetcher.h +++ b/components/optimization_guide/core/hints_fetcher.h
@@ -72,6 +72,10 @@ const GURL& optimization_guide_service_url, PrefService* pref_service, network::NetworkConnectionTracker* network_connection_tracker); + + HintsFetcher(const HintsFetcher&) = delete; + HintsFetcher& operator=(const HintsFetcher&) = delete; + virtual ~HintsFetcher(); // Requests hints from the Optimization Guide Service if a request for them is @@ -179,8 +183,6 @@ base::TimeTicks hints_fetch_start_time_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(HintsFetcher); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/hints_fetcher_unittest.cc b/components/optimization_guide/core/hints_fetcher_unittest.cc index 5ad9dae..c7437a1 100644 --- a/components/optimization_guide/core/hints_fetcher_unittest.cc +++ b/components/optimization_guide/core/hints_fetcher_unittest.cc
@@ -61,6 +61,9 @@ hints_fetcher_->SetTimeClockForTesting(task_environment_.GetMockClock()); } + HintsFetcherTest(const HintsFetcherTest&) = delete; + HintsFetcherTest& operator=(const HintsFetcherTest&) = delete; + ~HintsFetcherTest() override = default; void OnHintsFetched(absl::optional<std::unique_ptr<proto::GetHintsResponse>> @@ -177,8 +180,6 @@ network::TestNetworkConnectionTracker* network_tracker_; std::string last_request_body_; - - DISALLOW_COPY_AND_ASSIGN(HintsFetcherTest); }; INSTANTIATE_TEST_SUITE_P(WithPersistentStore,
diff --git a/components/optimization_guide/core/optimization_filter.h b/components/optimization_guide/core/optimization_filter.h index b07a372..7979994e 100644 --- a/components/optimization_guide/core/optimization_filter.h +++ b/components/optimization_guide/core/optimization_filter.h
@@ -29,6 +29,9 @@ std::unique_ptr<RegexpList> exclusion_regexps, bool skip_host_suffix_checking); + OptimizationFilter(const OptimizationFilter&) = delete; + OptimizationFilter& operator=(const OptimizationFilter&) = delete; + ~OptimizationFilter(); // Returns true if the given url is matched by this filter. @@ -57,8 +60,6 @@ bool skip_host_suffix_checking_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(OptimizationFilter); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/optimization_guide_store.h b/components/optimization_guide/core/optimization_guide_store.h index e66caf2..34fa1f5 100644 --- a/components/optimization_guide/core/optimization_guide_store.h +++ b/components/optimization_guide/core/optimization_guide_store.h
@@ -101,6 +101,10 @@ explicit OptimizationGuideStore( std::unique_ptr<StoreEntryProtoDatabase> database, scoped_refptr<base::SequencedTaskRunner> store_task_runner); + + OptimizationGuideStore(const OptimizationGuideStore&) = delete; + OptimizationGuideStore& operator=(const OptimizationGuideStore&) = delete; + virtual ~OptimizationGuideStore(); // Initializes the store. If |purge_existing_data| is set to true, @@ -517,8 +521,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<OptimizationGuideStore> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OptimizationGuideStore); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/optimization_hints_component_update_listener_unittest.cc b/components/optimization_guide/core/optimization_hints_component_update_listener_unittest.cc index 50a4bf3..0b419471 100644 --- a/components/optimization_guide/core/optimization_hints_component_update_listener_unittest.cc +++ b/components/optimization_guide/core/optimization_hints_component_update_listener_unittest.cc
@@ -30,6 +30,9 @@ : hints_component_notification_count_(0), hints_component_version_("0.0.0.0") {} + TestObserver(const TestObserver&) = delete; + TestObserver& operator=(const TestObserver&) = delete; + ~TestObserver() override {} void OnHintsComponentAvailable(const HintsComponentInfo& info) override { @@ -52,13 +55,17 @@ int hints_component_notification_count_; base::Version hints_component_version_; base::FilePath hints_component_path_; - - DISALLOW_COPY_AND_ASSIGN(TestObserver); }; class OptimizationHintsComponentUpdateListenerTest : public testing::Test { public: OptimizationHintsComponentUpdateListenerTest() = default; + + OptimizationHintsComponentUpdateListenerTest( + const OptimizationHintsComponentUpdateListenerTest&) = delete; + OptimizationHintsComponentUpdateListenerTest& operator=( + const OptimizationHintsComponentUpdateListenerTest&) = delete; + ~OptimizationHintsComponentUpdateListenerTest() override = default; void SetUp() override { @@ -98,8 +105,6 @@ base::ScopedTempDir temp_dir_; std::unique_ptr<TestObserver> observer_; - - DISALLOW_COPY_AND_ASSIGN(OptimizationHintsComponentUpdateListenerTest); }; TEST_F(OptimizationHintsComponentUpdateListenerTest,
diff --git a/components/optimization_guide/core/prediction_model.h b/components/optimization_guide/core/prediction_model.h index 18f6dfe..439e50a8 100644 --- a/components/optimization_guide/core/prediction_model.h +++ b/components/optimization_guide/core/prediction_model.h
@@ -21,6 +21,9 @@ // OptimizationTargetDecision by evaluating a prediction model. class PredictionModel { public: + PredictionModel(const PredictionModel&) = delete; + PredictionModel& operator=(const PredictionModel&) = delete; + virtual ~PredictionModel(); // Creates an Prediction model of the correct ModelType specified in @@ -61,8 +64,6 @@ // The version of the |model_|. const int64_t version_; - - DISALLOW_COPY_AND_ASSIGN(PredictionModel); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/prediction_model_fetcher.h b/components/optimization_guide/core/prediction_model_fetcher.h index 49349b5c..41fc8fd 100644 --- a/components/optimization_guide/core/prediction_model_fetcher.h +++ b/components/optimization_guide/core/prediction_model_fetcher.h
@@ -42,6 +42,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const GURL& optimization_guide_service_get_models_url, network::NetworkConnectionTracker* network_connection_tracker); + + PredictionModelFetcher(const PredictionModelFetcher&) = delete; + PredictionModelFetcher& operator=(const PredictionModelFetcher&) = delete; + virtual ~PredictionModelFetcher(); // Requests PredictionModels and HostModelFeatures from the Optimization Guide @@ -92,8 +96,6 @@ network::NetworkConnectionTracker* network_connection_tracker_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PredictionModelFetcher); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/prediction_model_fetcher_unittest.cc b/components/optimization_guide/core/prediction_model_fetcher_unittest.cc index 20294002..fc803cc 100644 --- a/components/optimization_guide/core/prediction_model_fetcher_unittest.cc +++ b/components/optimization_guide/core/prediction_model_fetcher_unittest.cc
@@ -44,6 +44,10 @@ network_tracker_); } + PredictionModelFetcherTest(const PredictionModelFetcherTest&) = delete; + PredictionModelFetcherTest& operator=(const PredictionModelFetcherTest&) = + delete; + ~PredictionModelFetcherTest() override {} void OnModelsFetched(absl::optional<std::unique_ptr<proto::GetModelsResponse>> @@ -113,8 +117,6 @@ scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory_; network::TestURLLoaderFactory test_url_loader_factory_; network::TestNetworkConnectionTracker* network_tracker_; - - DISALLOW_COPY_AND_ASSIGN(PredictionModelFetcherTest); }; TEST_F(PredictionModelFetcherTest, FetchOptimizationGuideServiceModels) {
diff --git a/components/optimization_guide/core/store_update_data.h b/components/optimization_guide/core/store_update_data.h index 9dfd645..814574b 100644 --- a/components/optimization_guide/core/store_update_data.h +++ b/components/optimization_guide/core/store_update_data.h
@@ -29,6 +29,9 @@ // OptimizationGuideStore. class StoreUpdateData { public: + StoreUpdateData(const StoreUpdateData&) = delete; + StoreUpdateData& operator=(const StoreUpdateData&) = delete; + ~StoreUpdateData(); // Creates an update data object for a component hint update. @@ -100,8 +103,6 @@ std::unique_ptr<EntryVector> entries_to_save_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(StoreUpdateData); }; } // namespace optimization_guide
diff --git a/components/optimization_guide/core/test_hints_component_creator.h b/components/optimization_guide/core/test_hints_component_creator.h index 6517461e..d64abf5 100644 --- a/components/optimization_guide/core/test_hints_component_creator.h +++ b/components/optimization_guide/core/test_hints_component_creator.h
@@ -26,6 +26,11 @@ class TestHintsComponentCreator { public: TestHintsComponentCreator(); + + TestHintsComponentCreator(const TestHintsComponentCreator&) = delete; + TestHintsComponentCreator& operator=(const TestHintsComponentCreator&) = + delete; + ~TestHintsComponentCreator(); // Creates component data based on |allowlisted_hosts| and @@ -56,8 +61,6 @@ std::unique_ptr<base::ScopedTempDir> scoped_temp_dir_; int next_component_version_; - - DISALLOW_COPY_AND_ASSIGN(TestHintsComponentCreator); }; } // namespace testing
diff --git a/components/os_crypt/key_storage_config_linux.h b/components/os_crypt/key_storage_config_linux.h index 72c16682..5904c841 100644 --- a/components/os_crypt/key_storage_config_linux.h +++ b/components/os_crypt/key_storage_config_linux.h
@@ -20,6 +20,10 @@ struct COMPONENT_EXPORT(OS_CRYPT) Config { public: Config(); + + Config(const Config&) = delete; + Config& operator=(const Config&) = delete; + ~Config(); // Force OSCrypt to use a specific linux password store. @@ -40,9 +44,6 @@ bool should_use_preference; // Preferences are stored in a separate file in the user data directory. base::FilePath user_data_path; - - private: - DISALLOW_COPY_AND_ASSIGN(Config); }; } // namespace os_crypt
diff --git a/components/os_crypt/key_storage_keyring.h b/components/os_crypt/key_storage_keyring.h index 598c8b8a..385f84d9 100644 --- a/components/os_crypt/key_storage_keyring.h +++ b/components/os_crypt/key_storage_keyring.h
@@ -23,6 +23,10 @@ KeyStorageKeyring( scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, std::string application_name); + + KeyStorageKeyring(const KeyStorageKeyring&) = delete; + KeyStorageKeyring& operator=(const KeyStorageKeyring&) = delete; + ~KeyStorageKeyring() override; protected: @@ -39,8 +43,6 @@ scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner_; const std::string application_name_; - - DISALLOW_COPY_AND_ASSIGN(KeyStorageKeyring); }; #endif // COMPONENTS_OS_CRYPT_KEY_STORAGE_KEYRING_H_
diff --git a/components/os_crypt/key_storage_keyring_unittest.cc b/components/os_crypt/key_storage_keyring_unittest.cc index 93fc216..65f4058 100644 --- a/components/os_crypt/key_storage_keyring_unittest.cc +++ b/components/os_crypt/key_storage_keyring_unittest.cc
@@ -119,14 +119,15 @@ class GnomeKeyringTest : public testing::Test { public: GnomeKeyringTest(); + + GnomeKeyringTest(const GnomeKeyringTest&) = delete; + GnomeKeyringTest& operator=(const GnomeKeyringTest&) = delete; + ~GnomeKeyringTest() override; protected: scoped_refptr<base::TestSimpleTaskRunner> task_runner_; KeyStorageKeyring keyring_; - - private: - DISALLOW_COPY_AND_ASSIGN(GnomeKeyringTest); }; GnomeKeyringTest::GnomeKeyringTest()
diff --git a/components/os_crypt/key_storage_kwallet.h b/components/os_crypt/key_storage_kwallet.h index 6f48d43..1f0fc3a 100644 --- a/components/os_crypt/key_storage_kwallet.h +++ b/components/os_crypt/key_storage_kwallet.h
@@ -17,6 +17,10 @@ public: KeyStorageKWallet(base::nix::DesktopEnvironment desktop_env, std::string app_name); + + KeyStorageKWallet(const KeyStorageKWallet&) = delete; + KeyStorageKWallet& operator=(const KeyStorageKWallet&) = delete; + ~KeyStorageKWallet() override; // Initialize using an optional KWalletDBus mock. @@ -48,8 +52,6 @@ std::string wallet_name_; const std::string app_name_; std::unique_ptr<KWalletDBus> kwallet_dbus_; - - DISALLOW_COPY_AND_ASSIGN(KeyStorageKWallet); }; #endif // COMPONENTS_OS_CRYPT_KEY_STORAGE_KWALLET_H_
diff --git a/components/os_crypt/key_storage_libsecret.h b/components/os_crypt/key_storage_libsecret.h index 5292e21..855b6cc 100644 --- a/components/os_crypt/key_storage_libsecret.h +++ b/components/os_crypt/key_storage_libsecret.h
@@ -16,6 +16,10 @@ class COMPONENT_EXPORT(OS_CRYPT) KeyStorageLibsecret : public KeyStorageLinux { public: explicit KeyStorageLibsecret(std::string application_name); + + KeyStorageLibsecret(const KeyStorageLibsecret&) = delete; + KeyStorageLibsecret& operator=(const KeyStorageLibsecret&) = delete; + ~KeyStorageLibsecret() override = default; protected: @@ -27,8 +31,6 @@ absl::optional<std::string> AddRandomPasswordInLibsecret(); const std::string application_name_; - - DISALLOW_COPY_AND_ASSIGN(KeyStorageLibsecret); }; #endif // COMPONENTS_OS_CRYPT_KEY_STORAGE_LIBSECRET_H_
diff --git a/components/os_crypt/key_storage_libsecret_unittest.cc b/components/os_crypt/key_storage_libsecret_unittest.cc index a17bbc1f..134b071b 100644 --- a/components/os_crypt/key_storage_libsecret_unittest.cc +++ b/components/os_crypt/key_storage_libsecret_unittest.cc
@@ -225,14 +225,15 @@ class LibsecretTest : public testing::Test { public: LibsecretTest() = default; + + LibsecretTest(const LibsecretTest&) = delete; + LibsecretTest& operator=(const LibsecretTest&) = delete; + ~LibsecretTest() override = default; void SetUp() override { MockLibsecretLoader::ResetForOSCrypt(); } void TearDown() override { MockLibsecretLoader::TearDown(); } - - private: - DISALLOW_COPY_AND_ASSIGN(LibsecretTest); }; TEST_F(LibsecretTest, LibsecretRepeats) {
diff --git a/components/os_crypt/key_storage_linux.h b/components/os_crypt/key_storage_linux.h index 8afab67..8a5b396 100644 --- a/components/os_crypt/key_storage_linux.h +++ b/components/os_crypt/key_storage_linux.h
@@ -27,6 +27,10 @@ class COMPONENT_EXPORT(OS_CRYPT) KeyStorageLinux { public: KeyStorageLinux() = default; + + KeyStorageLinux(const KeyStorageLinux&) = delete; + KeyStorageLinux& operator=(const KeyStorageLinux&) = delete; + virtual ~KeyStorageLinux() = default; // Tries to load the appropriate key storage. Returns null if none succeed. @@ -75,8 +79,6 @@ // Perform the blocking calls to the backend to initialise. Store the // initialisation result in |success| and signal completion on |on_inited|. void BlockOnInitThenSignal(base::WaitableEvent* on_inited, bool* success); - - DISALLOW_COPY_AND_ASSIGN(KeyStorageLinux); }; #endif // COMPONENTS_OS_CRYPT_KEY_STORAGE_LINUX_H_
diff --git a/components/os_crypt/key_storage_linux_unittest.cc b/components/os_crypt/key_storage_linux_unittest.cc index 1f37bf0..9673361 100644 --- a/components/os_crypt/key_storage_linux_unittest.cc +++ b/components/os_crypt/key_storage_linux_unittest.cc
@@ -15,6 +15,10 @@ public: explicit FakeKeyStorageLinux(base::SequencedTaskRunner* task_runner) : task_runner_(task_runner) {} + + FakeKeyStorageLinux(const FakeKeyStorageLinux&) = delete; + FakeKeyStorageLinux& operator=(const FakeKeyStorageLinux&) = delete; + ~FakeKeyStorageLinux() override = default; protected: @@ -27,16 +31,16 @@ private: base::SequencedTaskRunner* task_runner_; - DISALLOW_COPY_AND_ASSIGN(FakeKeyStorageLinux); }; class KeyStorageLinuxTest : public testing::Test { public: KeyStorageLinuxTest() = default; - ~KeyStorageLinuxTest() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(KeyStorageLinuxTest); + KeyStorageLinuxTest(const KeyStorageLinuxTest&) = delete; + KeyStorageLinuxTest& operator=(const KeyStorageLinuxTest&) = delete; + + ~KeyStorageLinuxTest() override = default; }; TEST_F(KeyStorageLinuxTest, SkipPostingToSameTaskRunner) {
diff --git a/components/os_crypt/key_storage_util_linux_unittest.cc b/components/os_crypt/key_storage_util_linux_unittest.cc index 3594a73..0ef1605 100644 --- a/components/os_crypt/key_storage_util_linux_unittest.cc +++ b/components/os_crypt/key_storage_util_linux_unittest.cc
@@ -13,6 +13,12 @@ class KeyStorageUtilLinuxPreferenceTest : public testing::Test { public: KeyStorageUtilLinuxPreferenceTest() = default; + + KeyStorageUtilLinuxPreferenceTest(const KeyStorageUtilLinuxPreferenceTest&) = + delete; + KeyStorageUtilLinuxPreferenceTest& operator=( + const KeyStorageUtilLinuxPreferenceTest&) = delete; + ~KeyStorageUtilLinuxPreferenceTest() override = default; void SetUp() override { @@ -25,9 +31,6 @@ protected: base::FilePath fake_user_data_dir_; - - private: - DISALLOW_COPY_AND_ASSIGN(KeyStorageUtilLinuxPreferenceTest); }; TEST_F(KeyStorageUtilLinuxPreferenceTest, FirstTimeDefaultsToTrue) { @@ -58,14 +61,15 @@ class KeyStorageUtilLinuxTest : public testing::Test { public: KeyStorageUtilLinuxTest() = default; + + KeyStorageUtilLinuxTest(const KeyStorageUtilLinuxTest&) = delete; + KeyStorageUtilLinuxTest& operator=(const KeyStorageUtilLinuxTest&) = delete; + ~KeyStorageUtilLinuxTest() override = default; void SetUp() override {} void TearDown() override {} - - private: - DISALLOW_COPY_AND_ASSIGN(KeyStorageUtilLinuxTest); }; TEST_F(KeyStorageUtilLinuxTest, PasswordStoreFlagOverrides) {
diff --git a/components/os_crypt/keychain_password_mac.h b/components/os_crypt/keychain_password_mac.h index a8128438..340aa85 100644 --- a/components/os_crypt/keychain_password_mac.h +++ b/components/os_crypt/keychain_password_mac.h
@@ -23,6 +23,10 @@ #endif KeychainPassword(const crypto::AppleKeychain& keychain); + + KeychainPassword(const KeychainPassword&) = delete; + KeychainPassword& operator=(const KeychainPassword&) = delete; + ~KeychainPassword(); // Get the OSCrypt password for this system. If no password exists @@ -39,8 +43,6 @@ private: const crypto::AppleKeychain& keychain_; - - DISALLOW_COPY_AND_ASSIGN(KeychainPassword); }; #endif // COMPONENTS_OS_CRYPT_KEYCHAIN_PASSWORD_MAC_H_
diff --git a/components/os_crypt/kwallet_dbus.h b/components/os_crypt/kwallet_dbus.h index eb507dac..c30c27e 100644 --- a/components/os_crypt/kwallet_dbus.h +++ b/components/os_crypt/kwallet_dbus.h
@@ -26,6 +26,10 @@ enum Error { SUCCESS = 0, CANNOT_CONTACT, CANNOT_READ }; explicit KWalletDBus(base::nix::DesktopEnvironment desktop_env); + + KWalletDBus(const KWalletDBus&) = delete; + KWalletDBus& operator=(const KWalletDBus&) = delete; + virtual ~KWalletDBus(); // Set the bus that we will use. Required before any other operation. @@ -141,8 +145,6 @@ std::string dbus_path_; // The name used for logging and by klauncher when starting KWallet. std::string kwalletd_name_; - - DISALLOW_COPY_AND_ASSIGN(KWalletDBus); }; #endif // COMPONENTS_OS_CRYPT_KWALLET_DBUS_H_
diff --git a/components/os_crypt/libsecret_util_linux.h b/components/os_crypt/libsecret_util_linux.h index 53ce5c2..7e3c3ecd 100644 --- a/components/os_crypt/libsecret_util_linux.h +++ b/components/os_crypt/libsecret_util_linux.h
@@ -42,6 +42,10 @@ class COMPONENT_EXPORT(OS_CRYPT) SearchHelper { public: SearchHelper(); + + SearchHelper(const SearchHelper&) = delete; + SearchHelper& operator=(const SearchHelper&) = delete; + ~SearchHelper(); // Search must be called exactly once for success() and results() to be @@ -57,7 +61,6 @@ // |results_| and |error_| are C-style objects owned by this instance. GList* results_ = nullptr; GError* error_ = nullptr; - DISALLOW_COPY_AND_ASSIGN(SearchHelper); }; // Loads the libsecret library and checks that it responds to queries. @@ -98,6 +101,11 @@ class COMPONENT_EXPORT(OS_CRYPT) LibsecretAttributesBuilder { public: LibsecretAttributesBuilder(); + + LibsecretAttributesBuilder(const LibsecretAttributesBuilder&) = delete; + LibsecretAttributesBuilder& operator=(const LibsecretAttributesBuilder&) = + delete; + ~LibsecretAttributesBuilder(); void Append(const std::string& name, const std::string& value); @@ -116,8 +124,6 @@ // ASan tests, because it may move the objects and break the references. std::list<std::string> name_values_; GHashTable* attrs_; - - DISALLOW_COPY_AND_ASSIGN(LibsecretAttributesBuilder); }; #endif // COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_
diff --git a/components/os_crypt/os_crypt_linux_unittest.cc b/components/os_crypt/os_crypt_linux_unittest.cc index b6792d7..80122ed 100644 --- a/components/os_crypt/os_crypt_linux_unittest.cc +++ b/components/os_crypt/os_crypt_linux_unittest.cc
@@ -20,6 +20,9 @@ public: OSCryptLinuxTest() : key_("something") { key_ptr_ = &key_; } + OSCryptLinuxTest(const OSCryptLinuxTest&) = delete; + OSCryptLinuxTest& operator=(const OSCryptLinuxTest&) = delete; + ~OSCryptLinuxTest() override { key_ptr_ = nullptr; } void SetUp() override { @@ -39,8 +42,6 @@ std::string key_; // Points to the |key_| of the currently running test. static std::string* key_ptr_; - - DISALLOW_COPY_AND_ASSIGN(OSCryptLinuxTest); }; std::string* OSCryptLinuxTest::key_ptr_;
diff --git a/components/os_crypt/os_crypt_mocker_linux.h b/components/os_crypt/os_crypt_mocker_linux.h index cddad20..53bbe43 100644 --- a/components/os_crypt/os_crypt_mocker_linux.h +++ b/components/os_crypt/os_crypt_mocker_linux.h
@@ -16,6 +16,10 @@ class OSCryptMockerLinux : public KeyStorageLinux { public: OSCryptMockerLinux() = default; + + OSCryptMockerLinux(const OSCryptMockerLinux&) = delete; + OSCryptMockerLinux& operator=(const OSCryptMockerLinux&) = delete; + ~OSCryptMockerLinux() override = default; // Get a pointer to the stored password. OSCryptMockerLinux owns the pointer. @@ -34,8 +38,6 @@ private: std::string key_; - - DISALLOW_COPY_AND_ASSIGN(OSCryptMockerLinux); }; #endif // COMPONENTS_OS_CRYPT_OS_CRYPT_MOCKER_LINUX_H_
diff --git a/components/os_crypt/os_crypt_unittest.cc b/components/os_crypt/os_crypt_unittest.cc index dd03eed..818834f 100644 --- a/components/os_crypt/os_crypt_unittest.cc +++ b/components/os_crypt/os_crypt_unittest.cc
@@ -36,10 +36,10 @@ public: OSCryptTest() { OSCryptMocker::SetUp(); } - ~OSCryptTest() override { OSCryptMocker::TearDown(); } + OSCryptTest(const OSCryptTest&) = delete; + OSCryptTest& operator=(const OSCryptTest&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(OSCryptTest); + ~OSCryptTest() override { OSCryptMocker::TearDown(); } }; TEST_F(OSCryptTest, String16EncryptionDecryption) { @@ -159,10 +159,10 @@ public: OSCryptConcurrencyTest() { OSCryptMocker::SetUp(); } - ~OSCryptConcurrencyTest() override { OSCryptMocker::TearDown(); } + OSCryptConcurrencyTest(const OSCryptConcurrencyTest&) = delete; + OSCryptConcurrencyTest& operator=(const OSCryptConcurrencyTest&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(OSCryptConcurrencyTest); + ~OSCryptConcurrencyTest() override { OSCryptMocker::TearDown(); } }; // Flaky on Win 7 (dbg) and win-asan, see https://crbug.com/1066699 @@ -205,10 +205,10 @@ public: OSCryptTestWin() {} - ~OSCryptTestWin() override { OSCryptMocker::ResetState(); } + OSCryptTestWin(const OSCryptTestWin&) = delete; + OSCryptTestWin& operator=(const OSCryptTestWin&) = delete; - private: - DISALLOW_COPY_AND_ASSIGN(OSCryptTestWin); + ~OSCryptTestWin() override { OSCryptMocker::ResetState(); } }; // This test verifies that the header of the data returned from CryptProtectData
diff --git a/components/ownership/owner_settings_service.h b/components/ownership/owner_settings_service.h index 57b4913..c12b94d 100644 --- a/components/ownership/owner_settings_service.h +++ b/components/ownership/owner_settings_service.h
@@ -60,6 +60,10 @@ explicit OwnerSettingsService( const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util); + + OwnerSettingsService(const OwnerSettingsService&) = delete; + OwnerSettingsService& operator=(const OwnerSettingsService&) = delete; + ~OwnerSettingsService() override; base::WeakPtr<OwnerSettingsService> as_weak_ptr() { @@ -152,8 +156,6 @@ private: base::WeakPtrFactory<OwnerSettingsService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OwnerSettingsService); }; } // namespace ownership
diff --git a/components/page_image_annotation/content/renderer/content_page_annotator_driver.h b/components/page_image_annotation/content/renderer/content_page_annotator_driver.h index 5264538..4244f47 100644 --- a/components/page_image_annotation/content/renderer/content_page_annotator_driver.h +++ b/components/page_image_annotation/content/renderer/content_page_annotator_driver.h
@@ -27,6 +27,10 @@ : public content::RenderFrameObserver, public content::RenderFrameObserverTracker<ContentPageAnnotatorDriver> { public: + ContentPageAnnotatorDriver(const ContentPageAnnotatorDriver&) = delete; + ContentPageAnnotatorDriver& operator=(const ContentPageAnnotatorDriver&) = + delete; + ~ContentPageAnnotatorDriver() override; static ContentPageAnnotatorDriver* GetOrCreate( @@ -79,8 +83,6 @@ PageAnnotator page_annotator_; base::WeakPtrFactory<ContentPageAnnotatorDriver> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ContentPageAnnotatorDriver); }; } // namespace page_image_annotation
diff --git a/components/page_image_annotation/core/page_annotator.h b/components/page_image_annotation/core/page_annotator.h index e0854ab1..e4bb809 100644 --- a/components/page_image_annotation/core/page_annotator.h +++ b/components/page_image_annotation/core/page_annotator.h
@@ -69,6 +69,10 @@ explicit PageAnnotator( mojo::PendingRemote<image_annotation::mojom::Annotator> annotator); + + PageAnnotator(const PageAnnotator&) = delete; + PageAnnotator& operator=(const PageAnnotator&) = delete; + ~PageAnnotator(); // Request annotation of the given image via the image annotation service. @@ -109,8 +113,6 @@ std::map<uint64_t, std::pair<ImageMetadata, image_annotation::ImageProcessor>> images_; - - DISALLOW_COPY_AND_ASSIGN(PageAnnotator); }; } // namespace page_image_annotation
diff --git a/components/page_info/android/connection_info_view_android.h b/components/page_info/android/connection_info_view_android.h index 51100c9..d6fedc8 100644 --- a/components/page_info/android/connection_info_view_android.h +++ b/components/page_info/android/connection_info_view_android.h
@@ -28,6 +28,11 @@ ConnectionInfoViewAndroid(JNIEnv* env, jobject java_page_info, content::WebContents* web_contents); + + ConnectionInfoViewAndroid(const ConnectionInfoViewAndroid&) = delete; + ConnectionInfoViewAndroid& operator=(const ConnectionInfoViewAndroid&) = + delete; + ~ConnectionInfoViewAndroid() override; void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); @@ -50,8 +55,6 @@ // The java prompt implementation. base::android::ScopedJavaGlobalRef<jobject> popup_jobject_; - - DISALLOW_COPY_AND_ASSIGN(ConnectionInfoViewAndroid); }; #endif // COMPONENTS_PAGE_INFO_ANDROID_CONNECTION_INFO_VIEW_ANDROID_H_
diff --git a/components/page_info/android/page_info_controller_android.h b/components/page_info/android/page_info_controller_android.h index f6dcb14..1cfde4c 100644 --- a/components/page_info/android/page_info_controller_android.h +++ b/components/page_info/android/page_info_controller_android.h
@@ -24,6 +24,11 @@ PageInfoControllerAndroid(JNIEnv* env, jobject java_page_info, content::WebContents* web_contents); + + PageInfoControllerAndroid(const PageInfoControllerAndroid&) = delete; + PageInfoControllerAndroid& operator=(const PageInfoControllerAndroid&) = + delete; + ~PageInfoControllerAndroid() override; void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); void RecordPageInfoAction(JNIEnv* env, @@ -56,8 +61,6 @@ GURL url_; content::WebContents* web_contents_; - - DISALLOW_COPY_AND_ASSIGN(PageInfoControllerAndroid); }; #endif // COMPONENTS_PAGE_INFO_ANDROID_PAGE_INFO_CONTROLLER_ANDROID_H_
diff --git a/components/page_info/page_info.h b/components/page_info/page_info.h index 791be712..560e75a 100644 --- a/components/page_info/page_info.h +++ b/components/page_info/page_info.h
@@ -182,6 +182,10 @@ PageInfo(std::unique_ptr<PageInfoDelegate> delegate, content::WebContents* web_contents, const GURL& url); + + PageInfo(const PageInfo&) = delete; + PageInfo& operator=(const PageInfo&) = delete; + ~PageInfo(); // Checks whether this permission is currently the factory default, as set by @@ -429,8 +433,6 @@ // Description of the Safe Browsing status. Non-empty if // MaliciousContentStatus isn't NONE. std::u16string safe_browsing_details_; - - DISALLOW_COPY_AND_ASSIGN(PageInfo); }; #endif // COMPONENTS_PAGE_INFO_PAGE_INFO_H_
diff --git a/components/page_load_metrics/browser/layout_shift_normalization.h b/components/page_load_metrics/browser/layout_shift_normalization.h index 832dc7f..6dfd6d2 100644 --- a/components/page_load_metrics/browser/layout_shift_normalization.h +++ b/components/page_load_metrics/browser/layout_shift_normalization.h
@@ -17,6 +17,10 @@ class LayoutShiftNormalization { public: LayoutShiftNormalization(); + + LayoutShiftNormalization(const LayoutShiftNormalization&) = delete; + LayoutShiftNormalization& operator=(const LayoutShiftNormalization&) = delete; + ~LayoutShiftNormalization(); const NormalizedCLSData& normalized_cls_data() const { return normalized_cls_data_; @@ -60,8 +64,6 @@ std::vector<std::pair<base::TimeTicks, double>> recent_layout_shifts_; SessionWindow session_gap1000ms_max5000ms_; - - DISALLOW_COPY_AND_ASSIGN(LayoutShiftNormalization); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/metrics_navigation_throttle.h b/components/page_load_metrics/browser/metrics_navigation_throttle.h index 0b33572..75f2d01 100644 --- a/components/page_load_metrics/browser/metrics_navigation_throttle.h +++ b/components/page_load_metrics/browser/metrics_navigation_throttle.h
@@ -20,6 +20,11 @@ public: static std::unique_ptr<content::NavigationThrottle> Create( content::NavigationHandle* handle); + + MetricsNavigationThrottle(const MetricsNavigationThrottle&) = delete; + MetricsNavigationThrottle& operator=(const MetricsNavigationThrottle&) = + delete; + ~MetricsNavigationThrottle() override; // content::NavigationThrottle: @@ -30,8 +35,6 @@ private: explicit MetricsNavigationThrottle(content::NavigationHandle* handle); - - DISALLOW_COPY_AND_ASSIGN(MetricsNavigationThrottle); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.h b/components/page_load_metrics/browser/metrics_web_contents_observer.h index b3ca49f0..1a0f061 100644 --- a/components/page_load_metrics/browser/metrics_web_contents_observer.h +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.h
@@ -60,6 +60,10 @@ class TestingObserver { public: explicit TestingObserver(content::WebContents* web_contents); + + TestingObserver(const TestingObserver&) = delete; + TestingObserver& operator=(const TestingObserver&) = delete; + virtual ~TestingObserver(); void OnGoingAway(); @@ -84,8 +88,6 @@ private: page_load_metrics::MetricsWebContentsObserver* observer_; - - DISALLOW_COPY_AND_ASSIGN(TestingObserver); }; // Record a set of WebFeatures directly from the browser process. This
diff --git a/components/page_load_metrics/browser/observers/ad_metrics/page_ad_density_tracker.cc b/components/page_load_metrics/browser/observers/ad_metrics/page_ad_density_tracker.cc index bc2b8284..0a640cf 100644 --- a/components/page_load_metrics/browser/observers/ad_metrics/page_ad_density_tracker.cc +++ b/components/page_load_metrics/browser/observers/ad_metrics/page_ad_density_tracker.cc
@@ -62,6 +62,10 @@ }; SegmentLength() = default; + + SegmentLength(const SegmentLength&) = delete; + SegmentLength& operator=(const SegmentLength&) = delete; + ~SegmentLength() = default; // Add a line segment to the set of active line segments, the segment @@ -128,8 +132,6 @@ // Map from the segment_id passed by user to the Segment struct. std::unordered_map<int, SegmentEventSetIterators> segment_event_iterators_; - - DISALLOW_COPY_AND_ASSIGN(SegmentLength); }; } // namespace
diff --git a/components/page_load_metrics/browser/observers/back_forward_cache_page_load_metrics_observer.h b/components/page_load_metrics/browser/observers/back_forward_cache_page_load_metrics_observer.h index bdea070c..b668cc8 100644 --- a/components/page_load_metrics/browser/observers/back_forward_cache_page_load_metrics_observer.h +++ b/components/page_load_metrics/browser/observers/back_forward_cache_page_load_metrics_observer.h
@@ -30,6 +30,12 @@ : public page_load_metrics::PageLoadMetricsObserver { public: BackForwardCachePageLoadMetricsObserver(); + + BackForwardCachePageLoadMetricsObserver( + const BackForwardCachePageLoadMetricsObserver&) = delete; + BackForwardCachePageLoadMetricsObserver& operator=( + const BackForwardCachePageLoadMetricsObserver&) = delete; + ~BackForwardCachePageLoadMetricsObserver() override; // page_load_metrics::PageLoadMetricsObserver: @@ -91,8 +97,6 @@ // IDs for the navigations when the page is restored from the back-forward // cache. std::vector<ukm::SourceId> back_forward_cache_navigation_ids_; - - DISALLOW_COPY_AND_ASSIGN(BackForwardCachePageLoadMetricsObserver); }; #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_BACK_FORWARD_CACHE_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/components/page_load_metrics/browser/observers/click_input_tracker.h b/components/page_load_metrics/browser/observers/click_input_tracker.h index 8b89a121..115e99e 100644 --- a/components/page_load_metrics/browser/observers/click_input_tracker.h +++ b/components/page_load_metrics/browser/observers/click_input_tracker.h
@@ -22,6 +22,10 @@ class ClickInputTracker { public: ClickInputTracker(); + + ClickInputTracker(const ClickInputTracker&) = delete; + ClickInputTracker& operator=(const ClickInputTracker&) = delete; + ~ClickInputTracker(); // Considers whether |event| is part of a user click burst. Must be called @@ -66,8 +70,6 @@ // Position of the last click input. gfx::PointF last_click_position_; - - DISALLOW_COPY_AND_ASSIGN(ClickInputTracker); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/observers/core/largest_contentful_paint_handler.h b/components/page_load_metrics/browser/observers/core/largest_contentful_paint_handler.h index 606022ef..4ec2a55 100644 --- a/components/page_load_metrics/browser/observers/core/largest_contentful_paint_handler.h +++ b/components/page_load_metrics/browser/observers/core/largest_contentful_paint_handler.h
@@ -88,6 +88,11 @@ using FrameTreeNodeId = int; static void SetTestMode(bool enabled); LargestContentfulPaintHandler(); + + LargestContentfulPaintHandler(const LargestContentfulPaintHandler&) = delete; + LargestContentfulPaintHandler& operator=( + const LargestContentfulPaintHandler&) = delete; + ~LargestContentfulPaintHandler(); // Returns true if the out parameters are assigned values. @@ -192,7 +197,6 @@ // Navigation start offsets for the most recently committed document in each // frame. std::map<FrameTreeNodeId, base::TimeDelta> subframe_navigation_start_offset_; - DISALLOW_COPY_AND_ASSIGN(LargestContentfulPaintHandler); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/observers/core/uma_page_load_metrics_observer.h b/components/page_load_metrics/browser/observers/core/uma_page_load_metrics_observer.h index cb5dcc19..b05f162 100644 --- a/components/page_load_metrics/browser/observers/core/uma_page_load_metrics_observer.h +++ b/components/page_load_metrics/browser/observers/core/uma_page_load_metrics_observer.h
@@ -175,6 +175,11 @@ : public page_load_metrics::PageLoadMetricsObserver { public: UmaPageLoadMetricsObserver(); + + UmaPageLoadMetricsObserver(const UmaPageLoadMetricsObserver&) = delete; + UmaPageLoadMetricsObserver& operator=(const UmaPageLoadMetricsObserver&) = + delete; + ~UmaPageLoadMetricsObserver() override; // page_load_metrics::PageLoadMetricsObserver: @@ -300,8 +305,6 @@ bool received_first_subresource_load_ = false; base::TimeDelta total_subresource_load_time_; - - DISALLOW_COPY_AND_ASSIGN(UmaPageLoadMetricsObserver); }; #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_CORE_UMA_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/components/page_load_metrics/browser/observers/page_load_metrics_observer_content_test_harness.h b/components/page_load_metrics/browser/observers/page_load_metrics_observer_content_test_harness.h index 1a13583..a82a407 100644 --- a/components/page_load_metrics/browser/observers/page_load_metrics_observer_content_test_harness.h +++ b/components/page_load_metrics/browser/observers/page_load_metrics_observer_content_test_harness.h
@@ -29,6 +29,12 @@ : public content::RenderViewHostTestHarness { public: PageLoadMetricsObserverContentTestHarness(); + + PageLoadMetricsObserverContentTestHarness( + const PageLoadMetricsObserverContentTestHarness&) = delete; + PageLoadMetricsObserverContentTestHarness& operator=( + const PageLoadMetricsObserverContentTestHarness&) = delete; + ~PageLoadMetricsObserverContentTestHarness() override; void SetUp() override; @@ -43,8 +49,6 @@ std::unique_ptr<PageLoadMetricsObserverTester> tester_; PageLoadMetricsTestContentBrowserClient browser_client_; content::ContentBrowserClient* original_browser_client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsObserverContentTestHarness); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/observers/page_load_metrics_observer_tester.h b/components/page_load_metrics/browser/observers/page_load_metrics_observer_tester.h index 2f0fd53..a178951 100644 --- a/components/page_load_metrics/browser/observers/page_load_metrics_observer_tester.h +++ b/components/page_load_metrics/browser/observers/page_load_metrics_observer_tester.h
@@ -65,6 +65,11 @@ content::WebContents* web_contents, content::RenderViewHostTestHarness* rfh_test_harness, const RegisterObserversCallback& callback); + + PageLoadMetricsObserverTester(const PageLoadMetricsObserverTester&) = delete; + PageLoadMetricsObserverTester& operator=( + const PageLoadMetricsObserverTester&) = delete; + ~PageLoadMetricsObserverTester() override; // Simulates starting a navigation to the given gurl, without committing the @@ -183,8 +188,6 @@ MetricsWebContentsObserver* metrics_web_contents_observer_; base::HistogramTester histogram_tester_; ukm::TestAutoSetUkmRecorder test_ukm_recorder_; - - DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsObserverTester); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/observers/use_counter_page_load_metrics_observer.h b/components/page_load_metrics/browser/observers/use_counter_page_load_metrics_observer.h index d956e9b7..31ec2068 100644 --- a/components/page_load_metrics/browser/observers/use_counter_page_load_metrics_observer.h +++ b/components/page_load_metrics/browser/observers/use_counter_page_load_metrics_observer.h
@@ -35,6 +35,12 @@ : public page_load_metrics::PageLoadMetricsObserver { public: UseCounterPageLoadMetricsObserver(); + + UseCounterPageLoadMetricsObserver(const UseCounterPageLoadMetricsObserver&) = + delete; + UseCounterPageLoadMetricsObserver& operator=( + const UseCounterPageLoadMetricsObserver&) = delete; + ~UseCounterPageLoadMetricsObserver() override; // page_load_metrics::PageLoadMetricsObserver. @@ -98,7 +104,6 @@ blink::mojom::PermissionsPolicyFeature::kMaxValue) + 1> header_permissions_policy_features_recorded_; - DISALLOW_COPY_AND_ASSIGN(UseCounterPageLoadMetricsObserver); }; #endif // COMPONENTS_PAGE_LOAD_METRICS_BROWSER_OBSERVERS_USE_COUNTER_PAGE_LOAD_METRICS_OBSERVER_H_
diff --git a/components/page_load_metrics/browser/page_load_metrics_test_content_browser_client.h b/components/page_load_metrics/browser/page_load_metrics_test_content_browser_client.h index 484702f..25280d8 100644 --- a/components/page_load_metrics/browser/page_load_metrics_test_content_browser_client.h +++ b/components/page_load_metrics/browser/page_load_metrics_test_content_browser_client.h
@@ -16,15 +16,18 @@ : public content::ContentBrowserClient { public: PageLoadMetricsTestContentBrowserClient(); + + PageLoadMetricsTestContentBrowserClient( + const PageLoadMetricsTestContentBrowserClient&) = delete; + PageLoadMetricsTestContentBrowserClient& operator=( + const PageLoadMetricsTestContentBrowserClient&) = delete; + ~PageLoadMetricsTestContentBrowserClient() override; // content::ContentBrowserClient: std::vector<std::unique_ptr<content::NavigationThrottle>> CreateThrottlesForNavigation( content::NavigationHandle* navigation_handle) override; - - private: - DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsTestContentBrowserClient); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/page_load_metrics_update_dispatcher.h b/components/page_load_metrics/browser/page_load_metrics_update_dispatcher.h index 43cfa49..451c2f3 100644 --- a/components/page_load_metrics/browser/page_load_metrics_update_dispatcher.h +++ b/components/page_load_metrics/browser/page_load_metrics_update_dispatcher.h
@@ -148,6 +148,12 @@ Client* client, content::NavigationHandle* navigation_handle, PageLoadMetricsEmbedderInterface* embedder_interface); + + PageLoadMetricsUpdateDispatcher(const PageLoadMetricsUpdateDispatcher&) = + delete; + PageLoadMetricsUpdateDispatcher& operator=( + const PageLoadMetricsUpdateDispatcher&) = delete; + ~PageLoadMetricsUpdateDispatcher(); void UpdateMetrics( @@ -324,8 +330,6 @@ // and most input types (but not mousemove or pinch zoom). More comments in // UpdateHasSeenInputOrScroll. bool has_seen_input_or_scroll_ = false; - - DISALLOW_COPY_AND_ASSIGN(PageLoadMetricsUpdateDispatcher); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/browser/page_load_tracker.h b/components/page_load_metrics/browser/page_load_tracker.h index 8bf3e64..fac7fc4 100644 --- a/components/page_load_metrics/browser/page_load_tracker.h +++ b/components/page_load_metrics/browser/page_load_tracker.h
@@ -188,6 +188,10 @@ UserInitiatedInfo user_initiated_info, int aborted_chain_size, int aborted_chain_size_same_url); + + PageLoadTracker(const PageLoadTracker&) = delete; + PageLoadTracker& operator=(const PageLoadTracker&) = delete; + ~PageLoadTracker() override; // PageLoadMetricsUpdateDispatcher::Client implementation: @@ -508,8 +512,6 @@ largest_contentful_paint_handler_; page_load_metrics::LargestContentfulPaintHandler experimental_largest_contentful_paint_handler_; - - DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/common/test/weak_mock_timer.h b/components/page_load_metrics/common/test/weak_mock_timer.h index 04b700eb..1a2a07f 100644 --- a/components/page_load_metrics/common/test/weak_mock_timer.h +++ b/components/page_load_metrics/common/test/weak_mock_timer.h
@@ -27,6 +27,10 @@ class WeakMockTimerProvider { public: WeakMockTimerProvider(); + + WeakMockTimerProvider(const WeakMockTimerProvider&) = delete; + WeakMockTimerProvider& operator=(const WeakMockTimerProvider&) = delete; + virtual ~WeakMockTimerProvider(); base::MockOneShotTimer* GetMockTimer() const; @@ -34,8 +38,6 @@ private: base::WeakPtr<WeakMockTimer> timer_; - - DISALLOW_COPY_AND_ASSIGN(WeakMockTimerProvider); }; } // namespace test
diff --git a/components/page_load_metrics/renderer/fake_page_timing_sender.h b/components/page_load_metrics/renderer/fake_page_timing_sender.h index 86db8f6..1db2927 100644 --- a/components/page_load_metrics/renderer/fake_page_timing_sender.h +++ b/components/page_load_metrics/renderer/fake_page_timing_sender.h
@@ -40,6 +40,10 @@ class PageTimingValidator { public: PageTimingValidator(); + + PageTimingValidator(const PageTimingValidator&) = delete; + PageTimingValidator& operator=(const PageTimingValidator&) = delete; + ~PageTimingValidator(); // PageLoadTimings that are expected to be sent through SendTiming() should // be passed to ExpectPageLoadTiming. @@ -119,7 +123,6 @@ mojom::InputTimingPtr actual_input_timing; blink::MobileFriendliness expected_mobile_friendliness; blink::MobileFriendliness actual_mobile_friendliness; - DISALLOW_COPY_AND_ASSIGN(PageTimingValidator); }; explicit FakePageTimingSender(PageTimingValidator* validator);
diff --git a/components/page_load_metrics/renderer/metrics_render_frame_observer.h b/components/page_load_metrics/renderer/metrics_render_frame_observer.h index 18a8e9c..882ea7cd 100644 --- a/components/page_load_metrics/renderer/metrics_render_frame_observer.h +++ b/components/page_load_metrics/renderer/metrics_render_frame_observer.h
@@ -40,6 +40,11 @@ public subresource_filter::AdResourceTracker::Observer { public: explicit MetricsRenderFrameObserver(content::RenderFrame* render_frame); + + MetricsRenderFrameObserver(const MetricsRenderFrameObserver&) = delete; + MetricsRenderFrameObserver& operator=(const MetricsRenderFrameObserver&) = + delete; + ~MetricsRenderFrameObserver() override; // RenderFrameObserver implementation @@ -162,8 +167,6 @@ // Will be null when we're not actively sending metrics. std::unique_ptr<PageTimingMetricsSender> page_timing_metrics_sender_; - - DISALLOW_COPY_AND_ASSIGN(MetricsRenderFrameObserver); }; } // namespace page_load_metrics
diff --git a/components/page_load_metrics/renderer/page_timing_metrics_sender.h b/components/page_load_metrics/renderer/page_timing_metrics_sender.h index fc82053..a50a0df 100644 --- a/components/page_load_metrics/renderer/page_timing_metrics_sender.h +++ b/components/page_load_metrics/renderer/page_timing_metrics_sender.h
@@ -44,6 +44,10 @@ const PageTimingMetadataRecorder::MonotonicTiming& initial_monotonic_timing, std::unique_ptr<PageResourceDataUse> initial_request); + + PageTimingMetricsSender(const PageTimingMetricsSender&) = delete; + PageTimingMetricsSender& operator=(const PageTimingMetricsSender&) = delete; + ~PageTimingMetricsSender(); void DidObserveLoadingBehavior(blink::LoadingBehaviorFlag behavior); @@ -136,8 +140,6 @@ // Responsible for recording sampling profiler metadata corresponding to page // timing. PageTimingMetadataRecorder metadata_recorder_; - - DISALLOW_COPY_AND_ASSIGN(PageTimingMetricsSender); }; } // namespace page_load_metrics
diff --git a/components/password_manager/content/browser/content_credential_manager.h b/components/password_manager/content/browser/content_credential_manager.h index e24ff5a..3c0c5be 100644 --- a/components/password_manager/content/browser/content_credential_manager.h +++ b/components/password_manager/content/browser/content_credential_manager.h
@@ -24,6 +24,10 @@ class ContentCredentialManager : public blink::mojom::CredentialManager { public: explicit ContentCredentialManager(PasswordManagerClient* client); + + ContentCredentialManager(const ContentCredentialManager&) = delete; + ContentCredentialManager& operator=(const ContentCredentialManager&) = delete; + ~ContentCredentialManager() override; void BindRequest( @@ -43,8 +47,6 @@ CredentialManagerImpl impl_; mojo::Receiver<blink::mojom::CredentialManager> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(ContentCredentialManager); }; } // namespace password_manager
diff --git a/components/password_manager/content/browser/content_password_manager_driver.h b/components/password_manager/content/browser/content_password_manager_driver.h index 4527ad6..72bd3c3 100644 --- a/components/password_manager/content/browser/content_password_manager_driver.h +++ b/components/password_manager/content/browser/content_password_manager_driver.h
@@ -40,6 +40,11 @@ ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host, PasswordManagerClient* client, autofill::AutofillClient* autofill_client); + + ContentPasswordManagerDriver(const ContentPasswordManagerDriver&) = delete; + ContentPasswordManagerDriver& operator=(const ContentPasswordManagerDriver&) = + delete; + ~ContentPasswordManagerDriver() override; // Gets the driver for |render_frame_host|. @@ -169,8 +174,6 @@ content::RenderWidgetHost::KeyPressEventCallback key_press_handler_; base::WeakPtrFactory<ContentPasswordManagerDriver> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); }; } // namespace password_manager
diff --git a/components/password_manager/content/browser/content_password_manager_driver_factory.h b/components/password_manager/content/browser/content_password_manager_driver_factory.h index 73372cb5..b6eeeb8d 100644 --- a/components/password_manager/content/browser/content_password_manager_driver_factory.h +++ b/components/password_manager/content/browser/content_password_manager_driver_factory.h
@@ -34,6 +34,11 @@ : public content::WebContentsObserver, public content::WebContentsUserData<ContentPasswordManagerDriverFactory> { public: + ContentPasswordManagerDriverFactory( + const ContentPasswordManagerDriverFactory&) = delete; + ContentPasswordManagerDriverFactory& operator=( + const ContentPasswordManagerDriverFactory&) = delete; + ~ContentPasswordManagerDriverFactory() override; static void BindPasswordManagerDriver( @@ -69,8 +74,6 @@ autofill::AutofillClient* autofill_client_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriverFactory); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/affiliation_backend_unittest.cc b/components/password_manager/core/browser/android_affiliation/affiliation_backend_unittest.cc index c5018e6..d7c51af 100644 --- a/components/password_manager/core/browser/android_affiliation/affiliation_backend_unittest.cc +++ b/components/password_manager/core/browser/android_affiliation/affiliation_backend_unittest.cc
@@ -55,6 +55,10 @@ EXPECT_CALL(*this, OnInformOfNetworkRequestComplete(testing::_)).Times(0); } + MockAffiliationFetchThrottler(const MockAffiliationFetchThrottler&) = delete; + MockAffiliationFetchThrottler& operator=( + const MockAffiliationFetchThrottler&) = delete; + ~MockAffiliationFetchThrottler() override { EXPECT_FALSE(signaled_network_request_needed_); } @@ -103,8 +107,6 @@ } bool signaled_network_request_needed_; - - DISALLOW_COPY_AND_ASSIGN(MockAffiliationFetchThrottler); }; const char kTestFacetURIAlpha1[] = "https://one.alpha.example.com";
diff --git a/components/password_manager/core/browser/android_affiliation/affiliation_database.h b/components/password_manager/core/browser/android_affiliation/affiliation_database.h index c41b283..214936ce 100644 --- a/components/password_manager/core/browser/android_affiliation/affiliation_database.h +++ b/components/password_manager/core/browser/android_affiliation/affiliation_database.h
@@ -35,6 +35,10 @@ class AffiliationDatabase { public: AffiliationDatabase(); + + AffiliationDatabase(const AffiliationDatabase&) = delete; + AffiliationDatabase& operator=(const AffiliationDatabase&) = delete; + ~AffiliationDatabase(); // Opens an existing database at |path|, or creates a new one if none exists, @@ -102,8 +106,6 @@ // The SQL connection to the database. std::unique_ptr<sql::Database> sql_connection_; - - DISALLOW_COPY_AND_ASSIGN(AffiliationDatabase); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler.h b/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler.h index c658484..54d660ff 100644 --- a/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler.h +++ b/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler.h
@@ -60,6 +60,11 @@ const scoped_refptr<base::SequencedTaskRunner>& task_runner, network::NetworkConnectionTracker* network_connection_tracker, const base::TickClock* tick_clock); + + AffiliationFetchThrottler(const AffiliationFetchThrottler&) = delete; + AffiliationFetchThrottler& operator=(const AffiliationFetchThrottler&) = + delete; + ~AffiliationFetchThrottler() override; // Signals to the throttling logic that a network request is needed, and that @@ -127,8 +132,6 @@ std::unique_ptr<net::BackoffEntry> exponential_backoff_; base::WeakPtrFactory<AffiliationFetchThrottler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AffiliationFetchThrottler); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler_unittest.cc b/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler_unittest.cc index a931dbc7..7c4837c 100644 --- a/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler_unittest.cc +++ b/components/password_manager/core/browser/android_affiliation/affiliation_fetch_throttler_unittest.cc
@@ -35,6 +35,12 @@ : tick_clock_(tick_clock), emulated_return_value_(true), can_send_count_(0u) {} + + MockAffiliationFetchThrottlerDelegate( + const MockAffiliationFetchThrottlerDelegate&) = delete; + MockAffiliationFetchThrottlerDelegate& operator=( + const MockAffiliationFetchThrottlerDelegate&) = delete; + ~MockAffiliationFetchThrottlerDelegate() override { EXPECT_EQ(0u, can_send_count_); } @@ -56,8 +62,6 @@ bool emulated_return_value_; size_t can_send_count_; base::TimeTicks last_can_send_time_; - - DISALLOW_COPY_AND_ASSIGN(MockAffiliationFetchThrottlerDelegate); }; } // namespace
diff --git a/components/password_manager/core/browser/android_affiliation/facet_manager.h b/components/password_manager/core/browser/android_affiliation/facet_manager.h index b477a153..6b00fe1 100644 --- a/components/password_manager/core/browser/android_affiliation/facet_manager.h +++ b/components/password_manager/core/browser/android_affiliation/facet_manager.h
@@ -35,6 +35,10 @@ FacetManager(const FacetURI& facet_uri, FacetManagerHost* backend, base::Clock* clock); + + FacetManager(const FacetManager&) = delete; + FacetManager& operator=(const FacetManager&) = delete; + ~FacetManager(); // Facet-specific implementations for methods in AffiliationService of @@ -130,8 +134,6 @@ // of individual prefetches can be supported even if there are two requests // with the same |keep_fresh_until| threshold. std::multiset<base::Time> keep_fresh_until_thresholds_; - - DISALLOW_COPY_AND_ASSIGN(FacetManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/mock_affiliated_match_helper.h b/components/password_manager/core/browser/android_affiliation/mock_affiliated_match_helper.h index 98d1066..ffa95950a 100644 --- a/components/password_manager/core/browser/android_affiliation/mock_affiliated_match_helper.h +++ b/components/password_manager/core/browser/android_affiliation/mock_affiliated_match_helper.h
@@ -30,6 +30,11 @@ }; MockAffiliatedMatchHelper(); + + MockAffiliatedMatchHelper(const MockAffiliatedMatchHelper&) = delete; + MockAffiliatedMatchHelper& operator=(const MockAffiliatedMatchHelper&) = + delete; + ~MockAffiliatedMatchHelper() override; // Expects GetAffiliatedAndroidAndWebRealms() to be called with the @@ -58,8 +63,6 @@ std::vector<std::unique_ptr<PasswordForm>> forms, AffiliationService::StrategyOnCacheMiss strategy_on_cache_miss, PasswordFormsCallback result_callback) override; - - DISALLOW_COPY_AND_ASSIGN(MockAffiliatedMatchHelper); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/android_affiliation/mock_affiliation_consumer.h b/components/password_manager/core/browser/android_affiliation/mock_affiliation_consumer.h index 21247000..d08ff02 100644 --- a/components/password_manager/core/browser/android_affiliation/mock_affiliation_consumer.h +++ b/components/password_manager/core/browser/android_affiliation/mock_affiliation_consumer.h
@@ -16,6 +16,10 @@ class MockAffiliationConsumer { public: MockAffiliationConsumer(); + + MockAffiliationConsumer(const MockAffiliationConsumer&) = delete; + MockAffiliationConsumer& operator=(const MockAffiliationConsumer&) = delete; + ~MockAffiliationConsumer(); // Expects that the result callback will be called exactly once and that it @@ -30,8 +34,6 @@ private: MOCK_METHOD2(OnResultCallback, void(const AffiliatedFacets&, bool)); - - DISALLOW_COPY_AND_ASSIGN(MockAffiliationConsumer); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/export/password_manager_exporter.h b/components/password_manager/core/browser/export/password_manager_exporter.h index 5407660..2e35c7b 100644 --- a/components/password_manager/core/browser/export/password_manager_exporter.h +++ b/components/password_manager/core/browser/export/password_manager_exporter.h
@@ -36,6 +36,10 @@ explicit PasswordManagerExporter( CredentialProviderInterface* credential_provider_interface, ProgressCallback on_progress); + + PasswordManagerExporter(const PasswordManagerExporter&) = delete; + PasswordManagerExporter& operator=(const PasswordManagerExporter&) = delete; + virtual ~PasswordManagerExporter(); // Pre-load the passwords from the password store. @@ -127,8 +131,6 @@ // the same sequence. scoped_refptr<base::SequencedTaskRunner> task_runner_; base::WeakPtrFactory<PasswordManagerExporter> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PasswordManagerExporter); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/export/password_manager_exporter_unittest.cc b/components/password_manager/core/browser/export/password_manager_exporter_unittest.cc index 20d36a31..4fec3578 100644 --- a/components/password_manager/core/browser/export/password_manager_exporter_unittest.cc +++ b/components/password_manager/core/browser/export/password_manager_exporter_unittest.cc
@@ -102,6 +102,10 @@ mock_set_posix_file_permissions_.Get()); } + PasswordManagerExporterTest(const PasswordManagerExporterTest&) = delete; + PasswordManagerExporterTest& operator=(const PasswordManagerExporterTest&) = + delete; + ~PasswordManagerExporterTest() override = default; protected: @@ -117,9 +121,6 @@ mock_set_posix_file_permissions_; base::FilePath destination_path_; base::HistogramTester histogram_tester_; - - private: - DISALLOW_COPY_AND_ASSIGN(PasswordManagerExporterTest); }; TEST_F(PasswordManagerExporterTest, PasswordExportSetPasswordListFirst) {
diff --git a/components/password_manager/core/browser/fake_form_fetcher.h b/components/password_manager/core/browser/fake_form_fetcher.h index 2ffa1b7..9e52dd9 100644 --- a/components/password_manager/core/browser/fake_form_fetcher.h +++ b/components/password_manager/core/browser/fake_form_fetcher.h
@@ -23,6 +23,9 @@ public: FakeFormFetcher(); + FakeFormFetcher(const FakeFormFetcher&) = delete; + FakeFormFetcher& operator=(const FakeFormFetcher&) = delete; + ~FakeFormFetcher() override; // Registers consumers to be notified when results are set. Unlike the @@ -88,8 +91,6 @@ std::vector<InsecureCredential> insecure_credentials_; const PasswordForm* preferred_match_ = nullptr; bool is_blocklisted_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeFormFetcher); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/field_info_table.h b/components/password_manager/core/browser/field_info_table.h index e4c88aab3..0d7bfad6 100644 --- a/components/password_manager/core/browser/field_info_table.h +++ b/components/password_manager/core/browser/field_info_table.h
@@ -33,6 +33,10 @@ class FieldInfoTable { public: FieldInfoTable() = default; + + FieldInfoTable(const FieldInfoTable&) = delete; + FieldInfoTable& operator=(const FieldInfoTable&) = delete; + ~FieldInfoTable() = default; // Initializes |db_|. @@ -60,8 +64,6 @@ private: sql::Database* db_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FieldInfoTable); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_fetcher.h b/components/password_manager/core/browser/form_fetcher.h index 9424e18..3c91c76 100644 --- a/components/password_manager/core/browser/form_fetcher.h +++ b/components/password_manager/core/browser/form_fetcher.h
@@ -42,6 +42,9 @@ FormFetcher() = default; + FormFetcher(const FormFetcher&) = delete; + FormFetcher& operator=(const FormFetcher&) = delete; + virtual ~FormFetcher() = default; // Adds |consumer|, which must not be null. If the current state is @@ -102,9 +105,6 @@ // Creates a copy of |*this| with contains the same credentials without the // need for calling Fetch(). virtual std::unique_ptr<FormFetcher> Clone() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FormFetcher); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_fetcher_impl.h b/components/password_manager/core/browser/form_fetcher_impl.h index 398f366..e1af024 100644 --- a/components/password_manager/core/browser/form_fetcher_impl.h +++ b/components/password_manager/core/browser/form_fetcher_impl.h
@@ -34,6 +34,9 @@ const PasswordManagerClient* client, bool should_migrate_http_passwords); + FormFetcherImpl(const FormFetcherImpl&) = delete; + FormFetcherImpl& operator=(const FormFetcherImpl&) = delete; + ~FormFetcherImpl() override; // Returns a MultiStoreFormFetcher if the password account storage feature is @@ -136,8 +139,6 @@ base::ObserverList<FormFetcher::Consumer> consumers_; base::WeakPtrFactory<FormFetcherImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FormFetcherImpl); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_fetcher_impl_unittest.cc b/components/password_manager/core/browser/form_fetcher_impl_unittest.cc index fa1c5b6..0a621f4 100644 --- a/components/password_manager/core/browser/form_fetcher_impl_unittest.cc +++ b/components/password_manager/core/browser/form_fetcher_impl_unittest.cc
@@ -82,6 +82,9 @@ // |username_value|. explicit NameFilter(StringPiece name) : name_(ASCIIToUTF16(name)) {} + NameFilter(const NameFilter&) = delete; + NameFilter& operator=(const NameFilter&) = delete; + ~NameFilter() override = default; bool ShouldSave(const PasswordForm& form) const override { @@ -90,8 +93,6 @@ private: const std::u16string name_; // |username_value| to filter - - DISALLOW_COPY_AND_ASSIGN(NameFilter); }; class FakeNetworkContext : public network::TestNetworkContext { @@ -106,6 +107,11 @@ class FakePasswordManagerClient : public StubPasswordManagerClient { public: FakePasswordManagerClient() = default; + + FakePasswordManagerClient(const FakePasswordManagerClient&) = delete; + FakePasswordManagerClient& operator=(const FakePasswordManagerClient&) = + delete; + ~FakePasswordManagerClient() override = default; network::mojom::NetworkContext* GetNetworkContext() const override { @@ -134,8 +140,6 @@ std::unique_ptr<CredentialsFilter> filter_; PasswordStoreInterface* store_ = nullptr; mutable FakeNetworkContext network_context_; - - DISALLOW_COPY_AND_ASSIGN(FakePasswordManagerClient); }; PasswordForm CreateHTMLForm(const char* origin_url, @@ -239,6 +243,9 @@ .WillByDefault(Return(&mock_smart_bubble_stats_store_)); } + FormFetcherImplTest(const FormFetcherImplTest&) = delete; + FormFetcherImplTest& operator=(const FormFetcherImplTest&) = delete; + ~FormFetcherImplTest() override = default; protected: @@ -260,9 +267,6 @@ scoped_refptr<MockPasswordStoreInterface> mock_store_; testing::NiceMock<MockSmartBubbleStatsStore> mock_smart_bubble_stats_store_; FakePasswordManagerClient client_; - - private: - DISALLOW_COPY_AND_ASSIGN(FormFetcherImplTest); }; // Check that the absence of PasswordStore results is handled correctly.
diff --git a/components/password_manager/core/browser/form_parsing/form_parser.h b/components/password_manager/core/browser/form_parsing/form_parser.h index 9c4eccf..88966cb 100644 --- a/components/password_manager/core/browser/form_parsing/form_parser.h +++ b/components/password_manager/core/browser/form_parsing/form_parser.h
@@ -119,6 +119,9 @@ FormDataParser(); + FormDataParser(const FormDataParser&) = delete; + FormDataParser& operator=(const FormDataParser&) = delete; + ~FormDataParser(); void set_predictions(FormPredictions predictions) { @@ -145,8 +148,6 @@ // Parse(). ReadonlyPasswordFields readonly_status_ = ReadonlyPasswordFields::kNoHeuristics; - - DISALLOW_COPY_AND_ASSIGN(FormDataParser); }; // Returns the value of PasswordForm::signon_realm for an HTML form with the
diff --git a/components/password_manager/core/browser/form_parsing/fuzzer/data_accessor.h b/components/password_manager/core/browser/form_parsing/fuzzer/data_accessor.h index c68fda25..807cd2e2 100644 --- a/components/password_manager/core/browser/form_parsing/fuzzer/data_accessor.h +++ b/components/password_manager/core/browser/form_parsing/fuzzer/data_accessor.h
@@ -26,6 +26,9 @@ // same part of input twice. DataAccessor(const uint8_t* data, size_t size); + DataAccessor(const DataAccessor&) = delete; + DataAccessor& operator=(const DataAccessor&) = delete; + ~DataAccessor(); // Return the next bit and advance the "reading head" by one bit. @@ -60,8 +63,6 @@ const uint8_t* data_; size_t bits_consumed_; size_t size_; - - DISALLOW_COPY_AND_ASSIGN(DataAccessor); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_saver.h b/components/password_manager/core/browser/form_saver.h index 2230d93..901dfe7 100644 --- a/components/password_manager/core/browser/form_saver.h +++ b/components/password_manager/core/browser/form_saver.h
@@ -23,6 +23,9 @@ public: FormSaver() = default; + FormSaver(const FormSaver&) = delete; + FormSaver& operator=(const FormSaver&) = delete; + virtual ~FormSaver() = default; // Blocklist the origin described by |digest|. Returns the PasswordForm pushed @@ -68,9 +71,6 @@ // Creates a new FormSaver with the same state as |*this|. virtual std::unique_ptr<FormSaver> Clone() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FormSaver); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_saver_impl.h b/components/password_manager/core/browser/form_saver_impl.h index b99a0af..d4e5219 100644 --- a/components/password_manager/core/browser/form_saver_impl.h +++ b/components/password_manager/core/browser/form_saver_impl.h
@@ -21,6 +21,9 @@ // PasswordStoreInterface operations. explicit FormSaverImpl(PasswordStoreInterface* store); + FormSaverImpl(const FormSaverImpl&) = delete; + FormSaverImpl& operator=(const FormSaverImpl&) = delete; + ~FormSaverImpl() override; // FormSaver: @@ -46,8 +49,6 @@ // Cached pointer to the PasswordStoreInterface. PasswordStoreInterface* const store_; - - DISALLOW_COPY_AND_ASSIGN(FormSaverImpl); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/form_saver_impl_unittest.cc b/components/password_manager/core/browser/form_saver_impl_unittest.cc index 2e93bd1..958c933 100644 --- a/components/password_manager/core/browser/form_saver_impl_unittest.cc +++ b/components/password_manager/core/browser/form_saver_impl_unittest.cc
@@ -70,6 +70,9 @@ : mock_store_(new StrictMock<MockPasswordStoreInterface>()), form_saver_(mock_store_.get()) {} + FormSaverImplTest(const FormSaverImplTest&) = delete; + FormSaverImplTest& operator=(const FormSaverImplTest&) = delete; + ~FormSaverImplTest() override { mock_store_->ShutdownOnUIThread(); } protected: @@ -78,9 +81,6 @@ base::test::TaskEnvironment::TimeSource::MOCK_TIME}; scoped_refptr<StrictMock<MockPasswordStoreInterface>> mock_store_; FormSaverImpl form_saver_; - - private: - DISALLOW_COPY_AND_ASSIGN(FormSaverImplTest); }; class FormSaverImplSaveTest
diff --git a/components/password_manager/core/browser/generation/password_requirements_spec_fetcher_impl.h b/components/password_manager/core/browser/generation/password_requirements_spec_fetcher_impl.h index d478560..f4c55d2 100644 --- a/components/password_manager/core/browser/generation/password_requirements_spec_fetcher_impl.h +++ b/components/password_manager/core/browser/generation/password_requirements_spec_fetcher_impl.h
@@ -56,6 +56,12 @@ int version, size_t prefix_length, int timeout); + + PasswordRequirementsSpecFetcherImpl( + const PasswordRequirementsSpecFetcherImpl&) = delete; + PasswordRequirementsSpecFetcherImpl& operator=( + const PasswordRequirementsSpecFetcherImpl&) = delete; + ~PasswordRequirementsSpecFetcherImpl() override; // Implementation for PasswordRequirementsSpecFetcher: @@ -134,8 +140,6 @@ // time of starting the network request until receiving the response or a // timeout. std::map<std::string, std::unique_ptr<LookupInFlight>> lookups_in_flight_; - - DISALLOW_COPY_AND_ASSIGN(PasswordRequirementsSpecFetcherImpl); }; } // namespace autofill
diff --git a/components/password_manager/core/browser/hash_password_manager.h b/components/password_manager/core/browser/hash_password_manager.h index 85e656ed..8f73352 100644 --- a/components/password_manager/core/browser/hash_password_manager.h +++ b/components/password_manager/core/browser/hash_password_manager.h
@@ -25,6 +25,10 @@ public: HashPasswordManager(); explicit HashPasswordManager(PrefService* prefs); + + HashPasswordManager(const HashPasswordManager&) = delete; + HashPasswordManager& operator=(const HashPasswordManager&) = delete; + ~HashPasswordManager(); bool SavePasswordHash(const std::string username, @@ -75,8 +79,6 @@ // saving the password hash actually succeeded. base::RepeatingCallbackList<void(const std::string& username)> state_callback_list_; - - DISALLOW_COPY_AND_ASSIGN(HashPasswordManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/hsts_query_unittest.cc b/components/password_manager/core/browser/hsts_query_unittest.cc index fe038f5..f37d08c 100644 --- a/components/password_manager/core/browser/hsts_query_unittest.cc +++ b/components/password_manager/core/browser/hsts_query_unittest.cc
@@ -30,14 +30,16 @@ HSTSStateManager(net::TransportSecurityState* state, bool is_hsts, std::string host); + + HSTSStateManager(const HSTSStateManager&) = delete; + HSTSStateManager& operator=(const HSTSStateManager&) = delete; + ~HSTSStateManager(); private: net::TransportSecurityState* state_; const bool is_hsts_; const std::string host_; - - DISALLOW_COPY_AND_ASSIGN(HSTSStateManager); }; HSTSStateManager::HSTSStateManager(net::TransportSecurityState* state,
diff --git a/components/password_manager/core/browser/http_credentials_cleaner.h b/components/password_manager/core/browser/http_credentials_cleaner.h index 2ee35c88..4abc02c 100644 --- a/components/password_manager/core/browser/http_credentials_cleaner.h +++ b/components/password_manager/core/browser/http_credentials_cleaner.h
@@ -64,6 +64,10 @@ base::RepeatingCallback<network::mojom::NetworkContext*()> network_context_getter, PrefService* prefs); + + HttpCredentialCleaner(const HttpCredentialCleaner&) = delete; + HttpCredentialCleaner& operator=(const HttpCredentialCleaner&) = delete; + ~HttpCredentialCleaner() override; // CredentialsCleaner: @@ -125,8 +129,6 @@ size_t total_http_credentials_ = 0; base::WeakPtrFactory<HttpCredentialCleaner> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HttpCredentialCleaner); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/http_credentials_cleaner_unittest.cc b/components/password_manager/core/browser/http_credentials_cleaner_unittest.cc index a684a6d..06582753 100644 --- a/components/password_manager/core/browser/http_credentials_cleaner_unittest.cc +++ b/components/password_manager/core/browser/http_credentials_cleaner_unittest.cc
@@ -103,24 +103,29 @@ class MockCredentialsCleanerObserver : public CredentialsCleaner::Observer { public: MockCredentialsCleanerObserver() = default; + + MockCredentialsCleanerObserver(const MockCredentialsCleanerObserver&) = + delete; + MockCredentialsCleanerObserver& operator=( + const MockCredentialsCleanerObserver&) = delete; + ~MockCredentialsCleanerObserver() override = default; MOCK_METHOD0(CleaningCompleted, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockCredentialsCleanerObserver); }; class HttpCredentialCleanerTest : public ::testing::TestWithParam<TestCase> { public: HttpCredentialCleanerTest() = default; + HttpCredentialCleanerTest(const HttpCredentialCleanerTest&) = delete; + HttpCredentialCleanerTest& operator=(const HttpCredentialCleanerTest&) = + delete; + ~HttpCredentialCleanerTest() override = default; protected: scoped_refptr<TestPasswordStore> store_ = base::MakeRefCounted<TestPasswordStore>(); - - DISALLOW_COPY_AND_ASSIGN(HttpCredentialCleanerTest); }; TEST_P(HttpCredentialCleanerTest, ReportHttpMigrationMetrics) {
diff --git a/components/password_manager/core/browser/http_password_store_migrator.h b/components/password_manager/core/browser/http_password_store_migrator.h index 6db0821..1d68a5e 100644 --- a/components/password_manager/core/browser/http_password_store_migrator.h +++ b/components/password_manager/core/browser/http_password_store_migrator.h
@@ -58,6 +58,11 @@ PasswordStoreInterface* store, network::mojom::NetworkContext* network_context, Consumer* consumer); + + HttpPasswordStoreMigrator(const HttpPasswordStoreMigrator&) = delete; + HttpPasswordStoreMigrator& operator=(const HttpPasswordStoreMigrator&) = + delete; + ~HttpPasswordStoreMigrator() override; // Creates HTTPS version of |http_form|. @@ -86,8 +91,6 @@ std::vector<std::unique_ptr<PasswordForm>> results_; url::Origin http_origin_domain_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(HttpPasswordStoreMigrator); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/http_password_store_migrator_unittest.cc b/components/password_manager/core/browser/http_password_store_migrator_unittest.cc index e68c79b..dc4824c 100644 --- a/components/password_manager/core/browser/http_password_store_migrator_unittest.cc +++ b/components/password_manager/core/browser/http_password_store_migrator_unittest.cc
@@ -108,6 +108,10 @@ public: HttpPasswordStoreMigratorTest() = default; + HttpPasswordStoreMigratorTest(const HttpPasswordStoreMigratorTest&) = delete; + HttpPasswordStoreMigratorTest& operator=( + const HttpPasswordStoreMigratorTest&) = delete; + ~HttpPasswordStoreMigratorTest() override = default; MockConsumer& consumer() { return consumer_; } @@ -130,8 +134,6 @@ base::MakeRefCounted<testing::StrictMock<MockPasswordStoreInterface>>(); testing::NiceMock<MockNetworkContext> mock_network_context_; testing::NiceMock<MockSmartBubbleStatsStore> mock_smart_bubble_stats_store_; - - DISALLOW_COPY_AND_ASSIGN(HttpPasswordStoreMigratorTest); }; void HttpPasswordStoreMigratorTest::TestEmptyStore(bool is_hsts) {
diff --git a/components/password_manager/core/browser/import/csv_reader.cc b/components/password_manager/core/browser/import/csv_reader.cc index abdeceac..6076d1fa 100644 --- a/components/password_manager/core/browser/import/csv_reader.cc +++ b/components/password_manager/core/browser/import/csv_reader.cc
@@ -65,6 +65,10 @@ class CSVParser { public: explicit CSVParser(base::StringPiece csv); + + CSVParser(const CSVParser&) = delete; + CSVParser& operator=(const CSVParser&) = delete; + ~CSVParser(); // Reads and unescapes values from the next row, and writes them to |fields|. @@ -76,8 +80,6 @@ private: base::StringPiece remaining_csv_piece_; - - DISALLOW_COPY_AND_ASSIGN(CSVParser); }; CSVParser::CSVParser(base::StringPiece csv) : remaining_csv_piece_(csv) {}
diff --git a/components/password_manager/core/browser/import/csv_reader.h b/components/password_manager/core/browser/import/csv_reader.h index ae25c6b..a0c5eaa2 100644 --- a/components/password_manager/core/browser/import/csv_reader.h +++ b/components/password_manager/core/browser/import/csv_reader.h
@@ -18,6 +18,10 @@ class CSVTable { public: CSVTable(); + + CSVTable(const CSVTable&) = delete; + CSVTable& operator=(const CSVTable&) = delete; + ~CSVTable(); // Reads tabular data |csv| in a CSV (Comma Separated Values) format and fills @@ -48,8 +52,6 @@ // Values from the subsequent rows. Each map represents one row and maps the // column names to the value stored at that column in that row. std::vector<std::map<base::StringPiece, std::string>> records_; - - DISALLOW_COPY_AND_ASSIGN(CSVTable); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/insecure_credentials_table.h b/components/password_manager/core/browser/insecure_credentials_table.h index 448af7c..7aeb9cc 100644 --- a/components/password_manager/core/browser/insecure_credentials_table.h +++ b/components/password_manager/core/browser/insecure_credentials_table.h
@@ -73,6 +73,10 @@ static const char kTableName[]; InsecureCredentialsTable() = default; + + InsecureCredentialsTable(const InsecureCredentialsTable&) = delete; + InsecureCredentialsTable& operator=(const InsecureCredentialsTable&) = delete; + ~InsecureCredentialsTable() = default; // Initializes |db_|. @@ -92,8 +96,6 @@ private: sql::Database* db_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(InsecureCredentialsTable); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection_delegate_helper.h b/components/password_manager/core/browser/leak_detection_delegate_helper.h index 11fdcbc..36ae8d7 100644 --- a/components/password_manager/core/browser/leak_detection_delegate_helper.h +++ b/components/password_manager/core/browser/leak_detection_delegate_helper.h
@@ -30,6 +30,11 @@ scoped_refptr<PasswordStoreInterface> profile_store, scoped_refptr<PasswordStoreInterface> account_store, LeakTypeReply callback); + + LeakDetectionDelegateHelper(const LeakDetectionDelegateHelper&) = delete; + LeakDetectionDelegateHelper& operator=(const LeakDetectionDelegateHelper&) = + delete; + ~LeakDetectionDelegateHelper() override; // Request all credentials with |password| from the store. @@ -57,9 +62,6 @@ int wait_counter_ = 0; std::vector<std::unique_ptr<PasswordForm>> partial_results_; - - // Instances should be neither copyable nor assignable. - DISALLOW_COPY_AND_ASSIGN(LeakDetectionDelegateHelper); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/login_database.cc b/components/password_manager/core/browser/login_database.cc index bc3cbba..a717029 100644 --- a/components/password_manager/core/browser/login_database.cc +++ b/components/password_manager/core/browser/login_database.cc
@@ -114,11 +114,14 @@ explicit ScopedTransaction(LoginDatabase* db) : db_(db) { db_->BeginTransaction(); } + + ScopedTransaction(const ScopedTransaction&) = delete; + ScopedTransaction& operator=(const ScopedTransaction&) = delete; + ~ScopedTransaction() { db_->CommitTransaction(); } private: LoginDatabase* db_; - DISALLOW_COPY_AND_ASSIGN(ScopedTransaction); }; // Convenience enum for interacting with SQL queries that use all the columns.
diff --git a/components/password_manager/core/browser/login_database.h b/components/password_manager/core/browser/login_database.h index f641d22..dc9710e 100644 --- a/components/password_manager/core/browser/login_database.h +++ b/components/password_manager/core/browser/login_database.h
@@ -45,6 +45,10 @@ class LoginDatabase : public PasswordStoreSync::MetadataStore { public: LoginDatabase(const base::FilePath& db_path, IsAccountStore is_account_store); + + LoginDatabase(const LoginDatabase&) = delete; + LoginDatabase& operator=(const LoginDatabase&) = delete; + ~LoginDatabase() override; // Returns whether this is the profile-scoped or the account-scoped storage: @@ -368,8 +372,6 @@ // PasswordStoreSync::MetadataStore::SetDeletionsHaveSyncedCallback for more // details. base::RepeatingCallback<void(bool)> deletions_have_synced_callback_; - - DISALLOW_COPY_AND_ASSIGN(LoginDatabase); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/mock_password_form_manager_for_ui.h b/components/password_manager/core/browser/mock_password_form_manager_for_ui.h index de5c392..8f1f5ed 100644 --- a/components/password_manager/core/browser/mock_password_form_manager_for_ui.h +++ b/components/password_manager/core/browser/mock_password_form_manager_for_ui.h
@@ -16,6 +16,11 @@ class MockPasswordFormManagerForUI : public PasswordFormManagerForUI { public: MockPasswordFormManagerForUI(); + + MockPasswordFormManagerForUI(const MockPasswordFormManagerForUI&) = delete; + MockPasswordFormManagerForUI& operator=(const MockPasswordFormManagerForUI&) = + delete; + ~MockPasswordFormManagerForUI() override; MOCK_METHOD(const GURL&, GetURL, (), (const override)); @@ -61,8 +66,6 @@ MOCK_METHOD(void, OnPasswordsRevealed, (), (override)); MOCK_METHOD(void, MoveCredentialsToAccountStore, (), (override)); MOCK_METHOD(void, BlockMovingCredentialsToAccountStore, (), (override)); - - DISALLOW_COPY_AND_ASSIGN(MockPasswordFormManagerForUI); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/multi_store_form_fetcher.h b/components/password_manager/core/browser/multi_store_form_fetcher.h index 63ded19..971303ff 100644 --- a/components/password_manager/core/browser/multi_store_form_fetcher.h +++ b/components/password_manager/core/browser/multi_store_form_fetcher.h
@@ -19,6 +19,10 @@ MultiStoreFormFetcher(PasswordFormDigest form_digest, const PasswordManagerClient* client, bool should_migrate_http_passwords); + + MultiStoreFormFetcher(const MultiStoreFormFetcher&) = delete; + MultiStoreFormFetcher& operator=(const MultiStoreFormFetcher&) = delete; + ~MultiStoreFormFetcher() override; // FormFetcher overrides. @@ -59,8 +63,6 @@ base::flat_map<PasswordStoreInterface*, std::unique_ptr<HttpPasswordStoreMigrator>> http_migrators_; - - DISALLOW_COPY_AND_ASSIGN(MultiStoreFormFetcher); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/multi_store_form_fetcher_unittest.cc b/components/password_manager/core/browser/multi_store_form_fetcher_unittest.cc index 608ab7f..3ceb25c 100644 --- a/components/password_manager/core/browser/multi_store_form_fetcher_unittest.cc +++ b/components/password_manager/core/browser/multi_store_form_fetcher_unittest.cc
@@ -50,6 +50,11 @@ class FakePasswordManagerClient : public StubPasswordManagerClient { public: FakePasswordManagerClient() = default; + + FakePasswordManagerClient(const FakePasswordManagerClient&) = delete; + FakePasswordManagerClient& operator=(const FakePasswordManagerClient&) = + delete; + ~FakePasswordManagerClient() override = default; void set_profile_store(PasswordStoreInterface* store) { @@ -69,8 +74,6 @@ PasswordStoreInterface* profile_store_ = nullptr; PasswordStoreInterface* account_store_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakePasswordManagerClient); }; PasswordForm CreateHTMLForm(const std::string& origin_url, @@ -146,6 +149,10 @@ form_digest_, &client_, /*should_migrate_http_passwords=*/false); } + MultiStoreFormFetcherTest(const MultiStoreFormFetcherTest&) = delete; + MultiStoreFormFetcherTest& operator=(const MultiStoreFormFetcherTest&) = + delete; + ~MultiStoreFormFetcherTest() override = default; void SetUp() override { @@ -177,9 +184,6 @@ scoped_refptr<MockPasswordStoreInterface> account_mock_store_; testing::NiceMock<MockSmartBubbleStatsStore> mock_smart_bubble_stats_store; FakePasswordManagerClient client_; - - private: - DISALLOW_COPY_AND_ASSIGN(MultiStoreFormFetcherTest); }; // Check that the absence of PasswordStore results is handled correctly.
diff --git a/components/password_manager/core/browser/password_autofill_manager.h b/components/password_manager/core/browser/password_autofill_manager.h index 62cec943..9b621c2 100644 --- a/components/password_manager/core/browser/password_autofill_manager.h +++ b/components/password_manager/core/browser/password_autofill_manager.h
@@ -43,6 +43,10 @@ PasswordAutofillManager(PasswordManagerDriver* password_manager_driver, autofill::AutofillClient* autofill_client, PasswordManagerClient* password_client); + + PasswordAutofillManager(const PasswordAutofillManager&) = delete; + PasswordAutofillManager& operator=(const PasswordAutofillManager&) = delete; + virtual ~PasswordAutofillManager(); // AutofillPopupDelegate implementation. @@ -221,8 +225,6 @@ scoped_refptr<device_reauth::BiometricAuthenticator> authenticator_; base::WeakPtrFactory<PasswordAutofillManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PasswordAutofillManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_feature_manager.h b/components/password_manager/core/browser/password_feature_manager.h index 27c6346..5776bed 100644 --- a/components/password_manager/core/browser/password_feature_manager.h +++ b/components/password_manager/core/browser/password_feature_manager.h
@@ -15,6 +15,10 @@ class PasswordFeatureManager { public: PasswordFeatureManager() = default; + + PasswordFeatureManager(const PasswordFeatureManager&) = delete; + PasswordFeatureManager& operator=(const PasswordFeatureManager&) = delete; + virtual ~PasswordFeatureManager() = default; virtual bool IsGenerationEnabled() const = 0; @@ -93,9 +97,6 @@ // their account. Should only be called if the user is signed-in and not // opted-in. virtual int GetMoveOfferedToNonOptedInUserCount() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PasswordFeatureManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_feature_manager_impl.h b/components/password_manager/core/browser/password_feature_manager_impl.h index eb8c72be..f092103 100644 --- a/components/password_manager/core/browser/password_feature_manager_impl.h +++ b/components/password_manager/core/browser/password_feature_manager_impl.h
@@ -22,6 +22,11 @@ public: PasswordFeatureManagerImpl(PrefService* pref_service, const syncer::SyncService* sync_service); + + PasswordFeatureManagerImpl(const PasswordFeatureManagerImpl&) = delete; + PasswordFeatureManagerImpl& operator=(const PasswordFeatureManagerImpl&) = + delete; + ~PasswordFeatureManagerImpl() override = default; bool IsGenerationEnabled() const override; @@ -49,7 +54,6 @@ private: PrefService* const pref_service_; const syncer::SyncService* const sync_service_; - DISALLOW_COPY_AND_ASSIGN(PasswordFeatureManagerImpl); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h index 960dd60..5182674 100644 --- a/components/password_manager/core/browser/password_form_manager.h +++ b/components/password_manager/core/browser/password_form_manager.h
@@ -64,6 +64,9 @@ FormFetcher* form_fetcher, std::unique_ptr<PasswordSaveManager> password_save_manager); + PasswordFormManager(const PasswordFormManager&) = delete; + PasswordFormManager& operator=(const PasswordFormManager&) = delete; + ~PasswordFormManager() override; // The upper limit on how many times Chrome will try to autofill the same @@ -393,8 +396,6 @@ FormDataParser parser_; base::WeakPtrFactory<PasswordFormManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PasswordFormManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_generation_frame_helper.h b/components/password_manager/core/browser/password_generation_frame_helper.h index 82092af..ca73f53 100644 --- a/components/password_manager/core/browser/password_generation_frame_helper.h +++ b/components/password_manager/core/browser/password_generation_frame_helper.h
@@ -33,6 +33,11 @@ public: PasswordGenerationFrameHelper(PasswordManagerClient* client, PasswordManagerDriver* driver); + + PasswordGenerationFrameHelper(const PasswordGenerationFrameHelper&) = delete; + PasswordGenerationFrameHelper& operator=( + const PasswordGenerationFrameHelper&) = delete; + virtual ~PasswordGenerationFrameHelper(); // Instructs the PasswordRequirementsService to fetch requirements for @@ -78,8 +83,6 @@ // The PasswordManagerDriver instance associated with this instance. Must // outlive this instance. PasswordManagerDriver* driver_; - - DISALLOW_COPY_AND_ASSIGN(PasswordGenerationFrameHelper); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager.h b/components/password_manager/core/browser/password_manager.h index ba4ac05..cd709b07 100644 --- a/components/password_manager/core/browser/password_manager.h +++ b/components/password_manager/core/browser/password_manager.h
@@ -62,6 +62,10 @@ static void RegisterLocalPrefs(PrefRegistrySimple* registry); explicit PasswordManager(PasswordManagerClient* client); + + PasswordManager(const PasswordManager&) = delete; + PasswordManager& operator=(const PasswordManager&) = delete; + ~PasswordManager() override; // FormSubmissionObserver: @@ -377,8 +381,6 @@ LeakDetectionDelegate leak_delegate_; absl::optional<PossibleUsernameData> possible_username_; - - DISALLOW_COPY_AND_ASSIGN(PasswordManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h index 9a57fb28..b2cd474 100644 --- a/components/password_manager/core/browser/password_manager_client.h +++ b/components/password_manager/core/browser/password_manager_client.h
@@ -101,6 +101,10 @@ using ReauthSucceeded = base::StrongAlias<class ReauthSucceededTag, bool>; PasswordManagerClient() = default; + + PasswordManagerClient(const PasswordManagerClient&) = delete; + PasswordManagerClient& operator=(const PasswordManagerClient&) = delete; + virtual ~PasswordManagerClient() = default; // Is saving new data for password autofill and filling of saved data enabled @@ -428,9 +432,6 @@ // Returns if the Autofill Assistant UI is shown. virtual bool IsAutofillAssistantUIVisible() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_driver.h b/components/password_manager/core/browser/password_manager_driver.h index 0b10a9c..af08c86 100644 --- a/components/password_manager/core/browser/password_manager_driver.h +++ b/components/password_manager/core/browser/password_manager_driver.h
@@ -39,6 +39,10 @@ base::StrongAlias<class ShowVirtualKeyboardTag, bool>; PasswordManagerDriver() = default; + + PasswordManagerDriver(const PasswordManagerDriver&) = delete; + PasswordManagerDriver& operator=(const PasswordManagerDriver&) = delete; + virtual ~PasswordManagerDriver() = default; // Returns driver id which is unique in the current tab. @@ -125,9 +129,6 @@ // corresponding HTML attributes. It is used only for debugging. virtual void AnnotateFieldsWithParsingResult( const autofill::ParsingResult& parsing_result) {} - - private: - DISALLOW_COPY_AND_ASSIGN(PasswordManagerDriver); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_metrics_recorder.h b/components/password_manager/core/browser/password_manager_metrics_recorder.h index 5d83c4ad..708284d4 100644 --- a/components/password_manager/core/browser/password_manager_metrics_recorder.h +++ b/components/password_manager/core/browser/password_manager_metrics_recorder.h
@@ -98,6 +98,12 @@ PasswordManagerMetricsRecorder( PasswordManagerMetricsRecorder&& that) noexcept; + + PasswordManagerMetricsRecorder(const PasswordManagerMetricsRecorder&) = + delete; + PasswordManagerMetricsRecorder& operator=( + const PasswordManagerMetricsRecorder&) = delete; + ~PasswordManagerMetricsRecorder(); PasswordManagerMetricsRecorder& operator=( @@ -135,8 +141,6 @@ FormManagerAvailable::kNotSet; std::unique_ptr<NavigationMetricRecorderDelegate> navigation_metric_recorder_; - - DISALLOW_COPY_AND_ASSIGN(PasswordManagerMetricsRecorder); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_test_utils.h b/components/password_manager/core/browser/password_manager_test_utils.h index 0bfcc201..015d84b 100644 --- a/components/password_manager/core/browser/password_manager_test_utils.h +++ b/components/password_manager/core/browser/password_manager_test_utils.h
@@ -156,6 +156,10 @@ : public ::testing::MatcherInterface<absl::optional<PasswordHashData>> { public: explicit PasswordHashDataMatcher(absl::optional<PasswordHashData> expected); + + PasswordHashDataMatcher(const PasswordHashDataMatcher&) = delete; + PasswordHashDataMatcher& operator=(const PasswordHashDataMatcher&) = delete; + ~PasswordHashDataMatcher() override = default; // ::testing::MatcherInterface overrides @@ -166,8 +170,6 @@ private: const absl::optional<PasswordHashData> expected_; - - DISALLOW_COPY_AND_ASSIGN(PasswordHashDataMatcher); }; ::testing::Matcher<absl::optional<PasswordHashData>> Matches(
diff --git a/components/password_manager/core/browser/password_requirements_service.h b/components/password_manager/core/browser/password_requirements_service.h index 2c6a3e97..af39c8a 100644 --- a/components/password_manager/core/browser/password_requirements_service.h +++ b/components/password_manager/core/browser/password_requirements_service.h
@@ -33,6 +33,11 @@ // If |fetcher| is a nullptr, no network requests happen. explicit PasswordRequirementsService( std::unique_ptr<autofill::PasswordRequirementsSpecFetcher> fetcher); + + PasswordRequirementsService(const PasswordRequirementsService&) = delete; + PasswordRequirementsService& operator=(const PasswordRequirementsService&) = + delete; + ~PasswordRequirementsService() override; // Returns the password requirements for a field that appears on a site @@ -77,8 +82,6 @@ specs_for_signatures_; // May be a nullptr. std::unique_ptr<autofill::PasswordRequirementsSpecFetcher> fetcher_; - - DISALLOW_COPY_AND_ASSIGN(PasswordRequirementsService); }; std::unique_ptr<PasswordRequirementsService> CreatePasswordRequirementsService(
diff --git a/components/password_manager/core/browser/password_reuse_detection_manager.h b/components/password_manager/core/browser/password_reuse_detection_manager.h index 0171b7b..a0b6a5f 100644 --- a/components/password_manager/core/browser/password_reuse_detection_manager.h +++ b/components/password_manager/core/browser/password_reuse_detection_manager.h
@@ -30,6 +30,11 @@ class PasswordReuseDetectionManager : public PasswordReuseDetectorConsumer { public: explicit PasswordReuseDetectionManager(PasswordManagerClient* client); + + PasswordReuseDetectionManager(const PasswordReuseDetectionManager&) = delete; + PasswordReuseDetectionManager& operator=( + const PasswordReuseDetectionManager&) = delete; + ~PasswordReuseDetectionManager() override; void DidNavigateMainFrame(const GURL& main_frame_url); void OnKeyPressedCommitted(const std::u16string& text); @@ -64,8 +69,6 @@ // Used to retrieve the current time, in base::Time units. base::Clock* clock_; bool reuse_on_this_page_was_found_ = false; - - DISALLOW_COPY_AND_ASSIGN(PasswordReuseDetectionManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc b/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc index 8282ce1..d57134b 100644 --- a/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc +++ b/components/password_manager/core/browser/password_reuse_detection_manager_unittest.cc
@@ -29,6 +29,11 @@ class MockPasswordManagerClient : public StubPasswordManagerClient { public: MockPasswordManagerClient() = default; + + MockPasswordManagerClient(const MockPasswordManagerClient&) = delete; + MockPasswordManagerClient& operator=(const MockPasswordManagerClient&) = + delete; + ~MockPasswordManagerClient() override = default; MOCK_METHOD(PasswordReuseManager*, @@ -43,9 +48,6 @@ const std::vector<MatchingReusedCredential>&, bool), (override)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockPasswordManagerClient); }; class PasswordReuseDetectionManagerTest : public ::testing::Test {
diff --git a/components/password_manager/core/browser/password_save_manager.h b/components/password_manager/core/browser/password_save_manager.h index 066edf3..a5cf2ae4 100644 --- a/components/password_manager/core/browser/password_save_manager.h +++ b/components/password_manager/core/browser/password_save_manager.h
@@ -35,6 +35,10 @@ class PasswordSaveManager { public: PasswordSaveManager() = default; + + PasswordSaveManager(const PasswordSaveManager&) = delete; + PasswordSaveManager& operator=(const PasswordSaveManager&) = delete; + virtual ~PasswordSaveManager() = default; virtual void Init(PasswordManagerClient* client, @@ -104,9 +108,6 @@ virtual bool HasGeneratedPassword() const = 0; virtual std::unique_ptr<PasswordSaveManager> Clone() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PasswordSaveManager); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/site_affiliation/asset_link_data.h b/components/password_manager/core/browser/site_affiliation/asset_link_data.h index 0f376629..1bf9681e 100644 --- a/components/password_manager/core/browser/site_affiliation/asset_link_data.h +++ b/components/password_manager/core/browser/site_affiliation/asset_link_data.h
@@ -24,6 +24,10 @@ public: AssetLinkData(); AssetLinkData(AssetLinkData&& other) noexcept; + + AssetLinkData(const AssetLinkData&) = delete; + AssetLinkData& operator=(const AssetLinkData&) = delete; + ~AssetLinkData(); AssetLinkData& operator=(AssetLinkData&& other); @@ -36,8 +40,6 @@ private: std::vector<GURL> includes_; std::vector<GURL> targets_; - - DISALLOW_COPY_AND_ASSIGN(AssetLinkData); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/statistics_table.h b/components/password_manager/core/browser/statistics_table.h index 16b82c8..a900b7b 100644 --- a/components/password_manager/core/browser/statistics_table.h +++ b/components/password_manager/core/browser/statistics_table.h
@@ -40,6 +40,10 @@ class StatisticsTable { public: StatisticsTable(); + + StatisticsTable(const StatisticsTable&) = delete; + StatisticsTable& operator=(const StatisticsTable&) = delete; + ~StatisticsTable(); // Initializes |db_|. @@ -80,8 +84,6 @@ private: sql::Database* db_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(StatisticsTable); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/stub_credentials_filter.h b/components/password_manager/core/browser/stub_credentials_filter.h index 4cf26df..43798f0a 100644 --- a/components/password_manager/core/browser/stub_credentials_filter.h +++ b/components/password_manager/core/browser/stub_credentials_filter.h
@@ -16,6 +16,9 @@ public: StubCredentialsFilter(); + StubCredentialsFilter(const StubCredentialsFilter&) = delete; + StubCredentialsFilter& operator=(const StubCredentialsFilter&) = delete; + ~StubCredentialsFilter() override; // CredentialsFilter @@ -26,9 +29,6 @@ void ReportFormLoginSuccess( const PasswordFormManager& form_manager) const override; bool IsSyncAccountEmail(const std::string& username) const override; - - private: - DISALLOW_COPY_AND_ASSIGN(StubCredentialsFilter); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/stub_form_saver.h b/components/password_manager/core/browser/stub_form_saver.h index 1e25d2c..4233edb 100644 --- a/components/password_manager/core/browser/stub_form_saver.h +++ b/components/password_manager/core/browser/stub_form_saver.h
@@ -15,6 +15,9 @@ public: StubFormSaver() = default; + StubFormSaver(const StubFormSaver&) = delete; + StubFormSaver& operator=(const StubFormSaver&) = delete; + ~StubFormSaver() override = default; // FormSaver: @@ -32,9 +35,6 @@ const PasswordForm& old_unique_key) override {} void Remove(const PasswordForm& form) override {} std::unique_ptr<FormSaver> Clone() override; - - private: - DISALLOW_COPY_AND_ASSIGN(StubFormSaver); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/stub_password_manager_client.h b/components/password_manager/core/browser/stub_password_manager_client.h index cc3ea83..ce0d8e78 100644 --- a/components/password_manager/core/browser/stub_password_manager_client.h +++ b/components/password_manager/core/browser/stub_password_manager_client.h
@@ -24,6 +24,11 @@ class StubPasswordManagerClient : public PasswordManagerClient { public: StubPasswordManagerClient(); + + StubPasswordManagerClient(const StubPasswordManagerClient&) = delete; + StubPasswordManagerClient& operator=(const StubPasswordManagerClient&) = + delete; + ~StubPasswordManagerClient() override; // PasswordManagerClient: @@ -97,8 +102,6 @@ autofill::StubLogManager log_manager_; ukm::SourceId ukm_source_id_; absl::optional<PasswordManagerMetricsRecorder> metrics_recorder_; - - DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/stub_password_manager_driver.h b/components/password_manager/core/browser/stub_password_manager_driver.h index cb9e6ff..467e16f 100644 --- a/components/password_manager/core/browser/stub_password_manager_driver.h +++ b/components/password_manager/core/browser/stub_password_manager_driver.h
@@ -16,6 +16,11 @@ class StubPasswordManagerDriver : public PasswordManagerDriver { public: StubPasswordManagerDriver(); + + StubPasswordManagerDriver(const StubPasswordManagerDriver&) = delete; + StubPasswordManagerDriver& operator=(const StubPasswordManagerDriver&) = + delete; + ~StubPasswordManagerDriver() override; // PasswordManagerDriver: @@ -35,9 +40,6 @@ bool CanShowAutofillUi() const override; ::ui::AXTreeID GetAxTreeId() const override; const GURL& GetLastCommittedURL() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerDriver); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/sync/password_model_type_controller.h b/components/password_manager/core/browser/sync/password_model_type_controller.h index 45fb631..a72a8f8 100644 --- a/components/password_manager/core/browser/sync/password_model_type_controller.h +++ b/components/password_manager/core/browser/sync/password_model_type_controller.h
@@ -40,6 +40,11 @@ PrefService* pref_service, signin::IdentityManager* identity_manager, syncer::SyncService* sync_service); + + PasswordModelTypeController(const PasswordModelTypeController&) = delete; + PasswordModelTypeController& operator=(const PasswordModelTypeController&) = + delete; + ~PasswordModelTypeController() override; // DataTypeController overrides. @@ -77,8 +82,6 @@ syncer::SyncMode sync_mode_ = syncer::SyncMode::kFull; base::WeakPtrFactory<PasswordModelTypeController> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PasswordModelTypeController); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/sync/password_sync_bridge.cc b/components/password_manager/core/browser/sync/password_sync_bridge.cc index b73b536..4d27674 100644 --- a/components/password_manager/core/browser/sync/password_sync_bridge.cc +++ b/components/password_manager/core/browser/sync/password_sync_bridge.cc
@@ -201,6 +201,9 @@ } } + ScopedStoreTransaction(const ScopedStoreTransaction&) = delete; + ScopedStoreTransaction& operator=(const ScopedStoreTransaction&) = delete; + ~ScopedStoreTransaction() { if (!committed_) { store_->RollbackTransaction(); @@ -210,8 +213,6 @@ private: PasswordStoreSync* store_; bool committed_; - - DISALLOW_COPY_AND_ASSIGN(ScopedStoreTransaction); }; } // namespace
diff --git a/components/password_manager/core/browser/sync/password_sync_bridge.h b/components/password_manager/core/browser/sync/password_sync_bridge.h index ec174eb..6c67fd9 100644 --- a/components/password_manager/core/browser/sync/password_sync_bridge.h +++ b/components/password_manager/core/browser/sync/password_sync_bridge.h
@@ -36,6 +36,10 @@ std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, PasswordStoreSync* password_store_sync, const base::RepeatingClosure& sync_enabled_or_disabled_cb); + + PasswordSyncBridge(const PasswordSyncBridge&) = delete; + PasswordSyncBridge& operator=(const PasswordSyncBridge&) = delete; + ~PasswordSyncBridge() override; // Notifies the bridge of changes to the password database. Callers are @@ -84,8 +88,6 @@ bool is_processing_remote_sync_changes_ = false; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PasswordSyncBridge); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc b/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc index 2b8cfa7b..6303ab4 100644 --- a/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc +++ b/components/password_manager/core/browser/sync/password_sync_bridge_unittest.cc
@@ -207,6 +207,10 @@ class FakeDatabase { public: FakeDatabase() = default; + + FakeDatabase(const FakeDatabase&) = delete; + FakeDatabase& operator=(const FakeDatabase&) = delete; + ~FakeDatabase() = default; FormRetrievalResult ReadAllLogins(PrimaryKeyToFormMap* map) { @@ -282,8 +286,6 @@ int primary_key_ = 1; PrimaryKeyToFormMap data_; AddLoginError error_ = AddLoginError::kNone; - - DISALLOW_COPY_AND_ASSIGN(FakeDatabase); }; class MockSyncMetadataStore : public PasswordStoreSync::MetadataStore {
diff --git a/components/password_manager/core/browser/sync_credentials_filter.h b/components/password_manager/core/browser/sync_credentials_filter.h index 062027c..5caba8a2 100644 --- a/components/password_manager/core/browser/sync_credentials_filter.h +++ b/components/password_manager/core/browser/sync_credentials_filter.h
@@ -30,6 +30,10 @@ SyncCredentialsFilter( PasswordManagerClient* client, SyncServiceFactoryFunction sync_service_factory_function); + + SyncCredentialsFilter(const SyncCredentialsFilter&) = delete; + SyncCredentialsFilter& operator=(const SyncCredentialsFilter&) = delete; + ~SyncCredentialsFilter() override; // CredentialsFilter @@ -45,8 +49,6 @@ PasswordManagerClient* const client_; const SyncServiceFactoryFunction sync_service_factory_function_; - - DISALLOW_COPY_AND_ASSIGN(SyncCredentialsFilter); }; } // namespace password_manager
diff --git a/components/password_manager/core/browser/sync_credentials_filter_unittest.cc b/components/password_manager/core/browser/sync_credentials_filter_unittest.cc index 7f514a3..0c70ba8 100644 --- a/components/password_manager/core/browser/sync_credentials_filter_unittest.cc +++ b/components/password_manager/core/browser/sync_credentials_filter_unittest.cc
@@ -58,6 +58,10 @@ kEnterpriseURL); } + FakePasswordManagerClient(const FakePasswordManagerClient&) = delete; + FakePasswordManagerClient& operator=(const FakePasswordManagerClient&) = + delete; + ~FakePasswordManagerClient() override { password_store_->ShutdownOnUIThread(); } @@ -91,8 +95,6 @@ bool is_incognito_ = false; signin::IdentityManager* identity_manager_; std::unique_ptr<TestingPrefServiceSimple> prefs_; - - DISALLOW_COPY_AND_ASSIGN(FakePasswordManagerClient); }; } // namespace
diff --git a/components/password_manager/ios/account_select_fill_data.h b/components/password_manager/ios/account_select_fill_data.h index 87facd77..d73185d 100644 --- a/components/password_manager/ios/account_select_fill_data.h +++ b/components/password_manager/ios/account_select_fill_data.h
@@ -69,6 +69,10 @@ class AccountSelectFillData { public: AccountSelectFillData(); + + AccountSelectFillData(const AccountSelectFillData&) = delete; + AccountSelectFillData& operator=(const AccountSelectFillData&) = delete; + ~AccountSelectFillData(); // Adds form structure from |form_data| to internal lists of known forms and @@ -122,8 +126,6 @@ const FormInfo* GetFormInfo(autofill::FormRendererId form_identifier, autofill::FieldRendererId field_identifier, bool is_password_field) const; - - DISALLOW_COPY_AND_ASSIGN(AccountSelectFillData); }; } // namespace password_manager
diff --git a/components/password_manager/ios/password_form_helper_unittest.mm b/components/password_manager/ios/password_form_helper_unittest.mm index c1c124a9..6aa0472d 100644 --- a/components/password_manager/ios/password_form_helper_unittest.mm +++ b/components/password_manager/ios/password_form_helper_unittest.mm
@@ -58,6 +58,9 @@ password_manager::PasswordManagerJavaScriptFeature::GetInstance()}); } + PasswordFormHelperTest(const PasswordFormHelperTest&) = delete; + PasswordFormHelperTest& operator=(const PasswordFormHelperTest&) = delete; + ~PasswordFormHelperTest() override = default; void SetUp() override { @@ -106,8 +109,6 @@ protected: // PasswordFormHelper for testing. PasswordFormHelper* helper_; - - DISALLOW_COPY_AND_ASSIGN(PasswordFormHelperTest); }; struct FindPasswordFormTestData {
diff --git a/components/payments/content/android/currency_formatter_android.h b/components/payments/content/android/currency_formatter_android.h index 1fe5173..bb024e0 100644 --- a/components/payments/content/android/currency_formatter_android.h +++ b/components/payments/content/android/currency_formatter_android.h
@@ -23,6 +23,10 @@ jobject jcaller, const base::android::JavaParamRef<jstring>& currency_code, const base::android::JavaParamRef<jstring>& locale_name); + + CurrencyFormatterAndroid(const CurrencyFormatterAndroid&) = delete; + CurrencyFormatterAndroid& operator=(const CurrencyFormatterAndroid&) = delete; + ~CurrencyFormatterAndroid(); // Message from Java to destroy this object. @@ -44,8 +48,6 @@ private: std::unique_ptr<CurrencyFormatter> currency_formatter_; - - DISALLOW_COPY_AND_ASSIGN(CurrencyFormatterAndroid); }; } // namespace payments
diff --git a/components/payments/content/android/journey_logger_android.h b/components/payments/content/android/journey_logger_android.h index 54db0313..198fbf6 100644 --- a/components/payments/content/android/journey_logger_android.h +++ b/components/payments/content/android/journey_logger_android.h
@@ -16,6 +16,10 @@ class JourneyLoggerAndroid { public: JourneyLoggerAndroid(bool is_incognito, ukm::SourceId source_id); + + JourneyLoggerAndroid(const JourneyLoggerAndroid&) = delete; + JourneyLoggerAndroid& operator=(const JourneyLoggerAndroid&) = delete; + ~JourneyLoggerAndroid(); // Message from Java to destroy this object. @@ -88,8 +92,6 @@ private: JourneyLogger journey_logger_; - - DISALLOW_COPY_AND_ASSIGN(JourneyLoggerAndroid); }; } // namespace payments
diff --git a/components/payments/content/android/payment_handler_host.h b/components/payments/content/android/payment_handler_host.h index cbfc04a..4e7941b8 100644 --- a/components/payments/content/android/payment_handler_host.h +++ b/components/payments/content/android/payment_handler_host.h
@@ -56,6 +56,10 @@ // handler and are used for logging in developr tools. PaymentHandlerHost(const base::android::JavaParamRef<jobject>& web_contents, const base::android::JavaParamRef<jobject>& listener); + + PaymentHandlerHost(const PaymentHandlerHost&) = delete; + PaymentHandlerHost& operator=(const PaymentHandlerHost&) = delete; + ~PaymentHandlerHost(); // Checks whether any payment method, shipping address or shipping option @@ -78,8 +82,6 @@ private: PaymentRequestUpdateEventListener listener_; payments::PaymentHandlerHost payment_handler_host_; - - DISALLOW_COPY_AND_ASSIGN(PaymentHandlerHost); }; } // namespace android
diff --git a/components/payments/content/android/payment_manifest_downloader_android.cc b/components/payments/content/android/payment_manifest_downloader_android.cc index 73517cd..51fa1a28 100644 --- a/components/payments/content/android/payment_manifest_downloader_android.cc +++ b/components/payments/content/android/payment_manifest_downloader_android.cc
@@ -28,6 +28,9 @@ const base::android::JavaParamRef<jobject>& jcallback) : jcallback_(jcallback) {} + DownloadCallback(const DownloadCallback&) = delete; + DownloadCallback& operator=(const DownloadCallback&) = delete; + ~DownloadCallback() {} void OnPaymentMethodManifestDownload(const GURL& url_after_redirects, @@ -66,8 +69,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> jcallback_; - - DISALLOW_COPY_AND_ASSIGN(DownloadCallback); }; } // namespace
diff --git a/components/payments/content/android/payment_manifest_downloader_android.h b/components/payments/content/android/payment_manifest_downloader_android.h index 338be98..52bd8176c 100644 --- a/components/payments/content/android/payment_manifest_downloader_android.h +++ b/components/payments/content/android/payment_manifest_downloader_android.h
@@ -27,6 +27,12 @@ PaymentManifestDownloaderAndroid( std::unique_ptr<ErrorLogger> log, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + PaymentManifestDownloaderAndroid(const PaymentManifestDownloaderAndroid&) = + delete; + PaymentManifestDownloaderAndroid& operator=( + const PaymentManifestDownloaderAndroid&) = delete; + ~PaymentManifestDownloaderAndroid(); void DownloadPaymentMethodManifest( @@ -50,8 +56,6 @@ private: PaymentManifestDownloader downloader_; - - DISALLOW_COPY_AND_ASSIGN(PaymentManifestDownloaderAndroid); }; } // namespace payments
diff --git a/components/payments/content/android/payment_manifest_parser_android.cc b/components/payments/content/android/payment_manifest_parser_android.cc index e4dabb8..3bb9de7 100644 --- a/components/payments/content/android/payment_manifest_parser_android.cc +++ b/components/payments/content/android/payment_manifest_parser_android.cc
@@ -30,6 +30,9 @@ explicit ParseCallback(const base::android::JavaParamRef<jobject>& jcallback) : jcallback_(jcallback) {} + ParseCallback(const ParseCallback&) = delete; + ParseCallback& operator=(const ParseCallback&) = delete; + ~ParseCallback() {} // Copies payment method manifest into Java. @@ -116,8 +119,6 @@ private: base::android::ScopedJavaGlobalRef<jobject> jcallback_; - - DISALLOW_COPY_AND_ASSIGN(ParseCallback); }; } // namespace
diff --git a/components/payments/content/android/payment_manifest_parser_android.h b/components/payments/content/android/payment_manifest_parser_android.h index 56cf43e..f7ee138 100644 --- a/components/payments/content/android/payment_manifest_parser_android.h +++ b/components/payments/content/android/payment_manifest_parser_android.h
@@ -21,6 +21,11 @@ class PaymentManifestParserAndroid { public: explicit PaymentManifestParserAndroid(std::unique_ptr<ErrorLogger> log); + + PaymentManifestParserAndroid(const PaymentManifestParserAndroid&) = delete; + PaymentManifestParserAndroid& operator=(const PaymentManifestParserAndroid&) = + delete; + ~PaymentManifestParserAndroid(); void ParsePaymentMethodManifest( @@ -38,8 +43,6 @@ private: PaymentManifestParser parser_; - - DISALLOW_COPY_AND_ASSIGN(PaymentManifestParserAndroid); }; } // namespace payments
diff --git a/components/payments/content/android/payment_manifest_web_data_service_android.h b/components/payments/content/android/payment_manifest_web_data_service_android.h index 2e25ce52..ea3f9f1 100644 --- a/components/payments/content/android/payment_manifest_web_data_service_android.h +++ b/components/payments/content/android/payment_manifest_web_data_service_android.h
@@ -30,6 +30,12 @@ PaymentManifestWebDataServiceAndroid(JNIEnv* env, jobject obj, content::WebContents* web_contents); + + PaymentManifestWebDataServiceAndroid( + const PaymentManifestWebDataServiceAndroid&) = delete; + PaymentManifestWebDataServiceAndroid& operator=( + const PaymentManifestWebDataServiceAndroid&) = delete; + ~PaymentManifestWebDataServiceAndroid() override; // Override WebDataServiceConsumer interface. @@ -91,8 +97,6 @@ std::map<WebDataServiceBase::Handle, std::unique_ptr<base::android::ScopedJavaGlobalRef<jobject>>> web_data_service_requests_; - - DISALLOW_COPY_AND_ASSIGN(PaymentManifestWebDataServiceAndroid); }; } // namespace payments
diff --git a/components/payments/content/autofill_payment_app.h b/components/payments/content/autofill_payment_app.h index 7b0f5e2..4007a8fe 100644 --- a/components/payments/content/autofill_payment_app.h +++ b/components/payments/content/autofill_payment_app.h
@@ -34,6 +34,10 @@ const std::vector<autofill::AutofillProfile*>& billing_profiles, const std::string& app_locale, base::WeakPtr<PaymentRequestBaseDelegate> payment_request_delegate); + + AutofillPaymentApp(const AutofillPaymentApp&) = delete; + AutofillPaymentApp& operator=(const AutofillPaymentApp&) = delete; + ~AutofillPaymentApp() override; // PaymentApp: @@ -111,8 +115,6 @@ bool is_requested_autofill_data_available_ = false; base::WeakPtrFactory<AutofillPaymentApp> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AutofillPaymentApp); }; } // namespace payments
diff --git a/components/payments/content/autofill_payment_app_factory.h b/components/payments/content/autofill_payment_app_factory.h index 06476111..05a69fe5 100644 --- a/components/payments/content/autofill_payment_app_factory.h +++ b/components/payments/content/autofill_payment_app_factory.h
@@ -29,13 +29,15 @@ base::WeakPtr<Delegate> delegate); AutofillPaymentAppFactory(); + + AutofillPaymentAppFactory(const AutofillPaymentAppFactory&) = delete; + AutofillPaymentAppFactory& operator=(const AutofillPaymentAppFactory&) = + delete; + ~AutofillPaymentAppFactory() override; // PaymentAppFactory: void Create(base::WeakPtr<Delegate> delegate) override; - - private: - DISALLOW_COPY_AND_ASSIGN(AutofillPaymentAppFactory); }; } // namespace payments
diff --git a/components/payments/content/developer_console_logger.h b/components/payments/content/developer_console_logger.h index 98a8767..c44d2fe5 100644 --- a/components/payments/content/developer_console_logger.h +++ b/components/payments/content/developer_console_logger.h
@@ -19,6 +19,10 @@ class DeveloperConsoleLogger : public ErrorLogger { public: explicit DeveloperConsoleLogger(content::WebContents* web_contents); + + DeveloperConsoleLogger(const DeveloperConsoleLogger&) = delete; + DeveloperConsoleLogger& operator=(const DeveloperConsoleLogger&) = delete; + ~DeveloperConsoleLogger() override; // Gets the WebContents being logged to. @@ -30,8 +34,6 @@ private: base::WeakPtr<content::WebContents> web_contents_; - - DISALLOW_COPY_AND_ASSIGN(DeveloperConsoleLogger); }; } // namespace payments
diff --git a/components/payments/content/initialization_task.h b/components/payments/content/initialization_task.h index 16c094c..d35aed5 100644 --- a/components/payments/content/initialization_task.h +++ b/components/payments/content/initialization_task.h
@@ -76,6 +76,10 @@ }; InitializationTask(); + + InitializationTask(const InitializationTask&) = delete; + InitializationTask& operator=(const InitializationTask&) = delete; + virtual ~InitializationTask(); // Add the |observer| to be notified of initialization. @@ -96,8 +100,6 @@ // Whether NotifyInitialized() has been called. bool has_notified_ = false; - - DISALLOW_COPY_AND_ASSIGN(InitializationTask); }; } // namespace payments
diff --git a/components/payments/content/installable_payment_app_crawler.h b/components/payments/content/installable_payment_app_crawler.h index 9a6588a..0c0b8ac 100644 --- a/components/payments/content/installable_payment_app_crawler.h +++ b/components/payments/content/installable_payment_app_crawler.h
@@ -71,6 +71,11 @@ PaymentManifestDownloader* downloader, PaymentManifestParser* parser, PaymentManifestWebDataService* cache); + + InstallablePaymentAppCrawler(const InstallablePaymentAppCrawler&) = delete; + InstallablePaymentAppCrawler& operator=(const InstallablePaymentAppCrawler&) = + delete; + ~InstallablePaymentAppCrawler(); // Starts the crawling process. All the url based payment methods in @@ -154,8 +159,6 @@ CrawlingMode crawling_mode_ = CrawlingMode::kJustInTimeInstallation; base::WeakPtrFactory<InstallablePaymentAppCrawler> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InstallablePaymentAppCrawler); }; } // namespace payments.
diff --git a/components/payments/content/manifest_verifier.h b/components/payments/content/manifest_verifier.h index 0974571..f2ba747c 100644 --- a/components/payments/content/manifest_verifier.h +++ b/components/payments/content/manifest_verifier.h
@@ -78,6 +78,9 @@ PaymentManifestParser* parser, PaymentManifestWebDataService* cache); + ManifestVerifier(const ManifestVerifier&) = delete; + ManifestVerifier& operator=(const ManifestVerifier&) = delete; + ~ManifestVerifier() override; // Initiates the verification. This object should be deleted after @@ -168,8 +171,6 @@ std::string first_error_message_; base::WeakPtrFactory<ManifestVerifier> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ManifestVerifier); }; } // namespace payments
diff --git a/components/payments/content/payment_app.h b/components/payments/content/payment_app.h index ed5a6ac..c9a5e42 100644 --- a/components/payments/content/payment_app.h +++ b/components/payments/content/payment_app.h
@@ -63,6 +63,9 @@ virtual void OnInstrumentDetailsError(const std::string& error_message) = 0; }; + PaymentApp(const PaymentApp&) = delete; + PaymentApp& operator=(const PaymentApp&) = delete; + virtual ~PaymentApp(); // Will call into the |delegate| (can't be null) on success or error. @@ -196,8 +199,6 @@ bool operator<(const PaymentApp& other) const; int icon_resource_id_; Type type_; - - DISALLOW_COPY_AND_ASSIGN(PaymentApp); }; } // namespace payments
diff --git a/components/payments/content/payment_app_factory.h b/components/payments/content/payment_app_factory.h index 009e094..78c50ca 100644 --- a/components/payments/content/payment_app_factory.h +++ b/components/payments/content/payment_app_factory.h
@@ -119,6 +119,10 @@ }; explicit PaymentAppFactory(PaymentApp::Type type); + + PaymentAppFactory(const PaymentAppFactory&) = delete; + PaymentAppFactory& operator=(const PaymentAppFactory&) = delete; + virtual ~PaymentAppFactory(); PaymentApp::Type type() const { return type_; } @@ -127,8 +131,6 @@ private: const PaymentApp::Type type_; - - DISALLOW_COPY_AND_ASSIGN(PaymentAppFactory); }; } // namespace payments
diff --git a/components/payments/content/payment_app_service.h b/components/payments/content/payment_app_service.h index 40f1c18..1a992b6 100644 --- a/components/payments/content/payment_app_service.h +++ b/components/payments/content/payment_app_service.h
@@ -25,6 +25,10 @@ public: // The |context| pointer is not being saved. explicit PaymentAppService(content::BrowserContext* context); + + PaymentAppService(const PaymentAppService&) = delete; + PaymentAppService& operator=(const PaymentAppService&) = delete; + ~PaymentAppService() override; // Returns the number of payment app factories, which is the number of times @@ -40,8 +44,6 @@ private: std::vector<std::unique_ptr<PaymentAppFactory>> factories_; - - DISALLOW_COPY_AND_ASSIGN(PaymentAppService); }; } // namespace payments
diff --git a/components/payments/content/payment_handler_host.h b/components/payments/content/payment_handler_host.h index e4744d3c..5c04732 100644 --- a/components/payments/content/payment_handler_host.h +++ b/components/payments/content/payment_handler_host.h
@@ -60,6 +60,10 @@ // context as the payment handler. PaymentHandlerHost(content::WebContents* web_contents, base::WeakPtr<Delegate> delegate); + + PaymentHandlerHost(const PaymentHandlerHost&) = delete; + PaymentHandlerHost& operator=(const PaymentHandlerHost&) = delete; + ~PaymentHandlerHost() override; // Sets the origin of the payment handler / service worker registration scope. @@ -149,8 +153,6 @@ base::WeakPtr<content::WebContents> web_contents_; base::WeakPtrFactory<PaymentHandlerHost> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PaymentHandlerHost); }; } // namespace payments
diff --git a/components/payments/content/payment_request_display_manager.h b/components/payments/content/payment_request_display_manager.h index 4ee5320d..f0ee7e00 100644 --- a/components/payments/content/payment_request_display_manager.h +++ b/components/payments/content/payment_request_display_manager.h
@@ -34,6 +34,10 @@ public: DisplayHandle(base::WeakPtr<PaymentRequestDisplayManager> display_manager, base::WeakPtr<ContentPaymentRequestDelegate> delegate); + + DisplayHandle(const DisplayHandle&) = delete; + DisplayHandle& operator=(const DisplayHandle&) = delete; + ~DisplayHandle(); void Show(base::WeakPtr<PaymentRequest> request); void Retry(); @@ -54,7 +58,6 @@ bool was_shown_ = false; base::WeakPtrFactory<DisplayHandle> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DisplayHandle); }; PaymentRequestDisplayManager();
diff --git a/components/payments/content/payment_response_helper.h b/components/payments/content/payment_response_helper.h index d4273d0..59867b42d 100644 --- a/components/payments/content/payment_response_helper.h +++ b/components/payments/content/payment_response_helper.h
@@ -43,6 +43,10 @@ autofill::AutofillProfile* selected_shipping_profile, autofill::AutofillProfile* selected_contact_profile, base::WeakPtr<Delegate> delegate); + + PaymentResponseHelper(const PaymentResponseHelper&) = delete; + PaymentResponseHelper& operator=(const PaymentResponseHelper&) = delete; + ~PaymentResponseHelper() override; // PaymentApp::Delegate @@ -88,8 +92,6 @@ PayerData payer_data_from_app_; base::WeakPtrFactory<PaymentResponseHelper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PaymentResponseHelper); }; } // namespace payments
diff --git a/components/payments/content/service_worker_payment_app.h b/components/payments/content/service_worker_payment_app.h index f8edaba..e89bb6ac 100644 --- a/components/payments/content/service_worker_payment_app.h +++ b/components/payments/content/service_worker_payment_app.h
@@ -58,6 +58,10 @@ const std::string& enabled_method, bool is_incognito, const base::RepeatingClosure& show_processing_spinner); + + ServiceWorkerPaymentApp(const ServiceWorkerPaymentApp&) = delete; + ServiceWorkerPaymentApp& operator=(const ServiceWorkerPaymentApp&) = delete; + ~ServiceWorkerPaymentApp() override; // The callback for ValidateCanMakePayment. @@ -163,8 +167,6 @@ base::WeakPtr<content::WebContents> web_contents_; base::WeakPtrFactory<ServiceWorkerPaymentApp> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentApp); }; } // namespace payments
diff --git a/components/payments/content/service_worker_payment_app_factory.cc b/components/payments/content/service_worker_payment_app_factory.cc index 882a955..476fef1 100644 --- a/components/payments/content/service_worker_payment_app_factory.cc +++ b/components/payments/content/service_worker_payment_app_factory.cc
@@ -42,6 +42,11 @@ base::WeakPtr<PaymentAppFactory::Delegate> delegate) : owner_(owner), delegate_(delegate), log_(delegate->GetWebContents()) {} + ServiceWorkerPaymentAppCreator(const ServiceWorkerPaymentAppCreator&) = + delete; + ServiceWorkerPaymentAppCreator& operator=( + const ServiceWorkerPaymentAppCreator&) = delete; + ~ServiceWorkerPaymentAppCreator() {} void CreatePaymentApps( @@ -171,8 +176,6 @@ int number_of_pending_sw_payment_apps_ = 0; base::WeakPtrFactory<ServiceWorkerPaymentAppCreator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentAppCreator); }; ServiceWorkerPaymentAppFactory::ServiceWorkerPaymentAppFactory()
diff --git a/components/payments/content/service_worker_payment_app_factory.h b/components/payments/content/service_worker_payment_app_factory.h index 20844e2..313c77e 100644 --- a/components/payments/content/service_worker_payment_app_factory.h +++ b/components/payments/content/service_worker_payment_app_factory.h
@@ -19,6 +19,12 @@ class ServiceWorkerPaymentAppFactory : public PaymentAppFactory { public: ServiceWorkerPaymentAppFactory(); + + ServiceWorkerPaymentAppFactory(const ServiceWorkerPaymentAppFactory&) = + delete; + ServiceWorkerPaymentAppFactory& operator=( + const ServiceWorkerPaymentAppFactory&) = delete; + ~ServiceWorkerPaymentAppFactory() override; // PaymentAppFactory: @@ -32,8 +38,6 @@ std::map<ServiceWorkerPaymentAppCreator*, std::unique_ptr<ServiceWorkerPaymentAppCreator>> creators_; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentAppFactory); }; } // namespace payments
diff --git a/components/payments/content/service_worker_payment_app_finder.h b/components/payments/content/service_worker_payment_app_finder.h index 5ca11fb..4d1c66b 100644 --- a/components/payments/content/service_worker_payment_app_finder.h +++ b/components/payments/content/service_worker_payment_app_finder.h
@@ -49,6 +49,10 @@ InstallablePaymentApps, const std::string& error_message)>; + ServiceWorkerPaymentAppFinder(const ServiceWorkerPaymentAppFinder&) = delete; + ServiceWorkerPaymentAppFinder& operator=( + const ServiceWorkerPaymentAppFinder&) = delete; + ~ServiceWorkerPaymentAppFinder() override; // Retrieves all service worker payment apps that can handle payments for @@ -112,8 +116,6 @@ std::set<std::string> ignored_methods_; std::unique_ptr<PaymentManifestDownloader> test_downloader_; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentAppFinder); }; } // namespace payments
diff --git a/components/payments/content/service_worker_payment_app_unittest.cc b/components/payments/content/service_worker_payment_app_unittest.cc index 775f67e..705a89f1 100644 --- a/components/payments/content/service_worker_payment_app_unittest.cc +++ b/components/payments/content/service_worker_payment_app_unittest.cc
@@ -25,6 +25,11 @@ web_contents_ = test_web_contents_factory_.CreateWebContents(&browser_context_); } + + ServiceWorkerPaymentAppTest(const ServiceWorkerPaymentAppTest&) = delete; + ServiceWorkerPaymentAppTest& operator=(const ServiceWorkerPaymentAppTest&) = + delete; + ~ServiceWorkerPaymentAppTest() override = default; protected: @@ -143,8 +148,6 @@ std::unique_ptr<ServiceWorkerPaymentApp> app_; const SkBitmap* icon_bitmap_; base::WeakPtrFactory<ServiceWorkerPaymentAppTest> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerPaymentAppTest); }; // Test app info and status are correct.
diff --git a/components/payments/content/test_content_payment_request_delegate.h b/components/payments/content/test_content_payment_request_delegate.h index 7c8ec13..e1a56206 100644 --- a/components/payments/content/test_content_payment_request_delegate.h +++ b/components/payments/content/test_content_payment_request_delegate.h
@@ -28,6 +28,12 @@ TestContentPaymentRequestDelegate( std::unique_ptr<base::SingleThreadTaskExecutor> task_executor, autofill::PersonalDataManager* pdm); + + TestContentPaymentRequestDelegate(const TestContentPaymentRequestDelegate&) = + delete; + TestContentPaymentRequestDelegate& operator=( + const TestContentPaymentRequestDelegate&) = delete; + ~TestContentPaymentRequestDelegate() override; // ContentPaymentRequestDelegate: @@ -76,8 +82,6 @@ private: TestPaymentRequestDelegate core_delegate_; - - DISALLOW_COPY_AND_ASSIGN(TestContentPaymentRequestDelegate); }; } // namespace payments
diff --git a/components/payments/content/utility/payment_manifest_parser.h b/components/payments/content/utility/payment_manifest_parser.h index 5e3edf7d..682264c 100644 --- a/components/payments/content/utility/payment_manifest_parser.h +++ b/components/payments/content/utility/payment_manifest_parser.h
@@ -112,6 +112,10 @@ std::unique_ptr<std::vector<WebAppIcon>>)>; explicit PaymentManifestParser(std::unique_ptr<ErrorLogger> log); + + PaymentManifestParser(const PaymentManifestParser&) = delete; + PaymentManifestParser& operator=(const PaymentManifestParser&) = delete; + ~PaymentManifestParser(); void ParsePaymentMethodManifest(const GURL& manifest_url, @@ -160,8 +164,6 @@ std::unique_ptr<ErrorLogger> log_; base::WeakPtrFactory<PaymentManifestParser> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PaymentManifestParser); }; } // namespace payments
diff --git a/components/payments/content/web_app_manifest_section_table.h b/components/payments/content/web_app_manifest_section_table.h index 8a306466..719af88 100644 --- a/components/payments/content/web_app_manifest_section_table.h +++ b/components/payments/content/web_app_manifest_section_table.h
@@ -33,6 +33,11 @@ class WebAppManifestSectionTable : public WebDatabaseTable { public: WebAppManifestSectionTable(); + + WebAppManifestSectionTable(const WebAppManifestSectionTable&) = delete; + WebAppManifestSectionTable& operator=(const WebAppManifestSectionTable&) = + delete; + ~WebAppManifestSectionTable() override; // Retrieves the WebAppManifestSectionTable* owned by |db|. @@ -55,9 +60,6 @@ // for the |web_app|. std::vector<WebAppManifestSection> GetWebAppManifest( const std::string& web_app); - - private: - DISALLOW_COPY_AND_ASSIGN(WebAppManifestSectionTable); }; } // namespace payments
diff --git a/components/payments/content/web_app_manifest_section_table_unittest.cc b/components/payments/content/web_app_manifest_section_table_unittest.cc index 80a5e8e..46ae73df 100644 --- a/components/payments/content/web_app_manifest_section_table_unittest.cc +++ b/components/payments/content/web_app_manifest_section_table_unittest.cc
@@ -19,6 +19,12 @@ class WebAppManifestSectionTableTest : public testing::Test { public: WebAppManifestSectionTableTest() {} + + WebAppManifestSectionTableTest(const WebAppManifestSectionTableTest&) = + delete; + WebAppManifestSectionTableTest& operator=( + const WebAppManifestSectionTableTest&) = delete; + ~WebAppManifestSectionTableTest() override {} protected: @@ -48,9 +54,6 @@ base::ScopedTempDir temp_dir_; std::unique_ptr<WebAppManifestSectionTable> table_; std::unique_ptr<WebDatabase> db_; - - private: - DISALLOW_COPY_AND_ASSIGN(WebAppManifestSectionTableTest); }; TEST_F(WebAppManifestSectionTableTest, GetNonExistManifest) {
diff --git a/components/payments/core/can_make_payment_query.h b/components/payments/core/can_make_payment_query.h index 05171abb..9c39d80 100644 --- a/components/payments/core/can_make_payment_query.h +++ b/components/payments/core/can_make_payment_query.h
@@ -23,6 +23,10 @@ class CanMakePaymentQuery : public KeyedService { public: CanMakePaymentQuery(); + + CanMakePaymentQuery(const CanMakePaymentQuery&) = delete; + CanMakePaymentQuery& operator=(const CanMakePaymentQuery&) = delete; + ~CanMakePaymentQuery() override; // Returns whether |top_level_origin| and |frame_origin| can call @@ -61,8 +65,6 @@ std::map<std::string, std::map<std::string, std::set<std::string>>> queries_; base::WeakPtrFactory<CanMakePaymentQuery> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CanMakePaymentQuery); }; } // namespace payments
diff --git a/components/payments/core/currency_formatter.h b/components/payments/core/currency_formatter.h index 4110729f..30d0380 100644 --- a/components/payments/core/currency_formatter.h +++ b/components/payments/core/currency_formatter.h
@@ -24,6 +24,10 @@ // (as part of payment_details_validation.h) before this is created. CurrencyFormatter(const std::string& currency_code, const std::string& locale_name); + + CurrencyFormatter(const CurrencyFormatter&) = delete; + CurrencyFormatter& operator=(const CurrencyFormatter&) = delete; + ~CurrencyFormatter(); // Set the maximum number of fractional digits. (kMaximumNumFractionalDigits @@ -49,8 +53,6 @@ std::unique_ptr<icu::UnicodeString> currency_code_; std::string formatted_currency_code_; std::unique_ptr<icu::NumberFormat> icu_formatter_; - - DISALLOW_COPY_AND_ASSIGN(CurrencyFormatter); }; } // namespace payments
diff --git a/components/payments/core/error_logger.h b/components/payments/core/error_logger.h index bc1721a6..c5379d6 100644 --- a/components/payments/core/error_logger.h +++ b/components/payments/core/error_logger.h
@@ -22,6 +22,10 @@ class ErrorLogger { public: ErrorLogger(); + + ErrorLogger(const ErrorLogger&) = delete; + ErrorLogger& operator=(const ErrorLogger&) = delete; + virtual ~ErrorLogger(); // Disables logs for tests to keep test output clean. @@ -37,9 +41,6 @@ protected: bool enabled_ = true; - - private: - DISALLOW_COPY_AND_ASSIGN(ErrorLogger); }; } // namespace payments
diff --git a/components/payments/core/journey_logger.h b/components/payments/core/journey_logger.h index a9bb877..c6077a1 100644 --- a/components/payments/core/journey_logger.h +++ b/components/payments/core/journey_logger.h
@@ -255,6 +255,10 @@ }; JourneyLogger(bool is_incognito, ukm::SourceId payment_request_source_id); + + JourneyLogger(const JourneyLogger&) = delete; + JourneyLogger& operator=(const JourneyLogger&) = delete; + ~JourneyLogger(); // Sets the number of suggestions shown for the specified section. @@ -415,7 +419,6 @@ ukm::SourceId payment_app_source_id_ = ukm::kInvalidSourceId; base::WeakPtrFactory<JourneyLogger> weak_ptr_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(JourneyLogger); }; } // namespace payments
diff --git a/components/payments/core/payment_manifest_downloader.h b/components/payments/core/payment_manifest_downloader.h index b638801b..81889ae 100644 --- a/components/payments/core/payment_manifest_downloader.h +++ b/components/payments/core/payment_manifest_downloader.h
@@ -78,6 +78,10 @@ std::unique_ptr<ErrorLogger> log, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + PaymentManifestDownloader(const PaymentManifestDownloader&) = delete; + PaymentManifestDownloader& operator=(const PaymentManifestDownloader&) = + delete; + virtual ~PaymentManifestDownloader(); // Download a payment method manifest from |url| via a GET. The HTTP response @@ -188,8 +192,6 @@ downloads_; base::WeakPtrFactory<PaymentManifestDownloader> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PaymentManifestDownloader); }; } // namespace payments
diff --git a/components/payments/core/payment_manifest_downloader_unittest.cc b/components/payments/core/payment_manifest_downloader_unittest.cc index bcb78a36..fe7bfcd 100644 --- a/components/payments/core/payment_manifest_downloader_unittest.cc +++ b/components/payments/core/payment_manifest_downloader_unittest.cc
@@ -548,6 +548,10 @@ base::Unretained(this))); } + WebAppManifestDownloaderTest(const WebAppManifestDownloaderTest&) = delete; + WebAppManifestDownloaderTest& operator=(const WebAppManifestDownloaderTest&) = + delete; + ~WebAppManifestDownloaderTest() override {} MOCK_METHOD3(OnManifestDownload, @@ -575,8 +579,6 @@ network::TestURLLoaderFactory test_factory_; scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory_; PaymentManifestDownloader downloader_; - - DISALLOW_COPY_AND_ASSIGN(WebAppManifestDownloaderTest); }; TEST_F(WebAppManifestDownloaderTest, HttpGetResponse404IsFailure) {
diff --git a/components/payments/core/test_payment_manifest_downloader.h b/components/payments/core/test_payment_manifest_downloader.h index a200a56..3580461 100644 --- a/components/payments/core/test_payment_manifest_downloader.h +++ b/components/payments/core/test_payment_manifest_downloader.h
@@ -50,6 +50,10 @@ public: explicit TestDownloader( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + TestDownloader(const TestDownloader&) = delete; + TestDownloader& operator=(const TestDownloader&) = delete; + ~TestDownloader() override; // Modifies the downloader to replace all instances of |prefix| with @@ -113,8 +117,6 @@ // "https://bobpay.com": "https://127.0.0.1:9090" // } std::map<std::string, GURL> test_server_url_; - - DISALLOW_COPY_AND_ASSIGN(TestDownloader); }; } // namespace payments
diff --git a/components/payments/core/test_payment_request_delegate.h b/components/payments/core/test_payment_request_delegate.h index a328a9f8..6d42338 100644 --- a/components/payments/core/test_payment_request_delegate.h +++ b/components/payments/core/test_payment_request_delegate.h
@@ -26,6 +26,11 @@ TestPaymentRequestDelegate( std::unique_ptr<base::SingleThreadTaskExecutor> task_executor, autofill::PersonalDataManager* personal_data_manager); + + TestPaymentRequestDelegate(const TestPaymentRequestDelegate&) = delete; + TestPaymentRequestDelegate& operator=(const TestPaymentRequestDelegate&) = + delete; + ~TestPaymentRequestDelegate() override; // PaymentRequestDelegate @@ -69,7 +74,6 @@ autofill::CreditCard full_card_request_card_; base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> full_card_result_delegate_; - DISALLOW_COPY_AND_ASSIGN(TestPaymentRequestDelegate); }; } // namespace payments
diff --git a/components/pdf/browser/pdf_web_contents_helper.h b/components/pdf/browser/pdf_web_contents_helper.h index 878f410a..a482a47a 100644 --- a/components/pdf/browser/pdf_web_contents_helper.h +++ b/components/pdf/browser/pdf_web_contents_helper.h
@@ -37,6 +37,9 @@ public ui::TouchSelectionMenuClient, public content::TouchSelectionControllerClientManager::Observer { public: + PDFWebContentsHelper(const PDFWebContentsHelper&) = delete; + PDFWebContentsHelper& operator=(const PDFWebContentsHelper&) = delete; + ~PDFWebContentsHelper() override; static void CreateForWebContentsWithClient( @@ -109,8 +112,6 @@ mojo::Remote<mojom::PdfListener> remote_pdf_client_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(PDFWebContentsHelper); }; } // namespace pdf
diff --git a/components/pdf/renderer/pepper_pdf_host.h b/components/pdf/renderer/pepper_pdf_host.h index a49e410..69e3ee82 100644 --- a/components/pdf/renderer/pepper_pdf_host.h +++ b/components/pdf/renderer/pepper_pdf_host.h
@@ -68,6 +68,10 @@ PepperPDFHost(content::RendererPpapiHost* host, PP_Instance instance, PP_Resource resource); + + PepperPDFHost(const PepperPDFHost&) = delete; + PepperPDFHost& operator=(const PepperPDFHost&) = delete; + ~PepperPDFHost() override; // Invokes the "Print" command for the given instance as if the user right @@ -150,8 +154,6 @@ content::RendererPpapiHost* const host_; mojo::AssociatedRemote<mojom::PdfService> remote_pdf_service_; mojo::Receiver<mojom::PdfListener> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(PepperPDFHost); }; } // namespace pdf
diff --git a/components/performance_manager/decorators/page_load_tracker_decorator.cc b/components/performance_manager/decorators/page_load_tracker_decorator.cc index 568f563..15bd99c1 100644 --- a/components/performance_manager/decorators/page_load_tracker_decorator.cc +++ b/components/performance_manager/decorators/page_load_tracker_decorator.cc
@@ -38,15 +38,16 @@ struct Traits : public NodeAttachedDataOwnedByNodeType<PageNodeImpl> {}; explicit DataImpl(const PageNodeImpl* page_node) {} + + DataImpl(const DataImpl&) = delete; + DataImpl& operator=(const DataImpl&) = delete; + ~DataImpl() override = default; static std::unique_ptr<NodeAttachedData>* GetUniquePtrStorage( PageNodeImpl* page_node) { return PageLoadTrackerAccess::GetUniquePtrStorage(page_node); } - - private: - DISALLOW_COPY_AND_ASSIGN(DataImpl); }; // static
diff --git a/components/performance_manager/decorators/page_load_tracker_decorator.h b/components/performance_manager/decorators/page_load_tracker_decorator.h index 6a65bb1a..7783aabce 100644 --- a/components/performance_manager/decorators/page_load_tracker_decorator.h +++ b/components/performance_manager/decorators/page_load_tracker_decorator.h
@@ -32,6 +32,10 @@ class Data; PageLoadTrackerDecorator(); + + PageLoadTrackerDecorator(const PageLoadTrackerDecorator&) = delete; + PageLoadTrackerDecorator& operator=(const PageLoadTrackerDecorator&) = delete; + ~PageLoadTrackerDecorator() override; // FrameNodeObserver implementation: @@ -106,9 +110,6 @@ static void TransitionToLoadedAndIdle(PageNodeImpl* page_node); static bool IsIdling(const PageNodeImpl* page_node); - - private: - DISALLOW_COPY_AND_ASSIGN(PageLoadTrackerDecorator); }; class PageLoadTrackerDecorator::Data {
diff --git a/components/performance_manager/decorators/site_data_recorder.cc b/components/performance_manager/decorators/site_data_recorder.cc index aa39f00..91a9d7c 100644 --- a/components/performance_manager/decorators/site_data_recorder.cc +++ b/components/performance_manager/decorators/site_data_recorder.cc
@@ -58,6 +58,10 @@ explicit SiteDataNodeData(const PageNodeImpl* page_node) : page_node_(page_node) {} + + SiteDataNodeData(const SiteDataNodeData&) = delete; + SiteDataNodeData& operator=(const SiteDataNodeData&) = delete; + ~SiteDataNodeData() override = default; // NodeAttachedData: @@ -134,8 +138,6 @@ std::unique_ptr<SiteDataReader> reader_ GUARDED_BY_CONTEXT(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SiteDataNodeData); }; void SiteDataNodeData::OnMainFrameUrlChanged(const GURL& url,
diff --git a/components/performance_manager/graph/frame_node_impl.h b/components/performance_manager/graph/frame_node_impl.h index ccfd20d..ec733dde 100644 --- a/components/performance_manager/graph/frame_node_impl.h +++ b/components/performance_manager/graph/frame_node_impl.h
@@ -54,6 +54,9 @@ content::BrowsingInstanceId browsing_instance_id, content::SiteInstanceId site_instance_id); + FrameNodeImpl(const FrameNodeImpl&) = delete; + FrameNodeImpl& operator=(const FrameNodeImpl&) = delete; + ~FrameNodeImpl() override; void Bind(mojo::PendingReceiver<mojom::DocumentCoordinationUnit> receiver); @@ -354,8 +357,6 @@ base::WeakPtr<FrameNodeImpl> weak_this_; base::WeakPtrFactory<FrameNodeImpl> weak_factory_ GUARDED_BY_CONTEXT(sequence_checker_){this}; - - DISALLOW_COPY_AND_ASSIGN(FrameNodeImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/node_attached_data.h b/components/performance_manager/graph/node_attached_data.h index 9a7f1fa..b29f1f9 100644 --- a/components/performance_manager/graph/node_attached_data.h +++ b/components/performance_manager/graph/node_attached_data.h
@@ -24,6 +24,11 @@ InternalNodeAttachedDataStorage() {} + InternalNodeAttachedDataStorage(const InternalNodeAttachedDataStorage&) = + delete; + InternalNodeAttachedDataStorage& operator=( + const InternalNodeAttachedDataStorage&) = delete; + ~InternalNodeAttachedDataStorage() { Reset(); } operator bool() const { return data_; } @@ -57,7 +62,6 @@ private: NodeAttachedData* data_ = nullptr; uint8_t buffer_[kDataSize]; - DISALLOW_COPY_AND_ASSIGN(InternalNodeAttachedDataStorage); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/node_attached_data_unittest.cc b/components/performance_manager/graph/node_attached_data_unittest.cc index e13c1dde..33d7148 100644 --- a/components/performance_manager/graph/node_attached_data_unittest.cc +++ b/components/performance_manager/graph/node_attached_data_unittest.cc
@@ -33,6 +33,9 @@ public: DummyNode() : NodeBase(NodeTypeEnum::kInvalidType) {} + DummyNode(const DummyNode&) = delete; + DummyNode& operator=(const DummyNode&) = delete; + ~DummyNode() override = default; // NodeBase implementation: @@ -57,9 +60,6 @@ // in the tests. std::unique_ptr<NodeAttachedData> dummy_data_; InternalNodeAttachedDataStorage<kFooDataSize> foo_data_; - - private: - DISALLOW_COPY_AND_ASSIGN(DummyNode); }; // A NodeAttachedData class that can only be attached to page and process nodes @@ -74,6 +74,10 @@ explicit DummyData(const PageNodeImpl* page_node) {} explicit DummyData(const ProcessNodeImpl* process_node) {} explicit DummyData(const DummyNode* dummy_node) {} + + DummyData(const DummyData&) = delete; + DummyData& operator=(const DummyData&) = delete; + ~DummyData() override = default; // Provides access to storage on DummyNodes. @@ -81,9 +85,6 @@ DummyNode* dummy_node) { return &dummy_node->dummy_data_; } - - private: - DISALLOW_COPY_AND_ASSIGN(DummyData); }; // Another NodeAttachedData class that can only be attached to page nodes in the @@ -96,6 +97,10 @@ FooData() = default; explicit FooData(const PageNodeImpl* page_node) {} explicit FooData(const DummyNode* dummy_node) {} + + FooData(const FooData&) = delete; + FooData& operator=(const FooData&) = delete; + ~FooData() override = default; // Provides access to storage on DummyNodes. @@ -103,9 +108,6 @@ DummyNode* dummy_node) { return &dummy_node->foo_data_; } - - private: - DISALLOW_COPY_AND_ASSIGN(FooData); }; // An implementation of map-stored user-data using the public interface.
diff --git a/components/performance_manager/graph/node_base.h b/components/performance_manager/graph/node_base.h index 2e35acc..cbb287d 100644 --- a/components/performance_manager/graph/node_base.h +++ b/components/performance_manager/graph/node_base.h
@@ -40,6 +40,10 @@ // TODO(siggi): Don't store the node type, expose it on a virtual function // instead. explicit NodeBase(NodeTypeEnum type); + + NodeBase(const NodeBase&) = delete; + NodeBase& operator=(const NodeBase&) = delete; + virtual ~NodeBase(); // May be called on any sequence. @@ -140,9 +144,6 @@ GraphImpl* graph_ GUARDED_BY_CONTEXT(sequence_checker_) = nullptr; SEQUENCE_CHECKER(sequence_checker_); - - private: - DISALLOW_COPY_AND_ASSIGN(NodeBase); }; // Helper for implementing the Node parent of a PublicNodeClass.
diff --git a/components/performance_manager/graph/page_node_impl.h b/components/performance_manager/graph/page_node_impl.h index 6df4a529..3021405 100644 --- a/components/performance_manager/graph/page_node_impl.h +++ b/components/performance_manager/graph/page_node_impl.h
@@ -48,6 +48,10 @@ bool is_audible, base::TimeTicks visibility_change_time, PageState page_state); + + PageNodeImpl(const PageNodeImpl&) = delete; + PageNodeImpl& operator=(const PageNodeImpl&) = delete; + ~PageNodeImpl() override; // Returns the web contents associated with this page node. It is valid to @@ -370,8 +374,6 @@ base::WeakPtr<PageNodeImpl> weak_this_; base::WeakPtrFactory<PageNodeImpl> weak_factory_ GUARDED_BY_CONTEXT(sequence_checker_){this}; - - DISALLOW_COPY_AND_ASSIGN(PageNodeImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/process_node_impl.h b/components/performance_manager/graph/process_node_impl.h index 649542f8..45c62d00 100644 --- a/components/performance_manager/graph/process_node_impl.h +++ b/components/performance_manager/graph/process_node_impl.h
@@ -59,6 +59,9 @@ ProcessNodeImpl(content::ProcessType process_type, RenderProcessHostProxy render_process_proxy); + ProcessNodeImpl(const ProcessNodeImpl&) = delete; + ProcessNodeImpl& operator=(const ProcessNodeImpl&) = delete; + ~ProcessNodeImpl() override; void Bind(mojo::PendingReceiver<mojom::ProcessCoordinationUnit> receiver); @@ -276,8 +279,6 @@ base::WeakPtr<ProcessNodeImpl> weak_this_; base::WeakPtrFactory<ProcessNodeImpl> weak_factory_ GUARDED_BY_CONTEXT(sequence_checker_){this}; - - DISALLOW_COPY_AND_ASSIGN(ProcessNodeImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/system_node_impl.h b/components/performance_manager/graph/system_node_impl.h index adfa942..02baf628 100644 --- a/components/performance_manager/graph/system_node_impl.h +++ b/components/performance_manager/graph/system_node_impl.h
@@ -25,6 +25,10 @@ static constexpr NodeTypeEnum Type() { return NodeTypeEnum::kSystem; } SystemNodeImpl(); + + SystemNodeImpl(const SystemNodeImpl&) = delete; + SystemNodeImpl& operator=(const SystemNodeImpl&) = delete; + ~SystemNodeImpl() override; // Implements NodeBase: @@ -51,8 +55,6 @@ base::WeakPtrFactory<SystemNodeImpl> weak_factory_ GUARDED_BY_CONTEXT(sequence_checker_){this}; - - DISALLOW_COPY_AND_ASSIGN(SystemNodeImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/worker_node_impl.h b/components/performance_manager/graph/worker_node_impl.h index b7456c8..508ee8d 100644 --- a/components/performance_manager/graph/worker_node_impl.h +++ b/components/performance_manager/graph/worker_node_impl.h
@@ -37,6 +37,10 @@ WorkerType worker_type, ProcessNodeImpl* process_node, const blink::WorkerToken& worker_token); + + WorkerNodeImpl(const WorkerNodeImpl&) = delete; + WorkerNodeImpl& operator=(const WorkerNodeImpl&) = delete; + ~WorkerNodeImpl() override; // Invoked when a frame starts/stops being a client of this worker. @@ -155,8 +159,6 @@ base::WeakPtrFactory<WorkerNodeImpl> weak_factory_ GUARDED_BY_CONTEXT(sequence_checker_){this}; - - DISALLOW_COPY_AND_ASSIGN(WorkerNodeImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/graph/worker_node_impl_unittest.cc b/components/performance_manager/graph/worker_node_impl_unittest.cc index 748cb10..b6ae96b 100644 --- a/components/performance_manager/graph/worker_node_impl_unittest.cc +++ b/components/performance_manager/graph/worker_node_impl_unittest.cc
@@ -213,6 +213,10 @@ class TestWorkerNodeObserver : public WorkerNodeObserver { public: TestWorkerNodeObserver() = default; + + TestWorkerNodeObserver(const TestWorkerNodeObserver&) = delete; + TestWorkerNodeObserver& operator=(const TestWorkerNodeObserver&) = delete; + ~TestWorkerNodeObserver() override = default; void OnWorkerNodeAdded(const WorkerNode* worker_node) override { @@ -282,8 +286,6 @@ client_workers_; bool on_priority_and_reason_changed_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestWorkerNodeObserver); }; // Same as the AddWorkerNodes test, but the graph is verified through the
diff --git a/components/performance_manager/performance_manager_impl.h b/components/performance_manager/performance_manager_impl.h index 204cc2c..74d3250 100644 --- a/components/performance_manager/performance_manager_impl.h +++ b/components/performance_manager/performance_manager_impl.h
@@ -40,6 +40,9 @@ public: using FrameNodeCreationCallback = base::OnceCallback<void(FrameNodeImpl*)>; + PerformanceManagerImpl(const PerformanceManagerImpl&) = delete; + PerformanceManagerImpl& operator=(const PerformanceManagerImpl&) = delete; + ~PerformanceManagerImpl() override; // Posts a callback that will run on the PM sequence. Valid to call from any @@ -185,8 +188,6 @@ scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PerformanceManagerImpl); }; // static
diff --git a/components/performance_manager/performance_manager_impl_unittest.cc b/components/performance_manager/performance_manager_impl_unittest.cc index 8e6d18c..41e3b06 100644 --- a/components/performance_manager/performance_manager_impl_unittest.cc +++ b/components/performance_manager/performance_manager_impl_unittest.cc
@@ -25,6 +25,10 @@ public: PerformanceManagerImplTest() {} + PerformanceManagerImplTest(const PerformanceManagerImplTest&) = delete; + PerformanceManagerImplTest& operator=(const PerformanceManagerImplTest&) = + delete; + ~PerformanceManagerImplTest() override {} void SetUp() override { @@ -45,8 +49,6 @@ private: std::unique_ptr<PerformanceManagerImpl> performance_manager_; content::BrowserTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(PerformanceManagerImplTest); }; TEST_F(PerformanceManagerImplTest, InstantiateNodes) {
diff --git a/components/performance_manager/performance_manager_tab_helper.h b/components/performance_manager/performance_manager_tab_helper.h index 2601c45..8204fd3 100644 --- a/components/performance_manager/performance_manager_tab_helper.h +++ b/components/performance_manager/performance_manager_tab_helper.h
@@ -44,6 +44,10 @@ content::WebContents*) = 0; }; + PerformanceManagerTabHelper(const PerformanceManagerTabHelper&) = delete; + PerformanceManagerTabHelper& operator=(const PerformanceManagerTabHelper&) = + delete; + ~PerformanceManagerTabHelper() override; // Returns the PageNode associated with the primary page. This can change @@ -203,8 +207,6 @@ WEB_CONTENTS_USER_DATA_KEY_DECL(); base::WeakPtrFactory<PerformanceManagerTabHelper> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PerformanceManagerTabHelper); }; } // namespace performance_manager
diff --git a/components/performance_manager/performance_manager_unittest.cc b/components/performance_manager/performance_manager_unittest.cc index 4ab75e4..39ada3e 100644 --- a/components/performance_manager/performance_manager_unittest.cc +++ b/components/performance_manager/performance_manager_unittest.cc
@@ -42,9 +42,10 @@ EXPECT_FALSE(PerformanceManager::IsAvailable()); } - ~PerformanceManagerTest() override {} + PerformanceManagerTest(const PerformanceManagerTest&) = delete; + PerformanceManagerTest& operator=(const PerformanceManagerTest&) = delete; - DISALLOW_COPY_AND_ASSIGN(PerformanceManagerTest); + ~PerformanceManagerTest() override {} }; TEST_F(PerformanceManagerTest, NodeAccessors) {
diff --git a/components/performance_manager/persistence/site_data/leveldb_site_data_store.cc b/components/performance_manager/persistence/site_data/leveldb_site_data_store.cc index d1a1668..536c843 100644 --- a/components/performance_manager/persistence/site_data/leveldb_site_data_store.cc +++ b/components/performance_manager/persistence/site_data/leveldb_site_data_store.cc
@@ -143,6 +143,10 @@ // the process crashes). write_options_.sync = false; } + + AsyncHelper(const AsyncHelper&) = delete; + AsyncHelper& operator=(const AsyncHelper&) = delete; + ~AsyncHelper() = default; // Open the database from |db_path_| after creating it if it didn't exist, @@ -206,7 +210,6 @@ GUARDED_BY_CONTEXT(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_); - DISALLOW_COPY_AND_ASSIGN(AsyncHelper); }; void LevelDBSiteDataStore::AsyncHelper::OpenOrCreateDatabase() {
diff --git a/components/performance_manager/persistence/site_data/leveldb_site_data_store.h b/components/performance_manager/persistence/site_data/leveldb_site_data_store.h index bf8a13a6..fd4a0ae 100644 --- a/components/performance_manager/persistence/site_data/leveldb_site_data_store.h +++ b/components/performance_manager/persistence/site_data/leveldb_site_data_store.h
@@ -30,6 +30,9 @@ public: explicit LevelDBSiteDataStore(const base::FilePath& db_path); + LevelDBSiteDataStore(const LevelDBSiteDataStore&) = delete; + LevelDBSiteDataStore& operator=(const LevelDBSiteDataStore&) = delete; + ~LevelDBSiteDataStore() override; // SiteDataStore: @@ -72,8 +75,6 @@ GUARDED_BY_CONTEXT(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LevelDBSiteDataStore); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/non_recording_site_data_cache.h b/components/performance_manager/persistence/site_data/non_recording_site_data_cache.h index c90ef07..6858a2b 100644 --- a/components/performance_manager/persistence/site_data/non_recording_site_data_cache.h +++ b/components/performance_manager/persistence/site_data/non_recording_site_data_cache.h
@@ -24,6 +24,11 @@ NonRecordingSiteDataCache(const std::string& browser_context_id, SiteDataCacheInspector* data_cache_inspector, SiteDataCache* data_cache_for_readers); + + NonRecordingSiteDataCache(const NonRecordingSiteDataCache&) = delete; + NonRecordingSiteDataCache& operator=(const NonRecordingSiteDataCache&) = + delete; + ~NonRecordingSiteDataCache() override; // SiteDataCache: @@ -54,8 +59,6 @@ // The ID of the browser context this data store is associated with. const std::string browser_context_id_; - - DISALLOW_COPY_AND_ASSIGN(NonRecordingSiteDataCache); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/noop_site_data_writer.h b/components/performance_manager/persistence/site_data/noop_site_data_writer.h index 4bd4aa2..b8bd0d2 100644 --- a/components/performance_manager/persistence/site_data/noop_site_data_writer.h +++ b/components/performance_manager/persistence/site_data/noop_site_data_writer.h
@@ -14,6 +14,9 @@ // Specialization of a SiteDataWriter that doesn't record anything. class NoopSiteDataWriter : public SiteDataWriter { public: + NoopSiteDataWriter(const NoopSiteDataWriter&) = delete; + NoopSiteDataWriter& operator=(const NoopSiteDataWriter&) = delete; + ~NoopSiteDataWriter() override; // Implementation of SiteDataWriter: @@ -35,8 +38,6 @@ // Private constructor, these objects are meant to be created by a // NonRecordingSiteDataCache. NoopSiteDataWriter(); - - DISALLOW_COPY_AND_ASSIGN(NoopSiteDataWriter); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/site_data_cache.h b/components/performance_manager/persistence/site_data/site_data_cache.h index 61d37fb..01924253 100644 --- a/components/performance_manager/persistence/site_data/site_data_cache.h +++ b/components/performance_manager/persistence/site_data/site_data_cache.h
@@ -19,6 +19,10 @@ class SiteDataCache { public: SiteDataCache() = default; + + SiteDataCache(const SiteDataCache&) = delete; + SiteDataCache& operator=(const SiteDataCache&) = delete; + virtual ~SiteDataCache() = default; // Returns a SiteDataReader for the given origin. @@ -35,9 +39,6 @@ // Returns the number of element in the cache. virtual int Size() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SiteDataCache); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/site_data_cache_factory.h b/components/performance_manager/persistence/site_data/site_data_cache_factory.h index f77d3d3..74f1695 100644 --- a/components/performance_manager/persistence/site_data/site_data_cache_factory.h +++ b/components/performance_manager/persistence/site_data/site_data_cache_factory.h
@@ -34,6 +34,10 @@ class SiteDataCacheFactory { public: SiteDataCacheFactory(); + + SiteDataCacheFactory(const SiteDataCacheFactory&) = delete; + SiteDataCacheFactory& operator=(const SiteDataCacheFactory&) = delete; + ~SiteDataCacheFactory(); // Returns a pointer to the global instance. @@ -89,8 +93,6 @@ GUARDED_BY_CONTEXT(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SiteDataCacheFactory); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/site_data_cache_factory_unittest.cc b/components/performance_manager/persistence/site_data/site_data_cache_factory_unittest.cc index 1cfa8d6c..8b73fcf 100644 --- a/components/performance_manager/persistence/site_data/site_data_cache_factory_unittest.cc +++ b/components/performance_manager/persistence/site_data/site_data_cache_factory_unittest.cc
@@ -37,7 +37,6 @@ { base::RunLoop run_loop; cache_factory.PostTaskWithThisObject( - FROM_HERE, base::BindOnce( [](const std::string& browser_context_id, base::OnceClosure quit_closure, SiteDataCacheFactory* factory) { @@ -57,7 +56,6 @@ { base::RunLoop run_loop; cache_factory.PostTaskWithThisObject( - FROM_HERE, base::BindOnce( [](const std::string& browser_context_id, base::OnceClosure quit_closure, SiteDataCacheFactory* factory) {
diff --git a/components/performance_manager/persistence/site_data/site_data_cache_impl.h b/components/performance_manager/persistence/site_data/site_data_cache_impl.h index f7b6c46..eec258c 100644 --- a/components/performance_manager/persistence/site_data/site_data_cache_impl.h +++ b/components/performance_manager/persistence/site_data/site_data_cache_impl.h
@@ -36,6 +36,10 @@ SiteDataCacheImpl(const std::string& browser_context_id, const base::FilePath& browser_context_path); + + SiteDataCacheImpl(const SiteDataCacheImpl&) = delete; + SiteDataCacheImpl& operator=(const SiteDataCacheImpl&) = delete; + ~SiteDataCacheImpl() override; // SiteDataCache: @@ -104,8 +108,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<SiteDataCacheImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SiteDataCacheImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc b/components/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc index 6c1e6e23..b0782f1 100644 --- a/components/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc +++ b/components/performance_manager/persistence/site_data/site_data_cache_impl_unittest.cc
@@ -28,13 +28,14 @@ class MockSiteCache : public testing::NoopSiteDataStore { public: MockSiteCache() = default; + + MockSiteCache(const MockSiteCache&) = delete; + MockSiteCache& operator=(const MockSiteCache&) = delete; + ~MockSiteCache() = default; MOCK_METHOD1(RemoveSiteDataFromStore, void(const std::vector<url::Origin>&)); MOCK_METHOD0(ClearStore, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSiteCache); }; } // namespace
diff --git a/components/performance_manager/persistence/site_data/site_data_impl_unittest.cc b/components/performance_manager/persistence/site_data/site_data_impl_unittest.cc index 05f59e6..bc819f82 100644 --- a/components/performance_manager/persistence/site_data/site_data_impl_unittest.cc +++ b/components/performance_manager/persistence/site_data/site_data_impl_unittest.cc
@@ -44,6 +44,10 @@ class MockDataStore : public testing::NoopSiteDataStore { public: MockDataStore() = default; + + MockDataStore(const MockDataStore&) = delete; + MockDataStore& operator=(const MockDataStore&) = delete; + ~MockDataStore() = default; // Note: As move-only parameters (e.g. OnceCallback) aren't supported by mock @@ -59,9 +63,6 @@ MOCK_METHOD2(WriteSiteDataIntoStore, void(const url::Origin&, const SiteDataProto&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDataStore); }; // Returns a SiteDataFeatureProto that indicates that a feature hasn't been
diff --git a/components/performance_manager/persistence/site_data/site_data_reader_unittest.cc b/components/performance_manager/persistence/site_data/site_data_reader_unittest.cc index 750f4f92..531d7d3 100644 --- a/components/performance_manager/persistence/site_data/site_data_reader_unittest.cc +++ b/components/performance_manager/persistence/site_data/site_data_reader_unittest.cc
@@ -25,6 +25,10 @@ class MockSiteDataStore : public testing::NoopSiteDataStore { public: MockSiteDataStore() = default; + + MockSiteDataStore(const MockSiteDataStore&) = delete; + MockSiteDataStore& operator=(const MockSiteDataStore&) = delete; + ~MockSiteDataStore() = default; // Note: As move-only parameters (e.g. OnceCallback) aren't supported by mock @@ -40,9 +44,6 @@ MOCK_METHOD2(WriteSiteDataIntoStore, void(const url::Origin&, const SiteDataProto&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSiteDataStore); }; void InitializeSiteDataProto(SiteDataProto* site_data) {
diff --git a/components/performance_manager/persistence/site_data/site_data_writer.h b/components/performance_manager/persistence/site_data/site_data_writer.h index 10fb400a..1dbb2ee3 100644 --- a/components/performance_manager/persistence/site_data/site_data_writer.h +++ b/components/performance_manager/persistence/site_data/site_data_writer.h
@@ -15,6 +15,9 @@ // should be sent if/when the tab using it gets loaded. class SiteDataWriter { public: + SiteDataWriter(const SiteDataWriter&) = delete; + SiteDataWriter& operator=(const SiteDataWriter&) = delete; + virtual ~SiteDataWriter(); // Records tab load/unload events. @@ -58,8 +61,6 @@ GUARDED_BY_CONTEXT(sequence_checker_); SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(SiteDataWriter); }; } // namespace performance_manager
diff --git a/components/performance_manager/persistence/site_data/unittest_utils.h b/components/performance_manager/persistence/site_data/unittest_utils.h index 75d7d69..c991e77 100644 --- a/components/performance_manager/persistence/site_data/unittest_utils.h +++ b/components/performance_manager/persistence/site_data/unittest_utils.h
@@ -24,6 +24,12 @@ : public internal::SiteDataImpl::OnDestroyDelegate { public: MockSiteDataImplOnDestroyDelegate(); + + MockSiteDataImplOnDestroyDelegate(const MockSiteDataImplOnDestroyDelegate&) = + delete; + MockSiteDataImplOnDestroyDelegate& operator=( + const MockSiteDataImplOnDestroyDelegate&) = delete; + ~MockSiteDataImplOnDestroyDelegate(); MOCK_METHOD1(OnSiteDataImplDestroyed, void(internal::SiteDataImpl*)); @@ -34,14 +40,16 @@ private: base::WeakPtrFactory<MockSiteDataImplOnDestroyDelegate> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockSiteDataImplOnDestroyDelegate); }; // An implementation of a SiteDataStore that doesn't record anything. class NoopSiteDataStore : public SiteDataStore { public: NoopSiteDataStore(); + + NoopSiteDataStore(const NoopSiteDataStore&) = delete; + NoopSiteDataStore& operator=(const NoopSiteDataStore&) = delete; + ~NoopSiteDataStore() override; // SiteDataStore: @@ -55,9 +63,6 @@ void ClearStore() override; void GetStoreSize(GetStoreSizeCallback callback) override; void SetInitializationCallbackForTesting(base::OnceClosure callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(NoopSiteDataStore); }; } // namespace testing
diff --git a/components/performance_manager/public/decorators/process_metrics_decorator.h b/components/performance_manager/public/decorators/process_metrics_decorator.h index ad464922..486ee54 100644 --- a/components/performance_manager/public/decorators/process_metrics_decorator.h +++ b/components/performance_manager/public/decorators/process_metrics_decorator.h
@@ -23,6 +23,10 @@ public GraphRegisteredImpl<ProcessMetricsDecorator> { public: ProcessMetricsDecorator(); + + ProcessMetricsDecorator(const ProcessMetricsDecorator&) = delete; + ProcessMetricsDecorator& operator=(const ProcessMetricsDecorator&) = delete; + ~ProcessMetricsDecorator() override; // A token used to express an interest for process metrics. Process metrics @@ -103,7 +107,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ProcessMetricsDecorator> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(ProcessMetricsDecorator); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/frame_node.h b/components/performance_manager/public/graph/frame_node.h index 451a6ac3..613642a 100644 --- a/components/performance_manager/public/graph/frame_node.h +++ b/components/performance_manager/public/graph/frame_node.h
@@ -79,6 +79,10 @@ }; FrameNode(); + + FrameNode(const FrameNode&) = delete; + FrameNode& operator=(const FrameNode&) = delete; + ~FrameNode() override; // Returns the parent of this frame node. This may be null if this frame node @@ -214,9 +218,6 @@ // Returns a proxy to the RenderFrameHost associated with this node. The // proxy may only be dereferenced on the UI thread. virtual const RenderFrameHostProxy& GetRenderFrameHostProxy() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FrameNode); }; // Pure virtual observer interface. Derive from this if you want to be forced to @@ -224,6 +225,10 @@ class FrameNodeObserver { public: FrameNodeObserver(); + + FrameNodeObserver(const FrameNodeObserver&) = delete; + FrameNodeObserver& operator=(const FrameNodeObserver&) = delete; + virtual ~FrameNodeObserver(); // Node lifetime notifications. @@ -296,9 +301,6 @@ virtual void OnFirstContentfulPaint( const FrameNode* frame_node, base::TimeDelta time_since_navigation_start) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FrameNodeObserver); }; // Default implementation of observer that provides dummy versions of each @@ -307,6 +309,10 @@ class FrameNode::ObserverDefaultImpl : public FrameNodeObserver { public: ObserverDefaultImpl(); + + ObserverDefaultImpl(const ObserverDefaultImpl&) = delete; + ObserverDefaultImpl& operator=(const ObserverDefaultImpl&) = delete; + ~ObserverDefaultImpl() override; // FrameNodeObserver implementation: @@ -335,9 +341,6 @@ void OnFirstContentfulPaint( const FrameNode* frame_node, base::TimeDelta time_since_navigation_start) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(ObserverDefaultImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/graph.h b/components/performance_manager/public/graph/graph.h index 86b6a092..787f1f0c 100644 --- a/components/performance_manager/public/graph/graph.h +++ b/components/performance_manager/public/graph/graph.h
@@ -45,6 +45,10 @@ using Observer = GraphObserver; Graph(); + + Graph(const Graph&) = delete; + Graph& operator=(const Graph&) = delete; + virtual ~Graph(); // Adds an |observer| on the graph. It is safe for observers to stay @@ -142,8 +146,6 @@ // Retrieves the object with the given |type_id|, returning nullptr if none // exists. Clients must use the GetRegisteredObjectAs wrapper instead. virtual GraphRegistered* GetRegisteredObject(uintptr_t type_id) = 0; - - DISALLOW_COPY_AND_ASSIGN(Graph); }; #if DCHECK_IS_ON() @@ -157,6 +159,10 @@ class GraphObserver { public: GraphObserver(); + + GraphObserver(const GraphObserver&) = delete; + GraphObserver& operator=(const GraphObserver&) = delete; + virtual ~GraphObserver(); // Called before the |graph| associated with this observer disappears. This @@ -166,15 +172,16 @@ // TODO(chrisha): Make this run before the destructor! // crbug.com/966840 virtual void OnBeforeGraphDestroyed(Graph* graph) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(GraphObserver); }; // Helper class for passing ownership of objects to a graph. class GraphOwned { public: GraphOwned(); + + GraphOwned(const GraphOwned&) = delete; + GraphOwned& operator=(const GraphOwned&) = delete; + virtual ~GraphOwned(); // Called when the object is passed into the graph. @@ -183,23 +190,21 @@ // Called when the object is removed from the graph, either via an explicit // call to Graph::TakeFromGraph, or prior to the Graph being destroyed. virtual void OnTakenFromGraph(Graph* graph) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(GraphOwned); }; // A default implementation of GraphOwned. class GraphOwnedDefaultImpl : public GraphOwned { public: GraphOwnedDefaultImpl(); + + GraphOwnedDefaultImpl(const GraphOwnedDefaultImpl&) = delete; + GraphOwnedDefaultImpl& operator=(const GraphOwnedDefaultImpl&) = delete; + ~GraphOwnedDefaultImpl() override; // GraphOwned implementation: void OnPassedToGraph(Graph* graph) override {} void OnTakenFromGraph(Graph* graph) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(GraphOwnedDefaultImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/node.h b/components/performance_manager/public/graph/node.h index b3a95d4..8341d4a 100644 --- a/components/performance_manager/public/graph/node.h +++ b/components/performance_manager/public/graph/node.h
@@ -20,6 +20,10 @@ class Node { public: Node(); + + Node(const Node&) = delete; + Node& operator=(const Node&) = delete; + virtual ~Node(); // Returns the graph to which this node belongs. @@ -33,9 +37,6 @@ // the underlying implementation. virtual uintptr_t GetImplType() const = 0; virtual const void* GetImpl() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(Node); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/node_attached_data.h b/components/performance_manager/public/graph/node_attached_data.h index 51fab9f..1405cef 100644 --- a/components/performance_manager/public/graph/node_attached_data.h +++ b/components/performance_manager/public/graph/node_attached_data.h
@@ -23,14 +23,15 @@ class NodeAttachedData { public: NodeAttachedData(); + + NodeAttachedData(const NodeAttachedData&) = delete; + NodeAttachedData& operator=(const NodeAttachedData&) = delete; + virtual ~NodeAttachedData(); // Returns the 'key' associated with this type of NodeAttachedData. This needs // to be unique per data type or bad things happen. virtual const void* GetKey() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(NodeAttachedData); }; // Implements NodeAttachedData for a given UserDataType. @@ -41,6 +42,11 @@ class ExternalNodeAttachedDataImpl : public NodeAttachedData { public: ExternalNodeAttachedDataImpl() = default; + + ExternalNodeAttachedDataImpl(const ExternalNodeAttachedDataImpl&) = delete; + ExternalNodeAttachedDataImpl& operator=(const ExternalNodeAttachedDataImpl&) = + delete; + ~ExternalNodeAttachedDataImpl() override = default; // NodeAttachedData implementation: @@ -64,8 +70,6 @@ private: static constexpr int kUserDataKey = 0; static const void* UserDataKey() { return &kUserDataKey; } - - DISALLOW_COPY_AND_ASSIGN(ExternalNodeAttachedDataImpl); }; // Everything below this point is pure implementation detail.
diff --git a/components/performance_manager/public/graph/page_node.h b/components/performance_manager/public/graph/page_node.h index e2ec5a553..17fb6fe 100644 --- a/components/performance_manager/public/graph/page_node.h +++ b/components/performance_manager/public/graph/page_node.h
@@ -94,6 +94,10 @@ static const char* ToString(PageNode::PageState page_state); PageNode(); + + PageNode(const PageNode&) = delete; + PageNode& operator=(const PageNode&) = delete; + ~PageNode() override; // Returns the unique ID of the browser context that this page belongs to. @@ -200,9 +204,6 @@ // Returns the current page state. See "PageNodeObserver::OnPageStateChanged". virtual PageState GetPageState() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PageNode); }; // Pure virtual observer interface. Derive from this if you want to be forced to @@ -213,6 +214,10 @@ using EmbeddingType = PageNode::EmbeddingType; PageNodeObserver(); + + PageNodeObserver(const PageNodeObserver&) = delete; + PageNodeObserver& operator=(const PageNodeObserver&) = delete; + virtual ~PageNodeObserver(); // Node lifetime notifications. @@ -297,9 +302,6 @@ virtual void OnFreezingVoteChanged( const PageNode* page_node, absl::optional<freezing::FreezingVote> previous_vote) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PageNodeObserver); }; // Default implementation of observer that provides dummy versions of each @@ -308,6 +310,10 @@ class PageNode::ObserverDefaultImpl : public PageNodeObserver { public: ObserverDefaultImpl(); + + ObserverDefaultImpl(const ObserverDefaultImpl&) = delete; + ObserverDefaultImpl& operator=(const ObserverDefaultImpl&) = delete; + ~ObserverDefaultImpl() override; // PageNodeObserver implementation: @@ -337,9 +343,6 @@ void OnFreezingVoteChanged( const PageNode* page_node, absl::optional<freezing::FreezingVote> previous_vote) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(ObserverDefaultImpl); }; // std::ostream support for PageNode::EmbeddingType.
diff --git a/components/performance_manager/public/graph/process_node.h b/components/performance_manager/public/graph/process_node.h index b270351e..3f452c4 100644 --- a/components/performance_manager/public/graph/process_node.h +++ b/components/performance_manager/public/graph/process_node.h
@@ -56,6 +56,10 @@ base::EnumSet<ContentType, ContentType::kExtension, ContentType::kAd>; ProcessNode(); + + ProcessNode(const ProcessNode&) = delete; + ProcessNode& operator=(const ProcessNode&) = delete; + ~ProcessNode() override; // Returns the type of this process. @@ -126,9 +130,6 @@ // Returns a bit field indicating what type of content this process has // hosted, either currently or in the past. virtual ContentTypes GetHostedContentTypes() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ProcessNode); }; // Pure virtual observer interface. Derive from this if you want to be forced to @@ -136,6 +137,10 @@ class ProcessNodeObserver { public: ProcessNodeObserver(); + + ProcessNodeObserver(const ProcessNodeObserver&) = delete; + ProcessNodeObserver& operator=(const ProcessNodeObserver&) = delete; + virtual ~ProcessNodeObserver(); // Node lifetime notifications. @@ -167,9 +172,6 @@ // Fired when all frames in a process have transitioned to being frozen. virtual void OnAllFramesInProcessFrozen(const ProcessNode* process_node) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ProcessNodeObserver); }; // Default implementation of observer that provides dummy versions of each @@ -178,6 +180,10 @@ class ProcessNode::ObserverDefaultImpl : public ProcessNodeObserver { public: ObserverDefaultImpl(); + + ObserverDefaultImpl(const ObserverDefaultImpl&) = delete; + ObserverDefaultImpl& operator=(const ObserverDefaultImpl&) = delete; + ~ObserverDefaultImpl() override; // ProcessNodeObserver implementation: @@ -188,9 +194,6 @@ void OnPriorityChanged(const ProcessNode* process_node, base::TaskPriority previous_value) override {} void OnAllFramesInProcessFrozen(const ProcessNode* process_node) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(ObserverDefaultImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/system_node.h b/components/performance_manager/public/graph/system_node.h index 707241a4..0ffbc7b 100644 --- a/components/performance_manager/public/graph/system_node.h +++ b/components/performance_manager/public/graph/system_node.h
@@ -22,10 +22,11 @@ class ObserverDefaultImpl; SystemNode(); - ~SystemNode() override; - private: - DISALLOW_COPY_AND_ASSIGN(SystemNode); + SystemNode(const SystemNode&) = delete; + SystemNode& operator=(const SystemNode&) = delete; + + ~SystemNode() override; }; // Pure virtual observer interface. Derive from this if you want to be forced to @@ -33,6 +34,10 @@ class SystemNodeObserver { public: SystemNodeObserver(); + + SystemNodeObserver(const SystemNodeObserver&) = delete; + SystemNodeObserver& operator=(const SystemNodeObserver&) = delete; + virtual ~SystemNodeObserver(); // Called when a new set of process memory metrics is available. @@ -60,9 +65,6 @@ // the response to these notifications should be stateless. virtual void OnMemoryPressure( base::MemoryPressureListener::MemoryPressureLevel new_level) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SystemNodeObserver); }; // Default implementation of observer that provides dummy versions of each @@ -71,6 +73,10 @@ class SystemNode::ObserverDefaultImpl : public SystemNodeObserver { public: ObserverDefaultImpl(); + + ObserverDefaultImpl(const ObserverDefaultImpl&) = delete; + ObserverDefaultImpl& operator=(const ObserverDefaultImpl&) = delete; + ~ObserverDefaultImpl() override; // SystemNodeObserver implementation: @@ -80,9 +86,6 @@ base::MemoryPressureListener::MemoryPressureLevel new_level) override {} void OnMemoryPressure( base::MemoryPressureListener::MemoryPressureLevel new_level) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(ObserverDefaultImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/graph/worker_node.h b/components/performance_manager/public/graph/worker_node.h index 23a275e..2e4b68bb 100644 --- a/components/performance_manager/public/graph/worker_node.h +++ b/components/performance_manager/public/graph/worker_node.h
@@ -62,6 +62,10 @@ class ObserverDefaultImpl; WorkerNode(); + + WorkerNode(const WorkerNode&) = delete; + WorkerNode& operator=(const WorkerNode&) = delete; + ~WorkerNode() override; // Returns the worker type. Note that this is different from the NodeTypeEnum. @@ -113,9 +117,6 @@ // Returns the current priority of the worker, and the reason for the worker // having that particular priority. virtual const PriorityAndReason& GetPriorityAndReason() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WorkerNode); }; // Pure virtual observer interface. Derive from this if you want to be forced to @@ -123,6 +124,10 @@ class WorkerNodeObserver { public: WorkerNodeObserver(); + + WorkerNodeObserver(const WorkerNodeObserver&) = delete; + WorkerNodeObserver& operator=(const WorkerNodeObserver&) = delete; + virtual ~WorkerNodeObserver(); // Node lifetime notifications. @@ -165,9 +170,6 @@ virtual void OnPriorityAndReasonChanged( const WorkerNode* worker_node, const PriorityAndReason& previous_value) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WorkerNodeObserver); }; // Default implementation of observer that provides dummy versions of each @@ -176,6 +178,10 @@ class WorkerNode::ObserverDefaultImpl : public WorkerNodeObserver { public: ObserverDefaultImpl(); + + ObserverDefaultImpl(const ObserverDefaultImpl&) = delete; + ObserverDefaultImpl& operator=(const ObserverDefaultImpl&) = delete; + ~ObserverDefaultImpl() override; // WorkerNodeObserver implementation: @@ -197,9 +203,6 @@ void OnPriorityAndReasonChanged( const WorkerNode* worker_node, const PriorityAndReason& previous_value) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(ObserverDefaultImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/public/persistence/site_data/site_data_reader.h b/components/performance_manager/public/persistence/site_data/site_data_reader.h index 3a26cbe..236559c 100644 --- a/components/performance_manager/public/persistence/site_data/site_data_reader.h +++ b/components/performance_manager/public/persistence/site_data/site_data_reader.h
@@ -23,6 +23,9 @@ class SiteDataReader { public: + SiteDataReader(const SiteDataReader&) = delete; + SiteDataReader& operator=(const SiteDataReader&) = delete; + ~SiteDataReader(); // Accessors for the site characteristics usage. @@ -67,8 +70,6 @@ // Used for invalidating callbacks. base::WeakPtrFactory<SiteDataReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SiteDataReader); }; } // namespace performance_manager
diff --git a/components/performance_manager/render_process_user_data.h b/components/performance_manager/render_process_user_data.h index 1498edf3..570ab7460 100644 --- a/components/performance_manager/render_process_user_data.h +++ b/components/performance_manager/render_process_user_data.h
@@ -35,6 +35,9 @@ content::RenderProcessHost*) = 0; }; + RenderProcessUserData(const RenderProcessUserData&) = delete; + RenderProcessUserData& operator=(const RenderProcessUserData&) = delete; + ~RenderProcessUserData() override; static const void* UserDataKey(); @@ -72,8 +75,6 @@ std::unique_ptr<ProcessNodeImpl> process_node_; DestructionObserver* destruction_observer_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(RenderProcessUserData); }; } // namespace performance_manager
diff --git a/components/performance_manager/tab_helper_frame_node_source.h b/components/performance_manager/tab_helper_frame_node_source.h index f684d268..7fba91d 100644 --- a/components/performance_manager/tab_helper_frame_node_source.h +++ b/components/performance_manager/tab_helper_frame_node_source.h
@@ -20,6 +20,10 @@ public PerformanceManagerTabHelper::Observer { public: TabHelperFrameNodeSource(); + + TabHelperFrameNodeSource(const TabHelperFrameNodeSource&) = delete; + TabHelperFrameNodeSource& operator=(const TabHelperFrameNodeSource&) = delete; + ~TabHelperFrameNodeSource() override; // FrameNodeSource: @@ -65,8 +69,6 @@ base::ScopedMultiSourceObservation<PerformanceManagerTabHelper, PerformanceManagerTabHelper::Observer> performance_manager_tab_helper_observations_; - - DISALLOW_COPY_AND_ASSIGN(TabHelperFrameNodeSource); }; } // namespace performance_manager
diff --git a/components/performance_manager/test_support/graph_test_harness.h b/components/performance_manager/test_support/graph_test_harness.h index c0d65fd..e3f1d56 100644 --- a/components/performance_manager/test_support/graph_test_harness.h +++ b/components/performance_manager/test_support/graph_test_harness.h
@@ -158,6 +158,10 @@ explicit TestNodeWrapper(SystemNodeImpl* impl) : impl_(impl) {} TestNodeWrapper(TestNodeWrapper&& other) : impl_(other.impl_) {} + + TestNodeWrapper(const TestNodeWrapper&) = delete; + TestNodeWrapper& operator=(const TestNodeWrapper&) = delete; + ~TestNodeWrapper() { reset(); } SystemNodeImpl* operator->() const { return impl_; } @@ -167,8 +171,6 @@ private: SystemNodeImpl* impl_; - - DISALLOW_COPY_AND_ASSIGN(TestNodeWrapper); }; class TestGraphImpl : public GraphImpl {
diff --git a/components/performance_manager/v8_memory/v8_detailed_memory_any_seq.cc b/components/performance_manager/v8_memory/v8_detailed_memory_any_seq.cc index 34ca8ca..975f93e 100644 --- a/components/performance_manager/v8_memory/v8_detailed_memory_any_seq.cc +++ b/components/performance_manager/v8_memory/v8_detailed_memory_any_seq.cc
@@ -201,7 +201,6 @@ base::Unretained(&all_frame_data))); sequence_bound_callback.PostTaskWithThisObject( - FROM_HERE, base::BindOnce( [](RenderProcessHostId process_id, const V8DetailedMemoryProcessData& process_data,
diff --git a/components/performance_manager/web_contents_proxy_impl.h b/components/performance_manager/web_contents_proxy_impl.h index db4daa88..714db01 100644 --- a/components/performance_manager/web_contents_proxy_impl.h +++ b/components/performance_manager/web_contents_proxy_impl.h
@@ -25,6 +25,10 @@ class WebContentsProxyImpl { public: WebContentsProxyImpl(); + + WebContentsProxyImpl(const WebContentsProxyImpl&) = delete; + WebContentsProxyImpl& operator=(const WebContentsProxyImpl&) = delete; + virtual ~WebContentsProxyImpl(); // Allows resolving this proxy to the underlying WebContents. This must only @@ -40,9 +44,6 @@ // older or equal to "LastNavigationId". This must only be called on the UI // thread. virtual int64_t LastNewDocNavigationId() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WebContentsProxyImpl); }; } // namespace performance_manager
diff --git a/components/performance_manager/web_contents_proxy_unittest.cc b/components/performance_manager/web_contents_proxy_unittest.cc index 8348fbe..d320430 100644 --- a/components/performance_manager/web_contents_proxy_unittest.cc +++ b/components/performance_manager/web_contents_proxy_unittest.cc
@@ -22,12 +22,13 @@ class WebContentsProxyTest : public PerformanceManagerTestHarness { public: WebContentsProxyTest() {} + + WebContentsProxyTest(const WebContentsProxyTest&) = delete; + WebContentsProxyTest& operator=(const WebContentsProxyTest&) = delete; + ~WebContentsProxyTest() override {} void GetContentsViaProxy(bool delete_before_deref); - - private: - DISALLOW_COPY_AND_ASSIGN(WebContentsProxyTest); }; TEST_F(WebContentsProxyTest, EndToEnd) {
diff --git a/components/performance_manager/worker_watcher.h b/components/performance_manager/worker_watcher.h index a5bdc121..6dda095 100644 --- a/components/performance_manager/worker_watcher.h +++ b/components/performance_manager/worker_watcher.h
@@ -63,6 +63,10 @@ content::ServiceWorkerContext* service_worker_context, ProcessNodeSource* process_node_source, FrameNodeSource* frame_node_source); + + WorkerWatcher(const WorkerWatcher&) = delete; + WorkerWatcher& operator=(const WorkerWatcher&) = delete; + ~WorkerWatcher() override; // Cleans up this instance and ensures shared worker nodes are correctly @@ -274,8 +278,6 @@ base::flat_map<WorkerNodeImpl*, base::flat_set<ServiceWorkerClient>> missing_service_worker_clients_; #endif // DCHECK_IS_ON() - - DISALLOW_COPY_AND_ASSIGN(WorkerWatcher); }; } // namespace performance_manager
diff --git a/components/performance_manager/worker_watcher_unittest.cc b/components/performance_manager/worker_watcher_unittest.cc index a83d4f9..200f8127 100644 --- a/components/performance_manager/worker_watcher_unittest.cc +++ b/components/performance_manager/worker_watcher_unittest.cc
@@ -72,6 +72,11 @@ class TestDedicatedWorkerService : public content::DedicatedWorkerService { public: TestDedicatedWorkerService(); + + TestDedicatedWorkerService(const TestDedicatedWorkerService&) = delete; + TestDedicatedWorkerService& operator=(const TestDedicatedWorkerService&) = + delete; + ~TestDedicatedWorkerService() override; // content::DedicatedWorkerService @@ -93,8 +98,6 @@ // Maps each running worker to its client RenderFrameHost ID. base::flat_map<blink::DedicatedWorkerToken, content::GlobalRenderFrameHostId> dedicated_worker_client_frame_; - - DISALLOW_COPY_AND_ASSIGN(TestDedicatedWorkerService); }; TestDedicatedWorkerService::TestDedicatedWorkerService() = default; @@ -155,6 +158,10 @@ class TestSharedWorkerService : public content::SharedWorkerService { public: TestSharedWorkerService(); + + TestSharedWorkerService(const TestSharedWorkerService&) = delete; + TestSharedWorkerService& operator=(const TestSharedWorkerService&) = delete; + ~TestSharedWorkerService() override; // content::SharedWorkerService @@ -188,8 +195,6 @@ base::flat_map<blink::SharedWorkerToken, base::flat_set<content::GlobalRenderFrameHostId>> shared_worker_client_frames_; - - DISALLOW_COPY_AND_ASSIGN(TestSharedWorkerService); }; TestSharedWorkerService::TestSharedWorkerService() = default; @@ -490,6 +495,10 @@ class TestProcessNodeSource : public ProcessNodeSource { public: TestProcessNodeSource(); + + TestProcessNodeSource(const TestProcessNodeSource&) = delete; + TestProcessNodeSource& operator=(const TestProcessNodeSource&) = delete; + ~TestProcessNodeSource() override; // ProcessNodeSource: @@ -501,8 +510,6 @@ private: // Maps render process IDs with their associated process node. base::flat_map<int, std::unique_ptr<ProcessNodeImpl>> process_node_map_; - - DISALLOW_COPY_AND_ASSIGN(TestProcessNodeSource); }; TestProcessNodeSource::TestProcessNodeSource() = default; @@ -544,6 +551,10 @@ class TestFrameNodeSource : public FrameNodeSource { public: TestFrameNodeSource(); + + TestFrameNodeSource(const TestFrameNodeSource&) = delete; + TestFrameNodeSource& operator=(const TestFrameNodeSource&) = delete; + ~TestFrameNodeSource() override; // FrameNodeSource: @@ -580,8 +591,6 @@ // Maps each observed frame node to their callback. base::flat_map<FrameNodeImpl*, OnbeforeFrameNodeRemovedCallback> frame_node_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(TestFrameNodeSource); }; TestFrameNodeSource::TestFrameNodeSource() @@ -679,6 +688,10 @@ class WorkerWatcherTest : public testing::Test { public: WorkerWatcherTest(); + + WorkerWatcherTest(const WorkerWatcherTest&) = delete; + WorkerWatcherTest& operator=(const WorkerWatcherTest&) = delete; + ~WorkerWatcherTest() override; // testing::Test: @@ -731,8 +744,6 @@ // The WorkerWatcher that's being tested. std::unique_ptr<WorkerWatcher> worker_watcher_; - - DISALLOW_COPY_AND_ASSIGN(WorkerWatcherTest); }; WorkerWatcherTest::WorkerWatcherTest() = default;
diff --git a/components/permissions/android/nfc/mock_nfc_system_level_setting.h b/components/permissions/android/nfc/mock_nfc_system_level_setting.h index 3f32e1f..51751210 100644 --- a/components/permissions/android/nfc/mock_nfc_system_level_setting.h +++ b/components/permissions/android/nfc/mock_nfc_system_level_setting.h
@@ -14,6 +14,11 @@ class MockNfcSystemLevelSetting : public NfcSystemLevelSetting { public: MockNfcSystemLevelSetting(); + + MockNfcSystemLevelSetting(const MockNfcSystemLevelSetting&) = delete; + MockNfcSystemLevelSetting& operator=(const MockNfcSystemLevelSetting&) = + delete; + ~MockNfcSystemLevelSetting() override; static void SetNfcAccessIsPossible(bool is_possible); @@ -27,8 +32,6 @@ void PromptToEnableNfcSystemLevelSetting( content::WebContents* web_contents, base::OnceClosure prompt_completed_callback) override; - - DISALLOW_COPY_AND_ASSIGN(MockNfcSystemLevelSetting); }; } // namespace permissions
diff --git a/components/permissions/android/nfc/nfc_system_level_setting_impl.h b/components/permissions/android/nfc/nfc_system_level_setting_impl.h index 59bdb3e0..5bd65d0 100644 --- a/components/permissions/android/nfc/nfc_system_level_setting_impl.h +++ b/components/permissions/android/nfc/nfc_system_level_setting_impl.h
@@ -15,6 +15,11 @@ class NfcSystemLevelSettingImpl : public NfcSystemLevelSetting { public: NfcSystemLevelSettingImpl(); + + NfcSystemLevelSettingImpl(const NfcSystemLevelSettingImpl&) = delete; + NfcSystemLevelSettingImpl& operator=(const NfcSystemLevelSettingImpl&) = + delete; + ~NfcSystemLevelSettingImpl() override; // NfcSystemLevelSetting implementation: @@ -23,9 +28,6 @@ void PromptToEnableNfcSystemLevelSetting( content::WebContents* web_contents, base::OnceClosure prompt_completed_callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(NfcSystemLevelSettingImpl); }; } // namespace permissions
diff --git a/components/permissions/android/permission_prompt_android.h b/components/permissions/android/permission_prompt_android.h index 7d9c699..69ec549 100644 --- a/components/permissions/android/permission_prompt_android.h +++ b/components/permissions/android/permission_prompt_android.h
@@ -27,6 +27,10 @@ public: PermissionPromptAndroid(content::WebContents* web_contents, Delegate* delegate); + + PermissionPromptAndroid(const PermissionPromptAndroid&) = delete; + PermissionPromptAndroid& operator=(const PermissionPromptAndroid&) = delete; + ~PermissionPromptAndroid() override; // permissions::PermissionPrompt: @@ -66,8 +70,6 @@ infobars::InfoBar* permission_infobar_; base::WeakPtrFactory<PermissionPromptAndroid> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PermissionPromptAndroid); }; } // namespace permissions
diff --git a/components/permissions/chooser_controller.h b/components/permissions/chooser_controller.h index 3e90236..626ca76 100644 --- a/components/permissions/chooser_controller.h +++ b/components/permissions/chooser_controller.h
@@ -22,6 +22,10 @@ class ChooserController { public: explicit ChooserController(std::u16string title); + + ChooserController(const ChooserController&) = delete; + ChooserController& operator=(const ChooserController&) = delete; + virtual ~ChooserController(); // Since the set of options can change while the UI is visible an @@ -174,8 +178,6 @@ private: std::u16string title_; View* view_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ChooserController); }; } // namespace permissions
diff --git a/components/permissions/contexts/geolocation_permission_context.h b/components/permissions/contexts/geolocation_permission_context.h index bbe8af3..9a0c28d 100644 --- a/components/permissions/contexts/geolocation_permission_context.h +++ b/components/permissions/contexts/geolocation_permission_context.h
@@ -61,6 +61,11 @@ GeolocationPermissionContext(content::BrowserContext* browser_context, std::unique_ptr<Delegate> delegate); + + GeolocationPermissionContext(const GeolocationPermissionContext&) = delete; + GeolocationPermissionContext& operator=(const GeolocationPermissionContext&) = + delete; + ~GeolocationPermissionContext() override; void DecidePermission(content::WebContents* web_contents, @@ -89,8 +94,6 @@ mojo::Remote<device::mojom::GeolocationControl> geolocation_control_; base::WeakPtrFactory<GeolocationPermissionContext> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContext); }; } // namespace permissions
diff --git a/components/permissions/contexts/geolocation_permission_context_android.h b/components/permissions/contexts/geolocation_permission_context_android.h index e793c5e2..8bec0e3ad 100644 --- a/components/permissions/contexts/geolocation_permission_context_android.h +++ b/components/permissions/contexts/geolocation_permission_context_android.h
@@ -56,6 +56,12 @@ GeolocationPermissionContextAndroid(content::BrowserContext* browser_context, std::unique_ptr<Delegate> delegate); + + GeolocationPermissionContextAndroid( + const GeolocationPermissionContextAndroid&) = delete; + GeolocationPermissionContextAndroid& operator=( + const GeolocationPermissionContextAndroid&) = delete; + ~GeolocationPermissionContextAndroid() override; static void AddDayOffsetForTesting(int days); @@ -142,8 +148,6 @@ // Must be the last member, to ensure that it will be destroyed first, which // will invalidate weak pointers. base::WeakPtrFactory<GeolocationPermissionContextAndroid> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GeolocationPermissionContextAndroid); }; } // namespace permissions
diff --git a/components/permissions/contexts/payment_handler_permission_context.h b/components/permissions/contexts/payment_handler_permission_context.h index 7a2e134..ec5d63d 100644 --- a/components/permissions/contexts/payment_handler_permission_context.h +++ b/components/permissions/contexts/payment_handler_permission_context.h
@@ -25,6 +25,12 @@ public: explicit PaymentHandlerPermissionContext( content::BrowserContext* browser_context); + + PaymentHandlerPermissionContext(const PaymentHandlerPermissionContext&) = + delete; + PaymentHandlerPermissionContext& operator=( + const PaymentHandlerPermissionContext&) = delete; + ~PaymentHandlerPermissionContext() override; private: @@ -37,8 +43,6 @@ bool user_gesture, permissions::BrowserPermissionCallback callback) override; bool IsRestrictedToSecureOrigins() const override; - - DISALLOW_COPY_AND_ASSIGN(PaymentHandlerPermissionContext); }; } // namespace payments
diff --git a/components/permissions/fake_bluetooth_chooser_controller.h b/components/permissions/fake_bluetooth_chooser_controller.h index c548595..256fe3a 100644 --- a/components/permissions/fake_bluetooth_chooser_controller.h +++ b/components/permissions/fake_bluetooth_chooser_controller.h
@@ -49,6 +49,12 @@ }; explicit FakeBluetoothChooserController(std::vector<FakeDevice> devices = {}); + + FakeBluetoothChooserController(const FakeBluetoothChooserController&) = + delete; + FakeBluetoothChooserController& operator=( + const FakeBluetoothChooserController&) = delete; + ~FakeBluetoothChooserController() override; // ChooserController: @@ -83,8 +89,6 @@ private: std::vector<FakeDevice> devices_; bool table_view_always_disabled_ = false; - - DISALLOW_COPY_AND_ASSIGN(FakeBluetoothChooserController); }; } // namespace permissions
diff --git a/components/permissions/permission_context_base_unittest.cc b/components/permissions/permission_context_base_unittest.cc index 10b16961..8be5eea4 100644 --- a/components/permissions/permission_context_base_unittest.cc +++ b/components/permissions/permission_context_base_unittest.cc
@@ -61,6 +61,9 @@ blink::mojom::PermissionsPolicyFeature::kNotFound), tab_context_updated_(false) {} + TestPermissionContext(const TestPermissionContext&) = delete; + TestPermissionContext& operator=(const TestPermissionContext&) = delete; + ~TestPermissionContext() override {} const std::vector<ContentSetting>& decisions() const { return decisions_; } @@ -139,7 +142,6 @@ // Callback for responding to a permission once the request has been completed // (valid URL, kill switch disabled) base::OnceClosure respond_permission_; - DISALLOW_COPY_AND_ASSIGN(TestPermissionContext); }; class TestKillSwitchPermissionContext : public TestPermissionContext {
diff --git a/components/permissions/permission_manager.cc b/components/permissions/permission_manager.cc index ccafae04..bdb0821 100644 --- a/components/permissions/permission_manager.cc +++ b/components/permissions/permission_manager.cc
@@ -247,6 +247,10 @@ permission_id_(permission_id), request_answered_(false) {} + PermissionResponseCallback(const PermissionResponseCallback&) = delete; + PermissionResponseCallback& operator=(const PermissionResponseCallback&) = + delete; + ~PermissionResponseCallback() { if (!request_answered_ && permission_manager_->pending_requests_.Lookup(request_local_id_)) { @@ -265,8 +269,6 @@ PendingRequestLocalId request_local_id_; int permission_id_; bool request_answered_; - - DISALLOW_COPY_AND_ASSIGN(PermissionResponseCallback); }; struct PermissionManager::Subscription {
diff --git a/components/permissions/permission_manager.h b/components/permissions/permission_manager.h index 6f0faad..0a629c5 100644 --- a/components/permissions/permission_manager.h +++ b/components/permissions/permission_manager.h
@@ -40,6 +40,10 @@ ContentSettingsTypeHash>; PermissionManager(content::BrowserContext* browser_context, PermissionContextMap permission_contexts); + + PermissionManager(const PermissionManager&) = delete; + PermissionManager& operator=(const PermissionManager&) = delete; + ~PermissionManager() override; // Converts from |url|'s actual origin to the "canonical origin" that should @@ -245,8 +249,6 @@ // This is false when not processing a permission change and true otherwise bool is_processing_permission_change_ = false; - - DISALLOW_COPY_AND_ASSIGN(PermissionManager); }; } // namespace permissions
diff --git a/components/permissions/quota_permission_context_impl.cc b/components/permissions/quota_permission_context_impl.cc index 37ed25f..6556f38 100644 --- a/components/permissions/quota_permission_context_impl.cc +++ b/components/permissions/quota_permission_context_impl.cc
@@ -49,6 +49,9 @@ bool is_large_quota_request, content::QuotaPermissionContext::PermissionCallback callback); + QuotaPermissionRequest(const QuotaPermissionRequest&) = delete; + QuotaPermissionRequest& operator=(const QuotaPermissionRequest&) = delete; + ~QuotaPermissionRequest() override; // PermissionRequest: @@ -64,8 +67,6 @@ const scoped_refptr<QuotaPermissionContextImpl> context_; const bool is_large_quota_request_; content::QuotaPermissionContext::PermissionCallback callback_; - - DISALLOW_COPY_AND_ASSIGN(QuotaPermissionRequest); }; QuotaPermissionRequest::QuotaPermissionRequest(
diff --git a/components/permissions/test/mock_permission_prompt_factory.h b/components/permissions/test/mock_permission_prompt_factory.h index a0b4c2ba..941cf935 100644 --- a/components/permissions/test/mock_permission_prompt_factory.h +++ b/components/permissions/test/mock_permission_prompt_factory.h
@@ -29,6 +29,11 @@ class MockPermissionPromptFactory { public: explicit MockPermissionPromptFactory(PermissionRequestManager* manager); + + MockPermissionPromptFactory(const MockPermissionPromptFactory&) = delete; + MockPermissionPromptFactory& operator=(const MockPermissionPromptFactory&) = + delete; + ~MockPermissionPromptFactory(); // Create method called by the PBM to show a bubble. @@ -87,8 +92,6 @@ // The bubble manager that will be associated with this factory. PermissionRequestManager* manager_; - - DISALLOW_COPY_AND_ASSIGN(MockPermissionPromptFactory); }; } // namespace permissions
diff --git a/components/plugins/renderer/plugin_placeholder.h b/components/plugins/renderer/plugin_placeholder.h index d72d99f..e959870 100644 --- a/components/plugins/renderer/plugin_placeholder.h +++ b/components/plugins/renderer/plugin_placeholder.h
@@ -25,6 +25,10 @@ PluginPlaceholderBase(content::RenderFrame* render_frame, const blink::WebPluginParams& params, const std::string& html_data); + + PluginPlaceholderBase(const PluginPlaceholderBase&) = delete; + PluginPlaceholderBase& operator=(const PluginPlaceholderBase&) = delete; + ~PluginPlaceholderBase() override; WebViewPlugin* plugin() { return plugin_; } @@ -55,8 +59,6 @@ WebViewPlugin* plugin_; bool hidden_; - - DISALLOW_COPY_AND_ASSIGN(PluginPlaceholderBase); }; // A basic placeholder that supports only hiding.
diff --git a/components/policy/proto/device_management_backend.proto b/components/policy/proto/device_management_backend.proto index 2ba49f2..6c72a90 100644 --- a/components/policy/proto/device_management_backend.proto +++ b/components/policy/proto/device_management_backend.proto
@@ -3011,6 +3011,7 @@ optional bool dictionary_attack_lockout_in_effect = 8; optional int32 dictionary_attack_lockout_seconds_remaining = 9; optional bool boot_lockbox_finalized = 10; + optional bool owner_password_is_present = 11; } // System state included with some log events.
diff --git a/components/prefs/default_pref_store_unittest.cc b/components/prefs/default_pref_store_unittest.cc index bc40c4ca..a790abe9 100644 --- a/components/prefs/default_pref_store_unittest.cc +++ b/components/prefs/default_pref_store_unittest.cc
@@ -13,6 +13,10 @@ class MockPrefStoreObserver : public PrefStore::Observer { public: explicit MockPrefStoreObserver(DefaultPrefStore* pref_store); + + MockPrefStoreObserver(const MockPrefStoreObserver&) = delete; + MockPrefStoreObserver& operator=(const MockPrefStoreObserver&) = delete; + ~MockPrefStoreObserver() override; int change_count() { @@ -27,8 +31,6 @@ DefaultPrefStore* pref_store_; int change_count_; - - DISALLOW_COPY_AND_ASSIGN(MockPrefStoreObserver); }; MockPrefStoreObserver::MockPrefStoreObserver(DefaultPrefStore* pref_store) @@ -63,4 +65,3 @@ pref_store->ReplaceDefaultValue(kPrefKey, Value("bar")); EXPECT_EQ(1, observer.change_count()); } -
diff --git a/components/prefs/json_pref_store_unittest.cc b/components/prefs/json_pref_store_unittest.cc index 63d42f9..42fbf9e 100644 --- a/components/prefs/json_pref_store_unittest.cc +++ b/components/prefs/json_pref_store_unittest.cc
@@ -66,6 +66,10 @@ public: InterceptingPrefFilter(); InterceptingPrefFilter(OnWriteCallbackPair callback_pair); + + InterceptingPrefFilter(const InterceptingPrefFilter&) = delete; + InterceptingPrefFilter& operator=(const InterceptingPrefFilter&) = delete; + ~InterceptingPrefFilter() override; // PrefFilter implementation: @@ -89,8 +93,6 @@ PostFilterOnLoadCallback post_filter_on_load_callback_; std::unique_ptr<base::DictionaryValue> intercepted_prefs_; OnWriteCallbackPair on_write_callback_pair_; - - DISALLOW_COPY_AND_ASSIGN(InterceptingPrefFilter); }; InterceptingPrefFilter::InterceptingPrefFilter() {}
diff --git a/components/prefs/pref_change_registrar.h b/components/prefs/pref_change_registrar.h index 86b4771..1cc9780 100644 --- a/components/prefs/pref_change_registrar.h +++ b/components/prefs/pref_change_registrar.h
@@ -26,6 +26,10 @@ using NamedChangeCallback = base::RepeatingCallback<void(const std::string&)>; PrefChangeRegistrar(); + + PrefChangeRegistrar(const PrefChangeRegistrar&) = delete; + PrefChangeRegistrar& operator=(const PrefChangeRegistrar&) = delete; + ~PrefChangeRegistrar(); // Must be called before adding or removing observers. Can be called more @@ -74,8 +78,6 @@ ObserverMap observers_; PrefService* service_; - - DISALLOW_COPY_AND_ASSIGN(PrefChangeRegistrar); }; #endif // COMPONENTS_PREFS_PREF_CHANGE_REGISTRAR_H_
diff --git a/components/prefs/pref_member.h b/components/prefs/pref_member.h index 7e310376..68e2aef 100644 --- a/components/prefs/pref_member.h +++ b/components/prefs/pref_member.h
@@ -159,6 +159,10 @@ // Defer initialization to an Init method so it's easy to make this class be // a member variable. PrefMember() {} + + PrefMember(const PrefMember&) = delete; + PrefMember& operator=(const PrefMember&) = delete; + virtual ~PrefMember() {} // Do the actual initialization of the class. Use the two-parameter @@ -286,8 +290,6 @@ void COMPONENTS_PREFS_EXPORT UpdatePref(const ValueType& value); mutable scoped_refptr<Internal> internal_; - - DISALLOW_COPY_AND_ASSIGN(PrefMember); }; // Declaration of template specialization need to be repeated here
diff --git a/components/prefs/pref_notifier_impl.h b/components/prefs/pref_notifier_impl.h index e897751..81c980ba 100644 --- a/components/prefs/pref_notifier_impl.h +++ b/components/prefs/pref_notifier_impl.h
@@ -26,6 +26,10 @@ public: PrefNotifierImpl(); explicit PrefNotifierImpl(PrefService* pref_service); + + PrefNotifierImpl(const PrefNotifierImpl&) = delete; + PrefNotifierImpl& operator=(const PrefNotifierImpl&) = delete; + ~PrefNotifierImpl() override; // If the pref at the given path changes, we call the observer's @@ -80,8 +84,6 @@ PrefObserverList all_prefs_pref_observers_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PrefNotifierImpl); }; #endif // COMPONENTS_PREFS_PREF_NOTIFIER_IMPL_H_
diff --git a/components/prefs/pref_service_factory.h b/components/prefs/pref_service_factory.h index 4e7d9223..37a68cfc 100644 --- a/components/prefs/pref_service_factory.h +++ b/components/prefs/pref_service_factory.h
@@ -25,6 +25,10 @@ class COMPONENTS_PREFS_EXPORT PrefServiceFactory { public: PrefServiceFactory(); + + PrefServiceFactory(const PrefServiceFactory&) = delete; + PrefServiceFactory& operator=(const PrefServiceFactory&) = delete; + virtual ~PrefServiceFactory(); // Functions for setting the various parameters of the PrefService to build. @@ -93,9 +97,6 @@ // Defaults to false. bool async_; - - private: - DISALLOW_COPY_AND_ASSIGN(PrefServiceFactory); }; #endif // COMPONENTS_PREFS_PREF_SERVICE_FACTORY_H_
diff --git a/components/prefs/pref_store_observer_mock.h b/components/prefs/pref_store_observer_mock.h index 01bd6a6..0ba829e5 100644 --- a/components/prefs/pref_store_observer_mock.h +++ b/components/prefs/pref_store_observer_mock.h
@@ -16,6 +16,10 @@ class PrefStoreObserverMock : public PrefStore::Observer { public: PrefStoreObserverMock(); + + PrefStoreObserverMock(const PrefStoreObserverMock&) = delete; + PrefStoreObserverMock& operator=(const PrefStoreObserverMock&) = delete; + ~PrefStoreObserverMock() override; void VerifyAndResetChangedKey(const std::string& expected); @@ -27,9 +31,6 @@ std::vector<std::string> changed_keys; bool initialized; bool initialization_success; // Only valid if |initialized|. - - private: - DISALLOW_COPY_AND_ASSIGN(PrefStoreObserverMock); }; #endif // COMPONENTS_PREFS_PREF_STORE_OBSERVER_MOCK_H_
diff --git a/components/prefs/pref_value_map.h b/components/prefs/pref_value_map.h index 9dc17ed4..044dfacc 100644 --- a/components/prefs/pref_value_map.h +++ b/components/prefs/pref_value_map.h
@@ -26,6 +26,10 @@ using const_iterator = Map::const_iterator; PrefValueMap(); + + PrefValueMap(const PrefValueMap&) = delete; + PrefValueMap& operator=(const PrefValueMap&) = delete; + virtual ~PrefValueMap(); // Gets the value for |key| and stores it in |value|. Ownership remains with @@ -91,8 +95,6 @@ private: Map prefs_; - - DISALLOW_COPY_AND_ASSIGN(PrefValueMap); }; #endif // COMPONENTS_PREFS_PREF_VALUE_MAP_H_
diff --git a/components/prefs/pref_value_store.h b/components/prefs/pref_value_store.h index 7bf7f0d..ee2450c9 100644 --- a/components/prefs/pref_value_store.h +++ b/components/prefs/pref_value_store.h
@@ -111,6 +111,10 @@ PrefStore* default_prefs, PrefNotifier* pref_notifier, std::unique_ptr<Delegate> delegate = nullptr); + + PrefValueStore(const PrefValueStore&) = delete; + PrefValueStore& operator=(const PrefValueStore&) = delete; + virtual ~PrefValueStore(); // Creates a clone of this PrefValueStore with PrefStores overwritten @@ -194,6 +198,10 @@ class PrefStoreKeeper : public PrefStore::Observer { public: PrefStoreKeeper(); + + PrefStoreKeeper(const PrefStoreKeeper&) = delete; + PrefStoreKeeper& operator=(const PrefStoreKeeper&) = delete; + ~PrefStoreKeeper() override; // Takes ownership of |pref_store|. @@ -217,8 +225,6 @@ // Type of the pref store. PrefStoreType type_; - - DISALLOW_COPY_AND_ASSIGN(PrefStoreKeeper); }; typedef std::map<std::string, base::Value::Type> PrefTypeMap; @@ -301,8 +307,6 @@ // Might be null. std::unique_ptr<Delegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(PrefValueStore); }; namespace std {
diff --git a/components/prefs/scoped_user_pref_update.h b/components/prefs/scoped_user_pref_update.h index 7de6bfb..f8348d85 100644 --- a/components/prefs/scoped_user_pref_update.h +++ b/components/prefs/scoped_user_pref_update.h
@@ -71,6 +71,9 @@ ScopedUserPrefUpdate(PrefService* service, const std::string& path) : ScopedUserPrefUpdateBase(service, path) {} + ScopedUserPrefUpdate(const ScopedUserPrefUpdate&) = delete; + ScopedUserPrefUpdate& operator=(const ScopedUserPrefUpdate&) = delete; + // Triggers an update notification if Get() was called. virtual ~ScopedUserPrefUpdate() {} @@ -96,9 +99,6 @@ T* operator->() { return Get(); } - - private: - DISALLOW_COPY_AND_ASSIGN(ScopedUserPrefUpdate); }; typedef ScopedUserPrefUpdate<base::DictionaryValue,
diff --git a/components/prefs/testing_pref_service.h b/components/prefs/testing_pref_service.h index c802869..87cc7ea3 100644 --- a/components/prefs/testing_pref_service.h +++ b/components/prefs/testing_pref_service.h
@@ -26,6 +26,9 @@ template <class SuperPrefService, class ConstructionPrefRegistry> class TestingPrefServiceBase : public SuperPrefService { public: + TestingPrefServiceBase(const TestingPrefServiceBase&) = delete; + TestingPrefServiceBase& operator=(const TestingPrefServiceBase&) = delete; + virtual ~TestingPrefServiceBase(); // Reads the value of a preference from the managed layer. Returns NULL if the @@ -102,8 +105,6 @@ scoped_refptr<TestingPrefStore> extension_prefs_; scoped_refptr<TestingPrefStore> user_prefs_; scoped_refptr<TestingPrefStore> recommended_prefs_; - - DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceBase); }; // Test version of PrefService. @@ -111,6 +112,10 @@ : public TestingPrefServiceBase<PrefService, PrefRegistry> { public: TestingPrefServiceSimple(); + + TestingPrefServiceSimple(const TestingPrefServiceSimple&) = delete; + TestingPrefServiceSimple& operator=(const TestingPrefServiceSimple&) = delete; + ~TestingPrefServiceSimple() override; // This is provided as a convenience for registering preferences on @@ -119,9 +124,6 @@ // it, passing it a PrefRegistry via its constructor (or via // e.g. PrefServiceFactory). PrefRegistrySimple* registry(); - - private: - DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSimple); }; template <>
diff --git a/components/proxy_config/pref_proxy_config_tracker.h b/components/proxy_config/pref_proxy_config_tracker.h index 77e2e36c..4ae58fb 100644 --- a/components/proxy_config/pref_proxy_config_tracker.h +++ b/components/proxy_config/pref_proxy_config_tracker.h
@@ -21,6 +21,10 @@ class PROXY_CONFIG_EXPORT PrefProxyConfigTracker { public: PrefProxyConfigTracker(); + + PrefProxyConfigTracker(const PrefProxyConfigTracker&) = delete; + PrefProxyConfigTracker& operator=(const PrefProxyConfigTracker&) = delete; + virtual ~PrefProxyConfigTracker(); // Creates a net::ProxyConfigService and keeps a pointer to it. After this @@ -38,9 +42,6 @@ // passed to CreateTrackingProxyConfigService. This must be called on the UI // thread. virtual void DetachFromPrefService() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTracker); }; #endif // COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_H_
diff --git a/components/proxy_config/pref_proxy_config_tracker_impl.h b/components/proxy_config/pref_proxy_config_tracker_impl.h index 4e087ca6..3e5c519b 100644 --- a/components/proxy_config/pref_proxy_config_tracker_impl.h +++ b/components/proxy_config/pref_proxy_config_tracker_impl.h
@@ -35,6 +35,10 @@ ProxyConfigServiceImpl(std::unique_ptr<net::ProxyConfigService> base_service, ProxyPrefs::ConfigState initial_config_state, const net::ProxyConfigWithAnnotation& initial_config); + + ProxyConfigServiceImpl(const ProxyConfigServiceImpl&) = delete; + ProxyConfigServiceImpl& operator=(const ProxyConfigServiceImpl&) = delete; + ~ProxyConfigServiceImpl() override; // ProxyConfigService implementation: @@ -72,8 +76,6 @@ bool registered_observer_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); }; // A class that tracks proxy preferences. It translates the configuration @@ -87,6 +89,11 @@ PrefProxyConfigTrackerImpl(PrefService* pref_service, scoped_refptr<base::SingleThreadTaskRunner> proxy_config_service_task_runner); + + PrefProxyConfigTrackerImpl(const PrefProxyConfigTrackerImpl&) = delete; + PrefProxyConfigTrackerImpl& operator=(const PrefProxyConfigTrackerImpl&) = + delete; + ~PrefProxyConfigTrackerImpl() override; // PrefProxyConfigTracker implementation: @@ -177,8 +184,6 @@ scoped_refptr<base::SingleThreadTaskRunner> proxy_config_service_task_runner_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTrackerImpl); }; #endif // COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_
diff --git a/components/proxy_config/proxy_config_dictionary.h b/components/proxy_config/proxy_config_dictionary.h index 3cfee4f..6e8f69c 100644 --- a/components/proxy_config/proxy_config_dictionary.h +++ b/components/proxy_config/proxy_config_dictionary.h
@@ -31,6 +31,10 @@ // Takes ownership of |dict| (|dict| will be moved to |dict_|). explicit ProxyConfigDictionary(base::Value dict); ProxyConfigDictionary(ProxyConfigDictionary&& other); + + ProxyConfigDictionary(const ProxyConfigDictionary&) = delete; + ProxyConfigDictionary& operator=(const ProxyConfigDictionary&) = delete; + ~ProxyConfigDictionary(); bool GetMode(ProxyPrefs::ProxyMode* out) const; @@ -66,8 +70,6 @@ const std::string& bypass_list); base::Value dict_; - - DISALLOW_COPY_AND_ASSIGN(ProxyConfigDictionary); }; #endif // COMPONENTS_PROXY_CONFIG_PROXY_CONFIG_DICTIONARY_H_
diff --git a/components/pwg_encoder/bitmap_image.h b/components/pwg_encoder/bitmap_image.h index d13033b..9ed2520 100644 --- a/components/pwg_encoder/bitmap_image.h +++ b/components/pwg_encoder/bitmap_image.h
@@ -24,6 +24,10 @@ }; BitmapImage(const gfx::Size& size, Colorspace colorspace); + + BitmapImage(const BitmapImage&) = delete; + BitmapImage& operator=(const BitmapImage&) = delete; + ~BitmapImage(); uint8_t channels() const; @@ -39,8 +43,6 @@ gfx::Size size_; Colorspace colorspace_; std::unique_ptr<uint8_t[]> data_; - - DISALLOW_COPY_AND_ASSIGN(BitmapImage); }; } // namespace pwg_encoder
diff --git a/components/qr_code_generator/qr_code_generator.h b/components/qr_code_generator/qr_code_generator.h index deba36d..c3e9bc2 100644 --- a/components/qr_code_generator/qr_code_generator.h +++ b/components/qr_code_generator/qr_code_generator.h
@@ -27,6 +27,10 @@ public: GeneratedCode(); GeneratedCode(GeneratedCode&&); + + GeneratedCode(const GeneratedCode&) = delete; + GeneratedCode& operator=(const GeneratedCode&) = delete; + ~GeneratedCode(); // Pixel data; pointer to an array of bytes, where the least-significant @@ -37,8 +41,6 @@ // Width and height (which are equal) of the generated data, in tiles. int qr_size = 0; - - DISALLOW_COPY_AND_ASSIGN(GeneratedCode); }; // Static parameters for V5 QR codes.
diff --git a/components/query_parser/query_parser.cc b/components/query_parser/query_parser.cc index cbd4d19..642c269 100644 --- a/components/query_parser/query_parser.cc +++ b/components/query_parser/query_parser.cc
@@ -71,6 +71,10 @@ public: explicit QueryNodeWord(const std::u16string& word, MatchingAlgorithm matching_algorithm); + + QueryNodeWord(const QueryNodeWord&) = delete; + QueryNodeWord& operator=(const QueryNodeWord&) = delete; + ~QueryNodeWord() override; const std::u16string& word() const { return word_; } @@ -91,8 +95,6 @@ std::u16string word_; bool literal_; const MatchingAlgorithm matching_algorithm_; - - DISALLOW_COPY_AND_ASSIGN(QueryNodeWord); }; QueryNodeWord::QueryNodeWord(const std::u16string& word, @@ -151,6 +153,10 @@ class QueryNodeList : public QueryNode { public: QueryNodeList(); + + QueryNodeList(const QueryNodeList&) = delete; + QueryNodeList& operator=(const QueryNodeList&) = delete; + ~QueryNodeList() override; QueryNodeVector* children() { return &children_; } @@ -173,9 +179,6 @@ int AppendChildrenToString(std::u16string* query) const; QueryNodeVector children_; - - private: - DISALLOW_COPY_AND_ASSIGN(QueryNodeList); }; QueryNodeList::QueryNodeList() {} @@ -246,6 +249,10 @@ class QueryNodePhrase : public QueryNodeList { public: QueryNodePhrase(); + + QueryNodePhrase(const QueryNodePhrase&) = delete; + QueryNodePhrase& operator=(const QueryNodePhrase&) = delete; + ~QueryNodePhrase() override; // QueryNodeList: @@ -258,7 +265,6 @@ bool MatchesAll(const QueryWordVector& words, const QueryWord** first_word, const QueryWord** last_word) const; - DISALLOW_COPY_AND_ASSIGN(QueryNodePhrase); }; QueryNodePhrase::QueryNodePhrase() {}
diff --git a/components/query_parser/query_parser.h b/components/query_parser/query_parser.h index d6f75305..8286445 100644 --- a/components/query_parser/query_parser.h +++ b/components/query_parser/query_parser.h
@@ -77,6 +77,10 @@ class QueryParser { public: QueryParser() = delete; + + QueryParser(const QueryParser&) = delete; + QueryParser& operator=(const QueryParser&) = delete; + ~QueryParser() = delete; // For CJK ideographs and Korean Hangul, even a single character @@ -142,8 +146,6 @@ static bool ParseQueryImpl(const std::u16string& query, MatchingAlgorithm matching_algorithm, QueryNodeList* root); - - DISALLOW_COPY_AND_ASSIGN(QueryParser); }; } // namespace query_parser
diff --git a/components/query_tiles/android/tile_provider_bridge.h b/components/query_tiles/android/tile_provider_bridge.h index 559acf27..62dfd1e 100644 --- a/components/query_tiles/android/tile_provider_bridge.h +++ b/components/query_tiles/android/tile_provider_bridge.h
@@ -25,6 +25,10 @@ TileService* tile_service); explicit TileProviderBridge(TileService* tile_service); + + TileProviderBridge(const TileProviderBridge&) = delete; + TileProviderBridge& operator=(const TileProviderBridge&) = delete; + ~TileProviderBridge() override; // Methods called from Java via JNI. @@ -43,8 +47,6 @@ // Not owned. TileService* tile_service_; - - DISALLOW_COPY_AND_ASSIGN(TileProviderBridge); }; } // namespace query_tiles
diff --git a/components/quirks/quirks_client.h b/components/quirks/quirks_client.h index 61b291a..d733f36 100644 --- a/components/quirks/quirks_client.h +++ b/components/quirks/quirks_client.h
@@ -32,6 +32,10 @@ const std::string& display_name, RequestFinishedCallback on_request_finished, QuirksManager* manager); + + QuirksClient(const QuirksClient&) = delete; + QuirksClient& operator=(const QuirksClient&) = delete; + ~QuirksClient(); void StartDownload(); @@ -79,8 +83,6 @@ // Factory for callbacks. base::WeakPtrFactory<QuirksClient> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(QuirksClient); }; } // namespace quirks
diff --git a/components/reading_list/core/reading_list_entry.h b/components/reading_list/core/reading_list_entry.h index 98e778af..4451f19 100644 --- a/components/reading_list/core/reading_list_entry.h +++ b/components/reading_list/core/reading_list_entry.h
@@ -64,6 +64,10 @@ const base::Time& now, std::unique_ptr<net::BackoffEntry> backoff); ReadingListEntry(ReadingListEntry&& entry); + + ReadingListEntry(const ReadingListEntry&) = delete; + ReadingListEntry& operator=(const ReadingListEntry&) = delete; + ~ReadingListEntry(); // Entries are created in WAITING state. At some point they will be PROCESSING @@ -231,8 +235,6 @@ int64_t distillation_size_; reading_list::ContentSuggestionsExtra content_suggestions_extra_; - - DISALLOW_COPY_AND_ASSIGN(ReadingListEntry); }; #endif // COMPONENTS_READING_LIST_CORE_READING_LIST_ENTRY_H_
diff --git a/components/reading_list/core/reading_list_model.h b/components/reading_list/core/reading_list_model.h index 47392ee..834d00a 100644 --- a/components/reading_list/core/reading_list_model.h +++ b/components/reading_list/core/reading_list_model.h
@@ -154,6 +154,10 @@ public: explicit ScopedReadingListBatchUpdate(ReadingListModel* model); + ScopedReadingListBatchUpdate(const ScopedReadingListBatchUpdate&) = delete; + ScopedReadingListBatchUpdate& operator=( + const ScopedReadingListBatchUpdate&) = delete; + ~ScopedReadingListBatchUpdate() override; void ReadingListModelLoaded(const ReadingListModel* model) override; @@ -161,8 +165,6 @@ private: ReadingListModel* model_; - - DISALLOW_COPY_AND_ASSIGN(ScopedReadingListBatchUpdate); }; protected:
diff --git a/components/reading_list/core/reading_list_model_impl.h b/components/reading_list/core/reading_list_model_impl.h index 656ec37..326e2ad 100644 --- a/components/reading_list/core/reading_list_model_impl.h +++ b/components/reading_list/core/reading_list_model_impl.h
@@ -40,6 +40,9 @@ syncer::ModelTypeSyncBridge* GetModelTypeSyncBridge() override; + ReadingListModelImpl(const ReadingListModelImpl&) = delete; + ReadingListModelImpl& operator=(const ReadingListModelImpl&) = delete; + ~ReadingListModelImpl() override; void StoreLoaded(std::unique_ptr<ReadingListEntries> entries) override; @@ -108,14 +111,16 @@ public: explicit ScopedReadingListBatchUpdate(ReadingListModelImpl* model); + ScopedReadingListBatchUpdate(const ScopedReadingListBatchUpdate&) = delete; + ScopedReadingListBatchUpdate& operator=( + const ScopedReadingListBatchUpdate&) = delete; + ~ScopedReadingListBatchUpdate() override; void ReadingListModelBeingShutdown(const ReadingListModel* model) override; private: std::unique_ptr<ReadingListModelStorage::ScopedBatchUpdate> storage_token_; - - DISALLOW_COPY_AND_ASSIGN(ScopedReadingListBatchUpdate); }; protected: @@ -159,8 +164,6 @@ bool loaded_; base::WeakPtrFactory<ReadingListModelImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReadingListModelImpl); }; #endif // COMPONENTS_READING_LIST_CORE_READING_LIST_MODEL_IMPL_H_
diff --git a/components/reading_list/core/reading_list_model_storage.h b/components/reading_list/core/reading_list_model_storage.h index 7e48c798..d8fca3e 100644 --- a/components/reading_list/core/reading_list_model_storage.h +++ b/components/reading_list/core/reading_list_model_storage.h
@@ -31,6 +31,10 @@ ReadingListModelStorage( std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + ReadingListModelStorage(const ReadingListModelStorage&) = delete; + ReadingListModelStorage& operator=(const ReadingListModelStorage&) = delete; + ~ReadingListModelStorage() override; // Sets the model the Storage is backing. @@ -60,14 +64,12 @@ class ScopedBatchUpdate { public: ScopedBatchUpdate() {} + + ScopedBatchUpdate(const ScopedBatchUpdate&) = delete; + ScopedBatchUpdate& operator=(const ScopedBatchUpdate&) = delete; + virtual ~ScopedBatchUpdate() {} - - private: - DISALLOW_COPY_AND_ASSIGN(ScopedBatchUpdate); }; - - private: - DISALLOW_COPY_AND_ASSIGN(ReadingListModelStorage); }; #endif // COMPONENTS_READING_LIST_CORE_READING_LIST_MODEL_STORAGE_H_
diff --git a/components/reading_list/core/reading_list_store.h b/components/reading_list/core/reading_list_store.h index d0bb618..27e558a8 100644 --- a/components/reading_list/core/reading_list_store.h +++ b/components/reading_list/core/reading_list_store.h
@@ -27,6 +27,10 @@ ReadingListStore( syncer::OnceModelTypeStoreFactory create_store_callback, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + ReadingListStore(const ReadingListStore&) = delete; + ReadingListStore& operator=(const ReadingListStore&) = delete; + ~ReadingListStore() override; std::unique_ptr<ScopedBatchUpdate> EnsureBatchCreated() override; @@ -134,12 +138,13 @@ public: explicit ScopedBatchUpdate(ReadingListStore* store); + ScopedBatchUpdate(const ScopedBatchUpdate&) = delete; + ScopedBatchUpdate& operator=(const ScopedBatchUpdate&) = delete; + ~ScopedBatchUpdate() override; private: ReadingListStore* store_; - - DISALLOW_COPY_AND_ASSIGN(ScopedBatchUpdate); }; private: @@ -169,8 +174,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ReadingListStore> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ReadingListStore); }; #endif // COMPONENTS_READING_LIST_CORE_READING_LIST_STORE_H_
diff --git a/components/reading_list/ios/favicon_web_state_dispatcher.h b/components/reading_list/ios/favicon_web_state_dispatcher.h index a92217bd..266569b 100644 --- a/components/reading_list/ios/favicon_web_state_dispatcher.h +++ b/components/reading_list/ios/favicon_web_state_dispatcher.h
@@ -17,6 +17,11 @@ class FaviconWebStateDispatcher { public: FaviconWebStateDispatcher() {} + + FaviconWebStateDispatcher(const FaviconWebStateDispatcher&) = delete; + FaviconWebStateDispatcher& operator=(const FaviconWebStateDispatcher&) = + delete; + virtual ~FaviconWebStateDispatcher() {} // Returns a WebState with a Favicon Driver attached. virtual std::unique_ptr<web::WebState> RequestWebState() = 0; @@ -26,9 +31,6 @@ // Releases all the WebState currently retained for favicon fetching. virtual void ReleaseAll() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(FaviconWebStateDispatcher); }; } // namespace reading_list
diff --git a/components/reading_list/ios/reading_list_model_bridge_observer.h b/components/reading_list/ios/reading_list_model_bridge_observer.h index f334d1b..ff22b10f 100644 --- a/components/reading_list/ios/reading_list_model_bridge_observer.h +++ b/components/reading_list/ios/reading_list_model_bridge_observer.h
@@ -50,6 +50,10 @@ public: explicit ReadingListModelBridge(id<ReadingListModelBridgeObserver> observer, ReadingListModel* model); + + ReadingListModelBridge(const ReadingListModelBridge&) = delete; + ReadingListModelBridge& operator=(const ReadingListModelBridge&) = delete; + ~ReadingListModelBridge() override; private: @@ -77,8 +81,6 @@ __unsafe_unretained id<ReadingListModelBridgeObserver> observer_; ReadingListModel* model_; // weak - - DISALLOW_COPY_AND_ASSIGN(ReadingListModelBridge); }; #endif // COMPONENTS_READING_LIST_IOS_READING_LIST_MODEL_BRIDGE_OBSERVER_H_
diff --git a/components/remote_cocoa/app_shim/mouse_capture.h b/components/remote_cocoa/app_shim/mouse_capture.h index 2da74c3..e977a747 100644 --- a/components/remote_cocoa/app_shim/mouse_capture.h +++ b/components/remote_cocoa/app_shim/mouse_capture.h
@@ -24,6 +24,10 @@ class REMOTE_COCOA_APP_SHIM_EXPORT CocoaMouseCapture { public: explicit CocoaMouseCapture(CocoaMouseCaptureDelegate* delegate); + + CocoaMouseCapture(const CocoaMouseCapture&) = delete; + CocoaMouseCapture& operator=(const CocoaMouseCapture&) = delete; + ~CocoaMouseCapture(); // Returns the NSWindow with capture or nil if no window has capture @@ -44,8 +48,6 @@ // The active event tap for this capture. Owned by this, but can be cleared // out early if another instance of CocoaMouseCapture is created. std::unique_ptr<ActiveEventTap> active_handle_; - - DISALLOW_COPY_AND_ASSIGN(CocoaMouseCapture); }; } // namespace remote_cocoa
diff --git a/components/remote_cocoa/app_shim/mouse_capture.mm b/components/remote_cocoa/app_shim/mouse_capture.mm index 7e835d3..ac2bf92 100644 --- a/components/remote_cocoa/app_shim/mouse_capture.mm +++ b/components/remote_cocoa/app_shim/mouse_capture.mm
@@ -20,6 +20,10 @@ class CocoaMouseCapture::ActiveEventTap { public: explicit ActiveEventTap(CocoaMouseCapture* owner); + + ActiveEventTap(const ActiveEventTap&) = delete; + ActiveEventTap& operator=(const ActiveEventTap&) = delete; + ~ActiveEventTap(); // Returns the NSWindow with capture or nil if no window has capture @@ -39,8 +43,6 @@ id local_monitor_; id global_monitor_; ui::WeakPtrNSObjectFactory<CocoaMouseCapture> factory_; - - DISALLOW_COPY_AND_ASSIGN(ActiveEventTap); }; CocoaMouseCapture::ActiveEventTap*
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h index 28fb4822..7bd2273 100644 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h
@@ -84,6 +84,11 @@ NativeWidgetNSWindowHost* host, NativeWidgetNSWindowHostHelper* host_helper, remote_cocoa::mojom::TextInputHost* text_input_host); + + NativeWidgetNSWindowBridge(const NativeWidgetNSWindowBridge&) = delete; + NativeWidgetNSWindowBridge& operator=(const NativeWidgetNSWindowBridge&) = + delete; + ~NativeWidgetNSWindowBridge() override; // Bind |bridge_mojo_receiver_| to |receiver|, and set the connection error @@ -395,7 +400,6 @@ mojo::AssociatedReceiver<remote_cocoa::mojom::NativeWidgetNSWindow> bridge_mojo_receiver_{this}; - DISALLOW_COPY_AND_ASSIGN(NativeWidgetNSWindowBridge); }; } // namespace remote_cocoa
diff --git a/components/remote_cocoa/app_shim/ns_view_ids.h b/components/remote_cocoa/app_shim/ns_view_ids.h index 79d736e..65d2cbfe 100644 --- a/components/remote_cocoa/app_shim/ns_view_ids.h +++ b/components/remote_cocoa/app_shim/ns_view_ids.h
@@ -27,12 +27,15 @@ class REMOTE_COCOA_APP_SHIM_EXPORT ScopedNSViewIdMapping { public: ScopedNSViewIdMapping(uint64_t ns_view_id, NSView* view); + + ScopedNSViewIdMapping(const ScopedNSViewIdMapping&) = delete; + ScopedNSViewIdMapping& operator=(const ScopedNSViewIdMapping&) = delete; + ~ScopedNSViewIdMapping(); private: NSView* const ns_view_; const uint64_t ns_view_id_; - DISALLOW_COPY_AND_ASSIGN(ScopedNSViewIdMapping); }; } // namespace remote_cocoa
diff --git a/components/remote_cocoa/app_shim/select_file_dialog_bridge.h b/components/remote_cocoa/app_shim/select_file_dialog_bridge.h index 99b5180..0e1baf7 100644 --- a/components/remote_cocoa/app_shim/select_file_dialog_bridge.h +++ b/components/remote_cocoa/app_shim/select_file_dialog_bridge.h
@@ -32,6 +32,10 @@ int index)>; SelectFileDialogBridge(NSWindow* owning_window); + + SelectFileDialogBridge(const SelectFileDialogBridge&) = delete; + SelectFileDialogBridge& operator=(const SelectFileDialogBridge&) = delete; + ~SelectFileDialogBridge() override; // mojom::SelectFileDialog: @@ -79,7 +83,6 @@ base::scoped_nsobject<ExtensionDropdownHandler> extension_dropdown_handler_; base::WeakPtrFactory<SelectFileDialogBridge> weak_factory_; - DISALLOW_COPY_AND_ASSIGN(SelectFileDialogBridge); }; } // namespace remote_cocoa
diff --git a/components/remote_cocoa/app_shim/window_move_loop.h b/components/remote_cocoa/app_shim/window_move_loop.h index cb92808c..0887ffa 100644 --- a/components/remote_cocoa/app_shim/window_move_loop.h +++ b/components/remote_cocoa/app_shim/window_move_loop.h
@@ -19,6 +19,10 @@ public: CocoaWindowMoveLoop(NativeWidgetNSWindowBridge* owner, const NSPoint& initial_mouse_in_screen); + + CocoaWindowMoveLoop(const CocoaWindowMoveLoop&) = delete; + CocoaWindowMoveLoop& operator=(const CocoaWindowMoveLoop&) = delete; + ~CocoaWindowMoveLoop(); // Initiates the drag until a mouse up event is observed, or End() is called. @@ -47,8 +51,6 @@ // WeakPtrFactory for event monitor safety. base::WeakPtrFactory<CocoaWindowMoveLoop> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(CocoaWindowMoveLoop); }; } // namespace remote_cocoa
diff --git a/components/renderer_context_menu/context_menu_content_type.h b/components/renderer_context_menu/context_menu_content_type.h index 8459508..6c324b7f 100644 --- a/components/renderer_context_menu/context_menu_content_type.h +++ b/components/renderer_context_menu/context_menu_content_type.h
@@ -19,6 +19,9 @@ // Subclasses can override the behavior of showing/hiding a category. class ContextMenuContentType { public: + ContextMenuContentType(const ContextMenuContentType&) = delete; + ContextMenuContentType& operator=(const ContextMenuContentType&) = delete; + virtual ~ContextMenuContentType(); // Represents a group of menu items. @@ -69,8 +72,6 @@ const content::ContextMenuParams params_; content::WebContents* const source_web_contents_; const bool supports_custom_items_; - - DISALLOW_COPY_AND_ASSIGN(ContextMenuContentType); }; #endif // COMPONENTS_RENDERER_CONTEXT_MENU_CONTEXT_MENU_CONTENT_TYPE_H_
diff --git a/components/renderer_context_menu/context_menu_delegate.h b/components/renderer_context_menu/context_menu_delegate.h index bbb5c25..c68c1d09 100644 --- a/components/renderer_context_menu/context_menu_delegate.h +++ b/components/renderer_context_menu/context_menu_delegate.h
@@ -20,6 +20,10 @@ class ContextMenuDelegate { public: explicit ContextMenuDelegate(content::WebContents* web_contents); + + ContextMenuDelegate(const ContextMenuDelegate&) = delete; + ContextMenuDelegate& operator=(const ContextMenuDelegate&) = delete; + virtual ~ContextMenuDelegate(); static ContextMenuDelegate* FromWebContents( @@ -33,9 +37,6 @@ // Displays the context menu. virtual void ShowMenu(std::unique_ptr<RenderViewContextMenuBase> menu) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ContextMenuDelegate); }; #endif // COMPONENTS_RENDERER_CONTEXT_MENU_CONTEXT_MENU_DELEGATE_H_
diff --git a/components/renderer_context_menu/render_view_context_menu_base.h b/components/renderer_context_menu/render_view_context_menu_base.h index 05195309..2b7d7d98 100644 --- a/components/renderer_context_menu/render_view_context_menu_base.h +++ b/components/renderer_context_menu/render_view_context_menu_base.h
@@ -68,6 +68,10 @@ RenderViewContextMenuBase(content::RenderFrameHost* render_frame_host, const content::ContextMenuParams& params); + RenderViewContextMenuBase(const RenderViewContextMenuBase&) = delete; + RenderViewContextMenuBase& operator=(const RenderViewContextMenuBase&) = + delete; + ~RenderViewContextMenuBase() override; // Displays the menu. @@ -211,8 +215,6 @@ std::unique_ptr<ToolkitDelegate> toolkit_delegate_; std::vector<std::unique_ptr<ui::SimpleMenuModel>> custom_submenus_; - - DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); }; #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_
diff --git a/components/renderer_context_menu/views/toolkit_delegate_views.h b/components/renderer_context_menu/views/toolkit_delegate_views.h index 7996a550..2bf49a3b 100644 --- a/components/renderer_context_menu/views/toolkit_delegate_views.h +++ b/components/renderer_context_menu/views/toolkit_delegate_views.h
@@ -29,6 +29,10 @@ class ToolkitDelegateViews : public RenderViewContextMenuBase::ToolkitDelegate { public: ToolkitDelegateViews(); + + ToolkitDelegateViews(const ToolkitDelegateViews&) = delete; + ToolkitDelegateViews& operator=(const ToolkitDelegateViews&) = delete; + ~ToolkitDelegateViews() override; void RunMenuAt(views::Widget* parent, @@ -50,8 +54,6 @@ // Weak. Owned by menu_runner_; views::MenuItemView* menu_view_; - - DISALLOW_COPY_AND_ASSIGN(ToolkitDelegateViews); }; #endif // COMPONENTS_RENDERER_CONTEXT_MENU_VIEWS_TOOLKIT_DELEGATE_VIEWS_H_
diff --git a/components/reporting/client/report_queue_provider.cc b/components/reporting/client/report_queue_provider.cc index c5605a1..add6639 100644 --- a/components/reporting/client/report_queue_provider.cc +++ b/components/reporting/client/report_queue_provider.cc
@@ -305,11 +305,12 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); StatusOr<ReleaseLeaderCallback> result; if (is_initialized_) { - result = - Status(error::ALREADY_EXISTS, "ReportClient is already configured"); + result = Status(error::ALREADY_EXISTS, + "ReportQueueProvider is already configured"); } else if (has_promoted_initializing_context_) { - result = Status(error::RESOURCE_EXHAUSTED, - "ReportClient already has a lead initializing context."); + result = + Status(error::RESOURCE_EXHAUSTED, + "ReportQueueProvider already has a lead initializing context."); } else { has_promoted_initializing_context_ = true; result = base::BindOnce(
diff --git a/components/rlz/rlz_tracker_delegate.h b/components/rlz/rlz_tracker_delegate.h index 5c89687e..3c8371b 100644 --- a/components/rlz/rlz_tracker_delegate.h +++ b/components/rlz/rlz_tracker_delegate.h
@@ -21,6 +21,10 @@ class RLZTrackerDelegate { public: RLZTrackerDelegate() {} + + RLZTrackerDelegate(const RLZTrackerDelegate&) = delete; + RLZTrackerDelegate& operator=(const RLZTrackerDelegate&) = delete; + virtual ~RLZTrackerDelegate() {} // Invoked during RLZTracker cleanup, to request the cleanup of the delegate. @@ -71,9 +75,6 @@ // Returns true if the existing access point RLZ strings in the data file // should be updated. virtual bool ShouldUpdateExistingAccessPointRlz() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(RLZTrackerDelegate); }; } // namespace rlz
diff --git a/components/rlz/rlz_tracker_unittest.cc b/components/rlz/rlz_tracker_unittest.cc index 03f33496..5501038 100644 --- a/components/rlz/rlz_tracker_unittest.cc +++ b/components/rlz/rlz_tracker_unittest.cc
@@ -174,6 +174,9 @@ TestRLZTracker() : assume_not_ui_thread_(true) { set_tracker(this); } + TestRLZTracker(const TestRLZTracker&) = delete; + TestRLZTracker& operator=(const TestRLZTracker&) = delete; + ~TestRLZTracker() override { set_tracker(nullptr); } bool was_ping_sent_for_brand(const std::string& brand) const { @@ -234,8 +237,6 @@ std::set<std::string> pinged_brands_; bool assume_not_ui_thread_; - - DISALLOW_COPY_AND_ASSIGN(TestRLZTracker); }; class RlzLibTest : public testing::Test {
diff --git a/components/safe_browsing/android/safe_browsing_api_handler_bridge.h b/components/safe_browsing/android/safe_browsing_api_handler_bridge.h index a08186cc..762ee103 100644 --- a/components/safe_browsing/android/safe_browsing_api_handler_bridge.h +++ b/components/safe_browsing/android/safe_browsing_api_handler_bridge.h
@@ -21,6 +21,11 @@ class SafeBrowsingApiHandlerBridge : public SafeBrowsingApiHandler { public: SafeBrowsingApiHandlerBridge(); + + SafeBrowsingApiHandlerBridge(const SafeBrowsingApiHandlerBridge&) = delete; + SafeBrowsingApiHandlerBridge& operator=(const SafeBrowsingApiHandlerBridge&) = + delete; + ~SafeBrowsingApiHandlerBridge() override; // Makes Native->Java call to check the URL against Safe Browsing lists. @@ -48,8 +53,6 @@ // Used as a key to identify unique requests sent to Java to get Safe Browsing // reputation from GmsCore. jlong next_callback_id_ = 0; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingApiHandlerBridge); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/base_blocking_page.h b/components/safe_browsing/content/browser/base_blocking_page.h index bca9f56..95dfd7f 100644 --- a/components/safe_browsing/content/browser/base_blocking_page.h +++ b/components/safe_browsing/content/browser/base_blocking_page.h
@@ -34,6 +34,9 @@ typedef std::unordered_map<content::WebContents*, UnsafeResourceList> UnsafeResourceMap; + BaseBlockingPage(const BaseBlockingPage&) = delete; + BaseBlockingPage& operator=(const BaseBlockingPage&) = delete; + ~BaseBlockingPage() override; static const BaseSafeBrowsingErrorUI::SBErrorDisplayOptions @@ -150,8 +153,6 @@ // For displaying safe browsing interstitial. std::unique_ptr<BaseSafeBrowsingErrorUI> sb_error_ui_; - - DISALLOW_COPY_AND_ASSIGN(BaseBlockingPage); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/browser_url_loader_throttle.h b/components/safe_browsing/content/browser/browser_url_loader_throttle.h index 1cf56b1..ea6a8a851 100644 --- a/components/safe_browsing/content/browser/browser_url_loader_throttle.h +++ b/components/safe_browsing/content/browser/browser_url_loader_throttle.h
@@ -51,6 +51,9 @@ int frame_tree_node_id, base::WeakPtr<RealTimeUrlLookupServiceBase> url_lookup_service); + BrowserURLLoaderThrottle(const BrowserURLLoaderThrottle&) = delete; + BrowserURLLoaderThrottle& operator=(const BrowserURLLoaderThrottle&) = delete; + ~BrowserURLLoaderThrottle() override; // blink::URLLoaderThrottle implementation. @@ -124,8 +127,6 @@ std::unique_ptr<CheckerOnIO> io_checker_; base::WeakPtrFactory<BrowserURLLoaderThrottle> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BrowserURLLoaderThrottle); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/client_side_detection_host.h b/components/safe_browsing/content/browser/client_side_detection_host.h index ab472a1..5bd7b01 100644 --- a/components/safe_browsing/content/browser/client_side_detection_host.h +++ b/components/safe_browsing/content/browser/client_side_detection_host.h
@@ -76,6 +76,9 @@ bool is_off_the_record, const PrimaryAccountSignedIn& account_signed_in_callback); + ClientSideDetectionHost(const ClientSideDetectionHost&) = delete; + ClientSideDetectionHost& operator=(const ClientSideDetectionHost&) = delete; + // The caller keeps ownership of the tab object and is responsible for // ensuring that it stays valid until WebContentsDestroyed is called. ~ClientSideDetectionHost() override; @@ -222,8 +225,6 @@ PrimaryAccountSignedIn account_signed_in_callback_; base::WeakPtrFactory<ClientSideDetectionHost> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionHost); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/client_side_detection_service.h b/components/safe_browsing/content/browser/client_side_detection_service.h index 6090aab..59447e6 100644 --- a/components/safe_browsing/content/browser/client_side_detection_service.h +++ b/components/safe_browsing/content/browser/client_side_detection_service.h
@@ -73,6 +73,11 @@ }; explicit ClientSideDetectionService(std::unique_ptr<Delegate> delegate); + + ClientSideDetectionService(const ClientSideDetectionService&) = delete; + ClientSideDetectionService& operator=(const ClientSideDetectionService&) = + delete; + ~ClientSideDetectionService() override; void Shutdown() override; @@ -256,8 +261,6 @@ // Used to asynchronously call the callbacks for // SendClientReportPhishingRequest. base::WeakPtrFactory<ClientSideDetectionService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ClientSideDetectionService); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/client_side_model_loader.h b/components/safe_browsing/content/browser/client_side_model_loader.h index 9d3d285..6fc716a 100644 --- a/components/safe_browsing/content/browser/client_side_model_loader.h +++ b/components/safe_browsing/content/browser/client_side_model_loader.h
@@ -67,6 +67,10 @@ ModelLoader(base::RepeatingClosure update_renderers, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, bool is_extended_reporting); + + ModelLoader(const ModelLoader&) = delete; + ModelLoader& operator=(const ModelLoader&) = delete; + virtual ~ModelLoader(); void OnURLLoaderComplete(std::unique_ptr<std::string> response_body); @@ -157,7 +161,6 @@ FRIEND_TEST_ALL_PREFIXES(ModelLoaderTest, UpdateRenderersTest); FRIEND_TEST_ALL_PREFIXES(ClientSideDetectionServiceTest, SetEnabledAndRefreshState); - DISALLOW_COPY_AND_ASSIGN(ModelLoader); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/client_side_model_loader_unittest.cc b/components/safe_browsing/content/browser/client_side_model_loader_unittest.cc index fcc2d1e..ee76ad1 100644 --- a/components/safe_browsing/content/browser/client_side_model_loader_unittest.cc +++ b/components/safe_browsing/content/browser/client_side_model_loader_unittest.cc
@@ -52,13 +52,14 @@ const std::string model_name) : ModelLoader(update_renderers_callback, url_loader_factory, model_name) { } + + MockModelLoader(const MockModelLoader&) = delete; + MockModelLoader& operator=(const MockModelLoader&) = delete; + ~MockModelLoader() override {} MOCK_METHOD1(ScheduleFetch, void(int64_t)); MOCK_METHOD2(EndFetch, void(ClientModelStatus, base::TimeDelta)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockModelLoader); }; } // namespace
diff --git a/components/safe_browsing/content/browser/mojo_safe_browsing_impl.cc b/components/safe_browsing/content/browser/mojo_safe_browsing_impl.cc index dc1bed7..0e0b96d 100644 --- a/components/safe_browsing/content/browser/mojo_safe_browsing_impl.cc +++ b/components/safe_browsing/content/browser/mojo_safe_browsing_impl.cc
@@ -66,12 +66,14 @@ public: explicit SafeBrowserUserData(std::unique_ptr<MojoSafeBrowsingImpl> impl) : impl_(std::move(impl)) {} + + SafeBrowserUserData(const SafeBrowserUserData&) = delete; + SafeBrowserUserData& operator=(const SafeBrowserUserData&) = delete; + ~SafeBrowserUserData() override = default; private: std::unique_ptr<MojoSafeBrowsingImpl> impl_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowserUserData); }; } // namespace
diff --git a/components/safe_browsing/content/browser/mojo_safe_browsing_impl.h b/components/safe_browsing/content/browser/mojo_safe_browsing_impl.h index 9fda47f..1f21672b 100644 --- a/components/safe_browsing/content/browser/mojo_safe_browsing_impl.h +++ b/components/safe_browsing/content/browser/mojo_safe_browsing_impl.h
@@ -27,6 +27,9 @@ // disconnected or |resource_context_| is destructed. class MojoSafeBrowsingImpl : public mojom::SafeBrowsing { public: + MojoSafeBrowsingImpl(const MojoSafeBrowsingImpl&) = delete; + MojoSafeBrowsingImpl& operator=(const MojoSafeBrowsingImpl&) = delete; + ~MojoSafeBrowsingImpl() override; static void MaybeCreate( @@ -68,8 +71,6 @@ // Not owned by this object. It is always valid during the lifetime of this // object. content::ResourceContext* resource_context_; - - DISALLOW_COPY_AND_ASSIGN(MojoSafeBrowsingImpl); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/password_protection/mock_password_protection_service.h b/components/safe_browsing/content/browser/password_protection/mock_password_protection_service.h index 20e2ed7fa..0426e099 100644 --- a/components/safe_browsing/content/browser/password_protection/mock_password_protection_service.h +++ b/components/safe_browsing/content/browser/password_protection/mock_password_protection_service.h
@@ -23,6 +23,11 @@ bool is_off_the_record, signin::IdentityManager* identity_manager, bool try_token_fetch); + + MockPasswordProtectionService(const MockPasswordProtectionService&) = delete; + MockPasswordProtectionService& operator=( + const MockPasswordProtectionService&) = delete; + ~MockPasswordProtectionService() override; // safe_browsing::PasswordProtectionService @@ -112,9 +117,6 @@ PasswordType, const std::vector<password_manager::MatchingReusedCredential>&, bool)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockPasswordProtectionService); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/password_protection/password_protection_navigation_throttle.h b/components/safe_browsing/content/browser/password_protection/password_protection_navigation_throttle.h index 868013e..aae9778 100644 --- a/components/safe_browsing/content/browser/password_protection/password_protection_navigation_throttle.h +++ b/components/safe_browsing/content/browser/password_protection/password_protection_navigation_throttle.h
@@ -31,6 +31,12 @@ content::NavigationHandle* navigation_handle, scoped_refptr<PasswordProtectionRequestContent> request, bool is_warning_showing); + + PasswordProtectionNavigationThrottle( + const PasswordProtectionNavigationThrottle&) = delete; + PasswordProtectionNavigationThrottle& operator=( + const PasswordProtectionNavigationThrottle&) = delete; + ~PasswordProtectionNavigationThrottle() override; // content::NavigationThrottle: @@ -51,7 +57,6 @@ private: scoped_refptr<PasswordProtectionRequestContent> request_; bool is_warning_showing_; - DISALLOW_COPY_AND_ASSIGN(PasswordProtectionNavigationThrottle); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_blocking_page.h b/components/safe_browsing/content/browser/safe_browsing_blocking_page.h index 330d02d9..c6485b1 100644 --- a/components/safe_browsing/content/browser/safe_browsing_blocking_page.h +++ b/components/safe_browsing/content/browser/safe_browsing_blocking_page.h
@@ -62,6 +62,9 @@ static const security_interstitials::SecurityInterstitialPage::TypeID kTypeForTesting; + SafeBrowsingBlockingPage(const SafeBrowsingBlockingPage&) = delete; + SafeBrowsingBlockingPage& operator=(const SafeBrowsingBlockingPage&) = delete; + ~SafeBrowsingBlockingPage() override; // SecurityInterstitialPage method: @@ -137,8 +140,6 @@ SafeBrowsingNavigationObserverManager* navigation_observer_manager_ = nullptr; SafeBrowsingMetricsCollector* metrics_collector_ = nullptr; TriggerManager* trigger_manager_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingBlockingPage); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_controller_client.h b/components/safe_browsing/content/browser/safe_browsing_controller_client.h index 775ff24..6638f8f 100644 --- a/components/safe_browsing/content/browser/safe_browsing_controller_client.h +++ b/components/safe_browsing/content/browser/safe_browsing_controller_client.h
@@ -34,14 +34,16 @@ const GURL& default_safe_page, std::unique_ptr<security_interstitials::SettingsPageHelper> settings_page_helper); + + SafeBrowsingControllerClient(const SafeBrowsingControllerClient&) = delete; + SafeBrowsingControllerClient& operator=(const SafeBrowsingControllerClient&) = + delete; + ~SafeBrowsingControllerClient() override; void Proceed() override; void GoBack() override; - - private: - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingControllerClient); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_metrics_collector.h b/components/safe_browsing/content/browser/safe_browsing_metrics_collector.h index d32a7ab..45581f4 100644 --- a/components/safe_browsing/content/browser/safe_browsing_metrics_collector.h +++ b/components/safe_browsing/content/browser/safe_browsing_metrics_collector.h
@@ -86,6 +86,11 @@ }; explicit SafeBrowsingMetricsCollector(PrefService* pref_service_); + + SafeBrowsingMetricsCollector(const SafeBrowsingMetricsCollector&) = delete; + SafeBrowsingMetricsCollector& operator=(const SafeBrowsingMetricsCollector&) = + delete; + ~SafeBrowsingMetricsCollector() override = default; // Checks the last logging time. If the time is longer than a day ago, log @@ -135,8 +140,6 @@ PrefService* pref_service_; PrefChangeRegistrar pref_change_registrar_; base::OneShotTimer metrics_collector_timer_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingMetricsCollector); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_navigation_observer.h b/components/safe_browsing/content/browser/safe_browsing_navigation_observer.h index fa4a18e..4c1d2be 100644 --- a/components/safe_browsing/content/browser/safe_browsing_navigation_observer.h +++ b/components/safe_browsing/content/browser/safe_browsing_navigation_observer.h
@@ -118,6 +118,11 @@ HostContentSettingsMap* host_content_settings_map, SafeBrowsingNavigationObserverManager* observer_manager); + SafeBrowsingNavigationObserver(const SafeBrowsingNavigationObserver&) = + delete; + SafeBrowsingNavigationObserver& operator=( + const SafeBrowsingNavigationObserver&) = delete; + ~SafeBrowsingNavigationObserver() override; void SetObserverManagerForTesting( @@ -184,8 +189,6 @@ content_settings_observation_{this}; SafeBrowsingNavigationObserverManager* observer_manager_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingNavigationObserver); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.h b/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.h index 0ea9de4..477fd55 100644 --- a/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.h +++ b/components/safe_browsing/content/browser/safe_browsing_navigation_observer_manager.h
@@ -177,6 +177,12 @@ static void SanitizeReferrerChain(ReferrerChain* referrer_chain); explicit SafeBrowsingNavigationObserverManager(PrefService* pref_service); + + SafeBrowsingNavigationObserverManager( + const SafeBrowsingNavigationObserverManager&) = delete; + SafeBrowsingNavigationObserverManager& operator=( + const SafeBrowsingNavigationObserverManager&) = delete; + ~SafeBrowsingNavigationObserverManager() override; // Adds |nav_event| to |navigation_event_list_|. Object pointed to by @@ -355,8 +361,6 @@ PrefService* pref_service_; base::OneShotTimer cleanup_timer_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingNavigationObserverManager); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_service_interface.h b/components/safe_browsing/content/browser/safe_browsing_service_interface.h index ffc5ef5..173dc6f 100644 --- a/components/safe_browsing/content/browser/safe_browsing_service_interface.h +++ b/components/safe_browsing/content/browser/safe_browsing_service_interface.h
@@ -69,14 +69,16 @@ class SafeBrowsingServiceFactory { public: SafeBrowsingServiceFactory() {} + + SafeBrowsingServiceFactory(const SafeBrowsingServiceFactory&) = delete; + SafeBrowsingServiceFactory& operator=(const SafeBrowsingServiceFactory&) = + delete; + virtual ~SafeBrowsingServiceFactory() {} // TODO(crbug/925153): Once callers of this function are no longer downcasting // it to the SafeBrowsingService, we can make this a scoped_refptr. virtual SafeBrowsingServiceInterface* CreateSafeBrowsingService() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_subresource_tab_helper.h b/components/safe_browsing/content/browser/safe_browsing_subresource_tab_helper.h index f8bce486..21fb1f4 100644 --- a/components/safe_browsing/content/browser/safe_browsing_subresource_tab_helper.h +++ b/components/safe_browsing/content/browser/safe_browsing_subresource_tab_helper.h
@@ -20,6 +20,11 @@ : public content::WebContentsObserver, public content::WebContentsUserData<SafeBrowsingSubresourceTabHelper> { public: + SafeBrowsingSubresourceTabHelper(const SafeBrowsingSubresourceTabHelper&) = + delete; + SafeBrowsingSubresourceTabHelper& operator=( + const SafeBrowsingSubresourceTabHelper&) = delete; + ~SafeBrowsingSubresourceTabHelper() override; // WebContentsObserver:: @@ -35,7 +40,6 @@ SafeBrowsingUIManager* manager_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingSubresourceTabHelper); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/safe_browsing_tab_observer.h b/components/safe_browsing/content/browser/safe_browsing_tab_observer.h index 27a3dd4fa..858730f2 100644 --- a/components/safe_browsing/content/browser/safe_browsing_tab_observer.h +++ b/components/safe_browsing/content/browser/safe_browsing_tab_observer.h
@@ -52,6 +52,9 @@ CreateClientSideDetectionHost(content::WebContents* web_contents) = 0; }; + SafeBrowsingTabObserver(const SafeBrowsingTabObserver&) = delete; + SafeBrowsingTabObserver& operator=(const SafeBrowsingTabObserver&) = delete; + ~SafeBrowsingTabObserver() override; private: @@ -76,8 +79,6 @@ PrefChangeRegistrar pref_change_registrar_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingTabObserver); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/threat_details.h b/components/safe_browsing/content/browser/threat_details.h index 8cb897001..4f1dc06 100644 --- a/components/safe_browsing/content/browser/threat_details.h +++ b/components/safe_browsing/content/browser/threat_details.h
@@ -74,6 +74,9 @@ public: typedef security_interstitials::UnsafeResource UnsafeResource; + ThreatDetails(const ThreatDetails&) = delete; + ThreatDetails& operator=(const ThreatDetails&) = delete; + ~ThreatDetails() override; // Constructs a new ThreatDetails instance, using the factory. @@ -284,8 +287,6 @@ FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, ThreatDOMDetails_MultipleFrames); FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, ThreatDOMDetails_TrimToAdTags); FRIEND_TEST_ALL_PREFIXES(ThreatDetailsTest, ThreatDOMDetails); - - DISALLOW_COPY_AND_ASSIGN(ThreatDetails); }; // Factory for creating ThreatDetails. Useful for tests.
diff --git a/components/safe_browsing/content/browser/triggers/ad_sampler_trigger.h b/components/safe_browsing/content/browser/triggers/ad_sampler_trigger.h index b42c54c..a8cd82d5 100644 --- a/components/safe_browsing/content/browser/triggers/ad_sampler_trigger.h +++ b/components/safe_browsing/content/browser/triggers/ad_sampler_trigger.h
@@ -61,6 +61,9 @@ class AdSamplerTrigger : public content::WebContentsObserver, public content::WebContentsUserData<AdSamplerTrigger> { public: + AdSamplerTrigger(const AdSamplerTrigger&) = delete; + AdSamplerTrigger& operator=(const AdSamplerTrigger&) = delete; + ~AdSamplerTrigger() override; // content::WebContentsObserver implementation. @@ -119,8 +122,6 @@ base::WeakPtrFactory<AdSamplerTrigger> weak_ptr_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(AdSamplerTrigger); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/triggers/mock_trigger_manager.h b/components/safe_browsing/content/browser/triggers/mock_trigger_manager.h index 706e8cb..cc1232e3a 100644 --- a/components/safe_browsing/content/browser/triggers/mock_trigger_manager.h +++ b/components/safe_browsing/content/browser/triggers/mock_trigger_manager.h
@@ -16,6 +16,10 @@ class MockTriggerManager : public TriggerManager { public: MockTriggerManager(); + + MockTriggerManager(const MockTriggerManager&) = delete; + MockTriggerManager& operator=(const MockTriggerManager&) = delete; + ~MockTriggerManager() override; MOCK_METHOD7( @@ -45,9 +49,6 @@ bool did_proceed, int num_visits, const SBErrorOptions& error_display_options)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockTriggerManager); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/triggers/suspicious_site_trigger.h b/components/safe_browsing/content/browser/triggers/suspicious_site_trigger.h index e5d574f..98b9da7 100644 --- a/components/safe_browsing/content/browser/triggers/suspicious_site_trigger.h +++ b/components/safe_browsing/content/browser/triggers/suspicious_site_trigger.h
@@ -108,6 +108,9 @@ kMaxValue = MONITOR_MODE }; + SuspiciousSiteTrigger(const SuspiciousSiteTrigger&) = delete; + SuspiciousSiteTrigger& operator=(const SuspiciousSiteTrigger&) = delete; + ~SuspiciousSiteTrigger() override; // content::WebContentsObserver implementations. @@ -177,8 +180,6 @@ base::WeakPtrFactory<SuspiciousSiteTrigger> weak_ptr_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SuspiciousSiteTrigger); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/triggers/trigger_manager.h b/components/safe_browsing/content/browser/triggers/trigger_manager.h index 4765555f..41680fb1 100644 --- a/components/safe_browsing/content/browser/triggers/trigger_manager.h +++ b/components/safe_browsing/content/browser/triggers/trigger_manager.h
@@ -38,15 +38,16 @@ struct DataCollectorsContainer { public: DataCollectorsContainer(); + + DataCollectorsContainer(const DataCollectorsContainer&) = delete; + DataCollectorsContainer& operator=(const DataCollectorsContainer&) = delete; + ~DataCollectorsContainer(); // Note: new data collection types should be added below as additional fields. // Collects ThreatDetails which contains resource URLs and partial DOM. std::unique_ptr<ThreatDetails> threat_details; - - private: - DISALLOW_COPY_AND_ASSIGN(DataCollectorsContainer); }; // Stores the data collectors that are active on each WebContents (ie: browser @@ -88,6 +89,10 @@ class TriggerManager { public: TriggerManager(BaseUIManager* ui_manager, PrefService* local_state_prefs); + + TriggerManager(const TriggerManager&) = delete; + TriggerManager& operator=(const TriggerManager&) = delete; + virtual ~TriggerManager(); // Returns a SBErrorDisplayOptions struct containing user state that is @@ -189,7 +194,6 @@ base::WeakPtrFactory<TriggerManager> weak_factory_{this}; // WeakPtrFactory should be last, don't add any members below it. - DISALLOW_COPY_AND_ASSIGN(TriggerManager); }; // A helper class that listens for events happening on a WebContents and can
diff --git a/components/safe_browsing/content/browser/triggers/trigger_manager_unittest.cc b/components/safe_browsing/content/browser/triggers/trigger_manager_unittest.cc index 9705a8e..584e35d2 100644 --- a/components/safe_browsing/content/browser/triggers/trigger_manager_unittest.cc +++ b/components/safe_browsing/content/browser/triggers/trigger_manager_unittest.cc
@@ -29,11 +29,12 @@ class MockThreatDetails : public ThreatDetails { public: MockThreatDetails() {} + + MockThreatDetails(const MockThreatDetails&) = delete; + MockThreatDetails& operator=(const MockThreatDetails&) = delete; + ~MockThreatDetails() override {} MOCK_METHOD2(FinishCollection, void(bool did_proceed, int num_visits)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockThreatDetails); }; class MockThreatDetailsFactory : public ThreatDetailsFactory { @@ -62,6 +63,10 @@ class TriggerManagerTest : public ::testing::Test { public: TriggerManagerTest() : trigger_manager_(nullptr, nullptr) {} + + TriggerManagerTest(const TriggerManagerTest&) = delete; + TriggerManagerTest& operator=(const TriggerManagerTest&) = delete; + ~TriggerManagerTest() override {} void SetUp() override { @@ -155,8 +160,6 @@ content::TestWebContentsFactory web_contents_factory_; TestingPrefServiceSimple pref_service_; std::unique_ptr<base::test::ScopedFeatureList> feature_list_; - - DISALLOW_COPY_AND_ASSIGN(TriggerManagerTest); }; TEST_F(TriggerManagerTest, StartAndFinishCollectingThreatDetails) {
diff --git a/components/safe_browsing/content/browser/triggers/trigger_throttler.h b/components/safe_browsing/content/browser/triggers/trigger_throttler.h index ed263f27..58ca348 100644 --- a/components/safe_browsing/content/browser/triggers/trigger_throttler.h +++ b/components/safe_browsing/content/browser/triggers/trigger_throttler.h
@@ -66,6 +66,10 @@ class TriggerThrottler { public: TriggerThrottler(PrefService* local_state_prefs); + + TriggerThrottler(const TriggerThrottler&) = delete; + TriggerThrottler& operator=(const TriggerThrottler&) = delete; + virtual ~TriggerThrottler(); // Check if the the specified |trigger_type| has quota available and is @@ -113,8 +117,6 @@ // List of trigger types and their quotas, controlled by Finch feature // |kTriggerThrottlerDailyQuotaFeature|. std::vector<TriggerTypeAndQuotaItem> trigger_type_and_quota_list_; - - DISALLOW_COPY_AND_ASSIGN(TriggerThrottler); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/browser/ui_manager_unittest.cc b/components/safe_browsing/content/browser/ui_manager_unittest.cc index ee69f7a..f3afd87c 100644 --- a/components/safe_browsing/content/browser/ui_manager_unittest.cc +++ b/components/safe_browsing/content/browser/ui_manager_unittest.cc
@@ -458,6 +458,12 @@ class SecurityStateWebContentsDelegate : public content::WebContentsDelegate { public: SecurityStateWebContentsDelegate() {} + + SecurityStateWebContentsDelegate(const SecurityStateWebContentsDelegate&) = + delete; + SecurityStateWebContentsDelegate& operator=( + const SecurityStateWebContentsDelegate&) = delete; + ~SecurityStateWebContentsDelegate() override {} bool visible_security_state_changed() const { @@ -475,7 +481,6 @@ private: bool visible_security_state_changed_ = false; - DISALLOW_COPY_AND_ASSIGN(SecurityStateWebContentsDelegate); }; } // namespace
diff --git a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h index cff962a..eb361ee 100644 --- a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h +++ b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.h
@@ -84,6 +84,10 @@ class SafeBrowsingUIHandler : public content::WebUIMessageHandler { public: SafeBrowsingUIHandler(content::BrowserContext* context); + + SafeBrowsingUIHandler(const SafeBrowsingUIHandler&) = delete; + SafeBrowsingUIHandler& operator=(const SafeBrowsingUIHandler&) = delete; + ~SafeBrowsingUIHandler() override; // Callback when Javascript becomes allowed in the WebUI. @@ -274,18 +278,17 @@ static std::vector<SafeBrowsingUIHandler*> webui_list_; base::WeakPtrFactory<SafeBrowsingUIHandler> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUIHandler); }; // The WebUI for chrome://safe-browsing class SafeBrowsingUI : public content::WebUIController { public: explicit SafeBrowsingUI(content::WebUI* web_ui); - ~SafeBrowsingUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUI); + SafeBrowsingUI(const SafeBrowsingUI&) = delete; + SafeBrowsingUI& operator=(const SafeBrowsingUI&) = delete; + + ~SafeBrowsingUI() override; }; class WebUIInfoSingleton : public SafeBrowsingUrlCheckerImpl::WebUIDelegate {
diff --git a/components/safe_browsing/content/common/file_type_policies_unittest.cc b/components/safe_browsing/content/common/file_type_policies_unittest.cc index 26744df..d727342 100644 --- a/components/safe_browsing/content/common/file_type_policies_unittest.cc +++ b/components/safe_browsing/content/common/file_type_policies_unittest.cc
@@ -21,12 +21,13 @@ class MockFileTypePolicies : public FileTypePolicies { public: MockFileTypePolicies() {} + + MockFileTypePolicies(const MockFileTypePolicies&) = delete; + MockFileTypePolicies& operator=(const MockFileTypePolicies&) = delete; + ~MockFileTypePolicies() override {} MOCK_METHOD2(RecordUpdateMetrics, void(UpdateResult, const std::string&)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockFileTypePolicies); }; class FileTypePoliciesTest : public testing::Test {
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/features.h b/components/safe_browsing/content/renderer/phishing_classifier/features.h index 7764e0e..5edaff3 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/features.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/features.h
@@ -38,6 +38,10 @@ class FeatureMap { public: FeatureMap(); + + FeatureMap(const FeatureMap&) = delete; + FeatureMap& operator=(const FeatureMap&) = delete; + ~FeatureMap(); // Adds a boolean feature to a FeatureMap with a value of 1.0. @@ -66,8 +70,6 @@ private: std::unordered_map<std::string, double> features_; - - DISALLOW_COPY_AND_ASSIGN(FeatureMap); }; namespace features {
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.h b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.h index b3e74406..4a63745 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier.h
@@ -60,6 +60,10 @@ // |render_view|. Note that the classifier will not be 'ready' until // set_phishing_scorer() is called. explicit PhishingClassifier(content::RenderFrame* render_frame); + + PhishingClassifier(const PhishingClassifier&) = delete; + PhishingClassifier& operator=(const PhishingClassifier&) = delete; + virtual ~PhishingClassifier(); // Sets a scorer for the classifier to use in computing the phishiness score. @@ -166,8 +170,6 @@ // Used in scheduling BeginFeatureExtraction tasks. // These pointers are invalidated if classification is cancelled. base::WeakPtrFactory<PhishingClassifier> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PhishingClassifier); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier_delegate.h b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier_delegate.h index 45e86b69..510243b 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier_delegate.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_classifier_delegate.h
@@ -47,6 +47,11 @@ // will be used. static PhishingClassifierDelegate* Create(content::RenderFrame* render_frame, PhishingClassifier* classifier); + + PhishingClassifierDelegate(const PhishingClassifierDelegate&) = delete; + PhishingClassifierDelegate& operator=(const PhishingClassifierDelegate&) = + delete; + ~PhishingClassifierDelegate() override; // mojom::PhishingDetector @@ -172,8 +177,6 @@ mojo::ReceiverSet<mojom::PhishingDetector> phishing_detector_receivers_; service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(PhishingClassifierDelegate); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_dom_feature_extractor.h b/components/safe_browsing/content/renderer/phishing_classifier/phishing_dom_feature_extractor.h index c7b767b..9c5c0d3 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_dom_feature_extractor.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_dom_feature_extractor.h
@@ -36,6 +36,11 @@ // Creates a PhishingDOMFeatureExtractor instance. PhishingDOMFeatureExtractor(); + + PhishingDOMFeatureExtractor(const PhishingDOMFeatureExtractor&) = delete; + PhishingDOMFeatureExtractor& operator=(const PhishingDOMFeatureExtractor&) = + delete; + virtual ~PhishingDOMFeatureExtractor(); // Begins extracting features into the given FeatureMap for the page. @@ -138,8 +143,6 @@ // Used in scheduling ExtractFeaturesWithTimeout tasks. // These pointers are invalidated if extraction is cancelled. base::WeakPtrFactory<PhishingDOMFeatureExtractor> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PhishingDOMFeatureExtractor); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_term_feature_extractor.h b/components/safe_browsing/content/renderer/phishing_classifier/phishing_term_feature_extractor.h index 5898385d..cca9d6dc 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_term_feature_extractor.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_term_feature_extractor.h
@@ -63,6 +63,11 @@ uint32_t murmurhash3_seed, size_t max_shingles_per_page, size_t shingle_size); + + PhishingTermFeatureExtractor(const PhishingTermFeatureExtractor&) = delete; + PhishingTermFeatureExtractor& operator=(const PhishingTermFeatureExtractor&) = + delete; + ~PhishingTermFeatureExtractor(); // Begins extracting features from |page_text| into the given FeatureMap. @@ -159,8 +164,6 @@ // Used in scheduling ExtractFeaturesWithTimeout tasks. // These pointers are invalidated if extraction is cancelled. base::WeakPtrFactory<PhishingTermFeatureExtractor> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PhishingTermFeatureExtractor); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_url_feature_extractor.h b/components/safe_browsing/content/renderer/phishing_classifier/phishing_url_feature_extractor.h index 3b86c29..c5d5548 100644 --- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_url_feature_extractor.h +++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_url_feature_extractor.h
@@ -24,6 +24,11 @@ class PhishingUrlFeatureExtractor { public: PhishingUrlFeatureExtractor(); + + PhishingUrlFeatureExtractor(const PhishingUrlFeatureExtractor&) = delete; + PhishingUrlFeatureExtractor& operator=(const PhishingUrlFeatureExtractor&) = + delete; + ~PhishingUrlFeatureExtractor(); // Extracts features for |url| into the given feature map. @@ -41,8 +46,6 @@ static void SplitStringIntoLongAlphanumTokens( const std::string& full, std::vector<std::string>* tokens); - - DISALLOW_COPY_AND_ASSIGN(PhishingUrlFeatureExtractor); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/threat_dom_details.h b/components/safe_browsing/content/renderer/threat_dom_details.h index ee7a68a..1a27945 100644 --- a/components/safe_browsing/content/renderer/threat_dom_details.h +++ b/components/safe_browsing/content/renderer/threat_dom_details.h
@@ -54,6 +54,10 @@ static ThreatDOMDetails* Create(content::RenderFrame* render_frame, service_manager::BinderRegistry* registry); + + ThreatDOMDetails(const ThreatDOMDetails&) = delete; + ThreatDOMDetails& operator=(const ThreatDOMDetails&) = delete; + ~ThreatDOMDetails() override; // Begins extracting resource urls for the page currently loaded in @@ -85,8 +89,6 @@ // A list of tag names and associates attributes, used to determine which // elements need to be collected. std::vector<TagAndAttributesItem> tag_and_attributes_list_; - - DISALLOW_COPY_AND_ASSIGN(ThreatDOMDetails); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/content/renderer/websocket_sb_handshake_throttle.h b/components/safe_browsing/content/renderer/websocket_sb_handshake_throttle.h index 583cc11..464a69c1 100644 --- a/components/safe_browsing/content/renderer/websocket_sb_handshake_throttle.h +++ b/components/safe_browsing/content/renderer/websocket_sb_handshake_throttle.h
@@ -27,6 +27,11 @@ public: WebSocketSBHandshakeThrottle(mojom::SafeBrowsing* safe_browsing, int render_frame_id); + + WebSocketSBHandshakeThrottle(const WebSocketSBHandshakeThrottle&) = delete; + WebSocketSBHandshakeThrottle& operator=(const WebSocketSBHandshakeThrottle&) = + delete; + ~WebSocketSBHandshakeThrottle() override; void ThrottleHandshake(const blink::WebURL& url, @@ -63,8 +68,6 @@ State state_ = State::kInitial; base::WeakPtrFactory<WebSocketSBHandshakeThrottle> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebSocketSBHandshakeThrottle); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/db/database_manager.h b/components/safe_browsing/core/browser/db/database_manager.h index e7b36f80..b45399c 100644 --- a/components/safe_browsing/core/browser/db/database_manager.h +++ b/components/safe_browsing/core/browser/db/database_manager.h
@@ -278,6 +278,10 @@ class SafeBrowsingApiCheck { public: SafeBrowsingApiCheck(const GURL& url, Client* client); + + SafeBrowsingApiCheck(const SafeBrowsingApiCheck&) = delete; + SafeBrowsingApiCheck& operator=(const SafeBrowsingApiCheck&) = delete; + ~SafeBrowsingApiCheck() = default; const GURL& url() const { return url_; } @@ -288,8 +292,6 @@ // Not owned. Client* client_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingApiCheck); }; SafeBrowsingDatabaseManager(
diff --git a/components/safe_browsing/core/browser/db/database_manager_unittest.cc b/components/safe_browsing/core/browser/db/database_manager_unittest.cc index d937b03..3a2dea6e 100644 --- a/components/safe_browsing/core/browser/db/database_manager_unittest.cc +++ b/components/safe_browsing/core/browser/db/database_manager_unittest.cc
@@ -36,6 +36,10 @@ class TestClient : public SafeBrowsingDatabaseManager::Client { public: TestClient() : callback_invoked_(false) {} + + TestClient(const TestClient&) = delete; + TestClient& operator=(const TestClient&) = delete; + ~TestClient() override {} void OnCheckApiBlocklistUrlResult(const GURL& url, @@ -57,7 +61,6 @@ std::set<std::string> blocked_permissions_; bool callback_invoked_; base::RunLoop run_loop_; - DISALLOW_COPY_AND_ASSIGN(TestClient); }; } // namespace
diff --git a/components/safe_browsing/core/browser/db/v4_database.h b/components/safe_browsing/core/browser/db/v4_database.h index 3aef3ce..634bdbf 100644 --- a/components/safe_browsing/core/browser/db/v4_database.h +++ b/components/safe_browsing/core/browser/db/v4_database.h
@@ -122,6 +122,9 @@ // long operation. static void Destroy(std::unique_ptr<V4Database> v4_database); + V4Database(const V4Database&) = delete; + V4Database& operator=(const V4Database&) = delete; + virtual ~V4Database(); // Updates the stores with the response received from the SafeBrowsing service @@ -252,8 +255,6 @@ // Only meant to be dereferenced and invalidated on the IO thread and hence // named. For details, see the comment at the top of weak_ptr.h base::WeakPtrFactory<V4Database> weak_factory_on_io_{this}; - - DISALLOW_COPY_AND_ASSIGN(V4Database); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.cc b/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.cc index a23d7085..2b1bf57 100644 --- a/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.cc +++ b/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.cc
@@ -144,6 +144,12 @@ : public V4GetHashProtocolManagerFactory { public: V4GetHashProtocolManagerFactoryImpl() {} + + V4GetHashProtocolManagerFactoryImpl( + const V4GetHashProtocolManagerFactoryImpl&) = delete; + V4GetHashProtocolManagerFactoryImpl& operator=( + const V4GetHashProtocolManagerFactoryImpl&) = delete; + ~V4GetHashProtocolManagerFactoryImpl() override {} std::unique_ptr<V4GetHashProtocolManager> CreateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, @@ -152,9 +158,6 @@ return base::WrapUnique(new V4GetHashProtocolManager( url_loader_factory, stores_to_check, config)); } - - private: - DISALLOW_COPY_AND_ASSIGN(V4GetHashProtocolManagerFactoryImpl); }; // ----------------------------------------------------------------
diff --git a/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h b/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h index 977d32a..e65c661 100644 --- a/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h +++ b/components/safe_browsing/core/browser/db/v4_get_hash_protocol_manager.h
@@ -152,6 +152,9 @@ using ThreatMetadataForApiCallback = base::OnceCallback<void(const ThreatMetadata& md)>; + V4GetHashProtocolManager(const V4GetHashProtocolManager&) = delete; + V4GetHashProtocolManager& operator=(const V4GetHashProtocolManager&) = delete; + virtual ~V4GetHashProtocolManager(); // Create an instance of the safe browsing v4 protocol manager. @@ -356,22 +359,23 @@ std::vector<ThreatType> threat_types_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(V4GetHashProtocolManager); }; // Interface of a factory to create V4GetHashProtocolManager. Useful for tests. class V4GetHashProtocolManagerFactory { public: V4GetHashProtocolManagerFactory() {} + + V4GetHashProtocolManagerFactory(const V4GetHashProtocolManagerFactory&) = + delete; + V4GetHashProtocolManagerFactory& operator=( + const V4GetHashProtocolManagerFactory&) = delete; + virtual ~V4GetHashProtocolManagerFactory() {} virtual std::unique_ptr<V4GetHashProtocolManager> CreateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const StoresToCheck& stores_to_check, const V4ProtocolConfig& config) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(V4GetHashProtocolManagerFactory); }; #ifndef NDEBUG
diff --git a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc index 758c3b5f..34bc157 100644 --- a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc +++ b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.cc
@@ -99,6 +99,12 @@ : public V4UpdateProtocolManagerFactory { public: V4UpdateProtocolManagerFactoryImpl() {} + + V4UpdateProtocolManagerFactoryImpl( + const V4UpdateProtocolManagerFactoryImpl&) = delete; + V4UpdateProtocolManagerFactoryImpl& operator=( + const V4UpdateProtocolManagerFactoryImpl&) = delete; + ~V4UpdateProtocolManagerFactoryImpl() override {} std::unique_ptr<V4UpdateProtocolManager> CreateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, @@ -110,9 +116,6 @@ new V4UpdateProtocolManager(url_loader_factory, config, update_callback, extended_reporting_level_callback)); } - - private: - DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManagerFactoryImpl); }; // V4UpdateProtocolManager implementation --------------------------------
diff --git a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h index 7db18aaf..bb2ee64 100644 --- a/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h +++ b/components/safe_browsing/core/browser/db/v4_update_protocol_manager.h
@@ -50,6 +50,9 @@ class V4UpdateProtocolManager { public: + V4UpdateProtocolManager(const V4UpdateProtocolManager&) = delete; + V4UpdateProtocolManager& operator=(const V4UpdateProtocolManager&) = delete; + ~V4UpdateProtocolManager(); // Makes the passed |factory| the factory used to instantiate @@ -207,23 +210,24 @@ ExtendedReportingLevelCallback extended_reporting_level_callback_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManager); }; // Interface of a factory to create V4UpdateProtocolManager. Useful for tests. class V4UpdateProtocolManagerFactory { public: V4UpdateProtocolManagerFactory() {} + + V4UpdateProtocolManagerFactory(const V4UpdateProtocolManagerFactory&) = + delete; + V4UpdateProtocolManagerFactory& operator=( + const V4UpdateProtocolManagerFactory&) = delete; + virtual ~V4UpdateProtocolManagerFactory() {} virtual std::unique_ptr<V4UpdateProtocolManager> CreateProtocolManager( scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, const V4ProtocolConfig& config, V4UpdateCallback update_callback, ExtendedReportingLevelCallback extended_reporting_level_callback) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(V4UpdateProtocolManagerFactory); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h index 37a9ae78..0e3c775 100644 --- a/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h +++ b/components/safe_browsing/core/browser/password_protection/password_protection_service_base.h
@@ -71,6 +71,10 @@ signin::IdentityManager* identity_manager, bool try_token_fetch); + PasswordProtectionServiceBase(const PasswordProtectionServiceBase&) = delete; + PasswordProtectionServiceBase& operator=( + const PasswordProtectionServiceBase&) = delete; + ~PasswordProtectionServiceBase() override; base::WeakPtr<PasswordProtectionServiceBase> GetWeakPtr() { @@ -466,7 +470,6 @@ bool try_token_fetch_; base::WeakPtrFactory<PasswordProtectionServiceBase> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(PasswordProtectionServiceBase); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/ping_manager.h b/components/safe_browsing/core/browser/ping_manager.h index 5923941..e7845bcc 100644 --- a/components/safe_browsing/core/browser/ping_manager.h +++ b/components/safe_browsing/core/browser/ping_manager.h
@@ -28,6 +28,9 @@ class PingManager { public: + PingManager(const PingManager&) = delete; + PingManager& operator=(const PingManager&) = delete; + virtual ~PingManager(); // Create an instance of the safe browsing ping manager. @@ -75,8 +78,6 @@ // Track outstanding SafeBrowsing report fetchers for clean up. // We add both "hit" and "detail" fetchers in this set. Reports safebrowsing_reports_; - - DISALLOW_COPY_AND_ASSIGN(PingManager); }; } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/realtime/url_lookup_service.h b/components/safe_browsing/core/browser/realtime/url_lookup_service.h index 1321e518..25dcc05 100644 --- a/components/safe_browsing/core/browser/realtime/url_lookup_service.h +++ b/components/safe_browsing/core/browser/realtime/url_lookup_service.h
@@ -65,6 +65,10 @@ bool is_off_the_record, variations::VariationsService* variations_service, ReferrerChainProvider* referrer_chain_provider); + + RealTimeUrlLookupService(const RealTimeUrlLookupService&) = delete; + RealTimeUrlLookupService& operator=(const RealTimeUrlLookupService&) = delete; + ~RealTimeUrlLookupService() override; // RealTimeUrlLookupServiceBase: @@ -136,8 +140,6 @@ base::WeakPtrFactory<RealTimeUrlLookupService> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(RealTimeUrlLookupService); - }; // class RealTimeUrlLookupService } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc index 4570471a..94418118 100644 --- a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc +++ b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.cc
@@ -498,6 +498,11 @@ } *request->mutable_population() = get_user_population_callback_.Run(); + RecordBooleanWithAndWithoutSuffix( + "SafeBrowsing.RT.IsPopulationMbbOrEsb", GetMetricSuffix(), + request->population().is_mbb_enabled() || + request->population().user_population() == + ChromeUserPopulation::ENHANCED_PROTECTION); if (CanAttachReferrerChain() && referrer_chain_provider_) { referrer_chain_provider_->IdentifyReferrerChainByPendingEventURL(
diff --git a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.h b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.h index 1b85cbf..c43541a 100644 --- a/components/safe_browsing/core/browser/realtime/url_lookup_service_base.h +++ b/components/safe_browsing/core/browser/realtime/url_lookup_service_base.h
@@ -55,6 +55,11 @@ base::RepeatingCallback<ChromeUserPopulation()> get_user_population_callback, ReferrerChainProvider* referrer_chain_provider); + + RealTimeUrlLookupServiceBase(const RealTimeUrlLookupServiceBase&) = delete; + RealTimeUrlLookupServiceBase& operator=(const RealTimeUrlLookupServiceBase&) = + delete; + ~RealTimeUrlLookupServiceBase() override; // Returns true if |url|'s scheme can be checked. @@ -261,8 +266,6 @@ base::WeakPtrFactory<RealTimeUrlLookupServiceBase> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(RealTimeUrlLookupServiceBase); - }; // class RealTimeUrlLookupServiceBase } // namespace safe_browsing
diff --git a/components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h b/components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h index 6674f52..e9494b4 100644 --- a/components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h +++ b/components/safe_browsing/core/browser/safe_browsing_url_checker_impl.h
@@ -123,6 +123,10 @@ scoped_refptr<base::SequencedTaskRunner> ui_task_runner, base::WeakPtr<RealTimeUrlLookupServiceBase> url_lookup_service_on_ui); + SafeBrowsingUrlCheckerImpl(const SafeBrowsingUrlCheckerImpl&) = delete; + SafeBrowsingUrlCheckerImpl& operator=(const SafeBrowsingUrlCheckerImpl&) = + delete; + ~SafeBrowsingUrlCheckerImpl() override; // mojom::SafeBrowsingUrlChecker implementation. @@ -333,8 +337,6 @@ WebUIDelegate* webui_delegate_ = nullptr; base::WeakPtrFactory<SafeBrowsingUrlCheckerImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingUrlCheckerImpl); }; } // namespace safe_browsing
diff --git a/components/safe_search_api/fake_url_checker_client.h b/components/safe_search_api/fake_url_checker_client.h index 36a9857..93625fb 100644 --- a/components/safe_search_api/fake_url_checker_client.h +++ b/components/safe_search_api/fake_url_checker_client.h
@@ -16,6 +16,10 @@ class FakeURLCheckerClient : public URLCheckerClient { public: FakeURLCheckerClient(); + + FakeURLCheckerClient(const FakeURLCheckerClient&) = delete; + FakeURLCheckerClient& operator=(const FakeURLCheckerClient&) = delete; + ~FakeURLCheckerClient() override; // Fake override that simply holds references of |url| and |callback|. @@ -33,8 +37,6 @@ private: ClientCheckCallback callback_; GURL url_; - - DISALLOW_COPY_AND_ASSIGN(FakeURLCheckerClient); }; } // namespace safe_search_api
diff --git a/components/safe_search_api/safe_search/safe_search_url_checker_client.h b/components/safe_search_api/safe_search/safe_search_url_checker_client.h index d22a517..a1115cda 100644 --- a/components/safe_search_api/safe_search/safe_search_url_checker_client.h +++ b/components/safe_search_api/safe_search/safe_search_url_checker_client.h
@@ -31,6 +31,10 @@ const net::NetworkTrafficAnnotationTag& traffic_annotation, const std::string& api_key = google_apis::GetAPIKey()); + SafeSearchURLCheckerClient(const SafeSearchURLCheckerClient&) = delete; + SafeSearchURLCheckerClient& operator=(const SafeSearchURLCheckerClient&) = + delete; + ~SafeSearchURLCheckerClient() override; // Checks whether an |url| is restricted according to SafeSearch. @@ -52,8 +56,6 @@ const std::string api_key_; CheckList checks_in_progress_; - - DISALLOW_COPY_AND_ASSIGN(SafeSearchURLCheckerClient); }; } // namespace safe_search_api
diff --git a/components/safe_search_api/stub_url_checker.h b/components/safe_search_api/stub_url_checker.h index 10ec2a1..ebc5687 100644 --- a/components/safe_search_api/stub_url_checker.h +++ b/components/safe_search_api/stub_url_checker.h
@@ -29,6 +29,10 @@ class StubURLChecker { public: StubURLChecker(); + + StubURLChecker(const StubURLChecker&) = delete; + StubURLChecker& operator=(const StubURLChecker&) = delete; + ~StubURLChecker(); // Returns a URLChecker that will use the stubbed-out responses. Can be called @@ -51,8 +55,6 @@ network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(StubURLChecker); }; } // namespace safe_search_api
diff --git a/components/safe_search_api/url_checker.h b/components/safe_search_api/url_checker.h index 20341f0..004e0053 100644 --- a/components/safe_search_api/url_checker.h +++ b/components/safe_search_api/url_checker.h
@@ -43,6 +43,9 @@ URLChecker(std::unique_ptr<URLCheckerClient> async_checker, size_t cache_size); + URLChecker(const URLChecker&) = delete; + URLChecker& operator=(const URLChecker&) = delete; + ~URLChecker(); // Returns whether |callback| was run synchronously. @@ -73,8 +76,6 @@ base::TimeDelta cache_timeout_; base::WeakPtrFactory<URLChecker> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(URLChecker); }; } // namespace safe_search_api
diff --git a/components/scheduling_metrics/thread_metrics.h b/components/scheduling_metrics/thread_metrics.h index b3fa096..525d73e 100644 --- a/components/scheduling_metrics/thread_metrics.h +++ b/components/scheduling_metrics/thread_metrics.h
@@ -20,6 +20,10 @@ class COMPONENT_EXPORT(SCHEDULING_METRICS) ThreadMetrics { public: ThreadMetrics(ThreadType thread_type, bool has_cpu_timing_for_each_task); + + ThreadMetrics(const ThreadMetrics&) = delete; + ThreadMetrics& operator=(const ThreadMetrics&) = delete; + ~ThreadMetrics(); bool ShouldDiscardTask( @@ -42,8 +46,6 @@ TaskDurationMetricReporter<ThreadType> thread_task_cpu_duration_reporter_; TaskDurationMetricReporter<ThreadType> tracked_cpu_duration_reporter_; TaskDurationMetricReporter<ThreadType> non_tracked_cpu_duration_reporter_; - - DISALLOW_COPY_AND_ASSIGN(ThreadMetrics); }; } // namespace scheduling_metrics
diff --git a/components/search_engines/android/template_url_service_android.h b/components/search_engines/android/template_url_service_android.h index 928c3bd7..252ac0a 100644 --- a/components/search_engines/android/template_url_service_android.h +++ b/components/search_engines/android/template_url_service_android.h
@@ -16,6 +16,11 @@ class TemplateUrlServiceAndroid : public TemplateURLServiceObserver { public: explicit TemplateUrlServiceAndroid(TemplateURLService* template_url_service); + + TemplateUrlServiceAndroid(const TemplateUrlServiceAndroid&) = delete; + TemplateUrlServiceAndroid& operator=(const TemplateUrlServiceAndroid&) = + delete; + ~TemplateUrlServiceAndroid() override; base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); @@ -121,8 +126,6 @@ TemplateURLService* template_url_service_; base::CallbackListSubscription template_url_subscription_; - - DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); }; #endif // COMPONENTS_SEARCH_ENGINES_ANDROID_TEMPLATE_URL_SERVICE_ANDROID_H_
diff --git a/components/search_engines/default_search_manager.h b/components/search_engines/default_search_manager.h index 86996ac..9a7d015 100644 --- a/components/search_engines/default_search_manager.h +++ b/components/search_engines/default_search_manager.h
@@ -83,6 +83,9 @@ DefaultSearchManager(PrefService* pref_service, const ObserverCallback& change_observer); + DefaultSearchManager(const DefaultSearchManager&) = delete; + DefaultSearchManager& operator=(const DefaultSearchManager&) = delete; + ~DefaultSearchManager(); // Register prefs needed for tracking the default search provider. @@ -169,8 +172,6 @@ // True if the default search is currently enforced by policy. bool default_search_controlled_by_policy_; - - DISALLOW_COPY_AND_ASSIGN(DefaultSearchManager); }; #endif // COMPONENTS_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_
diff --git a/components/search_engines/default_search_policy_handler.h b/components/search_engines/default_search_policy_handler.h index b236b80e..b28ff29 100644 --- a/components/search_engines/default_search_policy_handler.h +++ b/components/search_engines/default_search_policy_handler.h
@@ -16,6 +16,11 @@ class DefaultSearchPolicyHandler : public ConfigurationPolicyHandler { public: DefaultSearchPolicyHandler(); + + DefaultSearchPolicyHandler(const DefaultSearchPolicyHandler&) = delete; + DefaultSearchPolicyHandler& operator=(const DefaultSearchPolicyHandler&) = + delete; + ~DefaultSearchPolicyHandler() override; // ConfigurationPolicyHandler methods: @@ -56,8 +61,6 @@ // Make sure that the |path| is present in |prefs_| and is a ListValue. If // not, set it to an empty list. void EnsureListPrefExists(PrefValueMap* prefs, const std::string& path); - - DISALLOW_COPY_AND_ASSIGN(DefaultSearchPolicyHandler); }; } // namespace policy
diff --git a/components/search_engines/keyword_table.h b/components/search_engines/keyword_table.h index d564fcb..08309e4a 100644 --- a/components/search_engines/keyword_table.h +++ b/components/search_engines/keyword_table.h
@@ -94,6 +94,10 @@ static const char kDefaultSearchProviderKey[]; KeywordTable(); + + KeywordTable(const KeywordTable&) = delete; + KeywordTable& operator=(const KeywordTable&) = delete; + ~KeywordTable() override; // Retrieves the KeywordTable* owned by |database|. @@ -168,8 +172,6 @@ bool GetKeywordAsString(TemplateURLID id, const std::string& table_name, std::string* result); - - DISALLOW_COPY_AND_ASSIGN(KeywordTable); }; #endif // COMPONENTS_SEARCH_ENGINES_KEYWORD_TABLE_H_
diff --git a/components/search_engines/keyword_table_unittest.cc b/components/search_engines/keyword_table_unittest.cc index b2357062..8d2ca00 100644 --- a/components/search_engines/keyword_table_unittest.cc +++ b/components/search_engines/keyword_table_unittest.cc
@@ -24,6 +24,10 @@ class KeywordTableTest : public testing::Test { public: KeywordTableTest() {} + + KeywordTableTest(const KeywordTableTest&) = delete; + KeywordTableTest& operator=(const KeywordTableTest&) = delete; + ~KeywordTableTest() override {} protected: @@ -104,8 +108,6 @@ base::ScopedTempDir temp_dir_; std::unique_ptr<KeywordTable> table_; std::unique_ptr<WebDatabase> db_; - - DISALLOW_COPY_AND_ASSIGN(KeywordTableTest); };
diff --git a/components/search_engines/keyword_web_data_service.h b/components/search_engines/keyword_web_data_service.h index 4cd1408..221620d 100644 --- a/components/search_engines/keyword_web_data_service.h +++ b/components/search_engines/keyword_web_data_service.h
@@ -54,12 +54,14 @@ class BatchModeScoper { public: explicit BatchModeScoper(KeywordWebDataService* service); + + BatchModeScoper(const BatchModeScoper&) = delete; + BatchModeScoper& operator=(const BatchModeScoper&) = delete; + ~BatchModeScoper(); private: KeywordWebDataService* service_; - - DISALLOW_COPY_AND_ASSIGN(BatchModeScoper); }; KeywordWebDataService(
diff --git a/components/search_engines/search_host_to_urls_map.h b/components/search_engines/search_host_to_urls_map.h index dbf86b8..c9c75c3 100644 --- a/components/search_engines/search_host_to_urls_map.h +++ b/components/search_engines/search_host_to_urls_map.h
@@ -22,6 +22,10 @@ using TemplateURLSet = base::flat_set<TemplateURL*>; SearchHostToURLsMap(); + + SearchHostToURLsMap(const SearchHostToURLsMap&) = delete; + SearchHostToURLsMap& operator=(const SearchHostToURLsMap&) = delete; + ~SearchHostToURLsMap(); // Initializes the map. @@ -61,8 +65,6 @@ // Has Init been called? bool initialized_; - - DISALLOW_COPY_AND_ASSIGN(SearchHostToURLsMap); }; #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_HOST_TO_URLS_MAP_H_
diff --git a/components/search_engines/search_terms_data.h b/components/search_engines/search_terms_data.h index 7ac4858..ae6b64f 100644 --- a/components/search_engines/search_terms_data.h +++ b/components/search_engines/search_terms_data.h
@@ -15,6 +15,10 @@ class SearchTermsData { public: SearchTermsData(); + + SearchTermsData(const SearchTermsData&) = delete; + SearchTermsData& operator=(const SearchTermsData&) = delete; + virtual ~SearchTermsData(); // Returns the value to use for replacements of type GOOGLE_BASE_URL. This @@ -68,9 +72,6 @@ // Estimates dynamic memory usage. // See base/trace_event/memory_usage_estimator.h for more info. virtual size_t EstimateMemoryUsage() const; - - private: - DISALLOW_COPY_AND_ASSIGN(SearchTermsData); }; #endif // COMPONENTS_SEARCH_ENGINES_SEARCH_TERMS_DATA_H_
diff --git a/components/search_engines/template_url.h b/components/search_engines/template_url.h index 9c681d8..e6dd6976 100644 --- a/components/search_engines/template_url.h +++ b/components/search_engines/template_url.h
@@ -631,6 +631,9 @@ base::Time install_time, bool wants_to_be_default_engine); + TemplateURL(const TemplateURL&) = delete; + TemplateURL& operator=(const TemplateURL&) = delete; + ~TemplateURL(); // For two engines with the same keyword, |this| and |other|, @@ -877,8 +880,6 @@ mutable SearchEngineType engine_type_; // TODO(sky): Add date last parsed OSD file. - - DISALLOW_COPY_AND_ASSIGN(TemplateURL); }; #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_H_
diff --git a/components/search_engines/template_url_fetcher.h b/components/search_engines/template_url_fetcher.h index 2a230aa..d702c789 100644 --- a/components/search_engines/template_url_fetcher.h +++ b/components/search_engines/template_url_fetcher.h
@@ -35,6 +35,10 @@ public: // Creates a TemplateURLFetcher. explicit TemplateURLFetcher(TemplateURLService* template_url_service); + + TemplateURLFetcher(const TemplateURLFetcher&) = delete; + TemplateURLFetcher& operator=(const TemplateURLFetcher&) = delete; + ~TemplateURLFetcher() override; // If TemplateURLFetcher is not already downloading the OSDD for osdd_url, @@ -71,8 +75,6 @@ // In progress requests. std::vector<std::unique_ptr<RequestDelegate>> requests_; - - DISALLOW_COPY_AND_ASSIGN(TemplateURLFetcher); }; #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_FETCHER_H_
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc index c00c34c..a3e8d69 100644 --- a/components/search_engines/template_url_service.cc +++ b/components/search_engines/template_url_service.cc
@@ -246,6 +246,9 @@ ++service_->outstanding_scoper_handles_; } + Scoper(const Scoper&) = delete; + Scoper& operator=(const Scoper&) = delete; + // When a Scoper is destroyed, the handle count is updated. If the handle // count is at zero, notify the observers that the model has changed if // service is loaded and model was mutated. @@ -268,8 +271,6 @@ private: std::unique_ptr<KeywordWebDataService::BatchModeScoper> batch_mode_scoper_; TemplateURLService* service_; - - DISALLOW_COPY_AND_ASSIGN(Scoper); }; // TemplateURLService ---------------------------------------------------------
diff --git a/components/search_engines/template_url_service.h b/components/search_engines/template_url_service.h index 21557e6..d7690e0 100644 --- a/components/search_engines/template_url_service.h +++ b/components/search_engines/template_url_service.h
@@ -127,6 +127,10 @@ const base::RepeatingClosure& dsp_change_callback); // The following is for testing. TemplateURLService(const Initializer* initializers, const int count); + + TemplateURLService(const TemplateURLService&) = delete; + TemplateURLService& operator=(const TemplateURLService&) = delete; + ~TemplateURLService() override; // Log a SearchTemplateURLEvent. @@ -831,8 +835,6 @@ // android. std::unique_ptr<TemplateUrlServiceAndroid> template_url_service_android_; #endif - - DISALLOW_COPY_AND_ASSIGN(TemplateURLService); }; #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_
diff --git a/components/search_engines/testing_search_terms_data.h b/components/search_engines/testing_search_terms_data.h index 9563cef..bb9d0b2 100644 --- a/components/search_engines/testing_search_terms_data.h +++ b/components/search_engines/testing_search_terms_data.h
@@ -11,6 +11,10 @@ class TestingSearchTermsData : public SearchTermsData { public: explicit TestingSearchTermsData(const std::string& google_base_url); + + TestingSearchTermsData(const TestingSearchTermsData&) = delete; + TestingSearchTermsData& operator=(const TestingSearchTermsData&) = delete; + ~TestingSearchTermsData() override; std::string GoogleBaseURLValue() const override; @@ -37,8 +41,6 @@ std::string google_base_url_; std::string search_client_; std::string suggest_client_; - - DISALLOW_COPY_AND_ASSIGN(TestingSearchTermsData); }; #endif // COMPONENTS_SEARCH_ENGINES_TESTING_SEARCH_TERMS_DATA_H_
diff --git a/components/search_provider_logos/logo_cache.h b/components/search_provider_logos/logo_cache.h index 2310b0d..826490a 100644 --- a/components/search_provider_logos/logo_cache.h +++ b/components/search_provider_logos/logo_cache.h
@@ -38,6 +38,10 @@ // Constructs a logo cache that stores data in |cache_directory|. // |cache_directory| will be created if it does not already exist. explicit LogoCache(const base::FilePath& cache_directory); + + LogoCache(const LogoCache&) = delete; + LogoCache& operator=(const LogoCache&) = delete; + virtual ~LogoCache(); // Updates the metadata for the cached logo. @@ -123,8 +127,6 @@ // Ensure LogoCache is only used sequentially. SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(LogoCache); }; } // namespace search_provider_logos
diff --git a/components/search_provider_logos/logo_service_impl.h b/components/search_provider_logos/logo_service_impl.h index bc6e053d..ba00952 100644 --- a/components/search_provider_logos/logo_service_impl.h +++ b/components/search_provider_logos/logo_service_impl.h
@@ -52,6 +52,9 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, base::RepeatingCallback<bool()> want_gray_logo_getter); + LogoServiceImpl(const LogoServiceImpl&) = delete; + LogoServiceImpl& operator=(const LogoServiceImpl&) = delete; + ~LogoServiceImpl() override; // KeyedService implementation. @@ -229,8 +232,6 @@ base::Clock* clock_ = nullptr; base::WeakPtrFactory<LogoServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LogoServiceImpl); }; } // namespace search_provider_logos
diff --git a/components/security_interstitials/content/bad_clock_blocking_page.h b/components/security_interstitials/content/bad_clock_blocking_page.h index f44faba..5f308ec0 100644 --- a/components/security_interstitials/content/bad_clock_blocking_page.h +++ b/components/security_interstitials/content/bad_clock_blocking_page.h
@@ -49,6 +49,9 @@ security_interstitials::SecurityInterstitialControllerClient> controller_client); + BadClockBlockingPage(const BadClockBlockingPage&) = delete; + BadClockBlockingPage& operator=(const BadClockBlockingPage&) = delete; + ~BadClockBlockingPage() override; // SecurityInterstitialPage method: @@ -64,8 +67,6 @@ const net::SSLInfo ssl_info_; const std::unique_ptr<security_interstitials::BadClockUI> bad_clock_ui_; - - DISALLOW_COPY_AND_ASSIGN(BadClockBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_BAD_CLOCK_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/blocked_interception_blocking_page.h b/components/security_interstitials/content/blocked_interception_blocking_page.h index 093b331..e0579f1 100644 --- a/components/security_interstitials/content/blocked_interception_blocking_page.h +++ b/components/security_interstitials/content/blocked_interception_blocking_page.h
@@ -27,6 +27,12 @@ std::unique_ptr< security_interstitials::SecurityInterstitialControllerClient> controller_client); + + BlockedInterceptionBlockingPage(const BlockedInterceptionBlockingPage&) = + delete; + BlockedInterceptionBlockingPage& operator=( + const BlockedInterceptionBlockingPage&) = delete; + ~BlockedInterceptionBlockingPage() override; // SecurityInterstitialPage method: @@ -43,8 +49,6 @@ const std::unique_ptr<security_interstitials::BlockedInterceptionUI> blocked_interception_ui_; - - DISALLOW_COPY_AND_ASSIGN(BlockedInterceptionBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_BLOCKED_INTERCEPTION_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/captive_portal_blocking_page.h b/components/security_interstitials/content/captive_portal_blocking_page.h index 4b5690a..bdd89031 100644 --- a/components/security_interstitials/content/captive_portal_blocking_page.h +++ b/components/security_interstitials/content/captive_portal_blocking_page.h
@@ -53,6 +53,11 @@ security_interstitials::SecurityInterstitialControllerClient> controller_client, const OpenLoginCallback& open_login_callback); + + CaptivePortalBlockingPage(const CaptivePortalBlockingPage&) = delete; + CaptivePortalBlockingPage& operator=(const CaptivePortalBlockingPage&) = + delete; + ~CaptivePortalBlockingPage() override; // InterstitialPageDelegate method: @@ -84,8 +89,6 @@ bool is_wifi_info_overridden_for_testing_ = false; bool is_wifi_connection_for_testing_ = false; std::string wifi_ssid_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(CaptivePortalBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_CAPTIVE_PORTAL_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/cert_report_helper.h b/components/security_interstitials/content/cert_report_helper.h index 08fa87a..1ee0b855 100644 --- a/components/security_interstitials/content/cert_report_helper.h +++ b/components/security_interstitials/content/cert_report_helper.h
@@ -51,6 +51,9 @@ bool can_show_enhanced_protection_message, security_interstitials::MetricsHelper* metrics_helper); + CertReportHelper(const CertReportHelper&) = delete; + CertReportHelper& operator=(const CertReportHelper&) = delete; + virtual ~CertReportHelper(); // This method can be called by tests to fake an official build (reports are @@ -132,8 +135,6 @@ // taking an action on the interstitial is counted as not proceeding. CertificateErrorReport::ProceedDecision user_action_ = CertificateErrorReport::USER_DID_NOT_PROCEED; - - DISALLOW_COPY_AND_ASSIGN(CertReportHelper); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_CERT_REPORT_HELPER_H_
diff --git a/components/security_interstitials/content/common_name_mismatch_handler.h b/components/security_interstitials/content/common_name_mismatch_handler.h index 938cc73..994f0b6 100644 --- a/components/security_interstitials/content/common_name_mismatch_handler.h +++ b/components/security_interstitials/content/common_name_mismatch_handler.h
@@ -52,6 +52,11 @@ CommonNameMismatchHandler( const GURL& request_url, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory); + + CommonNameMismatchHandler(const CommonNameMismatchHandler&) = delete; + CommonNameMismatchHandler& operator=(const CommonNameMismatchHandler&) = + delete; + ~CommonNameMismatchHandler(); // Performs a network request to suggested URL. After completion, runs the @@ -100,8 +105,6 @@ std::unique_ptr<network::SimpleURLLoader> simple_url_loader_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(CommonNameMismatchHandler); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_COMMON_NAME_MISMATCH_HANDLER_H_
diff --git a/components/security_interstitials/content/connection_help_ui.h b/components/security_interstitials/content/connection_help_ui.h index ca3e79f..fd2b710 100644 --- a/components/security_interstitials/content/connection_help_ui.h +++ b/components/security_interstitials/content/connection_help_ui.h
@@ -16,10 +16,11 @@ class ConnectionHelpUI : public content::WebUIController { public: explicit ConnectionHelpUI(content::WebUI* web_ui); - ~ConnectionHelpUI() override; - private: - DISALLOW_COPY_AND_ASSIGN(ConnectionHelpUI); + ConnectionHelpUI(const ConnectionHelpUI&) = delete; + ConnectionHelpUI& operator=(const ConnectionHelpUI&) = delete; + + ~ConnectionHelpUI() override; }; } // namespace security_interstitials
diff --git a/components/security_interstitials/content/content_metrics_helper.h b/components/security_interstitials/content/content_metrics_helper.h index e6e2352..59ece26 100644 --- a/components/security_interstitials/content/content_metrics_helper.h +++ b/components/security_interstitials/content/content_metrics_helper.h
@@ -31,6 +31,10 @@ history::HistoryService* history_service, const GURL& url, const security_interstitials::MetricsHelper::ReportDetails settings); + + ContentMetricsHelper(const ContentMetricsHelper&) = delete; + ContentMetricsHelper& operator=(const ContentMetricsHelper&) = delete; + ~ContentMetricsHelper() override; #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) @@ -47,8 +51,6 @@ #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) std::unique_ptr<CaptivePortalMetricsRecorder> captive_portal_recorder_; #endif - - DISALLOW_COPY_AND_ASSIGN(ContentMetricsHelper); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_CONTENT_METRICS_HELPER_H_
diff --git a/components/security_interstitials/content/legacy_tls_blocking_page.h b/components/security_interstitials/content/legacy_tls_blocking_page.h index 8662095..5f98cb8 100644 --- a/components/security_interstitials/content/legacy_tls_blocking_page.h +++ b/components/security_interstitials/content/legacy_tls_blocking_page.h
@@ -30,6 +30,10 @@ std::unique_ptr< security_interstitials::SecurityInterstitialControllerClient> controller_client); + + LegacyTLSBlockingPage(const LegacyTLSBlockingPage&) = delete; + LegacyTLSBlockingPage& operator=(const LegacyTLSBlockingPage&) = delete; + ~LegacyTLSBlockingPage() override; // SecurityInterstitialPage method: @@ -45,8 +49,6 @@ const net::SSLInfo ssl_info_; const std::unique_ptr<security_interstitials::LegacyTLSUI> legacy_tls_ui_; - - DISALLOW_COPY_AND_ASSIGN(LegacyTLSBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_LEGACY_TLS_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/mitm_software_blocking_page.h b/components/security_interstitials/content/mitm_software_blocking_page.h index 4a492c2e..14fc6ce5 100644 --- a/components/security_interstitials/content/mitm_software_blocking_page.h +++ b/components/security_interstitials/content/mitm_software_blocking_page.h
@@ -46,6 +46,9 @@ security_interstitials::SecurityInterstitialControllerClient> controller_client); + MITMSoftwareBlockingPage(const MITMSoftwareBlockingPage&) = delete; + MITMSoftwareBlockingPage& operator=(const MITMSoftwareBlockingPage&) = delete; + ~MITMSoftwareBlockingPage() override; // SecurityInterstitialPage method: @@ -62,8 +65,6 @@ const std::unique_ptr<security_interstitials::MITMSoftwareUI> mitm_software_ui_; - - DISALLOW_COPY_AND_ASSIGN(MITMSoftwareBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_MITM_SOFTWARE_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/origin_policy_interstitial_page.h b/components/security_interstitials/content/origin_policy_interstitial_page.h index 44e23d4..93a37b2 100644 --- a/components/security_interstitials/content/origin_policy_interstitial_page.h +++ b/components/security_interstitials/content/origin_policy_interstitial_page.h
@@ -30,6 +30,10 @@ std::unique_ptr<SecurityInterstitialControllerClient> controller, network::OriginPolicyState error_reason); + OriginPolicyInterstitialPage(const OriginPolicyInterstitialPage&) = delete; + OriginPolicyInterstitialPage& operator=(const OriginPolicyInterstitialPage&) = + delete; + ~OriginPolicyInterstitialPage() override; void OnInterstitialClosing() override; @@ -44,8 +48,6 @@ void Proceed(); void DontProceed(); - - DISALLOW_COPY_AND_ASSIGN(OriginPolicyInterstitialPage); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/content/security_blocking_page_factory.h b/components/security_interstitials/content/security_blocking_page_factory.h index f87bba7e..7f211258 100644 --- a/components/security_interstitials/content/security_blocking_page_factory.h +++ b/components/security_interstitials/content/security_blocking_page_factory.h
@@ -24,6 +24,11 @@ class SecurityBlockingPageFactory { public: SecurityBlockingPageFactory() = default; + + SecurityBlockingPageFactory(const SecurityBlockingPageFactory&) = delete; + SecurityBlockingPageFactory& operator=(const SecurityBlockingPageFactory&) = + delete; + virtual ~SecurityBlockingPageFactory() = default; // Creates an SSL blocking page. |options_mask| must be a bitwise mask of @@ -92,9 +97,6 @@ virtual std::unique_ptr<security_interstitials::HttpsOnlyModeBlockingPage> CreateHttpsOnlyModeBlockingPage(content::WebContents* web_contents, const GURL& request_url) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SecurityBlockingPageFactory); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SECURITY_BLOCKING_PAGE_FACTORY_H_
diff --git a/components/security_interstitials/content/security_interstitial_controller_client.h b/components/security_interstitials/content/security_interstitial_controller_client.h index 6edb122..1cff08b 100644 --- a/components/security_interstitials/content/security_interstitial_controller_client.h +++ b/components/security_interstitials/content/security_interstitial_controller_client.h
@@ -31,6 +31,11 @@ const GURL& default_safe_page, std::unique_ptr<SettingsPageHelper> settings_page_helper); + SecurityInterstitialControllerClient( + const SecurityInterstitialControllerClient&) = delete; + SecurityInterstitialControllerClient& operator=( + const SecurityInterstitialControllerClient&) = delete; + ~SecurityInterstitialControllerClient() override; // security_interstitials::ControllerClient overrides. @@ -60,8 +65,6 @@ // back to, e.g. chrome:kChromeUINewTabURL. const GURL default_safe_page_; std::unique_ptr<SettingsPageHelper> settings_page_helper_; - - DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialControllerClient); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/content/security_interstitial_page.h b/components/security_interstitials/content/security_interstitial_page.h index 41436662..7411b9e 100644 --- a/components/security_interstitials/content/security_interstitial_page.h +++ b/components/security_interstitials/content/security_interstitial_page.h
@@ -34,6 +34,10 @@ content::WebContents* web_contents, const GURL& request_url, std::unique_ptr<SecurityInterstitialControllerClient> controller); + + SecurityInterstitialPage(const SecurityInterstitialPage&) = delete; + SecurityInterstitialPage& operator=(const SecurityInterstitialPage&) = delete; + virtual ~SecurityInterstitialPage(); // Prevents creating the actual interstitial view for testing. @@ -90,8 +94,6 @@ // For subclasses that don't have their own ControllerClients yet. std::unique_ptr<SecurityInterstitialControllerClient> controller_; - - DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialPage); }; } // security_interstitials
diff --git a/components/security_interstitials/content/security_interstitial_tab_helper.h b/components/security_interstitials/content/security_interstitial_tab_helper.h index b61e9e2..16f2a31 100644 --- a/components/security_interstitials/content/security_interstitial_tab_helper.h +++ b/components/security_interstitials/content/security_interstitial_tab_helper.h
@@ -27,6 +27,10 @@ public content::WebContentsUserData<SecurityInterstitialTabHelper>, public security_interstitials::mojom::InterstitialCommands { public: + SecurityInterstitialTabHelper(const SecurityInterstitialTabHelper&) = delete; + SecurityInterstitialTabHelper& operator=( + const SecurityInterstitialTabHelper&) = delete; + ~SecurityInterstitialTabHelper() override; // WebContentsObserver: @@ -108,8 +112,6 @@ receivers_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SecurityInterstitialTabHelper); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/content/ssl_blocking_page.h b/components/security_interstitials/content/ssl_blocking_page.h index faab0950..b7ce0ac4 100644 --- a/components/security_interstitials/content/ssl_blocking_page.h +++ b/components/security_interstitials/content/ssl_blocking_page.h
@@ -42,6 +42,9 @@ static const security_interstitials::SecurityInterstitialPage::TypeID kTypeForTesting; + SSLBlockingPage(const SSLBlockingPage&) = delete; + SSLBlockingPage& operator=(const SSLBlockingPage&) = delete; + ~SSLBlockingPage() override; // InterstitialPageDelegate method: @@ -83,8 +86,6 @@ const bool overridable_; // The UI allows the user to override the error. const std::unique_ptr<security_interstitials::SSLErrorUI> ssl_error_ui_; - - DISALLOW_COPY_AND_ASSIGN(SSLBlockingPage); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SSL_BLOCKING_PAGE_H_
diff --git a/components/security_interstitials/content/ssl_blocking_page_base.h b/components/security_interstitials/content/ssl_blocking_page_base.h index c9a8a14..908073b 100644 --- a/components/security_interstitials/content/ssl_blocking_page_base.h +++ b/components/security_interstitials/content/ssl_blocking_page_base.h
@@ -36,6 +36,10 @@ std::unique_ptr< security_interstitials::SecurityInterstitialControllerClient> controller_client); + + SSLBlockingPageBase(const SSLBlockingPageBase&) = delete; + SSLBlockingPageBase& operator=(const SSLBlockingPageBase&) = delete; + ~SSLBlockingPageBase() override; // security_interstitials::SecurityInterstitialPage: @@ -48,7 +52,6 @@ private: const std::unique_ptr<CertReportHelper> cert_report_helper_; - DISALLOW_COPY_AND_ASSIGN(SSLBlockingPageBase); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SSL_BLOCKING_PAGE_BASE_H_
diff --git a/components/security_interstitials/content/ssl_error_assistant.h b/components/security_interstitials/content/ssl_error_assistant.h index 4e80c67..27d4fb72 100644 --- a/components/security_interstitials/content/ssl_error_assistant.h +++ b/components/security_interstitials/content/ssl_error_assistant.h
@@ -65,6 +65,9 @@ public: SSLErrorAssistant(); + SSLErrorAssistant(const SSLErrorAssistant&) = delete; + SSLErrorAssistant& operator=(const SSLErrorAssistant&) = delete; + ~SSLErrorAssistant(); // Returns true if any of the SHA256 hashes in |ssl_info| is of a captive @@ -117,8 +120,6 @@ // Error assistant configuration. std::unique_ptr<chrome_browser_ssl::SSLErrorAssistantConfig> error_assistant_proto_; - - DISALLOW_COPY_AND_ASSIGN(SSLErrorAssistant); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SSL_ERROR_ASSISTANT_H_
diff --git a/components/security_interstitials/content/ssl_error_handler.cc b/components/security_interstitials/content/ssl_error_handler.cc index 06873a9..daed439 100644 --- a/components/security_interstitials/content/ssl_error_handler.cc +++ b/components/security_interstitials/content/ssl_error_handler.cc
@@ -90,6 +90,11 @@ : public content::WebContentsObserver, public content::WebContentsUserData<CommonNameMismatchRedirectObserver> { public: + CommonNameMismatchRedirectObserver( + const CommonNameMismatchRedirectObserver&) = delete; + CommonNameMismatchRedirectObserver& operator=( + const CommonNameMismatchRedirectObserver&) = delete; + ~CommonNameMismatchRedirectObserver() override {} static void AddToConsoleAfterNavigation( @@ -141,8 +146,6 @@ const std::string suggested_url_hostname_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(CommonNameMismatchRedirectObserver); }; WEB_CONTENTS_USER_DATA_KEY_IMPL(CommonNameMismatchRedirectObserver)
diff --git a/components/security_interstitials/content/ssl_error_handler.h b/components/security_interstitials/content/ssl_error_handler.h index 4827a090..6667d4e 100644 --- a/components/security_interstitials/content/ssl_error_handler.h +++ b/components/security_interstitials/content/ssl_error_handler.h
@@ -83,6 +83,9 @@ void(content::WebContents*, const GURL&, const std::string&, int)> OnBlockingPageShownCallback; + SSLErrorHandler(const SSLErrorHandler&) = delete; + SSLErrorHandler& operator=(const SSLErrorHandler&) = delete; + ~SSLErrorHandler() override; // Events for UMA. Do not rename or remove values, add new values to the end. @@ -269,8 +272,6 @@ base::WeakPtrFactory<SSLErrorHandler> weak_ptr_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SSLErrorHandler); }; #endif // COMPONENTS_SECURITY_INTERSTITIALS_CONTENT_SSL_ERROR_HANDLER_H_
diff --git a/components/security_interstitials/content/ssl_error_handler_unittest.cc b/components/security_interstitials/content/ssl_error_handler_unittest.cc index 7494e70..8a6994b8 100644 --- a/components/security_interstitials/content/ssl_error_handler_unittest.cc +++ b/components/security_interstitials/content/ssl_error_handler_unittest.cc
@@ -308,6 +308,12 @@ : public content::RenderViewHostTestHarness { public: SSLErrorHandlerNameMismatchTest() {} + + SSLErrorHandlerNameMismatchTest(const SSLErrorHandlerNameMismatchTest&) = + delete; + SSLErrorHandlerNameMismatchTest& operator=( + const SSLErrorHandlerNameMismatchTest&) = delete; + ~SSLErrorHandlerNameMismatchTest() override {} void SetUp() override { @@ -361,8 +367,6 @@ std::unique_ptr<captive_portal::CaptivePortalService> captive_portal_service_; std::unique_ptr<TestSSLErrorHandler> error_handler_; TestSSLErrorHandlerDelegate* delegate_; - - DISALLOW_COPY_AND_ASSIGN(SSLErrorHandlerNameMismatchTest); }; // A class to test name mismatch errors, where the certificate lacks a
diff --git a/components/security_interstitials/content/stateful_ssl_host_state_delegate.h b/components/security_interstitials/content/stateful_ssl_host_state_delegate.h index bf61e0c5..4e5d246 100644 --- a/components/security_interstitials/content/stateful_ssl_host_state_delegate.h +++ b/components/security_interstitials/content/stateful_ssl_host_state_delegate.h
@@ -44,6 +44,11 @@ content::BrowserContext* browser_context, PrefService* pref_service, HostContentSettingsMap* host_content_settings_map); + + StatefulSSLHostStateDelegate(const StatefulSSLHostStateDelegate&) = delete; + StatefulSSLHostStateDelegate& operator=(const StatefulSSLHostStateDelegate&) = + delete; + ~StatefulSSLHostStateDelegate() override; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); @@ -181,8 +186,6 @@ std::set<std::string /* host */> allowed_http_hosts_for_non_default_storage_partitions_; - DISALLOW_COPY_AND_ASSIGN(StatefulSSLHostStateDelegate); - int recurrent_interstitial_threshold_for_testing; enum RecurrentInterstitialMode recurrent_interstitial_mode_for_testing; int recurrent_interstitial_reset_time_for_testing;
diff --git a/components/security_interstitials/core/bad_clock_ui.h b/components/security_interstitials/core/bad_clock_ui.h index ecb5e396..fb481100 100644 --- a/components/security_interstitials/core/bad_clock_ui.h +++ b/components/security_interstitials/core/bad_clock_ui.h
@@ -24,6 +24,10 @@ const base::Time& time_triggered, // Time the error was triggered ssl_errors::ClockState clock_state, ControllerClient* controller_); + + BadClockUI(const BadClockUI&) = delete; + BadClockUI& operator=(const BadClockUI&) = delete; + ~BadClockUI(); void PopulateStringsForHTML(base::Value* load_time_data); @@ -38,8 +42,6 @@ const base::Time time_triggered_; ControllerClient* controller_; ssl_errors::ClockState clock_state_; - - DISALLOW_COPY_AND_ASSIGN(BadClockUI); }; } // security_interstitials
diff --git a/components/security_interstitials/core/base_safe_browsing_error_ui.h b/components/security_interstitials/core/base_safe_browsing_error_ui.h index 0033a31..50275778 100644 --- a/components/security_interstitials/core/base_safe_browsing_error_ui.h +++ b/components/security_interstitials/core/base_safe_browsing_error_ui.h
@@ -93,6 +93,10 @@ const std::string& app_locale, const base::Time& time_triggered, ControllerClient* controller); + + BaseSafeBrowsingErrorUI(const BaseSafeBrowsingErrorUI&) = delete; + BaseSafeBrowsingErrorUI& operator=(const BaseSafeBrowsingErrorUI&) = delete; + virtual ~BaseSafeBrowsingErrorUI(); bool is_main_frame_load_blocked() const { @@ -198,8 +202,6 @@ const base::Time time_triggered_; ControllerClient* controller_; - - DISALLOW_COPY_AND_ASSIGN(BaseSafeBrowsingErrorUI); }; } // security_interstitials
diff --git a/components/security_interstitials/core/blocked_interception_ui.h b/components/security_interstitials/core/blocked_interception_ui.h index 8b91673..8442623 100644 --- a/components/security_interstitials/core/blocked_interception_ui.h +++ b/components/security_interstitials/core/blocked_interception_ui.h
@@ -21,6 +21,10 @@ int cert_error, const net::SSLInfo& ssl_info, ControllerClient* controller_); + + BlockedInterceptionUI(const BlockedInterceptionUI&) = delete; + BlockedInterceptionUI& operator=(const BlockedInterceptionUI&) = delete; + ~BlockedInterceptionUI(); void PopulateStringsForHTML(base::Value* load_time_data); @@ -32,8 +36,6 @@ const net::SSLInfo ssl_info_; ControllerClient* controller_; bool user_made_decision_; - - DISALLOW_COPY_AND_ASSIGN(BlockedInterceptionUI); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/core/controller_client.h b/components/security_interstitials/core/controller_client.h index 9c6878f1..87945a31 100644 --- a/components/security_interstitials/core/controller_client.h +++ b/components/security_interstitials/core/controller_client.h
@@ -61,6 +61,10 @@ class ControllerClient { public: explicit ControllerClient(std::unique_ptr<MetricsHelper> metrics_helper); + + ControllerClient(const ControllerClient&) = delete; + ControllerClient& operator=(const ControllerClient&) = delete; + virtual ~ControllerClient(); // Handle the user's reporting preferences. @@ -125,8 +129,6 @@ std::unique_ptr<MetricsHelper> metrics_helper_; // Link to the help center. GURL help_center_url_; - - DISALLOW_COPY_AND_ASSIGN(ControllerClient); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/core/legacy_tls_ui.h b/components/security_interstitials/core/legacy_tls_ui.h index 96a441e..ce2958f 100644 --- a/components/security_interstitials/core/legacy_tls_ui.h +++ b/components/security_interstitials/core/legacy_tls_ui.h
@@ -21,6 +21,10 @@ int cert_error, const net::SSLInfo& ssl_info, ControllerClient* controller_); + + LegacyTLSUI(const LegacyTLSUI&) = delete; + LegacyTLSUI& operator=(const LegacyTLSUI&) = delete; + ~LegacyTLSUI(); void PopulateStringsForHTML(base::Value* load_time_data); void HandleCommand(SecurityInterstitialCommand command); @@ -31,8 +35,6 @@ const net::SSLInfo ssl_info_; ControllerClient* controller_; bool user_made_decision_; - - DISALLOW_COPY_AND_ASSIGN(LegacyTLSUI); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/core/metrics_helper.h b/components/security_interstitials/core/metrics_helper.h index 58a9ee7..1408ece 100644 --- a/components/security_interstitials/core/metrics_helper.h +++ b/components/security_interstitials/core/metrics_helper.h
@@ -80,6 +80,10 @@ MetricsHelper(const GURL& url, const ReportDetails settings, history::HistoryService* history_service); + + MetricsHelper(const MetricsHelper&) = delete; + MetricsHelper& operator=(const MetricsHelper&) = delete; + virtual ~MetricsHelper(); // Records a user decision or interaction to the appropriate UMA metrics @@ -109,8 +113,6 @@ const ReportDetails settings_; int num_visits_; base::CancelableTaskTracker request_tracker_; - - DISALLOW_COPY_AND_ASSIGN(MetricsHelper); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/core/mitm_software_ui.h b/components/security_interstitials/core/mitm_software_ui.h index 63b44a61..b0312911 100644 --- a/components/security_interstitials/core/mitm_software_ui.h +++ b/components/security_interstitials/core/mitm_software_ui.h
@@ -23,6 +23,10 @@ const std::string& mitm_software_name, bool is_enterprise_managed, ControllerClient* controller_); + + MITMSoftwareUI(const MITMSoftwareUI&) = delete; + MITMSoftwareUI& operator=(const MITMSoftwareUI&) = delete; + ~MITMSoftwareUI(); void PopulateStringsForHTML(base::Value* load_time_data); @@ -39,8 +43,6 @@ const std::string mitm_software_name_; const bool is_enterprise_managed_; ControllerClient* controller_; - - DISALLOW_COPY_AND_ASSIGN(MITMSoftwareUI); }; } // namespace security_interstitials
diff --git a/components/security_interstitials/core/safe_browsing_loud_error_ui.h b/components/security_interstitials/core/safe_browsing_loud_error_ui.h index 3ce4ac3..d134fe7 100644 --- a/components/security_interstitials/core/safe_browsing_loud_error_ui.h +++ b/components/security_interstitials/core/safe_browsing_loud_error_ui.h
@@ -36,6 +36,9 @@ ControllerClient* controller, bool created_prior_to_navigation); + SafeBrowsingLoudErrorUI(const SafeBrowsingLoudErrorUI&) = delete; + SafeBrowsingLoudErrorUI& operator=(const SafeBrowsingLoudErrorUI&) = delete; + ~SafeBrowsingLoudErrorUI() override; // Implement BaseSafeBrowsingErrorUI. @@ -55,8 +58,6 @@ void PopulateEnhancedProtectionMessage(base::Value* load_time_data); const bool created_prior_to_navigation_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingLoudErrorUI); }; } // security_interstitials
diff --git a/components/security_interstitials/core/safe_browsing_quiet_error_ui.h b/components/security_interstitials/core/safe_browsing_quiet_error_ui.h index 056cba8..1872163 100644 --- a/components/security_interstitials/core/safe_browsing_quiet_error_ui.h +++ b/components/security_interstitials/core/safe_browsing_quiet_error_ui.h
@@ -32,6 +32,10 @@ const base::Time& time_triggered, ControllerClient* controller, const bool is_giant_webview); + + SafeBrowsingQuietErrorUI(const SafeBrowsingQuietErrorUI&) = delete; + SafeBrowsingQuietErrorUI& operator=(const SafeBrowsingQuietErrorUI&) = delete; + ~SafeBrowsingQuietErrorUI() override; // Fills the passed dictionary with the values to be passed to the template @@ -53,8 +57,6 @@ void PopulateBillingLoadTimeData(base::Value* load_time_data); bool is_giant_webview_; - - DISALLOW_COPY_AND_ASSIGN(SafeBrowsingQuietErrorUI); }; } // security_interstitials
diff --git a/components/security_interstitials/core/ssl_error_ui.h b/components/security_interstitials/core/ssl_error_ui.h index d28bef6..0c3d88f 100644 --- a/components/security_interstitials/core/ssl_error_ui.h +++ b/components/security_interstitials/core/ssl_error_ui.h
@@ -28,6 +28,10 @@ const base::Time& time_triggered, const GURL& support_url, ControllerClient* controller); + + SSLErrorUI(const SSLErrorUI&) = delete; + SSLErrorUI& operator=(const SSLErrorUI&) = delete; + virtual ~SSLErrorUI(); virtual void PopulateStringsForHTML(base::Value* load_time_data); @@ -56,8 +60,6 @@ ControllerClient* controller_; bool user_made_decision_; // Whether the user made a choice in the UI. - - DISALLOW_COPY_AND_ASSIGN(SSLErrorUI); }; } // security_interstitials
diff --git a/components/send_tab_to_self/ios/send_tab_to_self_model_bridge_observer.h b/components/send_tab_to_self/ios/send_tab_to_self_model_bridge_observer.h index b48a6bc..32de0ec 100644 --- a/components/send_tab_to_self/ios/send_tab_to_self_model_bridge_observer.h +++ b/components/send_tab_to_self/ios/send_tab_to_self_model_bridge_observer.h
@@ -41,6 +41,10 @@ explicit SendTabToSelfModelBridge( id<SendTabToSelfModelBridgeObserver> observer, SendTabToSelfModel* model); + + SendTabToSelfModelBridge(const SendTabToSelfModelBridge&) = delete; + SendTabToSelfModelBridge& operator=(const SendTabToSelfModelBridge&) = delete; + ~SendTabToSelfModelBridge() override; private: @@ -52,8 +56,6 @@ __weak id<SendTabToSelfModelBridgeObserver> observer_; SendTabToSelfModel* model_; // weak - - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfModelBridge); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_bridge.h b/components/send_tab_to_self/send_tab_to_self_bridge.h index e718b9a..648c797e 100644 --- a/components/send_tab_to_self/send_tab_to_self_bridge.h +++ b/components/send_tab_to_self/send_tab_to_self_bridge.h
@@ -48,6 +48,10 @@ syncer::OnceModelTypeStoreFactory create_store_callback, history::HistoryService* history_service, syncer::DeviceInfoTracker* device_info_tracker); + + SendTabToSelfBridge(const SendTabToSelfBridge&) = delete; + SendTabToSelfBridge& operator=(const SendTabToSelfBridge&) = delete; + ~SendTabToSelfBridge() override; // syncer::ModelTypeSyncBridge overrides. @@ -182,8 +186,6 @@ history_service_observation_{this}; base::WeakPtrFactory<SendTabToSelfBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfBridge); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_entry.h b/components/send_tab_to_self/send_tab_to_self_entry.h index b7656ccc..ccca3f2 100644 --- a/components/send_tab_to_self/send_tab_to_self_entry.h +++ b/components/send_tab_to_self/send_tab_to_self_entry.h
@@ -38,6 +38,10 @@ base::Time original_navigation_time, const std::string& device_name, const std::string& target_device_sync_cache_guid); + + SendTabToSelfEntry(const SendTabToSelfEntry&) = delete; + SendTabToSelfEntry& operator=(const SendTabToSelfEntry&) = delete; + ~SendTabToSelfEntry(); // The unique random id for the entry. @@ -98,8 +102,6 @@ base::Time original_navigation_time_; bool notification_dismissed_; bool opened_; - - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfEntry); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_infobar_delegate.h b/components/send_tab_to_self/send_tab_to_self_infobar_delegate.h index 5ea792ba..e79defa 100644 --- a/components/send_tab_to_self/send_tab_to_self_infobar_delegate.h +++ b/components/send_tab_to_self/send_tab_to_self_infobar_delegate.h
@@ -27,6 +27,11 @@ static std::unique_ptr<SendTabToSelfInfoBarDelegate> Create( content::WebContents* web_contents, const SendTabToSelfEntry* entry); + + SendTabToSelfInfoBarDelegate(const SendTabToSelfInfoBarDelegate&) = delete; + SendTabToSelfInfoBarDelegate& operator=(const SendTabToSelfInfoBarDelegate&) = + delete; + ~SendTabToSelfInfoBarDelegate() override; // Returns the message to be shown in the infobar. @@ -47,8 +52,6 @@ content::WebContents* web_contents_ = nullptr; // The entry that was share to this device. Must outlive this instance. const SendTabToSelfEntry* entry_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfInfoBarDelegate); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_model.h b/components/send_tab_to_self/send_tab_to_self_model.h index 4bbad74..7069a39 100644 --- a/components/send_tab_to_self/send_tab_to_self_model.h +++ b/components/send_tab_to_self/send_tab_to_self_model.h
@@ -24,6 +24,10 @@ class SendTabToSelfModel { public: SendTabToSelfModel(); + + SendTabToSelfModel(const SendTabToSelfModel&) = delete; + SendTabToSelfModel& operator=(const SendTabToSelfModel&) = delete; + virtual ~SendTabToSelfModel(); // Returns a vector of entry IDs in the model. @@ -83,9 +87,6 @@ protected: // The observers. base::ObserverList<SendTabToSelfModelObserver>::Unchecked observers_; - - private: - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfModel); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_model_observer.h b/components/send_tab_to_self/send_tab_to_self_model_observer.h index a26475b..e35a21a 100644 --- a/components/send_tab_to_self/send_tab_to_self_model_observer.h +++ b/components/send_tab_to_self/send_tab_to_self_model_observer.h
@@ -17,6 +17,11 @@ class SendTabToSelfModelObserver { public: SendTabToSelfModelObserver() {} + + SendTabToSelfModelObserver(const SendTabToSelfModelObserver&) = delete; + SendTabToSelfModelObserver& operator=(const SendTabToSelfModelObserver&) = + delete; + virtual ~SendTabToSelfModelObserver() {} // Invoked when the model has finished loading. Until this method is called it @@ -39,9 +44,6 @@ // that have been marked as opened. virtual void EntriesOpenedRemotely( const std::vector<const SendTabToSelfEntry*>& opened_entries) {} - - private: - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfModelObserver); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_model_type_controller.h b/components/send_tab_to_self/send_tab_to_self_model_type_controller.h index 3440a8a..d9dec8a 100644 --- a/components/send_tab_to_self/send_tab_to_self_model_type_controller.h +++ b/components/send_tab_to_self/send_tab_to_self_model_type_controller.h
@@ -20,14 +20,17 @@ delegate_for_full_sync_mode, std::unique_ptr<syncer::ModelTypeControllerDelegate> delegate_for_transport_mode); + + SendTabToSelfModelTypeController(const SendTabToSelfModelTypeController&) = + delete; + SendTabToSelfModelTypeController& operator=( + const SendTabToSelfModelTypeController&) = delete; + ~SendTabToSelfModelTypeController() override; // DataTypeController overrides. void Stop(syncer::ShutdownReason shutdown_reason, StopCallback callback) override; - - private: - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfModelTypeController); }; } // namespace send_tab_to_self
diff --git a/components/send_tab_to_self/send_tab_to_self_sync_service.h b/components/send_tab_to_self/send_tab_to_self_sync_service.h index b955183..a954386 100644 --- a/components/send_tab_to_self/send_tab_to_self_sync_service.h +++ b/components/send_tab_to_self/send_tab_to_self_sync_service.h
@@ -34,6 +34,10 @@ syncer::OnceModelTypeStoreFactory create_store_callback, history::HistoryService* history_service, syncer::DeviceInfoTracker* device_info_tracker); + + SendTabToSelfSyncService(const SendTabToSelfSyncService&) = delete; + SendTabToSelfSyncService& operator=(const SendTabToSelfSyncService&) = delete; + ~SendTabToSelfSyncService() override; virtual SendTabToSelfModel* GetSendTabToSelfModel(); @@ -48,8 +52,6 @@ private: std::unique_ptr<SendTabToSelfBridge> bridge_; std::unique_ptr<FakeSendTabToSelfModel> fake_model_; - - DISALLOW_COPY_AND_ASSIGN(SendTabToSelfSyncService); }; } // namespace send_tab_to_self
diff --git a/components/services/app_service/app_service_impl.h b/components/services/app_service/app_service_impl.h index e52b600..206a9195 100644 --- a/components/services/app_service/app_service_impl.h +++ b/components/services/app_service/app_service_impl.h
@@ -32,6 +32,10 @@ const base::FilePath& profile_dir, base::OnceClosure read_completed_for_testing = base::OnceClosure(), base::OnceClosure write_completed_for_testing = base::OnceClosure()); + + AppServiceImpl(const AppServiceImpl&) = delete; + AppServiceImpl& operator=(const AppServiceImpl&) = delete; + ~AppServiceImpl() override; void BindReceiver(mojo::PendingReceiver<apps::mojom::AppService> receiver); @@ -163,8 +167,6 @@ base::OnceClosure write_completed_for_testing_; base::WeakPtrFactory<AppServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AppServiceImpl); }; } // namespace apps
diff --git a/components/services/app_service/public/cpp/icon_cache.h b/components/services/app_service/public/cpp/icon_cache.h index 127a8a0..1dd4fc84 100644 --- a/components/services/app_service/public/cpp/icon_cache.h +++ b/components/services/app_service/public/cpp/icon_cache.h
@@ -67,6 +67,10 @@ }; IconCache(IconLoader* wrapped_loader, GarbageCollectionPolicy gc_policy); + + IconCache(const IconCache&) = delete; + IconCache& operator=(const IconCache&) = delete; + ~IconCache() override; // IconLoader overrides. @@ -111,8 +115,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<IconCache> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IconCache); }; } // namespace apps
diff --git a/components/services/app_service/public/cpp/icon_coalescer.h b/components/services/app_service/public/cpp/icon_coalescer.h index 9d81dd5..265b965 100644 --- a/components/services/app_service/public/cpp/icon_coalescer.h +++ b/components/services/app_service/public/cpp/icon_coalescer.h
@@ -46,6 +46,10 @@ class IconCoalescer : public IconLoader { public: explicit IconCoalescer(IconLoader* wrapped_loader); + + IconCoalescer(const IconCoalescer&) = delete; + IconCoalescer& operator=(const IconCoalescer&) = delete; + ~IconCoalescer() override; // IconLoader overrides. @@ -93,8 +97,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<IconCoalescer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IconCoalescer); }; } // namespace apps
diff --git a/components/services/app_service/public/cpp/icon_loader.h b/components/services/app_service/public/cpp/icon_loader.h index b705799a..53090a4 100644 --- a/components/services/app_service/public/cpp/icon_loader.h +++ b/components/services/app_service/public/cpp/icon_loader.h
@@ -36,13 +36,15 @@ class Releaser { public: Releaser(std::unique_ptr<Releaser> next, base::OnceClosure closure); + + Releaser(const Releaser&) = delete; + Releaser& operator=(const Releaser&) = delete; + virtual ~Releaser(); private: std::unique_ptr<Releaser> next_; base::OnceClosure closure_; - - DISALLOW_COPY_AND_ASSIGN(Releaser); }; IconLoader();
diff --git a/components/services/app_service/public/cpp/stub_icon_loader.h b/components/services/app_service/public/cpp/stub_icon_loader.h index 8083d53..e0c3ee2f 100644 --- a/components/services/app_service/public/cpp/stub_icon_loader.h +++ b/components/services/app_service/public/cpp/stub_icon_loader.h
@@ -17,6 +17,10 @@ class StubIconLoader : public IconLoader { public: StubIconLoader(); + + StubIconLoader(const StubIconLoader&) = delete; + StubIconLoader& operator=(const StubIconLoader&) = delete; + ~StubIconLoader() override; // IconLoader overrides. @@ -36,8 +40,6 @@ private: int num_load_calls_ = 0; - - DISALLOW_COPY_AND_ASSIGN(StubIconLoader); }; } // namespace apps
diff --git a/components/services/filesystem/directory_impl.h b/components/services/filesystem/directory_impl.h index 676ebd9..7bb3fe3e 100644 --- a/components/services/filesystem/directory_impl.h +++ b/components/services/filesystem/directory_impl.h
@@ -26,6 +26,10 @@ DirectoryImpl(base::FilePath directory_path, scoped_refptr<SharedTempDir> temp_dir, scoped_refptr<LockTable> lock_table); + + DirectoryImpl(const DirectoryImpl&) = delete; + DirectoryImpl& operator=(const DirectoryImpl&) = delete; + ~DirectoryImpl() override; // |Directory| implementation: @@ -71,8 +75,6 @@ base::FilePath directory_path_; scoped_refptr<SharedTempDir> temp_dir_; scoped_refptr<LockTable> lock_table_; - - DISALLOW_COPY_AND_ASSIGN(DirectoryImpl); }; } // namespace filesystem
diff --git a/components/services/filesystem/directory_test_helper.cc b/components/services/filesystem/directory_test_helper.cc index 967a375..35e74d6 100644 --- a/components/services/filesystem/directory_test_helper.cc +++ b/components/services/filesystem/directory_test_helper.cc
@@ -24,6 +24,10 @@ class DirectoryTestHelper::BlockingState { public: BlockingState() : lock_table_(base::MakeRefCounted<LockTable>()) {} + + BlockingState(const BlockingState&) = delete; + BlockingState& operator=(const BlockingState&) = delete; + ~BlockingState() = default; void BindNewTempDirectory(mojo::PendingReceiver<mojom::Directory> receiver) { @@ -40,8 +44,6 @@ private: const scoped_refptr<LockTable> lock_table_; mojo::UniqueReceiverSet<mojom::Directory> directories_; - - DISALLOW_COPY_AND_ASSIGN(BlockingState); }; DirectoryTestHelper::DirectoryTestHelper()
diff --git a/components/services/filesystem/directory_test_helper.h b/components/services/filesystem/directory_test_helper.h index fe435d0..a2a5dfd 100644 --- a/components/services/filesystem/directory_test_helper.h +++ b/components/services/filesystem/directory_test_helper.h
@@ -18,6 +18,10 @@ class DirectoryTestHelper { public: DirectoryTestHelper(); + + DirectoryTestHelper(const DirectoryTestHelper&) = delete; + DirectoryTestHelper& operator=(const DirectoryTestHelper&) = delete; + ~DirectoryTestHelper(); mojo::Remote<mojom::Directory> CreateTempDir(); @@ -26,8 +30,6 @@ class BlockingState; base::SequenceBound<BlockingState> blocking_state_; - - DISALLOW_COPY_AND_ASSIGN(DirectoryTestHelper); }; } // namespace filesystem
diff --git a/components/services/filesystem/file_impl.h b/components/services/filesystem/file_impl.h index f8864bb3..a082ab4a 100644 --- a/components/services/filesystem/file_impl.h +++ b/components/services/filesystem/file_impl.h
@@ -33,6 +33,10 @@ base::File file, scoped_refptr<SharedTempDir> temp_dir, scoped_refptr<LockTable> lock_table); + + FileImpl(const FileImpl&) = delete; + FileImpl& operator=(const FileImpl&) = delete; + ~FileImpl() override; // Returns whether the underlying file handle is valid. @@ -78,8 +82,6 @@ base::FilePath path_; scoped_refptr<SharedTempDir> temp_dir_; scoped_refptr<LockTable> lock_table_; - - DISALLOW_COPY_AND_ASSIGN(FileImpl); }; } // namespace filesystem
diff --git a/components/services/font/font_loader_unittest.cc b/components/services/font/font_loader_unittest.cc index a9454d1..f508bd8 100644 --- a/components/services/font/font_loader_unittest.cc +++ b/components/services/font/font_loader_unittest.cc
@@ -75,6 +75,10 @@ class FontLoaderTest : public testing::Test { public: FontLoaderTest() = default; + + FontLoaderTest(const FontLoaderTest&) = delete; + FontLoaderTest& operator=(const FontLoaderTest&) = delete; + ~FontLoaderTest() override = default; protected: @@ -83,8 +87,6 @@ private: base::test::TaskEnvironment task_environment_; FontLoader font_loader_{ConnectToBackgroundFontService()}; - - DISALLOW_COPY_AND_ASSIGN(FontLoaderTest); }; } // namespace
diff --git a/components/services/font/font_service_app.h b/components/services/font/font_service_app.h index e46d79f5..811a3ea6 100644 --- a/components/services/font/font_service_app.h +++ b/components/services/font/font_service_app.h
@@ -18,6 +18,10 @@ class FontServiceApp : public mojom::FontService { public: FontServiceApp(); + + FontServiceApp(const FontServiceApp&) = delete; + FontServiceApp& operator=(const FontServiceApp&) = delete; + ~FontServiceApp() override; void BindReceiver(mojo::PendingReceiver<mojom::FontService> receiver); @@ -55,8 +59,6 @@ // We don't want to leak paths to our callers; we thus enumerate the paths of // fonts. std::vector<base::FilePath> paths_; - - DISALLOW_COPY_AND_ASSIGN(FontServiceApp); }; } // namespace font_service
diff --git a/components/services/font/public/cpp/font_loader.h b/components/services/font/public/cpp/font_loader.h index 31bc95d..413ce75 100644 --- a/components/services/font/public/cpp/font_loader.h +++ b/components/services/font/public/cpp/font_loader.h
@@ -33,6 +33,10 @@ public: explicit FontLoader( mojo::PendingRemote<mojom::FontService> pending_font_service); + + FontLoader(const FontLoader&) = delete; + FontLoader& operator=(const FontLoader&) = delete; + ~FontLoader() override; // SkFontConfigInterface: @@ -95,8 +99,6 @@ // Maps font identity ID to the memory-mapped file with font data. std::unordered_map<uint32_t, internal::MappedFontFile*> mapped_font_files_; - - DISALLOW_COPY_AND_ASSIGN(FontLoader); }; } // namespace font_service
diff --git a/components/services/heap_profiling/connection_manager.h b/components/services/heap_profiling/connection_manager.h index 6f4b002e..33a14cb 100644 --- a/components/services/heap_profiling/connection_manager.h +++ b/components/services/heap_profiling/connection_manager.h
@@ -47,6 +47,10 @@ public: ConnectionManager(); + + ConnectionManager(const ConnectionManager&) = delete; + ConnectionManager& operator=(const ConnectionManager&) = delete; + ~ConnectionManager(); // Dumping is asynchronous so will not be complete when this function @@ -110,8 +114,6 @@ // Must be the last. base::WeakPtrFactory<ConnectionManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ConnectionManager); }; } // namespace heap_profiling
diff --git a/components/services/heap_profiling/heap_profiling_service.cc b/components/services/heap_profiling/heap_profiling_service.cc index 713ae6f..ede6ca0 100644 --- a/components/services/heap_profiling/heap_profiling_service.cc +++ b/components/services/heap_profiling/heap_profiling_service.cc
@@ -39,6 +39,9 @@ : heap_profiler_receiver_(this, std::move(profiler_receiver)), helper_(std::move(helper)) {} + ProfilingServiceImpl(const ProfilingServiceImpl&) = delete; + ProfilingServiceImpl& operator=(const ProfilingServiceImpl&) = delete; + ~ProfilingServiceImpl() override = default; // mojom::ProfilingService implementation: @@ -97,8 +100,6 @@ ConnectionManager connection_manager_; base::WeakPtrFactory<ProfilingServiceImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ProfilingServiceImpl); }; void RunHeapProfilingService(
diff --git a/components/services/heap_profiling/public/cpp/controller.h b/components/services/heap_profiling/public/cpp/controller.h index ed19b9a0..f4c1b2e 100644 --- a/components/services/heap_profiling/public/cpp/controller.h +++ b/components/services/heap_profiling/public/cpp/controller.h
@@ -40,6 +40,10 @@ Controller(mojo::PendingRemote<mojom::ProfilingService> service, mojom::StackMode stack_mode, uint32_t sampling_rate); + + Controller(const Controller&) = delete; + Controller& operator=(const Controller&) = delete; + ~Controller(); // Starts Heap Profiling for the client. @@ -67,7 +71,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<Controller> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(Controller); }; } // namespace heap_profiling
diff --git a/components/services/language_detection/language_detection_service_impl.h b/components/services/language_detection/language_detection_service_impl.h index 8cfffc92..6176c1c 100644 --- a/components/services/language_detection/language_detection_service_impl.h +++ b/components/services/language_detection/language_detection_service_impl.h
@@ -22,6 +22,11 @@ public: explicit LanguageDetectionServiceImpl( mojo::PendingReceiver<mojom::LanguageDetectionService> receiver); + + LanguageDetectionServiceImpl(const LanguageDetectionServiceImpl&) = delete; + LanguageDetectionServiceImpl& operator=(const LanguageDetectionServiceImpl&) = + delete; + ~LanguageDetectionServiceImpl() override; private: @@ -30,8 +35,6 @@ DetermineLanguageCallback callback) override; mojo::Receiver<mojom::LanguageDetectionService> receiver_; - - DISALLOW_COPY_AND_ASSIGN(LanguageDetectionServiceImpl); }; } // namespace language_detection
diff --git a/components/services/patch/file_patcher_impl.h b/components/services/patch/file_patcher_impl.h index fab102f..cd293a2 100644 --- a/components/services/patch/file_patcher_impl.h +++ b/components/services/patch/file_patcher_impl.h
@@ -22,6 +22,9 @@ // Constructs a FilePatcherImpl bound to |receiver|. explicit FilePatcherImpl(mojo::PendingReceiver<mojom::FilePatcher> receiver); + FilePatcherImpl(const FilePatcherImpl&) = delete; + FilePatcherImpl& operator=(const FilePatcherImpl&) = delete; + ~FilePatcherImpl() override; private: @@ -36,8 +39,6 @@ PatchFileCourgetteCallback callback) override; mojo::Receiver<mojom::FilePatcher> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(FilePatcherImpl); }; } // namespace patch
diff --git a/components/services/print_compositor/print_compositor_impl.h b/components/services/print_compositor/print_compositor_impl.h index 0ea4d61..dfa436fa 100644 --- a/components/services/print_compositor/print_compositor_impl.h +++ b/components/services/print_compositor/print_compositor_impl.h
@@ -54,6 +54,10 @@ mojo::PendingReceiver<mojom::PrintCompositor> receiver, bool initialize_environment, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); + + PrintCompositorImpl(const PrintCompositorImpl&) = delete; + PrintCompositorImpl& operator=(const PrintCompositorImpl&) = delete; + ~PrintCompositorImpl() override; // mojom::PrintCompositor @@ -250,8 +254,6 @@ // If present, the accessibility tree for the document needed to // export a tagged (accessible) PDF. ui::AXTreeUpdate accessibility_tree_; - - DISALLOW_COPY_AND_ASSIGN(PrintCompositorImpl); }; } // namespace printing
diff --git a/components/services/print_compositor/print_compositor_impl_unittest.cc b/components/services/print_compositor/print_compositor_impl_unittest.cc index bc1c05e1..e765447db 100644 --- a/components/services/print_compositor/print_compositor_impl_unittest.cc +++ b/components/services/print_compositor/print_compositor_impl_unittest.cc
@@ -134,6 +134,12 @@ class PrintCompositorImplCrashKeyTest : public PrintCompositorImplTest { public: PrintCompositorImplCrashKeyTest() {} + + PrintCompositorImplCrashKeyTest(const PrintCompositorImplCrashKeyTest&) = + delete; + PrintCompositorImplCrashKeyTest& operator=( + const PrintCompositorImplCrashKeyTest&) = delete; + ~PrintCompositorImplCrashKeyTest() override {} void SetUp() override { @@ -142,9 +148,6 @@ } void TearDown() override { crash_reporter::ResetCrashKeysForTesting(); } - - private: - DISALLOW_COPY_AND_ASSIGN(PrintCompositorImplCrashKeyTest); }; TEST_F(PrintCompositorImplTest, IsReadyToComposite) {
diff --git a/components/services/quarantine/quarantine_impl.h b/components/services/quarantine/quarantine_impl.h index 3c31d42..877414b 100644 --- a/components/services/quarantine/quarantine_impl.h +++ b/components/services/quarantine/quarantine_impl.h
@@ -22,6 +22,10 @@ public: QuarantineImpl(); explicit QuarantineImpl(mojo::PendingReceiver<mojom::Quarantine> receiver); + + QuarantineImpl(const QuarantineImpl&) = delete; + QuarantineImpl& operator=(const QuarantineImpl&) = delete; + ~QuarantineImpl() override; // mojom::Quarantine: @@ -39,8 +43,6 @@ base::win::ScopedCOMInitializer com_initializer_{ base::win::ScopedCOMInitializer::Uninitialization::kBlockPremature}; #endif // OS_WIN - - DISALLOW_COPY_AND_ASSIGN(QuarantineImpl); }; } // namespace quarantine
diff --git a/components/services/quarantine/quarantine_service_unittest.cc b/components/services/quarantine/quarantine_service_unittest.cc index 8eca0858..cee5c87 100644 --- a/components/services/quarantine/quarantine_service_unittest.cc +++ b/components/services/quarantine/quarantine_service_unittest.cc
@@ -27,6 +27,10 @@ class QuarantineServiceTest : public testing::Test { public: QuarantineServiceTest() = default; + + QuarantineServiceTest(const QuarantineServiceTest&) = delete; + QuarantineServiceTest& operator=(const QuarantineServiceTest&) = delete; + ~QuarantineServiceTest() override = default; void OnFileQuarantined(const base::FilePath& test_file, @@ -44,8 +48,6 @@ private: QuarantineImpl service_{quarantine_.BindNewPipeAndPassReceiver()}; - - DISALLOW_COPY_AND_ASSIGN(QuarantineServiceTest); }; TEST_F(QuarantineServiceTest, QuarantineFile) {
diff --git a/components/services/quarantine/quarantine_win_unittest.cc b/components/services/quarantine/quarantine_win_unittest.cc index 5f81c48..fad769fa0 100644 --- a/components/services/quarantine/quarantine_win_unittest.cc +++ b/components/services/quarantine/quarantine_win_unittest.cc
@@ -83,13 +83,15 @@ ScopedZoneForSite(const std::wstring& domain, const std::wstring& protocol, ZoneIdentifierType zone_identifier_type); + + ScopedZoneForSite(const ScopedZoneForSite&) = delete; + ScopedZoneForSite& operator=(const ScopedZoneForSite&) = delete; + ~ScopedZoneForSite(); private: std::wstring domain_; std::wstring protocol_; - - DISALLOW_COPY_AND_ASSIGN(ScopedZoneForSite); }; ScopedZoneForSite::ScopedZoneForSite(const std::wstring& domain, @@ -136,6 +138,10 @@ class QuarantineWinTest : public ::testing::Test { public: QuarantineWinTest() = default; + + QuarantineWinTest(const QuarantineWinTest&) = delete; + QuarantineWinTest& operator=(const QuarantineWinTest&) = delete; + ~QuarantineWinTest() override = default; void SetUp() override { @@ -177,8 +183,6 @@ std::unique_ptr<ScopedZoneForSite> scoped_zone_for_trusted_site_; std::unique_ptr<ScopedZoneForSite> scoped_zone_for_internet_site_; std::unique_ptr<ScopedZoneForSite> scoped_zone_for_restricted_site_; - - DISALLOW_COPY_AND_ASSIGN(QuarantineWinTest); }; // If the file is missing, the QuarantineFile() call should return FILE_MISSING.
diff --git a/components/services/storage/dom_storage/async_dom_storage_database.cc b/components/services/storage/dom_storage/async_dom_storage_database.cc index 2c5d5fe..2381cbf 100644 --- a/components/services/storage/dom_storage/async_dom_storage_database.cc +++ b/components/services/storage/dom_storage/async_dom_storage_database.cc
@@ -98,7 +98,6 @@ void AsyncDomStorageDatabase::RewriteDB(StatusCallback callback) { DCHECK(database_); database_.PostTaskWithThisObject( - FROM_HERE, base::BindOnce( [](StatusCallback callback, scoped_refptr<base::SequencedTaskRunner> callback_task_runner, @@ -174,7 +173,7 @@ std::swap(tasks, tasks_to_run_on_open_); if (status.ok()) { for (auto& task : tasks) - database_.PostTaskWithThisObject(FROM_HERE, std::move(task)); + database_.PostTaskWithThisObject(std::move(task)); } std::move(callback).Run(status); }
diff --git a/components/services/storage/dom_storage/async_dom_storage_database.h b/components/services/storage/dom_storage/async_dom_storage_database.h index 465f263..b9b7ace 100644 --- a/components/services/storage/dom_storage/async_dom_storage_database.h +++ b/components/services/storage/dom_storage/async_dom_storage_database.h
@@ -32,6 +32,9 @@ public: using StatusCallback = base::OnceCallback<void(leveldb::Status)>; + AsyncDomStorageDatabase(const AsyncDomStorageDatabase&) = delete; + AsyncDomStorageDatabase& operator=(const AsyncDomStorageDatabase&) = delete; + ~AsyncDomStorageDatabase(); static std::unique_ptr<AsyncDomStorageDatabase> OpenDirectory( @@ -96,7 +99,7 @@ std::move(task), std::move(callback), base::SequencedTaskRunnerHandle::Get()); if (database_) { - database_.PostTaskWithThisObject(FROM_HERE, std::move(wrapped_task)); + database_.PostTaskWithThisObject(std::move(wrapped_task)); } else { tasks_to_run_on_open_.push_back(std::move(wrapped_task)); } @@ -121,8 +124,6 @@ std::vector<BoundDatabaseTask> tasks_to_run_on_open_; base::WeakPtrFactory<AsyncDomStorageDatabase> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AsyncDomStorageDatabase); }; namespace internal {
diff --git a/components/services/storage/dom_storage/dom_storage_database.h b/components/services/storage/dom_storage/dom_storage_database.h index 2388d41e..04bb7fa 100644 --- a/components/services/storage/dom_storage/dom_storage_database.h +++ b/components/services/storage/dom_storage/dom_storage_database.h
@@ -64,6 +64,9 @@ Value value; }; + DomStorageDatabase(const DomStorageDatabase&) = delete; + DomStorageDatabase& operator=(const DomStorageDatabase&) = delete; + ~DomStorageDatabase() override; // Callback invoked asynchronously with the result of both |OpenDirectory()| @@ -208,8 +211,6 @@ base::OnceClosure destruction_callback_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(DomStorageDatabase); }; } // namespace storage
diff --git a/components/services/storage/dom_storage/dom_storage_database_unittest.cc b/components/services/storage/dom_storage/dom_storage_database_unittest.cc index 398e2e8..34b436e7 100644 --- a/components/services/storage/dom_storage/dom_storage_database_unittest.cc +++ b/components/services/storage/dom_storage/dom_storage_database_unittest.cc
@@ -128,7 +128,6 @@ Func operation) { base::RunLoop loop; database.PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& database) { operation(database); loop.Quit();
diff --git a/components/services/storage/dom_storage/local_storage_impl_unittest.cc b/components/services/storage/dom_storage/local_storage_impl_unittest.cc index 8a2f13f..b1be3f87 100644 --- a/components/services/storage/dom_storage/local_storage_impl_unittest.cc +++ b/components/services/storage/dom_storage/local_storage_impl_unittest.cc
@@ -106,6 +106,9 @@ public: LocalStorageImplTest() { EXPECT_TRUE(temp_path_.CreateUniqueTempDir()); } + LocalStorageImplTest(const LocalStorageImplTest&) = delete; + LocalStorageImplTest& operator=(const LocalStorageImplTest&) = delete; + ~LocalStorageImplTest() override { if (storage_) ShutDownStorage(); @@ -151,7 +154,6 @@ WaitForDatabaseOpen(); base::RunLoop loop; context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::Status status = db.Put(base::as_bytes(base::make_span(key)), @@ -166,7 +168,6 @@ WaitForDatabaseOpen(); base::RunLoop loop; context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::WriteBatch batch; leveldb::Status status = db.DeletePrefixed({}, &batch); @@ -183,7 +184,6 @@ WaitForDatabaseOpen(); base::RunLoop loop; context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::Status status = db.GetPrefixed({}, &entries); ASSERT_TRUE(status.ok()); @@ -293,8 +293,6 @@ base::ScopedTempDir temp_path_; std::unique_ptr<LocalStorageImpl> storage_; - - DISALLOW_COPY_AND_ASSIGN(LocalStorageImplTest); }; TEST_F(LocalStorageImplTest, Basic) { @@ -929,7 +927,7 @@ bool first_database_destroyed = false; context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](DomStorageDatabase* db) { + base::BindLambdaForTesting([&](DomStorageDatabase* db) { db->MakeAllCommitsFailForTesting(); db->SetDestructionCallbackForTesting(base::BindLambdaForTesting([&] { first_database_destroyed = true; @@ -1043,7 +1041,7 @@ // Ensure that all commits fail on the database, and that we observe its // destruction. context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](DomStorageDatabase* db) { + base::BindLambdaForTesting([&](DomStorageDatabase* db) { db->MakeAllCommitsFailForTesting(); db->SetDestructionCallbackForTesting( base::BindLambdaForTesting([&] { ++num_databases_destroyed; })); @@ -1085,10 +1083,8 @@ open_loop->Run(); EXPECT_EQ(2u, num_database_open_requests); EXPECT_EQ(1u, num_databases_destroyed); - context()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindOnce([](DomStorageDatabase* db) { - db->MakeAllCommitsFailForTesting(); - })); + context()->GetDatabaseForTesting().PostTaskWithThisObject(base::BindOnce( + [](DomStorageDatabase* db) { db->MakeAllCommitsFailForTesting(); })); // Reconnect a area to the database, and repeatedly write data to it again. // This time all should just keep getting written, and commit errors are
diff --git a/components/services/storage/dom_storage/session_storage_area_impl.h b/components/services/storage/dom_storage/session_storage_area_impl.h index 237f8d4..566ee22 100644 --- a/components/services/storage/dom_storage/session_storage_area_impl.h +++ b/components/services/storage/dom_storage/session_storage_area_impl.h
@@ -53,6 +53,10 @@ blink::StorageKey storage_key, scoped_refptr<SessionStorageDataMap> data_map, RegisterNewAreaMap register_new_map_callback); + + SessionStorageAreaImpl(const SessionStorageAreaImpl&) = delete; + SessionStorageAreaImpl& operator=(const SessionStorageAreaImpl&) = delete; + ~SessionStorageAreaImpl() override; // Creates a shallow copy clone for the new namespace entry. @@ -119,8 +123,6 @@ mojo::ReceiverSet<blink::mojom::StorageArea> receivers_; base::WeakPtrFactory<SessionStorageAreaImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SessionStorageAreaImpl); }; } // namespace storage
diff --git a/components/services/storage/dom_storage/session_storage_data_map_unittest.cc b/components/services/storage/dom_storage/session_storage_data_map_unittest.cc index 6e52ec2..495752c 100644 --- a/components/services/storage/dom_storage/session_storage_data_map_unittest.cc +++ b/components/services/storage/dom_storage/session_storage_data_map_unittest.cc
@@ -82,7 +82,7 @@ loop.Run(); database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindOnce([](const DomStorageDatabase& db) { + base::BindOnce([](const DomStorageDatabase& db) { // Should show up in first map. leveldb::Status status = db.Put(MakeBytes("map-1-key1"), MakeBytes("data1")); @@ -100,7 +100,6 @@ std::vector<DomStorageDatabase::KeyValuePair> entries; base::RunLoop loop; database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::Status status = db.GetPrefixed({}, &entries); ASSERT_TRUE(status.ok());
diff --git a/components/services/storage/dom_storage/session_storage_impl_unittest.cc b/components/services/storage/dom_storage/session_storage_impl_unittest.cc index ae0a2ed..681b3c69 100644 --- a/components/services/storage/dom_storage/session_storage_impl_unittest.cc +++ b/components/services/storage/dom_storage/session_storage_impl_unittest.cc
@@ -56,6 +56,9 @@ public: SessionStorageImplTest() { CHECK(temp_dir_.CreateUniqueTempDir()); } + SessionStorageImplTest(const SessionStorageImplTest&) = delete; + SessionStorageImplTest& operator=(const SessionStorageImplTest&) = delete; + ~SessionStorageImplTest() override { EXPECT_TRUE(temp_dir_.Delete()); } @@ -161,8 +164,6 @@ {base::MayBlock(), base::TaskShutdownBehavior::BLOCK_SHUTDOWN})}; std::unique_ptr<SessionStorageImpl> session_storage_; mojo::Remote<mojom::SessionStorageControl> remote_session_storage_; - - DISALLOW_COPY_AND_ASSIGN(SessionStorageImplTest); }; TEST_F(SessionStorageImplTest, MigrationV0ToV1) { @@ -662,7 +663,7 @@ // Ensure that the first opened database always fails to write data. session_storage_impl()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](DomStorageDatabase* db) { + base::BindLambdaForTesting([&](DomStorageDatabase* db) { db->MakeAllCommitsFailForTesting(); db->SetDestructionCallbackForTesting( base::BindLambdaForTesting([&] { ++num_databases_destroyed; })); @@ -782,7 +783,7 @@ // Ensure that this database always fails to write data. session_storage_impl()->GetDatabaseForTesting().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](DomStorageDatabase* db) { + base::BindLambdaForTesting([&](DomStorageDatabase* db) { db->MakeAllCommitsFailForTesting(); db->SetDestructionCallbackForTesting( base::BindLambdaForTesting([&] { ++num_databases_destroyed; }));
diff --git a/components/services/storage/dom_storage/session_storage_metadata_unittest.cc b/components/services/storage/dom_storage/session_storage_metadata_unittest.cc index 2b8c083..fa21672 100644 --- a/components/services/storage/dom_storage/session_storage_metadata_unittest.cc +++ b/components/services/storage/dom_storage/session_storage_metadata_unittest.cc
@@ -83,7 +83,6 @@ base::RunLoop loop; database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { EXPECT_TRUE(db.Get(database_version_key_, &version_value).ok()); EXPECT_TRUE(db.Get(next_map_id_key_, &next_map_id_value).ok()); @@ -119,7 +118,6 @@ // | version | 1 | base::RunLoop loop; database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { db.Put(StdStringToUint8Vector(std::string("namespace-") + test_namespace1_id_ + "-" + @@ -157,7 +155,6 @@ std::vector<DomStorageDatabase::KeyValuePair> entries; base::RunLoop loop; database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::Status status = db.GetPrefixed({}, &entries); ASSERT_TRUE(status.ok());
diff --git a/components/services/storage/dom_storage/session_storage_namespace_impl_unittest.cc b/components/services/storage/dom_storage/session_storage_namespace_impl_unittest.cc index 9425fcf..2c30996 100644 --- a/components/services/storage/dom_storage/session_storage_namespace_impl_unittest.cc +++ b/components/services/storage/dom_storage/session_storage_namespace_impl_unittest.cc
@@ -89,7 +89,6 @@ // Put some data in one of the maps. base::RunLoop put_loop; database_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { ASSERT_TRUE(db.Put(StdStringToUint8Vector("map-0-key1"), StdStringToUint8Vector("data1"))
diff --git a/components/services/storage/dom_storage/storage_area_impl.h b/components/services/storage/dom_storage/storage_area_impl.h index f994103..26458a4 100644 --- a/components/services/storage/dom_storage/storage_area_impl.h +++ b/components/services/storage/dom_storage/storage_area_impl.h
@@ -96,6 +96,9 @@ Delegate* delegate, const Options& options); + StorageAreaImpl(const StorageAreaImpl&) = delete; + StorageAreaImpl& operator=(const StorageAreaImpl&) = delete; + ~StorageAreaImpl() override; // Initializes the storage area as loaded & empty. This can only be called @@ -346,8 +349,6 @@ base::WeakPtrFactory<StorageAreaImpl> weak_ptr_factory_{this}; static bool s_aggressive_flushing_enabled_; - - DISALLOW_COPY_AND_ASSIGN(StorageAreaImpl); }; } // namespace storage
diff --git a/components/services/storage/dom_storage/storage_area_impl_unittest.cc b/components/services/storage/dom_storage/storage_area_impl_unittest.cc index 1fe1d07..2a044647 100644 --- a/components/services/storage/dom_storage/storage_area_impl_unittest.cc +++ b/components/services/storage/dom_storage/storage_area_impl_unittest.cc
@@ -168,7 +168,6 @@ const std::vector<uint8_t>& value) { base::RunLoop loop; db_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { ASSERT_TRUE(db.Put(key, value).ok()); loop.Quit(); @@ -184,7 +183,6 @@ std::vector<uint8_t> value; base::RunLoop loop; db_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { ASSERT_TRUE(db.Get(ToBytes(key), &value).ok()); loop.Quit(); @@ -197,7 +195,6 @@ base::RunLoop loop; leveldb::Status status; db_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { std::vector<uint8_t> value; status = db.Get(ToBytes(key), &value); @@ -210,7 +207,6 @@ void ClearDatabase() { base::RunLoop loop; db_->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const DomStorageDatabase& db) { leveldb::WriteBatch batch; ASSERT_TRUE(db.DeletePrefixed({}, &batch).ok());
diff --git a/components/services/storage/indexed_db/leveldb/leveldb_factory.h b/components/services/storage/indexed_db/leveldb/leveldb_factory.h index 46b11ee..595fcdf 100644 --- a/components/services/storage/indexed_db/leveldb/leveldb_factory.h +++ b/components/services/storage/indexed_db/leveldb/leveldb_factory.h
@@ -62,6 +62,10 @@ // for memory profiling reporting in the in-memory database environment. DefaultLevelDBFactory(leveldb_env::Options database_options, const std::string& in_memory_db_name); + + DefaultLevelDBFactory(const DefaultLevelDBFactory&) = delete; + DefaultLevelDBFactory& operator=(const DefaultLevelDBFactory&) = delete; + ~DefaultLevelDBFactory() override; std::tuple<std::unique_ptr<leveldb::DB>, leveldb::Status> OpenInMemoryDB( @@ -84,8 +88,6 @@ protected: leveldb_env::Options options_; std::string in_memory_db_name_; - - DISALLOW_COPY_AND_ASSIGN(DefaultLevelDBFactory); }; } // namespace content
diff --git a/components/services/storage/indexed_db/scopes/disjoint_range_lock_manager.h b/components/services/storage/indexed_db/scopes/disjoint_range_lock_manager.h index b6dfcc1..97ee3744 100644 --- a/components/services/storage/indexed_db/scopes/disjoint_range_lock_manager.h +++ b/components/services/storage/indexed_db/scopes/disjoint_range_lock_manager.h
@@ -40,6 +40,10 @@ // leveldb keys, and the current task runner that we are running on. The task // runner will be used for the lock acquisition callbacks. explicit DisjointRangeLockManager(int level_count); + + DisjointRangeLockManager(const DisjointRangeLockManager&) = delete; + DisjointRangeLockManager& operator=(const DisjointRangeLockManager&) = delete; + ~DisjointRangeLockManager() override; int64_t LocksHeldForTesting() const override; @@ -112,7 +116,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<DisjointRangeLockManager> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(DisjointRangeLockManager); }; } // namespace content
diff --git a/components/services/storage/indexed_db/scopes/leveldb_scope.h b/components/services/storage/indexed_db/scopes/leveldb_scope.h index 3e6fc380..deba7a8 100644 --- a/components/services/storage/indexed_db/scopes/leveldb_scope.h +++ b/components/services/storage/indexed_db/scopes/leveldb_scope.h
@@ -71,6 +71,9 @@ using TearDownCallback = base::RepeatingCallback<void(leveldb::Status)>; using CleanupCallback = base::OnceCallback<void(int64_t scope_id)>; + LevelDBScope(const LevelDBScope&) = delete; + LevelDBScope& operator=(const LevelDBScope&) = delete; + ~LevelDBScope(); int64_t scope_id() const { @@ -215,8 +218,6 @@ LevelDBScopesCleanupTask cleanup_task_buffer_; ScopesEncoder key_encoder_; std::string value_buffer_; - - DISALLOW_COPY_AND_ASSIGN(LevelDBScope); }; } // namespace content
diff --git a/components/services/storage/indexed_db/scopes/leveldb_scopes.h b/components/services/storage/indexed_db/scopes/leveldb_scopes.h index 0b1596e..7ad30d0 100644 --- a/components/services/storage/indexed_db/scopes/leveldb_scopes.h +++ b/components/services/storage/indexed_db/scopes/leveldb_scopes.h
@@ -54,6 +54,10 @@ scoped_refptr<LevelDBState> level_db, ScopesLockManager* lock_manager, TearDownCallback tear_down_callback); + + LevelDBScopes(const LevelDBScopes&) = delete; + LevelDBScopes& operator=(const LevelDBScopes&) = delete; + ~LevelDBScopes(); // This method needs to be called before any other method on this class. If @@ -147,7 +151,6 @@ #endif base::WeakPtrFactory<LevelDBScopes> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(LevelDBScopes); }; } // namespace content
diff --git a/components/services/storage/indexed_db/scopes/leveldb_scopes_tasks.h b/components/services/storage/indexed_db/scopes/leveldb_scopes_tasks.h index feae9abc..136112b 100644 --- a/components/services/storage/indexed_db/scopes/leveldb_scopes_tasks.h +++ b/components/services/storage/indexed_db/scopes/leveldb_scopes_tasks.h
@@ -30,6 +30,10 @@ public: explicit LevelDBScopesTask(scoped_refptr<LevelDBState> level_db, size_t max_write_batch_size_bytes); + + LevelDBScopesTask(const LevelDBScopesTask&) = delete; + LevelDBScopesTask& operator=(const LevelDBScopesTask&) = delete; + ~LevelDBScopesTask(); protected: @@ -53,9 +57,6 @@ const scoped_refptr<LevelDBState> level_db_; const size_t max_write_batch_size_bytes_; leveldb::WriteBatch write_batch_; - - private: - DISALLOW_COPY_AND_ASSIGN(LevelDBScopesTask); }; // Deletes the undo log for a given scope, and optionally executes the cleanup
diff --git a/components/services/storage/indexed_db/scopes/scope_lock.h b/components/services/storage/indexed_db/scopes/scope_lock.h index 35cde17..139b468a 100644 --- a/components/services/storage/indexed_db/scopes/scope_lock.h +++ b/components/services/storage/indexed_db/scopes/scope_lock.h
@@ -27,6 +27,10 @@ base::OnceCallback<void(int level, ScopeLockRange range)>; ScopeLock(); + + ScopeLock(const ScopeLock&) = delete; + ScopeLock& operator=(const ScopeLock&) = delete; + ~ScopeLock(); ScopeLock(ScopeLock&&) noexcept; // |lock_released_callback| is called when the lock is released, either by @@ -61,8 +65,6 @@ // Closure to run when the lock is released. The lock is held when this is // non-null. LockReleasedCallback lock_released_callback_; - - DISALLOW_COPY_AND_ASSIGN(ScopeLock); }; // Logging support.
diff --git a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h index dbdcf1e5..d04f477 100644 --- a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h +++ b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_database.h
@@ -40,6 +40,10 @@ class LevelDBSnapshot { public: explicit LevelDBSnapshot(TransactionalLevelDBDatabase* db); + + LevelDBSnapshot(const LevelDBSnapshot&) = delete; + LevelDBSnapshot& operator=(const LevelDBSnapshot&) = delete; + ~LevelDBSnapshot(); const leveldb::Snapshot* snapshot() const { return snapshot_; } @@ -47,8 +51,6 @@ private: leveldb::DB* db_; const leveldb::Snapshot* snapshot_; - - DISALLOW_COPY_AND_ASSIGN(LevelDBSnapshot); }; class TransactionalLevelDBDatabase
diff --git a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_iterator.h b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_iterator.h index 7e15680..3fd50f8 100644 --- a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_iterator.h +++ b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_iterator.h
@@ -34,6 +34,10 @@ // OnDatabaseRangeModified are called. class TransactionalLevelDBIterator { public: + TransactionalLevelDBIterator(const TransactionalLevelDBIterator&) = delete; + TransactionalLevelDBIterator& operator=(const TransactionalLevelDBIterator&) = + delete; + virtual ~TransactionalLevelDBIterator(); virtual bool IsValid() const; @@ -101,8 +105,6 @@ std::unique_ptr<LevelDBSnapshot> snapshot_; const leveldb::Comparator* const comparator_; - - DISALLOW_COPY_AND_ASSIGN(TransactionalLevelDBIterator); }; } // namespace content
diff --git a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_transaction.h b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_transaction.h index 976cd26..f272fd1 100644 --- a/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_transaction.h +++ b/components/services/storage/indexed_db/transactional_leveldb/transactional_leveldb_transaction.h
@@ -146,6 +146,9 @@ // WriteBatch. class LevelDBDirectTransaction { public: + LevelDBDirectTransaction(const LevelDBDirectTransaction&) = delete; + LevelDBDirectTransaction& operator=(const LevelDBDirectTransaction&) = delete; + virtual ~LevelDBDirectTransaction(); leveldb::Status Put(const base::StringPiece& key, const std::string* value); @@ -166,8 +169,6 @@ TransactionalLevelDBDatabase* const db_; std::unique_ptr<LevelDBWriteBatch> write_batch_; - - DISALLOW_COPY_AND_ASSIGN(LevelDBDirectTransaction); }; } // namespace content
diff --git a/components/services/storage/origin_context_impl.h b/components/services/storage/origin_context_impl.h index dd41311..e323799 100644 --- a/components/services/storage/origin_context_impl.h +++ b/components/services/storage/origin_context_impl.h
@@ -18,6 +18,10 @@ class OriginContextImpl : public mojom::OriginContext { public: OriginContextImpl(PartitionImpl* partition, const url::Origin& origin); + + OriginContextImpl(const OriginContextImpl&) = delete; + OriginContextImpl& operator=(const OriginContextImpl&) = delete; + ~OriginContextImpl() override; const mojo::ReceiverSet<mojom::OriginContext>& receivers() const { @@ -32,8 +36,6 @@ PartitionImpl* const partition_; const url::Origin origin_; mojo::ReceiverSet<mojom::OriginContext> receivers_; - - DISALLOW_COPY_AND_ASSIGN(OriginContextImpl); }; } // namespace storage
diff --git a/components/services/storage/partition_impl.h b/components/services/storage/partition_impl.h index d69f925..4e70204 100644 --- a/components/services/storage/partition_impl.h +++ b/components/services/storage/partition_impl.h
@@ -31,6 +31,10 @@ // |service| owns and outlives this object. explicit PartitionImpl(StorageServiceImpl* service, const absl::optional<base::FilePath>& path); + + PartitionImpl(const PartitionImpl&) = delete; + PartitionImpl& operator=(const PartitionImpl&) = delete; + ~PartitionImpl() override; const absl::optional<base::FilePath>& path() const { return path_; } @@ -70,8 +74,6 @@ std::unique_ptr<SessionStorageImpl> session_storage_; std::unique_ptr<LocalStorageImpl> local_storage_; std::unique_ptr<ServiceWorkerStorageControlImpl> service_worker_storage_; - - DISALLOW_COPY_AND_ASSIGN(PartitionImpl); }; } // namespace storage
diff --git a/components/services/storage/partition_impl_unittest.cc b/components/services/storage/partition_impl_unittest.cc index 883f1b0..39f3e77 100644 --- a/components/services/storage/partition_impl_unittest.cc +++ b/components/services/storage/partition_impl_unittest.cc
@@ -21,6 +21,12 @@ class StorageServicePartitionImplTest : public testing::Test { public: StorageServicePartitionImplTest() = default; + + StorageServicePartitionImplTest(const StorageServicePartitionImplTest&) = + delete; + StorageServicePartitionImplTest& operator=( + const StorageServicePartitionImplTest&) = delete; + ~StorageServicePartitionImplTest() override = default; void SetUp() override { @@ -45,8 +51,6 @@ /*io_task_runner=*/nullptr}; mojo::Remote<mojom::Partition> remote_test_partition_; PartitionImpl* test_partition_impl_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(StorageServicePartitionImplTest); }; TEST_F(StorageServicePartitionImplTest, IndependentOriginContexts) {
diff --git a/components/services/storage/service_worker/service_worker_database.h b/components/services/storage/service_worker/service_worker_database.h index f66194e..db71b19f 100644 --- a/components/services/storage/service_worker/service_worker_database.h +++ b/components/services/storage/service_worker/service_worker_database.h
@@ -53,6 +53,10 @@ public: // We do leveldb stuff in |path| or in memory if |path| is empty. explicit ServiceWorkerDatabase(const base::FilePath& path); + + ServiceWorkerDatabase(const ServiceWorkerDatabase&) = delete; + ServiceWorkerDatabase& operator=(const ServiceWorkerDatabase&) = delete; + ~ServiceWorkerDatabase(); using Status = mojom::ServiceWorkerDatabaseStatus; @@ -417,8 +421,6 @@ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, InvalidWebFeature); FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, NoCrossOriginEmbedderPolicyValue); - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); }; } // namespace storage
diff --git a/components/services/storage/service_worker/service_worker_storage.h b/components/services/storage/service_worker/service_worker_storage.h index 485f781..708c5065 100644 --- a/components/services/storage/service_worker/service_worker_storage.h +++ b/components/services/storage/service_worker/service_worker_storage.h
@@ -99,6 +99,9 @@ base::OnceCallback<void(ServiceWorkerDatabase::Status, std::vector<mojom::ServiceWorkerUserDataPtr>)>; + ServiceWorkerStorage(const ServiceWorkerStorage&) = delete; + ServiceWorkerStorage& operator=(const ServiceWorkerStorage&) = delete; + ~ServiceWorkerStorage(); static std::unique_ptr<ServiceWorkerStorage> Create( @@ -562,8 +565,6 @@ resource_metadata_writers_; base::WeakPtrFactory<ServiceWorkerStorage> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); }; } // namespace storage
diff --git a/components/services/storage/storage_service_impl.h b/components/services/storage/storage_service_impl.h index c12e2cc..2fc09f3 100644 --- a/components/services/storage/storage_service_impl.h +++ b/components/services/storage/storage_service_impl.h
@@ -36,6 +36,10 @@ // browser. StorageServiceImpl(mojo::PendingReceiver<mojom::StorageService> receiver, scoped_refptr<base::SequencedTaskRunner> io_task_runner); + + StorageServiceImpl(const StorageServiceImpl&) = delete; + StorageServiceImpl& operator=(const StorageServiceImpl&) = delete; + ~StorageServiceImpl() override; const auto& partitions() const { return partitions_; } @@ -87,8 +91,6 @@ std::map<base::FilePath, PartitionImpl*> persistent_partition_map_; base::WeakPtrFactory<StorageServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(StorageServiceImpl); }; } // namespace storage
diff --git a/components/services/storage/storage_service_impl_unittest.cc b/components/services/storage/storage_service_impl_unittest.cc index 29d197e..7ab506c1 100644 --- a/components/services/storage/storage_service_impl_unittest.cc +++ b/components/services/storage/storage_service_impl_unittest.cc
@@ -19,6 +19,10 @@ class StorageServiceImplTest : public testing::Test { public: StorageServiceImplTest() = default; + + StorageServiceImplTest(const StorageServiceImplTest&) = delete; + StorageServiceImplTest& operator=(const StorageServiceImplTest&) = delete; + ~StorageServiceImplTest() override = default; protected: @@ -30,8 +34,6 @@ mojo::Remote<mojom::StorageService> remote_service_; StorageServiceImpl service_{remote_service_.BindNewPipeAndPassReceiver(), /*io_task_runner=*/nullptr}; - - DISALLOW_COPY_AND_ASSIGN(StorageServiceImplTest); }; TEST_F(StorageServiceImplTest, UniqueInMemoryPartitions) {
diff --git a/components/services/unzip/unzipper_impl.cc b/components/services/unzip/unzipper_impl.cc index 04602bb..b710ab8 100644 --- a/components/services/unzip/unzipper_impl.cc +++ b/components/services/unzip/unzipper_impl.cc
@@ -24,15 +24,16 @@ class DudWriterDelegate : public zip::WriterDelegate { public: DudWriterDelegate() {} + + DudWriterDelegate(const DudWriterDelegate&) = delete; + DudWriterDelegate& operator=(const DudWriterDelegate&) = delete; + ~DudWriterDelegate() override {} // WriterDelegate methods: bool PrepareOutput() override { return false; } bool WriteBytes(const char* data, int num_bytes) override { return false; } void SetTimeModified(const base::Time& time) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(DudWriterDelegate); }; std::string PathToMojoString(const base::FilePath& path) {
diff --git a/components/services/unzip/unzipper_impl.h b/components/services/unzip/unzipper_impl.h index 4f81e4c..a65175ff 100644 --- a/components/services/unzip/unzipper_impl.h +++ b/components/services/unzip/unzipper_impl.h
@@ -23,6 +23,9 @@ // Constructs an UnzipperImpl bound to |receiver|. explicit UnzipperImpl(mojo::PendingReceiver<mojom::Unzipper> receiver); + UnzipperImpl(const UnzipperImpl&) = delete; + UnzipperImpl& operator=(const UnzipperImpl&) = delete; + ~UnzipperImpl() override; private: @@ -39,8 +42,6 @@ UnzipWithFilterCallback callback) override; mojo::Receiver<mojom::Unzipper> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(UnzipperImpl); }; } // namespace unzip
diff --git a/components/session_manager/core/session_manager.h b/components/session_manager/core/session_manager.h index 0480f5d..c9fb7308 100644 --- a/components/session_manager/core/session_manager.h +++ b/components/session_manager/core/session_manager.h
@@ -22,6 +22,10 @@ class SESSION_EXPORT SessionManager { public: SessionManager(); + + SessionManager(const SessionManager&) = delete; + SessionManager& operator=(const SessionManager&) = delete; + virtual ~SessionManager(); // Returns current SessionManager instance and NULL if it hasn't been @@ -117,8 +121,6 @@ std::vector<Session> sessions_; base::ObserverList<SessionManagerObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(SessionManager); }; } // namespace session_manager
diff --git a/components/sessions/content/content_live_tab.h b/components/sessions/content/content_live_tab.h index a11bd412..89b90c7 100644 --- a/components/sessions/content/content_live_tab.h +++ b/components/sessions/content/content_live_tab.h
@@ -26,6 +26,9 @@ : public LiveTab, public base::SupportsUserData::Data { public: + ContentLiveTab(const ContentLiveTab&) = delete; + ContentLiveTab& operator=(const ContentLiveTab&) = delete; + ~ContentLiveTab() override; // Returns the ContentLiveTab associated with |web_contents|, creating it if @@ -57,8 +60,6 @@ } content::WebContents* web_contents_; - - DISALLOW_COPY_AND_ASSIGN(ContentLiveTab); }; } // namespace sessions
diff --git a/components/sessions/content/content_record_password_state.cc b/components/sessions/content/content_record_password_state.cc index c9c9a92d..5419b39 100644 --- a/components/sessions/content/content_record_password_state.cc +++ b/components/sessions/content/content_record_password_state.cc
@@ -19,6 +19,10 @@ explicit PasswordStateData( SerializedNavigationEntry::PasswordState password_state) : password_state_(password_state) {} + + PasswordStateData(const PasswordStateData&) = delete; + PasswordStateData& operator=(const PasswordStateData&) = delete; + ~PasswordStateData() override = default; SerializedNavigationEntry::PasswordState password_state() const { @@ -32,8 +36,6 @@ private: const SerializedNavigationEntry::PasswordState password_state_; - - DISALLOW_COPY_AND_ASSIGN(PasswordStateData); }; } // namespace
diff --git a/components/sessions/content/content_serialized_navigation_builder_unittest.cc b/components/sessions/content/content_serialized_navigation_builder_unittest.cc index 0f8699e..177b9c2 100644 --- a/components/sessions/content/content_serialized_navigation_builder_unittest.cc +++ b/components/sessions/content/content_serialized_navigation_builder_unittest.cc
@@ -44,6 +44,10 @@ class TestExtendedInfoHandler : public ExtendedInfoHandler { public: explicit TestExtendedInfoHandler(const char* key) : key_(key) {} + + TestExtendedInfoHandler(const TestExtendedInfoHandler&) = delete; + TestExtendedInfoHandler& operator=(const TestExtendedInfoHandler&) = delete; + ~TestExtendedInfoHandler() override {} // ExtendedInfoHandler: @@ -59,8 +63,6 @@ private: const char* key_; - - DISALLOW_COPY_AND_ASSIGN(TestExtendedInfoHandler); }; std::unique_ptr<content::NavigationEntry> MakeNavigationEntryForTest() { @@ -110,6 +112,12 @@ class ContentSerializedNavigationBuilderTest : public testing::Test { public: ContentSerializedNavigationBuilderTest() {} + + ContentSerializedNavigationBuilderTest( + const ContentSerializedNavigationBuilderTest&) = delete; + ContentSerializedNavigationBuilderTest& operator=( + const ContentSerializedNavigationBuilderTest&) = delete; + ~ContentSerializedNavigationBuilderTest() override {} void SetUp() override { @@ -128,9 +136,6 @@ ContentSerializedNavigationDriver::GetInstance(); driver->extended_info_handler_map_.clear(); } - - private: - DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationBuilderTest); }; // Create a SerializedNavigationEntry from a NavigationEntry. All its fields
diff --git a/components/sessions/content/content_serialized_navigation_driver.h b/components/sessions/content/content_serialized_navigation_driver.h index 82a9b81..c3d07185 100644 --- a/components/sessions/content/content_serialized_navigation_driver.h +++ b/components/sessions/content/content_serialized_navigation_driver.h
@@ -25,6 +25,11 @@ class SESSIONS_EXPORT ContentSerializedNavigationDriver : public SerializedNavigationDriver { public: + ContentSerializedNavigationDriver(const ContentSerializedNavigationDriver&) = + delete; + ContentSerializedNavigationDriver& operator=( + const ContentSerializedNavigationDriver&) = delete; + ~ContentSerializedNavigationDriver() override; // Returns the singleton ContentSerializedNavigationDriver. Almost all @@ -64,8 +69,6 @@ friend class ContentSerializedNavigationBuilderTest; ExtendedInfoHandlerMap extended_info_handler_map_; - - DISALLOW_COPY_AND_ASSIGN(ContentSerializedNavigationDriver); }; } // namespace sessions
diff --git a/components/sessions/content/navigation_task_id_unittest.cc b/components/sessions/content/navigation_task_id_unittest.cc index 1339854e..c3b40b24 100644 --- a/components/sessions/content/navigation_task_id_unittest.cc +++ b/components/sessions/content/navigation_task_id_unittest.cc
@@ -13,6 +13,10 @@ class NavigationTaskIDTest : public testing::Test { public: NavigationTaskIDTest() {} + + NavigationTaskIDTest(const NavigationTaskIDTest&) = delete; + NavigationTaskIDTest& operator=(const NavigationTaskIDTest&) = delete; + ~NavigationTaskIDTest() override {} void SetUp() override { @@ -21,9 +25,6 @@ protected: std::unique_ptr<content::NavigationEntry> navigation_entry_; - - private: - DISALLOW_COPY_AND_ASSIGN(NavigationTaskIDTest); }; TEST_F(NavigationTaskIDTest, TaskIDTest) {
diff --git a/components/sessions/content/session_tab_helper.h b/components/sessions/content/session_tab_helper.h index d101b0b..c5d7baf7 100644 --- a/components/sessions/content/session_tab_helper.h +++ b/components/sessions/content/session_tab_helper.h
@@ -24,6 +24,9 @@ using DelegateLookup = base::RepeatingCallback<SessionTabHelperDelegate*(content::WebContents*)>; + SessionTabHelper(const SessionTabHelper&) = delete; + SessionTabHelper& operator=(const SessionTabHelper&) = delete; + ~SessionTabHelper() override; // Returns the identifier used by session restore for this tab. @@ -79,8 +82,6 @@ SessionID window_id_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SessionTabHelper); }; } // namespace sessions
diff --git a/components/sessions/core/command_storage_manager_test_helper.h b/components/sessions/core/command_storage_manager_test_helper.h index f8399ce..1c342bca 100644 --- a/components/sessions/core/command_storage_manager_test_helper.h +++ b/components/sessions/core/command_storage_manager_test_helper.h
@@ -20,6 +20,12 @@ public: explicit CommandStorageManagerTestHelper( CommandStorageManager* command_storage_manager); + + CommandStorageManagerTestHelper(const CommandStorageManagerTestHelper&) = + delete; + CommandStorageManagerTestHelper& operator=( + const CommandStorageManagerTestHelper&) = delete; + ~CommandStorageManagerTestHelper() = default; // This posts the task to the SequencedWorkerPool, or run immediately @@ -42,8 +48,6 @@ private: CommandStorageManager* command_storage_manager_; - - DISALLOW_COPY_AND_ASSIGN(CommandStorageManagerTestHelper); }; } // namespace sessions
diff --git a/components/sessions/core/tab_restore_service.h b/components/sessions/core/tab_restore_service.h index 83f3534..128c2f6d 100644 --- a/components/sessions/core/tab_restore_service.h +++ b/components/sessions/core/tab_restore_service.h
@@ -63,6 +63,9 @@ }; struct SESSIONS_EXPORT Entry { + Entry(const Entry&) = delete; + Entry& operator=(const Entry&) = delete; + virtual ~Entry(); // Unique id for this entry. The id is guaranteed to be unique for a @@ -82,9 +85,6 @@ protected: explicit Entry(Type type); - - private: - DISALLOW_COPY_AND_ASSIGN(Entry); }; // Represents a previously open tab.
diff --git a/components/sessions/core/tab_restore_service_impl.cc b/components/sessions/core/tab_restore_service_impl.cc index a2f9f324..a9dc2d6c 100644 --- a/components/sessions/core/tab_restore_service_impl.cc +++ b/components/sessions/core/tab_restore_service_impl.cc
@@ -431,6 +431,9 @@ public: explicit PersistenceDelegate(TabRestoreServiceClient* client); + PersistenceDelegate(const PersistenceDelegate&) = delete; + PersistenceDelegate& operator=(const PersistenceDelegate&) = delete; + ~PersistenceDelegate() override; // CommandStorageManagerDelegate: @@ -569,8 +572,6 @@ // Used when loading previous tabs/session and open tabs/session. base::WeakPtrFactory<PersistenceDelegate> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PersistenceDelegate); }; TabRestoreServiceImpl::PersistenceDelegate::PersistenceDelegate(
diff --git a/components/sessions/core/tab_restore_service_impl.h b/components/sessions/core/tab_restore_service_impl.h index 98187d5..93438a8 100644 --- a/components/sessions/core/tab_restore_service_impl.h +++ b/components/sessions/core/tab_restore_service_impl.h
@@ -30,6 +30,9 @@ PrefService* pref_service, TimeFactory* time_factory); + TabRestoreServiceImpl(const TabRestoreServiceImpl&) = delete; + TabRestoreServiceImpl& operator=(const TabRestoreServiceImpl&) = delete; + ~TabRestoreServiceImpl() override; // TabRestoreService: @@ -73,8 +76,6 @@ std::unique_ptr<PersistenceDelegate> persistence_delegate_; TabRestoreServiceHelper helper_; PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(TabRestoreServiceImpl); }; } // namespace sessions
diff --git a/components/sessions/ios/ios_webstate_live_tab.h b/components/sessions/ios/ios_webstate_live_tab.h index df7d291c..c4a73aa 100644 --- a/components/sessions/ios/ios_webstate_live_tab.h +++ b/components/sessions/ios/ios_webstate_live_tab.h
@@ -22,6 +22,9 @@ class SESSIONS_EXPORT IOSWebStateLiveTab : public IOSLiveTab, public base::SupportsUserData::Data { public: + IOSWebStateLiveTab(const IOSWebStateLiveTab&) = delete; + IOSWebStateLiveTab& operator=(const IOSWebStateLiveTab&) = delete; + ~IOSWebStateLiveTab() override; // Returns the IOSLiveTab associated with |web_state|, creating it if @@ -49,8 +52,6 @@ } web::WebState* web_state_; - - DISALLOW_COPY_AND_ASSIGN(IOSWebStateLiveTab); }; } // namespace sessions
diff --git a/components/signin/core/browser/about_signin_internals.h b/components/signin/core/browser/about_signin_internals.h index 77a662f..ea72a8e 100644 --- a/components/signin/core/browser/about_signin_internals.h +++ b/components/signin/core/browser/about_signin_internals.h
@@ -59,6 +59,10 @@ signin::AccountConsistencyMethod account_consistency, SigninClient* client, AccountReconcilor* account_reconcilor); + + AboutSigninInternals(const AboutSigninInternals&) = delete; + AboutSigninInternals& operator=(const AboutSigninInternals&) = delete; + ~AboutSigninInternals() override; // Registers the preferences used by AboutSigninInternals. @@ -248,8 +252,6 @@ signin::AccountConsistencyMethod account_consistency_; base::ObserverList<Observer>::Unchecked signin_observers_; - - DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_
diff --git a/components/signin/core/browser/account_investigator.h b/components/signin/core/browser/account_investigator.h index f737dde..4f64c8f 100644 --- a/components/signin/core/browser/account_investigator.h +++ b/components/signin/core/browser/account_investigator.h
@@ -44,6 +44,10 @@ AccountInvestigator(PrefService* pref_service, signin::IdentityManager* identity_manager); + + AccountInvestigator(const AccountInvestigator&) = delete; + AccountInvestigator& operator=(const AccountInvestigator&) = delete; + ~AccountInvestigator() override; static void RegisterPrefs(PrefRegistrySimple* registry); @@ -128,8 +132,6 @@ // allows us ot emit AccountRelation metrics during a sign in that doesn't // actually change the cookie jar. bool previously_authenticated_ = false; - - DISALLOW_COPY_AND_ASSIGN(AccountInvestigator); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_INVESTIGATOR_H_
diff --git a/components/signin/core/browser/account_reconcilor.h b/components/signin/core/browser/account_reconcilor.h index a36c873..951fa89 100644 --- a/components/signin/core/browser/account_reconcilor.h +++ b/components/signin/core/browser/account_reconcilor.h
@@ -44,25 +44,31 @@ class Lock final { public: explicit Lock(AccountReconcilor* reconcilor); + + Lock(const Lock&) = delete; + Lock& operator=(const Lock&) = delete; + ~Lock(); private: base::WeakPtr<AccountReconcilor> reconcilor_; THREAD_CHECKER(thread_checker_); - DISALLOW_COPY_AND_ASSIGN(Lock); }; // Helper class to indicate that synced data is being deleted. The object // must be destroyed when the data deletion is complete. class ScopedSyncedDataDeletion { public: + ScopedSyncedDataDeletion(const ScopedSyncedDataDeletion&) = delete; + ScopedSyncedDataDeletion& operator=(const ScopedSyncedDataDeletion&) = + delete; + ~ScopedSyncedDataDeletion(); private: friend class AccountReconcilor; explicit ScopedSyncedDataDeletion(AccountReconcilor* reconcilor); base::WeakPtr<AccountReconcilor> reconcilor_; - DISALLOW_COPY_AND_ASSIGN(ScopedSyncedDataDeletion); }; class Observer { @@ -91,6 +97,10 @@ signin::IdentityManager* identity_manager, SigninClient* client, std::unique_ptr<signin::AccountReconcilorDelegate> delegate); + + AccountReconcilor(const AccountReconcilor&) = delete; + AccountReconcilor& operator=(const AccountReconcilor&) = delete; + ~AccountReconcilor() override; // Initializes the account reconcilor. Should be called once after @@ -418,8 +428,6 @@ bool was_shut_down_ = false; base::WeakPtrFactory<AccountReconcilor> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AccountReconcilor); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ACCOUNT_RECONCILOR_H_
diff --git a/components/signin/core/browser/active_directory_account_reconcilor_delegate.h b/components/signin/core/browser/active_directory_account_reconcilor_delegate.h index 5a58c06..9e9d0eb2 100644 --- a/components/signin/core/browser/active_directory_account_reconcilor_delegate.h +++ b/components/signin/core/browser/active_directory_account_reconcilor_delegate.h
@@ -17,6 +17,12 @@ : public AccountReconcilorDelegate { public: ActiveDirectoryAccountReconcilorDelegate(); + + ActiveDirectoryAccountReconcilorDelegate( + const ActiveDirectoryAccountReconcilorDelegate&) = delete; + ActiveDirectoryAccountReconcilorDelegate& operator=( + const ActiveDirectoryAccountReconcilorDelegate&) = delete; + ~ActiveDirectoryAccountReconcilorDelegate() override; // AccountReconcilorDelegate: @@ -45,8 +51,6 @@ CoreAccountId GetFirstAccount( const std::vector<CoreAccountId>& chrome_accounts, const std::vector<gaia::ListedAccount>& gaia_accounts) const; - - DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryAccountReconcilorDelegate); }; } // namespace signin
diff --git a/components/signin/core/browser/dice_account_reconcilor_delegate.h b/components/signin/core/browser/dice_account_reconcilor_delegate.h index 5563584..2b09d95 100644 --- a/components/signin/core/browser/dice_account_reconcilor_delegate.h +++ b/components/signin/core/browser/dice_account_reconcilor_delegate.h
@@ -18,6 +18,11 @@ public: DiceAccountReconcilorDelegate(SigninClient* signin_client, bool migration_completed); + + DiceAccountReconcilorDelegate(const DiceAccountReconcilorDelegate&) = delete; + DiceAccountReconcilorDelegate& operator=( + const DiceAccountReconcilorDelegate&) = delete; + ~DiceAccountReconcilorDelegate() override {} // AccountReconcilorDelegate: @@ -116,8 +121,6 @@ // Last known "first account". Used when cookies are lost as a best guess. CoreAccountId last_known_first_account_; - - DISALLOW_COPY_AND_ASSIGN(DiceAccountReconcilorDelegate); }; } // namespace signin
diff --git a/components/signin/core/browser/dice_header_helper.h b/components/signin/core/browser/dice_header_helper.h index 4d076f6..a665d91 100644 --- a/components/signin/core/browser/dice_header_helper.h +++ b/components/signin/core/browser/dice_header_helper.h
@@ -23,6 +23,10 @@ class DiceHeaderHelper : public SigninHeaderHelper { public: explicit DiceHeaderHelper(AccountConsistencyMethod account_consistency); + + DiceHeaderHelper(const DiceHeaderHelper&) = delete; + DiceHeaderHelper& operator=(const DiceHeaderHelper&) = delete; + ~DiceHeaderHelper() override {} // Returns the parameters contained in the X-Chrome-ID-Consistency-Response @@ -54,8 +58,6 @@ bool IsUrlEligibleForRequestHeader(const GURL& url) override; AccountConsistencyMethod account_consistency_; - - DISALLOW_COPY_AND_ASSIGN(DiceHeaderHelper); }; } // namespace signin
diff --git a/components/signin/core/browser/mirror_account_reconcilor_delegate.h b/components/signin/core/browser/mirror_account_reconcilor_delegate.h index 08ff4ec..97aabd63 100644 --- a/components/signin/core/browser/mirror_account_reconcilor_delegate.h +++ b/components/signin/core/browser/mirror_account_reconcilor_delegate.h
@@ -18,6 +18,12 @@ public IdentityManager::Observer { public: explicit MirrorAccountReconcilorDelegate(IdentityManager* identity_manager); + + MirrorAccountReconcilorDelegate(const MirrorAccountReconcilorDelegate&) = + delete; + MirrorAccountReconcilorDelegate& operator=( + const MirrorAccountReconcilorDelegate&) = delete; + ~MirrorAccountReconcilorDelegate() override; protected: @@ -54,8 +60,6 @@ IdentityManager* identity_manager_; bool reconcile_enabled_; - - DISALLOW_COPY_AND_ASSIGN(MirrorAccountReconcilorDelegate); }; } // namespace signin
diff --git a/components/signin/core/browser/signin_error_controller.h b/components/signin/core/browser/signin_error_controller.h index 3859c9b..652a0e6c 100644 --- a/components/signin/core/browser/signin_error_controller.h +++ b/components/signin/core/browser/signin_error_controller.h
@@ -39,6 +39,10 @@ SigninErrorController(AccountMode mode, signin::IdentityManager* identity_manager); + + SigninErrorController(const SigninErrorController&) = delete; + SigninErrorController& operator=(const SigninErrorController&) = delete; + ~SigninErrorController() override; // KeyedService implementation: @@ -94,8 +98,6 @@ GoogleServiceAuthError auth_error_; base::ObserverList<Observer, false>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(SigninErrorController); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_
diff --git a/components/signin/core/browser/signin_header_helper.h b/components/signin/core/browser/signin_header_helper.h index 107094b6..59d18ae 100644 --- a/components/signin/core/browser/signin_header_helper.h +++ b/components/signin/core/browser/signin_header_helper.h
@@ -175,6 +175,10 @@ const net::HttpRequestHeaders& original_headers, net::HttpRequestHeaders* modified_headers, std::vector<std::string>* headers_to_remove); + + RequestAdapter(const RequestAdapter&) = delete; + RequestAdapter& operator=(const RequestAdapter&) = delete; + virtual ~RequestAdapter(); const GURL& GetUrl(); @@ -187,8 +191,6 @@ const net::HttpRequestHeaders& original_headers_; net::HttpRequestHeaders* const modified_headers_; std::vector<std::string>* const headers_to_remove_; - - DISALLOW_COPY_AND_ASSIGN(RequestAdapter); }; // Base class for managing the signin headers (Dice and Chrome-Connected).
diff --git a/components/signin/core/browser/signin_investigator.h b/components/signin/core/browser/signin_investigator.h index 301e9f9e..f052a1b2 100644 --- a/components/signin/core/browser/signin_investigator.h +++ b/components/signin/core/browser/signin_investigator.h
@@ -47,6 +47,10 @@ SigninInvestigator(const std::string& current_email, const std::string& current_id, DependencyProvider* provider); + + SigninInvestigator(const SigninInvestigator&) = delete; + SigninInvestigator& operator=(const SigninInvestigator&) = delete; + ~SigninInvestigator(); // Determines the current scenario, wether it is an upgrade, same account, or @@ -70,8 +74,6 @@ // Non-owning pointer. DependencyProvider* provider_; - - DISALLOW_COPY_AND_ASSIGN(SigninInvestigator); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_INVESTIGATOR_H_
diff --git a/components/signin/core/browser/signin_status_metrics_provider.h b/components/signin/core/browser/signin_status_metrics_provider.h index 0ac5860..2c49ac49 100644 --- a/components/signin/core/browser/signin_status_metrics_provider.h +++ b/components/signin/core/browser/signin_status_metrics_provider.h
@@ -29,6 +29,10 @@ class SigninStatusMetricsProvider : public SigninStatusMetricsProviderBase, public signin::IdentityManager::Observer { public: + SigninStatusMetricsProvider(const SigninStatusMetricsProvider&) = delete; + SigninStatusMetricsProvider& operator=(const SigninStatusMetricsProvider&) = + delete; + ~SigninStatusMetricsProvider() override; // SigninStatusMetricsProviderBase: @@ -96,8 +100,6 @@ bool is_test_; base::WeakPtrFactory<SigninStatusMetricsProvider> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProvider); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_H_
diff --git a/components/signin/core/browser/signin_status_metrics_provider_base.h b/components/signin/core/browser/signin_status_metrics_provider_base.h index 5a93d16..c1251637 100644 --- a/components/signin/core/browser/signin_status_metrics_provider_base.h +++ b/components/signin/core/browser/signin_status_metrics_provider_base.h
@@ -14,6 +14,12 @@ class SigninStatusMetricsProviderBase : public metrics::MetricsProvider { public: SigninStatusMetricsProviderBase(); + + SigninStatusMetricsProviderBase(const SigninStatusMetricsProviderBase&) = + delete; + SigninStatusMetricsProviderBase& operator=( + const SigninStatusMetricsProviderBase&) = delete; + ~SigninStatusMetricsProviderBase() override; // Possible sign-in status of all opened profiles during one UMA session. For @@ -50,8 +56,6 @@ private: // Sign-in status of all profiles seen so far. SigninStatus signin_status_; - - DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProviderBase); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_BASE_H_
diff --git a/components/signin/core/browser/signin_status_metrics_provider_delegate.h b/components/signin/core/browser/signin_status_metrics_provider_delegate.h index b97ee435..8c49eba 100644 --- a/components/signin/core/browser/signin_status_metrics_provider_delegate.h +++ b/components/signin/core/browser/signin_status_metrics_provider_delegate.h
@@ -35,6 +35,12 @@ class SigninStatusMetricsProviderDelegate { public: SigninStatusMetricsProviderDelegate(); + + SigninStatusMetricsProviderDelegate( + const SigninStatusMetricsProviderDelegate&) = delete; + SigninStatusMetricsProviderDelegate& operator=( + const SigninStatusMetricsProviderDelegate&) = delete; + virtual ~SigninStatusMetricsProviderDelegate(); // Set the |owner_| field to the owning SigninStatusMetricsProvider. @@ -56,8 +62,6 @@ private: SigninStatusMetricsProvider* owner_; - - DISALLOW_COPY_AND_ASSIGN(SigninStatusMetricsProviderDelegate); }; #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_STATUS_METRICS_PROVIDER_DELEGATE_H_
diff --git a/components/signin/internal/identity_manager/account_fetcher_service.h b/components/signin/internal/identity_manager/account_fetcher_service.h index f153f33..0df8c5139 100644 --- a/components/signin/internal/identity_manager/account_fetcher_service.h +++ b/components/signin/internal/identity_manager/account_fetcher_service.h
@@ -58,6 +58,10 @@ static const char kLastUpdatePref[]; AccountFetcherService(); + + AccountFetcherService(const AccountFetcherService&) = delete; + AccountFetcherService& operator=(const AccountFetcherService&) = delete; + ~AccountFetcherService() override; // Registers the preferences used by AccountFetcherService. @@ -197,8 +201,6 @@ std::unique_ptr<image_fetcher::ImageDecoder> image_decoder_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(AccountFetcherService); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNT_FETCHER_SERVICE_H_
diff --git a/components/signin/internal/identity_manager/account_info_fetcher.h b/components/signin/internal/identity_manager/account_info_fetcher.h index c981f39..94f02e2 100644 --- a/components/signin/internal/identity_manager/account_info_fetcher.h +++ b/components/signin/internal/identity_manager/account_info_fetcher.h
@@ -31,6 +31,10 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, AccountFetcherService* service, const CoreAccountId& account_id); + + AccountInfoFetcher(const AccountInfoFetcher&) = delete; + AccountInfoFetcher& operator=(const AccountInfoFetcher&) = delete; + ~AccountInfoFetcher() override; // Start fetching the account information. @@ -57,8 +61,6 @@ std::unique_ptr<OAuth2AccessTokenManager::Request> login_token_request_; std::unique_ptr<gaia::GaiaOAuthClient> gaia_oauth_client_; - - DISALLOW_COPY_AND_ASSIGN(AccountInfoFetcher); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNT_INFO_FETCHER_H_
diff --git a/components/signin/internal/identity_manager/account_tracker_service.h b/components/signin/internal/identity_manager/account_tracker_service.h index 900b556..464200f 100644 --- a/components/signin/internal/identity_manager/account_tracker_service.h +++ b/components/signin/internal/identity_manager/account_tracker_service.h
@@ -73,6 +73,10 @@ }; AccountTrackerService(); + + AccountTrackerService(const AccountTrackerService&) = delete; + AccountTrackerService& operator=(const AccountTrackerService&) = delete; + ~AccountTrackerService(); // Registers the preferences used by AccountTrackerService. @@ -245,8 +249,6 @@ // Used to pass weak pointers of |this| to tasks created by // |image_storage_task_runner_|. base::WeakPtrFactory<AccountTrackerService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AccountTrackerService); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_ACCOUNT_TRACKER_SERVICE_H_
diff --git a/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h b/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h index a93d35b..c8b5502 100644 --- a/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h +++ b/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h
@@ -32,6 +32,11 @@ ProfileOAuth2TokenService* token_service, GaiaCookieManagerService* gaia_cookie_manager_service, AccountTrackerService* account_tracker_service); + + AccountsCookieMutatorImpl(const AccountsCookieMutatorImpl&) = delete; + AccountsCookieMutatorImpl& operator=(const AccountsCookieMutatorImpl&) = + delete; + ~AccountsCookieMutatorImpl() override; void AddAccountToCookie( @@ -84,8 +89,6 @@ ProfileOAuth2TokenService* token_service_; GaiaCookieManagerService* gaia_cookie_manager_service_; AccountTrackerService* account_tracker_service_; - - DISALLOW_COPY_AND_ASSIGN(AccountsCookieMutatorImpl); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/accounts_mutator_impl.h b/components/signin/internal/identity_manager/accounts_mutator_impl.h index 7445f24..361aa27 100644 --- a/components/signin/internal/identity_manager/accounts_mutator_impl.h +++ b/components/signin/internal/identity_manager/accounts_mutator_impl.h
@@ -31,6 +31,10 @@ AccountTrackerService* account_tracker_service, PrimaryAccountManager* primary_account_manager, PrefService* pref_service); + + AccountsMutatorImpl(const AccountsMutatorImpl&) = delete; + AccountsMutatorImpl& operator=(const AccountsMutatorImpl&) = delete; + ~AccountsMutatorImpl() override; // AccountsMutator: @@ -68,8 +72,6 @@ #if BUILDFLAG(ENABLE_DICE_SUPPORT) PrefService* pref_service_; #endif - - DISALLOW_COPY_AND_ASSIGN(AccountsMutatorImpl); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/child_account_info_fetcher_android.h b/components/signin/internal/identity_manager/child_account_info_fetcher_android.h index 864e7347..26a5b0677c 100644 --- a/components/signin/internal/identity_manager/child_account_info_fetcher_android.h +++ b/components/signin/internal/identity_manager/child_account_info_fetcher_android.h
@@ -18,6 +18,12 @@ static std::unique_ptr<ChildAccountInfoFetcherAndroid> Create( AccountFetcherService* service, const CoreAccountId& account_id); + + ChildAccountInfoFetcherAndroid(const ChildAccountInfoFetcherAndroid&) = + delete; + ChildAccountInfoFetcherAndroid& operator=( + const ChildAccountInfoFetcherAndroid&) = delete; + ~ChildAccountInfoFetcherAndroid(); static void InitializeForTests(); @@ -27,8 +33,6 @@ const CoreAccountInfo& account_info); base::android::ScopedJavaGlobalRef<jobject> j_child_account_info_fetcher_; - - DISALLOW_COPY_AND_ASSIGN(ChildAccountInfoFetcherAndroid); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_CHILD_ACCOUNT_INFO_FETCHER_ANDROID_H_
diff --git a/components/signin/internal/identity_manager/diagnostics_provider_impl.h b/components/signin/internal/identity_manager/diagnostics_provider_impl.h index 2035715c..7bf7dc2a 100644 --- a/components/signin/internal/identity_manager/diagnostics_provider_impl.h +++ b/components/signin/internal/identity_manager/diagnostics_provider_impl.h
@@ -19,6 +19,10 @@ DiagnosticsProviderImpl( ProfileOAuth2TokenService* profile_oauth2_token_service, GaiaCookieManagerService* gaia_cookie_manager_service); + + DiagnosticsProviderImpl(const DiagnosticsProviderImpl&) = delete; + DiagnosticsProviderImpl& operator=(const DiagnosticsProviderImpl&) = delete; + ~DiagnosticsProviderImpl() override; // Returns the state of the load credentials operation. @@ -36,8 +40,6 @@ private: GaiaCookieManagerService* gaia_cookie_manager_service_; ProfileOAuth2TokenService* profile_oauth2_token_service_; - - DISALLOW_COPY_AND_ASSIGN(DiagnosticsProviderImpl); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h b/components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h index 2a09d3c..bceefb4eb 100644 --- a/components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h +++ b/components/signin/internal/identity_manager/fake_profile_oauth2_token_service.h
@@ -40,6 +40,11 @@ FakeProfileOAuth2TokenService( PrefService* user_prefs, std::unique_ptr<ProfileOAuth2TokenServiceDelegate> delegate); + + FakeProfileOAuth2TokenService(const FakeProfileOAuth2TokenService&) = delete; + FakeProfileOAuth2TokenService& operator=( + const FakeProfileOAuth2TokenService&) = delete; + ~FakeProfileOAuth2TokenService() override; // Gets a list of active requests (can be used by tests to validate that the @@ -86,8 +91,6 @@ private: FakeOAuth2AccessTokenManager* GetFakeAccessTokenManager(); - - DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenService); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_H_
diff --git a/components/signin/internal/identity_manager/fake_profile_oauth2_token_service_delegate.h b/components/signin/internal/identity_manager/fake_profile_oauth2_token_service_delegate.h index d208752..067ed6e 100644 --- a/components/signin/internal/identity_manager/fake_profile_oauth2_token_service_delegate.h +++ b/components/signin/internal/identity_manager/fake_profile_oauth2_token_service_delegate.h
@@ -23,6 +23,12 @@ : public ProfileOAuth2TokenServiceDelegate { public: FakeProfileOAuth2TokenServiceDelegate(); + + FakeProfileOAuth2TokenServiceDelegate( + const FakeProfileOAuth2TokenServiceDelegate&) = delete; + FakeProfileOAuth2TokenServiceDelegate& operator=( + const FakeProfileOAuth2TokenServiceDelegate&) = delete; + ~FakeProfileOAuth2TokenServiceDelegate() override; std::unique_ptr<OAuth2AccessTokenFetcher> CreateAccessTokenFetcher( @@ -86,7 +92,5 @@ bool fix_request_if_possible_ = false; net::BackoffEntry backoff_entry_; - - DISALLOW_COPY_AND_ASSIGN(FakeProfileOAuth2TokenServiceDelegate); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_FAKE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service.h b/components/signin/internal/identity_manager/gaia_cookie_manager_service.h index 630826c..0759615 100644 --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.h +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.h
@@ -97,6 +97,9 @@ // Contains the information and parameters for any request. class GaiaCookieRequest { public: + GaiaCookieRequest(const GaiaCookieRequest&) = delete; + GaiaCookieRequest& operator=(const GaiaCookieRequest&) = delete; + ~GaiaCookieRequest(); GaiaCookieRequest(GaiaCookieRequest&&); GaiaCookieRequest& operator=(GaiaCookieRequest&&); @@ -163,8 +166,6 @@ AddAccountToCookieCompletedCallback add_account_to_cookie_completed_callback_; LogOutFromCookieCompletedCallback log_out_from_cookie_completed_callback_; - - DISALLOW_COPY_AND_ASSIGN(GaiaCookieRequest); }; // Class to retrieve the external connection check results from gaia. @@ -179,6 +180,10 @@ typedef std::map<std::string, std::string> ResultMap; explicit ExternalCcResultFetcher(GaiaCookieManagerService* helper); + + ExternalCcResultFetcher(const ExternalCcResultFetcher&) = delete; + ExternalCcResultFetcher& operator=(const ExternalCcResultFetcher&) = delete; + ~ExternalCcResultFetcher() override; // Gets the current value of the external connection check result string. @@ -224,8 +229,6 @@ ResultMap results_; base::Time m_external_cc_result_start_time_; base::OnceClosure callback_; - - DISALLOW_COPY_AND_ASSIGN(ExternalCcResultFetcher); }; GaiaCookieManagerService(ProfileOAuth2TokenService* token_service,
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc b/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc index 4aa27e9..504c8397 100644 --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc
@@ -111,15 +111,17 @@ total++; } + InstrumentedGaiaCookieManagerService( + const InstrumentedGaiaCookieManagerService&) = delete; + InstrumentedGaiaCookieManagerService& operator=( + const InstrumentedGaiaCookieManagerService&) = delete; + ~InstrumentedGaiaCookieManagerService() override { total--; } MOCK_METHOD0(StartFetchingUbertoken, void()); MOCK_METHOD0(StartFetchingListAccounts, void()); MOCK_METHOD0(StartGaiaLogOut, void()); MOCK_METHOD0(StartFetchingMergeSession, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(InstrumentedGaiaCookieManagerService); }; class GaiaCookieManagerServiceTest : public testing::Test {
diff --git a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc index 82a6d66..522a54c 100644 --- a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc +++ b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.cc
@@ -110,6 +110,10 @@ SigninClient* client, const std::string& refresh_token, int attempt); + + RevokeServerRefreshToken(const RevokeServerRefreshToken&) = delete; + RevokeServerRefreshToken& operator=(const RevokeServerRefreshToken&) = delete; + ~RevokeServerRefreshToken() override; private: @@ -126,8 +130,6 @@ std::string refresh_token_; int attempt_; base::WeakPtrFactory<RevokeServerRefreshToken> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(RevokeServerRefreshToken); }; MutableProfileOAuth2TokenServiceDelegate::RevokeServerRefreshToken::
diff --git a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.h b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.h index be79d51..9c7353f8 100644 --- a/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.h +++ b/components/signin/internal/identity_manager/mutable_profile_oauth2_token_service_delegate.h
@@ -42,6 +42,12 @@ signin::AccountConsistencyMethod account_consistency, bool revoke_all_tokens_on_load, FixRequestErrorCallback fix_request_error_callback); + + MutableProfileOAuth2TokenServiceDelegate( + const MutableProfileOAuth2TokenServiceDelegate&) = delete; + MutableProfileOAuth2TokenServiceDelegate& operator=( + const MutableProfileOAuth2TokenServiceDelegate&) = delete; + ~MutableProfileOAuth2TokenServiceDelegate() override; static void RegisterProfilePrefs(PrefRegistrySimple* registry); @@ -235,8 +241,6 @@ // Callback function that attempts to correct request errors. Best effort // only. Returns true if the error was fixed and retry should be reattempted. FixRequestErrorCallback fix_request_error_callback_; - - DISALLOW_COPY_AND_ASSIGN(MutableProfileOAuth2TokenServiceDelegate); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_MUTABLE_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_
diff --git a/components/signin/internal/identity_manager/oauth_multilogin_helper.h b/components/signin/internal/identity_manager/oauth_multilogin_helper.h index f64019b1..208d4a5 100644 --- a/components/signin/internal/identity_manager/oauth_multilogin_helper.h +++ b/components/signin/internal/identity_manager/oauth_multilogin_helper.h
@@ -48,6 +48,9 @@ const gaia::GaiaSource& gaia_source, base::OnceCallback<void(SetAccountsInCookieResult)> callback); + OAuthMultiloginHelper(const OAuthMultiloginHelper&) = delete; + OAuthMultiloginHelper& operator=(const OAuthMultiloginHelper&) = delete; + ~OAuthMultiloginHelper() override; private: @@ -100,8 +103,6 @@ std::set<std::pair<std::string, std::string>> cookies_to_set_; base::WeakPtrFactory<OAuthMultiloginHelper> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OAuthMultiloginHelper); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/oauth_multilogin_token_fetcher.h b/components/signin/internal/identity_manager/oauth_multilogin_token_fetcher.h index 92f57fe..eb33011 100644 --- a/components/signin/internal/identity_manager/oauth_multilogin_token_fetcher.h +++ b/components/signin/internal/identity_manager/oauth_multilogin_token_fetcher.h
@@ -47,6 +47,10 @@ SuccessCallback success_callback, FailureCallback failure_callback); + OAuthMultiloginTokenFetcher(const OAuthMultiloginTokenFetcher&) = delete; + OAuthMultiloginTokenFetcher& operator=(const OAuthMultiloginTokenFetcher&) = + delete; + ~OAuthMultiloginTokenFetcher() override; private: @@ -75,8 +79,6 @@ std::set<CoreAccountId> retried_requests_; // Requests are retried once. base::WeakPtrFactory<OAuthMultiloginTokenFetcher> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(OAuthMultiloginTokenFetcher); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/primary_account_manager.h b/components/signin/internal/identity_manager/primary_account_manager.h index a57c83a..efdcc88ce 100644 --- a/components/signin/internal/identity_manager/primary_account_manager.h +++ b/components/signin/internal/identity_manager/primary_account_manager.h
@@ -64,6 +64,10 @@ ProfileOAuth2TokenService* token_service, AccountTrackerService* account_tracker_service, std::unique_ptr<PrimaryAccountPolicyManager> policy_manager); + + PrimaryAccountManager(const PrimaryAccountManager&) = delete; + PrimaryAccountManager& operator=(const PrimaryAccountManager&) = delete; + ~PrimaryAccountManager() override; // Registers per-profile prefs. @@ -188,8 +192,6 @@ std::unique_ptr<PrimaryAccountPolicyManager> policy_manager_; base::ObserverList<Observer> observers_; - - DISALLOW_COPY_AND_ASSIGN(PrimaryAccountManager); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PRIMARY_ACCOUNT_MANAGER_H_
diff --git a/components/signin/internal/identity_manager/primary_account_policy_manager.h b/components/signin/internal/identity_manager/primary_account_policy_manager.h index d5e1537..ffee743c8 100644 --- a/components/signin/internal/identity_manager/primary_account_policy_manager.h +++ b/components/signin/internal/identity_manager/primary_account_policy_manager.h
@@ -13,6 +13,11 @@ class PrimaryAccountPolicyManager { public: PrimaryAccountPolicyManager() = default; + + PrimaryAccountPolicyManager(const PrimaryAccountPolicyManager&) = delete; + PrimaryAccountPolicyManager& operator=(const PrimaryAccountPolicyManager&) = + delete; + virtual ~PrimaryAccountPolicyManager() = default; // On platforms where PrimaryAccountManager is responsible for dealing with @@ -21,9 +26,6 @@ virtual void InitializePolicy( PrefService* local_state, PrimaryAccountManager* primary_account_manager) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(PrimaryAccountPolicyManager); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PRIMARY_ACCOUNT_POLICY_MANAGER_H_
diff --git a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h index 43bce6d..04e1cf52 100644 --- a/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h +++ b/components/signin/internal/identity_manager/primary_account_policy_manager_impl.h
@@ -21,6 +21,12 @@ class PrimaryAccountPolicyManagerImpl : public PrimaryAccountPolicyManager { public: explicit PrimaryAccountPolicyManagerImpl(SigninClient* client); + + PrimaryAccountPolicyManagerImpl(const PrimaryAccountPolicyManagerImpl&) = + delete; + PrimaryAccountPolicyManagerImpl& operator=( + const PrimaryAccountPolicyManagerImpl&) = delete; + ~PrimaryAccountPolicyManagerImpl() override; // PrimaryAccountPolicyManager: @@ -55,8 +61,6 @@ base::WeakPtrFactory<PrimaryAccountPolicyManagerImpl> weak_pointer_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(PrimaryAccountPolicyManagerImpl); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PRIMARY_ACCOUNT_POLICY_MANAGER_IMPL_H_
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service.h b/components/signin/internal/identity_manager/profile_oauth2_token_service.h index 41fd767..410053a 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service.h
@@ -74,6 +74,11 @@ ProfileOAuth2TokenService( PrefService* user_prefs, std::unique_ptr<ProfileOAuth2TokenServiceDelegate> delegate); + + ProfileOAuth2TokenService(const ProfileOAuth2TokenService&) = delete; + ProfileOAuth2TokenService& operator=(const ProfileOAuth2TokenService&) = + delete; + ~ProfileOAuth2TokenService() override; // Overridden from OAuth2AccessTokenManager::Delegate. @@ -291,8 +296,6 @@ FRIEND_TEST_ALL_PREFIXES(ProfileOAuth2TokenServiceTest, SameScopesRequestedForDifferentClients); - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenService); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PROFILE_OAUTH2_TOKEN_SERVICE_H_
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate.h b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate.h index 9e3156a..79eea89c 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate.h
@@ -40,6 +40,12 @@ class ProfileOAuth2TokenServiceDelegate { public: ProfileOAuth2TokenServiceDelegate(); + + ProfileOAuth2TokenServiceDelegate(const ProfileOAuth2TokenServiceDelegate&) = + delete; + ProfileOAuth2TokenServiceDelegate& operator=( + const ProfileOAuth2TokenServiceDelegate&) = delete; + virtual ~ProfileOAuth2TokenServiceDelegate(); virtual std::unique_ptr<OAuth2AccessTokenFetcher> CreateAccessTokenFetcher( @@ -167,11 +173,14 @@ class ScopedBatchChange { public: explicit ScopedBatchChange(ProfileOAuth2TokenServiceDelegate* delegate); + + ScopedBatchChange(const ScopedBatchChange&) = delete; + ScopedBatchChange& operator=(const ScopedBatchChange&) = delete; + ~ScopedBatchChange(); private: ProfileOAuth2TokenServiceDelegate* delegate_; // Weak. - DISALLOW_COPY_AND_ASSIGN(ScopedBatchChange); }; private: @@ -189,8 +198,6 @@ // The depth of batch changes. int batch_change_depth_; - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceDelegate); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_H_
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.cc b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.cc index 626fc037..a1f5c1b2 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.cc +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.cc
@@ -48,6 +48,11 @@ ProfileOAuth2TokenServiceDelegateAndroid* oauth2_token_service_delegate, OAuth2AccessTokenConsumer* consumer, const std::string& account_id); + + AndroidAccessTokenFetcher(const AndroidAccessTokenFetcher&) = delete; + AndroidAccessTokenFetcher& operator=(const AndroidAccessTokenFetcher&) = + delete; + ~AndroidAccessTokenFetcher() override; // Overrides from OAuth2AccessTokenFetcher: @@ -68,8 +73,6 @@ std::string account_id_; bool request_was_cancelled_; base::WeakPtrFactory<AndroidAccessTokenFetcher> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(AndroidAccessTokenFetcher); }; AndroidAccessTokenFetcher::AndroidAccessTokenFetcher(
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.h b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.h index d01f161..5c66472d 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_android.h
@@ -31,6 +31,12 @@ public: ProfileOAuth2TokenServiceDelegateAndroid( AccountTrackerService* account_tracker_service); + + ProfileOAuth2TokenServiceDelegateAndroid( + const ProfileOAuth2TokenServiceDelegateAndroid&) = delete; + ProfileOAuth2TokenServiceDelegateAndroid& operator=( + const ProfileOAuth2TokenServiceDelegateAndroid&) = delete; + ~ProfileOAuth2TokenServiceDelegateAndroid() override; // Returns a reference to the corresponding Java OAuth2TokenService object. @@ -121,8 +127,6 @@ AccountTrackerService* account_tracker_service_; RefreshTokenLoadStatus fire_refresh_token_loaded_; - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceDelegateAndroid); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_ANDROID_H_
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos.h b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos.h index e13d7e7..8c66712 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos.h
@@ -36,6 +36,12 @@ network::NetworkConnectionTracker* network_connection_tracker, account_manager::AccountManagerFacade* account_manager_facade, bool is_regular_profile); + + ProfileOAuth2TokenServiceDelegateChromeOS( + const ProfileOAuth2TokenServiceDelegateChromeOS&) = delete; + ProfileOAuth2TokenServiceDelegateChromeOS& operator=( + const ProfileOAuth2TokenServiceDelegateChromeOS&) = delete; + ~ProfileOAuth2TokenServiceDelegateChromeOS() override; // ProfileOAuth2TokenServiceDelegate overrides. @@ -120,8 +126,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ProfileOAuth2TokenServiceDelegateChromeOS> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceDelegateChromeOS); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_legacy.h b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_legacy.h index a0d0a762..6c2ad28 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_legacy.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_legacy.h
@@ -40,6 +40,12 @@ network::NetworkConnectionTracker* network_connection_tracker, account_manager::AccountManager* account_manager, bool is_regular_profile); + + ProfileOAuth2TokenServiceDelegateChromeOSLegacy( + const ProfileOAuth2TokenServiceDelegateChromeOSLegacy&) = delete; + ProfileOAuth2TokenServiceDelegateChromeOSLegacy& operator=( + const ProfileOAuth2TokenServiceDelegateChromeOSLegacy&) = delete; + ~ProfileOAuth2TokenServiceDelegateChromeOSLegacy() override; // ProfileOAuth2TokenServiceDelegate overrides. @@ -112,8 +118,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ProfileOAuth2TokenServiceDelegateChromeOSLegacy> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceDelegateChromeOSLegacy); }; } // namespace signin
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc index 751823e..5fdd796 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_chromeos_unittest.cc
@@ -51,6 +51,10 @@ class AccessTokenConsumer : public OAuth2AccessTokenConsumer { public: AccessTokenConsumer() = default; + + AccessTokenConsumer(const AccessTokenConsumer&) = delete; + AccessTokenConsumer& operator=(const AccessTokenConsumer&) = delete; + ~AccessTokenConsumer() override = default; void OnGetTokenSuccess(const TokenResponse& token_response) override { @@ -67,9 +71,6 @@ int num_access_token_fetch_success_ = 0; int num_access_token_fetch_failure_ = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AccessTokenConsumer); }; class TestOAuth2TokenServiceObserver @@ -190,6 +191,12 @@ class ProfileOAuth2TokenServiceDelegateChromeOSTest : public testing::Test { public: ProfileOAuth2TokenServiceDelegateChromeOSTest() {} + + ProfileOAuth2TokenServiceDelegateChromeOSTest( + const ProfileOAuth2TokenServiceDelegateChromeOSTest&) = delete; + ProfileOAuth2TokenServiceDelegateChromeOSTest& operator=( + const ProfileOAuth2TokenServiceDelegateChromeOSTest&) = delete; + ~ProfileOAuth2TokenServiceDelegateChromeOSTest() override = default; protected: @@ -356,9 +363,6 @@ [](base::OnceClosure closure) -> void { std::move(closure).Run(); }); sync_preferences::TestingPrefServiceSyncable pref_service_; std::unique_ptr<TestSigninClient> client_; - - private: - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceDelegateChromeOSTest); }; // Refresh tokens should load successfully for non-regular (Signin and Lock
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.h b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.h index ef414ca..7c906a35 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.h +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.h
@@ -25,6 +25,12 @@ SigninClient* client, std::unique_ptr<DeviceAccountsProvider> provider, AccountTrackerService* account_tracker_service); + + ProfileOAuth2TokenServiceIOSDelegate( + const ProfileOAuth2TokenServiceIOSDelegate&) = delete; + ProfileOAuth2TokenServiceIOSDelegate& operator=( + const ProfileOAuth2TokenServiceIOSDelegate&) = delete; + ~ProfileOAuth2TokenServiceIOSDelegate() override; std::unique_ptr<OAuth2AccessTokenFetcher> CreateAccessTokenFetcher( @@ -95,7 +101,5 @@ SigninClient* client_ = nullptr; std::unique_ptr<DeviceAccountsProvider> provider_; AccountTrackerService* account_tracker_service_; - - DISALLOW_COPY_AND_ASSIGN(ProfileOAuth2TokenServiceIOSDelegate); }; #endif // COMPONENTS_SIGNIN_INTERNAL_IDENTITY_MANAGER_PROFILE_OAUTH2_TOKEN_SERVICE_DELEGATE_IOS_H_
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.mm b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.mm index cde6ddfd..d3513cce 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.mm +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_delegate_ios.mm
@@ -82,6 +82,10 @@ SSOAccessTokenFetcher(OAuth2AccessTokenConsumer* consumer, DeviceAccountsProvider* provider, const AccountInfo& account); + + SSOAccessTokenFetcher(const SSOAccessTokenFetcher&) = delete; + SSOAccessTokenFetcher& operator=(const SSOAccessTokenFetcher&) = delete; + ~SSOAccessTokenFetcher() override; void Start(const std::string& client_id, @@ -100,8 +104,6 @@ AccountInfo account_; bool request_was_cancelled_; base::WeakPtrFactory<SSOAccessTokenFetcher> weak_factory_; - - DISALLOW_COPY_AND_ASSIGN(SSOAccessTokenFetcher); }; SSOAccessTokenFetcher::SSOAccessTokenFetcher(
diff --git a/components/signin/internal/identity_manager/profile_oauth2_token_service_unittest.cc b/components/signin/internal/identity_manager/profile_oauth2_token_service_unittest.cc index 1715caf..13a1acb1 100644 --- a/components/signin/internal/identity_manager/profile_oauth2_token_service_unittest.cc +++ b/components/signin/internal/identity_manager/profile_oauth2_token_service_unittest.cc
@@ -438,6 +438,12 @@ : public TestingOAuth2AccessTokenManagerConsumer { public: MockOAuth2AccessTokenConsumer() = default; + + MockOAuth2AccessTokenConsumer(const MockOAuth2AccessTokenConsumer&) = + delete; + MockOAuth2AccessTokenConsumer& operator=( + const MockOAuth2AccessTokenConsumer&) = delete; + ~MockOAuth2AccessTokenConsumer() = default; MOCK_METHOD2( @@ -448,8 +454,6 @@ MOCK_METHOD2(OnGetTokenFailure, void(const OAuth2AccessTokenManager::Request* request, const GoogleServiceAuthError& error)); - - DISALLOW_COPY_AND_ASSIGN(MockOAuth2AccessTokenConsumer); }; ProfileOAuth2TokenService token_service( &prefs_,
diff --git a/components/signin/internal/identity_manager/ubertoken_fetcher_impl.h b/components/signin/internal/identity_manager/ubertoken_fetcher_impl.h index 59247e8..76edaf8 100644 --- a/components/signin/internal/identity_manager/ubertoken_fetcher_impl.h +++ b/components/signin/internal/identity_manager/ubertoken_fetcher_impl.h
@@ -63,6 +63,10 @@ ProfileOAuth2TokenService* token_service, CompletionCallback ubertoken_callback, GaiaAuthFetcherFactory factory); + + UbertokenFetcherImpl(const UbertokenFetcherImpl&) = delete; + UbertokenFetcherImpl& operator=(const UbertokenFetcherImpl&) = delete; + ~UbertokenFetcherImpl() override; // Overridden from GaiaAuthConsumer @@ -93,8 +97,6 @@ int retry_number_; base::OneShotTimer retry_timer_; bool second_access_token_request_; - - DISALLOW_COPY_AND_ASSIGN(UbertokenFetcherImpl); }; } // namespace signin
diff --git a/components/signin/ios/browser/account_consistency_service.h b/components/signin/ios/browser/account_consistency_service.h index bfdf917..f209bfe 100644 --- a/components/signin/ios/browser/account_consistency_service.h +++ b/components/signin/ios/browser/account_consistency_service.h
@@ -42,6 +42,11 @@ AccountReconcilor* account_reconcilor, scoped_refptr<content_settings::CookieSettings> cookie_settings, signin::IdentityManager* identity_manager); + + AccountConsistencyService(const AccountConsistencyService&) = delete; + AccountConsistencyService& operator=(const AccountConsistencyService&) = + delete; + ~AccountConsistencyService() override; // Sets the handler for |web_state| that reacts on Gaia responses with the @@ -139,8 +144,6 @@ // Record whether Shutdown has been called. bool is_shutdown_ = false; - - DISALLOW_COPY_AND_ASSIGN(AccountConsistencyService); }; #endif // COMPONENTS_SIGNIN_IOS_BROWSER_ACCOUNT_CONSISTENCY_SERVICE_H_
diff --git a/components/signin/ios/browser/active_state_manager_impl.h b/components/signin/ios/browser/active_state_manager_impl.h index 98e0130b..b620b8e 100644 --- a/components/signin/ios/browser/active_state_manager_impl.h +++ b/components/signin/ios/browser/active_state_manager_impl.h
@@ -20,6 +20,10 @@ public base::SupportsUserData::Data { public: explicit ActiveStateManagerImpl(web::BrowserState* browser_state); + + ActiveStateManagerImpl(const ActiveStateManagerImpl&) = delete; + ActiveStateManagerImpl& operator=(const ActiveStateManagerImpl&) = delete; + ~ActiveStateManagerImpl() override; // ActiveStateManager methods. @@ -34,8 +38,6 @@ bool active_; // The list of observers. base::ObserverList<Observer>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(ActiveStateManagerImpl); }; #endif // COMPONENTS_SIGNIN_IOS_BROWSER_ACTIVE_STATE_MANAGER_IMPL_H_
diff --git a/components/signin/ios/browser/wait_for_network_callback_helper.h b/components/signin/ios/browser/wait_for_network_callback_helper.h index 08d1fa1..87768d3 100644 --- a/components/signin/ios/browser/wait_for_network_callback_helper.h +++ b/components/signin/ios/browser/wait_for_network_callback_helper.h
@@ -17,6 +17,11 @@ : public net::NetworkChangeNotifier::NetworkChangeObserver { public: WaitForNetworkCallbackHelper(); + + WaitForNetworkCallbackHelper(const WaitForNetworkCallbackHelper&) = delete; + WaitForNetworkCallbackHelper& operator=(const WaitForNetworkCallbackHelper&) = + delete; + ~WaitForNetworkCallbackHelper() override; // net::NetworkChangeController::NetworkChangeObserver implementation. @@ -29,8 +34,6 @@ private: std::list<base::OnceClosure> delayed_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(WaitForNetworkCallbackHelper); }; #endif // COMPONENTS_SIGNIN_IOS_BROWSER_WAIT_FOR_NETWORK_CALLBACK_HELPER_H_
diff --git a/components/signin/public/base/test_signin_client.h b/components/signin/public/base/test_signin_client.h index 577f80c5..39f6a7c6 100644 --- a/components/signin/public/base/test_signin_client.h +++ b/components/signin/public/base/test_signin_client.h
@@ -36,6 +36,10 @@ TestSigninClient( PrefService* pref_service, network::TestURLLoaderFactory* test_url_loader_factory = nullptr); + + TestSigninClient(const TestSigninClient&) = delete; + TestSigninClient& operator=(const TestSigninClient&) = delete; + ~TestSigninClient() override; // SigninClient implementation that is specialized for unit tests. @@ -122,8 +126,6 @@ #if BUILDFLAG(IS_CHROMEOS_LACROS) absl::optional<account_manager::Account> initial_primary_account_; #endif - - DISALLOW_COPY_AND_ASSIGN(TestSigninClient); }; #endif // COMPONENTS_SIGNIN_PUBLIC_BASE_TEST_SIGNIN_CLIENT_H_
diff --git a/components/signin/public/identity_manager/access_token_fetcher.h b/components/signin/public/identity_manager/access_token_fetcher.h index 94003335..9c3cc3a5 100644 --- a/components/signin/public/identity_manager/access_token_fetcher.h +++ b/components/signin/public/identity_manager/access_token_fetcher.h
@@ -200,6 +200,9 @@ TokenCallback callback, Mode mode); + AccessTokenFetcher(const AccessTokenFetcher&) = delete; + AccessTokenFetcher& operator=(const AccessTokenFetcher&) = delete; + ~AccessTokenFetcher() override; private: @@ -263,8 +266,6 @@ token_service_observation_{this}; std::unique_ptr<OAuth2AccessTokenManager::Request> access_token_request_; - - DISALLOW_COPY_AND_ASSIGN(AccessTokenFetcher); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/accounts_cookie_mutator.h b/components/signin/public/identity_manager/accounts_cookie_mutator.h index 6ad6100..6c0d899 100644 --- a/components/signin/public/identity_manager/accounts_cookie_mutator.h +++ b/components/signin/public/identity_manager/accounts_cookie_mutator.h
@@ -50,6 +50,10 @@ }; AccountsCookieMutator() = default; + + AccountsCookieMutator(const AccountsCookieMutator&) = delete; + AccountsCookieMutator& operator=(const AccountsCookieMutator&) = delete; + virtual ~AccountsCookieMutator() = default; typedef base::OnceCallback<void(const CoreAccountId& account_id, @@ -134,9 +138,6 @@ // Indicates that an account previously listed via ListAccounts should now // be removed. virtual void RemoveLoggedOutAccountByGaiaId(const std::string& gaia_id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(AccountsCookieMutator); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/accounts_cookie_mutator_unittest.cc b/components/signin/public/identity_manager/accounts_cookie_mutator_unittest.cc index 3ab7cb4..b13a43d 100644 --- a/components/signin/public/identity_manager/accounts_cookie_mutator_unittest.cc +++ b/components/signin/public/identity_manager/accounts_cookie_mutator_unittest.cc
@@ -78,6 +78,10 @@ AccountConsistencyMethod::kDisabled, &test_signin_client_) {} + AccountsCookieMutatorTest(const AccountsCookieMutatorTest&) = delete; + AccountsCookieMutatorTest& operator=(const AccountsCookieMutatorTest&) = + delete; + ~AccountsCookieMutatorTest() override {} // Make an account available and returns the account ID. @@ -174,8 +178,6 @@ TestSigninClient test_signin_client_; IdentityTestEnvironment identity_test_env_; network::TestCookieManager cookie_manager_for_partition_; - - DISALLOW_COPY_AND_ASSIGN(AccountsCookieMutatorTest); }; // Test that adding a non existing account without providing an access token
diff --git a/components/signin/public/identity_manager/accounts_mutator.h b/components/signin/public/identity_manager/accounts_mutator.h index 160edcb..7aa709ed2 100644 --- a/components/signin/public/identity_manager/accounts_mutator.h +++ b/components/signin/public/identity_manager/accounts_mutator.h
@@ -26,6 +26,10 @@ class AccountsMutator { public: AccountsMutator() = default; + + AccountsMutator(const AccountsMutator&) = delete; + AccountsMutator& operator=(const AccountsMutator&) = delete; + virtual ~AccountsMutator() = default; // Updates the information of the account associated with |gaia_id|, first @@ -78,9 +82,6 @@ virtual CoreAccountId SeedAccountInfo(const std::string& gaia, const std::string& email) = 0; #endif - - private: - DISALLOW_COPY_AND_ASSIGN(AccountsMutator); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/accounts_mutator_unittest.cc b/components/signin/public/identity_manager/accounts_mutator_unittest.cc index 6d47aa4..29171823 100644 --- a/components/signin/public/identity_manager/accounts_mutator_unittest.cc +++ b/components/signin/public/identity_manager/accounts_mutator_unittest.cc
@@ -92,6 +92,9 @@ : identity_test_env_(&test_url_loader_factory_, &prefs_), identity_manager_diagnostics_observer_(identity_manager()) {} + AccountsMutatorTest(const AccountsMutatorTest&) = delete; + AccountsMutatorTest& operator=(const AccountsMutatorTest&) = delete; + ~AccountsMutatorTest() override {} PrefService* pref_service() { return &prefs_; } @@ -121,8 +124,6 @@ network::TestURLLoaderFactory test_url_loader_factory_; IdentityTestEnvironment identity_test_env_; TestIdentityManagerDiagnosticsObserver identity_manager_diagnostics_observer_; - - DISALLOW_COPY_AND_ASSIGN(AccountsMutatorTest); }; TEST_F(AccountsMutatorTest, Basic) {
diff --git a/components/signin/public/identity_manager/diagnostics_provider.h b/components/signin/public/identity_manager/diagnostics_provider.h index 37d0c090..df2bed1 100644 --- a/components/signin/public/identity_manager/diagnostics_provider.h +++ b/components/signin/public/identity_manager/diagnostics_provider.h
@@ -16,6 +16,10 @@ class DiagnosticsProvider { public: DiagnosticsProvider() = default; + + DiagnosticsProvider(const DiagnosticsProvider&) = delete; + DiagnosticsProvider& operator=(const DiagnosticsProvider&) = delete; + virtual ~DiagnosticsProvider() = default; // Returns the state of the load credentials operation. @@ -29,9 +33,6 @@ // Returns the time until a cookie request can be sent (will be zero if the // release time is in the past). virtual base::TimeDelta GetDelayBeforeMakingCookieRequests() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(DiagnosticsProvider); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/identity_manager.h b/components/signin/public/identity_manager/identity_manager.h index 53395dd..2b3e0ed 100644 --- a/components/signin/public/identity_manager/identity_manager.h +++ b/components/signin/public/identity_manager/identity_manager.h
@@ -383,6 +383,10 @@ }; explicit IdentityManager(IdentityManager::InitParameters&& parameters); + + IdentityManager(const IdentityManager&) = delete; + IdentityManager& operator=(const IdentityManager&) = delete; + ~IdentityManager() override; // KeyedService: @@ -717,8 +721,6 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) account_manager::AccountManager* ash_account_manager_ = nullptr; #endif - - DISALLOW_COPY_AND_ASSIGN(IdentityManager); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/identity_test_environment.cc b/components/signin/public/identity_manager/identity_test_environment.cc index 0a588e36..82331e4 100644 --- a/components/signin/public/identity_manager/identity_test_environment.cc +++ b/components/signin/public/identity_manager/identity_test_environment.cc
@@ -63,6 +63,12 @@ IdentityManagerDependenciesOwner( sync_preferences::TestingPrefServiceSyncable* pref_service, TestSigninClient* test_signin_client); + + IdentityManagerDependenciesOwner(const IdentityManagerDependenciesOwner&) = + delete; + IdentityManagerDependenciesOwner& operator=( + const IdentityManagerDependenciesOwner&) = delete; + ~IdentityManagerDependenciesOwner(); sync_preferences::TestingPrefServiceSyncable* pref_service(); @@ -82,8 +88,6 @@ sync_preferences::TestingPrefServiceSyncable* raw_pref_service_ = nullptr; std::unique_ptr<TestSigninClient> owned_signin_client_; TestSigninClient* raw_signin_client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(IdentityManagerDependenciesOwner); }; IdentityManagerDependenciesOwner::IdentityManagerDependenciesOwner(
diff --git a/components/signin/public/identity_manager/identity_test_environment.h b/components/signin/public/identity_manager/identity_test_environment.h index dffc2e25..3b32905 100644 --- a/components/signin/public/identity_manager/identity_test_environment.h +++ b/components/signin/public/identity_manager/identity_test_environment.h
@@ -98,6 +98,9 @@ AccountConsistencyMethod::kDisabled, TestSigninClient* test_signin_client = nullptr); + IdentityTestEnvironment(const IdentityTestEnvironment&) = delete; + IdentityTestEnvironment& operator=(const IdentityTestEnvironment&) = delete; + ~IdentityTestEnvironment() override; // The IdentityManager instance associated with this instance. @@ -452,8 +455,6 @@ std::vector<AccessTokenRequestState> requesters_; base::WeakPtrFactory<IdentityTestEnvironment> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(IdentityTestEnvironment); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/identity_test_environment_unittest.cc b/components/signin/public/identity_manager/identity_test_environment_unittest.cc index 516bf021..6b8eb833 100644 --- a/components/signin/public/identity_manager/identity_test_environment_unittest.cc +++ b/components/signin/public/identity_manager/identity_test_environment_unittest.cc
@@ -18,11 +18,14 @@ base::test::TaskEnvironment::MainThreadType::DEFAULT, base::test::TaskEnvironment::ThreadPoolExecutionMode::QUEUED) {} + IdentityTestEnvironmentTest(const IdentityTestEnvironmentTest&) = delete; + IdentityTestEnvironmentTest& operator=(const IdentityTestEnvironmentTest&) = + delete; + ~IdentityTestEnvironmentTest() override { task_environment_.RunUntilIdle(); } private: base::test::TaskEnvironment task_environment_; - DISALLOW_COPY_AND_ASSIGN(IdentityTestEnvironmentTest); }; TEST_F(IdentityTestEnvironmentTest,
diff --git a/components/signin/public/identity_manager/ios/fake_device_accounts_provider.h b/components/signin/public/identity_manager/ios/fake_device_accounts_provider.h index c4b442d0..3797227 100644 --- a/components/signin/public/identity_manager/ios/fake_device_accounts_provider.h +++ b/components/signin/public/identity_manager/ios/fake_device_accounts_provider.h
@@ -17,6 +17,11 @@ class FakeDeviceAccountsProvider : public DeviceAccountsProvider { public: FakeDeviceAccountsProvider(); + + FakeDeviceAccountsProvider(const FakeDeviceAccountsProvider&) = delete; + FakeDeviceAccountsProvider& operator=(const FakeDeviceAccountsProvider&) = + delete; + ~FakeDeviceAccountsProvider() override; // DeviceAccountsProvider @@ -42,8 +47,6 @@ std::vector<AccountInfo> accounts_; std::vector<AccessTokenRequest> requests_; - - DISALLOW_COPY_AND_ASSIGN(FakeDeviceAccountsProvider); }; #endif // COMPONENTS_SIGNIN_PUBLIC_IDENTITY_MANAGER_IOS_FAKE_DEVICE_ACCOUNTS_PROVIDER_H_
diff --git a/components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h b/components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h index 3af5f868..73df35eb1 100644 --- a/components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h +++ b/components/signin/public/identity_manager/objc/identity_manager_observer_bridge.h
@@ -41,6 +41,11 @@ IdentityManagerObserverBridge( IdentityManager* identity_manager, id<IdentityManagerObserverBridgeDelegate> delegate); + + IdentityManagerObserverBridge(const IdentityManagerObserverBridge&) = delete; + IdentityManagerObserverBridge& operator=( + const IdentityManagerObserverBridge&) = delete; + ~IdentityManagerObserverBridge() override; // IdentityManager::Observer. @@ -61,8 +66,6 @@ IdentityManager* identity_manager_; // Delegate to call. __weak id<IdentityManagerObserverBridgeDelegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(IdentityManagerObserverBridge); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/primary_account_access_token_fetcher.h b/components/signin/public/identity_manager/primary_account_access_token_fetcher.h index f05f22c..573ad54 100644 --- a/components/signin/public/identity_manager/primary_account_access_token_fetcher.h +++ b/components/signin/public/identity_manager/primary_account_access_token_fetcher.h
@@ -160,6 +160,11 @@ Mode mode, ConsentLevel consent = ConsentLevel::kSync); + PrimaryAccountAccessTokenFetcher(const PrimaryAccountAccessTokenFetcher&) = + delete; + PrimaryAccountAccessTokenFetcher& operator=( + const PrimaryAccountAccessTokenFetcher&) = delete; + ~PrimaryAccountAccessTokenFetcher() override; // Exposed for tests. @@ -218,8 +223,6 @@ Mode mode_; const ConsentLevel consent_; - - DISALLOW_COPY_AND_ASSIGN(PrimaryAccountAccessTokenFetcher); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/test_identity_manager_observer.h b/components/signin/public/identity_manager/test_identity_manager_observer.h index 59064de..d6e9e6c2 100644 --- a/components/signin/public/identity_manager/test_identity_manager_observer.h +++ b/components/signin/public/identity_manager/test_identity_manager_observer.h
@@ -24,6 +24,11 @@ base::OnceCallback<void(PrimaryAccountChangeEvent)>; explicit TestIdentityManagerObserver(IdentityManager* identity_manager); + + TestIdentityManagerObserver(const TestIdentityManagerObserver&) = delete; + TestIdentityManagerObserver& operator=(const TestIdentityManagerObserver&) = + delete; + ~TestIdentityManagerObserver() override; void SetOnPrimaryAccountChangedCallback( @@ -113,8 +118,6 @@ bool is_inside_batch_ = false; bool was_called_account_removed_with_info_callback_ = false; std::vector<std::vector<CoreAccountId>> batch_change_records_; - - DISALLOW_COPY_AND_ASSIGN(TestIdentityManagerObserver); }; } // namespace signin
diff --git a/components/signin/public/identity_manager/ubertoken_fetcher.h b/components/signin/public/identity_manager/ubertoken_fetcher.h index f79d635..9b4e9b6 100644 --- a/components/signin/public/identity_manager/ubertoken_fetcher.h +++ b/components/signin/public/identity_manager/ubertoken_fetcher.h
@@ -24,10 +24,11 @@ // Constructs an instance and start fetching the token for |account_id|. UbertokenFetcher() = default; - virtual ~UbertokenFetcher() = 0; - private: - DISALLOW_COPY_AND_ASSIGN(UbertokenFetcher); + UbertokenFetcher(const UbertokenFetcher&) = delete; + UbertokenFetcher& operator=(const UbertokenFetcher&) = delete; + + virtual ~UbertokenFetcher() = 0; }; } // namespace signin
diff --git a/components/signin/public/webdata/token_service_table.h b/components/signin/public/webdata/token_service_table.h index 28ae99a..679950a 100644 --- a/components/signin/public/webdata/token_service_table.h +++ b/components/signin/public/webdata/token_service_table.h
@@ -24,6 +24,10 @@ }; TokenServiceTable() {} + + TokenServiceTable(const TokenServiceTable&) = delete; + TokenServiceTable& operator=(const TokenServiceTable&) = delete; + ~TokenServiceTable() override {} // Retrieves the TokenServiceTable* owned by |database|. @@ -49,9 +53,6 @@ // a mac keychain popup. // True if we encrypted a token and stored it, false otherwise. bool SetTokenForService(const std::string& service, const std::string& token); - - private: - DISALLOW_COPY_AND_ASSIGN(TokenServiceTable); }; #endif // COMPONENTS_SIGNIN_PUBLIC_WEBDATA_TOKEN_SERVICE_TABLE_H_
diff --git a/components/signin/public/webdata/token_service_table_unittest.cc b/components/signin/public/webdata/token_service_table_unittest.cc index a854d24..5a87eb31 100644 --- a/components/signin/public/webdata/token_service_table_unittest.cc +++ b/components/signin/public/webdata/token_service_table_unittest.cc
@@ -20,6 +20,10 @@ class TokenServiceTableTest : public testing::Test { public: TokenServiceTableTest() {} + + TokenServiceTableTest(const TokenServiceTableTest&) = delete; + TokenServiceTableTest& operator=(const TokenServiceTableTest&) = delete; + ~TokenServiceTableTest() override {} protected: @@ -40,9 +44,6 @@ base::ScopedTempDir temp_dir_; std::unique_ptr<TokenServiceTable> table_; std::unique_ptr<WebDatabase> db_; - - private: - DISALLOW_COPY_AND_ASSIGN(TokenServiceTableTest); }; TEST_F(TokenServiceTableTest, TokenServiceGetAllRemoveAll) {
diff --git a/components/site_engagement/content/site_engagement_score.h b/components/site_engagement/content/site_engagement_score.h index 2631c85..55d6155 100644 --- a/components/site_engagement/content/site_engagement_score.h +++ b/components/site_engagement/content/site_engagement_score.h
@@ -130,6 +130,10 @@ const GURL& origin, HostContentSettingsMap* settings); SiteEngagementScore(SiteEngagementScore&& other); + + SiteEngagementScore(const SiteEngagementScore&) = delete; + SiteEngagementScore& operator=(const SiteEngagementScore&) = delete; + ~SiteEngagementScore(); SiteEngagementScore& operator=(SiteEngagementScore&& other); @@ -237,8 +241,6 @@ // The settings to write this score to when Commit() is called. HostContentSettingsMap* settings_map_; - - DISALLOW_COPY_AND_ASSIGN(SiteEngagementScore); }; } // namespace site_engagement
diff --git a/components/site_engagement/content/site_engagement_service.cc b/components/site_engagement/content/site_engagement_service.cc index 7dadb81..5ddc30b8 100644 --- a/components/site_engagement/content/site_engagement_service.cc +++ b/components/site_engagement/content/site_engagement_service.cc
@@ -57,6 +57,10 @@ class StoppedClock : public base::Clock { public: explicit StoppedClock(base::Time time) : time_(time) {} + + StoppedClock(const StoppedClock&) = delete; + StoppedClock& operator=(const StoppedClock&) = delete; + ~StoppedClock() override = default; protected: @@ -65,8 +69,6 @@ private: const base::Time time_; - - DISALLOW_COPY_AND_ASSIGN(StoppedClock); }; // Helpers for fetching content settings for one type.
diff --git a/components/site_engagement/content/site_engagement_service.h b/components/site_engagement/content/site_engagement_service.h index 79e789a..e5dcb99 100644 --- a/components/site_engagement/content/site_engagement_service.h +++ b/components/site_engagement/content/site_engagement_service.h
@@ -138,6 +138,10 @@ scoped_refptr<HostContentSettingsMap> map); explicit SiteEngagementService(content::BrowserContext* browser_context); + + SiteEngagementService(const SiteEngagementService&) = delete; + SiteEngagementService& operator=(const SiteEngagementService&) = delete; + ~SiteEngagementService() override; // Returns the engagement level of |url|. @@ -332,8 +336,6 @@ base::ObserverList<SiteEngagementObserver>::Unchecked observer_list_; base::WeakPtrFactory<SiteEngagementService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SiteEngagementService); }; } // namespace site_engagement
diff --git a/components/soda/BUILD.gn b/components/soda/BUILD.gn index 019a6eb..d387f4b 100644 --- a/components/soda/BUILD.gn +++ b/components/soda/BUILD.gn
@@ -2,10 +2,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/buildflag_header.gni") import("//build/config/chromeos/ui_mode.gni") +import("//components/soda/buildflags.gni") assert(!is_android) +buildflag_header("buildflags") { + header = "buildflags.h" + flags = [ "ENABLE_SODA=$enable_soda" ] +} + component("soda") { sources = [ "soda_installer.cc",
diff --git a/components/soda/buildflags.gni b/components/soda/buildflags.gni new file mode 100644 index 0000000..f368cd6 --- /dev/null +++ b/components/soda/buildflags.gni
@@ -0,0 +1,8 @@ +# Copyright 2021 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + # Used to enable the Speech On-Device API (SODA) in unit and browser tests. + enable_soda = false +}
diff --git a/components/soda/constants.cc b/components/soda/constants.cc index e148559..7247977b 100644 --- a/components/soda/constants.cc +++ b/components/soda/constants.cc
@@ -27,6 +27,12 @@ FILE_PATH_LITERAL("SODAFiles/libsoda.so"); #endif +constexpr base::FilePath::CharType kSodaTestBinaryRelativePath[] = + FILE_PATH_LITERAL("libsoda.so"); + +constexpr base::FilePath::CharType kSodaTestResourcesRelativePath[] = + FILE_PATH_LITERAL("third_party/soda/resources/"); + constexpr base::FilePath::CharType kSodaInstallationRelativePath[] = FILE_PATH_LITERAL("SODA"); @@ -56,6 +62,14 @@ : components_dir.Append(kSodaLanguagePacksRelativePath); } +const base::FilePath GetSodaTestResourcesDirectory() { + base::FilePath source_root; + base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root); + return source_root.empty() + ? base::FilePath() + : source_root.Append(kSodaTestResourcesRelativePath); +} + const base::FilePath GetLatestSodaLanguagePackDirectory( const std::string& language) { base::FileEnumerator enumerator( @@ -93,6 +107,12 @@ : soda_dir.Append(kSodaBinaryRelativePath); } +const base::FilePath GetSodaTestBinaryPath() { + base::FilePath test_dir = GetSodaTestResourcesDirectory(); + return test_dir.empty() ? base::FilePath() + : test_dir.Append(kSodaTestBinaryRelativePath); +} + absl::optional<SodaLanguagePackComponentConfig> GetLanguageComponentConfig( LanguageCode language_code) { for (const SodaLanguagePackComponentConfig& config :
diff --git a/components/soda/constants.h b/components/soda/constants.h index 9a6ed14..305a2dd 100644 --- a/components/soda/constants.h +++ b/components/soda/constants.h
@@ -98,6 +98,9 @@ // Location of the libsoda binary within the SODA installation directory. extern const base::FilePath::CharType kSodaBinaryRelativePath[]; +// Name of the of the libsoda binary used in browser tests. +extern const base::FilePath::CharType kSodaTestBinaryRelativePath[]; + // Location of the SODA component relative to the components directory. extern const base::FilePath::CharType kSodaInstallationRelativePath[]; @@ -105,6 +108,9 @@ // directory. extern const base::FilePath::CharType kSodaLanguagePacksRelativePath[]; +// Location of the SODA files used in browser tests. +extern const base::FilePath::CharType kSodaTestResourcesRelativePath[]; + // Location of the SODA models directory relative to the language pack // installation directory. extern const base::FilePath::CharType kSodaLanguagePackDirectoryRelativePath[]; @@ -115,6 +121,10 @@ // Get the absolute path of the SODA directory containing the language packs. const base::FilePath GetSodaLanguagePacksDirectory(); +// Get the absolute path of the SODA directory containing the language packs +// used in browser tests. +const base::FilePath GetSodaTestResourcesDirectory(); + // Get the absolute path of the latest SODA language pack for a given language // (e.g. en-US). const base::FilePath GetLatestSodaLanguagePackDirectory( @@ -131,6 +141,10 @@ // installed. const base::FilePath GetSodaBinaryPath(); +// Get the path to the SODA binary used in browser tests. Returns an empty path +// if SODA is not installed. +const base::FilePath GetSodaTestBinaryPath(); + absl::optional<SodaLanguagePackComponentConfig> GetLanguageComponentConfig( LanguageCode language_code);
diff --git a/components/speech/chunked_byte_buffer.h b/components/speech/chunked_byte_buffer.h index 418ceaa7..806ab05 100644 --- a/components/speech/chunked_byte_buffer.h +++ b/components/speech/chunked_byte_buffer.h
@@ -29,6 +29,10 @@ class ChunkedByteBuffer { public: ChunkedByteBuffer(); + + ChunkedByteBuffer(const ChunkedByteBuffer&) = delete; + ChunkedByteBuffer& operator=(const ChunkedByteBuffer&) = delete; + ~ChunkedByteBuffer(); // Appends |length| bytes starting from |start| to the buffer. @@ -66,8 +70,6 @@ std::vector<std::unique_ptr<Chunk>> chunks_; std::unique_ptr<Chunk> partial_chunk_; size_t total_bytes_stored_; - - DISALLOW_COPY_AND_ASSIGN(ChunkedByteBuffer); }; } // namespace speech
diff --git a/components/spellcheck/browser/spell_check_host_impl.h b/components/spellcheck/browser/spell_check_host_impl.h index 2d128920..9171671 100644 --- a/components/spellcheck/browser/spell_check_host_impl.h +++ b/components/spellcheck/browser/spell_check_host_impl.h
@@ -28,6 +28,10 @@ class SpellCheckHostImpl : public spellcheck::mojom::SpellCheckHost { public: SpellCheckHostImpl(); + + SpellCheckHostImpl(const SpellCheckHostImpl&) = delete; + SpellCheckHostImpl& operator=(const SpellCheckHostImpl&) = delete; + ~SpellCheckHostImpl() override; protected: @@ -67,8 +71,6 @@ // Android-specific object used to query the Android spellchecker. SpellCheckerSessionBridge session_bridge_; #endif - - DISALLOW_COPY_AND_ASSIGN(SpellCheckHostImpl); }; #endif // COMPONENTS_SPELLCHECK_BROWSER_SPELL_CHECK_HOST_IMPL_H_
diff --git a/components/spellcheck/browser/spellcheck_dictionary.h b/components/spellcheck/browser/spellcheck_dictionary.h index 7d79a71..45c7dac 100644 --- a/components/spellcheck/browser/spellcheck_dictionary.h +++ b/components/spellcheck/browser/spellcheck_dictionary.h
@@ -12,12 +12,15 @@ class SpellcheckDictionary { public: SpellcheckDictionary() {} + + SpellcheckDictionary(const SpellcheckDictionary&) = delete; + SpellcheckDictionary& operator=(const SpellcheckDictionary&) = delete; + virtual ~SpellcheckDictionary() {} virtual void Load() = 0; protected: - DISALLOW_COPY_AND_ASSIGN(SpellcheckDictionary); }; #endif // COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECK_DICTIONARY_H_
diff --git a/components/spellcheck/browser/spellchecker_session_bridge_android.h b/components/spellcheck/browser/spellchecker_session_bridge_android.h index d78f020..d864b48 100644 --- a/components/spellcheck/browser/spellchecker_session_bridge_android.h +++ b/components/spellcheck/browser/spellchecker_session_bridge_android.h
@@ -21,6 +21,11 @@ class SpellCheckerSessionBridge { public: SpellCheckerSessionBridge(); + + SpellCheckerSessionBridge(const SpellCheckerSessionBridge&) = delete; + SpellCheckerSessionBridge& operator=(const SpellCheckerSessionBridge&) = + delete; + ~SpellCheckerSessionBridge(); using RequestTextCheckCallback = @@ -48,13 +53,14 @@ public: SpellingRequest(const std::u16string& text, RequestTextCheckCallback callback); + + SpellingRequest(const SpellingRequest&) = delete; + SpellingRequest& operator=(const SpellingRequest&) = delete; + ~SpellingRequest(); std::u16string text_; RequestTextCheckCallback callback_; - - private: - DISALLOW_COPY_AND_ASSIGN(SpellingRequest); }; std::unique_ptr<SpellingRequest> active_request_; @@ -63,8 +69,6 @@ base::android::ScopedJavaGlobalRef<jobject> java_object_; bool java_object_initialization_failed_; bool active_session_; - - DISALLOW_COPY_AND_ASSIGN(SpellCheckerSessionBridge); }; #endif // COMPONENTS_SPELLCHECK_BROWSER_SPELLCHECKER_SESSION_BRIDGE_ANDROID_H_
diff --git a/components/spellcheck/browser/spelling_service_client.h b/components/spellcheck/browser/spelling_service_client.h index 92706e1..a487553d4 100644 --- a/components/spellcheck/browser/spelling_service_client.h +++ b/components/spellcheck/browser/spelling_service_client.h
@@ -125,6 +125,10 @@ std::unique_ptr<network::SimpleURLLoader> simple_url_loader, TextCheckCompleteCallback callback, std::u16string text); + + TextCheckCallbackData(const TextCheckCallbackData&) = delete; + TextCheckCallbackData& operator=(const TextCheckCallbackData&) = delete; + ~TextCheckCallbackData(); // The URL loader used. @@ -136,9 +140,6 @@ // The text checked by the Spelling service. std::u16string text; - - private: - DISALLOW_COPY_AND_ASSIGN(TextCheckCallbackData); }; using SpellCheckLoaderList =
diff --git a/components/spellcheck/renderer/custom_dictionary_engine.h b/components/spellcheck/renderer/custom_dictionary_engine.h index 51aff5d..58dfa7d9 100644 --- a/components/spellcheck/renderer/custom_dictionary_engine.h +++ b/components/spellcheck/renderer/custom_dictionary_engine.h
@@ -16,6 +16,10 @@ class CustomDictionaryEngine { public: CustomDictionaryEngine(); + + CustomDictionaryEngine(const CustomDictionaryEngine&) = delete; + CustomDictionaryEngine& operator=(const CustomDictionaryEngine&) = delete; + ~CustomDictionaryEngine(); // Initialize the custom dictionary engine. @@ -35,8 +39,6 @@ private: // Correctly spelled words. std::set<std::u16string> dictionary_; - - DISALLOW_COPY_AND_ASSIGN(CustomDictionaryEngine); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_CUSTOM_DICTIONARY_ENGINE_H_
diff --git a/components/spellcheck/renderer/spellcheck.cc b/components/spellcheck/renderer/spellcheck.cc index 16546275..60d17c6 100644 --- a/components/spellcheck/renderer/spellcheck.cc +++ b/components/spellcheck/renderer/spellcheck.cc
@@ -126,6 +126,10 @@ start_ticks_(base::TimeTicks::Now()) { DCHECK(completion_); } + + SpellcheckRequest(const SpellcheckRequest&) = delete; + SpellcheckRequest& operator=(const SpellcheckRequest&) = delete; + ~SpellcheckRequest() {} std::u16string text() { return text_; } @@ -140,8 +144,6 @@ // The time ticks at which this request was created base::TimeTicks start_ticks_; - - DISALLOW_COPY_AND_ASSIGN(SpellcheckRequest); };
diff --git a/components/spellcheck/renderer/spellcheck.h b/components/spellcheck/renderer/spellcheck.h index 439a508..19c4308 100644 --- a/components/spellcheck/renderer/spellcheck.h +++ b/components/spellcheck/renderer/spellcheck.h
@@ -71,6 +71,10 @@ explicit SpellCheck( service_manager::LocalInterfaceProvider* embedder_provider); + + SpellCheck(const SpellCheck&) = delete; + SpellCheck& operator=(const SpellCheck&) = delete; + ~SpellCheck() override; void AddSpellcheckLanguage(base::File file, const std::string& language); @@ -236,8 +240,6 @@ dictionary_update_observers_; base::WeakPtrFactory<SpellCheck> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SpellCheck); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_H_
diff --git a/components/spellcheck/renderer/spellcheck_language.h b/components/spellcheck/renderer/spellcheck_language.h index e876f36..17fff50 100644 --- a/components/spellcheck/renderer/spellcheck_language.h +++ b/components/spellcheck/renderer/spellcheck_language.h
@@ -35,6 +35,10 @@ explicit SpellcheckLanguage( service_manager::LocalInterfaceProvider* embedder_provider); + + SpellcheckLanguage(const SpellcheckLanguage&) = delete; + SpellcheckLanguage& operator=(const SpellcheckLanguage&) = delete; + ~SpellcheckLanguage(); void Init(base::File file, const std::string& language); @@ -101,8 +105,6 @@ // Pointer to a platform-specific spelling engine, if it is in use. This // should only be set if hunspell is not used. (I.e. on OSX, for now) std::unique_ptr<SpellingEngine> platform_spelling_engine_; - - DISALLOW_COPY_AND_ASSIGN(SpellcheckLanguage); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_LANGUAGE_H_
diff --git a/components/spellcheck/renderer/spellcheck_panel.h b/components/spellcheck/renderer/spellcheck_panel.h index 36bf2e1..7acf93ac 100644 --- a/components/spellcheck/renderer/spellcheck_panel.h +++ b/components/spellcheck/renderer/spellcheck_panel.h
@@ -30,6 +30,10 @@ SpellCheckPanel(content::RenderFrame* render_frame, service_manager::BinderRegistry* registry, service_manager::LocalInterfaceProvider* embedder_provider); + + SpellCheckPanel(const SpellCheckPanel&) = delete; + SpellCheckPanel& operator=(const SpellCheckPanel&) = delete; + ~SpellCheckPanel() override; private: @@ -59,8 +63,6 @@ bool spelling_panel_visible_; service_manager::LocalInterfaceProvider* embedder_provider_; - - DISALLOW_COPY_AND_ASSIGN(SpellCheckPanel); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PANEL_H_
diff --git a/components/spellcheck/renderer/spellcheck_provider.h b/components/spellcheck/renderer/spellcheck_provider.h index 47ac51d5..971e5dc 100644 --- a/components/spellcheck/renderer/spellcheck_provider.h +++ b/components/spellcheck/renderer/spellcheck_provider.h
@@ -59,6 +59,10 @@ content::RenderFrame* render_frame, SpellCheck* spellcheck, service_manager::LocalInterfaceProvider* embedder_provider); + + SpellCheckProvider(const SpellCheckProvider&) = delete; + SpellCheckProvider& operator=(const SpellCheckProvider&) = delete; + ~SpellCheckProvider() override; // Requests async spell and grammar checks from the platform text checker @@ -176,8 +180,6 @@ #endif // defined(OS_WIN) && BUILDFLAG(USE_BROWSER_SPELLCHECKER) base::WeakPtrFactory<SpellCheckProvider> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SpellCheckProvider); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_PROVIDER_H_
diff --git a/components/spellcheck/renderer/spellcheck_worditerator.h b/components/spellcheck/renderer/spellcheck_worditerator.h index f8b259e..668c913 100644 --- a/components/spellcheck/renderer/spellcheck_worditerator.h +++ b/components/spellcheck/renderer/spellcheck_worditerator.h
@@ -31,6 +31,10 @@ class SpellcheckCharAttribute { public: SpellcheckCharAttribute(); + + SpellcheckCharAttribute(const SpellcheckCharAttribute&) = delete; + SpellcheckCharAttribute& operator=(const SpellcheckCharAttribute&) = delete; + ~SpellcheckCharAttribute(); // Sets the language of the spellchecker. When this function is called with an @@ -77,8 +81,6 @@ // The script code used by this language. UScriptCode script_code_; - - DISALLOW_COPY_AND_ASSIGN(SpellcheckCharAttribute); }; // A class which extracts words that can be checked for spelling from a @@ -129,6 +131,10 @@ }; SpellcheckWordIterator(); + + SpellcheckWordIterator(const SpellcheckWordIterator&) = delete; + SpellcheckWordIterator& operator=(const SpellcheckWordIterator&) = delete; + ~SpellcheckWordIterator(); // Initializes a word-iterator object with the language-specific attribute. If @@ -197,9 +203,6 @@ // The break iterator. std::unique_ptr<base::i18n::BreakIterator> iterator_; - - DISALLOW_COPY_AND_ASSIGN(SpellcheckWordIterator); }; #endif // COMPONENTS_SPELLCHECK_RENDERER_SPELLCHECK_WORDITERATOR_H_ -
diff --git a/components/storage_monitor/mtab_watcher_linux.h b/components/storage_monitor/mtab_watcher_linux.h index a1330a9..8a89445 100644 --- a/components/storage_monitor/mtab_watcher_linux.h +++ b/components/storage_monitor/mtab_watcher_linux.h
@@ -40,6 +40,10 @@ // Caller is responsible for bouncing to the correct sequence. MtabWatcherLinux(const base::FilePath& mtab_path, const UpdateMtabCallback& callback); + + MtabWatcherLinux(const MtabWatcherLinux&) = delete; + MtabWatcherLinux& operator=(const MtabWatcherLinux&) = delete; + ~MtabWatcherLinux(); private: @@ -60,8 +64,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<MtabWatcherLinux> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MtabWatcherLinux); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/mtp_manager_client_chromeos.h b/components/storage_monitor/mtp_manager_client_chromeos.h index 2cab72f..c61c79ad 100644 --- a/components/storage_monitor/mtp_manager_client_chromeos.h +++ b/components/storage_monitor/mtp_manager_client_chromeos.h
@@ -26,6 +26,10 @@ public: MtpManagerClientChromeOS(StorageMonitor::Receiver* receiver, device::mojom::MtpManager* mtp_manager); + + MtpManagerClientChromeOS(const MtpManagerClientChromeOS&) = delete; + MtpManagerClientChromeOS& operator=(const MtpManagerClientChromeOS&) = delete; + ~MtpManagerClientChromeOS() override; // Finds the storage that contains |path| and populates |storage_info|. @@ -70,8 +74,6 @@ StorageMonitor::Receiver* const notifications_; base::WeakPtrFactory<MtpManagerClientChromeOS> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MtpManagerClientChromeOS); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc b/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc index 5f0b892..82610f6 100644 --- a/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc +++ b/components/storage_monitor/mtp_manager_client_chromeos_unittest.cc
@@ -110,6 +110,10 @@ MtpManagerClientChromeOSTest() : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {} + MtpManagerClientChromeOSTest(const MtpManagerClientChromeOSTest&) = delete; + MtpManagerClientChromeOSTest& operator=(const MtpManagerClientChromeOSTest&) = + delete; + ~MtpManagerClientChromeOSTest() override {} protected: @@ -140,8 +144,6 @@ std::unique_ptr<FakeMtpManagerClientChromeOS> mtp_device_observer_; std::unique_ptr<MockRemovableStorageObserver> mock_storage_observer_; - - DISALLOW_COPY_AND_ASSIGN(MtpManagerClientChromeOSTest); }; // Test to verify basic MTP storage attach and detach notifications.
diff --git a/components/storage_monitor/portable_device_watcher_win.h b/components/storage_monitor/portable_device_watcher_win.h index b2db8f4..f40d86c 100644 --- a/components/storage_monitor/portable_device_watcher_win.h +++ b/components/storage_monitor/portable_device_watcher_win.h
@@ -69,6 +69,10 @@ // TODO(gbillock): Change to take the device notifications object as // an argument. PortableDeviceWatcherWin(); + + PortableDeviceWatcherWin(const PortableDeviceWatcherWin&) = delete; + PortableDeviceWatcherWin& operator=(const PortableDeviceWatcherWin&) = delete; + virtual ~PortableDeviceWatcherWin(); // Must be called after the browser blocking pool is ready for use. @@ -142,8 +146,6 @@ // Used by |media_task_runner_| to create cancelable callbacks. base::WeakPtrFactory<PortableDeviceWatcherWin> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PortableDeviceWatcherWin); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/storage_monitor_chromeos.h b/components/storage_monitor/storage_monitor_chromeos.h index 57c123e..b769062 100644 --- a/components/storage_monitor/storage_monitor_chromeos.h +++ b/components/storage_monitor/storage_monitor_chromeos.h
@@ -40,6 +40,10 @@ // Should only be called by browser start up code. // Use StorageMonitor::GetInstance() instead. StorageMonitorCros(); + + StorageMonitorCros(const StorageMonitorCros&) = delete; + StorageMonitorCros& operator=(const StorageMonitorCros&) = delete; + ~StorageMonitorCros() override; // Sets up disk listeners and issues notifications for any discovered @@ -96,8 +100,6 @@ std::unique_ptr<MtpManagerClientChromeOS> mtp_manager_client_; base::WeakPtrFactory<StorageMonitorCros> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorCros); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/storage_monitor_chromeos_unittest.cc b/components/storage_monitor/storage_monitor_chromeos_unittest.cc index e3c299f..927da9e9 100644 --- a/components/storage_monitor/storage_monitor_chromeos_unittest.cc +++ b/components/storage_monitor/storage_monitor_chromeos_unittest.cc
@@ -68,6 +68,9 @@ public: TestStorageMonitorCros() {} + TestStorageMonitorCros(const TestStorageMonitorCros&) = delete; + TestStorageMonitorCros& operator=(const TestStorageMonitorCros&) = delete; + ~TestStorageMonitorCros() override {} void Init() override { @@ -101,15 +104,16 @@ base::OnceCallback<void(EjectStatus)> callback) override { StorageMonitorCros::EjectDevice(device_id, std::move(callback)); } - - private: - DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorCros); }; // Wrapper class to test StorageMonitorCros. class StorageMonitorCrosTest : public testing::Test { public: StorageMonitorCrosTest(); + + StorageMonitorCrosTest(const StorageMonitorCrosTest&) = delete; + StorageMonitorCrosTest& operator=(const StorageMonitorCrosTest&) = delete; + ~StorageMonitorCrosTest() override; void EjectNotify(StorageMonitor::EjectStatus status); @@ -159,8 +163,6 @@ // Objects that talks with StorageMonitorCros. std::unique_ptr<MockRemovableStorageObserver> mock_storage_observer_; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorCrosTest); }; StorageMonitorCrosTest::StorageMonitorCrosTest()
diff --git a/components/storage_monitor/storage_monitor_dummy.cc b/components/storage_monitor/storage_monitor_dummy.cc index 90b8428..b5112d8 100644 --- a/components/storage_monitor/storage_monitor_dummy.cc +++ b/components/storage_monitor/storage_monitor_dummy.cc
@@ -13,6 +13,10 @@ // Should only be called by browser start up code. // Use StorageMonitor::GetInstance() instead. StorageMonitorDummy() = default; + + StorageMonitorDummy(const StorageMonitorDummy&) = delete; + StorageMonitorDummy& operator=(const StorageMonitorDummy&) = delete; + ~StorageMonitorDummy() override = default; // Must be called for StorageMonitorDummy to work. @@ -27,8 +31,6 @@ void EjectDevice(const std::string& device_id, base::OnceCallback<void(EjectStatus)> callback) override {} - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorDummy); }; StorageMonitor* StorageMonitor::CreateInternal() {
diff --git a/components/storage_monitor/storage_monitor_linux.cc b/components/storage_monitor/storage_monitor_linux.cc index bef9c65..e8d4db8 100644 --- a/components/storage_monitor/storage_monitor_linux.cc +++ b/components/storage_monitor/storage_monitor_linux.cc
@@ -83,6 +83,12 @@ class ScopedGetDeviceInfoResultRecorder { public: ScopedGetDeviceInfoResultRecorder() = default; + + ScopedGetDeviceInfoResultRecorder(const ScopedGetDeviceInfoResultRecorder&) = + delete; + ScopedGetDeviceInfoResultRecorder& operator=( + const ScopedGetDeviceInfoResultRecorder&) = delete; + ~ScopedGetDeviceInfoResultRecorder() { UMA_HISTOGRAM_BOOLEAN("MediaDeviceNotification.UdevRequestSuccess", result_); @@ -94,8 +100,6 @@ private: bool result_ = false; - - DISALLOW_COPY_AND_ASSIGN(ScopedGetDeviceInfoResultRecorder); }; // Returns the storage partition size of the device specified by |device_path|.
diff --git a/components/storage_monitor/storage_monitor_linux.h b/components/storage_monitor/storage_monitor_linux.h index 4af41f27..a27f313 100644 --- a/components/storage_monitor/storage_monitor_linux.h +++ b/components/storage_monitor/storage_monitor_linux.h
@@ -43,6 +43,10 @@ // Use StorageMonitor::GetInstance() instead. // |mtab_file_path| is the path to a mtab file to watch for mount points. explicit StorageMonitorLinux(const base::FilePath& mtab_file_path); + + StorageMonitorLinux(const StorageMonitorLinux&) = delete; + StorageMonitorLinux& operator=(const StorageMonitorLinux&) = delete; + ~StorageMonitorLinux() override; // Must be called for StorageMonitorLinux to work. @@ -129,8 +133,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<StorageMonitorLinux> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinux); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/storage_monitor_linux_unittest.cc b/components/storage_monitor/storage_monitor_linux_unittest.cc index 50ed6d4..819e58b 100644 --- a/components/storage_monitor/storage_monitor_linux_unittest.cc +++ b/components/storage_monitor/storage_monitor_linux_unittest.cc
@@ -119,6 +119,10 @@ : StorageMonitorLinux(path) { SetGetDeviceInfoCallbackForTest(base::BindRepeating(&GetDeviceInfo)); } + + TestStorageMonitorLinux(const TestStorageMonitorLinux&) = delete; + TestStorageMonitorLinux& operator=(const TestStorageMonitorLinux&) = delete; + ~TestStorageMonitorLinux() override = default; private: @@ -135,8 +139,6 @@ base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::RunLoop::QuitCurrentWhenIdleClosureDeprecated()); } - - DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorLinux); }; class StorageMonitorLinuxTest : public testing::Test { @@ -156,6 +158,10 @@ }; StorageMonitorLinuxTest() = default; + + StorageMonitorLinuxTest(const StorageMonitorLinuxTest&) = delete; + StorageMonitorLinuxTest& operator=(const StorageMonitorLinuxTest&) = delete; + ~StorageMonitorLinuxTest() override = default; protected: @@ -307,8 +313,6 @@ base::FilePath mtab_file_; std::unique_ptr<TestStorageMonitorLinux> monitor_; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorLinuxTest); }; // Simple test case where we attach and detach a media device.
diff --git a/components/storage_monitor/storage_monitor_mac.h b/components/storage_monitor/storage_monitor_mac.h index 48627eb7..bdf071e92 100644 --- a/components/storage_monitor/storage_monitor_mac.h +++ b/components/storage_monitor/storage_monitor_mac.h
@@ -33,6 +33,9 @@ // Should only be called by browser start up code. Use GetInstance() instead. StorageMonitorMac(); + StorageMonitorMac(const StorageMonitorMac&) = delete; + StorageMonitorMac& operator=(const StorageMonitorMac&) = delete; + ~StorageMonitorMac() override; void Init() override; @@ -68,8 +71,6 @@ int pending_disk_updates_; std::unique_ptr<ImageCaptureDeviceManager> image_capture_device_manager_; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorMac); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/storage_monitor_win.h b/components/storage_monitor/storage_monitor_win.h index a79fd6d..589ac10 100644 --- a/components/storage_monitor/storage_monitor_win.h +++ b/components/storage_monitor/storage_monitor_win.h
@@ -33,6 +33,10 @@ StorageMonitorWin( std::unique_ptr<VolumeMountWatcherWin> volume_mount_watcher, std::unique_ptr<PortableDeviceWatcherWin> portable_device_watcher); + + StorageMonitorWin(const StorageMonitorWin&) = delete; + StorageMonitorWin& operator=(const StorageMonitorWin&) = delete; + ~StorageMonitorWin() override; // Must be called after the file thread is created. @@ -84,8 +88,6 @@ // The portable device watcher, used to manage media transfer protocol // devices. const std::unique_ptr<PortableDeviceWatcherWin> portable_device_watcher_; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorWin); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/storage_monitor_win_unittest.cc b/components/storage_monitor/storage_monitor_win_unittest.cc index 08b73a7e7..b847310 100644 --- a/components/storage_monitor/storage_monitor_win_unittest.cc +++ b/components/storage_monitor/storage_monitor_win_unittest.cc
@@ -42,6 +42,10 @@ class StorageMonitorWinTest : public testing::Test { public: StorageMonitorWinTest(); + + StorageMonitorWinTest(const StorageMonitorWinTest&) = delete; + StorageMonitorWinTest& operator=(const StorageMonitorWinTest&) = delete; + ~StorageMonitorWinTest() override; protected: @@ -74,8 +78,6 @@ private: content::BrowserTaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(StorageMonitorWinTest); }; StorageMonitorWinTest::StorageMonitorWinTest() {
diff --git a/components/storage_monitor/test_media_transfer_protocol_manager_chromeos.h b/components/storage_monitor/test_media_transfer_protocol_manager_chromeos.h index 31d96ea5..40b6ad6 100644 --- a/components/storage_monitor/test_media_transfer_protocol_manager_chromeos.h +++ b/components/storage_monitor/test_media_transfer_protocol_manager_chromeos.h
@@ -24,6 +24,12 @@ public: static TestMediaTransferProtocolManagerChromeOS* GetFakeMtpManager(); TestMediaTransferProtocolManagerChromeOS(); + + TestMediaTransferProtocolManagerChromeOS( + const TestMediaTransferProtocolManagerChromeOS&) = delete; + TestMediaTransferProtocolManagerChromeOS& operator=( + const TestMediaTransferProtocolManagerChromeOS&) = delete; + ~TestMediaTransferProtocolManagerChromeOS() override; void AddReceiver(mojo::PendingReceiver<device::mojom::MtpManager> receiver); @@ -72,8 +78,6 @@ DeleteObjectCallback callback) override; mojo::ReceiverSet<device::mojom::MtpManager> receivers_; - - DISALLOW_COPY_AND_ASSIGN(TestMediaTransferProtocolManagerChromeOS); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/test_portable_device_watcher_win.h b/components/storage_monitor/test_portable_device_watcher_win.h index 04ba36f..8df6a57d 100644 --- a/components/storage_monitor/test_portable_device_watcher_win.h +++ b/components/storage_monitor/test_portable_device_watcher_win.h
@@ -26,6 +26,11 @@ static const char kStorageUniqueIdA[]; TestPortableDeviceWatcherWin(); + + TestPortableDeviceWatcherWin(const TestPortableDeviceWatcherWin&) = delete; + TestPortableDeviceWatcherWin& operator=(const TestPortableDeviceWatcherWin&) = + delete; + ~TestPortableDeviceWatcherWin() override; // Returns the persistent storage unique id of the device specified by the @@ -70,8 +75,6 @@ // Set to true to get dummy storage details from // GetMTPStorageInfoFromDeviceId(). bool use_dummy_mtp_storage_info_; - - DISALLOW_COPY_AND_ASSIGN(TestPortableDeviceWatcherWin); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/test_storage_monitor_win.h b/components/storage_monitor/test_storage_monitor_win.h index 37e4df9..a0a955be 100644 --- a/components/storage_monitor/test_storage_monitor_win.h +++ b/components/storage_monitor/test_storage_monitor_win.h
@@ -27,6 +27,9 @@ std::unique_ptr<TestVolumeMountWatcherWin> volume_mount_watcher, std::unique_ptr<TestPortableDeviceWatcherWin> portable_device_watcher); + TestStorageMonitorWin(const TestStorageMonitorWin&) = delete; + TestStorageMonitorWin& operator=(const TestStorageMonitorWin&) = delete; + ~TestStorageMonitorWin() override; void InjectDeviceChange(UINT event_type, LPARAM data); @@ -34,9 +37,6 @@ VolumeMountWatcherWin* volume_mount_watcher(); Receiver* receiver() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorWin); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/test_volume_mount_watcher_win.h b/components/storage_monitor/test_volume_mount_watcher_win.h index 2903287..fb2ba31 100644 --- a/components/storage_monitor/test_volume_mount_watcher_win.h +++ b/components/storage_monitor/test_volume_mount_watcher_win.h
@@ -27,6 +27,11 @@ class TestVolumeMountWatcherWin : public VolumeMountWatcherWin { public: TestVolumeMountWatcherWin(); + + TestVolumeMountWatcherWin(const TestVolumeMountWatcherWin&) = delete; + TestVolumeMountWatcherWin& operator=(const TestVolumeMountWatcherWin&) = + delete; + ~TestVolumeMountWatcherWin() override; static bool GetDeviceRemovable(const base::FilePath& device_path, @@ -56,8 +61,6 @@ std::vector<base::FilePath> devices_checked_; std::unique_ptr<base::WaitableEvent> device_check_complete_event_; bool attached_devices_fake_; - - DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/transient_device_ids.h b/components/storage_monitor/transient_device_ids.h index 5c8284e..a4bf03cf 100644 --- a/components/storage_monitor/transient_device_ids.h +++ b/components/storage_monitor/transient_device_ids.h
@@ -21,6 +21,10 @@ class TransientDeviceIds { public: TransientDeviceIds(); + + TransientDeviceIds(const TransientDeviceIds&) = delete; + TransientDeviceIds& operator=(const TransientDeviceIds&) = delete; + ~TransientDeviceIds(); // Returns the transient ID for a given |device_id|. @@ -40,8 +44,6 @@ IdMap transient_id_map_; base::ThreadChecker thread_checker_; - - DISALLOW_COPY_AND_ASSIGN(TransientDeviceIds); }; } // namespace storage_monitor
diff --git a/components/storage_monitor/volume_mount_watcher_win.h b/components/storage_monitor/volume_mount_watcher_win.h index 51952f70..bf5fba15 100644 --- a/components/storage_monitor/volume_mount_watcher_win.h +++ b/components/storage_monitor/volume_mount_watcher_win.h
@@ -30,6 +30,10 @@ class VolumeMountWatcherWin { public: VolumeMountWatcherWin(); + + VolumeMountWatcherWin(const VolumeMountWatcherWin&) = delete; + VolumeMountWatcherWin& operator=(const VolumeMountWatcherWin&) = delete; + virtual ~VolumeMountWatcherWin(); // Returns the volume file path of the drive specified by the |drive_number|. @@ -115,8 +119,6 @@ StorageMonitor::Receiver* notifications_; base::WeakPtrFactory<VolumeMountWatcherWin> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VolumeMountWatcherWin); }; } // namespace storage_monitor
diff --git a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h index bde2e53..95a35cf 100644 --- a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h +++ b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle.h
@@ -49,6 +49,11 @@ VerifiedRuleset::Handle* ruleset_handle, const mojom::ActivationState& parent_activation_state); + ActivationStateComputingNavigationThrottle( + const ActivationStateComputingNavigationThrottle&) = delete; + ActivationStateComputingNavigationThrottle& operator=( + const ActivationStateComputingNavigationThrottle&) = delete; + ~ActivationStateComputingNavigationThrottle() override; // Notification for main frames when the page level activation is computed. @@ -120,8 +125,6 @@ base::WeakPtrFactory<ActivationStateComputingNavigationThrottle> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ActivationStateComputingNavigationThrottle); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc index ccc0d7e..d0a2809 100644 --- a/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc +++ b/components/subresource_filter/content/browser/activation_state_computing_navigation_throttle_unittest.cc
@@ -46,6 +46,12 @@ ActivationStateComputingNavigationThrottleTest() : simple_task_runner_(base::MakeRefCounted<base::TestSimpleTaskRunner>()), dryrun_speculation_(GetParam()) {} + + ActivationStateComputingNavigationThrottleTest( + const ActivationStateComputingNavigationThrottleTest&) = delete; + ActivationStateComputingNavigationThrottleTest& operator=( + const ActivationStateComputingNavigationThrottleTest&) = delete; + ~ActivationStateComputingNavigationThrottleTest() override {} void SetUp() override { @@ -245,8 +251,6 @@ content::RenderFrameHost* last_committed_frame_host_ = nullptr; bool dryrun_speculation_; - - DISALLOW_COPY_AND_ASSIGN(ActivationStateComputingNavigationThrottleTest); }; typedef ActivationStateComputingNavigationThrottleTest
diff --git a/components/subresource_filter/content/browser/ads_blocked_infobar.h b/components/subresource_filter/content/browser/ads_blocked_infobar.h index 0d46b4fc..ff91ca5a 100644 --- a/components/subresource_filter/content/browser/ads_blocked_infobar.h +++ b/components/subresource_filter/content/browser/ads_blocked_infobar.h
@@ -15,6 +15,10 @@ public: explicit AdsBlockedInfoBar( std::unique_ptr<AdsBlockedInfobarDelegate> delegate); + + AdsBlockedInfoBar(const AdsBlockedInfoBar&) = delete; + AdsBlockedInfoBar& operator=(const AdsBlockedInfoBar&) = delete; + ~AdsBlockedInfoBar() override; private: @@ -22,8 +26,6 @@ base::android::ScopedJavaLocalRef<jobject> CreateRenderInfoBar( JNIEnv* env, const ResourceIdMapper& resource_id_mapper) override; - - DISALLOW_COPY_AND_ASSIGN(AdsBlockedInfoBar); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/ads_blocked_infobar_delegate.h b/components/subresource_filter/content/browser/ads_blocked_infobar_delegate.h index 894012e..0944601 100644 --- a/components/subresource_filter/content/browser/ads_blocked_infobar_delegate.h +++ b/components/subresource_filter/content/browser/ads_blocked_infobar_delegate.h
@@ -27,6 +27,10 @@ // |infobar_manager|. static void Create(infobars::ContentInfoBarManager* infobar_manager); + AdsBlockedInfobarDelegate(const AdsBlockedInfobarDelegate&) = delete; + AdsBlockedInfobarDelegate& operator=(const AdsBlockedInfobarDelegate&) = + delete; + ~AdsBlockedInfobarDelegate() override; std::u16string GetExplanationText() const; @@ -47,8 +51,6 @@ // True when the infobar is in the expanded state. bool infobar_expanded_ = false; - - DISALLOW_COPY_AND_ASSIGN(AdsBlockedInfobarDelegate); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/async_document_subresource_filter.h b/components/subresource_filter/content/browser/async_document_subresource_filter.h index defd32c..a71c751 100644 --- a/components/subresource_filter/content/browser/async_document_subresource_filter.h +++ b/components/subresource_filter/content/browser/async_document_subresource_filter.h
@@ -73,6 +73,9 @@ url::Origin parent_document_origin, mojom::ActivationState parent_activation_state); + InitializationParams(const InitializationParams&) = delete; + InitializationParams& operator=(const InitializationParams&) = delete; + ~InitializationParams(); InitializationParams(InitializationParams&& other); @@ -83,9 +86,6 @@ GURL document_url; url::Origin parent_document_origin; mojom::ActivationState parent_activation_state; - - private: - DISALLOW_COPY_AND_ASSIGN(InitializationParams); }; // Creates a Core and initializes it asynchronously on a |task_runner| using @@ -129,6 +129,11 @@ const url::Origin& inherited_document_origin, const mojom::ActivationState& activation_state); + AsyncDocumentSubresourceFilter(const AsyncDocumentSubresourceFilter&) = + delete; + AsyncDocumentSubresourceFilter& operator=( + const AsyncDocumentSubresourceFilter&) = delete; + ~AsyncDocumentSubresourceFilter(); // Computes LoadPolicy on a |task_runner| and returns it back to the calling @@ -189,8 +194,6 @@ base::SequenceChecker sequence_checker_; base::WeakPtrFactory<AsyncDocumentSubresourceFilter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(AsyncDocumentSubresourceFilter); }; // Holds a DocumentSubresourceFilter that is created in a deferred manner in @@ -198,6 +201,10 @@ class AsyncDocumentSubresourceFilter::Core { public: Core(); + + Core(const Core&) = delete; + Core& operator=(const Core&) = delete; + ~Core(); // Can return nullptr even after initialization in case MemoryMappedRuleset @@ -229,8 +236,6 @@ absl::optional<DocumentSubresourceFilter> filter_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(Core); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h b/components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h index 0148732..d10b55b 100644 --- a/components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h +++ b/components/subresource_filter/content/browser/async_document_subresource_filter_test_utils.h
@@ -19,6 +19,12 @@ class TestActivationStateCallbackReceiver { public: TestActivationStateCallbackReceiver(); + + TestActivationStateCallbackReceiver( + const TestActivationStateCallbackReceiver&) = delete; + TestActivationStateCallbackReceiver& operator=( + const TestActivationStateCallbackReceiver&) = delete; + ~TestActivationStateCallbackReceiver(); base::OnceCallback<void(mojom::ActivationState)> GetCallback(); @@ -34,8 +40,6 @@ int callback_count_ = 0; base::OnceClosure quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(TestActivationStateCallbackReceiver); }; } // namespace testing
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc index 7325028..e58ade0 100644 --- a/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc +++ b/components/subresource_filter/content/browser/content_subresource_filter_throttle_manager_unittest.cc
@@ -143,6 +143,12 @@ mock_page_activations_[GURL(kTestURLWithNoActivation)] = mojom::ActivationState(); } + + MockPageStateActivationThrottle(const MockPageStateActivationThrottle&) = + delete; + MockPageStateActivationThrottle& operator=( + const MockPageStateActivationThrottle&) = delete; + ~MockPageStateActivationThrottle() override {} // content::NavigationThrottle: @@ -175,8 +181,6 @@ std::map<GURL, mojom::ActivationState> mock_page_activations_; PageActivationNotificationTiming activation_throttle_state_; - - DISALLOW_COPY_AND_ASSIGN(MockPageStateActivationThrottle); }; class ContentSubresourceFilterThrottleManagerTest @@ -185,6 +189,12 @@ public ::testing::WithParamInterface<PageActivationNotificationTiming> { public: ContentSubresourceFilterThrottleManagerTest() {} + + ContentSubresourceFilterThrottleManagerTest( + const ContentSubresourceFilterThrottleManagerTest&) = delete; + ContentSubresourceFilterThrottleManagerTest& operator=( + const ContentSubresourceFilterThrottleManagerTest&) = delete; + ~ContentSubresourceFilterThrottleManagerTest() override {} // content::RenderViewHostTestHarness: @@ -406,8 +416,6 @@ std::unique_ptr<content::NavigationSimulator> navigation_simulator_; bool created_safe_browsing_throttle_for_last_navigation_ = false; - - DISALLOW_COPY_AND_ASSIGN(ContentSubresourceFilterThrottleManagerTest); }; INSTANTIATE_TEST_SUITE_P(All,
diff --git a/components/subresource_filter/content/browser/navigation_console_logger.h b/components/subresource_filter/content/browser/navigation_console_logger.h index ac49f80..5952275f 100644 --- a/components/subresource_filter/content/browser/navigation_console_logger.h +++ b/components/subresource_filter/content/browser/navigation_console_logger.h
@@ -37,6 +37,9 @@ blink::mojom::ConsoleMessageLevel level, const std::string& message); + NavigationConsoleLogger(const NavigationConsoleLogger&) = delete; + NavigationConsoleLogger& operator=(const NavigationConsoleLogger&) = delete; + ~NavigationConsoleLogger() override; private: @@ -62,8 +65,6 @@ const content::NavigationHandle* handle_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(NavigationConsoleLogger); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/page_load_statistics.h b/components/subresource_filter/content/browser/page_load_statistics.h index f77ef93..0516dd9 100644 --- a/components/subresource_filter/content/browser/page_load_statistics.h +++ b/components/subresource_filter/content/browser/page_load_statistics.h
@@ -16,6 +16,10 @@ class PageLoadStatistics { public: PageLoadStatistics(const mojom::ActivationState& state); + + PageLoadStatistics(const PageLoadStatistics&) = delete; + PageLoadStatistics& operator=(const PageLoadStatistics&) = delete; + ~PageLoadStatistics(); void OnDocumentLoadStatistics( @@ -28,8 +32,6 @@ // Statistics about subresource loads, aggregated across all frames of the // current page. mojom::DocumentLoadStatistics aggregated_document_statistics_; - - DISALLOW_COPY_AND_ASSIGN(PageLoadStatistics); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/ruleset_publisher_impl.h b/components/subresource_filter/content/browser/ruleset_publisher_impl.h index 211aca03..bf6d685 100644 --- a/components/subresource_filter/content/browser/ruleset_publisher_impl.h +++ b/components/subresource_filter/content/browser/ruleset_publisher_impl.h
@@ -35,6 +35,10 @@ RulesetPublisherImpl( RulesetService* ruleset_service, scoped_refptr<base::SequencedTaskRunner> blocking_task_runner); + + RulesetPublisherImpl(const RulesetPublisherImpl&) = delete; + RulesetPublisherImpl& operator=(const RulesetPublisherImpl&) = delete; + ~RulesetPublisherImpl() override; // RulesetPublisher: @@ -70,8 +74,6 @@ RulesetService* ruleset_service_; std::unique_ptr<VerifiedRulesetDealer::Handle> ruleset_dealer_; scoped_refptr<base::SingleThreadTaskRunner> best_effort_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(RulesetPublisherImpl); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/ruleset_service.h b/components/subresource_filter/content/browser/ruleset_service.h index 03820c96..210012097 100644 --- a/components/subresource_filter/content/browser/ruleset_service.h +++ b/components/subresource_filter/content/browser/ruleset_service.h
@@ -162,6 +162,10 @@ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner, // Note: Optional publisher parameter used exclusively for testing. std::unique_ptr<RulesetPublisher> publisher = nullptr); + + RulesetService(const RulesetService&) = delete; + RulesetService& operator=(const RulesetService&) = delete; + virtual ~RulesetService(); // Pass-through function to set the callback on publishing. @@ -269,8 +273,6 @@ bool is_initialized_; const base::FilePath indexed_ruleset_base_dir_; - - DISALLOW_COPY_AND_ASSIGN(RulesetService); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/ruleset_service_unittest.cc b/components/subresource_filter/content/browser/ruleset_service_unittest.cc index 156bd93..2896448 100644 --- a/components/subresource_filter/content/browser/ruleset_service_unittest.cc +++ b/components/subresource_filter/content/browser/ruleset_service_unittest.cc
@@ -65,13 +65,14 @@ std::swap(*target_, replacement_); } + ScopedFunctionOverride(const ScopedFunctionOverride&) = delete; + ScopedFunctionOverride& operator=(const ScopedFunctionOverride&) = delete; + ~ScopedFunctionOverride() { std::swap(*target_, replacement_); } private: Fun* target_; Fun replacement_; - - DISALLOW_COPY_AND_ASSIGN(ScopedFunctionOverride); }; template <typename Fun> @@ -99,6 +100,10 @@ scoped_refptr<base::TestSimpleTaskRunner> best_effort_task_runner) : blocking_task_runner_(std::move(blocking_task_runner)), best_effort_task_runner_(std::move(best_effort_task_runner)) {} + + MockRulesetPublisherImpl(const MockRulesetPublisherImpl&) = delete; + MockRulesetPublisherImpl& operator=(const MockRulesetPublisherImpl&) = delete; + ~MockRulesetPublisherImpl() override = default; void TryOpenAndSetRulesetFile( @@ -148,8 +153,6 @@ std::vector<RulesetFilePtr> published_rulesets_; scoped_refptr<base::TestSimpleTaskRunner> blocking_task_runner_; scoped_refptr<base::TestSimpleTaskRunner> best_effort_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(MockRulesetPublisherImpl); }; bool MockFailingReplaceFile(const base::FilePath&,
diff --git a/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle.h b/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle.h index 9732e2b..d95353b 100644 --- a/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle.h +++ b/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle.h
@@ -54,6 +54,12 @@ SubframeNavigationFilteringThrottle( content::NavigationHandle* handle, AsyncDocumentSubresourceFilter* parent_frame_filter); + + SubframeNavigationFilteringThrottle( + const SubframeNavigationFilteringThrottle&) = delete; + SubframeNavigationFilteringThrottle& operator=( + const SubframeNavigationFilteringThrottle&) = delete; + ~SubframeNavigationFilteringThrottle() override; // content::NavigationThrottle: @@ -102,8 +108,6 @@ base::WeakPtrFactory<SubframeNavigationFilteringThrottle> weak_ptr_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(SubframeNavigationFilteringThrottle); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc b/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc index 87d4461..a37b6e8 100644 --- a/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc +++ b/components/subresource_filter/content/browser/subframe_navigation_filtering_throttle_unittest.cc
@@ -51,6 +51,12 @@ public content::WebContentsObserver { public: SubframeNavigationFilteringThrottleTest() {} + + SubframeNavigationFilteringThrottleTest( + const SubframeNavigationFilteringThrottleTest&) = delete; + SubframeNavigationFilteringThrottleTest& operator=( + const SubframeNavigationFilteringThrottleTest&) = delete; + ~SubframeNavigationFilteringThrottleTest() override {} void SetUp() override { @@ -171,8 +177,6 @@ std::unique_ptr<AsyncDocumentSubresourceFilter> parent_filter_; std::unique_ptr<content::NavigationSimulator> navigation_simulator_; - - DISALLOW_COPY_AND_ASSIGN(SubframeNavigationFilteringThrottleTest); }; TEST_F(SubframeNavigationFilteringThrottleTest, FilterOnStart) {
diff --git a/components/subresource_filter/content/browser/subresource_filter_content_settings_manager.h b/components/subresource_filter/content/browser/subresource_filter_content_settings_manager.h index eb9e9fc..1fae292 100644 --- a/components/subresource_filter/content/browser/subresource_filter_content_settings_manager.h +++ b/components/subresource_filter/content/browser/subresource_filter_content_settings_manager.h
@@ -64,6 +64,12 @@ public: explicit SubresourceFilterContentSettingsManager( HostContentSettingsMap* settings_map); + + SubresourceFilterContentSettingsManager( + const SubresourceFilterContentSettingsManager&) = delete; + SubresourceFilterContentSettingsManager& operator=( + const SubresourceFilterContentSettingsManager&) = delete; + ~SubresourceFilterContentSettingsManager(); ContentSetting GetSitePermission(const GURL& url) const; @@ -150,8 +156,6 @@ std::unique_ptr<base::Clock> clock_; bool should_use_smart_ui_ = false; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterContentSettingsManager); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_observer_manager.h b/components/subresource_filter/content/browser/subresource_filter_observer_manager.h index d1117e4..c72c5fd 100644 --- a/components/subresource_filter/content/browser/subresource_filter_observer_manager.h +++ b/components/subresource_filter/content/browser/subresource_filter_observer_manager.h
@@ -36,6 +36,12 @@ : public content::WebContentsUserData<SubresourceFilterObserverManager> { public: explicit SubresourceFilterObserverManager(content::WebContents* web_contents); + + SubresourceFilterObserverManager(const SubresourceFilterObserverManager&) = + delete; + SubresourceFilterObserverManager& operator=( + const SubresourceFilterObserverManager&) = delete; + ~SubresourceFilterObserverManager() override; void AddObserver(SubresourceFilterObserver* observer); @@ -73,8 +79,6 @@ friend class content::WebContentsUserData<SubresourceFilterObserverManager>; base::ObserverList<SubresourceFilterObserver>::Unchecked observers_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterObserverManager); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.h b/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.h index 4799c0cf..c7ce8db 100644 --- a/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.h +++ b/components/subresource_filter/content/browser/subresource_filter_observer_test_utils.h
@@ -35,6 +35,11 @@ public content::WebContentsObserver { public: explicit TestSubresourceFilterObserver(content::WebContents* web_contents); + + TestSubresourceFilterObserver(const TestSubresourceFilterObserver&) = delete; + TestSubresourceFilterObserver& operator=( + const TestSubresourceFilterObserver&) = delete; + ~TestSubresourceFilterObserver() override; // SubresourceFilterObserver: @@ -81,7 +86,6 @@ base::ScopedObservation<SubresourceFilterObserverManager, SubresourceFilterObserver> scoped_observation_{this}; - DISALLOW_COPY_AND_ASSIGN(TestSubresourceFilterObserver); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_profile_context.h b/components/subresource_filter/content/browser/subresource_filter_profile_context.h index d8ca401..bdfb34b 100644 --- a/components/subresource_filter/content/browser/subresource_filter_profile_context.h +++ b/components/subresource_filter/content/browser/subresource_filter_profile_context.h
@@ -32,6 +32,12 @@ explicit SubresourceFilterProfileContext( HostContentSettingsMap* settings_map); + + SubresourceFilterProfileContext(const SubresourceFilterProfileContext&) = + delete; + SubresourceFilterProfileContext& operator=( + const SubresourceFilterProfileContext&) = delete; + ~SubresourceFilterProfileContext() override; SubresourceFilterContentSettingsManager* settings_manager() { @@ -60,8 +66,6 @@ // NOTE: Declared after the objects above to ensure that it is destroyed // before them. std::unique_ptr<EmbedderData> embedder_data_; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterProfileContext); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.h b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.h index 433451c..3b3f0f7 100644 --- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.h +++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle.h
@@ -74,6 +74,11 @@ scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> database_manager); + SubresourceFilterSafeBrowsingActivationThrottle( + const SubresourceFilterSafeBrowsingActivationThrottle&) = delete; + SubresourceFilterSafeBrowsingActivationThrottle& operator=( + const SubresourceFilterSafeBrowsingActivationThrottle&) = delete; + ~SubresourceFilterSafeBrowsingActivationThrottle() override; // content::NavigationThrottle: @@ -141,8 +146,6 @@ // Whether this throttle is deferring the navigation. Only set to true in // WillProcessResponse if there are ongoing safe browsing checks. bool deferring_ = false; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterSafeBrowsingActivationThrottle); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc index 0762260..8d86a71 100644 --- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc +++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
@@ -147,6 +147,11 @@ public: SubresourceFilterSafeBrowsingActivationThrottleTest() {} + SubresourceFilterSafeBrowsingActivationThrottleTest( + const SubresourceFilterSafeBrowsingActivationThrottleTest&) = delete; + SubresourceFilterSafeBrowsingActivationThrottleTest& operator=( + const SubresourceFilterSafeBrowsingActivationThrottleTest&) = delete; + ~SubresourceFilterSafeBrowsingActivationThrottleTest() override {} void SetUp() override { @@ -371,8 +376,6 @@ std::unique_ptr<TestSubresourceFilterObserver> observer_; scoped_refptr<FakeSafeBrowsingDatabaseManager> fake_safe_browsing_database_; base::HistogramTester tester_; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterSafeBrowsingActivationThrottleTest); }; class SubresourceFilterSafeBrowsingActivationThrottleParamTest
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client.h b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client.h index 44af7a6..60efbd6 100644 --- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client.h +++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client.h
@@ -63,6 +63,11 @@ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, scoped_refptr<base::SingleThreadTaskRunner> throttle_task_runner); + SubresourceFilterSafeBrowsingClient( + const SubresourceFilterSafeBrowsingClient&) = delete; + SubresourceFilterSafeBrowsingClient& operator=( + const SubresourceFilterSafeBrowsingClient&) = delete; + ~SubresourceFilterSafeBrowsingClient(); void CheckUrlOnIO(const GURL& url, @@ -84,8 +89,6 @@ base::WeakPtr<SubresourceFilterSafeBrowsingActivationThrottle> throttle_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> throttle_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterSafeBrowsingClient); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client_request.h b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client_request.h index c8db3237..601558f 100644 --- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client_request.h +++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_client_request.h
@@ -40,6 +40,12 @@ database_manager, scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, SubresourceFilterSafeBrowsingClient* client); + + SubresourceFilterSafeBrowsingClientRequest( + const SubresourceFilterSafeBrowsingClientRequest&) = delete; + SubresourceFilterSafeBrowsingClientRequest& operator=( + const SubresourceFilterSafeBrowsingClientRequest&) = delete; + ~SubresourceFilterSafeBrowsingClientRequest() override; void Start(const GURL& url); @@ -84,8 +90,6 @@ base::OneShotTimer timer_; bool request_completed_ = false; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterSafeBrowsingClientRequest); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/browser/test_ruleset_publisher.cc b/components/subresource_filter/content/browser/test_ruleset_publisher.cc index 9b15091..a9120b4 100644 --- a/components/subresource_filter/content/browser/test_ruleset_publisher.cc +++ b/components/subresource_filter/content/browser/test_ruleset_publisher.cc
@@ -22,6 +22,10 @@ service_->SetRulesetPublishedCallbackForTesting(run_loop_.QuitClosure()); } + RulesetDistributionListener(const RulesetDistributionListener&) = delete; + RulesetDistributionListener& operator=(const RulesetDistributionListener&) = + delete; + ~RulesetDistributionListener() { service_->SetRulesetPublishedCallbackForTesting(base::OnceClosure()); } @@ -31,8 +35,6 @@ private: RulesetService* service_; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(RulesetDistributionListener); }; } // namespace
diff --git a/components/subresource_filter/content/browser/test_ruleset_publisher.h b/components/subresource_filter/content/browser/test_ruleset_publisher.h index 8903756a..2c3ce2f 100644 --- a/components/subresource_filter/content/browser/test_ruleset_publisher.h +++ b/components/subresource_filter/content/browser/test_ruleset_publisher.h
@@ -19,6 +19,10 @@ class TestRulesetPublisher { public: explicit TestRulesetPublisher(RulesetService* ruleset_service); + + TestRulesetPublisher(const TestRulesetPublisher&) = delete; + TestRulesetPublisher& operator=(const TestRulesetPublisher&) = delete; + ~TestRulesetPublisher(); // Indexes the |unindexed_ruleset| and publishes it to all renderers @@ -27,8 +31,6 @@ private: RulesetService* ruleset_service_; - - DISALLOW_COPY_AND_ASSIGN(TestRulesetPublisher); }; } // namespace testing
diff --git a/components/subresource_filter/content/browser/verified_ruleset_dealer.h b/components/subresource_filter/content/browser/verified_ruleset_dealer.h index 87549357..9956c03 100644 --- a/components/subresource_filter/content/browser/verified_ruleset_dealer.h +++ b/components/subresource_filter/content/browser/verified_ruleset_dealer.h
@@ -53,6 +53,10 @@ class Handle; VerifiedRulesetDealer(); + + VerifiedRulesetDealer(const VerifiedRulesetDealer&) = delete; + VerifiedRulesetDealer& operator=(const VerifiedRulesetDealer&) = delete; + ~VerifiedRulesetDealer() override; // RulesetDealer: @@ -74,8 +78,6 @@ RulesetVerificationStatus status_ = RulesetVerificationStatus::kNotVerified; // Associated with the current |ruleset_file_|; int expected_checksum_ = 0; - - DISALLOW_COPY_AND_ASSIGN(VerifiedRulesetDealer); }; // The UI-thread handle that owns a VerifiedRulesetDealer living on a dedicated @@ -86,6 +88,10 @@ // Creates a VerifiedRulesetDealer that is owned by this handle, accessed // through this handle, but lives on |task_runner|. explicit Handle(scoped_refptr<base::SequencedTaskRunner> task_runner); + + Handle(const Handle&) = delete; + Handle& operator=(const Handle&) = delete; + ~Handle(); // Returns the |task_runner| on which the VerifiedRulesetDealer, as well as @@ -113,8 +119,6 @@ base::SequencedTaskRunner* task_runner_; std::unique_ptr<VerifiedRulesetDealer, base::OnTaskRunnerDeleter> dealer_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(Handle); }; // Holds a strong reference to MemoryMappedRuleset, and provides acceess to it. @@ -128,6 +132,10 @@ class Handle; VerifiedRuleset(); + + VerifiedRuleset(const VerifiedRuleset&) = delete; + VerifiedRuleset& operator=(const VerifiedRuleset&) = delete; + ~VerifiedRuleset(); // Can return nullptr even after initialization in case no ruleset is @@ -143,8 +151,6 @@ scoped_refptr<const MemoryMappedRuleset> ruleset_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(VerifiedRuleset); }; // The UI-thread handle that owns a VerifiedRuleset living on a dedicated @@ -156,6 +162,10 @@ // |task_runner| using |dealer_handle|. The instance remains owned by this // handle, but living and accessed on the |task_runner|. explicit Handle(VerifiedRulesetDealer::Handle* dealer_handle); + + Handle(const Handle&) = delete; + Handle& operator=(const Handle&) = delete; + ~Handle(); // Returns the |task_runner| on which the VerifiedRuleset, as well as the @@ -175,8 +185,6 @@ base::SequencedTaskRunner* task_runner_; std::unique_ptr<VerifiedRuleset, base::OnTaskRunnerDeleter> ruleset_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(Handle); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/common/ruleset_dealer.h b/components/subresource_filter/content/common/ruleset_dealer.h index a92df28..8921b0e 100644 --- a/components/subresource_filter/content/common/ruleset_dealer.h +++ b/components/subresource_filter/content/common/ruleset_dealer.h
@@ -33,6 +33,10 @@ class RulesetDealer { public: RulesetDealer(); + + RulesetDealer(const RulesetDealer&) = delete; + RulesetDealer& operator=(const RulesetDealer&) = delete; + virtual ~RulesetDealer(); // Sets the |ruleset_file| to memory map and distribute from now on. @@ -66,8 +70,6 @@ base::WeakPtr<MemoryMappedRuleset> weak_cached_ruleset_; base::SequenceChecker sequence_checker_; - - DISALLOW_COPY_AND_ASSIGN(RulesetDealer); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent.h b/components/subresource_filter/content/renderer/subresource_filter_agent.h index 0703ad0..29081cc 100644 --- a/components/subresource_filter/content/renderer/subresource_filter_agent.h +++ b/components/subresource_filter/content/renderer/subresource_filter_agent.h
@@ -45,6 +45,10 @@ content::RenderFrame* render_frame, UnverifiedRulesetDealer* ruleset_dealer, std::unique_ptr<AdResourceTracker> ad_resource_tracker); + + SubresourceFilterAgent(const SubresourceFilterAgent&) = delete; + SubresourceFilterAgent& operator=(const SubresourceFilterAgent&) = delete; + ~SubresourceFilterAgent() override; // Unit tests don't have a RenderFrame so the construction relies on virtual @@ -149,8 +153,6 @@ base::WeakPtr<WebDocumentSubresourceFilterImpl> filter_for_last_created_document_; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgent); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc b/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc index 64728f7..a0b7a091 100644 --- a/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc +++ b/components/subresource_filter/content/renderer/subresource_filter_agent_unittest.cc
@@ -53,6 +53,12 @@ is_provisional_(is_provisional), is_parent_ad_subframe_(is_parent_ad_subframe), is_subframe_created_by_ad_script_(is_subframe_created_by_ad_script) {} + + SubresourceFilterAgentUnderTest(const SubresourceFilterAgentUnderTest&) = + delete; + SubresourceFilterAgentUnderTest& operator=( + const SubresourceFilterAgentUnderTest&) = delete; + ~SubresourceFilterAgentUnderTest() override = default; MOCK_METHOD0(GetDocumentURL, GURL()); @@ -119,8 +125,6 @@ absl::optional<blink::FrameAdEvidence> ad_evidence_; std::unique_ptr<blink::WebDocumentSubresourceFilter> last_injected_filter_; mojom::ActivationState inherited_activation_state_for_new_document_; - - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterAgentUnderTest); }; constexpr const char kTestFirstURL[] = "http://example.com/alpha";
diff --git a/components/subresource_filter/content/renderer/unverified_ruleset_dealer.h b/components/subresource_filter/content/renderer/unverified_ruleset_dealer.h index dc582169..23d162f 100644 --- a/components/subresource_filter/content/renderer/unverified_ruleset_dealer.h +++ b/components/subresource_filter/content/renderer/unverified_ruleset_dealer.h
@@ -27,6 +27,10 @@ public mojom::SubresourceFilterRulesetObserver { public: UnverifiedRulesetDealer(); + + UnverifiedRulesetDealer(const UnverifiedRulesetDealer&) = delete; + UnverifiedRulesetDealer& operator=(const UnverifiedRulesetDealer&) = delete; + ~UnverifiedRulesetDealer() override; private: @@ -45,8 +49,6 @@ mojo::AssociatedReceiver<mojom::SubresourceFilterRulesetObserver> receiver_{ this}; - - DISALLOW_COPY_AND_ASSIGN(UnverifiedRulesetDealer); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h b/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h index d1931625..98dc349 100644 --- a/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h +++ b/components/subresource_filter/content/renderer/web_document_subresource_filter_impl.h
@@ -34,6 +34,10 @@ mojom::ActivationState activation_state, base::File ruleset_file, base::OnceClosure first_disallowed_load_callback); + + BuilderImpl(const BuilderImpl&) = delete; + BuilderImpl& operator=(const BuilderImpl&) = delete; + ~BuilderImpl() override; std::unique_ptr<blink::WebDocumentSubresourceFilter> Build() override; @@ -44,8 +48,6 @@ base::File ruleset_file_; base::OnceClosure first_disallowed_load_callback_; scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(BuilderImpl); }; // See DocumentSubresourceFilter description.
diff --git a/components/subresource_filter/core/browser/copying_file_stream.h b/components/subresource_filter/core/browser/copying_file_stream.h index 958e475..7408695 100644 --- a/components/subresource_filter/core/browser/copying_file_stream.h +++ b/components/subresource_filter/core/browser/copying_file_stream.h
@@ -17,6 +17,10 @@ class CopyingFileInputStream : public google::protobuf::io::CopyingInputStream { public: explicit CopyingFileInputStream(base::File file); + + CopyingFileInputStream(const CopyingFileInputStream&) = delete; + CopyingFileInputStream& operator=(const CopyingFileInputStream&) = delete; + ~CopyingFileInputStream() override; // google::protobuf::io::CopyingInputStream: @@ -24,8 +28,6 @@ private: base::File file_; - - DISALLOW_COPY_AND_ASSIGN(CopyingFileInputStream); }; // Implements a CopyingOutputStream that writes to a base::File. Can be used in @@ -35,6 +37,10 @@ : public google::protobuf::io::CopyingOutputStream { public: explicit CopyingFileOutputStream(base::File file); + + CopyingFileOutputStream(const CopyingFileOutputStream&) = delete; + CopyingFileOutputStream& operator=(const CopyingFileOutputStream&) = delete; + ~CopyingFileOutputStream() override; // google::protobuf::io::CopyingOutputStream: @@ -42,8 +48,6 @@ private: base::File file_; - - DISALLOW_COPY_AND_ASSIGN(CopyingFileOutputStream); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_test_support.h b/components/subresource_filter/core/browser/subresource_filter_features_test_support.h index b8da0be..3068ae33 100644 --- a/components/subresource_filter/core/browser/subresource_filter_features_test_support.h +++ b/components/subresource_filter/core/browser/subresource_filter_features_test_support.h
@@ -26,6 +26,12 @@ explicit ScopedSubresourceFilterConfigurator(Configuration config); explicit ScopedSubresourceFilterConfigurator( std::vector<Configuration> configs); + + ScopedSubresourceFilterConfigurator( + const ScopedSubresourceFilterConfigurator&) = delete; + ScopedSubresourceFilterConfigurator& operator=( + const ScopedSubresourceFilterConfigurator&) = delete; + ~ScopedSubresourceFilterConfigurator(); void ResetConfiguration(Configuration config); @@ -36,8 +42,6 @@ scoped_refptr<ConfigurationList> config_list = nullptr); scoped_refptr<ConfigurationList> original_config_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSubresourceFilterConfigurator); }; } // namespace testing
diff --git a/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc b/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc index e6fa3046..209972f 100644 --- a/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc +++ b/components/subresource_filter/core/browser/subresource_filter_features_unittest.cc
@@ -61,14 +61,16 @@ } } + ScopedExperimentalStateToggle(const ScopedExperimentalStateToggle&) = delete; + ScopedExperimentalStateToggle& operator=( + const ScopedExperimentalStateToggle&) = delete; + ~ScopedExperimentalStateToggle() { } private: testing::ScopedSubresourceFilterConfigurator scoped_configurator_; base::test::ScopedFeatureList scoped_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(ScopedExperimentalStateToggle); }; void ExpectAndRetrieveExactlyOneEnabledConfig(Configuration* actual_config) { @@ -119,6 +121,11 @@ class SubresourceFilterFeaturesTest : public ::testing::Test { public: SubresourceFilterFeaturesTest() {} + + SubresourceFilterFeaturesTest(const SubresourceFilterFeaturesTest&) = delete; + SubresourceFilterFeaturesTest& operator=( + const SubresourceFilterFeaturesTest&) = delete; + ~SubresourceFilterFeaturesTest() override {} void SetUp() override { @@ -126,9 +133,6 @@ // cached value from a previous in-process test run. testing::GetAndSetActivateConfigurations(nullptr); } - - private: - DISALLOW_COPY_AND_ASSIGN(SubresourceFilterFeaturesTest); }; TEST_F(SubresourceFilterFeaturesTest, ActivationLevel) {
diff --git a/components/subresource_filter/core/common/document_subresource_filter.h b/components/subresource_filter/core/common/document_subresource_filter.h index 5a9ba21..5a6257fa 100644 --- a/components/subresource_filter/core/common/document_subresource_filter.h +++ b/components/subresource_filter/core/common/document_subresource_filter.h
@@ -39,6 +39,10 @@ mojom::ActivationState activation_state, scoped_refptr<const MemoryMappedRuleset> ruleset); + DocumentSubresourceFilter(const DocumentSubresourceFilter&) = delete; + DocumentSubresourceFilter& operator=(const DocumentSubresourceFilter&) = + delete; + ~DocumentSubresourceFilter(); const mojom::ActivationState& activation_state() const { @@ -78,8 +82,6 @@ std::unique_ptr<FirstPartyOrigin> document_origin_; mojom::DocumentLoadStatistics statistics_; - - DISALLOW_COPY_AND_ASSIGN(DocumentSubresourceFilter); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/core/common/indexed_ruleset.h b/components/subresource_filter/core/common/indexed_ruleset.h index 6331f4b..16b72ce 100644 --- a/components/subresource_filter/core/common/indexed_ruleset.h +++ b/components/subresource_filter/core/common/indexed_ruleset.h
@@ -59,6 +59,10 @@ static const int kIndexedFormatVersion; RulesetIndexer(); + + RulesetIndexer(const RulesetIndexer&) = delete; + RulesetIndexer& operator=(const RulesetIndexer&) = delete; + ~RulesetIndexer(); // Adds |rule| to the ruleset and the index unless the |rule| has unsupported @@ -89,8 +93,6 @@ // Maintains a map of domain vectors to their existing offsets, to avoid // storing a particular vector more than once. url_pattern_index::FlatDomainMap domain_map_; - - DISALLOW_COPY_AND_ASSIGN(RulesetIndexer); }; // Matches URLs against the FlatBuffer representation of an indexed ruleset.
diff --git a/components/subresource_filter/core/common/perftests/indexed_ruleset_perftest.cc b/components/subresource_filter/core/common/perftests/indexed_ruleset_perftest.cc index d48fa131..21a3277 100644 --- a/components/subresource_filter/core/common/perftests/indexed_ruleset_perftest.cc +++ b/components/subresource_filter/core/common/perftests/indexed_ruleset_perftest.cc
@@ -38,6 +38,9 @@ public: IndexedRulesetPerftest() {} + IndexedRulesetPerftest(const IndexedRulesetPerftest&) = delete; + IndexedRulesetPerftest& operator=(const IndexedRulesetPerftest&) = delete; + ~IndexedRulesetPerftest() override {} void SetUp() override { @@ -93,7 +96,6 @@ std::ofstream output_; std::unique_ptr<FilterTool> filter_tool_; - DISALLOW_COPY_AND_ASSIGN(IndexedRulesetPerftest); }; TEST_F(IndexedRulesetPerftest, IndexRuleset) {
diff --git a/components/subresource_filter/core/common/scoped_timers.h b/components/subresource_filter/core/common/scoped_timers.h index b370a55a..ac0cf0c 100644 --- a/components/subresource_filter/core/common/scoped_timers.h +++ b/components/subresource_filter/core/common/scoped_timers.h
@@ -79,6 +79,9 @@ return *this; } + ScopedTimerImpl(const ScopedTimerImpl&) = delete; + ScopedTimerImpl& operator=(const ScopedTimerImpl&) = delete; + ~ScopedTimerImpl() { if (activated_) export_functor_(TimeProvider::Now() - construction_time_); @@ -91,8 +94,6 @@ ExportFunctor export_functor_; TimeType construction_time_; bool activated_ = false; - - DISALLOW_COPY_AND_ASSIGN(ScopedTimerImpl); }; // TimeProvider implementations ------------------------------------------------
diff --git a/components/subresource_filter/core/common/test_ruleset_creator.h b/components/subresource_filter/core/common/test_ruleset_creator.h index 23f59db..8bf91c59 100644 --- a/components/subresource_filter/core/common/test_ruleset_creator.h +++ b/components/subresource_filter/core/common/test_ruleset_creator.h
@@ -62,6 +62,10 @@ class TestRulesetCreator { public: TestRulesetCreator(); + + TestRulesetCreator(const TestRulesetCreator&) = delete; + TestRulesetCreator& operator=(const TestRulesetCreator&) = delete; + ~TestRulesetCreator(); // Creates both the indexed and unindexed versions of a testing ruleset that @@ -112,8 +116,6 @@ std::unique_ptr<base::ScopedTempDir> scoped_temp_dir_; int next_unique_file_suffix = 1; - - DISALLOW_COPY_AND_ASSIGN(TestRulesetCreator); }; } // namespace testing
diff --git a/components/subresource_filter/core/common/unindexed_ruleset.h b/components/subresource_filter/core/common/unindexed_ruleset.h index a34e150..43a3a20 100644 --- a/components/subresource_filter/core/common/unindexed_ruleset.h +++ b/components/subresource_filter/core/common/unindexed_ruleset.h
@@ -36,6 +36,10 @@ // Note: The |stream| should outlive |this| instance. explicit UnindexedRulesetReader( google::protobuf::io::ZeroCopyInputStream* stream); + + UnindexedRulesetReader(const UnindexedRulesetReader&) = delete; + UnindexedRulesetReader& operator=(const UnindexedRulesetReader&) = delete; + ~UnindexedRulesetReader(); // Reads the next ruleset |chunk| from the |input|. Returns false iff reached @@ -48,8 +52,6 @@ private: google::protobuf::io::CodedInputStream coded_stream_; - - DISALLOW_COPY_AND_ASSIGN(UnindexedRulesetReader); }; // Divides an unindexed ruleset into chunks and writes them into |stream|. @@ -65,6 +67,10 @@ explicit UnindexedRulesetWriter( google::protobuf::io::ZeroCopyOutputStream* stream, int max_rules_per_chunk = 64); + + UnindexedRulesetWriter(const UnindexedRulesetWriter&) = delete; + UnindexedRulesetWriter& operator=(const UnindexedRulesetWriter&) = delete; + ~UnindexedRulesetWriter(); int max_rules_per_chunk() const { return max_rules_per_chunk_; } @@ -93,8 +99,6 @@ const int max_rules_per_chunk_ = 0; url_pattern_index::proto::FilteringRules pending_chunk_; - - DISALLOW_COPY_AND_ASSIGN(UnindexedRulesetWriter); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/tools/filter_tool.h b/components/subresource_filter/tools/filter_tool.h index f16eda0..74710d3e 100644 --- a/components/subresource_filter/tools/filter_tool.h +++ b/components/subresource_filter/tools/filter_tool.h
@@ -30,6 +30,10 @@ FilterTool( scoped_refptr<const subresource_filter::MemoryMappedRuleset> ruleset, std::ostream* output); + + FilterTool(const FilterTool&) = delete; + FilterTool& operator=(const FilterTool&) = delete; + ~FilterTool(); // Checks the ruleset for a request with document origin |document_origin|, @@ -73,8 +77,6 @@ scoped_refptr<const subresource_filter::MemoryMappedRuleset> ruleset_; std::ostream* output_; - - DISALLOW_COPY_AND_ASSIGN(FilterTool); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/tools/rule_parser/rule_parser.cc b/components/subresource_filter/tools/rule_parser/rule_parser.cc index 14c78831..df3bac98 100644 --- a/components/subresource_filter/tools/rule_parser/rule_parser.cc +++ b/components/subresource_filter/tools/rule_parser/rule_parser.cc
@@ -95,6 +95,10 @@ // Initializes the map with default keywords. KeywordMap(); + + KeywordMap(const KeywordMap&) = delete; + KeywordMap& operator=(const KeywordMap&) = delete; + ~KeywordMap(); // Returns detailed information associated with the provided |name| option. @@ -106,8 +110,6 @@ void AddOption(base::StringPiece name, const OptionDetails& details); std::map<std::string, OptionDetails> options_; - - DISALLOW_COPY_AND_ASSIGN(KeywordMap); }; KeywordMap::KeywordMap() {
diff --git a/components/subresource_filter/tools/rule_parser/rule_parser.h b/components/subresource_filter/tools/rule_parser/rule_parser.h index c911506..80dd36b4 100644 --- a/components/subresource_filter/tools/rule_parser/rule_parser.h +++ b/components/subresource_filter/tools/rule_parser/rule_parser.h
@@ -61,6 +61,10 @@ }; RuleParser(); + + RuleParser(const RuleParser&) = delete; + RuleParser& operator=(const RuleParser&) = delete; + ~RuleParser(); // Returns a human-readable detailed explanation of a parsing error. @@ -117,8 +121,6 @@ RuleType rule_type_; UrlRule url_rule_; CssRule css_rule_; - - DISALLOW_COPY_AND_ASSIGN(RuleParser); }; // Pretty-prints the parsing |error| to |out|, e.g. like this:
diff --git a/components/subresource_filter/tools/ruleset_converter/ruleset_converter.h b/components/subresource_filter/tools/ruleset_converter/ruleset_converter.h index 1e4c39c..4f200ef 100644 --- a/components/subresource_filter/tools/ruleset_converter/ruleset_converter.h +++ b/components/subresource_filter/tools/ruleset_converter/ruleset_converter.h
@@ -24,6 +24,10 @@ class RulesetConverter { public: RulesetConverter(); + + RulesetConverter(const RulesetConverter&) = delete; + RulesetConverter& operator=(const RulesetConverter&) = delete; + ~RulesetConverter(); // Converts rulesets based on Set* configurations. @@ -64,8 +68,6 @@ // Increase this if rule_stream gets more custom logic for versions > 59. int chrome_version_ = 59; - - DISALLOW_COPY_AND_ASSIGN(RulesetConverter); }; } // namespace subresource_filter
diff --git a/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h b/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h index 4d7a2ed..b3e94f0 100644 --- a/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h +++ b/components/subresource_filter/tools/ruleset_converter/ruleset_test_util.h
@@ -46,6 +46,10 @@ public: // Creates a temporary file of the specified |format|. explicit ScopedTempRulesetFile(RulesetFormat format); + + ScopedTempRulesetFile(const ScopedTempRulesetFile&) = delete; + ScopedTempRulesetFile& operator=(const ScopedTempRulesetFile&) = delete; + ~ScopedTempRulesetFile(); // Opens the |ruleset_file| and creates an empty rule output stream to this @@ -69,8 +73,6 @@ base::ScopedTempDir scoped_dir_; base::FilePath ruleset_path_; const RulesetFormat format_; // The format of the |file|. - - DISALLOW_COPY_AND_ASSIGN(ScopedTempRulesetFile); }; bool AreUrlRulesEqual(const url_pattern_index::proto::UrlRule& first,
diff --git a/components/sync/base/model_type_test_util.cc b/components/sync/base/model_type_test_util.cc index c62be72..8378b290 100644 --- a/components/sync/base/model_type_test_util.cc +++ b/components/sync/base/model_type_test_util.cc
@@ -20,9 +20,6 @@ explicit HasModelTypesMatcher(ModelTypeSet expected_types) : expected_types_(expected_types) {} - HasModelTypesMatcher(const HasModelTypesMatcher&) = delete; - HasModelTypesMatcher& operator=(const HasModelTypesMatcher&) = delete; - virtual ~HasModelTypesMatcher() {} virtual bool MatchAndExplain(ModelTypeSet model_types, @@ -41,6 +38,8 @@ private: const ModelTypeSet expected_types_; + + DISALLOW_COPY_AND_ASSIGN(HasModelTypesMatcher); }; } // namespace
diff --git a/components/sync/base/sync_prefs.h b/components/sync/base/sync_prefs.h index b90deb1..95b3eb5 100644 --- a/components/sync/base/sync_prefs.h +++ b/components/sync/base/sync_prefs.h
@@ -41,10 +41,6 @@ public: // |pref_service| must not be null and must outlive this object. explicit SyncPrefs(PrefService* pref_service); - - SyncPrefs(const SyncPrefs&) = delete; - SyncPrefs& operator=(const SyncPrefs&) = delete; - ~SyncPrefs(); static void RegisterProfilePrefs(PrefRegistrySimple* registry); @@ -159,6 +155,8 @@ bool local_sync_enabled_; SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(SyncPrefs); }; void ClearObsoletePassphrasePromptPrefs(PrefService* pref_service);
diff --git a/components/sync/driver/backend_migrator.h b/components/sync/driver/backend_migrator.h index b29e9cd..7ee6f78 100644 --- a/components/sync/driver/backend_migrator.h +++ b/components/sync/driver/backend_migrator.h
@@ -43,10 +43,6 @@ DataTypeManager* manager, const base::RepeatingClosure& reconfigure_callback, const base::RepeatingClosure& migration_done_callback); - - BackendMigrator(const BackendMigrator&) = delete; - BackendMigrator& operator=(const BackendMigrator&) = delete; - virtual ~BackendMigrator(); // Starts a sequence of events that will disable and reenable |types|. @@ -92,6 +88,8 @@ ModelTypeSet to_migrate_; base::WeakPtrFactory<BackendMigrator> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(BackendMigrator); }; } // namespace syncer
diff --git a/components/sync/driver/data_type_manager_impl.h b/components/sync/driver/data_type_manager_impl.h index 40508ae..7cb9f4a 100644 --- a/components/sync/driver/data_type_manager_impl.h +++ b/components/sync/driver/data_type_manager_impl.h
@@ -35,10 +35,6 @@ const DataTypeEncryptionHandler* encryption_handler, ModelTypeConfigurer* configurer, DataTypeManagerObserver* observer); - - DataTypeManagerImpl(const DataTypeManagerImpl&) = delete; - DataTypeManagerImpl& operator=(const DataTypeManagerImpl&) = delete; - ~DataTypeManagerImpl() override; // DataTypeManager interface. @@ -229,6 +225,8 @@ std::map<ModelType, DataTypeConfigurationStats> configuration_stats_; base::WeakPtrFactory<DataTypeManagerImpl> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl); }; } // namespace syncer
diff --git a/components/sync/driver/glue/sync_engine_impl.h b/components/sync/driver/glue/sync_engine_impl.h index da2526e..0d9eab05 100644 --- a/components/sync/driver/glue/sync_engine_impl.h +++ b/components/sync/driver/glue/sync_engine_impl.h
@@ -60,10 +60,6 @@ const base::FilePath& sync_data_folder, scoped_refptr<base::SequencedTaskRunner> sync_task_runner, const base::RepeatingClosure& sync_transport_data_cleared_cb); - - SyncEngineImpl(const SyncEngineImpl&) = delete; - SyncEngineImpl& operator=(const SyncEngineImpl&) = delete; - ~SyncEngineImpl() override; // SyncEngine implementation. @@ -223,6 +219,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<SyncEngineImpl> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncEngineImpl); }; } // namespace syncer
diff --git a/components/sync/driver/model_load_manager.h b/components/sync/driver/model_load_manager.h index 3f9fbf9b..02517ca 100644 --- a/components/sync/driver/model_load_manager.h +++ b/components/sync/driver/model_load_manager.h
@@ -44,10 +44,6 @@ public: ModelLoadManager(const DataTypeController::TypeMap* controllers, ModelLoadManagerDelegate* delegate); - - ModelLoadManager(const ModelLoadManager&) = delete; - ModelLoadManager& operator=(const ModelLoadManager&) = delete; - virtual ~ModelLoadManager(); // Stops any data types that are *not* in |desired_types|, then kicks off @@ -103,6 +99,8 @@ bool notified_about_ready_for_configure_ = false; base::WeakPtrFactory<ModelLoadManager> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(ModelLoadManager); }; } // namespace syncer
diff --git a/components/sync/driver/model_type_controller.h b/components/sync/driver/model_type_controller.h index 030f55f8..4738652 100644 --- a/components/sync/driver/model_type_controller.h +++ b/components/sync/driver/model_type_controller.h
@@ -36,10 +36,6 @@ ModelType type, std::unique_ptr<ModelTypeControllerDelegate> delegate_for_full_sync_mode, std::unique_ptr<ModelTypeControllerDelegate> delegate_for_transport_mode); - - ModelTypeController(const ModelTypeController&) = delete; - ModelTypeController& operator=(const ModelTypeController&) = delete; - ~ModelTypeController() override; // DataTypeController implementation. @@ -102,6 +98,8 @@ // ClientTagBasedModelTypeProcessor callback and must temporarily own it until // Connect is called. std::unique_ptr<DataTypeActivationResponse> activation_response_; + + DISALLOW_COPY_AND_ASSIGN(ModelTypeController); }; } // namespace syncer
diff --git a/components/sync/driver/non_ui_syncable_service_based_model_type_controller.cc b/components/sync/driver/non_ui_syncable_service_based_model_type_controller.cc index b05fbec2..84b7234 100644 --- a/components/sync/driver/non_ui_syncable_service_based_model_type_controller.cc +++ b/components/sync/driver/non_ui_syncable_service_based_model_type_controller.cc
@@ -45,9 +45,6 @@ std::move(syncable_service_provider), dump_stack)); } - BridgeBuilder(const BridgeBuilder&) = delete; - BridgeBuilder& operator=(const BridgeBuilder&) = delete; - ~BridgeBuilder() { DCHECK(task_runner_->RunsTasksInCurrentSequence()); } // Indirectly called for each operation by ProxyModelTypeControllerDelegate. @@ -80,6 +77,8 @@ scoped_refptr<base::SequencedTaskRunner> task_runner_; std::unique_ptr<ModelTypeSyncBridge> bridge_; + + DISALLOW_COPY_AND_ASSIGN(BridgeBuilder); }; // This is a slightly adapted version of base::OnTaskRunnerDeleter: The one
diff --git a/components/sync/driver/non_ui_syncable_service_based_model_type_controller.h b/components/sync/driver/non_ui_syncable_service_based_model_type_controller.h index 145ddcd5..3ae3027 100644 --- a/components/sync/driver/non_ui_syncable_service_based_model_type_controller.h +++ b/components/sync/driver/non_ui_syncable_service_based_model_type_controller.h
@@ -42,13 +42,10 @@ const base::RepeatingClosure& dump_stack, scoped_refptr<base::SequencedTaskRunner> task_runner, bool allow_transport_mode = false); - - NonUiSyncableServiceBasedModelTypeController( - const NonUiSyncableServiceBasedModelTypeController&) = delete; - NonUiSyncableServiceBasedModelTypeController& operator=( - const NonUiSyncableServiceBasedModelTypeController&) = delete; - ~NonUiSyncableServiceBasedModelTypeController() override; + + private: + DISALLOW_COPY_AND_ASSIGN(NonUiSyncableServiceBasedModelTypeController); }; } // namespace syncer
diff --git a/components/sync/driver/sync_auth_manager.h b/components/sync/driver/sync_auth_manager.h index 9d5bdd5..7ab45fe 100644 --- a/components/sync/driver/sync_auth_manager.h +++ b/components/sync/driver/sync_auth_manager.h
@@ -52,10 +52,6 @@ SyncAuthManager(signin::IdentityManager* identity_manager, const AccountStateChangedCallback& account_state_changed, const CredentialsChangedCallback& credentials_changed); - - SyncAuthManager(const SyncAuthManager&) = delete; - SyncAuthManager& operator=(const SyncAuthManager&) = delete; - ~SyncAuthManager() override; // Tells the tracker to start listening for changes to the account/sign-in @@ -206,6 +202,8 @@ bool access_token_retried_ = false; base::WeakPtrFactory<SyncAuthManager> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncAuthManager); }; } // namespace syncer
diff --git a/components/sync/driver/sync_client_mock.h b/components/sync/driver/sync_client_mock.h index ee7824f..986f2fa 100644 --- a/components/sync/driver/sync_client_mock.h +++ b/components/sync/driver/sync_client_mock.h
@@ -14,10 +14,6 @@ class SyncClientMock : public SyncClient { public: SyncClientMock(); - - SyncClientMock(const SyncClientMock&) = delete; - SyncClientMock& operator=(const SyncClientMock&) = delete; - ~SyncClientMock() override; MOCK_METHOD(PrefService*, GetPrefService, (), (override)); MOCK_METHOD(signin::IdentityManager*, GetIdentityManager, (), (override)); @@ -48,6 +44,9 @@ (), (override)); MOCK_METHOD(void, OnLocalSyncTransportDataCleared, (), (override)); + + private: + DISALLOW_COPY_AND_ASSIGN(SyncClientMock); }; } // namespace syncer
diff --git a/components/sync/driver/sync_policy_handler.h b/components/sync/driver/sync_policy_handler.h index d89c07f8..4293c8c 100644 --- a/components/sync/driver/sync_policy_handler.h +++ b/components/sync/driver/sync_policy_handler.h
@@ -19,15 +19,14 @@ class SyncPolicyHandler : public policy::TypeCheckingPolicyHandler { public: SyncPolicyHandler(); - - SyncPolicyHandler(const SyncPolicyHandler&) = delete; - SyncPolicyHandler& operator=(const SyncPolicyHandler&) = delete; - ~SyncPolicyHandler() override; // ConfigurationPolicyHandler methods: void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; + + private: + DISALLOW_COPY_AND_ASSIGN(SyncPolicyHandler); }; } // namespace syncer
diff --git a/components/sync/driver/sync_service.h b/components/sync/driver/sync_service.h index 38e9f87..5decdb4 100644 --- a/components/sync/driver/sync_service.h +++ b/components/sync/driver/sync_service.h
@@ -174,9 +174,6 @@ ACTIVE }; - SyncService(const SyncService&) = delete; - SyncService& operator=(const SyncService&) = delete; - ~SyncService() override {} ////////////////////////////////////////////////////////////////////////////// @@ -437,6 +434,9 @@ protected: SyncService() {} + + private: + DISALLOW_COPY_AND_ASSIGN(SyncService); }; } // namespace syncer
diff --git a/components/sync/driver/sync_service_crypto.h b/components/sync/driver/sync_service_crypto.h index 35952dd..0e65140 100644 --- a/components/sync/driver/sync_service_crypto.h +++ b/components/sync/driver/sync_service_crypto.h
@@ -43,10 +43,6 @@ // outlive this object. SyncServiceCrypto(Delegate* delegate, TrustedVaultClient* trusted_vault_client); - - SyncServiceCrypto(const SyncServiceCrypto&) = delete; - SyncServiceCrypto& operator=(const SyncServiceCrypto&) = delete; - ~SyncServiceCrypto() override; void Reset(); @@ -214,6 +210,8 @@ bool initial_trusted_vault_recoverability_logged_to_uma_ = false; base::WeakPtrFactory<SyncServiceCrypto> weak_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncServiceCrypto); }; } // namespace syncer
diff --git a/components/sync/driver/sync_service_impl.h b/components/sync/driver/sync_service_impl.h index 1a32d4d..6a1cc486 100644 --- a/components/sync/driver/sync_service_impl.h +++ b/components/sync/driver/sync_service_impl.h
@@ -78,10 +78,6 @@ struct InitParams { InitParams(); InitParams(InitParams&& other); - - InitParams(const InitParams&) = delete; - InitParams& operator=(const InitParams&) = delete; - ~InitParams(); std::unique_ptr<SyncClient> sync_client; @@ -94,13 +90,13 @@ version_info::Channel channel = version_info::Channel::UNKNOWN; std::string debug_identifier; policy::PolicyService* policy_service = nullptr; + + private: + DISALLOW_COPY_AND_ASSIGN(InitParams); }; explicit SyncServiceImpl(InitParams init_params); - SyncServiceImpl(const SyncServiceImpl&) = delete; - SyncServiceImpl& operator=(const SyncServiceImpl&) = delete; - ~SyncServiceImpl() override; // Initializes the object. This must be called at most once, and @@ -467,6 +463,8 @@ base::WeakPtrFactory<SyncServiceImpl> sync_enabled_weak_factory_{this}; base::WeakPtrFactory<SyncServiceImpl> weak_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncServiceImpl); }; } // namespace syncer
diff --git a/components/sync/driver/sync_session_durations_metrics_recorder.h b/components/sync/driver/sync_session_durations_metrics_recorder.h index 8f68ea7..56675d0 100644 --- a/components/sync/driver/sync_session_durations_metrics_recorder.h +++ b/components/sync/driver/sync_session_durations_metrics_recorder.h
@@ -26,12 +26,6 @@ SyncSessionDurationsMetricsRecorder( SyncService* sync_service, signin::IdentityManager* identity_manager); - - SyncSessionDurationsMetricsRecorder( - const SyncSessionDurationsMetricsRecorder&) = delete; - SyncSessionDurationsMetricsRecorder& operator=( - const SyncSessionDurationsMetricsRecorder&) = delete; - ~SyncSessionDurationsMetricsRecorder() override; // Informs this service that a session started at |session_start| time. @@ -108,6 +102,8 @@ // Tracks the elapsed active session time in the current sync and account // status. The timer is absent if there's no active session. std::unique_ptr<base::ElapsedTimer> sync_account_session_timer_; + + DISALLOW_COPY_AND_ASSIGN(SyncSessionDurationsMetricsRecorder); }; } // namespace syncer
diff --git a/components/sync/driver/sync_session_durations_metrics_recorder_unittest.cc b/components/sync/driver/sync_session_durations_metrics_recorder_unittest.cc index 7e3385bc..68d170a 100644 --- a/components/sync/driver/sync_session_durations_metrics_recorder_unittest.cc +++ b/components/sync/driver/sync_session_durations_metrics_recorder_unittest.cc
@@ -29,11 +29,6 @@ sync_service_.SetDisableReasons(SyncService::DISABLE_REASON_NOT_SIGNED_IN); } - SyncSessionDurationsMetricsRecorderTest( - const SyncSessionDurationsMetricsRecorderTest&) = delete; - SyncSessionDurationsMetricsRecorderTest& operator=( - const SyncSessionDurationsMetricsRecorderTest&) = delete; - ~SyncSessionDurationsMetricsRecorderTest() override {} void EnableSync() { @@ -101,6 +96,8 @@ network::TestURLLoaderFactory test_url_loader_factory_; signin::IdentityTestEnvironment identity_test_env_; TestSyncService sync_service_; + + DISALLOW_COPY_AND_ASSIGN(SyncSessionDurationsMetricsRecorderTest); }; TEST_F(SyncSessionDurationsMetricsRecorderTest, WebSignedOut) {
diff --git a/components/sync/driver/sync_stopped_reporter.h b/components/sync/driver/sync_stopped_reporter.h index d2fd5bd..a0763bc 100644 --- a/components/sync/driver/sync_stopped_reporter.h +++ b/components/sync/driver/sync_stopped_reporter.h
@@ -32,10 +32,6 @@ const std::string& user_agent, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, ResultCallback callback); - - SyncStoppedReporter(const SyncStoppedReporter&) = delete; - SyncStoppedReporter& operator=(const SyncStoppedReporter&) = delete; - ~SyncStoppedReporter(); // Inform the sync server that sync was stopped on this device. @@ -72,6 +68,8 @@ // A callback for request completion or timeout. ResultCallback callback_; + + DISALLOW_COPY_AND_ASSIGN(SyncStoppedReporter); }; } // namespace syncer
diff --git a/components/sync/driver/syncable_service_based_model_type_controller.cc b/components/sync/driver/syncable_service_based_model_type_controller.cc index 1e29f3fc..032274a6 100644 --- a/components/sync/driver/syncable_service_based_model_type_controller.cc +++ b/components/sync/driver/syncable_service_based_model_type_controller.cc
@@ -37,9 +37,6 @@ } } - ControllerDelegate(const ControllerDelegate&) = delete; - ControllerDelegate& operator=(const ControllerDelegate&) = delete; - ~ControllerDelegate() override {} void OnSyncStarting(const DataTypeActivationRequest& request, @@ -74,6 +71,8 @@ const ModelType type_; const base::RepeatingClosure dump_stack_; std::unique_ptr<ModelTypeSyncBridge> bridge_; + + DISALLOW_COPY_AND_ASSIGN(ControllerDelegate); }; } // namespace
diff --git a/components/sync/driver/syncable_service_based_model_type_controller.h b/components/sync/driver/syncable_service_based_model_type_controller.h index fa1c685..462b31b 100644 --- a/components/sync/driver/syncable_service_based_model_type_controller.h +++ b/components/sync/driver/syncable_service_based_model_type_controller.h
@@ -34,17 +34,14 @@ const base::RepeatingClosure& dump_stack, DelegateMode delegate_mode = DelegateMode::kFullSyncModeOnly); - SyncableServiceBasedModelTypeController( - const SyncableServiceBasedModelTypeController&) = delete; - SyncableServiceBasedModelTypeController& operator=( - const SyncableServiceBasedModelTypeController&) = delete; - ~SyncableServiceBasedModelTypeController() override; private: // Delegate owned by this instance; delegate instances passed to the base // class forward their calls to |delegate_|. std::unique_ptr<ModelTypeControllerDelegate> delegate_; + + DISALLOW_COPY_AND_ASSIGN(SyncableServiceBasedModelTypeController); }; } // namespace syncer
diff --git a/components/sync/driver/test_sync_service.h b/components/sync/driver/test_sync_service.h index dcd6b57..1eaefc3 100644 --- a/components/sync/driver/test_sync_service.h +++ b/components/sync/driver/test_sync_service.h
@@ -26,10 +26,6 @@ class TestSyncService : public SyncService { public: TestSyncService(); - - TestSyncService(const TestSyncService&) = delete; - TestSyncService& operator=(const TestSyncService&) = delete; - ~TestSyncService() override; void SetDisableReasons(DisableReasonSet disable_reasons); @@ -139,6 +135,8 @@ base::ObserverList<syncer::SyncServiceObserver>::Unchecked observers_; GURL sync_service_url_; + + DISALLOW_COPY_AND_ASSIGN(TestSyncService); }; } // namespace syncer
diff --git a/components/sync/driver/trusted_vault_client.h b/components/sync/driver/trusted_vault_client.h index 9dd815e..0fd9411 100644 --- a/components/sync/driver/trusted_vault_client.h +++ b/components/sync/driver/trusted_vault_client.h
@@ -36,10 +36,6 @@ }; TrustedVaultClient() = default; - - TrustedVaultClient(const TrustedVaultClient&) = delete; - TrustedVaultClient& operator=(const TrustedVaultClient&) = delete; - virtual ~TrustedVaultClient() = default; // Adds/removes an observer. @@ -91,6 +87,9 @@ const std::vector<uint8_t>& public_key, int method_type_hint, base::OnceClosure cb) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(TrustedVaultClient); }; } // namespace syncer
diff --git a/components/sync/engine/backoff_delay_provider.h b/components/sync/engine/backoff_delay_provider.h index b064777..c06582e7 100644 --- a/components/sync/engine/backoff_delay_provider.h +++ b/components/sync/engine/backoff_delay_provider.h
@@ -28,9 +28,6 @@ // was passed to command line. static std::unique_ptr<BackoffDelayProvider> WithShortInitialRetryOverride(); - BackoffDelayProvider(const BackoffDelayProvider&) = delete; - BackoffDelayProvider& operator=(const BackoffDelayProvider&) = delete; - virtual ~BackoffDelayProvider(); // DDOS avoidance function. Calculates how long we should wait before trying @@ -55,6 +52,8 @@ private: const base::TimeDelta default_initial_backoff_; const base::TimeDelta short_initial_backoff_; + + DISALLOW_COPY_AND_ASSIGN(BackoffDelayProvider); }; } // namespace syncer
diff --git a/components/sync/engine/commit.h b/components/sync/engine/commit.h index 71fe72c2..0538b30 100644 --- a/components/sync/engine/commit.h +++ b/components/sync/engine/commit.h
@@ -43,9 +43,6 @@ const sync_pb::ClientToServerMessage& message, ExtensionsActivity::Records extensions_activity_buffer); - Commit(const Commit&) = delete; - Commit& operator=(const Commit&) = delete; - ~Commit(); // |extensions_activity| may be null. @@ -76,6 +73,8 @@ sync_pb::ClientToServerMessage message_; ExtensionsActivity::Records extensions_activity_buffer_; + + DISALLOW_COPY_AND_ASSIGN(Commit); }; } // namespace syncer
diff --git a/components/sync/engine/commit_contribution_impl.h b/components/sync/engine/commit_contribution_impl.h index 43eca375..0e537e8e 100644 --- a/components/sync/engine/commit_contribution_impl.h +++ b/components/sync/engine/commit_contribution_impl.h
@@ -49,10 +49,6 @@ Cryptographer* cryptographer, PassphraseType passphrase_type, bool only_commit_specifics); - - CommitContributionImpl(const CommitContributionImpl&) = delete; - CommitContributionImpl& operator=(const CommitContributionImpl&) = delete; - ~CommitContributionImpl() override; // Implementation of CommitContribution @@ -106,6 +102,8 @@ // Don't send any metadata to server, only specifics. This is needed for // commit only types to save bandwidth. bool only_commit_specifics_; + + DISALLOW_COPY_AND_ASSIGN(CommitContributionImpl); }; } // namespace syncer
diff --git a/components/sync/engine/commit_processor.h b/components/sync/engine/commit_processor.h index b084952..e6bd76da 100644 --- a/components/sync/engine/commit_processor.h +++ b/components/sync/engine/commit_processor.h
@@ -27,10 +27,6 @@ // null and must outlive this object. CommitProcessor(ModelTypeSet commit_types, CommitContributorMap* commit_contributor_map); - - CommitProcessor(const CommitProcessor&) = delete; - CommitProcessor& operator=(const CommitProcessor&) = delete; - ~CommitProcessor(); // Gathers a set of contributions to be used to populate a commit message. @@ -75,6 +71,8 @@ // A map of 'commit contributors', one for each enabled type. CommitContributorMap* commit_contributor_map_; GatheringPhase phase_; + + DISALLOW_COPY_AND_ASSIGN(CommitProcessor); }; } // namespace syncer
diff --git a/components/sync/engine/cycle/data_type_tracker.h b/components/sync/engine/cycle/data_type_tracker.h index 39c4780..fa1ee79 100644 --- a/components/sync/engine/cycle/data_type_tracker.h +++ b/components/sync/engine/cycle/data_type_tracker.h
@@ -49,10 +49,6 @@ class DataTypeTracker { public: explicit DataTypeTracker(ModelType type); - - DataTypeTracker(const DataTypeTracker&) = delete; - DataTypeTracker& operator=(const DataTypeTracker&) = delete; - ~DataTypeTracker(); // For STL compatibility, we do not forbid the creation of a default copy @@ -203,6 +199,8 @@ // The amount of time to delay a sync cycle by when a local change for this // type occurs. base::TimeDelta local_change_nudge_delay_; + + DISALLOW_COPY_AND_ASSIGN(DataTypeTracker); }; } // namespace syncer
diff --git a/components/sync/engine/cycle/mock_debug_info_getter.h b/components/sync/engine/cycle/mock_debug_info_getter.h index 0c170c3..2da1401 100644 --- a/components/sync/engine/cycle/mock_debug_info_getter.h +++ b/components/sync/engine/cycle/mock_debug_info_getter.h
@@ -17,10 +17,6 @@ class MockDebugInfoGetter : public DebugInfoGetter { public: MockDebugInfoGetter(); - - MockDebugInfoGetter(const MockDebugInfoGetter&) = delete; - MockDebugInfoGetter& operator=(const MockDebugInfoGetter&) = delete; - ~MockDebugInfoGetter() override; // DebugInfoGetter implementation. @@ -31,6 +27,8 @@ private: sync_pb::DebugInfo debug_info_; + + DISALLOW_COPY_AND_ASSIGN(MockDebugInfoGetter); }; } // namespace syncer
diff --git a/components/sync/engine/cycle/nudge_tracker.h b/components/sync/engine/cycle/nudge_tracker.h index 61240e5..dee8c7f 100644 --- a/components/sync/engine/cycle/nudge_tracker.h +++ b/components/sync/engine/cycle/nudge_tracker.h
@@ -30,10 +30,6 @@ class NudgeTracker { public: NudgeTracker(); - - NudgeTracker(const NudgeTracker&) = delete; - NudgeTracker& operator=(const NudgeTracker&) = delete; - ~NudgeTracker(); // Returns true if there is a good reason for performing a sync cycle. @@ -207,6 +203,8 @@ // SetSyncCycleStartTime(). This may contain a stale value if we're not // currently in a sync cycle. base::TimeTicks sync_cycle_start_time_; + + DISALLOW_COPY_AND_ASSIGN(NudgeTracker); }; } // namespace syncer
diff --git a/components/sync/engine/cycle/status_controller.h b/components/sync/engine/cycle/status_controller.h index 6af31ca..d1385cb3 100644 --- a/components/sync/engine/cycle/status_controller.h +++ b/components/sync/engine/cycle/status_controller.h
@@ -25,10 +25,6 @@ class StatusController { public: StatusController(); - - StatusController(const StatusController&) = delete; - StatusController& operator=(const StatusController&) = delete; - ~StatusController(); // The types included in the get updates client to server requests. @@ -96,6 +92,8 @@ // If a poll was performed, the time it finished. Not set if not poll was // performed. base::Time poll_finish_time_; + + DISALLOW_COPY_AND_ASSIGN(StatusController); }; } // namespace syncer
diff --git a/components/sync/engine/cycle/sync_cycle_context.h b/components/sync/engine/cycle/sync_cycle_context.h index c36f0068..3aeaef8 100644 --- a/components/sync/engine/cycle/sync_cycle_context.h +++ b/components/sync/engine/cycle/sync_cycle_context.h
@@ -50,9 +50,6 @@ const std::string& bag_of_chips, base::TimeDelta poll_interval); - SyncCycleContext(const SyncCycleContext&) = delete; - SyncCycleContext& operator=(const SyncCycleContext&) = delete; - ~SyncCycleContext(); ServerConnectionManager* connection_manager() { return connection_manager_; } @@ -183,6 +180,8 @@ ActiveDevicesInvalidationInfo active_devices_invalidation_info_; base::TimeDelta poll_interval_; + + DISALLOW_COPY_AND_ASSIGN(SyncCycleContext); }; } // namespace syncer
diff --git a/components/sync/engine/debug_info_event_listener.h b/components/sync/engine/debug_info_event_listener.h index 66cfb003..1a02123d 100644 --- a/components/sync/engine/debug_info_event_listener.h +++ b/components/sync/engine/debug_info_event_listener.h
@@ -42,10 +42,6 @@ public DataTypeDebugInfoListener { public: DebugInfoEventListener(); - - DebugInfoEventListener(const DebugInfoEventListener&) = delete; - DebugInfoEventListener& operator=(const DebugInfoEventListener&) = delete; - ~DebugInfoEventListener() override; void InitializationComplete(); @@ -117,6 +113,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<DebugInfoEventListener> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); }; } // namespace syncer
diff --git a/components/sync/engine/events/commit_request_event.h b/components/sync/engine/events/commit_request_event.h index 93672f16..5fac2f40 100644 --- a/components/sync/engine/events/commit_request_event.h +++ b/components/sync/engine/events/commit_request_event.h
@@ -25,10 +25,6 @@ size_t num_items, ModelTypeSet contributing_types, const sync_pb::ClientToServerMessage& request); - - CommitRequestEvent(const CommitRequestEvent&) = delete; - CommitRequestEvent& operator=(const CommitRequestEvent&) = delete; - ~CommitRequestEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -44,6 +40,8 @@ const size_t num_items_; const ModelTypeSet contributing_types_; const sync_pb::ClientToServerMessage request_; + + DISALLOW_COPY_AND_ASSIGN(CommitRequestEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/commit_response_event.h b/components/sync/engine/events/commit_response_event.h index 8ebd343..e5924ff95 100644 --- a/components/sync/engine/events/commit_response_event.h +++ b/components/sync/engine/events/commit_response_event.h
@@ -24,10 +24,6 @@ CommitResponseEvent(base::Time timestamp, SyncerError result, const sync_pb::ClientToServerResponse& response); - - CommitResponseEvent(const CommitResponseEvent&) = delete; - CommitResponseEvent& operator=(const CommitResponseEvent&) = delete; - ~CommitResponseEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -44,6 +40,8 @@ const base::Time timestamp_; const SyncerError result_; const sync_pb::ClientToServerResponse response_; + + DISALLOW_COPY_AND_ASSIGN(CommitResponseEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/configure_get_updates_request_event.h b/components/sync/engine/events/configure_get_updates_request_event.h index f58538e..b31b182 100644 --- a/components/sync/engine/events/configure_get_updates_request_event.h +++ b/components/sync/engine/events/configure_get_updates_request_event.h
@@ -24,12 +24,6 @@ base::Time timestamp, sync_pb::SyncEnums::GetUpdatesOrigin origin, const sync_pb::ClientToServerMessage& request); - - ConfigureGetUpdatesRequestEvent(const ConfigureGetUpdatesRequestEvent&) = - delete; - ConfigureGetUpdatesRequestEvent& operator=( - const ConfigureGetUpdatesRequestEvent&) = delete; - ~ConfigureGetUpdatesRequestEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -43,6 +37,8 @@ const base::Time timestamp_; const sync_pb::SyncEnums::GetUpdatesOrigin origin_; const sync_pb::ClientToServerMessage request_; + + DISALLOW_COPY_AND_ASSIGN(ConfigureGetUpdatesRequestEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/get_updates_response_event.h b/components/sync/engine/events/get_updates_response_event.h index 7467a3fa..9ed08bf 100644 --- a/components/sync/engine/events/get_updates_response_event.h +++ b/components/sync/engine/events/get_updates_response_event.h
@@ -27,9 +27,6 @@ const sync_pb::ClientToServerResponse& response, SyncerError error); - GetUpdatesResponseEvent(const GetUpdatesResponseEvent&) = delete; - GetUpdatesResponseEvent& operator=(const GetUpdatesResponseEvent&) = delete; - ~GetUpdatesResponseEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -43,6 +40,8 @@ const base::Time timestamp_; const sync_pb::ClientToServerResponse response_; const SyncerError error_; + + DISALLOW_COPY_AND_ASSIGN(GetUpdatesResponseEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/normal_get_updates_request_event.h b/components/sync/engine/events/normal_get_updates_request_event.h index a8c4285..d021604 100644 --- a/components/sync/engine/events/normal_get_updates_request_event.h +++ b/components/sync/engine/events/normal_get_updates_request_event.h
@@ -31,11 +31,6 @@ ModelTypeSet refresh_requested_types, bool is_retry, sync_pb::ClientToServerMessage request); - - NormalGetUpdatesRequestEvent(const NormalGetUpdatesRequestEvent&) = delete; - NormalGetUpdatesRequestEvent& operator=(const NormalGetUpdatesRequestEvent&) = - delete; - ~NormalGetUpdatesRequestEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -54,6 +49,8 @@ const bool is_retry_; const sync_pb::ClientToServerMessage request_; + + DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesRequestEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/poll_get_updates_request_event.h b/components/sync/engine/events/poll_get_updates_request_event.h index 220b5134..30e6c91e3 100644 --- a/components/sync/engine/events/poll_get_updates_request_event.h +++ b/components/sync/engine/events/poll_get_updates_request_event.h
@@ -22,11 +22,6 @@ public: PollGetUpdatesRequestEvent(base::Time timestamp, const sync_pb::ClientToServerMessage& request); - - PollGetUpdatesRequestEvent(const PollGetUpdatesRequestEvent&) = delete; - PollGetUpdatesRequestEvent& operator=(const PollGetUpdatesRequestEvent&) = - delete; - ~PollGetUpdatesRequestEvent() override; std::unique_ptr<ProtocolEvent> Clone() const override; @@ -39,6 +34,8 @@ const base::Time timestamp_; const sync_pb::ClientToServerMessage request_; + + DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesRequestEvent); }; } // namespace syncer
diff --git a/components/sync/engine/events/protocol_event_buffer.h b/components/sync/engine/events/protocol_event_buffer.h index e1afc3ff..a092e823 100644 --- a/components/sync/engine/events/protocol_event_buffer.h +++ b/components/sync/engine/events/protocol_event_buffer.h
@@ -25,10 +25,6 @@ static const size_t kBufferSize; ProtocolEventBuffer(); - - ProtocolEventBuffer(const ProtocolEventBuffer&) = delete; - ProtocolEventBuffer& operator=(const ProtocolEventBuffer&) = delete; - ~ProtocolEventBuffer(); // Records an event. May cause the oldest event to be dropped. @@ -39,6 +35,8 @@ private: base::circular_deque<std::unique_ptr<ProtocolEvent>> buffer_; + + DISALLOW_COPY_AND_ASSIGN(ProtocolEventBuffer); }; } // namespace syncer
diff --git a/components/sync/engine/forwarding_model_type_processor.h b/components/sync/engine/forwarding_model_type_processor.h index 863b91f..1cfaef2 100644 --- a/components/sync/engine/forwarding_model_type_processor.h +++ b/components/sync/engine/forwarding_model_type_processor.h
@@ -20,11 +20,6 @@ public: // |processor| must not be null and must outlive this object. explicit ForwardingModelTypeProcessor(ModelTypeProcessor* processor); - - ForwardingModelTypeProcessor(const ForwardingModelTypeProcessor&) = delete; - ForwardingModelTypeProcessor& operator=(const ForwardingModelTypeProcessor&) = - delete; - ~ForwardingModelTypeProcessor() override; void ConnectSync(std::unique_ptr<CommitQueue> worker) override; @@ -41,6 +36,8 @@ private: ModelTypeProcessor* const processor_; + + DISALLOW_COPY_AND_ASSIGN(ForwardingModelTypeProcessor); }; } // namespace syncer
diff --git a/components/sync/engine/get_updates_delegate.h b/components/sync/engine/get_updates_delegate.h index 0949aff..42d86c7c 100644 --- a/components/sync/engine/get_updates_delegate.h +++ b/components/sync/engine/get_updates_delegate.h
@@ -28,10 +28,6 @@ class GetUpdatesDelegate { public: GetUpdatesDelegate() = default; - - GetUpdatesDelegate(const GetUpdatesDelegate&) = delete; - GetUpdatesDelegate& operator=(const GetUpdatesDelegate&) = delete; - virtual ~GetUpdatesDelegate() = default; // Populates GetUpdate message fields that depend on GetUpdates request type. @@ -41,16 +37,15 @@ virtual std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent( base::Time timestamp, const sync_pb::ClientToServerMessage& request) const = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(GetUpdatesDelegate); }; // Functionality specific to the normal GetUpdate request. class NormalGetUpdatesDelegate : public GetUpdatesDelegate { public: explicit NormalGetUpdatesDelegate(const NudgeTracker& nudge_tracker); - - NormalGetUpdatesDelegate(const NormalGetUpdatesDelegate&) = delete; - NormalGetUpdatesDelegate& operator=(const NormalGetUpdatesDelegate&) = delete; - ~NormalGetUpdatesDelegate() override; // Uses the member NudgeTracker to populate some fields of this GU message. @@ -63,6 +58,8 @@ private: const NudgeTracker& nudge_tracker_; + + DISALLOW_COPY_AND_ASSIGN(NormalGetUpdatesDelegate); }; // Functionality specific to the configure GetUpdate request. @@ -70,11 +67,6 @@ public: explicit ConfigureGetUpdatesDelegate( sync_pb::SyncEnums::GetUpdatesOrigin origin); - - ConfigureGetUpdatesDelegate(const ConfigureGetUpdatesDelegate&) = delete; - ConfigureGetUpdatesDelegate& operator=(const ConfigureGetUpdatesDelegate&) = - delete; - ~ConfigureGetUpdatesDelegate() override; // Sets the 'source' and 'origin' fields for this request. @@ -87,16 +79,14 @@ private: const sync_pb::SyncEnums::GetUpdatesOrigin origin_; + + DISALLOW_COPY_AND_ASSIGN(ConfigureGetUpdatesDelegate); }; // Functionality specific to the poll GetUpdate request. class PollGetUpdatesDelegate : public GetUpdatesDelegate { public: PollGetUpdatesDelegate(); - - PollGetUpdatesDelegate(const PollGetUpdatesDelegate&) = delete; - PollGetUpdatesDelegate& operator=(const PollGetUpdatesDelegate&) = delete; - ~PollGetUpdatesDelegate() override; // Sets the 'source' and 'origin' to indicate this is a poll request. @@ -106,6 +96,9 @@ std::unique_ptr<ProtocolEvent> GetNetworkRequestEvent( base::Time timestamp, const sync_pb::ClientToServerMessage& request) const override; + + private: + DISALLOW_COPY_AND_ASSIGN(PollGetUpdatesDelegate); }; } // namespace syncer
diff --git a/components/sync/engine/get_updates_processor.h b/components/sync/engine/get_updates_processor.h index f4c4d210..22a3ec4 100644 --- a/components/sync/engine/get_updates_processor.h +++ b/components/sync/engine/get_updates_processor.h
@@ -32,10 +32,6 @@ public: explicit GetUpdatesProcessor(UpdateHandlerMap* update_handler_map, const GetUpdatesDelegate& delegate); - - GetUpdatesProcessor(const GetUpdatesProcessor&) = delete; - GetUpdatesProcessor& operator=(const GetUpdatesProcessor&) = delete; - ~GetUpdatesProcessor(); // Downloads and processes a batch of updates for the specified types. @@ -92,6 +88,8 @@ UpdateHandlerMap* update_handler_map_; const GetUpdatesDelegate& delegate_; + + DISALLOW_COPY_AND_ASSIGN(GetUpdatesProcessor); }; } // namespace syncer
diff --git a/components/sync/engine/loopback_server/loopback_connection_manager.h b/components/sync/engine/loopback_server/loopback_connection_manager.h index 795d26d..cfc195e 100644 --- a/components/sync/engine/loopback_server/loopback_connection_manager.h +++ b/components/sync/engine/loopback_server/loopback_connection_manager.h
@@ -19,11 +19,6 @@ class LoopbackConnectionManager : public ServerConnectionManager { public: explicit LoopbackConnectionManager(const base::FilePath& persistent_file); - - LoopbackConnectionManager(const LoopbackConnectionManager&) = delete; - LoopbackConnectionManager& operator=(const LoopbackConnectionManager&) = - delete; - ~LoopbackConnectionManager() override; private: @@ -34,6 +29,8 @@ // The loopback server that will handle the requests locally. LoopbackServer loopback_server_; + + DISALLOW_COPY_AND_ASSIGN(LoopbackConnectionManager); }; } // namespace syncer
diff --git a/components/sync/engine/model_type_configurer.h b/components/sync/engine/model_type_configurer.h index a69eda73..cba291c 100644 --- a/components/sync/engine/model_type_configurer.h +++ b/components/sync/engine/model_type_configurer.h
@@ -24,10 +24,6 @@ struct ConfigureParams { ConfigureParams(); ConfigureParams(ConfigureParams&& other); - - ConfigureParams(const ConfigureParams&) = delete; - ConfigureParams& operator=(const ConfigureParams&) = delete; - ~ConfigureParams(); ConfigureParams& operator=(ConfigureParams&& other); @@ -40,6 +36,9 @@ // Whether full sync (or sync the feature) is enabled; bool is_sync_feature_enabled; + + private: + DISALLOW_COPY_AND_ASSIGN(ConfigureParams); }; ModelTypeConfigurer();
diff --git a/components/sync/engine/model_type_registry.h b/components/sync/engine/model_type_registry.h index c67ee27..754ed88 100644 --- a/components/sync/engine/model_type_registry.h +++ b/components/sync/engine/model_type_registry.h
@@ -39,10 +39,6 @@ ModelTypeRegistry(NudgeHandler* nudge_handler, CancelationSignal* cancelation_signal, SyncEncryptionHandler* sync_encryption_handler); - - ModelTypeRegistry(const ModelTypeRegistry&) = delete; - ModelTypeRegistry& operator=(const ModelTypeRegistry&) = delete; - ~ModelTypeRegistry() override; // Implementation of ModelTypeConnector. @@ -112,6 +108,8 @@ SyncEncryptionHandler* const sync_encryption_handler_; base::WeakPtrFactory<ModelTypeRegistry> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(ModelTypeRegistry); }; } // namespace syncer
diff --git a/components/sync/engine/model_type_worker.h b/components/sync/engine/model_type_worker.h index 3d24b38e..68da87a 100644 --- a/components/sync/engine/model_type_worker.h +++ b/components/sync/engine/model_type_worker.h
@@ -87,10 +87,6 @@ PassphraseType passphrase_type, NudgeHandler* nudge_handler, CancelationSignal* cancelation_signal); - - ModelTypeWorker(const ModelTypeWorker&) = delete; - ModelTypeWorker& operator=(const ModelTypeWorker&) = delete; - ~ModelTypeWorker() override; // Public for testing. @@ -297,6 +293,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ModelTypeWorker> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(ModelTypeWorker); }; // GetLocalChangesRequest is a container for GetLocalChanges call response. It
diff --git a/components/sync/engine/net/http_bridge.h b/components/sync/engine/net/http_bridge.h index 447aeaa..959b4f7 100644 --- a/components/sync/engine/net/http_bridge.h +++ b/components/sync/engine/net/http_bridge.h
@@ -189,10 +189,6 @@ HttpBridgeFactory(const std::string& user_agent, std::unique_ptr<network::PendingSharedURLLoaderFactory> pending_url_loader_factory); - - HttpBridgeFactory(const HttpBridgeFactory&) = delete; - HttpBridgeFactory& operator=(const HttpBridgeFactory&) = delete; - ~HttpBridgeFactory() override; // HttpPostProviderFactory: @@ -204,6 +200,8 @@ // The URL loader factory used for making all requests. scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; + + DISALLOW_COPY_AND_ASSIGN(HttpBridgeFactory); }; } // namespace syncer
diff --git a/components/sync/engine/net/server_connection_manager.h b/components/sync/engine/net/server_connection_manager.h index ef60b6bf..6a7f7e05 100644 --- a/components/sync/engine/net/server_connection_manager.h +++ b/components/sync/engine/net/server_connection_manager.h
@@ -92,10 +92,6 @@ class ServerConnectionManager { public: ServerConnectionManager(); - - ServerConnectionManager(const ServerConnectionManager&) = delete; - ServerConnectionManager& operator=(const ServerConnectionManager&) = delete; - virtual ~ServerConnectionManager(); // POSTs |buffer_in| and reads the body of the response into |buffer_out|. @@ -152,6 +148,8 @@ HttpResponse server_response_; SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(ServerConnectionManager); }; std::ostream& operator<<(std::ostream& s, const struct HttpResponse& hr);
diff --git a/components/sync/engine/net/sync_server_connection_manager.cc b/components/sync/engine/net/sync_server_connection_manager.cc index daa8f1b..a8484a0 100644 --- a/components/sync/engine/net/sync_server_connection_manager.cc +++ b/components/sync/engine/net/sync_server_connection_manager.cc
@@ -26,10 +26,6 @@ // All pointers must not be null and must outlive this object. Connection(HttpPostProviderFactory* factory, CancelationSignal* cancelation_signal); - - Connection(const Connection&) = delete; - Connection& operator=(const Connection&) = delete; - ~Connection() override; HttpResponse Init(const GURL& connection_url, @@ -55,6 +51,8 @@ scoped_refptr<HttpPostProviderInterface> const post_provider_; std::string buffer_; + + DISALLOW_COPY_AND_ASSIGN(Connection); }; Connection::Connection(HttpPostProviderFactory* factory,
diff --git a/components/sync/engine/net/sync_server_connection_manager.h b/components/sync/engine/net/sync_server_connection_manager.h index 650c696a..8dcf3a7 100644 --- a/components/sync/engine/net/sync_server_connection_manager.h +++ b/components/sync/engine/net/sync_server_connection_manager.h
@@ -28,11 +28,6 @@ SyncServerConnectionManager(const GURL& sync_request_url, std::unique_ptr<HttpPostProviderFactory> factory, CancelationSignal* cancelation_signal); - - SyncServerConnectionManager(const SyncServerConnectionManager&) = delete; - SyncServerConnectionManager& operator=(const SyncServerConnectionManager&) = - delete; - ~SyncServerConnectionManager() override; HttpResponse PostBuffer(const std::string& buffer_in, @@ -50,6 +45,8 @@ // Cancelation signal is signalled when engine shuts down. Current blocking // operation should be aborted. CancelationSignal* const cancelation_signal_; + + DISALLOW_COPY_AND_ASSIGN(SyncServerConnectionManager); }; } // namespace syncer
diff --git a/components/sync/engine/nigori/keystore_keys_handler.h b/components/sync/engine/nigori/keystore_keys_handler.h index 56a46853..3295a274 100644 --- a/components/sync/engine/nigori/keystore_keys_handler.h +++ b/components/sync/engine/nigori/keystore_keys_handler.h
@@ -15,10 +15,6 @@ class KeystoreKeysHandler { public: KeystoreKeysHandler() = default; - - KeystoreKeysHandler(const KeystoreKeysHandler&) = delete; - KeystoreKeysHandler& operator=(const KeystoreKeysHandler&) = delete; - virtual ~KeystoreKeysHandler() = default; // Whether a keystore key needs to be requested from the sync server. @@ -28,6 +24,9 @@ // Returns true on success, false otherwise. virtual bool SetKeystoreKeys( const std::vector<std::vector<uint8_t>>& keys) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(KeystoreKeysHandler); }; } // namespace syncer
diff --git a/components/sync/engine/sync_engine.h b/components/sync/engine/sync_engine.h index e085d05..dcd6865 100644 --- a/components/sync/engine/sync_engine.h +++ b/components/sync/engine/sync_engine.h
@@ -49,10 +49,6 @@ struct InitParams { InitParams(); InitParams(InitParams&& other); - - InitParams(const InitParams&) = delete; - InitParams& operator=(const InitParams&) = delete; - ~InitParams(); SyncEngineHost* host = nullptr; @@ -67,13 +63,12 @@ base::FilePath local_sync_backend_folder; std::unique_ptr<EngineComponentsFactory> engine_components_factory; std::string encryption_bootstrap_token; + + private: + DISALLOW_COPY_AND_ASSIGN(InitParams); }; SyncEngine(); - - SyncEngine(const SyncEngine&) = delete; - SyncEngine& operator=(const SyncEngine&) = delete; - ~SyncEngine() override; // Kicks off asynchronous initialization. Optionally deletes sync data during @@ -179,6 +174,9 @@ // Returns a ListValue representing Nigori node. virtual void GetNigoriNodeForDebugging(AllNodesCallback callback) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(SyncEngine); }; } // namespace syncer
diff --git a/components/sync/engine/sync_manager_factory.h b/components/sync/engine/sync_manager_factory.h index ed96e5f..23f95c1 100644 --- a/components/sync/engine/sync_manager_factory.h +++ b/components/sync/engine/sync_manager_factory.h
@@ -23,10 +23,6 @@ public: SyncManagerFactory( network::NetworkConnectionTracker* network_connection_tracker); - - SyncManagerFactory(const SyncManagerFactory&) = delete; - SyncManagerFactory& operator=(const SyncManagerFactory&) = delete; - virtual ~SyncManagerFactory(); virtual std::unique_ptr<SyncManager> CreateSyncManager( @@ -34,6 +30,8 @@ private: network::NetworkConnectionTracker* network_connection_tracker_; + + DISALLOW_COPY_AND_ASSIGN(SyncManagerFactory); }; } // namespace syncer
diff --git a/components/sync/engine/sync_manager_impl.h b/components/sync/engine/sync_manager_impl.h index 761013f..a9e012e5 100644 --- a/components/sync/engine/sync_manager_impl.h +++ b/components/sync/engine/sync_manager_impl.h
@@ -48,10 +48,6 @@ SyncManagerImpl( const std::string& name, network::NetworkConnectionTracker* network_connection_tracker); - - SyncManagerImpl(const SyncManagerImpl&) = delete; - SyncManagerImpl& operator=(const SyncManagerImpl&) = delete; - ~SyncManagerImpl() override; // SyncManager implementation. @@ -172,6 +168,8 @@ std::unique_ptr<SyncEncryptionHandler::Observer> encryption_observer_proxy_; base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); }; } // namespace syncer
diff --git a/components/sync/engine/sync_scheduler_impl.h b/components/sync/engine/sync_scheduler_impl.h index 7562336..6fba055 100644 --- a/components/sync/engine/sync_scheduler_impl.h +++ b/components/sync/engine/sync_scheduler_impl.h
@@ -40,9 +40,6 @@ std::unique_ptr<Syncer> syncer, bool ignore_auth_credentials); - SyncSchedulerImpl(const SyncSchedulerImpl&) = delete; - SyncSchedulerImpl& operator=(const SyncSchedulerImpl&) = delete; - // Calls Stop(). ~SyncSchedulerImpl() override; @@ -297,6 +294,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); }; } // namespace syncer
diff --git a/components/sync/engine/syncer.h b/components/sync/engine/syncer.h index c07fc381..886ae99 100644 --- a/components/sync/engine/syncer.h +++ b/components/sync/engine/syncer.h
@@ -32,10 +32,6 @@ class Syncer { public: explicit Syncer(CancelationSignal* cancelation_signal); - - Syncer(const Syncer&) = delete; - Syncer& operator=(const Syncer&) = delete; - virtual ~Syncer(); // Whether the syncer is in the middle of a sync cycle. @@ -93,6 +89,8 @@ // Whether the syncer is in the middle of a sync attempt. bool is_syncing_; + + DISALLOW_COPY_AND_ASSIGN(Syncer); }; } // namespace syncer
diff --git a/components/sync/model/blocking_model_type_store_impl.h b/components/sync/model/blocking_model_type_store_impl.h index 19e9a22..91d8851 100644 --- a/components/sync/model/blocking_model_type_store_impl.h +++ b/components/sync/model/blocking_model_type_store_impl.h
@@ -22,11 +22,6 @@ // |backend| must not be null. BlockingModelTypeStoreImpl(ModelType type, scoped_refptr<ModelTypeStoreBackend> backend); - - BlockingModelTypeStoreImpl(const BlockingModelTypeStoreImpl&) = delete; - BlockingModelTypeStoreImpl& operator=(const BlockingModelTypeStoreImpl&) = - delete; - ~BlockingModelTypeStoreImpl() override; // BlockingModelTypeStore implementation. @@ -57,6 +52,8 @@ const std::string global_metadata_key_; SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(BlockingModelTypeStoreImpl); }; } // namespace syncer
diff --git a/components/sync/model/client_tag_based_model_type_processor.h b/components/sync/model/client_tag_based_model_type_processor.h index e0ad5c6..829a551 100644 --- a/components/sync/model/client_tag_based_model_type_processor.h +++ b/components/sync/model/client_tag_based_model_type_processor.h
@@ -54,12 +54,6 @@ ClientTagBasedModelTypeProcessor(ModelType type, const base::RepeatingClosure& dump_stack, bool commit_only); - - ClientTagBasedModelTypeProcessor(const ClientTagBasedModelTypeProcessor&) = - delete; - ClientTagBasedModelTypeProcessor& operator=( - const ClientTagBasedModelTypeProcessor&) = delete; - ~ClientTagBasedModelTypeProcessor() override; // Returns true if the handshake with sync thread is complete. @@ -305,6 +299,8 @@ // WeakPtrFactory for this processor which will be sent to sync thread. base::WeakPtrFactory<ClientTagBasedModelTypeProcessor> weak_ptr_factory_for_worker_{this}; + + DISALLOW_COPY_AND_ASSIGN(ClientTagBasedModelTypeProcessor); }; } // namespace syncer
diff --git a/components/sync/model/data_type_error_handler_impl.h b/components/sync/model/data_type_error_handler_impl.h index 5cf04b0..b1256ad8 100644 --- a/components/sync/model/data_type_error_handler_impl.h +++ b/components/sync/model/data_type_error_handler_impl.h
@@ -24,10 +24,6 @@ const scoped_refptr<base::SequencedTaskRunner>& ui_thread, const base::RepeatingClosure& dump_stack, const ErrorCallback& sync_callback); - - DataTypeErrorHandlerImpl(const DataTypeErrorHandlerImpl&) = delete; - DataTypeErrorHandlerImpl& operator=(const DataTypeErrorHandlerImpl&) = delete; - ~DataTypeErrorHandlerImpl() override; void OnUnrecoverableError(const SyncError& error) override; @@ -47,6 +43,8 @@ // The callback used to inform sync of the error on the |ui_thread_|. ErrorCallback sync_callback_; + + DISALLOW_COPY_AND_ASSIGN(DataTypeErrorHandlerImpl); }; } // namespace syncer
diff --git a/components/sync/model/entity_change.h b/components/sync/model/entity_change.h index c31ad222..f554a2f3 100644 --- a/components/sync/model/entity_change.h +++ b/components/sync/model/entity_change.h
@@ -26,9 +26,6 @@ static std::unique_ptr<EntityChange> CreateDelete( const std::string& storage_key); - EntityChange(const EntityChange&) = delete; - EntityChange& operator=(const EntityChange&) = delete; - virtual ~EntityChange(); std::string storage_key() const { return storage_key_; } @@ -43,6 +40,8 @@ std::string storage_key_; ChangeType type_; EntityData data_; + + DISALLOW_COPY_AND_ASSIGN(EntityChange); }; using EntityChangeList = std::vector<std::unique_ptr<EntityChange>>;
diff --git a/components/sync/model/forwarding_model_type_controller_delegate.h b/components/sync/model/forwarding_model_type_controller_delegate.h index 6b1cf45..f8c10843 100644 --- a/components/sync/model/forwarding_model_type_controller_delegate.h +++ b/components/sync/model/forwarding_model_type_controller_delegate.h
@@ -21,12 +21,6 @@ // Except for tests, |other| must not be null and must outlive this object. explicit ForwardingModelTypeControllerDelegate( ModelTypeControllerDelegate* other); - - ForwardingModelTypeControllerDelegate( - const ForwardingModelTypeControllerDelegate&) = delete; - ForwardingModelTypeControllerDelegate& operator=( - const ForwardingModelTypeControllerDelegate&) = delete; - ~ForwardingModelTypeControllerDelegate() override; // ModelTypeControllerDelegate implementation. @@ -41,6 +35,8 @@ private: ModelTypeControllerDelegate* const other_; + + DISALLOW_COPY_AND_ASSIGN(ForwardingModelTypeControllerDelegate); }; } // namespace syncer
diff --git a/components/sync/model/model_type_store_base.h b/components/sync/model/model_type_store_base.h index f7f2aed..b0570db 100644 --- a/components/sync/model/model_type_store_base.h +++ b/components/sync/model/model_type_store_base.h
@@ -35,10 +35,6 @@ static std::unique_ptr<MetadataChangeList> CreateMetadataChangeList(); WriteBatch(); - - WriteBatch(const WriteBatch&) = delete; - WriteBatch& operator=(const WriteBatch&) = delete; - virtual ~WriteBatch(); // Write the given |value| for data with |id|. @@ -56,6 +52,9 @@ // TODO(mastiz): Revisit whether the last requirement above can be removed // and make this API more type-safe. void TakeMetadataChangesFrom(std::unique_ptr<MetadataChangeList> mcl); + + private: + DISALLOW_COPY_AND_ASSIGN(WriteBatch); }; using RecordList = std::vector<Record>;
diff --git a/components/sync/model/model_type_store_impl.h b/components/sync/model/model_type_store_impl.h index 68d93b02..c47b6c3 100644 --- a/components/sync/model/model_type_store_impl.h +++ b/components/sync/model/model_type_store_impl.h
@@ -30,10 +30,6 @@ std::unique_ptr<BlockingModelTypeStoreImpl, base::OnTaskRunnerDeleter> backend_store, scoped_refptr<base::SequencedTaskRunner> backend_task_runner); - - ModelTypeStoreImpl(const ModelTypeStoreImpl&) = delete; - ModelTypeStoreImpl& operator=(const ModelTypeStoreImpl&) = delete; - ~ModelTypeStoreImpl() override; // ModelTypeStore implementation. @@ -74,6 +70,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<ModelTypeStoreImpl> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(ModelTypeStoreImpl); }; } // namespace syncer
diff --git a/components/sync/model/model_type_store_service_impl.h b/components/sync/model/model_type_store_service_impl.h index 753f9e1..0bcb6f0d 100644 --- a/components/sync/model/model_type_store_service_impl.h +++ b/components/sync/model/model_type_store_service_impl.h
@@ -22,11 +22,6 @@ public: // |base_path| represents the profile's path. explicit ModelTypeStoreServiceImpl(const base::FilePath& base_path); - - ModelTypeStoreServiceImpl(const ModelTypeStoreServiceImpl&) = delete; - ModelTypeStoreServiceImpl& operator=(const ModelTypeStoreServiceImpl&) = - delete; - ~ModelTypeStoreServiceImpl() override; // ModelTypeStoreService: @@ -50,6 +45,8 @@ const scoped_refptr<ModelTypeStoreBackend> store_backend_; SEQUENCE_CHECKER(ui_sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(ModelTypeStoreServiceImpl); }; } // namespace syncer
diff --git a/components/sync/model/mutable_data_batch.h b/components/sync/model/mutable_data_batch.h index 6e1c442..ced7d16b 100644 --- a/components/sync/model/mutable_data_batch.h +++ b/components/sync/model/mutable_data_batch.h
@@ -25,10 +25,6 @@ class MutableDataBatch : public DataBatch { public: MutableDataBatch(); - - MutableDataBatch(const MutableDataBatch&) = delete; - MutableDataBatch& operator=(const MutableDataBatch&) = delete; - ~MutableDataBatch() override; // Takes ownership of the data tied to a given key used for storage. Put @@ -44,6 +40,8 @@ private: std::vector<KeyAndData> key_data_pairs_; size_t read_index_ = 0; + + DISALLOW_COPY_AND_ASSIGN(MutableDataBatch); }; } // namespace syncer
diff --git a/components/sync/model/proxy_model_type_controller_delegate.h b/components/sync/model/proxy_model_type_controller_delegate.h index 67ee1c8..8146d27 100644 --- a/components/sync/model/proxy_model_type_controller_delegate.h +++ b/components/sync/model/proxy_model_type_controller_delegate.h
@@ -25,12 +25,6 @@ ProxyModelTypeControllerDelegate( const scoped_refptr<base::SequencedTaskRunner>& task_runner, const DelegateProvider& delegate_provider); - - ProxyModelTypeControllerDelegate(const ProxyModelTypeControllerDelegate&) = - delete; - ProxyModelTypeControllerDelegate& operator=( - const ProxyModelTypeControllerDelegate&) = delete; - ~ProxyModelTypeControllerDelegate() override; // ModelTypeControllerDelegate implementation. @@ -53,6 +47,8 @@ const scoped_refptr<base::SequencedTaskRunner> task_runner_; const DelegateProvider delegate_provider_; + + DISALLOW_COPY_AND_ASSIGN(ProxyModelTypeControllerDelegate); }; } // namespace syncer
diff --git a/components/sync/model/syncable_service.h b/components/sync/model/syncable_service.h index c224355..52ca5cdf 100644 --- a/components/sync/model/syncable_service.h +++ b/components/sync/model/syncable_service.h
@@ -26,10 +26,6 @@ class SyncableService : public base::SupportsWeakPtr<SyncableService> { public: SyncableService() = default; - - SyncableService(const SyncableService&) = delete; - SyncableService& operator=(const SyncableService&) = delete; - virtual ~SyncableService() = default; // A StartSyncFlare is useful when your SyncableService has a need for sync @@ -75,6 +71,9 @@ virtual absl::optional<ModelError> ProcessSyncChanges( const base::Location& from_here, const SyncChangeList& change_list) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(SyncableService); }; } // namespace syncer
diff --git a/components/sync/model/syncable_service_based_bridge.cc b/components/sync/model/syncable_service_based_bridge.cc index f9a14de..78deb819 100644 --- a/components/sync/model/syncable_service_based_bridge.cc +++ b/components/sync/model/syncable_service_based_bridge.cc
@@ -118,9 +118,6 @@ DCHECK(other); } - LocalChangeProcessor(const LocalChangeProcessor&) = delete; - LocalChangeProcessor& operator=(const LocalChangeProcessor&) = delete; - ~LocalChangeProcessor() override {} absl::optional<ModelError> ProcessSyncChanges( @@ -205,15 +202,13 @@ SyncableServiceBasedBridge::InMemoryStore* const in_memory_store_; ModelTypeChangeProcessor* const other_; SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(LocalChangeProcessor); }; class SyncErrorFactoryImpl : public SyncErrorFactory { public: explicit SyncErrorFactoryImpl(ModelType type) : type_(type) {} - - SyncErrorFactoryImpl(const SyncErrorFactoryImpl&) = delete; - SyncErrorFactoryImpl& operator=(const SyncErrorFactoryImpl&) = delete; - ~SyncErrorFactoryImpl() override = default; SyncError CreateAndUploadError(const base::Location& location, @@ -224,6 +219,8 @@ private: const ModelType type_; + + DISALLOW_COPY_AND_ASSIGN(SyncErrorFactoryImpl); }; } // namespace
diff --git a/components/sync/model/syncable_service_based_bridge.h b/components/sync/model/syncable_service_based_bridge.h index 07a09851..a42a461c 100644 --- a/components/sync/model/syncable_service_based_bridge.h +++ b/components/sync/model/syncable_service_based_bridge.h
@@ -44,11 +44,6 @@ OnceModelTypeStoreFactory store_factory, std::unique_ptr<ModelTypeChangeProcessor> change_processor, SyncableService* syncable_service); - - SyncableServiceBasedBridge(const SyncableServiceBasedBridge&) = delete; - SyncableServiceBasedBridge& operator=(const SyncableServiceBasedBridge&) = - delete; - ~SyncableServiceBasedBridge() override; // ModelTypeSyncBridge implementation. @@ -115,6 +110,8 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<SyncableServiceBasedBridge> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(SyncableServiceBasedBridge); }; } // namespace syncer
diff --git a/components/sync/nigori/keystore_keys_cryptographer.h b/components/sync/nigori/keystore_keys_cryptographer.h index a2e7dd4..05ad78d 100644 --- a/components/sync/nigori/keystore_keys_cryptographer.h +++ b/components/sync/nigori/keystore_keys_cryptographer.h
@@ -32,10 +32,6 @@ static std::unique_ptr<KeystoreKeysCryptographer> FromKeystoreKeys( const std::vector<std::string>& keystore_keys); - KeystoreKeysCryptographer(const KeystoreKeysCryptographer&) = delete; - KeystoreKeysCryptographer& operator=(const KeystoreKeysCryptographer&) = - delete; - ~KeystoreKeysCryptographer(); const std::vector<std::string>& keystore_keys() const { @@ -74,6 +70,8 @@ std::unique_ptr<CryptographerImpl> cryptographer_; std::vector<std::string> keystore_keys_; + + DISALLOW_COPY_AND_ASSIGN(KeystoreKeysCryptographer); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_local_change_processor.h b/components/sync/nigori/nigori_local_change_processor.h index 9696358b..ddd9402 100644 --- a/components/sync/nigori/nigori_local_change_processor.h +++ b/components/sync/nigori/nigori_local_change_processor.h
@@ -39,10 +39,6 @@ public: NigoriLocalChangeProcessor() = default; - NigoriLocalChangeProcessor(const NigoriLocalChangeProcessor&) = delete; - NigoriLocalChangeProcessor& operator=(const NigoriLocalChangeProcessor&) = - delete; - virtual ~NigoriLocalChangeProcessor() = default; // The Nigori model is expected to call this method as soon as possible during @@ -78,6 +74,9 @@ // false, and ModelReadyToSync() has already been called, then Put and Delete // will no-op and can be omitted by bridge. virtual bool IsTrackingMetadata() = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(NigoriLocalChangeProcessor); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_model_type_processor.h b/components/sync/nigori/nigori_model_type_processor.h index a59adc6b..0d07e07d 100644 --- a/components/sync/nigori/nigori_model_type_processor.h +++ b/components/sync/nigori/nigori_model_type_processor.h
@@ -25,10 +25,6 @@ public NigoriLocalChangeProcessor { public: NigoriModelTypeProcessor(); - - NigoriModelTypeProcessor(const NigoriModelTypeProcessor&) = delete; - NigoriModelTypeProcessor& operator=(const NigoriModelTypeProcessor&) = delete; - ~NigoriModelTypeProcessor() override; // ModelTypeProcessor implementation. @@ -116,6 +112,8 @@ // invalidated during destruction). base::WeakPtrFactory<ModelTypeControllerDelegate> weak_ptr_factory_for_controller_{this}; + + DISALLOW_COPY_AND_ASSIGN(NigoriModelTypeProcessor); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_storage.h b/components/sync/nigori/nigori_storage.h index c431327..802a4d9 100644 --- a/components/sync/nigori/nigori_storage.h +++ b/components/sync/nigori/nigori_storage.h
@@ -15,10 +15,6 @@ class NigoriStorage { public: NigoriStorage() = default; - - NigoriStorage(const NigoriStorage&) = delete; - NigoriStorage& operator=(const NigoriStorage&) = delete; - virtual ~NigoriStorage() = default; // Should atomically persist |data|. @@ -30,6 +26,9 @@ // Removes all previously stored data. virtual void ClearData() = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(NigoriStorage); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_storage_impl.h b/components/sync/nigori/nigori_storage_impl.h index e70a8db..0c95a9a9 100644 --- a/components/sync/nigori/nigori_storage_impl.h +++ b/components/sync/nigori/nigori_storage_impl.h
@@ -15,10 +15,6 @@ public: // |encryptor| must be not null and must outlive this object. explicit NigoriStorageImpl(const base::FilePath& path); - - NigoriStorageImpl(const NigoriStorageImpl&) = delete; - NigoriStorageImpl& operator=(const NigoriStorageImpl&) = delete; - ~NigoriStorageImpl() override; // NigoriStorage implementation. @@ -31,6 +27,7 @@ base::FilePath path_; SEQUENCE_CHECKER(sequence_checker_); + DISALLOW_COPY_AND_ASSIGN(NigoriStorageImpl); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_sync_bridge.h b/components/sync/nigori/nigori_sync_bridge.h index d085170c3..62ac8692 100644 --- a/components/sync/nigori/nigori_sync_bridge.h +++ b/components/sync/nigori/nigori_sync_bridge.h
@@ -23,9 +23,6 @@ public: NigoriSyncBridge() = default; - NigoriSyncBridge(const NigoriSyncBridge&) = delete; - NigoriSyncBridge& operator=(const NigoriSyncBridge&) = delete; - virtual ~NigoriSyncBridge() = default; // Perform the initial merge between local and sync data. @@ -42,6 +39,9 @@ // Informs the bridge that sync has been disabed. The bridge is responsible // for deleting all data and metadata upon disabling sync. virtual void ApplyDisableSyncChanges() = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(NigoriSyncBridge); }; } // namespace syncer
diff --git a/components/sync/nigori/nigori_sync_bridge_impl.cc b/components/sync/nigori/nigori_sync_bridge_impl.cc index 2ae02972..21d2693 100644 --- a/components/sync/nigori/nigori_sync_bridge_impl.cc +++ b/components/sync/nigori/nigori_sync_bridge_impl.cc
@@ -332,9 +332,6 @@ const base::RepeatingClosure& post_passphrase_accepted_cb) : post_passphrase_accepted_cb_(post_passphrase_accepted_cb) {} - BroadcastingObserver(const BroadcastingObserver&) = delete; - BroadcastingObserver& operator=(const BroadcastingObserver&) = delete; - ~BroadcastingObserver() override = default; void AddObserver(SyncEncryptionHandler::Observer* observer) { @@ -408,6 +405,8 @@ base::ObserverList<SyncEncryptionHandler::Observer>::Unchecked observers_; const base::RepeatingClosure post_passphrase_accepted_cb_; + + DISALLOW_COPY_AND_ASSIGN(BroadcastingObserver); }; NigoriSyncBridgeImpl::NigoriSyncBridgeImpl(
diff --git a/components/sync/nigori/nigori_sync_bridge_impl.h b/components/sync/nigori/nigori_sync_bridge_impl.h index 6eca8009..e773afa 100644 --- a/components/sync/nigori/nigori_sync_bridge_impl.h +++ b/components/sync/nigori/nigori_sync_bridge_impl.h
@@ -53,10 +53,6 @@ std::unique_ptr<NigoriStorage> storage, const std::string& packed_explicit_passphrase_key, const std::string& packed_keystore_keys); - - NigoriSyncBridgeImpl(const NigoriSyncBridgeImpl&) = delete; - NigoriSyncBridgeImpl& operator=(const NigoriSyncBridgeImpl&) = delete; - ~NigoriSyncBridgeImpl() override; // SyncEncryptionHandler implementation. @@ -193,6 +189,8 @@ const std::unique_ptr<BroadcastingObserver> broadcasting_observer_; SEQUENCE_CHECKER(sequence_checker_); + + DISALLOW_COPY_AND_ASSIGN(NigoriSyncBridgeImpl); }; } // namespace syncer
diff --git a/components/sync/nigori/pending_local_nigori_commit.cc b/components/sync/nigori/pending_local_nigori_commit.cc index 38f5ff8e..6c29929 100644 --- a/components/sync/nigori/pending_local_nigori_commit.cc +++ b/components/sync/nigori/pending_local_nigori_commit.cc
@@ -57,9 +57,6 @@ key_derivation_params_(CreateKeyDerivationParamsForCustomPassphrase()) { } - CustomPassphraseSetter(const CustomPassphraseSetter&) = delete; - CustomPassphraseSetter& operator=(const CustomPassphraseSetter&) = delete; - ~CustomPassphraseSetter() override = default; bool TryApply(NigoriState* state) const override { @@ -125,15 +122,13 @@ private: const std::string passphrase_; const KeyDerivationParams key_derivation_params_; + + DISALLOW_COPY_AND_ASSIGN(CustomPassphraseSetter); }; class KeystoreInitializer : public PendingLocalNigoriCommit { public: KeystoreInitializer() = default; - - KeystoreInitializer(const KeystoreInitializer&) = delete; - KeystoreInitializer& operator=(const KeystoreInitializer&) = delete; - ~KeystoreInitializer() override = default; bool TryApply(NigoriState* state) const override { @@ -161,15 +156,14 @@ } void OnFailure(SyncEncryptionHandler::Observer* observer) override {} + + private: + DISALLOW_COPY_AND_ASSIGN(KeystoreInitializer); }; class KeystoreReencryptor : public PendingLocalNigoriCommit { public: KeystoreReencryptor() = default; - - KeystoreReencryptor(const KeystoreReencryptor&) = delete; - KeystoreReencryptor& operator=(const KeystoreReencryptor&) = delete; - ~KeystoreReencryptor() override = default; bool TryApply(NigoriState* state) const override { @@ -192,6 +186,9 @@ } void OnFailure(SyncEncryptionHandler::Observer* observer) override {} + + private: + DISALLOW_COPY_AND_ASSIGN(KeystoreReencryptor); }; } // namespace
diff --git a/components/sync/nigori/pending_local_nigori_commit.h b/components/sync/nigori/pending_local_nigori_commit.h index d9e92a4..b5ba3ea 100644 --- a/components/sync/nigori/pending_local_nigori_commit.h +++ b/components/sync/nigori/pending_local_nigori_commit.h
@@ -28,10 +28,6 @@ static std::unique_ptr<PendingLocalNigoriCommit> ForKeystoreReencryption(); PendingLocalNigoriCommit() = default; - - PendingLocalNigoriCommit(const PendingLocalNigoriCommit&) = delete; - PendingLocalNigoriCommit& operator=(const PendingLocalNigoriCommit&) = delete; - virtual ~PendingLocalNigoriCommit() = default; // Attempts to modify |*state| to reflect the intended commit. Returns true if @@ -49,6 +45,9 @@ // Invoked when the change no longer applies or was aborted for a different // reason (e.g. sync disabled). |observer| must not be null. virtual void OnFailure(SyncEncryptionHandler::Observer* observer) = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(PendingLocalNigoriCommit); }; } // namespace syncer
diff --git a/components/sync/test/engine/fake_sync_manager.h b/components/sync/test/engine/fake_sync_manager.h index 11517c1a..e582a67 100644 --- a/components/sync/test/engine/fake_sync_manager.h +++ b/components/sync/test/engine/fake_sync_manager.h
@@ -44,10 +44,6 @@ FakeSyncManager(ModelTypeSet initial_sync_ended_types, ModelTypeSet progress_marker_types, ModelTypeSet configure_fail_types); - - FakeSyncManager(const FakeSyncManager&) = delete; - FakeSyncManager& operator=(const FakeSyncManager&) = delete; - ~FakeSyncManager() override; // Returns those types that have been downloaded since the last call to @@ -137,6 +133,8 @@ // Number of invalidations received per type since startup. std::map<ModelType, int> num_invalidations_received_; + + DISALLOW_COPY_AND_ASSIGN(FakeSyncManager); }; } // namespace syncer
diff --git a/components/sync/test/engine/mock_model_type_processor.h b/components/sync/test/engine/mock_model_type_processor.h index 545cafe..71f904d 100644 --- a/components/sync/test/engine/mock_model_type_processor.h +++ b/components/sync/test/engine/mock_model_type_processor.h
@@ -38,10 +38,6 @@ using DisconnectCallback = base::OnceCallback<void()>; MockModelTypeProcessor(); - - MockModelTypeProcessor(const MockModelTypeProcessor&) = delete; - MockModelTypeProcessor& operator=(const MockModelTypeProcessor&) = delete; - ~MockModelTypeProcessor() override; // Implementation of ModelTypeProcessor. @@ -187,6 +183,8 @@ CommitRequestDataList commit_request_; int get_local_changes_call_count_ = 0; + + DISALLOW_COPY_AND_ASSIGN(MockModelTypeProcessor); }; } // namespace syncer
diff --git a/components/sync/test/engine/mock_model_type_worker.h b/components/sync/test/engine/mock_model_type_worker.h index ce9f0247..5cd793d 100644 --- a/components/sync/test/engine/mock_model_type_worker.h +++ b/components/sync/test/engine/mock_model_type_worker.h
@@ -39,10 +39,6 @@ public: MockModelTypeWorker(const sync_pb::ModelTypeState& model_type_state, ModelTypeProcessor* processor); - - MockModelTypeWorker(const MockModelTypeWorker&) = delete; - MockModelTypeWorker& operator=(const MockModelTypeWorker&) = delete; - ~MockModelTypeWorker() override; // Callback when local changes are received from the processor. @@ -179,6 +175,8 @@ // WeakPtrFactory for this worker which will be sent to sync thread. base::WeakPtrFactory<MockModelTypeWorker> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(MockModelTypeWorker); }; } // namespace syncer
diff --git a/components/sync/test/engine/mock_nudge_handler.h b/components/sync/test/engine/mock_nudge_handler.h index cff7b04..6d0a57a 100644 --- a/components/sync/test/engine/mock_nudge_handler.h +++ b/components/sync/test/engine/mock_nudge_handler.h
@@ -15,10 +15,6 @@ class MockNudgeHandler : public NudgeHandler { public: MockNudgeHandler(); - - MockNudgeHandler(const MockNudgeHandler&) = delete; - MockNudgeHandler& operator=(const MockNudgeHandler&) = delete; - ~MockNudgeHandler() override; void NudgeForInitialDownload(ModelType type) override; @@ -32,6 +28,8 @@ private: int num_initial_nudges_; int num_commit_nudges_; + + DISALLOW_COPY_AND_ASSIGN(MockNudgeHandler); }; } // namespace syncer
diff --git a/components/sync/test/engine/single_type_mock_server.h b/components/sync/test/engine/single_type_mock_server.h index a163d7f..6e7d3bf 100644 --- a/components/sync/test/engine/single_type_mock_server.h +++ b/components/sync/test/engine/single_type_mock_server.h
@@ -39,10 +39,6 @@ class SingleTypeMockServer { public: explicit SingleTypeMockServer(ModelType type); - - SingleTypeMockServer(const SingleTypeMockServer&) = delete; - SingleTypeMockServer& operator=(const SingleTypeMockServer&) = delete; - ~SingleTypeMockServer(); // Generates a SyncEntity representing a server-delivered update containing @@ -114,6 +110,8 @@ // The token that is used to generate the current progress marker. std::string progress_marker_token_; + + DISALLOW_COPY_AND_ASSIGN(SingleTypeMockServer); }; } // namespace syncer
diff --git a/components/sync/test/fake_server/fake_server_http_post_provider.h b/components/sync/test/fake_server/fake_server_http_post_provider.h index 4c753d9..0f80c02 100644 --- a/components/sync/test/fake_server/fake_server_http_post_provider.h +++ b/components/sync/test/fake_server/fake_server_http_post_provider.h
@@ -84,12 +84,6 @@ FakeServerHttpPostProviderFactory( const base::WeakPtr<FakeServer>& fake_server, scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner); - - FakeServerHttpPostProviderFactory(const FakeServerHttpPostProviderFactory&) = - delete; - FakeServerHttpPostProviderFactory& operator=( - const FakeServerHttpPostProviderFactory&) = delete; - ~FakeServerHttpPostProviderFactory() override; // HttpPostProviderFactory: @@ -100,6 +94,8 @@ // |fake_server_task_runner_| runs on. base::WeakPtr<FakeServer> fake_server_; scoped_refptr<base::SequencedTaskRunner> fake_server_task_runner_; + + DISALLOW_COPY_AND_ASSIGN(FakeServerHttpPostProviderFactory); }; } // namespace fake_server
diff --git a/components/sync/test/fake_server/fake_server_verifier.h b/components/sync/test/fake_server/fake_server_verifier.h index 42c3bcb..fc728cdc 100644 --- a/components/sync/test/fake_server/fake_server_verifier.h +++ b/components/sync/test/fake_server/fake_server_verifier.h
@@ -27,10 +27,6 @@ // Creates a FakeServerVerifier for |fake_server|. This class does not take // ownership of |fake_server|. explicit FakeServerVerifier(FakeServer* fake_server); - - FakeServerVerifier(const FakeServerVerifier&) = delete; - FakeServerVerifier& operator=(const FakeServerVerifier&) = delete; - virtual ~FakeServerVerifier(); // Returns a successful result if there are |expected_count| entities with the @@ -55,6 +51,8 @@ private: FakeServer* const fake_server_; + + DISALLOW_COPY_AND_ASSIGN(FakeServerVerifier); }; } // namespace fake_server
diff --git a/components/sync/test/model/fake_model_type_controller_delegate.h b/components/sync/test/model/fake_model_type_controller_delegate.h index 62bd517..977eade 100644 --- a/components/sync/test/model/fake_model_type_controller_delegate.h +++ b/components/sync/test/model/fake_model_type_controller_delegate.h
@@ -19,12 +19,6 @@ class FakeModelTypeControllerDelegate : public ModelTypeControllerDelegate { public: explicit FakeModelTypeControllerDelegate(ModelType type); - - FakeModelTypeControllerDelegate(const FakeModelTypeControllerDelegate&) = - delete; - FakeModelTypeControllerDelegate& operator=( - const FakeModelTypeControllerDelegate&) = delete; - ~FakeModelTypeControllerDelegate() override; void SetModelTypeStateForActivationResponse( @@ -68,6 +62,8 @@ StartCallback start_callback_; ModelErrorHandler error_handler_; base::WeakPtrFactory<FakeModelTypeControllerDelegate> weak_ptr_factory_{this}; + + DISALLOW_COPY_AND_ASSIGN(FakeModelTypeControllerDelegate); }; } // namespace syncer
diff --git a/components/sync/test/model/fake_sync_change_processor.h b/components/sync/test/model/fake_sync_change_processor.h index c05029c1..39fc42d 100644 --- a/components/sync/test/model/fake_sync_change_processor.h +++ b/components/sync/test/model/fake_sync_change_processor.h
@@ -13,10 +13,6 @@ class FakeSyncChangeProcessor : public SyncChangeProcessor { public: FakeSyncChangeProcessor(); - - FakeSyncChangeProcessor(const FakeSyncChangeProcessor&) = delete; - FakeSyncChangeProcessor& operator=(const FakeSyncChangeProcessor&) = delete; - ~FakeSyncChangeProcessor() override; // SyncChangeProcessor implementation. @@ -32,6 +28,8 @@ private: SyncChangeList changes_; + + DISALLOW_COPY_AND_ASSIGN(FakeSyncChangeProcessor); }; } // namespace syncer
diff --git a/components/sync/test/model/mock_model_type_change_processor.h b/components/sync/test/model/mock_model_type_change_processor.h index 68bbdf7..a993a60 100644 --- a/components/sync/test/model/mock_model_type_change_processor.h +++ b/components/sync/test/model/mock_model_type_change_processor.h
@@ -18,11 +18,6 @@ class MockModelTypeChangeProcessor : public ModelTypeChangeProcessor { public: MockModelTypeChangeProcessor(); - - MockModelTypeChangeProcessor(const MockModelTypeChangeProcessor&) = delete; - MockModelTypeChangeProcessor& operator=(const MockModelTypeChangeProcessor&) = - delete; - ~MockModelTypeChangeProcessor() override; MOCK_METHOD(void, Put, @@ -86,6 +81,9 @@ // Delegates all calls to another instance. |delegate| must not be null and // must outlive this object. void DelegateCallsByDefaultTo(ModelTypeChangeProcessor* delegate); + + private: + DISALLOW_COPY_AND_ASSIGN(MockModelTypeChangeProcessor); }; } // namespace syncer
diff --git a/components/sync/test/model/sync_change_processor_wrapper_for_test.h b/components/sync/test/model/sync_change_processor_wrapper_for_test.h index efc894ce..6b26f69 100644 --- a/components/sync/test/model/sync_change_processor_wrapper_for_test.h +++ b/components/sync/test/model/sync_change_processor_wrapper_for_test.h
@@ -24,12 +24,6 @@ explicit SyncChangeProcessorWrapperForTest(SyncChangeProcessor* wrapped); // Overload for SyncableService. explicit SyncChangeProcessorWrapperForTest(SyncableService* wrapped); - - SyncChangeProcessorWrapperForTest(const SyncChangeProcessorWrapperForTest&) = - delete; - SyncChangeProcessorWrapperForTest& operator=( - const SyncChangeProcessorWrapperForTest&) = delete; - ~SyncChangeProcessorWrapperForTest() override; // SyncChangeProcessor implementation. @@ -42,6 +36,8 @@ const base::Location& from_here, const SyncChangeList& change_list)> process_sync_changes_; + + DISALLOW_COPY_AND_ASSIGN(SyncChangeProcessorWrapperForTest); }; } // namespace syncer
diff --git a/components/sync/test/model/test_model_type_store_service.h b/components/sync/test/model/test_model_type_store_service.h index 2832939b..bd49b57 100644 --- a/components/sync/test/model/test_model_type_store_service.h +++ b/components/sync/test/model/test_model_type_store_service.h
@@ -20,11 +20,6 @@ class TestModelTypeStoreService : public ModelTypeStoreService { public: TestModelTypeStoreService(); - - TestModelTypeStoreService(const TestModelTypeStoreService&) = delete; - TestModelTypeStoreService& operator=(const TestModelTypeStoreService&) = - delete; - ~TestModelTypeStoreService() override; // ModelTypeStoreService: @@ -35,6 +30,8 @@ private: const scoped_refptr<ModelTypeStoreBackend> store_backend_; base::ScopedTempDir sync_data_path_; + + DISALLOW_COPY_AND_ASSIGN(TestModelTypeStoreService); }; } // namespace syncer
diff --git a/components/sync_bookmarks/bookmark_model_merger.h b/components/sync_bookmarks/bookmark_model_merger.h index 6316b17..58e278e 100644 --- a/components/sync_bookmarks/bookmark_model_merger.h +++ b/components/sync_bookmarks/bookmark_model_merger.h
@@ -43,6 +43,9 @@ favicon::FaviconService* favicon_service, SyncedBookmarkTracker* bookmark_tracker); + BookmarkModelMerger(const BookmarkModelMerger&) = delete; + BookmarkModelMerger& operator=(const BookmarkModelMerger&) = delete; + ~BookmarkModelMerger(); // Merges the remote bookmark model represented as the updates received from @@ -208,8 +211,6 @@ // permanent node. Computed upon construction via BuildRemoteForest(). const RemoteForest remote_forest_; std::unordered_map<base::GUID, GuidMatch, base::GUIDHash> guid_to_match_map_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkModelMerger); }; } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_model_observer_impl.h b/components/sync_bookmarks/bookmark_model_observer_impl.h index 5c0d8b9e..20c37088 100644 --- a/components/sync_bookmarks/bookmark_model_observer_impl.h +++ b/components/sync_bookmarks/bookmark_model_observer_impl.h
@@ -34,6 +34,11 @@ const base::RepeatingClosure& nudge_for_commit_closure, base::OnceClosure on_bookmark_model_being_deleted_closure, SyncedBookmarkTracker* bookmark_tracker); + + BookmarkModelObserverImpl(const BookmarkModelObserverImpl&) = delete; + BookmarkModelObserverImpl& operator=(const BookmarkModelObserverImpl&) = + delete; + ~BookmarkModelObserverImpl() override; // BookmarkModelObserver: @@ -99,8 +104,6 @@ // The callback used to inform the processor that the bookmark is getting // deleted. base::OnceClosure on_bookmark_model_being_deleted_closure_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkModelObserverImpl); }; } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_model_type_processor.cc b/components/sync_bookmarks/bookmark_model_type_processor.cc index c2105c6..1dc1227 100644 --- a/components/sync_bookmarks/bookmark_model_type_processor.cc +++ b/components/sync_bookmarks/bookmark_model_type_processor.cc
@@ -61,6 +61,10 @@ bookmark_model_->RemoveObserver(observer_); } + ScopedRemoteUpdateBookmarks(const ScopedRemoteUpdateBookmarks&) = delete; + ScopedRemoteUpdateBookmarks& operator=(const ScopedRemoteUpdateBookmarks&) = + delete; + ~ScopedRemoteUpdateBookmarks() { // Notify UI intensive observers of BookmarkModel that all updates have been // applied, and that they may now be consumed. This prevents issues like the @@ -77,8 +81,6 @@ ScopedSuspendBookmarkUndo suspend_undo_; bookmarks::BookmarkModelObserver* const observer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedRemoteUpdateBookmarks); }; std::string ComputeServerDefinedUniqueTagForDebugging(
diff --git a/components/sync_bookmarks/bookmark_model_type_processor.h b/components/sync_bookmarks/bookmark_model_type_processor.h index 53d9f96c..4b39a8da4 100644 --- a/components/sync_bookmarks/bookmark_model_type_processor.h +++ b/components/sync_bookmarks/bookmark_model_type_processor.h
@@ -37,6 +37,11 @@ // |bookmark_undo_service| must not be nullptr and must outlive this object. explicit BookmarkModelTypeProcessor( BookmarkUndoService* bookmark_undo_service); + + BookmarkModelTypeProcessor(const BookmarkModelTypeProcessor&) = delete; + BookmarkModelTypeProcessor& operator=(const BookmarkModelTypeProcessor&) = + delete; + ~BookmarkModelTypeProcessor() override; // ModelTypeProcessor implementation. @@ -175,8 +180,6 @@ // WeakPtrFactory for this processor which will be sent to sync thread. base::WeakPtrFactory<BookmarkModelTypeProcessor> weak_ptr_factory_for_worker_{ this}; - - DISALLOW_COPY_AND_ASSIGN(BookmarkModelTypeProcessor); }; } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/bookmark_sync_service.h b/components/sync_bookmarks/bookmark_sync_service.h index 4123a7e..2022a881 100644 --- a/components/sync_bookmarks/bookmark_sync_service.h +++ b/components/sync_bookmarks/bookmark_sync_service.h
@@ -36,6 +36,9 @@ // |bookmark_undo_service| must not be null and must outlive this object. explicit BookmarkSyncService(BookmarkUndoService* bookmark_undo_service); + BookmarkSyncService(const BookmarkSyncService&) = delete; + BookmarkSyncService& operator=(const BookmarkSyncService&) = delete; + // KeyedService implemenation. ~BookmarkSyncService() override; @@ -62,8 +65,6 @@ // BookmarkModel/HistoryService. std::unique_ptr<sync_bookmarks::BookmarkModelTypeProcessor> bookmark_model_type_processor_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkSyncService); }; } // namespace sync_bookmarks
diff --git a/components/sync_bookmarks/synced_bookmark_tracker.h b/components/sync_bookmarks/synced_bookmark_tracker.h index ea69ed2d..6efa7f4a 100644 --- a/components/sync_bookmarks/synced_bookmark_tracker.h +++ b/components/sync_bookmarks/synced_bookmark_tracker.h
@@ -49,6 +49,10 @@ // |bookmark_node| can be null for tombstones. |metadata| must not be null. Entity(const bookmarks::BookmarkNode* bookmark_node, std::unique_ptr<sync_pb::EntityMetadata> metadata); + + Entity(const Entity&) = delete; + Entity& operator=(const Entity&) = delete; + ~Entity(); // Returns true if this data is out of sync with the server. @@ -115,8 +119,6 @@ // server. The tracker sets it to true in the constructor because this code // path is only executed in production when loading from disk. bool commit_may_have_started_ = false; - - DISALLOW_COPY_AND_ASSIGN(Entity); }; // Returns a client tag hash given a bookmark GUID.
diff --git a/components/sync_device_info/device_count_metrics_provider.h b/components/sync_device_info/device_count_metrics_provider.h index 691f6326..bec0a4e 100644 --- a/components/sync_device_info/device_count_metrics_provider.h +++ b/components/sync_device_info/device_count_metrics_provider.h
@@ -32,6 +32,11 @@ explicit DeviceCountMetricsProvider( const ProvideTrackersCallback& provide_trackers); + + DeviceCountMetricsProvider(const DeviceCountMetricsProvider&) = delete; + DeviceCountMetricsProvider& operator=(const DeviceCountMetricsProvider&) = + delete; + ~DeviceCountMetricsProvider() override; // MetricsProvider: @@ -43,8 +48,6 @@ int MaxActiveDeviceCount() const; const ProvideTrackersCallback provide_trackers_; - - DISALLOW_COPY_AND_ASSIGN(DeviceCountMetricsProvider); }; } // namespace syncer
diff --git a/components/sync_device_info/device_info.h b/components/sync_device_info/device_info.h index 86b78de..4383890 100644 --- a/components/sync_device_info/device_info.h +++ b/components/sync_device_info/device_info.h
@@ -113,6 +113,10 @@ const absl::optional<PhoneAsASecurityKeyInfo>& paask_info, const std::string& fcm_registration_token, const ModelTypeSet& interested_data_types); + + DeviceInfo(const DeviceInfo&) = delete; + DeviceInfo& operator=(const DeviceInfo&) = delete; + ~DeviceInfo(); // Sync specific unique identifier for the device. Note if a device @@ -249,8 +253,6 @@ // NOTE: when adding a member, don't forget to update // |StoredDeviceInfoStillAccurate| in device_info_sync_bridge.cc or else // changes in that member might not trigger uploads of updated DeviceInfos. - - DISALLOW_COPY_AND_ASSIGN(DeviceInfo); }; } // namespace syncer
diff --git a/components/sync_device_info/device_info_prefs.h b/components/sync_device_info/device_info_prefs.h index 4b1da6a5..a505e8012 100644 --- a/components/sync_device_info/device_info_prefs.h +++ b/components/sync_device_info/device_info_prefs.h
@@ -25,6 +25,10 @@ // |pref_service| and |clock| must outlive this class and be non null. DeviceInfoPrefs(PrefService* pref_service, const base::Clock* clock); + + DeviceInfoPrefs(const DeviceInfoPrefs&) = delete; + DeviceInfoPrefs& operator=(const DeviceInfoPrefs&) = delete; + ~DeviceInfoPrefs(); // Returns if the given |cache_guid| is present in the saved pref. This is @@ -43,8 +47,6 @@ private: PrefService* const pref_service_; const base::Clock* const clock_; - - DISALLOW_COPY_AND_ASSIGN(DeviceInfoPrefs); }; } // namespace syncer
diff --git a/components/sync_device_info/device_info_sync_bridge.h b/components/sync_device_info/device_info_sync_bridge.h index f3828e4..047afb92 100644 --- a/components/sync_device_info/device_info_sync_bridge.h +++ b/components/sync_device_info/device_info_sync_bridge.h
@@ -45,6 +45,10 @@ OnceModelTypeStoreFactory store_factory, std::unique_ptr<ModelTypeChangeProcessor> change_processor, std::unique_ptr<DeviceInfoPrefs> device_info_prefs); + + DeviceInfoSyncBridge(const DeviceInfoSyncBridge&) = delete; + DeviceInfoSyncBridge& operator=(const DeviceInfoSyncBridge&) = delete; + ~DeviceInfoSyncBridge() override; LocalDeviceInfoProvider* GetLocalDeviceInfoProvider(); @@ -194,8 +198,6 @@ const std::unique_ptr<DeviceInfoPrefs> device_info_prefs_; base::WeakPtrFactory<DeviceInfoSyncBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncBridge); }; } // namespace syncer
diff --git a/components/sync_device_info/device_info_sync_bridge_unittest.cc b/components/sync_device_info/device_info_sync_bridge_unittest.cc index 97c5b27..655aaf8 100644 --- a/components/sync_device_info/device_info_sync_bridge_unittest.cc +++ b/components/sync_device_info/device_info_sync_bridge_unittest.cc
@@ -346,6 +346,11 @@ class TestLocalDeviceInfoProvider : public MutableLocalDeviceInfoProvider { public: TestLocalDeviceInfoProvider() = default; + + TestLocalDeviceInfoProvider(const TestLocalDeviceInfoProvider&) = delete; + TestLocalDeviceInfoProvider& operator=(const TestLocalDeviceInfoProvider&) = + delete; + ~TestLocalDeviceInfoProvider() override = default; // MutableLocalDeviceInfoProvider implementation. @@ -441,8 +446,6 @@ absl::optional<std::string> fcm_registration_token_; absl::optional<ModelTypeSet> interested_data_types_; absl::optional<DeviceInfo::PhoneAsASecurityKeyInfo> paask_info_; - - DISALLOW_COPY_AND_ASSIGN(TestLocalDeviceInfoProvider); }; // namespace class DeviceInfoSyncBridgeTest : public testing::Test,
diff --git a/components/sync_device_info/device_info_sync_client.h b/components/sync_device_info/device_info_sync_client.h index 51f25b4..1d10a4d 100644 --- a/components/sync_device_info/device_info_sync_client.h +++ b/components/sync_device_info/device_info_sync_client.h
@@ -17,6 +17,10 @@ class DeviceInfoSyncClient { public: DeviceInfoSyncClient(); + + DeviceInfoSyncClient(const DeviceInfoSyncClient&) = delete; + DeviceInfoSyncClient& operator=(const DeviceInfoSyncClient&) = delete; + virtual ~DeviceInfoSyncClient(); virtual std::string GetSigninScopedDeviceId() const = 0; @@ -40,9 +44,6 @@ // Returns whether a CrOS device has User Metric Analysis (UMA) enabled. // Returns false if method is called on non-CrOS device. virtual bool IsUmaEnabledOnCrOSDevice() const = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncClient); }; } // namespace syncer
diff --git a/components/sync_device_info/device_info_sync_service_impl.h b/components/sync_device_info/device_info_sync_service_impl.h index 13ee00e..198623a2 100644 --- a/components/sync_device_info/device_info_sync_service_impl.h +++ b/components/sync_device_info/device_info_sync_service_impl.h
@@ -37,6 +37,11 @@ std::unique_ptr<DeviceInfoPrefs> device_info_prefs, std::unique_ptr<DeviceInfoSyncClient> device_info_sync_client, SyncInvalidationsService* sync_invalidations_service); + + DeviceInfoSyncServiceImpl(const DeviceInfoSyncServiceImpl&) = delete; + DeviceInfoSyncServiceImpl& operator=(const DeviceInfoSyncServiceImpl&) = + delete; + ~DeviceInfoSyncServiceImpl() override; // DeviceInfoSyncService implementation. @@ -61,8 +66,6 @@ std::unique_ptr<DeviceInfoSyncBridge> bridge_; SyncInvalidationsService* const sync_invalidations_service_; - - DISALLOW_COPY_AND_ASSIGN(DeviceInfoSyncServiceImpl); }; } // namespace syncer
diff --git a/components/sync_device_info/fake_device_info_tracker.h b/components/sync_device_info/fake_device_info_tracker.h index 9e491b8..692f2c7 100644 --- a/components/sync_device_info/fake_device_info_tracker.h +++ b/components/sync_device_info/fake_device_info_tracker.h
@@ -22,6 +22,10 @@ class FakeDeviceInfoTracker : public DeviceInfoTracker { public: FakeDeviceInfoTracker(); + + FakeDeviceInfoTracker(const FakeDeviceInfoTracker&) = delete; + FakeDeviceInfoTracker& operator=(const FakeDeviceInfoTracker&) = delete; + ~FakeDeviceInfoTracker() override; // DeviceInfoTracker @@ -52,8 +56,6 @@ absl::optional<int> active_device_count_; // Registered observers, not owned. base::ObserverList<Observer, true>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(FakeDeviceInfoTracker); }; } // namespace syncer
diff --git a/components/sync_device_info/fake_local_device_info_provider.h b/components/sync_device_info/fake_local_device_info_provider.h index 8bc8cafd..61f4427f 100644 --- a/components/sync_device_info/fake_local_device_info_provider.h +++ b/components/sync_device_info/fake_local_device_info_provider.h
@@ -14,6 +14,11 @@ class FakeLocalDeviceInfoProvider : public LocalDeviceInfoProvider { public: FakeLocalDeviceInfoProvider(); + + FakeLocalDeviceInfoProvider(const FakeLocalDeviceInfoProvider&) = delete; + FakeLocalDeviceInfoProvider& operator=(const FakeLocalDeviceInfoProvider&) = + delete; + ~FakeLocalDeviceInfoProvider() override; // Overrides for LocalDeviceInfoProvider. @@ -29,8 +34,6 @@ DeviceInfo device_info_; bool ready_ = true; base::RepeatingClosureList closure_list_; - - DISALLOW_COPY_AND_ASSIGN(FakeLocalDeviceInfoProvider); }; } // namespace syncer
diff --git a/components/sync_device_info/local_device_info_provider_impl.h b/components/sync_device_info/local_device_info_provider_impl.h index cb49b72..ea8fdfb 100644 --- a/components/sync_device_info/local_device_info_provider_impl.h +++ b/components/sync_device_info/local_device_info_provider_impl.h
@@ -26,6 +26,11 @@ LocalDeviceInfoProviderImpl(version_info::Channel channel, const std::string& version, const DeviceInfoSyncClient* sync_client); + + LocalDeviceInfoProviderImpl(const LocalDeviceInfoProviderImpl&) = delete; + LocalDeviceInfoProviderImpl& operator=(const LocalDeviceInfoProviderImpl&) = + delete; + ~LocalDeviceInfoProviderImpl() override; // MutableLocalDeviceInfoProvider implementation. @@ -66,8 +71,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<LocalDeviceInfoProviderImpl> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(LocalDeviceInfoProviderImpl); }; } // namespace syncer
diff --git a/components/sync_device_info/local_device_info_provider_impl_unittest.cc b/components/sync_device_info/local_device_info_provider_impl_unittest.cc index 035ad8b..a96bc5b 100644 --- a/components/sync_device_info/local_device_info_provider_impl_unittest.cc +++ b/components/sync_device_info/local_device_info_provider_impl_unittest.cc
@@ -43,6 +43,10 @@ class MockDeviceInfoSyncClient : public DeviceInfoSyncClient { public: MockDeviceInfoSyncClient() = default; + + MockDeviceInfoSyncClient(const MockDeviceInfoSyncClient&) = delete; + MockDeviceInfoSyncClient& operator=(const MockDeviceInfoSyncClient&) = delete; + ~MockDeviceInfoSyncClient() = default; MOCK_METHOD(std::string, GetSigninScopedDeviceId, (), (const override)); @@ -64,9 +68,6 @@ (), (const override)); MOCK_METHOD(bool, IsUmaEnabledOnCrOSDevice, (), (const override)); - - private: - DISALLOW_COPY_AND_ASSIGN(MockDeviceInfoSyncClient); }; class LocalDeviceInfoProviderImplTest : public testing::Test {
diff --git a/components/sync_preferences/pref_model_associator.h b/components/sync_preferences/pref_model_associator.h index 965c441c..b1b69c5 100644 --- a/components/sync_preferences/pref_model_associator.h +++ b/components/sync_preferences/pref_model_associator.h
@@ -46,6 +46,10 @@ PrefModelAssociator(const PrefModelAssociatorClient* client, syncer::ModelType type, PersistentPrefStore* user_pref_store); + + PrefModelAssociator(const PrefModelAssociator&) = delete; + PrefModelAssociator& operator=(const PrefModelAssociator&) = delete; + ~PrefModelAssociator() override; // See description above field for details. @@ -230,8 +234,6 @@ PersistentPrefStore* const user_pref_store_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(PrefModelAssociator); }; } // namespace sync_preferences
diff --git a/components/sync_preferences/pref_model_associator_unittest.cc b/components/sync_preferences/pref_model_associator_unittest.cc index cee6dbf..b2aceb5 100644 --- a/components/sync_preferences/pref_model_associator_unittest.cc +++ b/components/sync_preferences/pref_model_associator_unittest.cc
@@ -29,6 +29,11 @@ class TestPrefModelAssociatorClient : public PrefModelAssociatorClient { public: TestPrefModelAssociatorClient() {} + + TestPrefModelAssociatorClient(const TestPrefModelAssociatorClient&) = delete; + TestPrefModelAssociatorClient& operator=( + const TestPrefModelAssociatorClient&) = delete; + ~TestPrefModelAssociatorClient() override {} // PrefModelAssociatorClient implementation. @@ -50,9 +55,6 @@ } return nullptr; } - - private: - DISALLOW_COPY_AND_ASSIGN(TestPrefModelAssociatorClient); }; class AbstractPreferenceMergeTest : public testing::Test {
diff --git a/components/sync_preferences/pref_service_mock_factory.h b/components/sync_preferences/pref_service_mock_factory.h index 57c25c6..b2d4ace 100644 --- a/components/sync_preferences/pref_service_mock_factory.h +++ b/components/sync_preferences/pref_service_mock_factory.h
@@ -14,10 +14,11 @@ class PrefServiceMockFactory : public PrefServiceSyncableFactory { public: PrefServiceMockFactory(); - ~PrefServiceMockFactory() override; - private: - DISALLOW_COPY_AND_ASSIGN(PrefServiceMockFactory); + PrefServiceMockFactory(const PrefServiceMockFactory&) = delete; + PrefServiceMockFactory& operator=(const PrefServiceMockFactory&) = delete; + + ~PrefServiceMockFactory() override; }; } // namespace sync_preferences
diff --git a/components/sync_preferences/pref_service_syncable.h b/components/sync_preferences/pref_service_syncable.h index 58e92f3..1be7485 100644 --- a/components/sync_preferences/pref_service_syncable.h +++ b/components/sync_preferences/pref_service_syncable.h
@@ -47,6 +47,10 @@ base::RepeatingCallback<void(PersistentPrefStore::PrefReadError)> read_error_callback, bool async); + + PrefServiceSyncable(const PrefServiceSyncable&) = delete; + PrefServiceSyncable& operator=(const PrefServiceSyncable&) = delete; + ~PrefServiceSyncable() override; // Creates an incognito copy of the pref service that shares most pref stores @@ -121,8 +125,6 @@ const scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_; base::ObserverList<PrefServiceSyncableObserver>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncable); }; } // namespace sync_preferences
diff --git a/components/sync_preferences/pref_service_syncable_factory.h b/components/sync_preferences/pref_service_syncable_factory.h index 3b8e47b..308314a 100644 --- a/components/sync_preferences/pref_service_syncable_factory.h +++ b/components/sync_preferences/pref_service_syncable_factory.h
@@ -31,6 +31,11 @@ class PrefServiceSyncableFactory : public PrefServiceFactory { public: PrefServiceSyncableFactory(); + + PrefServiceSyncableFactory(const PrefServiceSyncableFactory&) = delete; + PrefServiceSyncableFactory& operator=(const PrefServiceSyncableFactory&) = + delete; + ~PrefServiceSyncableFactory() override; // Set up policy pref stores using the given policy service and connector. @@ -48,8 +53,6 @@ private: PrefModelAssociatorClient* pref_model_associator_client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(PrefServiceSyncableFactory); }; } // namespace sync_preferences
diff --git a/components/sync_preferences/pref_service_syncable_unittest.cc b/components/sync_preferences/pref_service_syncable_unittest.cc index 4071093..4bce55d 100644 --- a/components/sync_preferences/pref_service_syncable_unittest.cc +++ b/components/sync_preferences/pref_service_syncable_unittest.cc
@@ -364,6 +364,11 @@ class TestPrefModelAssociatorClient : public PrefModelAssociatorClient { public: TestPrefModelAssociatorClient() {} + + TestPrefModelAssociatorClient(const TestPrefModelAssociatorClient&) = delete; + TestPrefModelAssociatorClient& operator=( + const TestPrefModelAssociatorClient&) = delete; + ~TestPrefModelAssociatorClient() override {} // PrefModelAssociatorClient implementation. @@ -387,8 +392,6 @@ private: bool is_dict_pref_ = true; - - DISALLOW_COPY_AND_ASSIGN(TestPrefModelAssociatorClient); }; class PrefServiceSyncableMergeTest : public testing::Test {
diff --git a/components/sync_preferences/testing_pref_service_syncable.h b/components/sync_preferences/testing_pref_service_syncable.h index fcbad54..55b37221 100644 --- a/components/sync_preferences/testing_pref_service_syncable.h +++ b/components/sync_preferences/testing_pref_service_syncable.h
@@ -40,15 +40,17 @@ TestingPrefStore* recommended_prefs, user_prefs::PrefRegistrySyncable* pref_registry, PrefNotifierImpl* pref_notifier); + + TestingPrefServiceSyncable(const TestingPrefServiceSyncable&) = delete; + TestingPrefServiceSyncable& operator=(const TestingPrefServiceSyncable&) = + delete; + ~TestingPrefServiceSyncable() override; // This is provided as a convenience; on a production PrefService // you would do all registrations before constructing it, passing it // a PrefRegistry via its constructor (or via e.g. PrefServiceFactory). user_prefs::PrefRegistrySyncable* registry(); - - private: - DISALLOW_COPY_AND_ASSIGN(TestingPrefServiceSyncable); }; } // namespace sync_preferences
diff --git a/components/sync_sessions/local_session_event_handler_impl.h b/components/sync_sessions/local_session_event_handler_impl.h index 2064f154..4406141 100644 --- a/components/sync_sessions/local_session_event_handler_impl.h +++ b/components/sync_sessions/local_session_event_handler_impl.h
@@ -35,13 +35,14 @@ class WriteBatch { public: WriteBatch(); + + WriteBatch(const WriteBatch&) = delete; + WriteBatch& operator=(const WriteBatch&) = delete; + virtual ~WriteBatch(); virtual void Delete(int tab_node_id) = 0; virtual void Put(std::unique_ptr<sync_pb::SessionSpecifics> specifics) = 0; virtual void Commit() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(WriteBatch); }; class Delegate { @@ -61,6 +62,11 @@ LocalSessionEventHandlerImpl(Delegate* delegate, SyncSessionsClient* sessions_client, SyncedSessionTracker* session_tracker); + + LocalSessionEventHandlerImpl(const LocalSessionEventHandlerImpl&) = delete; + LocalSessionEventHandlerImpl& operator=(const LocalSessionEventHandlerImpl&) = + delete; + ~LocalSessionEventHandlerImpl() override; // LocalSessionEventHandler implementation. @@ -99,8 +105,6 @@ SyncedSessionTracker* const session_tracker_; std::string current_session_tag_; - - DISALLOW_COPY_AND_ASSIGN(LocalSessionEventHandlerImpl); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/local_session_event_router.h b/components/sync_sessions/local_session_event_router.h index 248f7dc..42d19adf 100644 --- a/components/sync_sessions/local_session_event_router.h +++ b/components/sync_sessions/local_session_event_router.h
@@ -18,6 +18,9 @@ // via ProcessSyncChanges, just with a more granular breakdown. class LocalSessionEventHandler { public: + LocalSessionEventHandler(const LocalSessionEventHandler&) = delete; + LocalSessionEventHandler& operator=(const LocalSessionEventHandler&) = delete; + virtual ~LocalSessionEventHandler() {} // Called when asynchronous session restore has completed. On Android, this @@ -31,9 +34,6 @@ protected: LocalSessionEventHandler() {} - - private: - DISALLOW_COPY_AND_ASSIGN(LocalSessionEventHandler); }; // The LocalSessionEventRouter is responsible for hooking itself up to various @@ -41,15 +41,15 @@ // events to a handler as defined in the LocalSessionEventHandler contract. class LocalSessionEventRouter { public: + LocalSessionEventRouter(const LocalSessionEventRouter&) = delete; + LocalSessionEventRouter& operator=(const LocalSessionEventRouter&) = delete; + virtual ~LocalSessionEventRouter() {} virtual void StartRoutingTo(LocalSessionEventHandler* handler) = 0; virtual void Stop() = 0; protected: LocalSessionEventRouter() {} - - private: - DISALLOW_COPY_AND_ASSIGN(LocalSessionEventRouter); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/open_tabs_ui_delegate_impl.h b/components/sync_sessions/open_tabs_ui_delegate_impl.h index 8b442cb..8e681dd 100644 --- a/components/sync_sessions/open_tabs_ui_delegate_impl.h +++ b/components/sync_sessions/open_tabs_ui_delegate_impl.h
@@ -27,6 +27,10 @@ const SyncSessionsClient* sessions_client, const SyncedSessionTracker* session_tracker, const DeleteForeignSessionCallback& delete_foreign_session_cb); + + OpenTabsUIDelegateImpl(const OpenTabsUIDelegateImpl&) = delete; + OpenTabsUIDelegateImpl& operator=(const OpenTabsUIDelegateImpl&) = delete; + ~OpenTabsUIDelegateImpl() override; // OpenTabsUIDelegate implementation. @@ -48,8 +52,6 @@ const SyncSessionsClient* const sessions_client_; const SyncedSessionTracker* session_tracker_; DeleteForeignSessionCallback delete_foreign_session_cb_; - - DISALLOW_COPY_AND_ASSIGN(OpenTabsUIDelegateImpl); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/proxy_tabs_data_type_controller.h b/components/sync_sessions/proxy_tabs_data_type_controller.h index ffa39c6..7d3a091 100644 --- a/components/sync_sessions/proxy_tabs_data_type_controller.h +++ b/components/sync_sessions/proxy_tabs_data_type_controller.h
@@ -20,6 +20,11 @@ // |state_changed_cb| can be used to listen to state changes. explicit ProxyTabsDataTypeController( const base::RepeatingCallback<void(State)>& state_changed_cb); + + ProxyTabsDataTypeController(const ProxyTabsDataTypeController&) = delete; + ProxyTabsDataTypeController& operator=(const ProxyTabsDataTypeController&) = + delete; + ~ProxyTabsDataTypeController() override; // DataTypeController interface. @@ -39,8 +44,6 @@ private: const base::RepeatingCallback<void(State)> state_changed_cb_; State state_; - - DISALLOW_COPY_AND_ASSIGN(ProxyTabsDataTypeController); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/session_model_type_controller.h b/components/sync_sessions/session_model_type_controller.h index 1985af89..5512dae 100644 --- a/components/sync_sessions/session_model_type_controller.h +++ b/components/sync_sessions/session_model_type_controller.h
@@ -26,6 +26,11 @@ syncer::SyncService* sync_service, PrefService* pref_service, std::unique_ptr<syncer::ModelTypeControllerDelegate> delegate); + + SessionModelTypeController(const SessionModelTypeController&) = delete; + SessionModelTypeController& operator=(const SessionModelTypeController&) = + delete; + ~SessionModelTypeController() override; // DataTypeController overrides. @@ -38,8 +43,6 @@ PrefService* const pref_service_; PrefChangeRegistrar pref_registrar_; - - DISALLOW_COPY_AND_ASSIGN(SessionModelTypeController); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/session_store.h b/components/sync_sessions/session_store.h index b58ba5a4..3d84625 100644 --- a/components/sync_sessions/session_store.h +++ b/components/sync_sessions/session_store.h
@@ -83,6 +83,10 @@ CommitCallback commit_cb, syncer::OnceModelErrorHandler error_handler, SyncedSessionTracker* session_tracker); + + WriteBatch(const WriteBatch&) = delete; + WriteBatch& operator=(const WriteBatch&) = delete; + ~WriteBatch(); // Most mutations below return storage keys. @@ -107,8 +111,6 @@ CommitCallback commit_cb_; syncer::OnceModelErrorHandler error_handler_; SyncedSessionTracker* const session_tracker_; - - DISALLOW_COPY_AND_ASSIGN(WriteBatch); }; ~SessionStore();
diff --git a/components/sync_sessions/session_sync_bridge.h b/components/sync_sessions/session_sync_bridge.h index e2246c33..4f8ed3c 100644 --- a/components/sync_sessions/session_sync_bridge.h +++ b/components/sync_sessions/session_sync_bridge.h
@@ -42,6 +42,10 @@ const base::RepeatingClosure& notify_foreign_session_updated_cb, SyncSessionsClient* sessions_client, std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor); + + SessionSyncBridge(const SessionSyncBridge&) = delete; + SessionSyncBridge& operator=(const SessionSyncBridge&) = delete; + ~SessionSyncBridge() override; SessionsGlobalIdMapper* GetGlobalIdMapper(); @@ -114,8 +118,6 @@ absl::optional<SyncingState> syncing_; base::WeakPtrFactory<SessionSyncBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SessionSyncBridge); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/session_sync_prefs.h b/components/sync_sessions/session_sync_prefs.h index 29ba6fb..16e47bf 100644 --- a/components/sync_sessions/session_sync_prefs.h +++ b/components/sync_sessions/session_sync_prefs.h
@@ -20,6 +20,10 @@ static void RegisterProfilePrefs(PrefRegistrySimple* registry); explicit SessionSyncPrefs(PrefService* pref_service); + + SessionSyncPrefs(const SessionSyncPrefs&) = delete; + SessionSyncPrefs& operator=(const SessionSyncPrefs&) = delete; + ~SessionSyncPrefs(); std::string GetLegacySyncSessionsGUID() const; @@ -29,8 +33,6 @@ private: PrefService* const pref_service_; - - DISALLOW_COPY_AND_ASSIGN(SessionSyncPrefs); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/session_sync_service.h b/components/sync_sessions/session_sync_service.h index 1bf2490..682be6e 100644 --- a/components/sync_sessions/session_sync_service.h +++ b/components/sync_sessions/session_sync_service.h
@@ -27,6 +27,10 @@ class SessionSyncService : public KeyedService { public: SessionSyncService(); + + SessionSyncService(const SessionSyncService&) = delete; + SessionSyncService& operator=(const SessionSyncService&) = delete; + ~SessionSyncService() override; virtual syncer::GlobalIdMapper* GetGlobalIdMapper() const = 0; @@ -46,9 +50,6 @@ // GetOpenTabsUIDelegate() returns null or not. virtual void ProxyTabsStateChanged( syncer::DataTypeController::State state) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SessionSyncService); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/session_sync_service_impl.h b/components/sync_sessions/session_sync_service_impl.h index a91e71c..806b0375 100644 --- a/components/sync_sessions/session_sync_service_impl.h +++ b/components/sync_sessions/session_sync_service_impl.h
@@ -23,6 +23,10 @@ public: SessionSyncServiceImpl(version_info::Channel channel, std::unique_ptr<SyncSessionsClient> sessions_client); + + SessionSyncServiceImpl(const SessionSyncServiceImpl&) = delete; + SessionSyncServiceImpl& operator=(const SessionSyncServiceImpl&) = delete; + ~SessionSyncServiceImpl() override; syncer::GlobalIdMapper* GetGlobalIdMapper() const override; @@ -56,8 +60,6 @@ std::unique_ptr<SessionSyncBridge> bridge_; base::RepeatingClosureList foreign_sessions_changed_closure_list_; - - DISALLOW_COPY_AND_ASSIGN(SessionSyncServiceImpl); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/sessions_global_id_mapper.h b/components/sync_sessions/sessions_global_id_mapper.h index 1eb8566e..0cb4f747 100644 --- a/components/sync_sessions/sessions_global_id_mapper.h +++ b/components/sync_sessions/sessions_global_id_mapper.h
@@ -17,6 +17,10 @@ class SessionsGlobalIdMapper : public syncer::GlobalIdMapper { public: SessionsGlobalIdMapper(); + + SessionsGlobalIdMapper(const SessionsGlobalIdMapper&) = delete; + SessionsGlobalIdMapper& operator=(const SessionsGlobalIdMapper&) = delete; + ~SessionsGlobalIdMapper(); // GlobalIdMapper implementation. @@ -31,8 +35,6 @@ std::map<int64_t, int> global_to_unique_; std::map<int, int64_t> unique_to_current_global_; std::vector<syncer::GlobalIdChange> global_id_change_observers_; - - DISALLOW_COPY_AND_ASSIGN(SessionsGlobalIdMapper); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/sync_sessions_client.h b/components/sync_sessions/sync_sessions_client.h index 3933f6a..697d706 100644 --- a/components/sync_sessions/sync_sessions_client.h +++ b/components/sync_sessions/sync_sessions_client.h
@@ -24,6 +24,10 @@ class SyncSessionsClient { public: SyncSessionsClient(); + + SyncSessionsClient(const SyncSessionsClient&) = delete; + SyncSessionsClient& operator=(const SyncSessionsClient&) = delete; + virtual ~SyncSessionsClient(); // Getters for services that sessions depends on. @@ -50,9 +54,6 @@ // Returns a LocalSessionEventRouter instance that is customized for the // embedder's context. virtual LocalSessionEventRouter* GetLocalSessionEventRouter() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SyncSessionsClient); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/synced_session_tracker.h b/components/sync_sessions/synced_session_tracker.h index 4afb32f..c972227 100644 --- a/components/sync_sessions/synced_session_tracker.h +++ b/components/sync_sessions/synced_session_tracker.h
@@ -47,6 +47,10 @@ }; explicit SyncedSessionTracker(SyncSessionsClient* sessions_client); + + SyncedSessionTracker(const SyncedSessionTracker&) = delete; + SyncedSessionTracker& operator=(const SyncedSessionTracker&) = delete; + ~SyncedSessionTracker(); // **** Synced session/tab query methods. **** @@ -290,8 +294,6 @@ // The tag for this machine's local session, so we can distinguish the foreign // sessions. std::string local_session_tag_; - - DISALLOW_COPY_AND_ASSIGN(SyncedSessionTracker); }; // Helper function to load and add window or tab data from synced specifics to
diff --git a/components/sync_sessions/synced_window_delegates_getter.h b/components/sync_sessions/synced_window_delegates_getter.h index c1834b9f..18eff2d 100644 --- a/components/sync_sessions/synced_window_delegates_getter.h +++ b/components/sync_sessions/synced_window_delegates_getter.h
@@ -22,6 +22,11 @@ std::map<SessionID, const SyncedWindowDelegate*>; SyncedWindowDelegatesGetter(); + + SyncedWindowDelegatesGetter(const SyncedWindowDelegatesGetter&) = delete; + SyncedWindowDelegatesGetter& operator=(const SyncedWindowDelegatesGetter&) = + delete; + virtual ~SyncedWindowDelegatesGetter(); // Returns all SyncedWindowDelegate instances. @@ -29,9 +34,6 @@ // Find a SyncedWindowDelegate given its window's id. virtual const SyncedWindowDelegate* FindById(SessionID id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/tab_node_pool.h b/components/sync_sessions/tab_node_pool.h index 39f1c5b..4d64d18 100644 --- a/components/sync_sessions/tab_node_pool.h +++ b/components/sync_sessions/tab_node_pool.h
@@ -35,6 +35,10 @@ class TabNodePool { public: TabNodePool(); + + TabNodePool(const TabNodePool&) = delete; + TabNodePool& operator=(const TabNodePool&) = delete; + ~TabNodePool(); // If free nodes > kFreeNodesHighWatermark, delete all free nodes until @@ -112,8 +116,6 @@ // that are not used within the range [0..max_used_tab_node_id_). This // allows AssociateWithFreeTabNode() to return a compact distribution of IDs. std::set<int> missing_nodes_pool_; - - DISALLOW_COPY_AND_ASSIGN(TabNodePool); }; } // namespace sync_sessions
diff --git a/components/sync_sessions/test_synced_window_delegates_getter.h b/components/sync_sessions/test_synced_window_delegates_getter.h index f373c00b..a621a22 100644 --- a/components/sync_sessions/test_synced_window_delegates_getter.h +++ b/components/sync_sessions/test_synced_window_delegates_getter.h
@@ -29,6 +29,10 @@ SessionID window_id, SessionID tab_id, const base::RepeatingCallback<void(SyncedTabDelegate*)>& notify_cb); + + TestSyncedTabDelegate(const TestSyncedTabDelegate&) = delete; + TestSyncedTabDelegate& operator=(const TestSyncedTabDelegate&) = delete; + ~TestSyncedTabDelegate() override; void Navigate(const std::string& url, @@ -78,8 +82,6 @@ std::vector<std::unique_ptr<const sessions::SerializedNavigationEntry>> entries_; std::vector<std::string> page_language_per_index_; - - DISALLOW_COPY_AND_ASSIGN(TestSyncedTabDelegate); }; // A placeholder delegate. These delegates have no WebContents, simulating a tab @@ -89,6 +91,10 @@ class PlaceholderTabDelegate : public SyncedTabDelegate { public: explicit PlaceholderTabDelegate(SessionID tab_id); + + PlaceholderTabDelegate(const PlaceholderTabDelegate&) = delete; + PlaceholderTabDelegate& operator=(const PlaceholderTabDelegate&) = delete; + ~PlaceholderTabDelegate() override; // SyncedTabDelegate overrides. @@ -118,14 +124,16 @@ private: const SessionID tab_id_; - - DISALLOW_COPY_AND_ASSIGN(PlaceholderTabDelegate); }; class TestSyncedWindowDelegate : public SyncedWindowDelegate { public: explicit TestSyncedWindowDelegate(SessionID window_id, sync_pb::SessionWindow_BrowserType type); + + TestSyncedWindowDelegate(const TestSyncedWindowDelegate&) = delete; + TestSyncedWindowDelegate& operator=(const TestSyncedWindowDelegate&) = delete; + ~TestSyncedWindowDelegate() override; // |delegate| must not be nullptr and must outlive this object. @@ -154,13 +162,17 @@ std::vector<SyncedTabDelegate*> tab_delegates_; bool is_session_restore_in_progress_; - - DISALLOW_COPY_AND_ASSIGN(TestSyncedWindowDelegate); }; class TestSyncedWindowDelegatesGetter : public SyncedWindowDelegatesGetter { public: TestSyncedWindowDelegatesGetter(); + + TestSyncedWindowDelegatesGetter(const TestSyncedWindowDelegatesGetter&) = + delete; + TestSyncedWindowDelegatesGetter& operator=( + const TestSyncedWindowDelegatesGetter&) = delete; + ~TestSyncedWindowDelegatesGetter() override; void ResetWindows(); @@ -198,8 +210,6 @@ std::vector<std::unique_ptr<TestSyncedWindowDelegate>> windows_; std::vector<std::unique_ptr<TestSyncedTabDelegate>> tabs_; DummyRouter router_; - - DISALLOW_COPY_AND_ASSIGN(TestSyncedWindowDelegatesGetter); }; } // namespace sync_sessions
diff --git a/components/sync_user_events/fake_user_event_service.h b/components/sync_user_events/fake_user_event_service.h index 64ea7c1..a4ed7e5 100644 --- a/components/sync_user_events/fake_user_event_service.h +++ b/components/sync_user_events/fake_user_event_service.h
@@ -20,6 +20,10 @@ class FakeUserEventService : public UserEventService { public: FakeUserEventService(); + + FakeUserEventService(const FakeUserEventService&) = delete; + FakeUserEventService& operator=(const FakeUserEventService&) = delete; + ~FakeUserEventService() override; // UserEventService implementation. @@ -34,8 +38,6 @@ private: std::vector<sync_pb::UserEventSpecifics> recorded_user_events_; FakeModelTypeControllerDelegate fake_controller_delegate_; - - DISALLOW_COPY_AND_ASSIGN(FakeUserEventService); }; } // namespace syncer
diff --git a/components/sync_user_events/no_op_user_event_service.h b/components/sync_user_events/no_op_user_event_service.h index 1f385af..cbcd46c 100644 --- a/components/sync_user_events/no_op_user_event_service.h +++ b/components/sync_user_events/no_op_user_event_service.h
@@ -17,6 +17,10 @@ class NoOpUserEventService : public UserEventService { public: NoOpUserEventService(); + + NoOpUserEventService(const NoOpUserEventService&) = delete; + NoOpUserEventService& operator=(const NoOpUserEventService&) = delete; + ~NoOpUserEventService() override; // UserEventService implementation. @@ -25,9 +29,6 @@ void RecordUserEvent(const sync_pb::UserEventSpecifics& specifics) override; base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate() override; - - private: - DISALLOW_COPY_AND_ASSIGN(NoOpUserEventService); }; } // namespace syncer
diff --git a/components/sync_user_events/user_event_model_type_controller.h b/components/sync_user_events/user_event_model_type_controller.h index 8585dd6..27b8e97 100644 --- a/components/sync_user_events/user_event_model_type_controller.h +++ b/components/sync_user_events/user_event_model_type_controller.h
@@ -22,6 +22,11 @@ UserEventModelTypeController( SyncService* sync_service, std::unique_ptr<ModelTypeControllerDelegate> delegate_for_full_sync_mode); + + UserEventModelTypeController(const UserEventModelTypeController&) = delete; + UserEventModelTypeController& operator=(const UserEventModelTypeController&) = + delete; + ~UserEventModelTypeController() override; // syncer::DataTypeController implementation. @@ -33,8 +38,6 @@ private: SyncService* sync_service_; - - DISALLOW_COPY_AND_ASSIGN(UserEventModelTypeController); }; } // namespace syncer
diff --git a/components/sync_user_events/user_event_service.h b/components/sync_user_events/user_event_service.h index c8d5b93..ac7d724 100644 --- a/components/sync_user_events/user_event_service.h +++ b/components/sync_user_events/user_event_service.h
@@ -19,6 +19,10 @@ class UserEventService : public KeyedService { public: UserEventService() = default; + + UserEventService(const UserEventService&) = delete; + UserEventService& operator=(const UserEventService&) = delete; + ~UserEventService() override = default; // Records a given event to be reported. Relevant settings will be checked to @@ -32,9 +36,6 @@ // Returns the underlying Sync integration point. virtual base::WeakPtr<syncer::ModelTypeControllerDelegate> GetControllerDelegate() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(UserEventService); }; } // namespace syncer
diff --git a/components/sync_user_events/user_event_service_impl.h b/components/sync_user_events/user_event_service_impl.h index 968252e..5fe7ff2d 100644 --- a/components/sync_user_events/user_event_service_impl.h +++ b/components/sync_user_events/user_event_service_impl.h
@@ -20,6 +20,10 @@ class UserEventServiceImpl : public UserEventService { public: explicit UserEventServiceImpl(std::unique_ptr<UserEventSyncBridge> bridge); + + UserEventServiceImpl(const UserEventServiceImpl&) = delete; + UserEventServiceImpl& operator=(const UserEventServiceImpl&) = delete; + ~UserEventServiceImpl() override; // KeyedService implementation. @@ -42,8 +46,6 @@ // restart it will be regenerated. This can be attached to events to know // which events came from the same session. uint64_t session_id_; - - DISALLOW_COPY_AND_ASSIGN(UserEventServiceImpl); }; } // namespace syncer
diff --git a/components/sync_user_events/user_event_sync_bridge.h b/components/sync_user_events/user_event_sync_bridge.h index 97a6485..e8a1576 100644 --- a/components/sync_user_events/user_event_sync_bridge.h +++ b/components/sync_user_events/user_event_sync_bridge.h
@@ -28,6 +28,10 @@ OnceModelTypeStoreFactory store_factory, std::unique_ptr<ModelTypeChangeProcessor> change_processor, GlobalIdMapper* global_id_mapper); + + UserEventSyncBridge(const UserEventSyncBridge&) = delete; + UserEventSyncBridge& operator=(const UserEventSyncBridge&) = delete; + ~UserEventSyncBridge() override; // ModelTypeSyncBridge implementation. @@ -81,8 +85,6 @@ GlobalIdMapper* global_id_mapper_; base::WeakPtrFactory<UserEventSyncBridge> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UserEventSyncBridge); }; } // namespace syncer
diff --git a/components/system_media_controls/linux/system_media_controls_linux.h b/components/system_media_controls/linux/system_media_controls_linux.h index 7fbbfdf..6eebaf4 100644 --- a/components/system_media_controls/linux/system_media_controls_linux.h +++ b/components/system_media_controls/linux/system_media_controls_linux.h
@@ -42,6 +42,10 @@ : public SystemMediaControls { public: explicit SystemMediaControlsLinux(const std::string& product_name); + + SystemMediaControlsLinux(const SystemMediaControlsLinux&) = delete; + SystemMediaControlsLinux& operator=(const SystemMediaControlsLinux&) = delete; + ~SystemMediaControlsLinux() override; // Starts the DBus service. @@ -121,8 +125,6 @@ bool service_ready_ = false; base::ObserverList<SystemMediaControlsObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(SystemMediaControlsLinux); }; } // namespace internal
diff --git a/components/system_media_controls/linux/system_media_controls_linux_unittest.cc b/components/system_media_controls/linux/system_media_controls_linux_unittest.cc index a2ab8e4..121876b 100644 --- a/components/system_media_controls/linux/system_media_controls_linux_unittest.cc +++ b/components/system_media_controls/linux/system_media_controls_linux_unittest.cc
@@ -57,6 +57,11 @@ public: SystemMediaControlsLinuxTest() : task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {} + + SystemMediaControlsLinuxTest(const SystemMediaControlsLinuxTest&) = delete; + SystemMediaControlsLinuxTest& operator=(const SystemMediaControlsLinuxTest&) = + delete; + ~SystemMediaControlsLinuxTest() override = default; void SetUp() override { StartMprisServiceAndWaitForReady(); } @@ -175,8 +180,6 @@ base::flat_map<std::string, dbus::ExportedObject::MethodCallCallback> player_interface_exported_methods_; - - DISALLOW_COPY_AND_ASSIGN(SystemMediaControlsLinuxTest); }; TEST_F(SystemMediaControlsLinuxTest, ObserverNotifiedOfServiceReadyWhenAdded) {
diff --git a/components/system_media_controls/mac/remote_command_center_delegate.h b/components/system_media_controls/mac/remote_command_center_delegate.h index 741f8423..f52d04f 100644 --- a/components/system_media_controls/mac/remote_command_center_delegate.h +++ b/components/system_media_controls/mac/remote_command_center_delegate.h
@@ -25,6 +25,11 @@ class API_AVAILABLE(macos(10.12.2)) RemoteCommandCenterDelegate { public: RemoteCommandCenterDelegate(); + + RemoteCommandCenterDelegate(const RemoteCommandCenterDelegate&) = delete; + RemoteCommandCenterDelegate& operator=(const RemoteCommandCenterDelegate&) = + delete; + ~RemoteCommandCenterDelegate(); // Part of the implementation of SystemMediaControls. @@ -61,8 +66,6 @@ remote_command_center_delegate_cocoa_; base::ObserverList<SystemMediaControlsObserver> observers_; base::flat_set<Command> enabled_commands_; - - DISALLOW_COPY_AND_ASSIGN(RemoteCommandCenterDelegate); }; } // namespace internal
diff --git a/components/system_media_controls/mock_system_media_controls.h b/components/system_media_controls/mock_system_media_controls.h index 43b1d31..274455a 100644 --- a/components/system_media_controls/mock_system_media_controls.h +++ b/components/system_media_controls/mock_system_media_controls.h
@@ -19,6 +19,10 @@ class MockSystemMediaControls : public SystemMediaControls { public: MockSystemMediaControls(); + + MockSystemMediaControls(const MockSystemMediaControls&) = delete; + MockSystemMediaControls& operator=(const MockSystemMediaControls&) = delete; + ~MockSystemMediaControls() override; // SystemMediaControls implementation. @@ -39,9 +43,6 @@ MOCK_METHOD0(ClearThumbnail, void()); MOCK_METHOD0(ClearMetadata, void()); MOCK_METHOD0(UpdateDisplay, void()); - - private: - DISALLOW_COPY_AND_ASSIGN(MockSystemMediaControls); }; } // namespace testing
diff --git a/components/system_media_controls/win/system_media_controls_win.h b/components/system_media_controls/win/system_media_controls_win.h index 03fb54c..ef509997 100644 --- a/components/system_media_controls/win/system_media_controls_win.h +++ b/components/system_media_controls/win/system_media_controls_win.h
@@ -23,6 +23,10 @@ class SystemMediaControlsWin : public SystemMediaControls { public: SystemMediaControlsWin(); + + SystemMediaControlsWin(const SystemMediaControlsWin&) = delete; + SystemMediaControlsWin& operator=(const SystemMediaControlsWin&) = delete; + ~SystemMediaControlsWin() override; static SystemMediaControlsWin* GetInstance(); @@ -97,8 +101,6 @@ bool initialized_ = false; base::ObserverList<SystemMediaControlsObserver> observers_; - - DISALLOW_COPY_AND_ASSIGN(SystemMediaControlsWin); }; } // namespace internal
diff --git a/components/thin_webview/internal/compositor_view_impl.h b/components/thin_webview/internal/compositor_view_impl.h index 509f57a22f..44e7284 100644 --- a/components/thin_webview/internal/compositor_view_impl.h +++ b/components/thin_webview/internal/compositor_view_impl.h
@@ -37,6 +37,10 @@ jobject obj, ui::WindowAndroid* window_android, int64_t java_background_color); + + CompositorViewImpl(const CompositorViewImpl&) = delete; + CompositorViewImpl& operator=(const CompositorViewImpl&) = delete; + ~CompositorViewImpl() override; void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& object); @@ -68,8 +72,6 @@ scoped_refptr<cc::SolidColorLayer> root_layer_; int current_surface_format_; - - DISALLOW_COPY_AND_ASSIGN(CompositorViewImpl); }; } // namespace android
diff --git a/components/thin_webview/internal/thin_webview.h b/components/thin_webview/internal/thin_webview.h index f99e7568..cad8dff 100644 --- a/components/thin_webview/internal/thin_webview.h +++ b/components/thin_webview/internal/thin_webview.h
@@ -29,6 +29,10 @@ jobject obj, CompositorView* compositor_view, ui::WindowAndroid* window_android); + + ThinWebView(const ThinWebView&) = delete; + ThinWebView& operator=(const ThinWebView&) = delete; + ~ThinWebView() override; void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& object); @@ -61,8 +65,6 @@ std::unique_ptr<web_contents_delegate_android::WebContentsDelegateAndroid> web_contents_delegate_; gfx::Size view_size_; - - DISALLOW_COPY_AND_ASSIGN(ThinWebView); }; } // namespace android
diff --git a/components/thin_webview/thin_webview_initializer.h b/components/thin_webview/thin_webview_initializer.h index 0d6607b..10800e3 100644 --- a/components/thin_webview/thin_webview_initializer.h +++ b/components/thin_webview/thin_webview_initializer.h
@@ -21,12 +21,13 @@ static ThinWebViewInitializer* GetInstance(); ThinWebViewInitializer() = default; + + ThinWebViewInitializer(const ThinWebViewInitializer&) = delete; + ThinWebViewInitializer& operator=(const ThinWebViewInitializer&) = delete; + ~ThinWebViewInitializer() = default; virtual void AttachTabHelpers(content::WebContents* web_contents) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(ThinWebViewInitializer); }; } // namespace android
diff --git a/components/tracing/test/perf_test_helpers.h b/components/tracing/test/perf_test_helpers.h index 7daac09..b5ba54c 100644 --- a/components/tracing/test/perf_test_helpers.h +++ b/components/tracing/test/perf_test_helpers.h
@@ -20,13 +20,15 @@ class ScopedStopwatch { public: ScopedStopwatch(const std::string& metric); + + ScopedStopwatch(const ScopedStopwatch&) = delete; + ScopedStopwatch& operator=(const ScopedStopwatch&) = delete; + ~ScopedStopwatch(); private: base::TimeTicks begin_; const std::string metric_; - - DISALLOW_COPY_AND_ASSIGN(ScopedStopwatch); }; // Measure median time of loop iterations. @@ -41,6 +43,10 @@ class IterableStopwatch { public: IterableStopwatch(const std::string& metric); + + IterableStopwatch(const IterableStopwatch&) = delete; + IterableStopwatch& operator=(const IterableStopwatch&) = delete; + ~IterableStopwatch(); void NextLap(); @@ -49,8 +55,6 @@ base::TimeTicks begin_; std::vector<double> laps_; const std::string metric_; - - DISALLOW_COPY_AND_ASSIGN(IterableStopwatch); }; } // namespace tracing
diff --git a/components/translate/content/browser/content_translate_driver.h b/components/translate/content/browser/content_translate_driver.h index b314e62..2223918 100644 --- a/components/translate/content/browser/content_translate_driver.h +++ b/components/translate/content/browser/content_translate_driver.h
@@ -60,6 +60,10 @@ content::NavigationController* nav_controller, language::UrlLanguageHistogram* url_language_histogram, TranslateModelService* translate_model_service); + + ContentTranslateDriver(const ContentTranslateDriver&) = delete; + ContentTranslateDriver& operator=(const ContentTranslateDriver&) = delete; + ~ContentTranslateDriver() override; // Adds or removes observers. @@ -180,8 +184,6 @@ TranslateModelService* const translate_model_service_; base::WeakPtrFactory<ContentTranslateDriver> weak_pointer_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ContentTranslateDriver); }; } // namespace translate
diff --git a/components/translate/content/browser/per_frame_content_translate_driver.h b/components/translate/content/browser/per_frame_content_translate_driver.h index 83a276c8..56e9b70 100644 --- a/components/translate/content/browser/per_frame_content_translate_driver.h +++ b/components/translate/content/browser/per_frame_content_translate_driver.h
@@ -43,6 +43,12 @@ content::WebContents& web_contents, content::NavigationController* nav_controller, language::UrlLanguageHistogram* url_language_histogram); + + PerFrameContentTranslateDriver(const PerFrameContentTranslateDriver&) = + delete; + PerFrameContentTranslateDriver& operator=( + const PerFrameContentTranslateDriver&) = delete; + ~PerFrameContentTranslateDriver() override; // TranslateDriver methods. @@ -155,8 +161,6 @@ base::WeakPtrFactory<PerFrameContentTranslateDriver> weak_pointer_factory_{ this}; - - DISALLOW_COPY_AND_ASSIGN(PerFrameContentTranslateDriver); }; } // namespace translate
diff --git a/components/translate/content/browser/translate_waiter.h b/components/translate/content/browser/translate_waiter.h index ea73e65..442d61c 100644 --- a/components/translate/content/browser/translate_waiter.h +++ b/components/translate/content/browser/translate_waiter.h
@@ -29,6 +29,10 @@ TranslateWaiter(ContentTranslateDriver* translate_driver, WaitEvent wait_event); + + TranslateWaiter(const TranslateWaiter&) = delete; + TranslateWaiter& operator=(const TranslateWaiter&) = delete; + ~TranslateWaiter() override; // Blocks until an observer function matching |wait_event_| is invoked, or @@ -57,8 +61,6 @@ &ContentTranslateDriver::RemoveTranslationObserver> scoped_translation_observation_{this}; base::RunLoop run_loop_; - - DISALLOW_COPY_AND_ASSIGN(TranslateWaiter); }; } // namespace translate
diff --git a/components/translate/content/renderer/per_frame_translate_agent.h b/components/translate/content/renderer/per_frame_translate_agent.h index 449b350..21ed285 100644 --- a/components/translate/content/renderer/per_frame_translate_agent.h +++ b/components/translate/content/renderer/per_frame_translate_agent.h
@@ -29,6 +29,10 @@ PerFrameTranslateAgent(content::RenderFrame* render_frame, int world_id, blink::AssociatedInterfaceRegistry* registry); + + PerFrameTranslateAgent(const PerFrameTranslateAgent&) = delete; + PerFrameTranslateAgent& operator=(const PerFrameTranslateAgent&) = delete; + ~PerFrameTranslateAgent() override; // mojom::TranslateAgent implementation. @@ -150,8 +154,6 @@ // Method factory used to make calls to TranslateFrameImpl. base::WeakPtrFactory<PerFrameTranslateAgent> weak_method_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PerFrameTranslateAgent); }; } // namespace translate
diff --git a/components/translate/content/renderer/translate_agent.h b/components/translate/content/renderer/translate_agent.h index facab7d..d8868b1c 100644 --- a/components/translate/content/renderer/translate_agent.h +++ b/components/translate/content/renderer/translate_agent.h
@@ -36,6 +36,10 @@ TranslateAgent(content::RenderFrame* render_frame, int world_id, const std::string& extension_scheme); + + TranslateAgent(const TranslateAgent&) = delete; + TranslateAgent& operator=(const TranslateAgent&) = delete; + ~TranslateAgent() override; // content::RenderFrameObserver implementation. @@ -200,8 +204,6 @@ // Weak pointer factory used to provide references to the translate host. base::WeakPtrFactory<TranslateAgent> weak_pointer_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TranslateAgent); }; } // namespace translate
diff --git a/components/translate/core/browser/language_state.h b/components/translate/core/browser/language_state.h index 8fccdb2..570e1d92 100644 --- a/components/translate/core/browser/language_state.h +++ b/components/translate/core/browser/language_state.h
@@ -24,6 +24,10 @@ class LanguageState { public: explicit LanguageState(TranslateDriver* driver); + + LanguageState(const LanguageState&) = delete; + LanguageState& operator=(const LanguageState&) = delete; + ~LanguageState(); // Should be called when the page did a new navigation (whether it is a main @@ -156,8 +160,6 @@ // Target language set by client. std::string predefined_target_language_; - - DISALLOW_COPY_AND_ASSIGN(LanguageState); }; } // namespace translate
diff --git a/components/translate/core/browser/mock_translate_ranker.h b/components/translate/core/browser/mock_translate_ranker.h index c2aa345c..f5ad33b 100644 --- a/components/translate/core/browser/mock_translate_ranker.h +++ b/components/translate/core/browser/mock_translate_ranker.h
@@ -23,6 +23,10 @@ class MockTranslateRanker : public TranslateRanker { public: MockTranslateRanker(); + + MockTranslateRanker(const MockTranslateRanker&) = delete; + MockTranslateRanker& operator=(const MockTranslateRanker&) = delete; + ~MockTranslateRanker() override; void set_is_logging_enabled(bool val) { is_logging_enabled_ = val; } @@ -63,8 +67,6 @@ bool is_decision_override_enabled_ = false; bool model_version_ = 0; bool should_offer_translation_ = true; - - DISALLOW_COPY_AND_ASSIGN(MockTranslateRanker); }; } // namespace testing
diff --git a/components/translate/core/browser/translate_accept_languages.h b/components/translate/core/browser/translate_accept_languages.h index 8d84b52..802a7f87 100644 --- a/components/translate/core/browser/translate_accept_languages.h +++ b/components/translate/core/browser/translate_accept_languages.h
@@ -25,6 +25,10 @@ // languages. TranslateAcceptLanguages(PrefService* prefs, const char* accept_languages_pref); + + TranslateAcceptLanguages(const TranslateAcceptLanguages&) = delete; + TranslateAcceptLanguages& operator=(const TranslateAcceptLanguages&) = delete; + ~TranslateAcceptLanguages() override; // Returns true if |language| is available as Accept-Languages. |language| @@ -49,8 +53,6 @@ // Path of accept languages preference. const std::string accept_languages_pref_; - - DISALLOW_COPY_AND_ASSIGN(TranslateAcceptLanguages); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_infobar_delegate.h b/components/translate/core/browser/translate_infobar_delegate.h index 93a6d4d..c65cff1 100644 --- a/components/translate/core/browser/translate_infobar_delegate.h +++ b/components/translate/core/browser/translate_infobar_delegate.h
@@ -69,6 +69,9 @@ static int GetMaximumNumberOfAutoAlways(); static int GetMaximumNumberOfAutoNever(); + TranslateInfoBarDelegate(const TranslateInfoBarDelegate&) = delete; + TranslateInfoBarDelegate& operator=(const TranslateInfoBarDelegate&) = delete; + ~TranslateInfoBarDelegate() override; // Factory method to create a translate infobar. |error_type| must be @@ -276,8 +279,6 @@ // Observers to handle front-end changes on different steps. // It's only used when we try to reuse the existing UI. base::ObserverList<Observer> observers_; - - DISALLOW_COPY_AND_ASSIGN(TranslateInfoBarDelegate); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_language_list.h b/components/translate/core/browser/translate_language_list.h index 4d726524..25b3503f 100644 --- a/components/translate/core/browser/translate_language_list.h +++ b/components/translate/core/browser/translate_language_list.h
@@ -27,6 +27,10 @@ class TranslateLanguageList { public: TranslateLanguageList(); + + TranslateLanguageList(const TranslateLanguageList&) = delete; + TranslateLanguageList& operator=(const TranslateLanguageList&) = delete; + virtual ~TranslateLanguageList(); // Returns the last-updated time when the language list is fetched from the @@ -113,8 +117,6 @@ // The last-updated time when the language list is sent. base::Time last_updated_; - - DISALLOW_COPY_AND_ASSIGN(TranslateLanguageList); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_manager.h b/components/translate/core/browser/translate_manager.h index f0336f8..4ac267cd 100644 --- a/components/translate/core/browser/translate_manager.h +++ b/components/translate/core/browser/translate_manager.h
@@ -62,6 +62,10 @@ TranslateManager(TranslateClient* translate_client, TranslateRanker* translate_ranker, language::LanguageModel* language_model); + + TranslateManager(const TranslateManager&) = delete; + TranslateManager& operator=(const TranslateManager&) = delete; + virtual ~TranslateManager(); // Returns a weak pointer to this instance. @@ -361,8 +365,6 @@ // By default, don't offer to translate in builds lacking an API key. For // testing, set to true to offer anyway. static bool ignore_missing_key_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(TranslateManager); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_prefs.h b/components/translate/core/browser/translate_prefs.h index ec2734d..91e58a6 100644 --- a/components/translate/core/browser/translate_prefs.h +++ b/components/translate/core/browser/translate_prefs.h
@@ -126,6 +126,9 @@ explicit TranslatePrefs(PrefService* user_prefs); + TranslatePrefs(const TranslatePrefs&) = delete; + TranslatePrefs& operator=(const TranslatePrefs&) = delete; + ~TranslatePrefs(); // Some existing preferences do not follow inclusive naming. Existing @@ -385,8 +388,6 @@ std::string country_; // The country the app runs in. std::unique_ptr<language::LanguagePrefs> language_prefs_; - - DISALLOW_COPY_AND_ASSIGN(TranslatePrefs); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_ranker_impl.h b/components/translate/core/browser/translate_ranker_impl.h index cd839af..34f680a6 100644 --- a/components/translate/core/browser/translate_ranker_impl.h +++ b/components/translate/core/browser/translate_ranker_impl.h
@@ -90,6 +90,10 @@ TranslateRankerImpl(const base::FilePath& model_path, const GURL& model_url, ukm::UkmRecorder* ukm_recorder); + + TranslateRankerImpl(const TranslateRankerImpl&) = delete; + TranslateRankerImpl& operator=(const TranslateRankerImpl&) = delete; + ~TranslateRankerImpl() override; // Get the file path of the translate ranker model, by default with a fixed @@ -164,8 +168,6 @@ std::vector<metrics::TranslateEventProto> event_cache_; base::WeakPtrFactory<TranslateRankerImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TranslateRankerImpl); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_script.h b/components/translate/core/browser/translate_script.h index 0ba8f65..20b6085 100644 --- a/components/translate/core/browser/translate_script.h +++ b/components/translate/core/browser/translate_script.h
@@ -27,6 +27,10 @@ using RequestCallback = base::OnceCallback<void(bool)>; TranslateScript(); + + TranslateScript(const TranslateScript&) = delete; + TranslateScript& operator=(const TranslateScript&) = delete; + virtual ~TranslateScript(); // Returns the fetched translate script. @@ -97,8 +101,6 @@ RequestCallbackList callback_list_; base::WeakPtrFactory<TranslateScript> weak_method_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TranslateScript); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_ui_delegate.h b/components/translate/core/browser/translate_ui_delegate.h index 2595062..3d14e4df 100644 --- a/components/translate/core/browser/translate_ui_delegate.h +++ b/components/translate/core/browser/translate_ui_delegate.h
@@ -42,6 +42,10 @@ TranslateUIDelegate(const base::WeakPtr<TranslateManager>& translate_manager, const std::string& source_language, const std::string& target_language); + + TranslateUIDelegate(const TranslateUIDelegate&) = delete; + TranslateUIDelegate& operator=(const TranslateUIDelegate&) = delete; + virtual ~TranslateUIDelegate(); // Handles when an error message is shown. @@ -193,8 +197,6 @@ // Listens to accept languages changes. PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(TranslateUIDelegate); }; } // namespace translate
diff --git a/components/translate/core/browser/translate_url_fetcher.h b/components/translate/core/browser/translate_url_fetcher.h index 58ac6b81..fd5df0ab 100644 --- a/components/translate/core/browser/translate_url_fetcher.h +++ b/components/translate/core/browser/translate_url_fetcher.h
@@ -33,6 +33,10 @@ }; TranslateURLFetcher(); + + TranslateURLFetcher(const TranslateURLFetcher&) = delete; + TranslateURLFetcher& operator=(const TranslateURLFetcher&) = delete; + ~TranslateURLFetcher(); int max_retry_on_5xx() { @@ -83,8 +87,6 @@ // An extra HTTP request header std::string extra_request_header_; - - DISALLOW_COPY_AND_ASSIGN(TranslateURLFetcher); }; } // namespace translate
diff --git a/components/translate/ios/browser/ios_translate_driver.h b/components/translate/ios/browser/ios_translate_driver.h index d3003f4..744a085 100644 --- a/components/translate/ios/browser/ios_translate_driver.h +++ b/components/translate/ios/browser/ios_translate_driver.h
@@ -35,6 +35,10 @@ IOSTranslateDriver(web::WebState* web_state, web::NavigationManager* navigation_manager, TranslateManager* translate_manager); + + IOSTranslateDriver(const IOSTranslateDriver&) = delete; + IOSTranslateDriver& operator=(const IOSTranslateDriver&) = delete; + ~IOSTranslateDriver() override; LanguageDetectionController* language_detection_controller() { @@ -122,8 +126,6 @@ // Parameters of the current translation. std::string source_language_; std::string target_language_; - - DISALLOW_COPY_AND_ASSIGN(IOSTranslateDriver); }; } // namespace translate
diff --git a/components/translate/ios/browser/language_detection_controller.h b/components/translate/ios/browser/language_detection_controller.h index f8633b8..044b76be 100644 --- a/components/translate/ios/browser/language_detection_controller.h +++ b/components/translate/ios/browser/language_detection_controller.h
@@ -36,6 +36,11 @@ public: LanguageDetectionController(web::WebState* web_state, PrefService* prefs); + + LanguageDetectionController(const LanguageDetectionController&) = delete; + LanguageDetectionController& operator=(const LanguageDetectionController&) = + delete; + ~LanguageDetectionController() override; private: @@ -77,8 +82,6 @@ BooleanPrefMember translate_enabled_; std::string content_language_header_; base::WeakPtrFactory<LanguageDetectionController> weak_method_factory_; - - DISALLOW_COPY_AND_ASSIGN(LanguageDetectionController); }; } // namespace translate
diff --git a/components/translate/ios/browser/translate_controller.h b/components/translate/ios/browser/translate_controller.h index 2f3b965..334062b 100644 --- a/components/translate/ios/browser/translate_controller.h +++ b/components/translate/ios/browser/translate_controller.h
@@ -48,6 +48,10 @@ }; TranslateController(web::WebState* web_state, JsTranslateManager* manager); + + TranslateController(const TranslateController&) = delete; + TranslateController& operator=(const TranslateController&) = delete; + ~TranslateController() override; // Sets the observer. @@ -128,8 +132,6 @@ Observer* observer_; __strong JsTranslateManager* js_manager_; base::WeakPtrFactory<TranslateController> weak_method_factory_; - - DISALLOW_COPY_AND_ASSIGN(TranslateController); }; } // namespace translate
diff --git a/components/translate/translate_internals/translate_internals_handler.h b/components/translate/translate_internals/translate_internals_handler.h index f688280..03ceffb3 100644 --- a/components/translate/translate_internals/translate_internals_handler.h +++ b/components/translate/translate_internals/translate_internals_handler.h
@@ -32,6 +32,11 @@ class TranslateInternalsHandler { public: TranslateInternalsHandler(); + + TranslateInternalsHandler(const TranslateInternalsHandler&) = delete; + TranslateInternalsHandler& operator=(const TranslateInternalsHandler&) = + delete; + ~TranslateInternalsHandler(); // Returns a dictionary of languages where each key is a language @@ -119,8 +124,6 @@ // Subscription for translate initialization event. base::CallbackListSubscription init_subscription_; - - DISALLOW_COPY_AND_ASSIGN(TranslateInternalsHandler); }; } // namespace translate
diff --git a/components/ui_devtools/connector_delegate.h b/components/ui_devtools/connector_delegate.h index 29b5402..2b2b02f 100644 --- a/components/ui_devtools/connector_delegate.h +++ b/components/ui_devtools/connector_delegate.h
@@ -14,12 +14,14 @@ class ConnectorDelegate { public: ConnectorDelegate() {} + + ConnectorDelegate(const ConnectorDelegate&) = delete; + ConnectorDelegate& operator=(const ConnectorDelegate&) = delete; + virtual ~ConnectorDelegate() {} virtual void BindTracingConsumerHost( mojo::PendingReceiver<tracing::mojom::ConsumerHost> receiver) = 0; - - DISALLOW_COPY_AND_ASSIGN(ConnectorDelegate); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/css_agent.h b/components/ui_devtools/css_agent.h index e962f70..d3fe945 100644 --- a/components/ui_devtools/css_agent.h +++ b/components/ui_devtools/css_agent.h
@@ -22,6 +22,10 @@ public DOMAgentObserver { public: explicit CSSAgent(DOMAgent* dom_agent); + + CSSAgent(const CSSAgent&) = delete; + CSSAgent& operator=(const CSSAgent&) = delete; + ~CSSAgent() override; // CSS::Backend: @@ -59,8 +63,6 @@ void InitStylesheetHeaders(UIElement* ui_element); DOMAgent* const dom_agent_; - - DISALLOW_COPY_AND_ASSIGN(CSSAgent); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/devtools_client.h b/components/ui_devtools/devtools_client.h index 8cbe1977..4904fd70 100644 --- a/components/ui_devtools/devtools_client.h +++ b/components/ui_devtools/devtools_client.h
@@ -26,6 +26,10 @@ static const int kNotConnected = -1; UiDevToolsClient(const std::string& name, UiDevToolsServer* server); + + UiDevToolsClient(const UiDevToolsClient&) = delete; + UiDevToolsClient& operator=(const UiDevToolsClient&) = delete; + ~UiDevToolsClient() override; void AddAgent(std::unique_ptr<UiDevToolsAgent> agent); @@ -58,8 +62,6 @@ std::vector<std::unique_ptr<UiDevToolsAgent>> agents_; protocol::UberDispatcher dispatcher_; UiDevToolsServer* server_; - - DISALLOW_COPY_AND_ASSIGN(UiDevToolsClient); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/devtools_server.h b/components/ui_devtools/devtools_server.h index 3ddc7444..f48d2f9 100644 --- a/components/ui_devtools/devtools_server.h +++ b/components/ui_devtools/devtools_server.h
@@ -33,6 +33,9 @@ // Network tags to be used for the UI devtools servers. static const net::NetworkTrafficAnnotationTag kUIDevtoolsServerTag; + UiDevToolsServer(const UiDevToolsServer&) = delete; + UiDevToolsServer& operator=(const UiDevToolsServer&) = delete; + ~UiDevToolsServer() override; // Returns an empty unique_ptr if ui devtools flag isn't enabled or if a @@ -126,8 +129,6 @@ SEQUENCE_CHECKER(devtools_server_sequence_); base::WeakPtrFactory<UiDevToolsServer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UiDevToolsServer); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/dom_agent.h b/components/ui_devtools/dom_agent.h index ecf91c4..4cda1ffffc 100644 --- a/components/ui_devtools/dom_agent.h +++ b/components/ui_devtools/dom_agent.h
@@ -31,6 +31,10 @@ public UIElementDelegate { public: DOMAgent(); + + DOMAgent(const DOMAgent&) = delete; + DOMAgent& operator=(const DOMAgent&) = delete; + ~DOMAgent() override; // DOM::Backend: @@ -113,8 +117,6 @@ SearchResults search_results_; bool is_document_created_ = false; - - DISALLOW_COPY_AND_ASSIGN(DOMAgent); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/overlay_agent.h b/components/ui_devtools/overlay_agent.h index 5d0de0e..0cd6225 100644 --- a/components/ui_devtools/overlay_agent.h +++ b/components/ui_devtools/overlay_agent.h
@@ -14,6 +14,10 @@ : public UiDevToolsBaseAgent<protocol::Overlay::Metainfo> { public: explicit OverlayAgent(DOMAgent* dom_agent); + + OverlayAgent(const OverlayAgent&) = delete; + OverlayAgent& operator=(const OverlayAgent&) = delete; + ~OverlayAgent() override; // Overlay::Backend: @@ -31,8 +35,6 @@ private: DOMAgent* const dom_agent_; - - DISALLOW_COPY_AND_ASSIGN(OverlayAgent); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/page_agent.h b/components/ui_devtools/page_agent.h index 5f3fa21..47781ad 100644 --- a/components/ui_devtools/page_agent.h +++ b/components/ui_devtools/page_agent.h
@@ -14,6 +14,10 @@ : public UiDevToolsBaseAgent<protocol::Page::Metainfo> { public: explicit PageAgent(DOMAgent* dom_agent); + + PageAgent(const PageAgent&) = delete; + PageAgent& operator=(const PageAgent&) = delete; + ~PageAgent() override; // Called on Ctrl+R (windows, linux) or Meta+R (mac) from frontend, but used @@ -24,8 +28,6 @@ protected: DOMAgent* const dom_agent_; - - DISALLOW_COPY_AND_ASSIGN(PageAgent); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/root_element.h b/components/ui_devtools/root_element.h index 4b1a95e4..25d7a033 100644 --- a/components/ui_devtools/root_element.h +++ b/components/ui_devtools/root_element.h
@@ -13,6 +13,10 @@ class UI_DEVTOOLS_EXPORT RootElement : public UIElement { public: explicit RootElement(UIElementDelegate* ui_element_delegate); + + RootElement(const RootElement&) = delete; + RootElement& operator=(const RootElement&) = delete; + ~RootElement() override; // UIElement: @@ -23,9 +27,6 @@ std::vector<std::string> GetAttributes() const override; std::pair<gfx::NativeWindow, gfx::Rect> GetNodeWindowAndScreenBounds() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(RootElement); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/tracing_agent.h b/components/ui_devtools/tracing_agent.h index 9233440..bbaca15 100644 --- a/components/ui_devtools/tracing_agent.h +++ b/components/ui_devtools/tracing_agent.h
@@ -30,6 +30,10 @@ : public UiDevToolsBaseAgent<protocol::Tracing::Metainfo> { public: explicit TracingAgent(std::unique_ptr<ConnectorDelegate> connector); + + TracingAgent(const TracingAgent&) = delete; + TracingAgent& operator=(const TracingAgent&) = delete; + ~TracingAgent() override; void set_gpu_pid(base::ProcessId pid) { gpu_pid_ = pid; } @@ -108,7 +112,6 @@ std::unique_ptr<PerfettoTracingSession> perfetto_session_; TraceDataBufferState trace_data_buffer_state_; base::WeakPtrFactory<TracingAgent> weak_factory_{this}; - DISALLOW_COPY_AND_ASSIGN(TracingAgent); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/ui_devtools_unittest_utils.h b/components/ui_devtools/ui_devtools_unittest_utils.h index 6662768..6d3e2de 100644 --- a/components/ui_devtools/ui_devtools_unittest_utils.h +++ b/components/ui_devtools/ui_devtools_unittest_utils.h
@@ -14,6 +14,10 @@ class FakeFrontendChannel : public protocol::FrontendChannel { public: FakeFrontendChannel(); + + FakeFrontendChannel(const FakeFrontendChannel&) = delete; + FakeFrontendChannel& operator=(const FakeFrontendChannel&) = delete; + ~FakeFrontendChannel() override; int CountProtocolNotificationMessageStartsWith(const std::string& message); @@ -38,8 +42,6 @@ private: std::vector<std::string> protocol_notification_messages_; bool allow_notifications_ = true; - - DISALLOW_COPY_AND_ASSIGN(FakeFrontendChannel); }; class MockUIElementDelegate : public UIElementDelegate {
diff --git a/components/ui_devtools/ui_element_delegate.h b/components/ui_devtools/ui_element_delegate.h index af2656e..fc78e87 100644 --- a/components/ui_devtools/ui_element_delegate.h +++ b/components/ui_devtools/ui_element_delegate.h
@@ -14,6 +14,10 @@ class UIElementDelegate { public: UIElementDelegate() {} + + UIElementDelegate(const UIElementDelegate&) = delete; + UIElementDelegate& operator=(const UIElementDelegate&) = delete; + virtual ~UIElementDelegate() {} virtual void OnUIElementAdded(UIElement* parent, UIElement* child) = 0; @@ -26,8 +30,6 @@ // Update CSS agent when bounds change. virtual void OnUIElementBoundsChanged(UIElement* ui_element) = 0; - - DISALLOW_COPY_AND_ASSIGN(UIElementDelegate); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/dom_agent_aura.h b/components/ui_devtools/views/dom_agent_aura.h index 4b3ee0f..a8f69e21 100644 --- a/components/ui_devtools/views/dom_agent_aura.h +++ b/components/ui_devtools/views/dom_agent_aura.h
@@ -22,6 +22,9 @@ public: DOMAgentAura(); + DOMAgentAura(const DOMAgentAura&) = delete; + DOMAgentAura& operator=(const DOMAgentAura&) = delete; + ~DOMAgentAura() override; static DOMAgentAura* GetInstance() { return dom_agent_aura_; } @@ -42,8 +45,6 @@ static DOMAgentAura* dom_agent_aura_; std::vector<aura::Window*> roots_; - - DISALLOW_COPY_AND_ASSIGN(DOMAgentAura); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/dom_agent_mac.h b/components/ui_devtools/views/dom_agent_mac.h index 863d882..126ef46 100644 --- a/components/ui_devtools/views/dom_agent_mac.h +++ b/components/ui_devtools/views/dom_agent_mac.h
@@ -17,6 +17,10 @@ class DOMAgentMac : public DOMAgentViews, public views::WidgetObserver { public: DOMAgentMac(); + + DOMAgentMac(const DOMAgentMac&) = delete; + DOMAgentMac& operator=(const DOMAgentMac&) = delete; + ~DOMAgentMac() override; void OnNativeWidgetAdded(views::NativeWidgetMac* native_widget); @@ -39,8 +43,6 @@ void InitializeRootsFromOpenWindows(); std::vector<views::Widget*> roots_; - - DISALLOW_COPY_AND_ASSIGN(DOMAgentMac); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/dom_agent_unittest.cc b/components/ui_devtools/views/dom_agent_unittest.cc index d7ad999..50970ee 100644 --- a/components/ui_devtools/views/dom_agent_unittest.cc +++ b/components/ui_devtools/views/dom_agent_unittest.cc
@@ -70,6 +70,10 @@ class DOMAgentTest : public views::ViewsTestBase { public: DOMAgentTest() = default; + + DOMAgentTest(const DOMAgentTest&) = delete; + DOMAgentTest& operator=(const DOMAgentTest&) = delete; + ~DOMAgentTest() override = default; views::Widget::InitParams CreateParams( @@ -261,8 +265,6 @@ std::unique_ptr<CSSAgent> css_agent_; std::unique_ptr<OverlayAgentViews> overlay_agent_; std::string name_; - - DISALLOW_COPY_AND_ASSIGN(DOMAgentTest); }; // Tests to ensure that the DOMAgent's hierarchy matches the real hierarchy.
diff --git a/components/ui_devtools/views/dom_agent_views.h b/components/ui_devtools/views/dom_agent_views.h index e0c7acc..8e65bf2 100644 --- a/components/ui_devtools/views/dom_agent_views.h +++ b/components/ui_devtools/views/dom_agent_views.h
@@ -12,6 +12,9 @@ class DOMAgentViews : public DOMAgent { public: + DOMAgentViews(const DOMAgentViews&) = delete; + DOMAgentViews& operator=(const DOMAgentViews&) = delete; + ~DOMAgentViews() override; static std::unique_ptr<DOMAgentViews> Create(); @@ -27,9 +30,6 @@ std::unique_ptr<protocol::DOM::Node> BuildTreeForUIElement( UIElement* ui_element) override; - - private: - DISALLOW_COPY_AND_ASSIGN(DOMAgentViews); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/overlay_agent_aura.h b/components/ui_devtools/views/overlay_agent_aura.h index 6e6968fd..21d1c84 100644 --- a/components/ui_devtools/views/overlay_agent_aura.h +++ b/components/ui_devtools/views/overlay_agent_aura.h
@@ -15,6 +15,10 @@ class OverlayAgentAura : public OverlayAgentViews { public: OverlayAgentAura(DOMAgent* dom_agent); + + OverlayAgentAura(const OverlayAgentAura&) = delete; + OverlayAgentAura& operator=(const OverlayAgentAura&) = delete; + ~OverlayAgentAura() override; int FindElementIdTargetedByPoint(ui::LocatedEvent* event) const override; @@ -28,8 +32,6 @@ FRIEND_TEST_ALL_PREFIXES(OverlayAgentTest, HighlightEmptyOrInvisibleWindow); static OverlayAgentAura* overlay_agent_aura_; - - DISALLOW_COPY_AND_ASSIGN(OverlayAgentAura); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/overlay_agent_mac.h b/components/ui_devtools/views/overlay_agent_mac.h index 105e3369..524097fef8 100644 --- a/components/ui_devtools/views/overlay_agent_mac.h +++ b/components/ui_devtools/views/overlay_agent_mac.h
@@ -17,6 +17,10 @@ public views::WidgetObserver { public: OverlayAgentMac(DOMAgent* dom_agent); + + OverlayAgentMac(const OverlayAgentMac&) = delete; + OverlayAgentMac& operator=(const OverlayAgentMac&) = delete; + ~OverlayAgentMac() override; int FindElementIdTargetedByPoint(ui::LocatedEvent* event) const override; @@ -39,8 +43,6 @@ void RemovePreTargetHandlerOnWidget(views::Widget* widget); bool is_pretarget_handler_ = false; - - DISALLOW_COPY_AND_ASSIGN(OverlayAgentMac); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/overlay_agent_views.h b/components/ui_devtools/views/overlay_agent_views.h index bf08c983..231f2a1 100644 --- a/components/ui_devtools/views/overlay_agent_views.h +++ b/components/ui_devtools/views/overlay_agent_views.h
@@ -38,6 +38,9 @@ public ui::EventHandler, public ui::LayerDelegate { public: + OverlayAgentViews(const OverlayAgentViews&) = delete; + OverlayAgentViews& operator=(const OverlayAgentViews&) = delete; + ~OverlayAgentViews() override; // Creates a platform-specific instance. @@ -119,8 +122,6 @@ gfx::Rect pinned_rect_; int pinned_id_ = 0; - - DISALLOW_COPY_AND_ASSIGN(OverlayAgentViews); }; } // namespace ui_devtools
diff --git a/components/ui_devtools/views/view_element_unittest.cc b/components/ui_devtools/views/view_element_unittest.cc index 1fe39ea..7b7beb35 100644 --- a/components/ui_devtools/views/view_element_unittest.cc +++ b/components/ui_devtools/views/view_element_unittest.cc
@@ -100,6 +100,10 @@ class ViewElementTest : public views::ViewsTestBase { public: ViewElementTest() {} + + ViewElementTest(const ViewElementTest&) = delete; + ViewElementTest& operator=(const ViewElementTest&) = delete; + ~ViewElementTest() override {} protected: @@ -121,8 +125,6 @@ std::unique_ptr<MockNamedTestView> view_; std::unique_ptr<ViewElement> element_; std::unique_ptr<MockUIElementDelegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(ViewElementTest); }; TEST_F(ViewElementTest, SettingsBoundsOnViewCallsDelegate) {
diff --git a/components/ui_devtools/views/window_element_unittest.cc b/components/ui_devtools/views/window_element_unittest.cc index 7dfe973..698ed02 100644 --- a/components/ui_devtools/views/window_element_unittest.cc +++ b/components/ui_devtools/views/window_element_unittest.cc
@@ -18,6 +18,10 @@ class WindowElementTest : public views::ViewsTestBase { public: WindowElementTest() {} + + WindowElementTest(const WindowElementTest&) = delete; + WindowElementTest& operator=(const WindowElementTest&) = delete; + ~WindowElementTest() override {} void SetUp() override { @@ -53,8 +57,6 @@ std::unique_ptr<aura::Window> window_; std::unique_ptr<WindowElement> element_; std::unique_ptr<MockUIElementDelegate> delegate_; - - DISALLOW_COPY_AND_ASSIGN(WindowElementTest); }; TEST_F(WindowElementTest, SettingsBoundsOnWindowCallsDelegate) {
diff --git a/components/ukm/debug/ukm_debug_data_extractor.h b/components/ukm/debug/ukm_debug_data_extractor.h index b94218a3..b2b5ada 100644 --- a/components/ukm/debug/ukm_debug_data_extractor.h +++ b/components/ukm/debug/ukm_debug_data_extractor.h
@@ -19,6 +19,10 @@ class UkmDebugDataExtractor { public: UkmDebugDataExtractor(); + + UkmDebugDataExtractor(const UkmDebugDataExtractor&) = delete; + UkmDebugDataExtractor& operator=(const UkmDebugDataExtractor&) = delete; + ~UkmDebugDataExtractor(); // Returns UKM data structured in a DictionaryValue. @@ -30,9 +34,6 @@ // 32 bit representation of the high 32 bit and the second item is the lower // 32 bit of the 64 bit number. static base::Value UInt64AsPairOfInt(uint64_t v); - - private: - DISALLOW_COPY_AND_ASSIGN(UkmDebugDataExtractor); }; } // namespace debug
diff --git a/components/ukm/ios/ukm_url_recorder.mm b/components/ukm/ios/ukm_url_recorder.mm index 10527ec..8b997abe 100644 --- a/components/ukm/ios/ukm_url_recorder.mm +++ b/components/ukm/ios/ukm_url_recorder.mm
@@ -32,6 +32,11 @@ : public web::WebStateObserver, public web::WebStateUserData<SourceUrlRecorderWebStateObserver> { public: + SourceUrlRecorderWebStateObserver(const SourceUrlRecorderWebStateObserver&) = + delete; + SourceUrlRecorderWebStateObserver& operator=( + const SourceUrlRecorderWebStateObserver&) = delete; + ~SourceUrlRecorderWebStateObserver() override; // web::WebStateObserver @@ -56,8 +61,6 @@ SourceId last_committed_source_id_; WEB_STATE_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(SourceUrlRecorderWebStateObserver); }; WEB_STATE_USER_DATA_KEY_IMPL(SourceUrlRecorderWebStateObserver)
diff --git a/components/ukm/observers/history_delete_observer.h b/components/ukm/observers/history_delete_observer.h index 894b727..649d69c 100644 --- a/components/ukm/observers/history_delete_observer.h +++ b/components/ukm/observers/history_delete_observer.h
@@ -16,6 +16,10 @@ class HistoryDeleteObserver : public history::HistoryServiceObserver { public: HistoryDeleteObserver(); + + HistoryDeleteObserver(const HistoryDeleteObserver&) = delete; + HistoryDeleteObserver& operator=(const HistoryDeleteObserver&) = delete; + ~HistoryDeleteObserver() override; // Starts observing a service for history deletions. @@ -35,8 +39,6 @@ base::ScopedMultiSourceObservation<history::HistoryService, history::HistoryServiceObserver> history_observations_{this}; - - DISALLOW_COPY_AND_ASSIGN(HistoryDeleteObserver); }; } // namespace ukm
diff --git a/components/ukm/observers/ukm_consent_state_observer.h b/components/ukm/observers/ukm_consent_state_observer.h index 714b560..1c1597e 100644 --- a/components/ukm/observers/ukm_consent_state_observer.h +++ b/components/ukm/observers/ukm_consent_state_observer.h
@@ -25,6 +25,10 @@ public unified_consent::UrlKeyedDataCollectionConsentHelper::Observer { public: UkmConsentStateObserver(); + + UkmConsentStateObserver(const UkmConsentStateObserver&) = delete; + UkmConsentStateObserver& operator=(const UkmConsentStateObserver&) = delete; + ~UkmConsentStateObserver() override; // Starts observing whether UKM is allowed for a profile. @@ -140,8 +144,6 @@ // Tracks if extension sync was enabled on all profiles after the last state // change. bool ukm_allowed_with_extensions_for_all_profiles_ = false; - - DISALLOW_COPY_AND_ASSIGN(UkmConsentStateObserver); }; } // namespace ukm
diff --git a/components/ukm/observers/ukm_consent_state_observer_unittest.cc b/components/ukm/observers/ukm_consent_state_observer_unittest.cc index 4ba2ece..6028bcd 100644 --- a/components/ukm/observers/ukm_consent_state_observer_unittest.cc +++ b/components/ukm/observers/ukm_consent_state_observer_unittest.cc
@@ -23,6 +23,10 @@ SetTransportState(TransportState::INITIALIZING); SetLastCycleSnapshot(syncer::SyncCycleSnapshot()); } + + MockSyncService(const MockSyncService&) = delete; + MockSyncService& operator=(const MockSyncService&) = delete; + ~MockSyncService() override { Shutdown(); } void SetStatus(bool has_passphrase, bool history_enabled, bool active) { @@ -76,13 +80,16 @@ // The list of observers of the SyncService state. base::ObserverList<syncer::SyncServiceObserver>::Unchecked observers_; - - DISALLOW_COPY_AND_ASSIGN(MockSyncService); }; class TestUkmConsentStateObserver : public UkmConsentStateObserver { public: TestUkmConsentStateObserver() : purged_(false), notified_(false) {} + + TestUkmConsentStateObserver(const TestUkmConsentStateObserver&) = delete; + TestUkmConsentStateObserver& operator=(const TestUkmConsentStateObserver&) = + delete; + ~TestUkmConsentStateObserver() override {} bool ResetPurged() { @@ -105,7 +112,6 @@ } bool purged_; bool notified_; - DISALLOW_COPY_AND_ASSIGN(TestUkmConsentStateObserver); }; class UkmConsentStateObserverTest : public testing::Test {
diff --git a/components/ukm/test_ukm_recorder.h b/components/ukm/test_ukm_recorder.h index b9008c1..32da49e 100644 --- a/components/ukm/test_ukm_recorder.h +++ b/components/ukm/test_ukm_recorder.h
@@ -42,6 +42,10 @@ }; TestUkmRecorder(); + + TestUkmRecorder(const TestUkmRecorder&) = delete; + TestUkmRecorder& operator=(const TestUkmRecorder&) = delete; + ~TestUkmRecorder() override; bool ShouldRestrictToWhitelistedSourceIds() const override; @@ -115,8 +119,6 @@ private: uint64_t entry_hash_to_wait_for_ = 0; base::OnceClosure on_add_entry_; - - DISALLOW_COPY_AND_ASSIGN(TestUkmRecorder); }; // Similar to a TestUkmRecorder, but also sets itself as the global UkmRecorder
diff --git a/components/ukm/ukm_reporting_service.h b/components/ukm/ukm_reporting_service.h index 7abd156..025ad7a 100644 --- a/components/ukm/ukm_reporting_service.h +++ b/components/ukm/ukm_reporting_service.h
@@ -34,6 +34,10 @@ // for the lifetime of this class. UkmReportingService(metrics::MetricsServiceClient* client, PrefService* local_state); + + UkmReportingService(const UkmReportingService&) = delete; + UkmReportingService& operator=(const UkmReportingService&) = delete; + ~UkmReportingService() override; // At startup, prefs needs to be called with a list of all the pref names and @@ -62,8 +66,6 @@ void LogLargeRejection(size_t log_size) override; metrics::UnsentLogStore unsent_log_store_; - - DISALLOW_COPY_AND_ASSIGN(UkmReportingService); }; } // namespace ukm
diff --git a/components/ukm/ukm_rotation_scheduler.h b/components/ukm/ukm_rotation_scheduler.h index d048265..8e419936 100644 --- a/components/ukm/ukm_rotation_scheduler.h +++ b/components/ukm/ukm_rotation_scheduler.h
@@ -20,13 +20,15 @@ const base::RepeatingClosure& rotation_callback, bool fast_startup_for_testing, const base::RepeatingCallback<base::TimeDelta(void)>& interval_callback); + + UkmRotationScheduler(const UkmRotationScheduler&) = delete; + UkmRotationScheduler& operator=(const UkmRotationScheduler&) = delete; + ~UkmRotationScheduler() override; private: // Record the init sequence order histogram. void LogMetricsInitSequence(InitSequence sequence) override; - - DISALLOW_COPY_AND_ASSIGN(UkmRotationScheduler); }; } // namespace ukm
diff --git a/components/ukm/ukm_service.h b/components/ukm/ukm_service.h index 0d9d2eb..e39353a 100644 --- a/components/ukm/ukm_service.h +++ b/components/ukm/ukm_service.h
@@ -64,6 +64,10 @@ metrics::MetricsServiceClient* client, std::unique_ptr<metrics::UkmDemographicMetricsProvider> demographics_provider); + + UkmService(const UkmService&) = delete; + UkmService& operator=(const UkmService&) = delete; + ~UkmService() override; // Initializes the UKM service. @@ -215,8 +219,6 @@ // Weak pointers factory used to post task on different threads. All weak // pointers managed by this factory have the same lifetime as UkmService. base::WeakPtrFactory<UkmService> self_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UkmService); }; } // namespace ukm
diff --git a/components/ukm/ukm_service_unittest.cc b/components/ukm/ukm_service_unittest.cc index 606d749..b0fc4d7 100644 --- a/components/ukm/ukm_service_unittest.cc +++ b/components/ukm/ukm_service_unittest.cc
@@ -105,12 +105,13 @@ params); } + ScopedUkmFeatureParams(const ScopedUkmFeatureParams&) = delete; + ScopedUkmFeatureParams& operator=(const ScopedUkmFeatureParams&) = delete; + ~ScopedUkmFeatureParams() {} private: base::test::ScopedFeatureList scoped_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(ScopedUkmFeatureParams); }; class MockDemographicMetricsProvider
diff --git a/components/ukm/unsent_log_store_metrics_impl.h b/components/ukm/unsent_log_store_metrics_impl.h index 8273a17..e1dd537 100644 --- a/components/ukm/unsent_log_store_metrics_impl.h +++ b/components/ukm/unsent_log_store_metrics_impl.h
@@ -14,6 +14,11 @@ class UnsentLogStoreMetricsImpl : public metrics::UnsentLogStoreMetrics { public: UnsentLogStoreMetricsImpl(); + + UnsentLogStoreMetricsImpl(const UnsentLogStoreMetricsImpl&) = delete; + UnsentLogStoreMetricsImpl& operator=(const UnsentLogStoreMetricsImpl&) = + delete; + ~UnsentLogStoreMetricsImpl() override; // metrics::UnsentLogStoreMetrics: @@ -23,9 +28,6 @@ size_t original_size) override; void RecordDroppedLogSize(size_t size) override; void RecordDroppedLogsNum(int dropped_logs_num) override; - - private: - DISALLOW_COPY_AND_ASSIGN(UnsentLogStoreMetricsImpl); }; } // namespace ukm
diff --git a/components/undo/bookmark_undo_service.cc b/components/undo/bookmark_undo_service.cc index dfcff48..92fc876 100644 --- a/components/undo/bookmark_undo_service.cc +++ b/components/undo/bookmark_undo_service.cc
@@ -49,6 +49,10 @@ BookmarkAddOperation(BookmarkModel* bookmark_model, const BookmarkNode* parent, size_t index); + + BookmarkAddOperation(const BookmarkAddOperation&) = delete; + BookmarkAddOperation& operator=(const BookmarkAddOperation&) = delete; + ~BookmarkAddOperation() override {} // UndoOperation: @@ -59,8 +63,6 @@ private: int64_t parent_id_; const size_t index_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkAddOperation); }; BookmarkAddOperation::BookmarkAddOperation(BookmarkModel* bookmark_model, @@ -100,6 +102,10 @@ const BookmarkNode* parent, size_t index, std::unique_ptr<BookmarkNode> node); + + BookmarkRemoveOperation(const BookmarkRemoveOperation&) = delete; + BookmarkRemoveOperation& operator=(const BookmarkRemoveOperation&) = delete; + ~BookmarkRemoveOperation() override; // UndoOperation: @@ -112,8 +118,6 @@ const int64_t parent_node_id_; const size_t index_; std::unique_ptr<BookmarkNode> node_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkRemoveOperation); }; BookmarkRemoveOperation::BookmarkRemoveOperation( @@ -156,6 +160,10 @@ public: BookmarkEditOperation(BookmarkModel* bookmark_model, const BookmarkNode* node); + + BookmarkEditOperation(const BookmarkEditOperation&) = delete; + BookmarkEditOperation& operator=(const BookmarkEditOperation&) = delete; + ~BookmarkEditOperation() override {} // UndoOperation: @@ -166,8 +174,6 @@ private: int64_t node_id_; BookmarkNodeData original_bookmark_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkEditOperation); }; BookmarkEditOperation::BookmarkEditOperation( @@ -207,6 +213,10 @@ size_t old_index, const BookmarkNode* new_parent, size_t new_index); + + BookmarkMoveOperation(const BookmarkMoveOperation&) = delete; + BookmarkMoveOperation& operator=(const BookmarkMoveOperation&) = delete; + ~BookmarkMoveOperation() override {} int GetUndoLabelId() const override; int GetRedoLabelId() const override; @@ -219,8 +229,6 @@ int64_t new_parent_id_; size_t old_index_; size_t new_index_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkMoveOperation); }; BookmarkMoveOperation::BookmarkMoveOperation(BookmarkModel* bookmark_model, @@ -273,6 +281,10 @@ public: BookmarkReorderOperation(BookmarkModel* bookmark_model, const BookmarkNode* parent); + + BookmarkReorderOperation(const BookmarkReorderOperation&) = delete; + BookmarkReorderOperation& operator=(const BookmarkReorderOperation&) = delete; + ~BookmarkReorderOperation() override; // UndoOperation: @@ -283,8 +295,6 @@ private: int64_t parent_id_; std::vector<int64_t> ordered_bookmarks_; - - DISALLOW_COPY_AND_ASSIGN(BookmarkReorderOperation); }; BookmarkReorderOperation::BookmarkReorderOperation(
diff --git a/components/undo/bookmark_undo_service.h b/components/undo/bookmark_undo_service.h index 74c825b9..454e4e4 100644 --- a/components/undo/bookmark_undo_service.h +++ b/components/undo/bookmark_undo_service.h
@@ -25,6 +25,10 @@ public KeyedService { public: BookmarkUndoService(); + + BookmarkUndoService(const BookmarkUndoService&) = delete; + BookmarkUndoService& operator=(const BookmarkUndoService&) = delete; + ~BookmarkUndoService() override; // Starts the BookmarkUndoService and register it as a BookmarkModelObserver. @@ -73,8 +77,6 @@ base::ScopedObservation<bookmarks::BookmarkModel, bookmarks::BookmarkModelObserver> scoped_observation_{this}; - - DISALLOW_COPY_AND_ASSIGN(BookmarkUndoService); }; #endif // COMPONENTS_UNDO_BOOKMARK_UNDO_SERVICE_H_
diff --git a/components/undo/bookmark_undo_utils.h b/components/undo/bookmark_undo_utils.h index e0eeead..e3ffda0 100644 --- a/components/undo/bookmark_undo_utils.h +++ b/components/undo/bookmark_undo_utils.h
@@ -18,12 +18,15 @@ public: explicit ScopedSuspendBookmarkUndo( BookmarkUndoService* bookmark_undo_service); + + ScopedSuspendBookmarkUndo(const ScopedSuspendBookmarkUndo&) = delete; + ScopedSuspendBookmarkUndo& operator=(const ScopedSuspendBookmarkUndo&) = + delete; + ~ScopedSuspendBookmarkUndo(); private: UndoManager* undo_manager_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSuspendBookmarkUndo); }; #endif // COMPONENTS_UNDO_BOOKMARK_UNDO_UTILS_H_
diff --git a/components/undo/undo_manager.h b/components/undo/undo_manager.h index 608387c..6a2db36 100644 --- a/components/undo/undo_manager.h +++ b/components/undo/undo_manager.h
@@ -24,6 +24,10 @@ class UndoGroup { public: UndoGroup(); + + UndoGroup(const UndoGroup&) = delete; + UndoGroup& operator=(const UndoGroup&) = delete; + ~UndoGroup(); void AddOperation(std::unique_ptr<UndoOperation> operation); @@ -45,8 +49,6 @@ // The resource string id describing the undo and redo action. int undo_label_id_; int redo_label_id_; - - DISALLOW_COPY_AND_ASSIGN(UndoGroup); }; // UndoManager ---------------------------------------------------------------- @@ -56,6 +58,10 @@ class UndoManager { public: UndoManager(); + + UndoManager(const UndoManager&) = delete; + UndoManager& operator=(const UndoManager&) = delete; + ~UndoManager(); // Perform an undo or redo operation. @@ -128,8 +134,6 @@ // processed. bool performing_undo_; bool performing_redo_; - - DISALLOW_COPY_AND_ASSIGN(UndoManager); }; #endif // COMPONENTS_UNDO_UNDO_MANAGER_H_
diff --git a/components/undo/undo_manager_test.cc b/components/undo/undo_manager_test.cc index deaf463..6de379e 100644 --- a/components/undo/undo_manager_test.cc +++ b/components/undo/undo_manager_test.cc
@@ -90,6 +90,10 @@ class TestUndoOperation : public UndoOperation { public: explicit TestUndoOperation(TestUndoService* undo_service); + + TestUndoOperation(const TestUndoOperation&) = delete; + TestUndoOperation& operator=(const TestUndoOperation&) = delete; + ~TestUndoOperation() override; // UndoOperation: @@ -99,8 +103,6 @@ private: TestUndoService* undo_service_; - - DISALLOW_COPY_AND_ASSIGN(TestUndoOperation); }; TestUndoOperation::TestUndoOperation(TestUndoService* undo_service)
diff --git a/components/unified_consent/unified_consent_service.h b/components/unified_consent/unified_consent_service.h index 0779331..a5be768 100644 --- a/components/unified_consent/unified_consent_service.h +++ b/components/unified_consent/unified_consent_service.h
@@ -63,6 +63,10 @@ signin::IdentityManager* identity_manager, syncer::SyncService* sync_service, const std::vector<std::string>& service_pref_names); + + UnifiedConsentService(const UnifiedConsentService&) = delete; + UnifiedConsentService& operator=(const UnifiedConsentService&) = delete; + ~UnifiedConsentService() override; // Register the prefs used by this UnifiedConsentService. @@ -110,8 +114,6 @@ const std::vector<std::string> service_pref_names_; std::map<std::string, base::Value> service_pref_changes_; PrefChangeRegistrar service_pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(UnifiedConsentService); }; } // namespace unified_consent
diff --git a/components/unified_consent/unified_consent_service_unittest.cc b/components/unified_consent/unified_consent_service_unittest.cc index 14c1b5c..efa97a9e3 100644 --- a/components/unified_consent/unified_consent_service_unittest.cc +++ b/components/unified_consent/unified_consent_service_unittest.cc
@@ -52,6 +52,10 @@ syncer::SyncPrefs::RegisterProfilePrefs(pref_service_.registry()); } + UnifiedConsentServiceTest(const UnifiedConsentServiceTest&) = delete; + UnifiedConsentServiceTest& operator=(const UnifiedConsentServiceTest&) = + delete; + ~UnifiedConsentServiceTest() override { if (consent_service_) consent_service_->Shutdown(); @@ -79,8 +83,6 @@ signin::IdentityTestEnvironment identity_test_environment_; TestSyncService sync_service_; std::unique_ptr<UnifiedConsentService> consent_service_; - - DISALLOW_COPY_AND_ASSIGN(UnifiedConsentServiceTest); }; TEST_F(UnifiedConsentServiceTest, DefaultValuesWhenSignedOut) {
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper.cc b/components/unified_consent/url_keyed_data_collection_consent_helper.cc index 2b7da836..427ca8b 100644 --- a/components/unified_consent/url_keyed_data_collection_consent_helper.cc +++ b/components/unified_consent/url_keyed_data_collection_consent_helper.cc
@@ -26,6 +26,12 @@ public: explicit PrefBasedUrlKeyedDataCollectionConsentHelper( PrefService* pref_service); + + PrefBasedUrlKeyedDataCollectionConsentHelper( + const PrefBasedUrlKeyedDataCollectionConsentHelper&) = delete; + PrefBasedUrlKeyedDataCollectionConsentHelper& operator=( + const PrefBasedUrlKeyedDataCollectionConsentHelper&) = delete; + ~PrefBasedUrlKeyedDataCollectionConsentHelper() override = default; // UrlKeyedDataCollectionConsentHelper: @@ -35,8 +41,6 @@ void OnPrefChanged(); PrefService* pref_service_; // weak (must outlive this) PrefChangeRegistrar pref_change_registrar_; - - DISALLOW_COPY_AND_ASSIGN(PrefBasedUrlKeyedDataCollectionConsentHelper); }; class SyncBasedUrlKeyedDataCollectionConsentHelper @@ -46,6 +50,12 @@ SyncBasedUrlKeyedDataCollectionConsentHelper( syncer::SyncService* sync_service, std::set<syncer::ModelType> sync_data_types); + + SyncBasedUrlKeyedDataCollectionConsentHelper( + const SyncBasedUrlKeyedDataCollectionConsentHelper&) = delete; + SyncBasedUrlKeyedDataCollectionConsentHelper& operator=( + const SyncBasedUrlKeyedDataCollectionConsentHelper&) = delete; + ~SyncBasedUrlKeyedDataCollectionConsentHelper() override; // UrlKeyedDataCollectionConsentHelper: @@ -60,8 +70,6 @@ syncer::SyncService* sync_service_; std::map<syncer::ModelType, syncer::UploadState> sync_data_type_states_; - - DISALLOW_COPY_AND_ASSIGN(SyncBasedUrlKeyedDataCollectionConsentHelper); }; PrefBasedUrlKeyedDataCollectionConsentHelper::
diff --git a/components/unified_consent/url_keyed_data_collection_consent_helper.h b/components/unified_consent/url_keyed_data_collection_consent_helper.h index 6e3e6a7..b5b0fce 100644 --- a/components/unified_consent/url_keyed_data_collection_consent_helper.h +++ b/components/unified_consent/url_keyed_data_collection_consent_helper.h
@@ -48,6 +48,11 @@ static std::unique_ptr<UrlKeyedDataCollectionConsentHelper> NewPersonalizedDataCollectionConsentHelper(syncer::SyncService* sync_service); + UrlKeyedDataCollectionConsentHelper( + const UrlKeyedDataCollectionConsentHelper&) = delete; + UrlKeyedDataCollectionConsentHelper& operator=( + const UrlKeyedDataCollectionConsentHelper&) = delete; + virtual ~UrlKeyedDataCollectionConsentHelper(); // Returns true if the user has consented for URL keyed anonymized data @@ -66,8 +71,6 @@ private: base::ObserverList<Observer, true>::Unchecked observer_list_; - - DISALLOW_COPY_AND_ASSIGN(UrlKeyedDataCollectionConsentHelper); }; } // namespace unified_consent
diff --git a/components/update_client/component.h b/components/update_client/component.h index 20dce03..4b1e9792 100644 --- a/components/update_client/component.h +++ b/components/update_client/component.h
@@ -350,13 +350,15 @@ class StateRegistration : public State { public: explicit StateRegistration(Component* component); + + StateRegistration(const StateRegistration&) = delete; + StateRegistration& operator=(const StateRegistration&) = delete; + ~StateRegistration() override; private: // State overrides. void DoHandle() override; - - DISALLOW_COPY_AND_ASSIGN(StateRegistration); }; class StateRun : public State {
diff --git a/components/update_client/component_patcher_unittest.cc b/components/update_client/component_patcher_unittest.cc index 17a1475..6b725ed 100644 --- a/components/update_client/component_patcher_unittest.cc +++ b/components/update_client/component_patcher_unittest.cc
@@ -27,15 +27,16 @@ class TestCallback { public: TestCallback(); + + TestCallback(const TestCallback&) = delete; + TestCallback& operator=(const TestCallback&) = delete; + virtual ~TestCallback() = default; void Set(update_client::UnpackerError error, int extra_code); update_client::UnpackerError error_; int extra_code_; bool called_; - - private: - DISALLOW_COPY_AND_ASSIGN(TestCallback); }; TestCallback::TestCallback()
diff --git a/components/update_client/component_unpacker_unittest.cc b/components/update_client/component_unpacker_unittest.cc index 8465728..65ce655e 100644 --- a/components/update_client/component_unpacker_unittest.cc +++ b/components/update_client/component_unpacker_unittest.cc
@@ -32,15 +32,16 @@ class TestCallback { public: TestCallback(); + + TestCallback(const TestCallback&) = delete; + TestCallback& operator=(const TestCallback&) = delete; + virtual ~TestCallback() = default; void Set(update_client::UnpackerError error, int extra_code); update_client::UnpackerError error_; int extra_code_; bool called_; - - private: - DISALLOW_COPY_AND_ASSIGN(TestCallback); }; TestCallback::TestCallback()
diff --git a/components/update_client/net/network_impl.h b/components/update_client/net/network_impl.h index f8d4f9c..a43d599 100644 --- a/components/update_client/net/network_impl.h +++ b/components/update_client/net/network_impl.h
@@ -28,6 +28,10 @@ explicit NetworkFetcherImpl( scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory, SendCookiesPredicate cookie_predicate); + + NetworkFetcherImpl(const NetworkFetcherImpl&) = delete; + NetworkFetcherImpl& operator=(const NetworkFetcherImpl&) = delete; + ~NetworkFetcherImpl() override; // NetworkFetcher overrides. @@ -60,8 +64,6 @@ scoped_refptr<network::SharedURLLoaderFactory> shared_url_network_factory_; std::unique_ptr<network::SimpleURLLoader> simple_url_loader_; SendCookiesPredicate cookie_predicate_; - - DISALLOW_COPY_AND_ASSIGN(NetworkFetcherImpl); }; } // namespace update_client
diff --git a/components/update_client/net/url_loader_post_interceptor.h b/components/update_client/net/url_loader_post_interceptor.h index 1d460ace..ec78e1d 100644 --- a/components/update_client/net/url_loader_post_interceptor.h +++ b/components/update_client/net/url_loader_post_interceptor.h
@@ -61,6 +61,9 @@ URLLoaderPostInterceptor(std::vector<GURL> supported_urls, net::test_server::EmbeddedTestServer*); + URLLoaderPostInterceptor(const URLLoaderPostInterceptor&) = delete; + URLLoaderPostInterceptor& operator=(const URLLoaderPostInterceptor&) = delete; + ~URLLoaderPostInterceptor(); // Sets an expection for the body of the POST request and optionally, @@ -152,8 +155,6 @@ std::vector<GURL> filtered_urls_; UrlJobRequestReadyCallback url_job_request_ready_callback_; - - DISALLOW_COPY_AND_ASSIGN(URLLoaderPostInterceptor); }; class PartialMatch : public URLLoaderPostInterceptor::RequestMatcher {
diff --git a/components/update_client/network.h b/components/update_client/network.h index 442dd24b..4dd3b84 100644 --- a/components/update_client/network.h +++ b/components/update_client/network.h
@@ -53,6 +53,9 @@ // trusted. static constexpr char kHeaderXRetryAfter[] = "X-Retry-After"; + NetworkFetcher(const NetworkFetcher&) = delete; + NetworkFetcher& operator=(const NetworkFetcher&) = delete; + virtual ~NetworkFetcher() = default; virtual void PostRequest( @@ -72,9 +75,6 @@ protected: NetworkFetcher() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(NetworkFetcher); }; class NetworkFetcherFactory
diff --git a/components/update_client/persisted_data.h b/components/update_client/persisted_data.h index 99175574..e318bfad 100644 --- a/components/update_client/persisted_data.h +++ b/components/update_client/persisted_data.h
@@ -42,6 +42,9 @@ PersistedData(PrefService* pref_service, ActivityDataService* activity_data_service); + PersistedData(const PersistedData&) = delete; + PersistedData& operator=(const PersistedData&) = delete; + ~PersistedData(); // Returns the DateLastRollCall (the server-localized calendar date number the @@ -137,8 +140,6 @@ SEQUENCE_CHECKER(sequence_checker_); PrefService* pref_service_; ActivityDataService* activity_data_service_; - - DISALLOW_COPY_AND_ASSIGN(PersistedData); }; } // namespace update_client
diff --git a/components/update_client/protocol_handler.h b/components/update_client/protocol_handler.h index 57c8cfd..ecc8079b 100644 --- a/components/update_client/protocol_handler.h +++ b/components/update_client/protocol_handler.h
@@ -16,15 +16,15 @@ class ProtocolHandlerFactory { public: + ProtocolHandlerFactory(const ProtocolHandlerFactory&) = delete; + ProtocolHandlerFactory& operator=(const ProtocolHandlerFactory&) = delete; + virtual ~ProtocolHandlerFactory() = default; virtual std::unique_ptr<ProtocolParser> CreateParser() const = 0; virtual std::unique_ptr<ProtocolSerializer> CreateSerializer() const = 0; protected: ProtocolHandlerFactory() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(ProtocolHandlerFactory); }; class ProtocolHandlerFactoryJSON final : public ProtocolHandlerFactory {
diff --git a/components/update_client/protocol_parser.h b/components/update_client/protocol_parser.h index 029493a8c..a051557 100644 --- a/components/update_client/protocol_parser.h +++ b/components/update_client/protocol_parser.h
@@ -109,6 +109,9 @@ static std::unique_ptr<ProtocolParser> Create(); + ProtocolParser(const ProtocolParser&) = delete; + ProtocolParser& operator=(const ProtocolParser&) = delete; + virtual ~ProtocolParser(); // Parses an update response string into Result data. Returns a bool @@ -132,8 +135,6 @@ Results results_; std::string errors_; - - DISALLOW_COPY_AND_ASSIGN(ProtocolParser); }; } // namespace update_client
diff --git a/components/update_client/request_sender.h b/components/update_client/request_sender.h index 54c884ea..b3eaa20f 100644 --- a/components/update_client/request_sender.h +++ b/components/update_client/request_sender.h
@@ -43,6 +43,10 @@ void(int error, const std::string& response, int retry_after_sec)>; explicit RequestSender(scoped_refptr<Configurator> config); + + RequestSender(const RequestSender&) = delete; + RequestSender& operator=(const RequestSender&) = delete; + ~RequestSender(); // |use_signing| enables CUP signing of protocol messages exchanged using @@ -104,8 +108,6 @@ std::unique_ptr<client_update_protocol::Ecdsa> signer_; int response_code_ = -1; - - DISALLOW_COPY_AND_ASSIGN(RequestSender); }; } // namespace update_client
diff --git a/components/update_client/request_sender_unittest.cc b/components/update_client/request_sender_unittest.cc index 0815074..ef60539e 100644 --- a/components/update_client/request_sender_unittest.cc +++ b/components/update_client/request_sender_unittest.cc
@@ -43,6 +43,10 @@ public ::testing::WithParamInterface<bool> { public: RequestSenderTest(); + + RequestSenderTest(const RequestSenderTest&) = delete; + RequestSenderTest& operator=(const RequestSenderTest&) = delete; + ~RequestSenderTest() override; // Overrides from testing::Test. @@ -69,8 +73,6 @@ private: base::OnceClosure quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(RequestSenderTest); }; INSTANTIATE_TEST_SUITE_P(IsForeground, RequestSenderTest, ::testing::Bool());
diff --git a/components/update_client/unzipper.h b/components/update_client/unzipper.h index 6aed58c..fd72b71 100644 --- a/components/update_client/unzipper.h +++ b/components/update_client/unzipper.h
@@ -19,6 +19,9 @@ public: using UnzipCompleteCallback = base::OnceCallback<void(bool success)>; + Unzipper(const Unzipper&) = delete; + Unzipper& operator=(const Unzipper&) = delete; + virtual ~Unzipper() = default; virtual void Unzip(const base::FilePath& zip_file, @@ -27,9 +30,6 @@ protected: Unzipper() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(Unzipper); }; class UnzipperFactory : public base::RefCountedThreadSafe<UnzipperFactory> {
diff --git a/components/update_client/update_checker.cc b/components/update_client/update_checker.cc index d34e0ec..cb0d83c 100644 --- a/components/update_client/update_checker.cc +++ b/components/update_client/update_checker.cc
@@ -72,6 +72,10 @@ public: UpdateCheckerImpl(scoped_refptr<Configurator> config, PersistedData* metadata); + + UpdateCheckerImpl(const UpdateCheckerImpl&) = delete; + UpdateCheckerImpl& operator=(const UpdateCheckerImpl&) = delete; + ~UpdateCheckerImpl() override; // Overrides for UpdateChecker. @@ -108,8 +112,6 @@ UpdateCheckCallback update_check_callback_; std::unique_ptr<UpdaterState::Attributes> updater_state_attributes_; std::unique_ptr<RequestSender> request_sender_; - - DISALLOW_COPY_AND_ASSIGN(UpdateCheckerImpl); }; UpdateCheckerImpl::UpdateCheckerImpl(scoped_refptr<Configurator> config,
diff --git a/components/update_client/update_checker.h b/components/update_client/update_checker.h index fe015131..7c8efea 100644 --- a/components/update_client/update_checker.h +++ b/components/update_client/update_checker.h
@@ -35,6 +35,9 @@ std::unique_ptr<UpdateChecker> (*)(scoped_refptr<Configurator> config, PersistedData* persistent); + UpdateChecker(const UpdateChecker&) = delete; + UpdateChecker& operator=(const UpdateChecker&) = delete; + virtual ~UpdateChecker() = default; // Initiates an update check for the components specified by their ids. @@ -57,9 +60,6 @@ protected: UpdateChecker() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(UpdateChecker); }; } // namespace update_client
diff --git a/components/update_client/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc index 09a046a4..035522e 100644 --- a/components/update_client/update_checker_unittest.cc +++ b/components/update_client/update_checker_unittest.cc
@@ -61,6 +61,10 @@ class UpdateCheckerTest : public testing::TestWithParam<bool> { public: UpdateCheckerTest(); + + UpdateCheckerTest(const UpdateCheckerTest&) = delete; + UpdateCheckerTest& operator=(const UpdateCheckerTest&) = delete; + ~UpdateCheckerTest() override; // Overrides from testing::Test. @@ -102,8 +106,6 @@ base::test::TaskEnvironment task_environment_; base::OnceClosure quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(UpdateCheckerTest); }; // This test is parameterized for |is_foreground|.
diff --git a/components/update_client/update_query_params_delegate.h b/components/update_client/update_query_params_delegate.h index 6230e2e..d17c002 100644 --- a/components/update_client/update_query_params_delegate.h +++ b/components/update_client/update_query_params_delegate.h
@@ -17,14 +17,16 @@ class UpdateQueryParamsDelegate { public: UpdateQueryParamsDelegate(); + + UpdateQueryParamsDelegate(const UpdateQueryParamsDelegate&) = delete; + UpdateQueryParamsDelegate& operator=(const UpdateQueryParamsDelegate&) = + delete; + virtual ~UpdateQueryParamsDelegate(); // Returns additional parameters, if any. If there are any parameters, the // string should begin with a & character. virtual std::string GetExtraParams() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(UpdateQueryParamsDelegate); }; } // namespace update_client
diff --git a/components/update_client/updater_state_unittest.cc b/components/update_client/updater_state_unittest.cc index 64e55d2..2abf6ad 100644 --- a/components/update_client/updater_state_unittest.cc +++ b/components/update_client/updater_state_unittest.cc
@@ -16,10 +16,11 @@ class UpdaterStateTest : public testing::Test { public: UpdaterStateTest() = default; - ~UpdaterStateTest() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(UpdaterStateTest); + UpdaterStateTest(const UpdaterStateTest&) = delete; + UpdaterStateTest& operator=(const UpdaterStateTest&) = delete; + + ~UpdaterStateTest() override = default; }; TEST_F(UpdaterStateTest, Serialize) {
diff --git a/components/url_matcher/string_pattern.h b/components/url_matcher/string_pattern.h index 728b725..7dc4b500c 100644 --- a/components/url_matcher/string_pattern.h +++ b/components/url_matcher/string_pattern.h
@@ -27,6 +27,10 @@ static constexpr ID kInvalidId = -1; StringPattern(std::string pattern, ID id); + + StringPattern(const StringPattern&) = delete; + StringPattern& operator=(const StringPattern&) = delete; + ~StringPattern(); StringPattern(StringPattern&&); StringPattern& operator=(StringPattern&&); @@ -38,8 +42,6 @@ private: std::string pattern_; ID id_; - - DISALLOW_COPY_AND_ASSIGN(StringPattern); }; } // namespace url_matcher
diff --git a/components/url_matcher/substring_set_matcher.h b/components/url_matcher/substring_set_matcher.h index 515f7edb..b3623511 100644 --- a/components/url_matcher/substring_set_matcher.h +++ b/components/url_matcher/substring_set_matcher.h
@@ -34,6 +34,10 @@ // log(k) comes from our usage of std::map to store edges. SubstringSetMatcher(const std::vector<StringPattern>& patterns); SubstringSetMatcher(std::vector<const StringPattern*> patterns); + + SubstringSetMatcher(const SubstringSetMatcher&) = delete; + SubstringSetMatcher& operator=(const SubstringSetMatcher&) = delete; + ~SubstringSetMatcher(); // Matches |text| against all registered StringPatterns. Stores the IDs @@ -180,8 +184,6 @@ std::vector<AhoCorasickNode> tree_; bool is_empty_ = true; - - DISALLOW_COPY_AND_ASSIGN(SubstringSetMatcher); }; } // namespace url_matcher
diff --git a/components/url_matcher/url_matcher.h b/components/url_matcher/url_matcher.h index 3aacaa8..7effccb 100644 --- a/components/url_matcher/url_matcher.h +++ b/components/url_matcher/url_matcher.h
@@ -118,6 +118,11 @@ class URL_MATCHER_EXPORT URLMatcherConditionFactory { public: URLMatcherConditionFactory(); + + URLMatcherConditionFactory(const URLMatcherConditionFactory&) = delete; + URLMatcherConditionFactory& operator=(const URLMatcherConditionFactory&) = + delete; + ~URLMatcherConditionFactory(); // Canonicalizes a URL for "Create{Host,Path,Query}*Condition" searches. @@ -220,8 +225,6 @@ PatternSingletons substring_pattern_singletons_; PatternSingletons regex_pattern_singletons_; PatternSingletons origin_and_path_regex_pattern_singletons_; - - DISALLOW_COPY_AND_ASSIGN(URLMatcherConditionFactory); }; // This class represents a single URL query matching condition. The query @@ -278,13 +281,15 @@ public: explicit URLMatcherSchemeFilter(const std::string& filter); explicit URLMatcherSchemeFilter(const std::vector<std::string>& filters); + + URLMatcherSchemeFilter(const URLMatcherSchemeFilter&) = delete; + URLMatcherSchemeFilter& operator=(const URLMatcherSchemeFilter&) = delete; + ~URLMatcherSchemeFilter(); bool IsMatch(const GURL& url) const; private: std::vector<std::string> filters_; - - DISALLOW_COPY_AND_ASSIGN(URLMatcherSchemeFilter); }; // This class represents a filter for port numbers to be hooked up into a @@ -294,6 +299,10 @@ // Boundaries of a port range (both ends are included). typedef std::pair<int, int> Range; explicit URLMatcherPortFilter(const std::vector<Range>& ranges); + + URLMatcherPortFilter(const URLMatcherPortFilter&) = delete; + URLMatcherPortFilter& operator=(const URLMatcherPortFilter&) = delete; + ~URLMatcherPortFilter(); bool IsMatch(const GURL& url) const; @@ -304,8 +313,6 @@ private: std::vector<Range> ranges_; - - DISALLOW_COPY_AND_ASSIGN(URLMatcherPortFilter); }; // This class represents a set of conditions that all need to match on a @@ -368,6 +375,10 @@ class URL_MATCHER_EXPORT URLMatcher { public: URLMatcher(); + + URLMatcher(const URLMatcher&) = delete; + URLMatcher& operator=(const URLMatcher&) = delete; + ~URLMatcher(); // Adds new URLMatcherConditionSet to this URL Matcher. Each condition set @@ -424,8 +435,6 @@ std::unique_ptr<SubstringSetMatcher> url_component_matcher_; RegexSetMatcher regex_set_matcher_; RegexSetMatcher origin_and_path_regex_set_matcher_; - - DISALLOW_COPY_AND_ASSIGN(URLMatcher); }; } // namespace url_matcher
diff --git a/components/url_pattern_index/url_pattern.h b/components/url_pattern_index/url_pattern.h index cf0d86ae..2c51a0f7 100644 --- a/components/url_pattern_index/url_pattern.h +++ b/components/url_pattern_index/url_pattern.h
@@ -35,6 +35,10 @@ public: // The |url| must outlive this instance. UrlInfo(const GURL& url); + + UrlInfo(const UrlInfo&) = delete; + UrlInfo& operator=(const UrlInfo&) = delete; + ~UrlInfo(); base::StringPiece spec() const { return spec_; } @@ -51,8 +55,6 @@ // The url host component. const url::Component host_; - - DISALLOW_COPY_AND_ASSIGN(UrlInfo); }; UrlPattern();
diff --git a/components/url_pattern_index/url_pattern_index.h b/components/url_pattern_index/url_pattern_index.h index d12549b3..ddf28bdc 100644 --- a/components/url_pattern_index/url_pattern_index.h +++ b/components/url_pattern_index/url_pattern_index.h
@@ -94,6 +94,10 @@ class UrlPatternIndexBuilder { public: explicit UrlPatternIndexBuilder(flatbuffers::FlatBufferBuilder* flat_builder); + + UrlPatternIndexBuilder(const UrlPatternIndexBuilder&) = delete; + UrlPatternIndexBuilder& operator=(const UrlPatternIndexBuilder&) = delete; + ~UrlPatternIndexBuilder(); // Adds a UrlRule to the index. The caller should have already persisted the @@ -126,8 +130,6 @@ // Must outlive this instance. flatbuffers::FlatBufferBuilder* flat_builder_; - - DISALLOW_COPY_AND_ASSIGN(UrlPatternIndexBuilder); }; // Encapsulates a read-only index built over the URL patterns of a set of URL @@ -154,6 +156,10 @@ // Creates an instance to access the given |flat_index|. If |flat_index| is // nullptr, then all requests return no match. explicit UrlPatternIndexMatcher(const flat::UrlPatternIndex* flat_index); + + UrlPatternIndexMatcher(const UrlPatternIndexMatcher&) = delete; + UrlPatternIndexMatcher& operator=(const UrlPatternIndexMatcher&) = delete; + ~UrlPatternIndexMatcher(); UrlPatternIndexMatcher(UrlPatternIndexMatcher&&); UrlPatternIndexMatcher& operator=(UrlPatternIndexMatcher&&); @@ -240,8 +246,6 @@ // The number of rules in this index. Mutable since this is lazily computed. mutable absl::optional<size_t> rules_count_; - - DISALLOW_COPY_AND_ASSIGN(UrlPatternIndexMatcher); }; // Returns whether the |origin| matches the domain list of the |rule|. A match
diff --git a/components/user_manager/fake_user_manager.h b/components/user_manager/fake_user_manager.h index 8ba562f..9b73e69 100644 --- a/components/user_manager/fake_user_manager.h +++ b/components/user_manager/fake_user_manager.h
@@ -21,6 +21,10 @@ class USER_MANAGER_EXPORT FakeUserManager : public UserManagerBase { public: FakeUserManager(); + + FakeUserManager(const FakeUserManager&) = delete; + FakeUserManager& operator=(const FakeUserManager&) = delete; + ~FakeUserManager() override; // Create and add a new user. Created user is not affiliated with the domain, @@ -180,8 +184,6 @@ // Contains AccountIds for which IsCurrentUserNonCryptohomeDataEphemeral will // return true. std::set<AccountId> accounts_with_ephemeral_non_cryptohome_data_; - - DISALLOW_COPY_AND_ASSIGN(FakeUserManager); }; } // namespace user_manager
diff --git a/components/user_manager/scoped_user_manager.h b/components/user_manager/scoped_user_manager.h index 41f61f1c..46c019c 100644 --- a/components/user_manager/scoped_user_manager.h +++ b/components/user_manager/scoped_user_manager.h
@@ -21,13 +21,15 @@ class USER_MANAGER_EXPORT ScopedUserManager { public: explicit ScopedUserManager(std::unique_ptr<UserManager> user_manager); + + ScopedUserManager(const ScopedUserManager&) = delete; + ScopedUserManager& operator=(const ScopedUserManager&) = delete; + ~ScopedUserManager(); private: const std::unique_ptr<UserManager> user_manager_; UserManager* previous_user_manager_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ScopedUserManager); }; } // namespace user_manager
diff --git a/components/user_manager/user.cc b/components/user_manager/user.cc index e0359a0..1d4e6c6 100644 --- a/components/user_manager/user.cc +++ b/components/user_manager/user.cc
@@ -58,6 +58,10 @@ class RegularUser : public User { public: RegularUser(const AccountId& account_id, const UserType user_type); + + RegularUser(const RegularUser&) = delete; + RegularUser& operator=(const RegularUser&) = delete; + ~RegularUser() override; // Overridden from User: @@ -67,8 +71,6 @@ private: bool is_child_; - - DISALLOW_COPY_AND_ASSIGN(RegularUser); }; class ActiveDirectoryUser : public RegularUser { @@ -83,13 +85,14 @@ class GuestUser : public User { public: explicit GuestUser(const AccountId& guest_account_id); + + GuestUser(const GuestUser&) = delete; + GuestUser& operator=(const GuestUser&) = delete; + ~GuestUser() override; // Overridden from User: UserType GetType() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(GuestUser); }; class DeviceLocalAccountUserBase : public User { @@ -111,49 +114,53 @@ class KioskAppUser : public DeviceLocalAccountUserBase { public: explicit KioskAppUser(const AccountId& kiosk_app_account_id); + + KioskAppUser(const KioskAppUser&) = delete; + KioskAppUser& operator=(const KioskAppUser&) = delete; + ~KioskAppUser() override; // Overridden from User: UserType GetType() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(KioskAppUser); }; class ArcKioskAppUser : public DeviceLocalAccountUserBase { public: explicit ArcKioskAppUser(const AccountId& arc_kiosk_account_id); + + ArcKioskAppUser(const ArcKioskAppUser&) = delete; + ArcKioskAppUser& operator=(const ArcKioskAppUser&) = delete; + ~ArcKioskAppUser() override; // Overridden from User: UserType GetType() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(ArcKioskAppUser); }; class WebKioskAppUser : public DeviceLocalAccountUserBase { public: explicit WebKioskAppUser(const AccountId& web_kiosk_account_id); + + WebKioskAppUser(const WebKioskAppUser&) = delete; + WebKioskAppUser& operator=(const WebKioskAppUser&) = delete; + ~WebKioskAppUser() override; // Overridden from User: UserType GetType() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebKioskAppUser); }; class PublicAccountUser : public DeviceLocalAccountUserBase { public: explicit PublicAccountUser(const AccountId& account_id); + + PublicAccountUser(const PublicAccountUser&) = delete; + PublicAccountUser& operator=(const PublicAccountUser&) = delete; + ~PublicAccountUser() override; // Overridden from User: UserType GetType() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(PublicAccountUser); }; User::User(const AccountId& account_id)
diff --git a/components/user_manager/user.h b/components/user_manager/user.h index 2e21556..433036e3 100644 --- a/components/user_manager/user.h +++ b/components/user_manager/user.h
@@ -80,6 +80,10 @@ static bool TypeHasGaiaAccount(UserType user_type); explicit User(const AccountId& account_id); + + User(const User&) = delete; + User& operator=(const User&) = delete; + ~User() override; // UserInfo @@ -339,8 +343,6 @@ std::vector<base::OnceClosure> on_profile_created_observers_; std::vector<base::OnceCallback<void(bool is_affiliated)>> on_affiliation_set_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(User); }; // List of known users.
diff --git a/components/user_manager/user_image/user_image.h b/components/user_manager/user_image/user_image.h index 8bf0bb28..12f9280f 100644 --- a/components/user_manager/user_image/user_image.h +++ b/components/user_manager/user_image/user_image.h
@@ -60,6 +60,9 @@ scoped_refptr<base::RefCountedBytes> image_bytes, ImageFormat image_format); + UserImage(const UserImage&) = delete; + UserImage& operator=(const UserImage&) = delete; + virtual ~UserImage(); const gfx::ImageSkia& image() const { return image_; } @@ -95,8 +98,6 @@ base::FilePath file_path_; bool is_safe_format_ = false; ImageFormat image_format_ = FORMAT_UNKNOWN; - - DISALLOW_COPY_AND_ASSIGN(UserImage); }; } // namespace user_manager
diff --git a/components/user_manager/user_info_impl.h b/components/user_manager/user_info_impl.h index d6322fcc..df2d55e 100644 --- a/components/user_manager/user_info_impl.h +++ b/components/user_manager/user_info_impl.h
@@ -19,6 +19,10 @@ class USER_MANAGER_EXPORT UserInfoImpl : public UserInfo { public: UserInfoImpl(); + + UserInfoImpl(const UserInfoImpl&) = delete; + UserInfoImpl& operator=(const UserInfoImpl&) = delete; + ~UserInfoImpl() override; // UserInfo: @@ -31,8 +35,6 @@ private: const AccountId account_id_; gfx::ImageSkia user_image_; - - DISALLOW_COPY_AND_ASSIGN(UserInfoImpl); }; } // namespace user_manager
diff --git a/components/user_manager/user_manager.h b/components/user_manager/user_manager.h index 0aa255b..cf9fa93 100644 --- a/components/user_manager/user_manager.h +++ b/components/user_manager/user_manager.h
@@ -100,6 +100,10 @@ UserAccountData(const std::u16string& display_name, const std::u16string& given_name, const std::string& locale); + + UserAccountData(const UserAccountData&) = delete; + UserAccountData& operator=(const UserAccountData&) = delete; + ~UserAccountData(); const std::u16string& display_name() const { return display_name_; } const std::u16string& given_name() const { return given_name_; } @@ -109,8 +113,6 @@ const std::u16string display_name_; const std::u16string given_name_; const std::string locale_; - - DISALLOW_COPY_AND_ASSIGN(UserAccountData); }; // Initializes UserManager instance to this. Normally should be called right
diff --git a/components/user_manager/user_manager_base.h b/components/user_manager/user_manager_base.h index 1e4b8c88..cb6c24d3 100644 --- a/components/user_manager/user_manager_base.h +++ b/components/user_manager/user_manager_base.h
@@ -63,6 +63,10 @@ // Creates UserManagerBase with |task_runner| for UI thread. explicit UserManagerBase( scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + UserManagerBase(const UserManagerBase&) = delete; + UserManagerBase& operator=(const UserManagerBase&) = delete; + ~UserManagerBase() override; // Histogram for tracking the number of deprecated legacy supervised user @@ -405,8 +409,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WeakPtrFactory<UserManagerBase> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(UserManagerBase); }; } // namespace user_manager
diff --git a/components/user_manager/user_unittest.cc b/components/user_manager/user_unittest.cc index 96265ab..4543c83f 100644 --- a/components/user_manager/user_unittest.cc +++ b/components/user_manager/user_unittest.cc
@@ -22,14 +22,16 @@ class ScopedUser { public: ScopedUser(const User* const user) : user_(user) {} + + ScopedUser(const ScopedUser&) = delete; + ScopedUser& operator=(const ScopedUser&) = delete; + ~ScopedUser() { delete user_; } bool IsAffiliated() const { return user_ && user_->IsAffiliated(); } private: const User* const user_; - - DISALLOW_COPY_AND_ASSIGN(ScopedUser); }; const AccountId account_id = AccountId::FromUserEmailGaiaId(kEmail, kGaiaId);
diff --git a/components/user_prefs/user_prefs.h b/components/user_prefs/user_prefs.h index 392e5dc..f22741d1 100644 --- a/components/user_prefs/user_prefs.h +++ b/components/user_prefs/user_prefs.h
@@ -20,6 +20,9 @@ // base::SupportsUserData using the UserPrefs::Set() function. class USER_PREFS_EXPORT UserPrefs : public base::SupportsUserData::Data { public: + UserPrefs(const UserPrefs&) = delete; + UserPrefs& operator=(const UserPrefs&) = delete; + ~UserPrefs() override; // Retrieves the PrefService for a given context, or null if none is attached. @@ -34,8 +37,6 @@ // Non-owning; owned by embedder. PrefService* prefs_; - - DISALLOW_COPY_AND_ASSIGN(UserPrefs); }; } // namespace user_prefs
diff --git a/components/variations/BUILD.gn b/components/variations/BUILD.gn index eabd779..3880eae 100644 --- a/components/variations/BUILD.gn +++ b/components/variations/BUILD.gn
@@ -188,6 +188,7 @@ "field_trial_config:field_trial_config", "proto", "//base/test:test_support", + "//components/variations/service:constants", "//third_party/zlib/google:compression_utils", ] }
diff --git a/components/variations/entropy_provider.h b/components/variations/entropy_provider.h index ff719cd6..23273fe 100644 --- a/components/variations/entropy_provider.h +++ b/components/variations/entropy_provider.h
@@ -30,6 +30,10 @@ // should contain a large amount of entropy - for example, a textual // representation of a persistent randomly-generated 128-bit value. explicit SHA1EntropyProvider(const std::string& entropy_source); + + SHA1EntropyProvider(const SHA1EntropyProvider&) = delete; + SHA1EntropyProvider& operator=(const SHA1EntropyProvider&) = delete; + ~SHA1EntropyProvider() override; // base::FieldTrial::EntropyProvider implementation: @@ -38,8 +42,6 @@ private: const std::string entropy_source_; - - DISALLOW_COPY_AND_ASSIGN(SHA1EntropyProvider); }; // NormalizedMurmurHashEntropyProvider is an entropy provider suitable for low @@ -53,6 +55,12 @@ public: NormalizedMurmurHashEntropyProvider(uint16_t low_entropy_source, size_t low_entropy_source_max); + + NormalizedMurmurHashEntropyProvider( + const NormalizedMurmurHashEntropyProvider&) = delete; + NormalizedMurmurHashEntropyProvider& operator=( + const NormalizedMurmurHashEntropyProvider&) = delete; + ~NormalizedMurmurHashEntropyProvider() override; // base::FieldTrial::EntropyProvider: @@ -62,8 +70,6 @@ private: const uint16_t low_entropy_source_; const size_t low_entropy_source_max_; - - DISALLOW_COPY_AND_ASSIGN(NormalizedMurmurHashEntropyProvider); }; } // namespace variations
diff --git a/components/variations/entropy_provider_unittest.cc b/components/variations/entropy_provider_unittest.cc index 2798d27..add104fc 100644 --- a/components/variations/entropy_provider_unittest.cc +++ b/components/variations/entropy_provider_unittest.cc
@@ -84,6 +84,9 @@ : trial_name_(trial_name) { } + SHA1EntropyGenerator(const SHA1EntropyGenerator&) = delete; + SHA1EntropyGenerator& operator=(const SHA1EntropyGenerator&) = delete; + ~SHA1EntropyGenerator() override {} double GenerateEntropyValue() const override { @@ -98,8 +101,6 @@ private: const std::string trial_name_; - - DISALLOW_COPY_AND_ASSIGN(SHA1EntropyGenerator); }; // An TrialEntropyGenerator that uses the normalized MurmurHash entropy provider @@ -109,6 +110,11 @@ explicit NormalizedMurmurHashEntropyGenerator(const std::string& trial_name) : trial_name_(trial_name) {} + NormalizedMurmurHashEntropyGenerator( + const NormalizedMurmurHashEntropyGenerator&) = delete; + NormalizedMurmurHashEntropyGenerator& operator=( + const NormalizedMurmurHashEntropyGenerator&) = delete; + ~NormalizedMurmurHashEntropyGenerator() override {} double GenerateEntropyValue() const override { @@ -120,8 +126,6 @@ private: const std::string trial_name_; - - DISALLOW_COPY_AND_ASSIGN(NormalizedMurmurHashEntropyGenerator); }; // Tests uniformity of a given |entropy_generator| using the Chi-Square Goodness
diff --git a/components/variations/field_trial_config/field_trial_util_unittest.cc b/components/variations/field_trial_config/field_trial_util_unittest.cc index 2e7f08a3..667d4452 100644 --- a/components/variations/field_trial_config/field_trial_util_unittest.cc +++ b/components/variations/field_trial_config/field_trial_util_unittest.cc
@@ -37,6 +37,10 @@ : callback_(base::BindRepeating(&TestOverrideStringCallback::Override, base::Unretained(this))) {} + TestOverrideStringCallback(const TestOverrideStringCallback&) = delete; + TestOverrideStringCallback& operator=(const TestOverrideStringCallback&) = + delete; + virtual ~TestOverrideStringCallback() {} const VariationsSeedProcessor::UIStringOverrideCallback& callback() const { @@ -52,8 +56,6 @@ VariationsSeedProcessor::UIStringOverrideCallback callback_; OverrideMap overrides_; - - DISALLOW_COPY_AND_ASSIGN(TestOverrideStringCallback); }; // TODO(crbug.com/1167566): Remove when fake VariationsServiceClient created. @@ -90,6 +92,9 @@ public: FieldTrialUtilTest() {} + FieldTrialUtilTest(const FieldTrialUtilTest&) = delete; + FieldTrialUtilTest& operator=(const FieldTrialUtilTest&) = delete; + ~FieldTrialUtilTest() override { // Ensure that the maps are cleared between tests, since they are stored as // process singletons. @@ -100,8 +105,6 @@ protected: TestOverrideStringCallback override_callback_; TestVariationsServiceClient variation_service_client_; - - DISALLOW_COPY_AND_ASSIGN(FieldTrialUtilTest); }; } // namespace
diff --git a/components/variations/platform_field_trials.h b/components/variations/platform_field_trials.h index df468a6..ac96dc6e 100644 --- a/components/variations/platform_field_trials.h +++ b/components/variations/platform_field_trials.h
@@ -15,6 +15,10 @@ class COMPONENT_EXPORT(VARIATIONS) PlatformFieldTrials { public: PlatformFieldTrials() = default; + + PlatformFieldTrials(const PlatformFieldTrials&) = delete; + PlatformFieldTrials& operator=(const PlatformFieldTrials&) = delete; + virtual ~PlatformFieldTrials() = default; // Set up field trials for a specific platform. @@ -36,9 +40,6 @@ // Register any synthetic field trials. Will be called later than the above // methods, in particular after g_browser_process is available.. virtual void RegisterSyntheticTrials() {} - - private: - DISALLOW_COPY_AND_ASSIGN(PlatformFieldTrials); }; } // namespace variations
diff --git a/components/variations/service/safe_seed_manager.cc b/components/variations/service/safe_seed_manager.cc index 9f12bae..d8ad349 100644 --- a/components/variations/service/safe_seed_manager.cc +++ b/components/variations/service/safe_seed_manager.cc
@@ -18,24 +18,6 @@ namespace variations { -// As of the time of this writing, January 2018, users at the 99.5th percentile, -// across all platforms, tend to experience fewer than 3 consecutive crashes: -// [1], [2], [3], [4]. Note, however, that this is less true for the less-stable -// channels on some platforms. -// [1] All platforms, stable channel (consistently stable): -// https://uma.googleplex.com/timeline_v2?sid=90ac80f4573249fb341a8e49501bfcfd -// [2] Most platforms, all channels (consistently stable other than occasional -// spikes on Canary): -// https://uma.googleplex.com/timeline_v2?sid=7af5ba1969db76689a401f982a1db539 -// [3] A less stable platform, all channels: -// https://uma.googleplex.com/timeline_v2?sid=07dbc8e4fa9f08e332fb609309a21882 -// [4] Another less stable platform, all channels: -// https://uma.googleplex.com/timeline_v2?sid=a7b529ef5d52863fae2d216e963c4cbc -// Overall, the only {platform, channel} combinations that spike above 3 -// consecutive crashes are ones with very few users, plus Canary. It's probably -// not realistic to avoid false positives for these less-stable configurations. -constexpr int kCrashStreakThreshold = 3; - // Consecutive seed fetch failures are, unfortunately, a bit more common. As of // January 2018, users at the 99.5th percentile tend to see fewer than 4 // consecutive fetch failures on mobile platforms; and users at the 99th
diff --git a/components/variations/service/safe_seed_manager.h b/components/variations/service/safe_seed_manager.h index 610e403..95173c17 100644 --- a/components/variations/service/safe_seed_manager.h +++ b/components/variations/service/safe_seed_manager.h
@@ -19,12 +19,34 @@ struct ClientFilterableState; class VariationsSeedStore; +// As of January 2018, users at the 99.5th percentile, across all platforms, +// tend to experience fewer than 3 consecutive crashes: [1], [2], [3], [4]. +// Note, however, that this is less true for the less-stable channels on some +// platforms. +// [1] All platforms, stable channel (consistently stable): +// https://uma.googleplex.com/timeline_v2?sid=90ac80f4573249fb341a8e49501bfcfd +// [2] Most platforms, all channels (consistently stable other than occasional +// spikes on Canary): +// https://uma.googleplex.com/timeline_v2?sid=7af5ba1969db76689a401f982a1db539 +// [3] A less stable platform, all channels: +// https://uma.googleplex.com/timeline_v2?sid=07dbc8e4fa9f08e332fb609309a21882 +// [4] Another less stable platform, all channels: +// https://uma.googleplex.com/timeline_v2?sid=a7b529ef5d52863fae2d216e963c4cbc +// Overall, the only {platform, channel} combinations that spike above 3 +// consecutive crashes are ones with very few users, plus Canary. It's probably +// not realistic to avoid false positives for these less-stable configurations. +constexpr int kCrashStreakThreshold = 3; + // The primary class that encapsulates state for managing the safe seed. class SafeSeedManager { public: // Creates a SafeSeedManager instance and updates a safe mode pref, // kVariationsFailedToFetchSeedStreak, for bookkeeping. explicit SafeSeedManager(PrefService* local_state); + + SafeSeedManager(const SafeSeedManager&) = delete; + SafeSeedManager& operator=(const SafeSeedManager&) = delete; + virtual ~SafeSeedManager(); // Registers safe mode prefs in Local State. @@ -85,8 +107,6 @@ // The pref service used to persist the variations seed. Weak reference; must // outlive |this| instance. PrefService* local_state_; - - DISALLOW_COPY_AND_ASSIGN(SafeSeedManager); }; } // namespace variations
diff --git a/components/variations/service/safe_seed_manager_unittest.cc b/components/variations/service/safe_seed_manager_unittest.cc index 533c7fbe..4e61717 100644 --- a/components/variations/service/safe_seed_manager_unittest.cc +++ b/components/variations/service/safe_seed_manager_unittest.cc
@@ -37,6 +37,10 @@ public: explicit FakeSeedStore(PrefService* local_state) : VariationsSeedStore(local_state) {} + + FakeSeedStore(const FakeSeedStore&) = delete; + FakeSeedStore& operator=(const FakeSeedStore&) = delete; + ~FakeSeedStore() override = default; bool StoreSafeSeed(const std::string& seed_data, @@ -74,8 +78,6 @@ std::string permanent_consistency_country_; std::string session_consistency_country_; base::Time fetch_time_; - - DISALLOW_COPY_AND_ASSIGN(FakeSeedStore); }; // Passes the default test values as the active state into the
diff --git a/components/variations/service/variations_field_trial_creator.cc b/components/variations/service/variations_field_trial_creator.cc index b5bd47b2..4314cccb 100644 --- a/components/variations/service/variations_field_trial_creator.cc +++ b/components/variations/service/variations_field_trial_creator.cc
@@ -146,6 +146,9 @@ } // namespace +const base::Feature kForceFieldTrialSetupCrashForTesting{ + "ForceFieldTrialSetupCrashForTesting", base::FEATURE_DISABLED_BY_DEFAULT}; + VariationsFieldTrialCreator::VariationsFieldTrialCreator( VariationsServiceClient* client, std::unique_ptr<VariationsSeedStore> seed_store, @@ -196,19 +199,6 @@ base::FieldTrial::EnableBenchmarking(); } -#if !defined(OS_ANDROID) - // TODO(crbug/1248239): Enable Extended Variations Safe Mode on Android. - if (extend_variations_safe_mode && - !metrics_state_manager->is_background_session()) { - // If the session is expected to be a background session, then do not extend - // Variations Safe Mode. Extending Safe Mode involves monitoring for crashes - // earlier on in startup; however, this monitoring is not desired in - // background sessions, whose terminations should never be considered - // crashes. - MaybeExtendVariationsSafeMode(metrics_state_manager); - } -#endif - if (command_line->HasSwitch(switches::kForceFieldTrialParams)) { bool result = AssociateParamsFromString( command_line->GetSwitchValueASCII(switches::kForceFieldTrialParams)); @@ -235,6 +225,19 @@ } } +#if !defined(OS_ANDROID) + // TODO(crbug/1248239): Enable Extended Variations Safe Mode on Android. + if (extend_variations_safe_mode && + !metrics_state_manager->is_background_session()) { + // If the session is expected to be a background session, then do not extend + // Variations Safe Mode. Extending Safe Mode involves monitoring for crashes + // earlier on in startup; however, this monitoring is not desired in + // background sessions, whose terminations should never be considered + // crashes. + MaybeExtendVariationsSafeMode(metrics_state_manager); + } +#endif + VariationsIdsProvider* http_header_provider = VariationsIdsProvider::GetInstance(); http_header_provider->SetLowEntropySourceValue(low_entropy_source_value); @@ -301,6 +304,15 @@ base::FeatureList::SetInstance(std::move(feature_list)); + // For testing Variations Safe Mode, maybe crash here. + if (base::FeatureList::IsEnabled(kForceFieldTrialSetupCrashForTesting)) { + // We use a recognizable token for the CHECK condition, to allow tests to + // recognize the crash location in the test output. See: + // TEST_P(FieldTrialTest, ExtendedSafeModeEndToEnd) + constexpr bool crash_for_testing = false; + CHECK(crash_for_testing); + } + // This must be called after |local_state_| is initialized. platform_field_trials->SetupFieldTrials();
diff --git a/components/variations/service/variations_field_trial_creator.h b/components/variations/service/variations_field_trial_creator.h index 3f2f9030c..570ffd2 100644 --- a/components/variations/service/variations_field_trial_creator.h +++ b/components/variations/service/variations_field_trial_creator.h
@@ -85,6 +85,11 @@ VariationsFieldTrialCreator(VariationsServiceClient* client, std::unique_ptr<VariationsSeedStore> seed_store, const UIStringOverrider& ui_string_overrider); + + VariationsFieldTrialCreator(const VariationsFieldTrialCreator&) = delete; + VariationsFieldTrialCreator& operator=(const VariationsFieldTrialCreator&) = + delete; + virtual ~VariationsFieldTrialCreator(); // Returns what variations will consider to be the latest country. Returns @@ -248,10 +253,12 @@ std::unordered_map<int, std::u16string> overridden_strings_map_; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(VariationsFieldTrialCreator); }; +// A testing feature that forces a crash during field trial creation +// on developer and test builds. +extern const base::Feature kForceFieldTrialSetupCrashForTesting; + } // namespace variations #endif // COMPONENTS_VARIATIONS_SERVICE_VARIATIONS_FIELD_TRIAL_CREATOR_H_
diff --git a/components/variations/service/variations_field_trial_creator_unittest.cc b/components/variations/service/variations_field_trial_creator_unittest.cc index 31ee5c8..bea5964 100644 --- a/components/variations/service/variations_field_trial_creator_unittest.cc +++ b/components/variations/service/variations_field_trial_creator_unittest.cc
@@ -41,6 +41,7 @@ #include "components/variations/service/variations_service_client.h" #include "components/variations/variations_seed_store.h" #include "components/variations/variations_switches.h" +#include "components/variations/variations_test_utils.h" #include "components/version_info/channel.h" #include "components/version_info/version_info.h" #include "services/network/public/cpp/shared_url_loader_factory.h" @@ -60,7 +61,6 @@ using ::testing::Return; // Constants used to create the test seeds. -const char kTestSeedStudyName[] = "test"; const char kTestSeedExperimentName[] = "abc"; const char kTestSafeSeedExperimentName[] = "abc.safe"; const int kTestSeedExperimentProbability = 100; @@ -116,13 +116,6 @@ return seed; } -void DisableTestingConfig() { - // If the testing config is in use, the seed will not be used to set up field - // trials. Disable the testing config to exercise CreateTrialsFromSeed(). - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kDisableFieldTrialTestingConfig); -} - #if defined(OS_ANDROID) const char kTestSeedCountry[] = "in"; @@ -150,6 +143,10 @@ class TestPlatformFieldTrials : public PlatformFieldTrials { public: TestPlatformFieldTrials() = default; + + TestPlatformFieldTrials(const TestPlatformFieldTrials&) = delete; + TestPlatformFieldTrials& operator=(const TestPlatformFieldTrials&) = delete; + ~TestPlatformFieldTrials() override = default; // PlatformFieldTrials: @@ -158,15 +155,16 @@ bool has_seed, const base::FieldTrial::EntropyProvider* low_entropy_provider, base::FeatureList* feature_list) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(TestPlatformFieldTrials); }; class MockSafeSeedManager : public SafeSeedManager { public: explicit MockSafeSeedManager(PrefService* local_state) : SafeSeedManager(local_state) {} + + MockSafeSeedManager(const MockSafeSeedManager&) = delete; + MockSafeSeedManager& operator=(const MockSafeSeedManager&) = delete; + ~MockSafeSeedManager() override = default; MOCK_CONST_METHOD0(ShouldRunInSafeMode, bool()); @@ -184,15 +182,17 @@ DoSetActiveSeedState(seed_data, base64_seed_signature, client_filterable_state.get(), seed_fetch_time); } - - private: - DISALLOW_COPY_AND_ASSIGN(MockSafeSeedManager); }; // TODO(crbug.com/1167566): Remove when fake VariationsServiceClient created. class TestVariationsServiceClient : public VariationsServiceClient { public: TestVariationsServiceClient() = default; + + TestVariationsServiceClient(const TestVariationsServiceClient&) = delete; + TestVariationsServiceClient& operator=(const TestVariationsServiceClient&) = + delete; + ~TestVariationsServiceClient() override = default; // VariationsServiceClient: @@ -222,8 +222,6 @@ } std::string restrict_parameter_; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsServiceClient); }; class MockVariationsServiceClient : public TestVariationsServiceClient { @@ -235,6 +233,10 @@ public: explicit TestVariationsSeedStore(PrefService* local_state) : VariationsSeedStore(local_state) {} + + TestVariationsSeedStore(const TestVariationsSeedStore&) = delete; + TestVariationsSeedStore& operator=(const TestVariationsSeedStore&) = delete; + ~TestVariationsSeedStore() override = default; bool LoadSeed(VariationsSeed* seed, @@ -272,8 +274,6 @@ // Whether to simulate having an empty safe seed. bool has_empty_safe_seed_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsSeedStore); }; class TestVariationsFieldTrialCreator : public VariationsFieldTrialCreator { @@ -300,6 +300,11 @@ metrics_state_manager_->InstantiateFieldTrialList(); } + TestVariationsFieldTrialCreator(const TestVariationsFieldTrialCreator&) = + delete; + TestVariationsFieldTrialCreator& operator=( + const TestVariationsFieldTrialCreator&) = delete; + ~TestVariationsFieldTrialCreator() override = default; // A convenience wrapper around SetupFieldTrials() which passes default values @@ -326,8 +331,6 @@ SafeSeedManager* const safe_seed_manager_; base::Time build_time_; std::unique_ptr<metrics::MetricsStateManager> metrics_state_manager_; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsFieldTrialCreator); }; } // namespace @@ -340,6 +343,9 @@ global_feature_list_ = base::FeatureList::ClearInstanceForTesting(); } + FieldTrialCreatorTest(const FieldTrialCreatorTest&) = delete; + FieldTrialCreatorTest& operator=(const FieldTrialCreatorTest&) = delete; + ~FieldTrialCreatorTest() override { // Clear out any features created by tests in this suite, and restore the // global feature list. @@ -363,8 +369,6 @@ variations::VariationsIdsProvider::Mode::kUseSignedInState}; // The global feature list, which is ignored by tests in this suite. std::unique_ptr<base::FeatureList> global_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(FieldTrialCreatorTest); }; #if !defined(OS_ANDROID)
diff --git a/components/variations/service/variations_service_unittest.cc b/components/variations/service/variations_service_unittest.cc index 50db7787..b81b4ba 100644 --- a/components/variations/service/variations_service_unittest.cc +++ b/components/variations/service/variations_service_unittest.cc
@@ -82,6 +82,11 @@ base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( &test_url_loader_factory_); } + + TestVariationsServiceClient(const TestVariationsServiceClient&) = delete; + TestVariationsServiceClient& operator=(const TestVariationsServiceClient&) = + delete; + ~TestVariationsServiceClient() override {} // VariationsServiceClient: @@ -119,8 +124,6 @@ version_info::Channel channel_ = version_info::Channel::UNKNOWN; network::TestURLLoaderFactory test_url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsServiceClient); }; // A test class used to validate expected functionality in VariationsService. @@ -148,6 +151,9 @@ set_variations_server_url(interception_url_); } + TestVariationsService(const TestVariationsService&) = delete; + TestVariationsService& operator=(const TestVariationsService&) = delete; + ~TestVariationsService() override {} GURL interception_url() { return interception_url_; } @@ -235,14 +241,17 @@ std::string stored_country_; bool delta_compressed_seed_; bool gzip_compressed_seed_; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsService); }; class TestVariationsServiceObserver : public VariationsService::Observer { public: TestVariationsServiceObserver() : best_effort_changes_notified_(0), crticial_changes_notified_(0) {} + + TestVariationsServiceObserver(const TestVariationsServiceObserver&) = delete; + TestVariationsServiceObserver& operator=( + const TestVariationsServiceObserver&) = delete; + ~TestVariationsServiceObserver() override {} void OnExperimentChangesDetected(Severity severity) override { @@ -270,8 +279,6 @@ // Number of notification received with CRITICAL severity. int crticial_changes_notified_; - - DISALLOW_COPY_AND_ASSIGN(TestVariationsServiceObserver); }; // Constants used to create the test seed.
diff --git a/components/variations/synthetic_trial_registry_unittest.cc b/components/variations/synthetic_trial_registry_unittest.cc index 5f13d9f3..c1385ff3 100644 --- a/components/variations/synthetic_trial_registry_unittest.cc +++ b/components/variations/synthetic_trial_registry_unittest.cc
@@ -22,6 +22,11 @@ class SyntheticTrialRegistryTest : public ::testing::Test { public: SyntheticTrialRegistryTest() { InitCrashKeys(); } + + SyntheticTrialRegistryTest(const SyntheticTrialRegistryTest&) = delete; + SyntheticTrialRegistryTest& operator=(const SyntheticTrialRegistryTest&) = + delete; + ~SyntheticTrialRegistryTest() override { ClearCrashKeysInstanceForTesting(); } // Returns true if there is a synthetic trial in the given vector that matches @@ -57,8 +62,6 @@ private: base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(SyntheticTrialRegistryTest); }; TEST_F(SyntheticTrialRegistryTest, RegisterSyntheticTrial) {
diff --git a/components/variations/variations_associated_data_unittest.cc b/components/variations/variations_associated_data_unittest.cc index e1ecb18..110c813 100644 --- a/components/variations/variations_associated_data_unittest.cc +++ b/components/variations/variations_associated_data_unittest.cc
@@ -38,14 +38,15 @@ public: VariationsAssociatedDataTest() {} + VariationsAssociatedDataTest(const VariationsAssociatedDataTest&) = delete; + VariationsAssociatedDataTest& operator=(const VariationsAssociatedDataTest&) = + delete; + ~VariationsAssociatedDataTest() override { // Ensure that the maps are cleared between tests, since they are stored as // process singletons. testing::ClearAllVariationIDs(); } - - private: - DISALLOW_COPY_AND_ASSIGN(VariationsAssociatedDataTest); }; // Test that if the trial is immediately disabled, GetGoogleVariationID just
diff --git a/components/variations/variations_crash_keys.cc b/components/variations/variations_crash_keys.cc index e78db51..f99ec45 100644 --- a/components/variations/variations_crash_keys.cc +++ b/components/variations/variations_crash_keys.cc
@@ -52,6 +52,10 @@ class VariationsCrashKeys final : public base::FieldTrialList::Observer { public: VariationsCrashKeys(); + + VariationsCrashKeys(const VariationsCrashKeys&) = delete; + VariationsCrashKeys& operator=(const VariationsCrashKeys&) = delete; + ~VariationsCrashKeys() override; // base::FieldTrialList::Observer: @@ -99,8 +103,6 @@ size_t num_synthetic_trials_ = 0; SEQUENCE_CHECKER(sequence_checker_); - - DISALLOW_COPY_AND_ASSIGN(VariationsCrashKeys); }; VariationsCrashKeys::VariationsCrashKeys() {
diff --git a/components/variations/variations_crash_keys_chromeos_unittest.cc b/components/variations/variations_crash_keys_chromeos_unittest.cc index 66eb0e16..ae0c6059 100644 --- a/components/variations/variations_crash_keys_chromeos_unittest.cc +++ b/components/variations/variations_crash_keys_chromeos_unittest.cc
@@ -26,6 +26,11 @@ crash_reporter::InitializeCrashKeysForTesting(); } + VariationsCrashKeysChromeOsTest(const VariationsCrashKeysChromeOsTest&) = + delete; + VariationsCrashKeysChromeOsTest& operator=( + const VariationsCrashKeysChromeOsTest&) = delete; + ~VariationsCrashKeysChromeOsTest() override { SyntheticTrialsActiveGroupIdProvider::GetInstance()->ResetForTesting(); ClearCrashKeysInstanceForTesting(); @@ -34,9 +39,6 @@ protected: base::test::TaskEnvironment task_environment_; - - private: - DISALLOW_COPY_AND_ASSIGN(VariationsCrashKeysChromeOsTest); }; TEST_F(VariationsCrashKeysChromeOsTest, WritesVariationsList) {
diff --git a/components/variations/variations_crash_keys_unittest.cc b/components/variations/variations_crash_keys_unittest.cc index 259aaf6..1d11e7c1 100644 --- a/components/variations/variations_crash_keys_unittest.cc +++ b/components/variations/variations_crash_keys_unittest.cc
@@ -35,6 +35,9 @@ crash_reporter::InitializeCrashKeysForTesting(); } + VariationsCrashKeysTest(const VariationsCrashKeysTest&) = delete; + VariationsCrashKeysTest& operator=(const VariationsCrashKeysTest&) = delete; + ~VariationsCrashKeysTest() override { SyntheticTrialsActiveGroupIdProvider::GetInstance()->ResetForTesting(); ClearCrashKeysInstanceForTesting(); @@ -43,8 +46,6 @@ private: base::test::TaskEnvironment task_environment_; - - DISALLOW_COPY_AND_ASSIGN(VariationsCrashKeysTest); }; } // namespace
diff --git a/components/variations/variations_params_manager.h b/components/variations/variations_params_manager.h index b049894..8dbecc1f 100644 --- a/components/variations/variations_params_manager.h +++ b/components/variations/variations_params_manager.h
@@ -50,6 +50,10 @@ const std::string& trial_name, const std::map<std::string, std::string>& param_values, const std::set<std::string>& associated_features); + + VariationParamsManager(const VariationParamsManager&) = delete; + VariationParamsManager& operator=(const VariationParamsManager&) = delete; + ~VariationParamsManager(); // Associates |param_values| with the given |trial_name|. |param_values| maps @@ -92,8 +96,6 @@ base::test::ScopedFieldTrialListResetter field_trial_list_resetter_; std::unique_ptr<base::FieldTrialList> field_trial_list_; std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_; - - DISALLOW_COPY_AND_ASSIGN(VariationParamsManager); }; } // namespace testing
diff --git a/components/variations/variations_request_scheduler.h b/components/variations/variations_request_scheduler.h index d2b114f..85de6db 100644 --- a/components/variations/variations_request_scheduler.h +++ b/components/variations/variations_request_scheduler.h
@@ -19,6 +19,10 @@ // A helper class that makes VariationsService requests at the correct times. class COMPONENT_EXPORT(VARIATIONS) VariationsRequestScheduler { public: + VariationsRequestScheduler(const VariationsRequestScheduler&) = delete; + VariationsRequestScheduler& operator=(const VariationsRequestScheduler&) = + delete; + virtual ~VariationsRequestScheduler(); // Starts the task. This can be a repeated event or a one-off. @@ -63,8 +67,6 @@ // A one-shot timer used for scheduling out-of-band fetches. base::OneShotTimer one_shot_timer_; - - DISALLOW_COPY_AND_ASSIGN(VariationsRequestScheduler); }; } // namespace variations
diff --git a/components/variations/variations_request_scheduler_mobile.h b/components/variations/variations_request_scheduler_mobile.h index fe8193e5..d40fbf5 100644 --- a/components/variations/variations_request_scheduler_mobile.h +++ b/components/variations/variations_request_scheduler_mobile.h
@@ -25,6 +25,12 @@ // is the PrefService that contains the time of the last fetch. VariationsRequestSchedulerMobile(const base::RepeatingClosure& task, PrefService* local_state); + + VariationsRequestSchedulerMobile(const VariationsRequestSchedulerMobile&) = + delete; + VariationsRequestSchedulerMobile& operator=( + const VariationsRequestSchedulerMobile&) = delete; + ~VariationsRequestSchedulerMobile() override; // Base class overrides. @@ -48,8 +54,6 @@ // The time the last seed request was initiated. base::Time last_request_time_; - - DISALLOW_COPY_AND_ASSIGN(VariationsRequestSchedulerMobile); }; } // namespace variations
diff --git a/components/variations/variations_seed_processor.h b/components/variations/variations_seed_processor.h index c8cca04..d26f298d 100644 --- a/components/variations/variations_seed_processor.h +++ b/components/variations/variations_seed_processor.h
@@ -35,6 +35,10 @@ base::RepeatingCallback<void(uint32_t, const std::u16string&)>; VariationsSeedProcessor(); + + VariationsSeedProcessor(const VariationsSeedProcessor&) = delete; + VariationsSeedProcessor& operator=(const VariationsSeedProcessor&) = delete; + virtual ~VariationsSeedProcessor(); // Creates field trials from the specified variations |seed|, filtered @@ -86,8 +90,6 @@ const UIStringOverrideCallback& override_callback, const base::FieldTrial::EntropyProvider* low_entropy_provider, base::FeatureList* feature_list); - - DISALLOW_COPY_AND_ASSIGN(VariationsSeedProcessor); }; } // namespace variations
diff --git a/components/variations/variations_seed_processor_unittest.cc b/components/variations/variations_seed_processor_unittest.cc index fd9eb9d..722e5ddf 100644 --- a/components/variations/variations_seed_processor_unittest.cc +++ b/components/variations/variations_seed_processor_unittest.cc
@@ -94,6 +94,10 @@ : callback_(base::BindRepeating(&TestOverrideStringCallback::Override, base::Unretained(this))) {} + TestOverrideStringCallback(const TestOverrideStringCallback&) = delete; + TestOverrideStringCallback& operator=(const TestOverrideStringCallback&) = + delete; + virtual ~TestOverrideStringCallback() {} const VariationsSeedProcessor::UIStringOverrideCallback& callback() const { @@ -109,8 +113,6 @@ VariationsSeedProcessor::UIStringOverrideCallback callback_; OverrideMap overrides_; - - DISALLOW_COPY_AND_ASSIGN(TestOverrideStringCallback); }; } // namespace @@ -120,6 +122,10 @@ VariationsSeedProcessorTest() { } + VariationsSeedProcessorTest(const VariationsSeedProcessorTest&) = delete; + VariationsSeedProcessorTest& operator=(const VariationsSeedProcessorTest&) = + delete; + ~VariationsSeedProcessorTest() override { // Ensure that the maps are cleared between tests, since they are stored as // process singletons. @@ -182,9 +188,6 @@ protected: TestOverrideStringCallback override_callback_; - - private: - DISALLOW_COPY_AND_ASSIGN(VariationsSeedProcessorTest); }; TEST_F(VariationsSeedProcessorTest, AllowForceGroupAndVariationId) {
diff --git a/components/variations/variations_seed_simulator.h b/components/variations/variations_seed_simulator.h index 3cb9e1f..90bfedc 100644 --- a/components/variations/variations_seed_simulator.h +++ b/components/variations/variations_seed_simulator.h
@@ -54,6 +54,10 @@ VariationsSeedSimulator( const base::FieldTrial::EntropyProvider& default_entropy_provider, const base::FieldTrial::EntropyProvider& low_entropy_provider); + + VariationsSeedSimulator(const VariationsSeedSimulator&) = delete; + VariationsSeedSimulator& operator=(const VariationsSeedSimulator&) = delete; + virtual ~VariationsSeedSimulator(); // Computes differences between the current process' field trial state and @@ -99,8 +103,6 @@ const base::FieldTrial::EntropyProvider& default_entropy_provider_; const base::FieldTrial::EntropyProvider& low_entropy_provider_; - - DISALLOW_COPY_AND_ASSIGN(VariationsSeedSimulator); }; } // namespace variations
diff --git a/components/variations/variations_seed_simulator_unittest.cc b/components/variations/variations_seed_simulator_unittest.cc index 8c7f8ad..681e9adf 100644 --- a/components/variations/variations_seed_simulator_unittest.cc +++ b/components/variations/variations_seed_simulator_unittest.cc
@@ -73,6 +73,10 @@ public: VariationsSeedSimulatorTest() {} + VariationsSeedSimulatorTest(const VariationsSeedSimulatorTest&) = delete; + VariationsSeedSimulatorTest& operator=(const VariationsSeedSimulatorTest&) = + delete; + ~VariationsSeedSimulatorTest() override { // Ensure that the maps are cleared between tests, since they are stored as // process singletons. @@ -128,9 +132,6 @@ result.kill_best_effort_group_change_count, result.kill_critical_group_change_count); } - - private: - DISALLOW_COPY_AND_ASSIGN(VariationsSeedSimulatorTest); }; TEST_F(VariationsSeedSimulatorTest, PermanentNoChanges) {
diff --git a/components/variations/variations_seed_store.h b/components/variations/variations_seed_store.h index 84d4b957..7c61b9b 100644 --- a/components/variations/variations_seed_store.h +++ b/components/variations/variations_seed_store.h
@@ -55,6 +55,10 @@ std::unique_ptr<SeedResponse> initial_seed, bool signature_verification_enabled, bool use_first_run_prefs = true); + + VariationsSeedStore(const VariationsSeedStore&) = delete; + VariationsSeedStore& operator=(const VariationsSeedStore&) = delete; + virtual ~VariationsSeedStore(); // Loads the variations seed data from local state into |seed|, as well as the @@ -245,8 +249,6 @@ // Whether this may read or write to Java "first run" SharedPreferences. const bool use_first_run_prefs_; - - DISALLOW_COPY_AND_ASSIGN(VariationsSeedStore); }; } // namespace variations
diff --git a/components/variations/variations_seed_store_unittest.cc b/components/variations/variations_seed_store_unittest.cc index 6cd0f30..f85cc1c 100644 --- a/components/variations/variations_seed_store_unittest.cc +++ b/components/variations/variations_seed_store_unittest.cc
@@ -48,15 +48,16 @@ std::move(initial_seed), /*signature_verification_enabled=*/false, use_first_run_prefs) {} + + TestVariationsSeedStore(const TestVariationsSeedStore&) = delete; + TestVariationsSeedStore& operator=(const TestVariationsSeedStore&) = delete; + ~TestVariationsSeedStore() override = default; bool StoreSeedForTesting(const std::string& seed_data) { return StoreSeedData(seed_data, std::string(), std::string(), base::Time::Now(), false, false, nullptr); } - - private: - DISALLOW_COPY_AND_ASSIGN(TestVariationsSeedStore); }; // Signature verification is disabled on Android and iOS for performance @@ -66,10 +67,13 @@ public: explicit SignatureVerifyingVariationsSeedStore(PrefService* local_state) : VariationsSeedStore(local_state) {} - ~SignatureVerifyingVariationsSeedStore() override = default; - private: - DISALLOW_COPY_AND_ASSIGN(SignatureVerifyingVariationsSeedStore); + SignatureVerifyingVariationsSeedStore( + const SignatureVerifyingVariationsSeedStore&) = delete; + SignatureVerifyingVariationsSeedStore& operator=( + const SignatureVerifyingVariationsSeedStore&) = delete; + + ~SignatureVerifyingVariationsSeedStore() override = default; }; // Creates a base::Time object from the corresponding raw value. The specific
diff --git a/components/variations/variations_test_utils.cc b/components/variations/variations_test_utils.cc index f82a604..559f7835 100644 --- a/components/variations/variations_test_utils.cc +++ b/components/variations/variations_test_utils.cc
@@ -8,6 +8,7 @@ #include "base/command_line.h" #include "base/feature_list.h" #include "components/variations/proto/client_variations.pb.h" +#include "components/variations/service/variations_safe_mode_constants.h" #include "components/variations/variations_associated_data.h" #include "components/variations/variations_switches.h" #include "third_party/zlib/google/compression_utils.h" @@ -72,4 +73,18 @@ return trial; } +int SetUpExtendedSafeModeExperiment(const std::string& group_name) { + int default_group; + scoped_refptr<base::FieldTrial> trial( + base::FieldTrialList::FactoryGetFieldTrial( + kExtendedSafeModeTrial, 100, kDefaultGroup, + base::FieldTrial::ONE_TIME_RANDOMIZED, &default_group)); + + int active_group = default_group; + if (group_name != kDefaultGroup) + active_group = trial->AppendGroup(group_name, 100); + trial->SetForced(); + return active_group; +} + } // namespace variations
diff --git a/components/variations/variations_test_utils.h b/components/variations/variations_test_utils.h index 1310a18..76be121 100644 --- a/components/variations/variations_test_utils.h +++ b/components/variations/variations_test_utils.h
@@ -41,6 +41,10 @@ IDCollectionKey key, VariationID id); +// Sets up the extended safe mode experiment such that |group_name| is the +// active group. Returns the numeric value that denotes the active group. +int SetUpExtendedSafeModeExperiment(const std::string& group_name); + } // namespace variations #endif // COMPONENTS_VARIATIONS_VARIATIONS_TEST_UTILS_H_
diff --git a/components/visitedlink/browser/visitedlink_event_listener.h b/components/visitedlink/browser/visitedlink_event_listener.h index f0dca6a..a04aa7d2 100644 --- a/components/visitedlink/browser/visitedlink_event_listener.h +++ b/components/visitedlink/browser/visitedlink_event_listener.h
@@ -30,6 +30,10 @@ public content::NotificationObserver { public: explicit VisitedLinkEventListener(content::BrowserContext* browser_context); + + VisitedLinkEventListener(const VisitedLinkEventListener&) = delete; + VisitedLinkEventListener& operator=(const VisitedLinkEventListener&) = delete; + ~VisitedLinkEventListener() override; void NewTable(base::ReadOnlySharedMemoryRegion* table_region) override; @@ -68,8 +72,6 @@ // Used to filter RENDERER_PROCESS_CREATED notifications to renderers that // belong to this BrowserContext. content::BrowserContext* browser_context_; - - DISALLOW_COPY_AND_ASSIGN(VisitedLinkEventListener); }; } // namespace visitedlink
diff --git a/components/visitedlink/browser/visitedlink_writer.h b/components/visitedlink/browser/visitedlink_writer.h index d56323f1..51c73dd 100644 --- a/components/visitedlink/browser/visitedlink_writer.h +++ b/components/visitedlink/browser/visitedlink_writer.h
@@ -101,6 +101,10 @@ bool suppress_rebuild, const base::FilePath& filename, int32_t default_table_size); + + VisitedLinkWriter(const VisitedLinkWriter&) = delete; + VisitedLinkWriter& operator=(const VisitedLinkWriter&) = delete; + ~VisitedLinkWriter() override; // Must be called immediately after object creation. Nothing else will work @@ -479,8 +483,6 @@ bool suppress_rebuild_ = false; base::WeakPtrFactory<VisitedLinkWriter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VisitedLinkWriter); }; // NOTE: These methods are defined inline here, so we can share the compilation
diff --git a/components/visitedlink/common/visitedlink_common.h b/components/visitedlink/common/visitedlink_common.h index ad123c3f..d45999fe 100644 --- a/components/visitedlink/common/visitedlink_common.h +++ b/components/visitedlink/common/visitedlink_common.h
@@ -59,6 +59,10 @@ static const Hash null_hash_; VisitedLinkCommon(); + + VisitedLinkCommon(const VisitedLinkCommon&) = delete; + VisitedLinkCommon& operator=(const VisitedLinkCommon&) = delete; + virtual ~VisitedLinkCommon(); // Returns the fingerprint for the given URL. @@ -132,9 +136,6 @@ // salt used for each URL when computing the fingerprint uint8_t salt_[LINK_SALT_LENGTH]; - - private: - DISALLOW_COPY_AND_ASSIGN(VisitedLinkCommon); }; } // namespace visitedlink
diff --git a/components/visitedlink/renderer/visitedlink_reader.h b/components/visitedlink/renderer/visitedlink_reader.h index 2706fae..aeeca79 100644 --- a/components/visitedlink/renderer/visitedlink_reader.h +++ b/components/visitedlink/renderer/visitedlink_reader.h
@@ -23,6 +23,10 @@ public mojom::VisitedLinkNotificationSink { public: VisitedLinkReader(); + + VisitedLinkReader(const VisitedLinkReader&) = delete; + VisitedLinkReader& operator=(const VisitedLinkReader&) = delete; + ~VisitedLinkReader() override; base::RepeatingCallback< @@ -46,8 +50,6 @@ mojo::Receiver<mojom::VisitedLinkNotificationSink> receiver_{this}; base::WeakPtrFactory<VisitedLinkReader> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(VisitedLinkReader); }; } // namespace visitedlink
diff --git a/components/visitedlink/test/visitedlink_perftest.cc b/components/visitedlink/test/visitedlink_perftest.cc index 8166343..3cb76583 100644 --- a/components/visitedlink/test/visitedlink_perftest.cc +++ b/components/visitedlink/test/visitedlink_perftest.cc
@@ -53,6 +53,10 @@ class TimeLogger { public: explicit TimeLogger(std::string metric_suffix); + + TimeLogger(const TimeLogger&) = delete; + TimeLogger& operator=(const TimeLogger&) = delete; + ~TimeLogger(); void Done(); @@ -60,8 +64,6 @@ bool logged_; std::string metric_suffix_; base::ElapsedTimer timer_; - - DISALLOW_COPY_AND_ASSIGN(TimeLogger); }; TimeLogger::TimeLogger(std::string metric_suffix)
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc index ec3b231..fce79602 100644 --- a/components/visitedlink/test/visitedlink_unittest.cc +++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -635,15 +635,18 @@ content::Source<RenderProcessHost>(this), content::NotificationService::NoDetails()); } + + VisitRelayingRenderProcessHost(const VisitRelayingRenderProcessHost&) = + delete; + VisitRelayingRenderProcessHost& operator=( + const VisitRelayingRenderProcessHost&) = delete; + ~VisitRelayingRenderProcessHost() override { content::NotificationService::current()->Notify( content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, content::Source<content::RenderProcessHost>(this), content::NotificationService::NoDetails()); } - - private: - DISALLOW_COPY_AND_ASSIGN(VisitRelayingRenderProcessHost); }; class VisitedLinkRenderProcessHostFactory
diff --git a/components/viz/client/client_resource_provider.h b/components/viz/client/client_resource_provider.h index dd147851..049f4ea 100644 --- a/components/viz/client/client_resource_provider.h +++ b/components/viz/client/client_resource_provider.h
@@ -45,6 +45,10 @@ class VIZ_CLIENT_EXPORT ClientResourceProvider { public: ClientResourceProvider(); + + ClientResourceProvider(const ClientResourceProvider&) = delete; + ClientResourceProvider& operator=(const ClientResourceProvider&) = delete; + ~ClientResourceProvider(); static gpu::SyncToken GenerateSyncTokenHelper(gpu::gles2::GLES2Interface* gl); @@ -119,14 +123,16 @@ ResourceFormat format, SkSurfaceProps surface_props, int msaa_sample_count); + + ScopedSkSurface(const ScopedSkSurface&) = delete; + ScopedSkSurface& operator=(const ScopedSkSurface&) = delete; + ~ScopedSkSurface(); SkSurface* surface() const { return surface_.get(); } private: sk_sp<SkSurface> surface_; - - DISALLOW_COPY_AND_ASSIGN(ScopedSkSurface); }; private: @@ -144,8 +150,6 @@ // The ResourceIds in ClientResourceProvider start from 1 to avoid // conflicts with id from DisplayResourceProvider. ResourceIdGenerator id_generator_; - - DISALLOW_COPY_AND_ASSIGN(ClientResourceProvider); }; } // namespace viz
diff --git a/components/viz/client/frame_eviction_manager.h b/components/viz/client/frame_eviction_manager.h index 2d0b8e0..a8cbc043 100644 --- a/components/viz/client/frame_eviction_manager.h +++ b/components/viz/client/frame_eviction_manager.h
@@ -36,10 +36,11 @@ class VIZ_CLIENT_EXPORT ScopedPause { public: ScopedPause(); - ~ScopedPause(); - private: - DISALLOW_COPY_AND_ASSIGN(ScopedPause); + ScopedPause(const ScopedPause&) = delete; + ScopedPause& operator=(const ScopedPause&) = delete; + + ~ScopedPause(); }; static FrameEvictionManager* GetInstance();
diff --git a/components/viz/client/frame_eviction_manager_unittest.cc b/components/viz/client/frame_eviction_manager_unittest.cc index 1e2443c..e64f433 100644 --- a/components/viz/client/frame_eviction_manager_unittest.cc +++ b/components/viz/client/frame_eviction_manager_unittest.cc
@@ -16,6 +16,12 @@ class TestFrameEvictionManagerClient : public FrameEvictionManagerClient { public: TestFrameEvictionManagerClient() = default; + + TestFrameEvictionManagerClient(const TestFrameEvictionManagerClient&) = + delete; + TestFrameEvictionManagerClient& operator=( + const TestFrameEvictionManagerClient&) = delete; + ~TestFrameEvictionManagerClient() override = default; // FrameEvictionManagerClient: @@ -28,8 +34,6 @@ private: bool has_frame_ = true; - - DISALLOW_COPY_AND_ASSIGN(TestFrameEvictionManagerClient); }; } // namespace
diff --git a/components/viz/client/frame_evictor.h b/components/viz/client/frame_evictor.h index ad901f6..7754b6a 100644 --- a/components/viz/client/frame_evictor.h +++ b/components/viz/client/frame_evictor.h
@@ -21,6 +21,10 @@ class VIZ_CLIENT_EXPORT FrameEvictor : public FrameEvictionManagerClient { public: explicit FrameEvictor(FrameEvictorClient* client); + + FrameEvictor(const FrameEvictor&) = delete; + FrameEvictor& operator=(const FrameEvictor&) = delete; + ~FrameEvictor() override; // Called when the parent allocates a new LocalSurfaceId for this child and @@ -45,8 +49,6 @@ FrameEvictorClient* client_; bool has_surface_ = false; bool visible_ = false; - - DISALLOW_COPY_AND_ASSIGN(FrameEvictor); }; } // namespace viz
diff --git a/components/viz/common/frame_sinks/begin_frame_source.h b/components/viz/common/frame_sinks/begin_frame_source.h index d639e05..5581531 100644 --- a/components/viz/common/frame_sinks/begin_frame_source.h +++ b/components/viz/common/frame_sinks/begin_frame_source.h
@@ -93,6 +93,10 @@ class VIZ_COMMON_EXPORT BeginFrameObserverBase : public BeginFrameObserver { public: BeginFrameObserverBase(); + + BeginFrameObserverBase(const BeginFrameObserverBase&) = delete; + BeginFrameObserverBase& operator=(const BeginFrameObserverBase&) = delete; + ~BeginFrameObserverBase() override; // BeginFrameObserver @@ -115,9 +119,6 @@ BeginFrameArgs last_begin_frame_args_; int64_t dropped_begin_frame_args_ = 0; bool wants_animate_only_begin_frames_ = false; - - private: - DISALLOW_COPY_AND_ASSIGN(BeginFrameObserverBase); }; // Interface for a class which produces BeginFrame calls to a @@ -262,6 +263,11 @@ public: explicit BackToBackBeginFrameSource( std::unique_ptr<DelayBasedTimeSource> time_source); + + BackToBackBeginFrameSource(const BackToBackBeginFrameSource&) = delete; + BackToBackBeginFrameSource& operator=(const BackToBackBeginFrameSource&) = + delete; + ~BackToBackBeginFrameSource() override; // BeginFrameSource implementation. @@ -283,8 +289,6 @@ base::flat_set<BeginFrameObserver*> pending_begin_frame_observers_; uint64_t next_sequence_number_; base::WeakPtrFactory<BackToBackBeginFrameSource> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(BackToBackBeginFrameSource); }; // A frame source which is locked to an external parameters provides from a @@ -295,6 +299,11 @@ public: DelayBasedBeginFrameSource(std::unique_ptr<DelayBasedTimeSource> time_source, uint32_t restart_id); + + DelayBasedBeginFrameSource(const DelayBasedBeginFrameSource&) = delete; + DelayBasedBeginFrameSource& operator=(const DelayBasedBeginFrameSource&) = + delete; + ~DelayBasedBeginFrameSource() override; // BeginFrameSource implementation. @@ -326,8 +335,6 @@ BeginFrameArgs last_begin_frame_args_; BeginFrameArgsGenerator begin_frame_args_generator_; - - DISALLOW_COPY_AND_ASSIGN(DelayBasedBeginFrameSource); }; class VIZ_COMMON_EXPORT ExternalBeginFrameSourceClient { @@ -347,6 +354,10 @@ // calls to |client| are made during construction / destruction. explicit ExternalBeginFrameSource(ExternalBeginFrameSourceClient* client, uint32_t restart_id = kNotRestartableId); + + ExternalBeginFrameSource(const ExternalBeginFrameSource&) = delete; + ExternalBeginFrameSource& operator=(const ExternalBeginFrameSource&) = delete; + ~ExternalBeginFrameSource() override; // BeginFrameSource implementation. @@ -384,8 +395,6 @@ private: BeginFrameArgs pending_begin_frame_args_; - - DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSource); }; } // namespace viz
diff --git a/components/viz/common/frame_sinks/copy_output_request.h b/components/viz/common/frame_sinks/copy_output_request.h index 7bf8e969..353b094a 100644 --- a/components/viz/common/frame_sinks/copy_output_request.h +++ b/components/viz/common/frame_sinks/copy_output_request.h
@@ -59,6 +59,9 @@ ResultDestination result_destination, CopyOutputRequestCallback result_callback); + CopyOutputRequest(const CopyOutputRequest&) = delete; + CopyOutputRequest& operator=(const CopyOutputRequest&) = delete; + ~CopyOutputRequest(); // Returns the requested result format. @@ -146,8 +149,6 @@ absl::optional<base::UnguessableToken> source_; absl::optional<gfx::Rect> area_; absl::optional<gfx::Rect> result_selection_; - - DISALLOW_COPY_AND_ASSIGN(CopyOutputRequest); }; } // namespace viz
diff --git a/components/viz/common/frame_sinks/copy_output_result.h b/components/viz/common/frame_sinks/copy_output_result.h index 995a871..f71e4a1 100644 --- a/components/viz/common/frame_sinks/copy_output_result.h +++ b/components/viz/common/frame_sinks/copy_output_result.h
@@ -72,6 +72,9 @@ const gfx::Rect& rect, bool needs_lock_for_bitmap); + CopyOutputResult(const CopyOutputResult&) = delete; + CopyOutputResult& operator=(const CopyOutputResult&) = delete; + virtual ~CopyOutputResult(); // Returns false if the request succeeded and the data accessors will return @@ -260,8 +263,6 @@ // Cached bitmap returned by the default implementation of AsSkBitmap(). mutable SkBitmap cached_bitmap_; - - DISALLOW_COPY_AND_ASSIGN(CopyOutputResult); }; // Subclass of CopyOutputResult that provides a RGBA result from an @@ -273,12 +274,13 @@ const gfx::Rect& rect, SkBitmap bitmap); CopyOutputSkBitmapResult(const gfx::Rect& rect, SkBitmap bitmap); + + CopyOutputSkBitmapResult(const CopyOutputSkBitmapResult&) = delete; + CopyOutputSkBitmapResult& operator=(const CopyOutputSkBitmapResult&) = delete; + ~CopyOutputSkBitmapResult() override; const SkBitmap& AsSkBitmap() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(CopyOutputSkBitmapResult); }; // Subclass of CopyOutputResult that holds references to textures (via @@ -293,6 +295,10 @@ CopyOutputTextureResult(const gfx::Rect& rect, TextureResult texture_result, ReleaseCallbacks release_callbacks); + + CopyOutputTextureResult(const CopyOutputTextureResult&) = delete; + CopyOutputTextureResult& operator=(const CopyOutputTextureResult&) = delete; + ~CopyOutputTextureResult() override; const TextureResult* GetTextureResult() const override; @@ -301,8 +307,6 @@ private: TextureResult texture_result_; ReleaseCallbacks release_callbacks_; - - DISALLOW_COPY_AND_ASSIGN(CopyOutputTextureResult); }; // Scoped class for accessing SkBitmap in CopyOutputRequest.
diff --git a/components/viz/common/frame_sinks/delay_based_time_source.h b/components/viz/common/frame_sinks/delay_based_time_source.h index ba46acd..ebd8a6ce 100644 --- a/components/viz/common/frame_sinks/delay_based_time_source.h +++ b/components/viz/common/frame_sinks/delay_based_time_source.h
@@ -35,6 +35,10 @@ class VIZ_COMMON_EXPORT DelayBasedTimeSource { public: explicit DelayBasedTimeSource(base::SingleThreadTaskRunner* task_runner); + + DelayBasedTimeSource(const DelayBasedTimeSource&) = delete; + DelayBasedTimeSource& operator=(const DelayBasedTimeSource&) = delete; + virtual ~DelayBasedTimeSource(); void SetClient(DelayBasedTimeSourceClient* client); @@ -79,8 +83,6 @@ base::RepeatingClosure tick_closure_; base::OneShotTimer timer_; - - DISALLOW_COPY_AND_ASSIGN(DelayBasedTimeSource); }; } // namespace viz
diff --git a/components/viz/common/gl_i420_converter.h b/components/viz/common/gl_i420_converter.h index 0f1424e91..04c0360 100644 --- a/components/viz/common/gl_i420_converter.h +++ b/components/viz/common/gl_i420_converter.h
@@ -77,6 +77,10 @@ using Parameters = GLScaler::Parameters; explicit GLI420Converter(ContextProvider* context_provider); + + GLI420Converter(const GLI420Converter&) = delete; + GLI420Converter& operator=(const GLI420Converter&) = delete; + ~GLI420Converter() final; // Returns true if the GL context provides the necessary support for enabling @@ -184,8 +188,6 @@ // The Parameters that were provided to the last successful Configure() call. Parameters params_; - - DISALLOW_COPY_AND_ASSIGN(GLI420Converter); }; } // namespace viz
diff --git a/components/viz/common/gl_scaler.h b/components/viz/common/gl_scaler.h index 2c1e768..d707230 100644 --- a/components/viz/common/gl_scaler.h +++ b/components/viz/common/gl_scaler.h
@@ -209,6 +209,9 @@ explicit GLScaler(ContextProvider* context_provider); + GLScaler(const GLScaler&) = delete; + GLScaler& operator=(const GLScaler&) = delete; + ~GLScaler() final; // Returns true if the GL context provides the necessary support for enabling @@ -317,6 +320,10 @@ GLenum texture_type, const gfx::ColorTransform* color_transform, const GLenum swizzle[2]); + + ShaderProgram(const ShaderProgram&) = delete; + ShaderProgram& operator=(const ShaderProgram&) = delete; + ~ShaderProgram(); Shader shader() const { return shader_; } @@ -367,8 +374,6 @@ GLint src_pixelsize_location_ = -1; // Location of vector for scaling ratio between source and dest textures. GLint scaling_vector_location_ = -1; - - DISALLOW_COPY_AND_ASSIGN(ShaderProgram); }; // One scaling stage in a chain of scaler pipeline stages. Each ScalerStage @@ -386,6 +391,10 @@ Axis primary_axis, const gfx::Vector2d& scale_from, const gfx::Vector2d& scale_to); + + ScalerStage(const ScalerStage&) = delete; + ScalerStage& operator=(const ScalerStage&) = delete; + ~ScalerStage(); Shader shader() const { return shader_; } @@ -445,8 +454,6 @@ GLuint intermediate_texture_ = 0; gfx::Size intermediate_texture_size_; GLuint dest_framebuffer_ = 0; - - DISALLOW_COPY_AND_ASSIGN(ScalerStage); }; // ContextLostObserver implementation. @@ -521,8 +528,6 @@ // The color space in which the scaling stages operate. gfx::ColorSpace scaling_color_space_; - - DISALLOW_COPY_AND_ASSIGN(GLScaler); }; // For logging.
diff --git a/components/viz/common/gpu/dawn_context_provider.h b/components/viz/common/gpu/dawn_context_provider.h index 8ec5c96d..bcc8c867 100644 --- a/components/viz/common/gpu/dawn_context_provider.h +++ b/components/viz/common/gpu/dawn_context_provider.h
@@ -18,6 +18,10 @@ class VIZ_DAWN_CONTEXT_PROVIDER_EXPORT DawnContextProvider { public: static std::unique_ptr<DawnContextProvider> Create(); + + DawnContextProvider(const DawnContextProvider&) = delete; + DawnContextProvider& operator=(const DawnContextProvider&) = delete; + ~DawnContextProvider(); wgpu::Device GetDevice() { return device_; } @@ -33,8 +37,6 @@ dawn_native::Instance instance_; wgpu::Device device_; sk_sp<GrDirectContext> gr_context_; - - DISALLOW_COPY_AND_ASSIGN(DawnContextProvider); }; } // namespace viz
diff --git a/components/viz/common/gpu/metal_api_proxy.mm b/components/viz/common/gpu/metal_api_proxy.mm index e8e73a18..1d5c718b 100644 --- a/components/viz/common/gpu/metal_api_proxy.mm +++ b/components/viz/common/gpu/metal_api_proxy.mm
@@ -148,6 +148,10 @@ class MTLLibraryCache { public: MTLLibraryCache() = default; + + MTLLibraryCache(const MTLLibraryCache&) = delete; + MTLLibraryCache& operator=(const MTLLibraryCache&) = delete; + ~MTLLibraryCache() = default; id<MTLLibrary> NewLibraryWithSource(id<MTLDevice> device, @@ -224,7 +228,6 @@ }; std::map<LibraryKey, LibraryData> libraries_; - DISALLOW_COPY_AND_ASSIGN(MTLLibraryCache); }; // Disable protocol warnings and property synthesis warnings. Any unimplemented
diff --git a/components/viz/common/gpu/metal_context_provider.mm b/components/viz/common/gpu/metal_context_provider.mm index 5ffc304..9b9ed82 100644 --- a/components/viz/common/gpu/metal_context_provider.mm +++ b/components/viz/common/gpu/metal_context_provider.mm
@@ -34,6 +34,10 @@ GrDirectContext::MakeMetal(device_, command_queue_, context_options); DCHECK(gr_context_); } + + MetalContextProviderImpl(const MetalContextProviderImpl&) = delete; + MetalContextProviderImpl& operator=(const MetalContextProviderImpl&) = delete; + ~MetalContextProviderImpl() override { // Because there are no guarantees that |device_| will not outlive |this|, // un-set the progress reporter on |device_|. @@ -49,8 +53,6 @@ base::scoped_nsobject<MTLDeviceProxy> device_; base::scoped_nsprotocol<id<MTLCommandQueue>> command_queue_; sk_sp<GrDirectContext> gr_context_; - - DISALLOW_COPY_AND_ASSIGN(MetalContextProviderImpl); }; } // namespace
diff --git a/components/viz/common/quads/aggregated_render_pass.h b/components/viz/common/quads/aggregated_render_pass.h index 20cab6c..c18ddd00 100644 --- a/components/viz/common/quads/aggregated_render_pass.h +++ b/components/viz/common/quads/aggregated_render_pass.h
@@ -41,6 +41,9 @@ // all of the AggregatedRenderPasses. class VIZ_COMMON_EXPORT AggregatedRenderPass : public RenderPassInternal { public: + AggregatedRenderPass(const AggregatedRenderPass&) = delete; + AggregatedRenderPass& operator=(const AggregatedRenderPass&) = delete; + ~AggregatedRenderPass(); AggregatedRenderPass(); @@ -107,8 +110,6 @@ "AggregatedRenderPass"); return quad_list.AllocateAndCopyFrom(DrawQuadType::MaterialCast(quad)); } - - DISALLOW_COPY_AND_ASSIGN(AggregatedRenderPass); }; using AggregatedRenderPassList =
diff --git a/components/viz/common/quads/compositor_frame.h b/components/viz/common/quads/compositor_frame.h index 5b66ab0..ff48a6e 100644 --- a/components/viz/common/quads/compositor_frame.h +++ b/components/viz/common/quads/compositor_frame.h
@@ -26,6 +26,10 @@ public: CompositorFrame(); CompositorFrame(CompositorFrame&& other); + + CompositorFrame(const CompositorFrame&) = delete; + CompositorFrame& operator=(const CompositorFrame&) = delete; + ~CompositorFrame(); CompositorFrame& operator=(CompositorFrame&& other); @@ -45,9 +49,6 @@ // The last one is the "root" CompositorRenderPass that all others are // directly or indirectly drawn into. CompositorRenderPassList render_pass_list; - - private: - DISALLOW_COPY_AND_ASSIGN(CompositorFrame); }; } // namespace viz
diff --git a/components/viz/common/quads/compositor_render_pass.h b/components/viz/common/quads/compositor_render_pass.h index e4341d1..183fe6cb 100644 --- a/components/viz/common/quads/compositor_render_pass.h +++ b/components/viz/common/quads/compositor_render_pass.h
@@ -50,6 +50,9 @@ // CompositorRenderPassId within its surface id. class VIZ_COMMON_EXPORT CompositorRenderPass : public RenderPassInternal { public: + CompositorRenderPass(const CompositorRenderPass&) = delete; + CompositorRenderPass& operator=(const CompositorRenderPass&) = delete; + ~CompositorRenderPass(); static std::unique_ptr<CompositorRenderPass> Create(); @@ -125,9 +128,6 @@ explicit CompositorRenderPass(size_t num_layers); CompositorRenderPass(size_t shared_quad_state_list_size, size_t quad_list_size); - - private: - DISALLOW_COPY_AND_ASSIGN(CompositorRenderPass); }; using CompositorRenderPassList =
diff --git a/components/viz/common/resources/shared_bitmap.h b/components/viz/common/resources/shared_bitmap.h index 2296e28..77f05343 100644 --- a/components/viz/common/resources/shared_bitmap.h +++ b/components/viz/common/resources/shared_bitmap.h
@@ -35,14 +35,16 @@ static SharedBitmapId GenerateId(); explicit SharedBitmap(uint8_t* pixels); + + SharedBitmap(const SharedBitmap&) = delete; + SharedBitmap& operator=(const SharedBitmap&) = delete; + virtual ~SharedBitmap(); uint8_t* pixels() { return pixels_; } private: uint8_t* pixels_; - - DISALLOW_COPY_AND_ASSIGN(SharedBitmap); }; } // namespace viz
diff --git a/components/viz/common/surfaces/child_local_surface_id_allocator.h b/components/viz/common/surfaces/child_local_surface_id_allocator.h index 44936fc..f5f5ac7 100644 --- a/components/viz/common/surfaces/child_local_surface_id_allocator.h +++ b/components/viz/common/surfaces/child_local_surface_id_allocator.h
@@ -25,6 +25,10 @@ public: ChildLocalSurfaceIdAllocator(); + ChildLocalSurfaceIdAllocator(const ChildLocalSurfaceIdAllocator&) = delete; + ChildLocalSurfaceIdAllocator& operator=(const ChildLocalSurfaceIdAllocator&) = + delete; + ~ChildLocalSurfaceIdAllocator() = default; // When a parent-allocated LocalSurfaceId arrives in the child, the child @@ -41,8 +45,6 @@ private: LocalSurfaceId current_local_surface_id_; - - DISALLOW_COPY_AND_ASSIGN(ChildLocalSurfaceIdAllocator); }; } // namespace viz
diff --git a/components/viz/common/surfaces/child_local_surface_id_allocator_unittest.cc b/components/viz/common/surfaces/child_local_surface_id_allocator_unittest.cc index 2ebc6b2b..43e938b 100644 --- a/components/viz/common/surfaces/child_local_surface_id_allocator_unittest.cc +++ b/components/viz/common/surfaces/child_local_surface_id_allocator_unittest.cc
@@ -31,6 +31,11 @@ public: ChildLocalSurfaceIdAllocatorTest() = default; + ChildLocalSurfaceIdAllocatorTest(const ChildLocalSurfaceIdAllocatorTest&) = + delete; + ChildLocalSurfaceIdAllocatorTest& operator=( + const ChildLocalSurfaceIdAllocatorTest&) = delete; + ~ChildLocalSurfaceIdAllocatorTest() override {} ChildLocalSurfaceIdAllocator& allocator() { return *allocator_.get(); } @@ -61,8 +66,6 @@ std::unique_ptr<ChildLocalSurfaceIdAllocator> allocator_; std::unique_ptr<ParentLocalSurfaceIdAllocator> parent_allocator1_; std::unique_ptr<ParentLocalSurfaceIdAllocator> parent_allocator2_; - - DISALLOW_COPY_AND_ASSIGN(ChildLocalSurfaceIdAllocatorTest); }; // The default constructor should initialize its last-known LocalSurfaceId (and
diff --git a/components/viz/common/surfaces/parent_local_surface_id_allocator.h b/components/viz/common/surfaces/parent_local_surface_id_allocator.h index 2ab303530..9427dfb 100644 --- a/components/viz/common/surfaces/parent_local_surface_id_allocator.h +++ b/components/viz/common/surfaces/parent_local_surface_id_allocator.h
@@ -24,6 +24,10 @@ public: ParentLocalSurfaceIdAllocator(); + ParentLocalSurfaceIdAllocator(const ParentLocalSurfaceIdAllocator&) = delete; + ParentLocalSurfaceIdAllocator& operator=( + const ParentLocalSurfaceIdAllocator&) = delete; + ~ParentLocalSurfaceIdAllocator() = default; // When a child-allocated LocalSurfaceId arrives in the parent, the parent @@ -60,8 +64,6 @@ bool is_allocation_suppressed_ = false; friend class ScopedSurfaceIdAllocator; - - DISALLOW_COPY_AND_ASSIGN(ParentLocalSurfaceIdAllocator); }; } // namespace viz
diff --git a/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc b/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc index 14399711..1ac1b30 100644 --- a/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc +++ b/components/viz/common/surfaces/parent_local_surface_id_allocator_unittest.cc
@@ -23,6 +23,11 @@ public: ParentLocalSurfaceIdAllocatorTest() = default; + ParentLocalSurfaceIdAllocatorTest(const ParentLocalSurfaceIdAllocatorTest&) = + delete; + ParentLocalSurfaceIdAllocatorTest& operator=( + const ParentLocalSurfaceIdAllocatorTest&) = delete; + ~ParentLocalSurfaceIdAllocatorTest() override = default; ParentLocalSurfaceIdAllocator& allocator() { return *allocator_.get(); } @@ -48,8 +53,6 @@ private: std::unique_ptr<ParentLocalSurfaceIdAllocator> allocator_; - - DISALLOW_COPY_AND_ASSIGN(ParentLocalSurfaceIdAllocatorTest); }; // UpdateFromChild() on a parent allocator should accept the child's sequence
diff --git a/components/viz/demo/client/demo_client.h b/components/viz/demo/client/demo_client.h index 8e2af0b..a5fe406 100644 --- a/components/viz/demo/client/demo_client.h +++ b/components/viz/demo/client/demo_client.h
@@ -51,6 +51,10 @@ DemoClient(const viz::FrameSinkId& frame_sink_id, const viz::LocalSurfaceId& local_surface_id, const gfx::Rect& bounds); + + DemoClient(const DemoClient&) = delete; + DemoClient& operator=(const DemoClient&) = delete; + ~DemoClient() override; const viz::FrameSinkId& frame_sink_id() const { return frame_sink_id_; } @@ -124,8 +128,6 @@ // embeds other clients. viz::ParentLocalSurfaceIdAllocator allocator_; std::map<viz::FrameSinkId, EmbedInfo> embeds_ GUARDED_BY(lock_); - - DISALLOW_COPY_AND_ASSIGN(DemoClient); }; } // namespace demo
diff --git a/components/viz/demo/demo_main.cc b/components/viz/demo/demo_main.cc index 3cf39326..98234462 100644 --- a/components/viz/demo/demo_main.cc +++ b/components/viz/demo/demo_main.cc
@@ -52,14 +52,15 @@ base::ThreadPoolInstance::CreateAndStartWithDefaultParams("demo"); } + InitBase(const InitBase&) = delete; + InitBase& operator=(const InitBase&) = delete; + ~InitBase() = default; private: // The exit manager is in charge of calling the dtors of singleton objects. base::AtExitManager exit_manager_; base::SingleThreadTaskExecutor main_task_executor_{base::MessagePumpType::UI}; - - DISALLOW_COPY_AND_ASSIGN(InitBase); }; // Initializes and owns mojo. @@ -74,13 +75,14 @@ mojo::core::ScopedIPCSupport::ShutdownPolicy::CLEAN); } + InitMojo(const InitMojo&) = delete; + InitMojo& operator=(const InitMojo&) = delete; + ~InitMojo() = default; private: base::Thread thread_; std::unique_ptr<mojo::core::ScopedIPCSupport> ipc_support_; - - DISALLOW_COPY_AND_ASSIGN(InitMojo); }; // Initializes and owns the UI components needed for the app. @@ -90,12 +92,13 @@ event_source_ = ui::PlatformEventSource::CreateDefault(); } + InitUI(const InitUI&) = delete; + InitUI& operator=(const InitUI&) = delete; + ~InitUI() = default; private: std::unique_ptr<ui::PlatformEventSource> event_source_; - - DISALLOW_COPY_AND_ASSIGN(InitUI); }; // DemoWindow creates the native window for the demo app. The native window @@ -104,6 +107,10 @@ class DemoWindow : public ui::PlatformWindowDelegate { public: DemoWindow() = default; + + DemoWindow(const DemoWindow&) = delete; + DemoWindow& operator=(const DemoWindow&) = delete; + ~DemoWindow() override = default; void Create(const gfx::Rect& bounds) { @@ -195,8 +202,6 @@ std::unique_ptr<ui::PlatformWindow> platform_window_; gfx::AcceleratedWidget widget_; - - DISALLOW_COPY_AND_ASSIGN(DemoWindow); }; int DemoMain() {
diff --git a/components/viz/demo/host/demo_host.h b/components/viz/demo/host/demo_host.h index 76010ea2..23006d79 100644 --- a/components/viz/demo/host/demo_host.h +++ b/components/viz/demo/host/demo_host.h
@@ -36,6 +36,10 @@ mojo::PendingReceiver<viz::mojom::FrameSinkManagerClient> client_receiver, mojo::PendingRemote<viz::mojom::FrameSinkManager> frame_sink_manager_remote); + + DemoHost(const DemoHost&) = delete; + DemoHost& operator=(const DemoHost&) = delete; + ~DemoHost() override; void Resize(const gfx::Size& size); @@ -69,8 +73,6 @@ // and clients over mojo. The host does not need to have its own thread // though. base::Thread thread_; - - DISALLOW_COPY_AND_ASSIGN(DemoHost); }; } // namespace demo
diff --git a/components/viz/demo/service/demo_service.h b/components/viz/demo/service/demo_service.h index 50d3a10..7b60fab 100644 --- a/components/viz/demo/service/demo_service.h +++ b/components/viz/demo/service/demo_service.h
@@ -26,12 +26,14 @@ public: DemoService(mojo::PendingReceiver<viz::mojom::FrameSinkManager> receiver, mojo::PendingRemote<viz::mojom::FrameSinkManagerClient> client); + + DemoService(const DemoService&) = delete; + DemoService& operator=(const DemoService&) = delete; + ~DemoService(); private: std::unique_ptr<viz::VizCompositorThreadRunnerImpl> runner_; - - DISALLOW_COPY_AND_ASSIGN(DemoService); }; } // namespace demo
diff --git a/components/viz/host/client_frame_sink_video_capturer.h b/components/viz/host/client_frame_sink_video_capturer.h index 0b5cc50..d7647e10 100644 --- a/components/viz/host/client_frame_sink_video_capturer.h +++ b/components/viz/host/client_frame_sink_video_capturer.h
@@ -44,6 +44,10 @@ public: Overlay(base::WeakPtr<ClientFrameSinkVideoCapturer> client_capturer, int32_t stacking_index); + + Overlay(const Overlay&) = delete; + Overlay& operator=(const Overlay&) = delete; + ~Overlay() final; int32_t stacking_index() const { return stacking_index_; } @@ -66,8 +70,6 @@ SkBitmap image_; gfx::RectF bounds_; - - DISALLOW_COPY_AND_ASSIGN(Overlay); }; using EstablishConnectionCallback = base::RepeatingCallback<void(
diff --git a/components/viz/host/gpu_client.h b/components/viz/host/gpu_client.h index bb281de..f62a185 100644 --- a/components/viz/host/gpu_client.h +++ b/components/viz/host/gpu_client.h
@@ -33,6 +33,9 @@ uint64_t client_tracing_id, scoped_refptr<base::SingleThreadTaskRunner> task_runner); + GpuClient(const GpuClient&) = delete; + GpuClient& operator=(const GpuClient&) = delete; + ~GpuClient() override; // This needs to be run on the thread associated with |task_runner_|. @@ -116,8 +119,6 @@ // this thread. scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WeakPtrFactory<GpuClient> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GpuClient); }; } // namespace viz
diff --git a/components/viz/host/hit_test/hit_test_query.h b/components/viz/host/hit_test/hit_test_query.h index e97163b0..eb72f31 100644 --- a/components/viz/host/hit_test/hit_test_query.h +++ b/components/viz/host/hit_test/hit_test_query.h
@@ -36,6 +36,10 @@ class VIZ_HOST_EXPORT HitTestQuery { public: HitTestQuery(); + + HitTestQuery(const HitTestQuery&) = delete; + HitTestQuery& operator=(const HitTestQuery&) = delete; + virtual ~HitTestQuery(); // HitTestAggregator has sent the most recent |hit_test_data| for targeting/ @@ -153,8 +157,6 @@ void RecordSlowPathHitTestReasons(uint32_t) const; std::vector<AggregatedHitTestRegion> hit_test_data_; - - DISALLOW_COPY_AND_ASSIGN(HitTestQuery); }; } // namespace viz
diff --git a/components/viz/host/hit_test/hit_test_query_unittest.cc b/components/viz/host/hit_test/hit_test_query_unittest.cc index 143a8d6..73ca180 100644 --- a/components/viz/host/hit_test/hit_test_query_unittest.cc +++ b/components/viz/host/hit_test/hit_test_query_unittest.cc
@@ -15,6 +15,10 @@ class HitTestQueryTest : public testing::Test { public: HitTestQueryTest() = default; + + HitTestQueryTest(const HitTestQueryTest&) = delete; + HitTestQueryTest& operator=(const HitTestQueryTest&) = delete; + ~HitTestQueryTest() override = default; void SendHitTestData() { @@ -28,8 +32,6 @@ private: HitTestQuery hit_test_query_; - - DISALLOW_COPY_AND_ASSIGN(HitTestQueryTest); }; // One surface.
diff --git a/components/viz/host/hit_test/hit_test_region_observer.h b/components/viz/host/hit_test/hit_test_region_observer.h index 0381ac45..0f4836a 100644 --- a/components/viz/host/hit_test/hit_test_region_observer.h +++ b/components/viz/host/hit_test/hit_test_region_observer.h
@@ -19,14 +19,15 @@ class HitTestRegionObserver { public: HitTestRegionObserver() = default; + + HitTestRegionObserver(const HitTestRegionObserver&) = delete; + HitTestRegionObserver& operator=(const HitTestRegionObserver&) = delete; + virtual ~HitTestRegionObserver() = default; virtual void OnAggregatedHitTestRegionListUpdated( const FrameSinkId& frame_sink_id, const std::vector<AggregatedHitTestRegion>& hit_test_data) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(HitTestRegionObserver); }; } // namespace viz
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h index 94c5293d..888133f 100644 --- a/components/viz/host/host_display_client.h +++ b/components/viz/host/host_display_client.h
@@ -26,6 +26,10 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { public: explicit HostDisplayClient(gfx::AcceleratedWidget widget); + + HostDisplayClient(const HostDisplayClient&) = delete; + HostDisplayClient& operator=(const HostDisplayClient&) = delete; + ~HostDisplayClient() override; mojo::PendingRemote<mojom::DisplayClient> GetBoundRemote( @@ -57,8 +61,6 @@ #if defined(OS_WIN) std::unique_ptr<LayeredWindowUpdaterImpl> layered_window_updater_; #endif - - DISALLOW_COPY_AND_ASSIGN(HostDisplayClient); }; } // namespace viz
diff --git a/components/viz/host/host_frame_sink_manager.h b/components/viz/host/host_frame_sink_manager.h index 13387f5..30e28ad 100644 --- a/components/viz/host/host_frame_sink_manager.h +++ b/components/viz/host/host_frame_sink_manager.h
@@ -52,6 +52,10 @@ base::flat_map<FrameSinkId, std::unique_ptr<HitTestQuery>>; HostFrameSinkManager(); + + HostFrameSinkManager(const HostFrameSinkManager&) = delete; + HostFrameSinkManager& operator=(const HostFrameSinkManager&) = delete; + ~HostFrameSinkManager() override; const DisplayHitTestQueryMap& display_hit_test_query() const { @@ -318,8 +322,6 @@ DebugRendererSettings debug_renderer_settings_; base::WeakPtrFactory<HostFrameSinkManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostFrameSinkManager); }; } // namespace viz
diff --git a/components/viz/host/host_frame_sink_manager_unittest.cc b/components/viz/host/host_frame_sink_manager_unittest.cc index f3411d5..a68eaf0 100644 --- a/components/viz/host/host_frame_sink_manager_unittest.cc +++ b/components/viz/host/host_frame_sink_manager_unittest.cc
@@ -107,6 +107,10 @@ class HostFrameSinkManagerTest : public testing::Test { public: HostFrameSinkManagerTest() { ConnectToGpu(); } + + HostFrameSinkManagerTest(const HostFrameSinkManagerTest&) = delete; + HostFrameSinkManagerTest& operator=(const HostFrameSinkManagerTest&) = delete; + ~HostFrameSinkManagerTest() override = default; HostFrameSinkManager& host() { return host_manager_; } @@ -164,9 +168,6 @@ protected: HostFrameSinkManager host_manager_; std::unique_ptr<testing::NiceMock<MockFrameSinkManagerImpl>> manager_impl_; - - private: - DISALLOW_COPY_AND_ASSIGN(HostFrameSinkManagerTest); }; // Verify that registering and destroying multiple CompositorFrameSinks works
diff --git a/components/viz/host/host_gpu_memory_buffer_manager.h b/components/viz/host/host_gpu_memory_buffer_manager.h index 9de38d4..527c5cf 100644 --- a/components/viz/host/host_gpu_memory_buffer_manager.h +++ b/components/viz/host/host_gpu_memory_buffer_manager.h
@@ -54,6 +54,11 @@ int client_id, std::unique_ptr<gpu::GpuMemoryBufferSupport> gpu_memory_buffer_support, scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + HostGpuMemoryBufferManager(const HostGpuMemoryBufferManager&) = delete; + HostGpuMemoryBufferManager& operator=(const HostGpuMemoryBufferManager&) = + delete; + ~HostGpuMemoryBufferManager() override; void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, @@ -164,8 +169,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; base::WeakPtr<HostGpuMemoryBufferManager> weak_ptr_; base::WeakPtrFactory<HostGpuMemoryBufferManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HostGpuMemoryBufferManager); }; } // namespace viz
diff --git a/components/viz/host/host_gpu_memory_buffer_manager_unittest.cc b/components/viz/host/host_gpu_memory_buffer_manager_unittest.cc index e0b8450..b458ce3 100644 --- a/components/viz/host/host_gpu_memory_buffer_manager_unittest.cc +++ b/components/viz/host/host_gpu_memory_buffer_manager_unittest.cc
@@ -60,6 +60,10 @@ class TestGpuService : public mojom::GpuService { public: TestGpuService() = default; + + TestGpuService(const TestGpuService&) = delete; + TestGpuService& operator=(const TestGpuService&) = delete; + ~TestGpuService() override = default; mojom::GpuService* GetGpuService(base::OnceClosure connection_error_handler) { @@ -250,8 +254,6 @@ const int client_id; }; std::vector<DestructionRequest> destruction_requests_; - - DISALLOW_COPY_AND_ASSIGN(TestGpuService); }; } // namespace @@ -259,6 +261,12 @@ class HostGpuMemoryBufferManagerTest : public ::testing::Test { public: HostGpuMemoryBufferManagerTest() = default; + + HostGpuMemoryBufferManagerTest(const HostGpuMemoryBufferManagerTest&) = + delete; + HostGpuMemoryBufferManagerTest& operator=( + const HostGpuMemoryBufferManagerTest&) = delete; + ~HostGpuMemoryBufferManagerTest() override = default; void SetUp() override { @@ -330,8 +338,6 @@ private: std::unique_ptr<TestGpuService> gpu_service_; std::unique_ptr<HostGpuMemoryBufferManager> gpu_memory_buffer_manager_; - - DISALLOW_COPY_AND_ASSIGN(HostGpuMemoryBufferManagerTest); }; // Tests that allocation requests from a client that goes away before allocation
diff --git a/components/viz/host/layered_window_updater_impl.h b/components/viz/host/layered_window_updater_impl.h index 1026b73..894237a 100644 --- a/components/viz/host/layered_window_updater_impl.h +++ b/components/viz/host/layered_window_updater_impl.h
@@ -30,6 +30,10 @@ LayeredWindowUpdaterImpl( HWND hwnd, mojo::PendingReceiver<mojom::LayeredWindowUpdater> receiver); + + LayeredWindowUpdaterImpl(const LayeredWindowUpdaterImpl&) = delete; + LayeredWindowUpdaterImpl& operator=(const LayeredWindowUpdaterImpl&) = delete; + ~LayeredWindowUpdaterImpl() override; // mojom::LayeredWindowUpdater implementation. @@ -41,8 +45,6 @@ const HWND hwnd_; mojo::Receiver<mojom::LayeredWindowUpdater> receiver_; std::unique_ptr<SkCanvas> canvas_; - - DISALLOW_COPY_AND_ASSIGN(LayeredWindowUpdaterImpl); }; } // namespace viz
diff --git a/components/viz/service/compositor_frame_fuzzer/compositor_frame_fuzzer_util.cc b/components/viz/service/compositor_frame_fuzzer/compositor_frame_fuzzer_util.cc index 34e5e9d..0739d311 100644 --- a/components/viz/service/compositor_frame_fuzzer/compositor_frame_fuzzer_util.cc +++ b/components/viz/service/compositor_frame_fuzzer/compositor_frame_fuzzer_util.cc
@@ -100,6 +100,11 @@ class FuzzedCompositorFrameBuilder { public: FuzzedCompositorFrameBuilder() = default; + + FuzzedCompositorFrameBuilder(const FuzzedCompositorFrameBuilder&) = delete; + FuzzedCompositorFrameBuilder& operator=(const FuzzedCompositorFrameBuilder&) = + delete; + ~FuzzedCompositorFrameBuilder() = default; FuzzedData Build(const proto::CompositorRenderPass& render_pass_spec); @@ -150,8 +155,6 @@ // Frame and data being built. FuzzedData data_; - - DISALLOW_COPY_AND_ASSIGN(FuzzedCompositorFrameBuilder); }; FuzzedData FuzzedCompositorFrameBuilder::Build(
diff --git a/components/viz/service/compositor_frame_fuzzer/fuzzer_browser_process.h b/components/viz/service/compositor_frame_fuzzer/fuzzer_browser_process.h index 1e929e90..e252a6eb 100644 --- a/components/viz/service/compositor_frame_fuzzer/fuzzer_browser_process.h +++ b/components/viz/service/compositor_frame_fuzzer/fuzzer_browser_process.h
@@ -25,6 +25,10 @@ class FuzzerBrowserProcess { public: explicit FuzzerBrowserProcess(absl::optional<base::FilePath> png_dir_path); + + FuzzerBrowserProcess(const FuzzerBrowserProcess&) = delete; + FuzzerBrowserProcess& operator=(const FuzzerBrowserProcess&) = delete; + ~FuzzerBrowserProcess(); // Fuzz target mimicking the process of submitting a rendered CompositorFrame @@ -63,8 +67,6 @@ ParentLocalSurfaceIdAllocator lsi_allocator_; FrameTokenGenerator next_frame_token_; - - DISALLOW_COPY_AND_ASSIGN(FuzzerBrowserProcess); }; } // namespace viz
diff --git a/components/viz/service/compositor_frame_fuzzer/fuzzer_software_output_surface_provider.h b/components/viz/service/compositor_frame_fuzzer/fuzzer_software_output_surface_provider.h index c4c7331..2f115f65 100644 --- a/components/viz/service/compositor_frame_fuzzer/fuzzer_software_output_surface_provider.h +++ b/components/viz/service/compositor_frame_fuzzer/fuzzer_software_output_surface_provider.h
@@ -19,6 +19,12 @@ public: explicit FuzzerSoftwareOutputSurfaceProvider( absl::optional<base::FilePath> png_dir_path); + + FuzzerSoftwareOutputSurfaceProvider( + const FuzzerSoftwareOutputSurfaceProvider&) = delete; + FuzzerSoftwareOutputSurfaceProvider& operator=( + const FuzzerSoftwareOutputSurfaceProvider&) = delete; + ~FuzzerSoftwareOutputSurfaceProvider() override; // OutputSurfaceProvider implementation. @@ -36,8 +42,6 @@ private: absl::optional<base::FilePath> png_dir_path_; - - DISALLOW_COPY_AND_ASSIGN(FuzzerSoftwareOutputSurfaceProvider); }; } // namespace viz
diff --git a/components/viz/service/display/ca_layer_overlay.h b/components/viz/service/display/ca_layer_overlay.h index fff743cd..d328f07 100644 --- a/components/viz/service/display/ca_layer_overlay.h +++ b/components/viz/service/display/ca_layer_overlay.h
@@ -96,6 +96,10 @@ class VIZ_SERVICE_EXPORT CALayerOverlayProcessor { public: CALayerOverlayProcessor() = default; + + CALayerOverlayProcessor(const CALayerOverlayProcessor&) = delete; + CALayerOverlayProcessor& operator=(const CALayerOverlayProcessor&) = delete; + virtual ~CALayerOverlayProcessor() = default; bool AreClipSettingsValid(const CALayerOverlay& ca_layer_overlay, @@ -137,8 +141,6 @@ render_pass_backdrop_filters, gfx::ProtectedVideoType protected_video_type, CALayerOverlayList* ca_layer_overlays) const; - - DISALLOW_COPY_AND_ASSIGN(CALayerOverlayProcessor); }; } // namespace viz
diff --git a/components/viz/service/display/damage_frame_annotator.h b/components/viz/service/display/damage_frame_annotator.h index 43e29a6..80162201 100644 --- a/components/viz/service/display/damage_frame_annotator.h +++ b/components/viz/service/display/damage_frame_annotator.h
@@ -21,6 +21,10 @@ class DamageFrameAnnotator : public SurfaceAggregator::FrameAnnotator { public: DamageFrameAnnotator(); + + DamageFrameAnnotator(const DamageFrameAnnotator&) = delete; + DamageFrameAnnotator& operator=(const DamageFrameAnnotator&) = delete; + ~DamageFrameAnnotator() override; // SurfaceAggregator::FrameAnnotator implementation. @@ -41,8 +45,6 @@ void AnnotateRootRenderPass(AggregatedRenderPass* render_pass); std::vector<AnnotationData> annotations_; - - DISALLOW_COPY_AND_ASSIGN(DamageFrameAnnotator); }; } // namespace viz
diff --git a/components/viz/service/display/dc_layer_overlay.h b/components/viz/service/display/dc_layer_overlay.h index 4c1dfc0..e5cdd0c 100644 --- a/components/viz/service/display/dc_layer_overlay.h +++ b/components/viz/service/display/dc_layer_overlay.h
@@ -85,6 +85,10 @@ const DebugRendererSettings* debug_settings, int allowed_yuv_overlay_count, bool skip_initialization_for_testing = false); + + DCLayerOverlayProcessor(const DCLayerOverlayProcessor&) = delete; + DCLayerOverlayProcessor& operator=(const DCLayerOverlayProcessor&) = delete; + virtual ~DCLayerOverlayProcessor(); // Virtual for testing. @@ -174,8 +178,6 @@ SurfaceDamageRectList surface_damage_rect_list_; scoped_refptr<base::SingleThreadTaskRunner> viz_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(DCLayerOverlayProcessor); }; } // namespace viz
diff --git a/components/viz/service/display/direct_renderer.h b/components/viz/service/display/direct_renderer.h index 22a9122..9776d42 100644 --- a/components/viz/service/display/direct_renderer.h +++ b/components/viz/service/display/direct_renderer.h
@@ -62,6 +62,10 @@ OutputSurface* output_surface, DisplayResourceProvider* resource_provider, OverlayProcessorInterface* overlay_processor); + + DirectRenderer(const DirectRenderer&) = delete; + DirectRenderer& operator=(const DirectRenderer&) = delete; + virtual ~DirectRenderer(); void Initialize(); @@ -376,8 +380,6 @@ gfx::ColorSpace reshape_color_space_; absl::optional<gfx::BufferFormat> reshape_buffer_format_; bool reshape_use_stencil_ = false; - - DISALLOW_COPY_AND_ASSIGN(DirectRenderer); }; } // namespace viz
diff --git a/components/viz/service/display/display.h b/components/viz/service/display/display.h index 0cd0961f..bc47c05 100644 --- a/components/viz/service/display/display.h +++ b/components/viz/service/display/display.h
@@ -93,6 +93,9 @@ std::unique_ptr<DisplaySchedulerBase> scheduler, scoped_refptr<base::SingleThreadTaskRunner> current_task_runner); + Display(const Display&) = delete; + Display& operator=(const Display&) = delete; + ~Display() override; static constexpr base::TimeDelta kDrawToSwapMin = @@ -217,6 +220,10 @@ public: PresentationGroupTiming(); PresentationGroupTiming(PresentationGroupTiming&& other); + + PresentationGroupTiming(const PresentationGroupTiming&) = delete; + PresentationGroupTiming& operator=(const PresentationGroupTiming&) = delete; + ~PresentationGroupTiming(); void AddPresentationHelper( @@ -236,8 +243,6 @@ gfx::SwapTimings swap_timings_; std::vector<std::unique_ptr<Surface::PresentationHelper>> presentation_helpers_; - - DISALLOW_COPY_AND_ASSIGN(PresentationGroupTiming); }; // TODO(cblume, crbug.com/900973): |enable_shared_images| is a temporary @@ -310,8 +315,6 @@ uint64_t frame_sequence_number_ = 0; // The height of the top-controls in the previously drawn frame. float last_top_controls_visible_height_ = 0.f; - - DISALLOW_COPY_AND_ASSIGN(Display); }; } // namespace viz
diff --git a/components/viz/service/display/display_scheduler.h b/components/viz/service/display/display_scheduler.h index 0e2080b3b..6fd36aa4 100644 --- a/components/viz/service/display/display_scheduler.h +++ b/components/viz/service/display/display_scheduler.h
@@ -34,6 +34,10 @@ absl::optional<int> max_pending_swaps_120hz, bool wait_for_all_surfaces_before_draw = false, gfx::RenderingPipeline* gpu_pipeline = nullptr); + + DisplayScheduler(const DisplayScheduler&) = delete; + DisplayScheduler& operator=(const DisplayScheduler&) = delete; + ~DisplayScheduler() override; // DisplaySchedulerBase implementation. @@ -131,9 +135,6 @@ bool observing_begin_frame_source_; base::WeakPtrFactory<DisplayScheduler> weak_ptr_factory_{this}; - - private: - DISALLOW_COPY_AND_ASSIGN(DisplayScheduler); }; } // namespace viz
diff --git a/components/viz/service/display/dynamic_geometry_binding.h b/components/viz/service/display/dynamic_geometry_binding.h index a319c2d..b002289 100644 --- a/components/viz/service/display/dynamic_geometry_binding.h +++ b/components/viz/service/display/dynamic_geometry_binding.h
@@ -18,6 +18,10 @@ class VIZ_SERVICE_EXPORT DynamicGeometryBinding { public: explicit DynamicGeometryBinding(gpu::gles2::GLES2Interface* gl); + + DynamicGeometryBinding(const DynamicGeometryBinding&) = delete; + DynamicGeometryBinding& operator=(const DynamicGeometryBinding&) = delete; + ~DynamicGeometryBinding(); void PrepareForDraw(); @@ -29,8 +33,6 @@ GLuint quad_vertices_vbo_; GLuint quad_elements_vbo_; - - DISALLOW_COPY_AND_ASSIGN(DynamicGeometryBinding); }; } // namespace viz
diff --git a/components/viz/service/display/external_use_client.h b/components/viz/service/display/external_use_client.h index 88ca2172..03d66579 100644 --- a/components/viz/service/display/external_use_client.h +++ b/components/viz/service/display/external_use_client.h
@@ -39,6 +39,10 @@ ResourceFormat resource_format, const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info, sk_sp<SkColorSpace> color_space); + + ImageContext(const ImageContext&) = delete; + ImageContext& operator=(const ImageContext&) = delete; + virtual ~ImageContext(); virtual void OnContextLost(); @@ -91,8 +95,6 @@ // The promise image which is used on display thread. sk_sp<SkImage> image_; GrBackendFormat backend_format_; - - DISALLOW_COPY_AND_ASSIGN(ImageContext); }; // If |maybe_concurrent_reads| is true then there can be concurrent reads to
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc index 1e2ad642..34f6df83 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc
@@ -395,6 +395,9 @@ return nullptr; } + ScopedUseGrContext(const ScopedUseGrContext&) = delete; + ScopedUseGrContext& operator=(const ScopedUseGrContext&) = delete; + ~ScopedUseGrContext() { // Pass context control back to GLrenderer. scoped_gpu_raster_ = nullptr; @@ -415,8 +418,6 @@ std::unique_ptr<cc::ScopedGpuRaster> scoped_gpu_raster_; GLRenderer* renderer_; - - DISALLOW_COPY_AND_ASSIGN(ScopedUseGrContext); }; GLRenderer::GLRenderer(
diff --git a/components/viz/service/display/gl_renderer.h b/components/viz/service/display/gl_renderer.h index d00ce7f..16a2bb2 100644 --- a/components/viz/service/display/gl_renderer.h +++ b/components/viz/service/display/gl_renderer.h
@@ -80,6 +80,10 @@ DisplayResourceProviderGL* resource_provider, OverlayProcessorInterface* overlay_processor, scoped_refptr<base::SingleThreadTaskRunner> current_task_runner); + + GLRenderer(const GLRenderer&) = delete; + GLRenderer& operator=(const GLRenderer&) = delete; + ~GLRenderer() override; bool use_swap_with_bounds() const { return use_swap_with_bounds_; } @@ -506,8 +510,6 @@ // MessageLoop. scoped_refptr<base::SingleThreadTaskRunner> current_task_runner_; base::WeakPtrFactory<GLRenderer> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GLRenderer); }; } // namespace viz
diff --git a/components/viz/service/display/gl_renderer_copier.h b/components/viz/service/display/gl_renderer_copier.h index e3c483e..1b0cbf15 100644 --- a/components/viz/service/display/gl_renderer_copier.h +++ b/components/viz/service/display/gl_renderer_copier.h
@@ -75,6 +75,9 @@ GLRendererCopier(ContextProvider* context_provider, TextureDeleter* texture_deleter); + GLRendererCopier(const GLRendererCopier&) = delete; + GLRendererCopier& operator=(const GLRendererCopier&) = delete; + ~GLRendererCopier(); // Executes the |request|, copying from the currently-bound framebuffer of the @@ -474,8 +477,6 @@ // Weak ptr to this class. base::WeakPtrFactory<GLRendererCopier> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GLRendererCopier); }; } // namespace viz
diff --git a/components/viz/service/display/output_surface.h b/components/viz/service/display/output_surface.h index 59873e9..b702e33 100644 --- a/components/viz/service/display/output_surface.h +++ b/components/viz/service/display/output_surface.h
@@ -154,6 +154,9 @@ // Constructor for software compositing. explicit OutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device); + OutputSurface(const OutputSurface&) = delete; + OutputSurface& operator=(const OutputSurface&) = delete; + virtual ~OutputSurface(); const Capabilities& capabilities() const { return capabilities_; } @@ -305,8 +308,6 @@ private: const Type type_; skia::Matrix44 color_matrix_; - - DISALLOW_COPY_AND_ASSIGN(OutputSurface); }; } // namespace viz
diff --git a/components/viz/service/display/output_surface_frame.h b/components/viz/service/display/output_surface_frame.h index 3c6bc2f2..5109453 100644 --- a/components/viz/service/display/output_surface_frame.h +++ b/components/viz/service/display/output_surface_frame.h
@@ -24,6 +24,10 @@ public: OutputSurfaceFrame(); OutputSurfaceFrame(OutputSurfaceFrame&& other); + + OutputSurfaceFrame(const OutputSurfaceFrame&) = delete; + OutputSurfaceFrame& operator=(const OutputSurfaceFrame&) = delete; + ~OutputSurfaceFrame(); OutputSurfaceFrame& operator=(OutputSurfaceFrame&& other); @@ -40,9 +44,6 @@ // Metadata containing information to draw a delegated ink trail using // platform APIs. std::unique_ptr<gfx::DelegatedInkMetadata> delegated_ink_metadata; - - private: - DISALLOW_COPY_AND_ASSIGN(OutputSurfaceFrame); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_interface.h b/components/viz/service/display/overlay_processor_interface.h index 37da5397..6c4e643 100644 --- a/components/viz/service/display/overlay_processor_interface.h +++ b/components/viz/service/display/overlay_processor_interface.h
@@ -126,6 +126,10 @@ const RendererSettings& renderer_settings, const DebugRendererSettings* debug_settings); + OverlayProcessorInterface(const OverlayProcessorInterface&) = delete; + OverlayProcessorInterface& operator=(const OverlayProcessorInterface&) = + delete; + virtual ~OverlayProcessorInterface() = default; virtual bool IsOverlaySupported() const = 0; @@ -194,9 +198,6 @@ protected: OverlayProcessorInterface() = default; - - private: - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorInterface); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_mac.h b/components/viz/service/display/overlay_processor_mac.h index df29123..db7e888 100644 --- a/components/viz/service/display/overlay_processor_mac.h +++ b/components/viz/service/display/overlay_processor_mac.h
@@ -30,6 +30,10 @@ // For testing. explicit OverlayProcessorMac( std::unique_ptr<CALayerOverlayProcessor> ca_layer_overlay_processor); + + OverlayProcessorMac(const OverlayProcessorMac&) = delete; + OverlayProcessorMac& operator=(const OverlayProcessorMac&) = delete; + ~OverlayProcessorMac() override; bool DisableSplittingQuads() const override; @@ -84,7 +88,6 @@ private: bool output_surface_already_handled_; - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorMac); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_on_gpu.h b/components/viz/service/display/overlay_processor_on_gpu.h index 46d0f345..ce86d2a 100644 --- a/components/viz/service/display/overlay_processor_on_gpu.h +++ b/components/viz/service/display/overlay_processor_on_gpu.h
@@ -44,6 +44,10 @@ explicit OverlayProcessorOnGpu( gpu::DisplayCompositorMemoryAndTaskControllerOnGpu* display_controller_on_gpu); + + OverlayProcessorOnGpu(const OverlayProcessorOnGpu&) = delete; + OverlayProcessorOnGpu& operator=(const OverlayProcessorOnGpu&) = delete; + ~OverlayProcessorOnGpu(); // This function takes the overlay candidates, and schedule them for @@ -63,8 +67,6 @@ std::unique_ptr<gpu::SharedImageRepresentationFactory> shared_image_representation_factory_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorOnGpu); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_stub.h b/components/viz/service/display/overlay_processor_stub.h index 7587a3d..17cf54f 100644 --- a/components/viz/service/display/overlay_processor_stub.h +++ b/components/viz/service/display/overlay_processor_stub.h
@@ -16,6 +16,10 @@ : public OverlayProcessorInterface { public: OverlayProcessorStub() : OverlayProcessorInterface() {} + + OverlayProcessorStub(const OverlayProcessorStub&) = delete; + OverlayProcessorStub& operator=(const OverlayProcessorStub&) = delete; + ~OverlayProcessorStub() override {} // Overrides OverlayProcessorInterface's pure virtual functions. @@ -38,9 +42,6 @@ absl::optional<OutputSurfaceOverlayPlane>* output_surface_plane) final {} void SetDisplayTransformHint(gfx::OverlayTransform transform) final {} void SetViewportSize(const gfx::Size& size) final {} - - private: - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorStub); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_using_strategy.cc b/components/viz/service/display/overlay_processor_using_strategy.cc index 6ed608e..e5ec3fe 100644 --- a/components/viz/service/display/overlay_processor_using_strategy.cc +++ b/components/viz/service/display/overlay_processor_using_strategy.cc
@@ -155,6 +155,8 @@ DBG_DRAW_RECT("overlay.incoming.damage", (*damage_rect)); for (auto&& each : surface_damage_rect_list) { DBG_DRAW_RECT("overlay.surface.damage", each); + // TODO(petermcneeley) : Check is temporary to isolate b/191414141. + CHECK(each.size().GetCheckedArea().IsValid()); } // If we have any copy requests, we can't remove any quads for overlays or
diff --git a/components/viz/service/display/overlay_processor_using_strategy.h b/components/viz/service/display/overlay_processor_using_strategy.h index 999e11ac..dafd2091 100644 --- a/components/viz/service/display/overlay_processor_using_strategy.h +++ b/components/viz/service/display/overlay_processor_using_strategy.h
@@ -121,6 +121,10 @@ }; using StrategyList = std::vector<std::unique_ptr<Strategy>>; + OverlayProcessorUsingStrategy(const OverlayProcessorUsingStrategy&) = delete; + OverlayProcessorUsingStrategy& operator=( + const OverlayProcessorUsingStrategy&) = delete; + ~OverlayProcessorUsingStrategy() override; gfx::Rect GetPreviousFrameOverlaysBoundingRect() const final; @@ -291,8 +295,6 @@ // can downscale without failing. float min_working_scale_ = 1.0f; float max_failed_scale_ = 0.0f; - - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorUsingStrategy); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_processor_win.h b/components/viz/service/display/overlay_processor_win.h index 32a7f7c..6d16765 100644 --- a/components/viz/service/display/overlay_processor_win.h +++ b/components/viz/service/display/overlay_processor_win.h
@@ -31,6 +31,10 @@ OverlayProcessorWin( OutputSurface* output_surface, std::unique_ptr<DCLayerOverlayProcessor> dc_layer_overlay_processor); + + OverlayProcessorWin(const OverlayProcessorWin&) = delete; + OverlayProcessorWin& operator=(const OverlayProcessorWin&) = delete; + ~OverlayProcessorWin() override; bool IsOverlaySupported() const override; @@ -81,8 +85,6 @@ std::unique_ptr<DCLayerOverlayProcessor> dc_layer_overlay_processor_; bool is_video_capture_enabled_ = false; - - DISALLOW_COPY_AND_ASSIGN(OverlayProcessorWin); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_strategy_fullscreen.h b/components/viz/service/display/overlay_strategy_fullscreen.h index 646f4ff..964f8d5 100644 --- a/components/viz/service/display/overlay_strategy_fullscreen.h +++ b/components/viz/service/display/overlay_strategy_fullscreen.h
@@ -20,6 +20,11 @@ public: explicit OverlayStrategyFullscreen( OverlayProcessorUsingStrategy* capability_checker); + + OverlayStrategyFullscreen(const OverlayStrategyFullscreen&) = delete; + OverlayStrategyFullscreen& operator=(const OverlayStrategyFullscreen&) = + delete; + ~OverlayStrategyFullscreen() override; bool Attempt(const skia::Matrix44& output_color_matrix, @@ -59,8 +64,6 @@ private: OverlayProcessorUsingStrategy* capability_checker_; // Weak. - - DISALLOW_COPY_AND_ASSIGN(OverlayStrategyFullscreen); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_strategy_single_on_top.h b/components/viz/service/display/overlay_strategy_single_on_top.h index bd0d110..da29dd54b 100644 --- a/components/viz/service/display/overlay_strategy_single_on_top.h +++ b/components/viz/service/display/overlay_strategy_single_on_top.h
@@ -19,6 +19,11 @@ public: explicit OverlayStrategySingleOnTop( OverlayProcessorUsingStrategy* capability_checker); + + OverlayStrategySingleOnTop(const OverlayStrategySingleOnTop&) = delete; + OverlayStrategySingleOnTop& operator=(const OverlayStrategySingleOnTop&) = + delete; + ~OverlayStrategySingleOnTop() override; bool Attempt(const skia::Matrix44& output_color_matrix, @@ -68,8 +73,6 @@ ResourceId previous_frame_resource_id_ = kInvalidResourceId; size_t same_resource_id_frames_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(OverlayStrategySingleOnTop); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_strategy_underlay.h b/components/viz/service/display/overlay_strategy_underlay.h index 90218cd..8225b56 100644 --- a/components/viz/service/display/overlay_strategy_underlay.h +++ b/components/viz/service/display/overlay_strategy_underlay.h
@@ -34,6 +34,10 @@ OverlayStrategyUnderlay( OverlayProcessorUsingStrategy* capability_checker, OpaqueMode opaque_mode = OpaqueMode::RequireOpaqueCandidates); + + OverlayStrategyUnderlay(const OverlayStrategyUnderlay&) = delete; + OverlayStrategyUnderlay& operator=(const OverlayStrategyUnderlay&) = delete; + ~OverlayStrategyUnderlay() override; bool Attempt(const skia::Matrix44& output_color_matrix, @@ -77,8 +81,6 @@ private: OverlayProcessorUsingStrategy* capability_checker_; // Weak. OpaqueMode opaque_mode_; - - DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlay); }; } // namespace viz
diff --git a/components/viz/service/display/overlay_strategy_underlay_cast.h b/components/viz/service/display/overlay_strategy_underlay_cast.h index a4a9974..6b61154 100644 --- a/components/viz/service/display/overlay_strategy_underlay_cast.h +++ b/components/viz/service/display/overlay_strategy_underlay_cast.h
@@ -25,6 +25,11 @@ public: explicit OverlayStrategyUnderlayCast( OverlayProcessorUsingStrategy* capability_checker); + + OverlayStrategyUnderlayCast(const OverlayStrategyUnderlayCast&) = delete; + OverlayStrategyUnderlayCast& operator=(const OverlayStrategyUnderlayCast&) = + delete; + ~OverlayStrategyUnderlayCast() override; bool Attempt(const skia::Matrix44& output_color_matrix, @@ -75,8 +80,6 @@ private: // Keep track if an overlay is being used on the previous frame. bool is_using_overlay_ = false; - - DISALLOW_COPY_AND_ASSIGN(OverlayStrategyUnderlayCast); }; } // namespace viz
diff --git a/components/viz/service/display/program_binding.h b/components/viz/service/display/program_binding.h index 04b05dd3..81f72fa 100644 --- a/components/viz/service/display/program_binding.h +++ b/components/viz/service/display/program_binding.h
@@ -29,6 +29,10 @@ class VIZ_SERVICE_EXPORT ProgramBindingBase { public: ProgramBindingBase(); + + ProgramBindingBase(const ProgramBindingBase&) = delete; + ProgramBindingBase& operator=(const ProgramBindingBase&) = delete; + ~ProgramBindingBase(); bool Init(gpu::gles2::GLES2Interface* context, @@ -55,9 +59,6 @@ unsigned vertex_shader_id_; unsigned fragment_shader_id_; bool initialized_; - - private: - DISALLOW_COPY_AND_ASSIGN(ProgramBindingBase); }; enum ProgramType {
diff --git a/components/viz/service/display/shared_bitmap_manager.h b/components/viz/service/display/shared_bitmap_manager.h index 5fa0da1a..f9ff99c4 100644 --- a/components/viz/service/display/shared_bitmap_manager.h +++ b/components/viz/service/display/shared_bitmap_manager.h
@@ -21,6 +21,10 @@ class SharedBitmapManager { public: SharedBitmapManager() = default; + + SharedBitmapManager(const SharedBitmapManager&) = delete; + SharedBitmapManager& operator=(const SharedBitmapManager&) = delete; + virtual ~SharedBitmapManager() = default; // Used in the display compositor to find the bitmap associated with an id. @@ -40,9 +44,6 @@ // Used in the display compositor to break an association of an id to a shm // handle. virtual void ChildDeletedSharedBitmap(const SharedBitmapId& id) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SharedBitmapManager); }; } // namespace viz
diff --git a/components/viz/service/display/skia_output_surface.h b/components/viz/service/display/skia_output_surface.h index 1dd07f8..dfb6c58 100644 --- a/components/viz/service/display/skia_output_surface.h +++ b/components/viz/service/display/skia_output_surface.h
@@ -68,6 +68,10 @@ #endif explicit SkiaOutputSurface(OutputSurface::Type type); + + SkiaOutputSurface(const SkiaOutputSurface&) = delete; + SkiaOutputSurface& operator=(const SkiaOutputSurface&) = delete; + ~SkiaOutputSurface() override; SkiaOutputSurface* AsSkiaOutputSurface() override; @@ -197,9 +201,6 @@ sk_sp<SkColorSpace> color_space) = 0; virtual sk_sp<SkDeferredDisplayList> EndPaintRenderPassOverlay() = 0; #endif - - private: - DISALLOW_COPY_AND_ASSIGN(SkiaOutputSurface); }; } // namespace viz
diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index 67d8f6b2..9f99b37 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc
@@ -600,14 +600,16 @@ SkAlphaType alpha_type = kPremul_SkAlphaType, GrSurfaceOrigin origin = kTopLeft_GrSurfaceOrigin, bool use_target_color_space = false); + + ScopedSkImageBuilder(const ScopedSkImageBuilder&) = delete; + ScopedSkImageBuilder& operator=(const ScopedSkImageBuilder&) = delete; + ~ScopedSkImageBuilder() = default; const SkImage* sk_image() const { return sk_image_; } private: const SkImage* sk_image_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ScopedSkImageBuilder); }; SkiaRenderer::ScopedSkImageBuilder::ScopedSkImageBuilder( @@ -706,14 +708,15 @@ LOG_IF(ERROR, !sk_image_) << "Failed to create the promise sk yuva image."; } + ScopedYUVSkImageBuilder(const ScopedYUVSkImageBuilder&) = delete; + ScopedYUVSkImageBuilder& operator=(const ScopedYUVSkImageBuilder&) = delete; + ~ScopedYUVSkImageBuilder() = default; const SkImage* sk_image() const { return sk_image_.get(); } private: sk_sp<SkImage> sk_image_; - - DISALLOW_COPY_AND_ASSIGN(ScopedYUVSkImageBuilder); }; class SkiaRenderer::FrameResourceFence : public ResourceFence {
diff --git a/components/viz/service/display/skia_renderer.h b/components/viz/service/display/skia_renderer.h index b94ffe0b..4df9847 100644 --- a/components/viz/service/display/skia_renderer.h +++ b/components/viz/service/display/skia_renderer.h
@@ -47,6 +47,10 @@ DisplayResourceProviderSkia* resource_provider, OverlayProcessorInterface* overlay_processor, SkiaOutputSurface* skia_output_surface); + + SkiaRenderer(const SkiaRenderer&) = delete; + SkiaRenderer& operator=(const SkiaRenderer&) = delete; + ~SkiaRenderer() override; void SwapBuffers(SwapFrameData swap_frame_data) override; @@ -361,8 +365,6 @@ bool UsingSkiaForDelegatedInk() const; uint32_t debug_tint_modulate_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(SkiaRenderer); }; } // namespace viz
diff --git a/components/viz/service/display/software_output_device.h b/components/viz/service/display/software_output_device.h index 6fa80d6..3c798595 100644 --- a/components/viz/service/display/software_output_device.h +++ b/components/viz/service/display/software_output_device.h
@@ -35,6 +35,10 @@ SoftwareOutputDevice(); explicit SoftwareOutputDevice( scoped_refptr<base::SequencedTaskRunner> task_runner); + + SoftwareOutputDevice(const SoftwareOutputDevice&) = delete; + SoftwareOutputDevice& operator=(const SoftwareOutputDevice&) = delete; + virtual ~SoftwareOutputDevice(); // This may be called only once, and requires a non-nullptr argument. @@ -82,9 +86,6 @@ gfx::Rect damage_rect_; sk_sp<SkSurface> surface_; std::unique_ptr<gfx::VSyncProvider> vsync_provider_; - - private: - DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDevice); }; } // namespace viz
diff --git a/components/viz/service/display/software_renderer.h b/components/viz/service/display/software_renderer.h index 3e123cd..557e520 100644 --- a/components/viz/service/display/software_renderer.h +++ b/components/viz/service/display/software_renderer.h
@@ -33,6 +33,9 @@ DisplayResourceProviderSoftware* resource_provider, OverlayProcessorInterface* overlay_processor); + SoftwareRenderer(const SoftwareRenderer&) = delete; + SoftwareRenderer& operator=(const SoftwareRenderer&) = delete; + ~SoftwareRenderer() override; void SwapBuffers(SwapFrameData swap_frame_data) override; @@ -125,8 +128,6 @@ SkPaint current_paint_; SkSamplingOptions current_sampling_; std::unique_ptr<SkCanvas> current_framebuffer_canvas_; - - DISALLOW_COPY_AND_ASSIGN(SoftwareRenderer); }; } // namespace viz
diff --git a/components/viz/service/display/static_geometry_binding.h b/components/viz/service/display/static_geometry_binding.h index b4204be..a181317 100644 --- a/components/viz/service/display/static_geometry_binding.h +++ b/components/viz/service/display/static_geometry_binding.h
@@ -17,6 +17,10 @@ public: StaticGeometryBinding(gpu::gles2::GLES2Interface* gl, const gfx::RectF& quad_vertex_rect); + + StaticGeometryBinding(const StaticGeometryBinding&) = delete; + StaticGeometryBinding& operator=(const StaticGeometryBinding&) = delete; + ~StaticGeometryBinding(); void PrepareForDraw(); @@ -30,8 +34,6 @@ GLuint quad_vertices_vbo_; GLuint quad_elements_vbo_; - - DISALLOW_COPY_AND_ASSIGN(StaticGeometryBinding); }; } // namespace viz
diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc index 66d56a5..a341321 100644 --- a/components/viz/service/display/surface_aggregator.cc +++ b/components/viz/service/display/surface_aggregator.cc
@@ -399,6 +399,8 @@ damage_rect_in_root_target_space.Intersect(root_clip_rect); } + // TODO(petermcneeley) : Check is temporary to isolate b/191414141. + CHECK(damage_rect_in_root_target_space.size().GetCheckedArea().IsValid()); surface_damage_rect_list_->push_back(damage_rect_in_root_target_space); } @@ -463,6 +465,8 @@ surface_damage_rect_list_->push_back(gfx::Rect()); } + // TODO(petermcneeley) : Check is temporary to isolate b/191414141. + CHECK(!surface_damage_rect_list_->empty()); // The latest surface damage rect. *overlay_damage_index = surface_damage_rect_list_->size() - 1; @@ -1192,6 +1196,8 @@ AddSurfaceDamageToDamageList(damage_rect_in_target_space.value(), target_transform, {}, dest_pass, /*resolved_frame=*/nullptr); + // TODO(petermcneeley) : Check is temporary to isolate b/191414141. + CHECK_GE(surface_damage_rect_list_->size(), 1u); } else if (quad == quad_with_overlay_damage_index) { dest_shared_quad_state->overlay_damage_index = overlay_damage_index; }
diff --git a/components/viz/service/display/surface_aggregator.h b/components/viz/service/display/surface_aggregator.h index 817ab9e..e654d724 100644 --- a/components/viz/service/display/surface_aggregator.h +++ b/components/viz/service/display/surface_aggregator.h
@@ -54,6 +54,10 @@ DisplayResourceProvider* provider, bool aggregate_only_damaged, bool needs_surface_damage_rect_list); + + SurfaceAggregator(const SurfaceAggregator&) = delete; + SurfaceAggregator& operator=(const SurfaceAggregator&) = delete; + ~SurfaceAggregator(); // These constants are used for all time related metrics recorded in @@ -457,8 +461,6 @@ // Used to generate new unique render pass ids in the aggregated namespace. AggregatedRenderPassId::Generator render_pass_id_generator_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceAggregator); }; } // namespace viz
diff --git a/components/viz/service/display/surface_aggregator_unittest.cc b/components/viz/service/display/surface_aggregator_unittest.cc index 8d370bd..2c7f10b 100644 --- a/components/viz/service/display/surface_aggregator_unittest.cc +++ b/components/viz/service/display/surface_aggregator_unittest.cc
@@ -80,6 +80,11 @@ class MockAggregatedDamageCallback { public: MockAggregatedDamageCallback() = default; + + MockAggregatedDamageCallback(const MockAggregatedDamageCallback&) = delete; + MockAggregatedDamageCallback& operator=(const MockAggregatedDamageCallback&) = + delete; + ~MockAggregatedDamageCallback() = default; CompositorFrameSinkSupport::AggregatedDamageCallback GetCallback() { @@ -96,8 +101,6 @@ private: base::WeakPtrFactory<MockAggregatedDamageCallback> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockAggregatedDamageCallback); }; class DisplayTimeSource { @@ -1004,6 +1007,9 @@ allocator_.GenerateId(); } + TestVizClient(const TestVizClient&) = delete; + TestVizClient& operator=(const TestVizClient&) = delete; + ~TestVizClient() = default; Surface* GetSurface() const { @@ -1065,8 +1071,6 @@ ParentLocalSurfaceIdAllocator allocator_; std::map<TestVizClient*, bool> embedded_clients_; - - DISALLOW_COPY_AND_ASSIGN(TestVizClient); }; TEST_F(SurfaceAggregatorValidSurfaceTest, UndrawnSurfaces) {
diff --git a/components/viz/service/display/sync_query_collection.cc b/components/viz/service/display/sync_query_collection.cc index e1beba1..8507d72 100644 --- a/components/viz/service/display/sync_query_collection.cc +++ b/components/viz/service/display/sync_query_collection.cc
@@ -26,6 +26,10 @@ : gl_(gl), query_id_(0u), is_pending_(false) { gl_->GenQueriesEXT(1, &query_id_); } + + SyncQuery(const SyncQuery&) = delete; + SyncQuery& operator=(const SyncQuery&) = delete; + virtual ~SyncQuery() { gl_->DeleteQueriesEXT(1, &query_id_); } scoped_refptr<ResourceFence> Begin() { @@ -102,8 +106,6 @@ unsigned query_id_; bool is_pending_; base::WeakPtrFactory<SyncQuery> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SyncQuery); }; SyncQueryCollection::SyncQueryCollection(gpu::gles2::GLES2Interface* gl)
diff --git a/components/viz/service/display/texture_deleter.h b/components/viz/service/display/texture_deleter.h index dfec16bd..eadcd3d 100644 --- a/components/viz/service/display/texture_deleter.h +++ b/components/viz/service/display/texture_deleter.h
@@ -30,6 +30,10 @@ // to. If null, the delete will happen on the calling thread. explicit TextureDeleter( scoped_refptr<base::SingleThreadTaskRunner> task_runner); + + TextureDeleter(const TextureDeleter&) = delete; + TextureDeleter& operator=(const TextureDeleter&) = delete; + ~TextureDeleter(); // Returns a Callback that can be used as the ReleaseCallback for a @@ -53,8 +57,6 @@ scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner_; std::vector<std::unique_ptr<ReleaseCallback>> impl_callbacks_; base::WeakPtrFactory<TextureDeleter> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TextureDeleter); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/buffer_queue.h b/components/viz/service/display_embedder/buffer_queue.h index 5612939d..30f572a806 100644 --- a/components/viz/service/display_embedder/buffer_queue.h +++ b/components/viz/service/display_embedder/buffer_queue.h
@@ -67,6 +67,10 @@ // |sii|. BufferQueue(gpu::SharedImageInterface* sii, gpu::SurfaceHandle surface_handle); + + BufferQueue(const BufferQueue&) = delete; + BufferQueue& operator=(const BufferQueue&) = delete; + virtual ~BufferQueue(); // Sets the provider of sync tokens that the BufferQueue needs to ensure @@ -171,8 +175,6 @@ base::circular_deque<std::unique_ptr<AllocatedSurface>> in_flight_surfaces_; gpu::SurfaceHandle surface_handle_; SyncTokenProvider* sync_token_provider_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(BufferQueue); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/gl_output_surface_android.h b/components/viz/service/display_embedder/gl_output_surface_android.h index 6ccf9ec5..8ad4a43 100644 --- a/components/viz/service/display_embedder/gl_output_surface_android.h +++ b/components/viz/service/display_embedder/gl_output_surface_android.h
@@ -13,6 +13,10 @@ GLOutputSurfaceAndroid( scoped_refptr<VizProcessContextProvider> context_provider, gpu::SurfaceHandle surface_handle); + + GLOutputSurfaceAndroid(const GLOutputSurfaceAndroid&) = delete; + GLOutputSurfaceAndroid& operator=(const GLOutputSurfaceAndroid&) = delete; + ~GLOutputSurfaceAndroid() override; // GLOutputSurface implementation: @@ -21,8 +25,6 @@ uint32_t flags, gpu::ContextSupport::SwapCompletedCallback swap_callback, gpu::ContextSupport::PresentationCallback presentation_callback) override; - - DISALLOW_COPY_AND_ASSIGN(GLOutputSurfaceAndroid); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/gl_output_surface_buffer_queue.h b/components/viz/service/display_embedder/gl_output_surface_buffer_queue.h index e9ec9c9..73bcccc 100644 --- a/components/viz/service/display_embedder/gl_output_surface_buffer_queue.h +++ b/components/viz/service/display_embedder/gl_output_surface_buffer_queue.h
@@ -38,6 +38,10 @@ gpu::SurfaceHandle surface_handle, std::unique_ptr<BufferQueue> buffer_queue); + GLOutputSurfaceBufferQueue(const GLOutputSurfaceBufferQueue&) = delete; + GLOutputSurfaceBufferQueue& operator=(const GLOutputSurfaceBufferQueue&) = + delete; + ~GLOutputSurfaceBufferQueue() override; // BufferQueue::SyncTokenProvider implementation. @@ -100,8 +104,6 @@ gfx::OverlayTransform display_transform_ = gfx::OVERLAY_TRANSFORM_NONE; gfx::Size reshape_size_; gfx::Size swap_size_; - - DISALLOW_COPY_AND_ASSIGN(GLOutputSurfaceBufferQueue); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/gl_output_surface_chromeos.h b/components/viz/service/display_embedder/gl_output_surface_chromeos.h index 7f7b70c..63ad613a 100644 --- a/components/viz/service/display_embedder/gl_output_surface_chromeos.h +++ b/components/viz/service/display_embedder/gl_output_surface_chromeos.h
@@ -14,6 +14,10 @@ GLOutputSurfaceChromeOS( scoped_refptr<VizProcessContextProvider> context_provider, gpu::SurfaceHandle surface_handle); + + GLOutputSurfaceChromeOS(const GLOutputSurfaceChromeOS&) = delete; + GLOutputSurfaceChromeOS& operator=(const GLOutputSurfaceChromeOS&) = delete; + ~GLOutputSurfaceChromeOS() override; // GLOutputSurface: @@ -22,8 +26,6 @@ private: gfx::OverlayTransform display_transform_ = gfx::OVERLAY_TRANSFORM_NONE; - - DISALLOW_COPY_AND_ASSIGN(GLOutputSurfaceChromeOS); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/gl_output_surface_offscreen.h b/components/viz/service/display_embedder/gl_output_surface_offscreen.h index 1f47379..e769f125 100644 --- a/components/viz/service/display_embedder/gl_output_surface_offscreen.h +++ b/components/viz/service/display_embedder/gl_output_surface_offscreen.h
@@ -22,6 +22,10 @@ public: explicit GLOutputSurfaceOffscreen( scoped_refptr<VizProcessContextProvider> context_provider); + + GLOutputSurfaceOffscreen(const GLOutputSurfaceOffscreen&) = delete; + GLOutputSurfaceOffscreen& operator=(const GLOutputSurfaceOffscreen&) = delete; + ~GLOutputSurfaceOffscreen() override; // OutputSurface implementation. @@ -46,8 +50,6 @@ gfx::ColorSpace color_space_; base::WeakPtrFactory<GLOutputSurfaceOffscreen> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GLOutputSurfaceOffscreen); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/image_context_impl.h b/components/viz/service/display_embedder/image_context_impl.h index 2bdc5b8..7e7bb38 100644 --- a/components/viz/service/display_embedder/image_context_impl.h +++ b/components/viz/service/display_embedder/image_context_impl.h
@@ -54,6 +54,9 @@ sk_sp<SkColorSpace> color_space, const bool allow_keeping_read_access = true); + ImageContextImpl(const ImageContextImpl&) = delete; + ImageContextImpl& operator=(const ImageContextImpl&) = delete; + ~ImageContextImpl() final; void OnContextLost() final; @@ -120,8 +123,6 @@ // The |promise_image_texture| is used for fulfilling the promise image. It is // used on GPU thread. SkPromiseImageTexture* promise_image_texture_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(ImageContextImpl); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.h b/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.h index 516c0a22..7596d427 100644 --- a/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.h +++ b/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.h
@@ -37,6 +37,12 @@ InProcessGpuMemoryBufferManager( gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory, gpu::SyncPointManager* sync_point_manager); + + InProcessGpuMemoryBufferManager(const InProcessGpuMemoryBufferManager&) = + delete; + InProcessGpuMemoryBufferManager& operator=( + const InProcessGpuMemoryBufferManager&) = delete; + // Note: Any GpuMemoryBuffers that haven't been destroyed yet will be leaked // until the GpuMemoryBufferFactory is destroyed. ~InProcessGpuMemoryBufferManager() override; @@ -83,8 +89,6 @@ base::WeakPtr<InProcessGpuMemoryBufferManager> weak_ptr_; base::WeakPtrFactory<InProcessGpuMemoryBufferManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InProcessGpuMemoryBufferManager); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/output_device_backing_unittest.cc b/components/viz/service/display_embedder/output_device_backing_unittest.cc index 2ea317c..b002d2b4 100644 --- a/components/viz/service/display_embedder/output_device_backing_unittest.cc +++ b/components/viz/service/display_embedder/output_device_backing_unittest.cc
@@ -29,6 +29,10 @@ backing_->ClientResized(); backing_->GetSharedMemoryRegion(viewport_size_); } + + TestBackingClient(const TestBackingClient&) = delete; + TestBackingClient& operator=(const TestBackingClient&) = delete; + ~TestBackingClient() override { backing_->UnregisterClient(this); } const gfx::Size& viewport_size() const { return viewport_size_; } @@ -44,8 +48,6 @@ OutputDeviceBacking* const backing_; gfx::Size viewport_size_; bool release_canvas_called_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestBackingClient); }; } // namespace
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h index a6bb42cd..e62a7c7 100644 --- a/components/viz/service/display_embedder/output_surface_provider_impl.h +++ b/components/viz/service/display_embedder/output_surface_provider_impl.h
@@ -47,6 +47,11 @@ bool headless); // Software compositing only. explicit OutputSurfaceProviderImpl(bool headless); + + OutputSurfaceProviderImpl(const OutputSurfaceProviderImpl&) = delete; + OutputSurfaceProviderImpl& operator=(const OutputSurfaceProviderImpl&) = + delete; + ~OutputSurfaceProviderImpl() override; std::unique_ptr<DisplayCompositorMemoryAndTaskController> CreateGpuDependency( @@ -87,8 +92,6 @@ std::unique_ptr<gpu::SyncPointManager> sync_point_manager_; const bool headless_; - - DISALLOW_COPY_AND_ASSIGN(OutputSurfaceProviderImpl); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/output_surface_unified.h b/components/viz/service/display_embedder/output_surface_unified.h index 1fa3e08..62b6ef6 100644 --- a/components/viz/service/display_embedder/output_surface_unified.h +++ b/components/viz/service/display_embedder/output_surface_unified.h
@@ -24,6 +24,10 @@ public: // TODO(kylechar): Add test that uses OutputSurfaceUnified. OutputSurfaceUnified(); + + OutputSurfaceUnified(const OutputSurfaceUnified&) = delete; + OutputSurfaceUnified& operator=(const OutputSurfaceUnified&) = delete; + ~OutputSurfaceUnified() override; // OutputSurface implementation. @@ -47,9 +51,6 @@ UpdateVSyncParametersCallback callback) override {} void SetDisplayTransformHint(gfx::OverlayTransform transform) override {} gfx::OverlayTransform GetDisplayTransform() override; - - private: - DISALLOW_COPY_AND_ASSIGN(OutputSurfaceUnified); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/server_shared_bitmap_manager.h b/components/viz/service/display_embedder/server_shared_bitmap_manager.h index 50bb6f97d..ec62317 100644 --- a/components/viz/service/display_embedder/server_shared_bitmap_manager.h +++ b/components/viz/service/display_embedder/server_shared_bitmap_manager.h
@@ -29,6 +29,11 @@ public base::trace_event::MemoryDumpProvider { public: ServerSharedBitmapManager(); + + ServerSharedBitmapManager(const ServerSharedBitmapManager&) = delete; + ServerSharedBitmapManager& operator=(const ServerSharedBitmapManager&) = + delete; + ~ServerSharedBitmapManager() override; // SharedBitmapManager implementation. @@ -55,8 +60,6 @@ scoped_refptr<BitmapData>, SharedBitmapIdHash> handle_map_; - - DISALLOW_COPY_AND_ASSIGN(ServerSharedBitmapManager); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_device.h b/components/viz/service/display_embedder/skia_output_device.h index 0a19355..b105de4 100644 --- a/components/viz/service/display_embedder/skia_output_device.h +++ b/components/viz/service/display_embedder/skia_output_device.h
@@ -58,6 +58,10 @@ ScopedPaint(std::vector<GrBackendSemaphore> end_semaphores, SkiaOutputDevice* device, SkSurface* sk_surface); + + ScopedPaint(const ScopedPaint&) = delete; + ScopedPaint& operator=(const ScopedPaint&) = delete; + ~ScopedPaint(); // This can be null. @@ -82,8 +86,6 @@ SkiaOutputDevice* const device_; // Null when using vulkan secondary command buffer. SkSurface* const sk_surface_; - - DISALLOW_COPY_AND_ASSIGN(ScopedPaint); }; using BufferPresentedCallback =
diff --git a/components/viz/service/display_embedder/skia_output_device_dawn.h b/components/viz/service/display_embedder/skia_output_device_dawn.h index 40beb12..ec23434 100644 --- a/components/viz/service/display_embedder/skia_output_device_dawn.h +++ b/components/viz/service/display_embedder/skia_output_device_dawn.h
@@ -31,6 +31,10 @@ gfx::SurfaceOrigin origin, gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); + + SkiaOutputDeviceDawn(const SkiaOutputDeviceDawn&) = delete; + SkiaOutputDeviceDawn& operator=(const SkiaOutputDeviceDawn&) = delete; + ~SkiaOutputDeviceDawn() override; gpu::SurfaceHandle GetChildSurfaceHandle() const; @@ -69,8 +73,6 @@ // the rendering. gl::ChildWindowWin creates and owns a window which is // reparented by the browser to be a child of its window. gl::ChildWindowWin child_window_; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputDeviceDawn); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_device_gl.h b/components/viz/service/display_embedder/skia_output_device_gl.h index 50b2c6e..1e06dbe 100644 --- a/components/viz/service/display_embedder/skia_output_device_gl.h +++ b/components/viz/service/display_embedder/skia_output_device_gl.h
@@ -44,6 +44,10 @@ scoped_refptr<gpu::gles2::FeatureInfo> feature_info, gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); + + SkiaOutputDeviceGL(const SkiaOutputDeviceGL&) = delete; + SkiaOutputDeviceGL& operator=(const SkiaOutputDeviceGL&) = delete; + ~SkiaOutputDeviceGL() override; // SkiaOutputDevice implementation: @@ -106,8 +110,6 @@ uint64_t backbuffer_estimated_size_ = 0; base::WeakPtrFactory<SkiaOutputDeviceGL> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputDeviceGL); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_device_offscreen.h b/components/viz/service/display_embedder/skia_output_device_offscreen.h index 1011f074..5bb35f9 100644 --- a/components/viz/service/display_embedder/skia_output_device_offscreen.h +++ b/components/viz/service/display_embedder/skia_output_device_offscreen.h
@@ -23,6 +23,11 @@ bool has_alpha, gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); + + SkiaOutputDeviceOffscreen(const SkiaOutputDeviceOffscreen&) = delete; + SkiaOutputDeviceOffscreen& operator=(const SkiaOutputDeviceOffscreen&) = + delete; + ~SkiaOutputDeviceOffscreen() override; // SkiaOutputDevice implementation: @@ -55,8 +60,6 @@ private: uint64_t backbuffer_estimated_size_ = 0; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputDeviceOffscreen); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_device_vulkan.h b/components/viz/service/display_embedder/skia_output_device_vulkan.h index 405cd5a..d867ed0 100644 --- a/components/viz/service/display_embedder/skia_output_device_vulkan.h +++ b/components/viz/service/display_embedder/skia_output_device_vulkan.h
@@ -33,6 +33,10 @@ gpu::SurfaceHandle surface_handle, gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); + + SkiaOutputDeviceVulkan(const SkiaOutputDeviceVulkan&) = delete; + SkiaOutputDeviceVulkan& operator=(const SkiaOutputDeviceVulkan&) = delete; + ~SkiaOutputDeviceVulkan() override; static std::unique_ptr<SkiaOutputDeviceVulkan> Create( @@ -101,8 +105,6 @@ std::vector<gfx::Rect> damage_of_images_; base::WeakPtrFactory<SkiaOutputDeviceVulkan> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputDeviceVulkan); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_device_x11.h b/components/viz/service/display_embedder/skia_output_device_x11.h index 0e1805f..768c027 100644 --- a/components/viz/service/display_embedder/skia_output_device_x11.h +++ b/components/viz/service/display_embedder/skia_output_device_x11.h
@@ -25,6 +25,10 @@ x11::VisualId visual, gpu::MemoryTracker* memory_tracker, DidSwapBufferCompleteCallback did_swap_buffer_complete_callback); + + SkiaOutputDeviceX11(const SkiaOutputDeviceX11&) = delete; + SkiaOutputDeviceX11& operator=(const SkiaOutputDeviceX11&) = delete; + ~SkiaOutputDeviceX11() override; static std::unique_ptr<SkiaOutputDeviceX11> Create( @@ -50,8 +54,6 @@ const x11::VisualId visual_; const x11::GraphicsContext gc_; scoped_refptr<base::RefCountedMemory> pixels_; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputDeviceX11); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_surface_dependency_impl.h b/components/viz/service/display_embedder/skia_output_surface_dependency_impl.h index 2b62f77..0002fb2 100644 --- a/components/viz/service/display_embedder/skia_output_surface_dependency_impl.h +++ b/components/viz/service/display_embedder/skia_output_surface_dependency_impl.h
@@ -26,6 +26,12 @@ SkiaOutputSurfaceDependencyImpl( GpuServiceImpl* gpu_service_impl, gpu::SurfaceHandle surface_handle); + + SkiaOutputSurfaceDependencyImpl(const SkiaOutputSurfaceDependencyImpl&) = + delete; + SkiaOutputSurfaceDependencyImpl& operator=( + const SkiaOutputSurfaceDependencyImpl&) = delete; + ~SkiaOutputSurfaceDependencyImpl() override; std::unique_ptr<gpu::SingleTaskSequence> CreateSequence() override; @@ -68,8 +74,6 @@ GpuServiceImpl* const gpu_service_impl_; const gpu::SurfaceHandle surface_handle_; scoped_refptr<base::SingleThreadTaskRunner> client_thread_task_runner_; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputSurfaceDependencyImpl); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl.h b/components/viz/service/display_embedder/skia_output_surface_impl.h index 9e5f894..b068914 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl.h
@@ -64,6 +64,10 @@ DisplayCompositorMemoryAndTaskController* display_controller, const RendererSettings& renderer_settings, const DebugRendererSettings* debug_settings); + + SkiaOutputSurfaceImpl(const SkiaOutputSurfaceImpl&) = delete; + SkiaOutputSurfaceImpl& operator=(const SkiaOutputSurfaceImpl&) = delete; + ~SkiaOutputSurfaceImpl() override; // OutputSurface implementation: @@ -396,8 +400,6 @@ base::WeakPtr<SkiaOutputSurfaceImpl> weak_ptr_; base::WeakPtrFactory<SkiaOutputSurfaceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputSurfaceImpl); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h index 3f49cb4e..925fe5d 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.h
@@ -108,6 +108,11 @@ BufferPresentedCallback buffer_presented_callback, ContextLostCallback context_lost_callback, GpuVSyncCallback gpu_vsync_callback); + + SkiaOutputSurfaceImplOnGpu(const SkiaOutputSurfaceImplOnGpu&) = delete; + SkiaOutputSurfaceImplOnGpu& operator=(const SkiaOutputSurfaceImplOnGpu&) = + delete; + ~SkiaOutputSurfaceImplOnGpu() override; gpu::CommandBufferId command_buffer_id() const { @@ -357,6 +362,11 @@ class PromiseImageAccessHelper { public: explicit PromiseImageAccessHelper(SkiaOutputSurfaceImplOnGpu* impl_on_gpu); + + PromiseImageAccessHelper(const PromiseImageAccessHelper&) = delete; + PromiseImageAccessHelper& operator=(const PromiseImageAccessHelper&) = + delete; + ~PromiseImageAccessHelper(); void BeginAccess(std::vector<ImageContextImpl*> image_contexts, @@ -367,8 +377,6 @@ private: SkiaOutputSurfaceImplOnGpu* const impl_on_gpu_; base::flat_set<ImageContextImpl*> image_contexts_; - - DISALLOW_COPY_AND_ASSIGN(PromiseImageAccessHelper); }; PromiseImageAccessHelper promise_image_access_helper_{this}; base::flat_set<ImageContextImpl*> image_contexts_with_end_access_state_; @@ -430,8 +438,6 @@ base::WeakPtr<SkiaOutputSurfaceImplOnGpu> weak_ptr_; base::WeakPtrFactory<SkiaOutputSurfaceImplOnGpu> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SkiaOutputSurfaceImplOnGpu); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h index f386735..1558d73 100644 --- a/components/viz/service/display_embedder/software_output_device_mac.h +++ b/components/viz/service/display_embedder/software_output_device_mac.h
@@ -23,6 +23,10 @@ public: explicit SoftwareOutputDeviceMac( scoped_refptr<base::SequencedTaskRunner> task_runner); + + SoftwareOutputDeviceMac(const SoftwareOutputDeviceMac&) = delete; + SoftwareOutputDeviceMac& operator=(const SoftwareOutputDeviceMac&) = delete; + ~SoftwareOutputDeviceMac() override; // SoftwareOutputDevice implementation. @@ -73,8 +77,6 @@ std::unique_ptr<SkCanvas> current_paint_canvas_; SkRegion last_copy_region_for_testing_; - - DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceMac); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/software_output_device_ozone.h b/components/viz/service/display_embedder/software_output_device_ozone.h index 102fc50..96e9826 100644 --- a/components/viz/service/display_embedder/software_output_device_ozone.h +++ b/components/viz/service/display_embedder/software_output_device_ozone.h
@@ -28,6 +28,11 @@ SoftwareOutputDeviceOzone( std::unique_ptr<ui::PlatformWindowSurface> platform_window_surface, std::unique_ptr<ui::SurfaceOzoneCanvas> surface_ozone); + + SoftwareOutputDeviceOzone(const SoftwareOutputDeviceOzone&) = delete; + SoftwareOutputDeviceOzone& operator=(const SoftwareOutputDeviceOzone&) = + delete; + ~SoftwareOutputDeviceOzone() override; void Resize(const gfx::Size& viewport_pixel_size, @@ -43,8 +48,6 @@ std::unique_ptr<ui::PlatformWindowSurface> platform_window_surface_; std::unique_ptr<ui::SurfaceOzoneCanvas> surface_ozone_; - - DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceOzone); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/software_output_device_x11.h b/components/viz/service/display_embedder/software_output_device_x11.h index 9277ece1..80798b20 100644 --- a/components/viz/service/display_embedder/software_output_device_x11.h +++ b/components/viz/service/display_embedder/software_output_device_x11.h
@@ -19,6 +19,9 @@ public: explicit SoftwareOutputDeviceX11(gfx::AcceleratedWidget widget); + SoftwareOutputDeviceX11(const SoftwareOutputDeviceX11&) = delete; + SoftwareOutputDeviceX11& operator=(const SoftwareOutputDeviceX11&) = delete; + ~SoftwareOutputDeviceX11() override; private: @@ -32,8 +35,6 @@ ui::X11SoftwareBitmapPresenter x11_software_bitmap_presenter_; THREAD_CHECKER(thread_checker_); - - DISALLOW_COPY_AND_ASSIGN(SoftwareOutputDeviceX11); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/software_output_surface.h b/components/viz/service/display_embedder/software_output_surface.h index 7f75e707..8c6029c 100644 --- a/components/viz/service/display_embedder/software_output_surface.h +++ b/components/viz/service/display_embedder/software_output_surface.h
@@ -26,6 +26,10 @@ public: explicit SoftwareOutputSurface( std::unique_ptr<SoftwareOutputDevice> software_device); + + SoftwareOutputSurface(const SoftwareOutputSurface&) = delete; + SoftwareOutputSurface& operator=(const SoftwareOutputSurface&) = delete; + ~SoftwareOutputSurface() override; // OutputSurface implementation. @@ -78,8 +82,6 @@ #endif base::WeakPtrFactory<SoftwareOutputSurface> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SoftwareOutputSurface); }; } // namespace viz
diff --git a/components/viz/service/display_embedder/software_output_surface_unittest.cc b/components/viz/service/display_embedder/software_output_surface_unittest.cc index c6ff42b..324ef3f9 100644 --- a/components/viz/service/display_embedder/software_output_surface_unittest.cc +++ b/components/viz/service/display_embedder/software_output_surface_unittest.cc
@@ -20,6 +20,10 @@ class FakeVSyncProvider : public gfx::VSyncProvider { public: FakeVSyncProvider() = default; + + FakeVSyncProvider(const FakeVSyncProvider&) = delete; + FakeVSyncProvider& operator=(const FakeVSyncProvider&) = delete; + ~FakeVSyncProvider() override = default; int call_count() const { return call_count_; } @@ -40,13 +44,16 @@ private: int call_count_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeVSyncProvider); }; class VSyncSoftwareOutputDevice : public SoftwareOutputDevice { public: VSyncSoftwareOutputDevice() = default; + + VSyncSoftwareOutputDevice(const VSyncSoftwareOutputDevice&) = delete; + VSyncSoftwareOutputDevice& operator=(const VSyncSoftwareOutputDevice&) = + delete; + ~VSyncSoftwareOutputDevice() override = default; // SoftwareOutputDevice implementation. @@ -54,8 +61,6 @@ private: FakeVSyncProvider vsync_provider_; - - DISALLOW_COPY_AND_ASSIGN(VSyncSoftwareOutputDevice); }; } // namespace
diff --git a/components/viz/service/display_embedder/vsync_parameter_listener.h b/components/viz/service/display_embedder/vsync_parameter_listener.h index 9d7459e..3dc9c9c9 100644 --- a/components/viz/service/display_embedder/vsync_parameter_listener.h +++ b/components/viz/service/display_embedder/vsync_parameter_listener.h
@@ -23,6 +23,10 @@ public: explicit VSyncParameterListener( mojo::PendingRemote<mojom::VSyncParameterObserver> observer); + + VSyncParameterListener(const VSyncParameterListener&) = delete; + VSyncParameterListener& operator=(const VSyncParameterListener&) = delete; + ~VSyncParameterListener(); void OnVSyncParametersUpdated(base::TimeTicks timebase, @@ -40,8 +44,6 @@ base::TimeDelta last_interval_; base::TimeDelta last_offset_; - - DISALLOW_COPY_AND_ASSIGN(VSyncParameterListener); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_impl.h b/components/viz/service/frame_sinks/compositor_frame_sink_impl.h index fce4249..ef6b093 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_impl.h +++ b/components/viz/service/frame_sinks/compositor_frame_sink_impl.h
@@ -35,6 +35,9 @@ mojo::PendingReceiver<mojom::CompositorFrameSink> receiver, mojo::PendingRemote<mojom::CompositorFrameSinkClient> client); + CompositorFrameSinkImpl(const CompositorFrameSinkImpl&) = delete; + CompositorFrameSinkImpl& operator=(const CompositorFrameSinkImpl&) = delete; + ~CompositorFrameSinkImpl() override; // mojom::CompositorFrameSink: @@ -76,8 +79,6 @@ // Must be destroyed before |compositor_frame_sink_client_|. This must never // change for the lifetime of CompositorFrameSinkImpl. const std::unique_ptr<CompositorFrameSinkSupport> support_; - - DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkImpl); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support.h b/components/viz/service/frame_sinks/compositor_frame_sink_support.h index 42777d8..9ba4752 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_support.h +++ b/components/viz/service/frame_sinks/compositor_frame_sink_support.h
@@ -78,6 +78,11 @@ FrameSinkManagerImpl* frame_sink_manager, const FrameSinkId& frame_sink_id, bool is_root); + + CompositorFrameSinkSupport(const CompositorFrameSinkSupport&) = delete; + CompositorFrameSinkSupport& operator=(const CompositorFrameSinkSupport&) = + delete; + ~CompositorFrameSinkSupport() override; const FrameSinkId& frame_sink_id() const { return frame_sink_id_; } @@ -404,8 +409,6 @@ uint32_t number_clients_capturing_ = 0; base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(CompositorFrameSinkSupport); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc index 1708b52..ca90f5aa 100644 --- a/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc +++ b/components/viz/service/frame_sinks/compositor_frame_sink_support_unittest.cc
@@ -82,6 +82,11 @@ class MockFrameSinkManagerClient : public mojom::FrameSinkManagerClient { public: MockFrameSinkManagerClient() = default; + + MockFrameSinkManagerClient(const MockFrameSinkManagerClient&) = delete; + MockFrameSinkManagerClient& operator=(const MockFrameSinkManagerClient&) = + delete; + ~MockFrameSinkManagerClient() override = default; // mojom::FrameSinkManagerClient: @@ -91,9 +96,6 @@ void OnAggregatedHitTestRegionListUpdated( const FrameSinkId& frame_sink_id, const std::vector<AggregatedHitTestRegion>& hit_test_data) override {} - - private: - DISALLOW_COPY_AND_ASSIGN(MockFrameSinkManagerClient); }; class CompositorFrameSinkSupportTest : public testing::Test {
diff --git a/components/viz/service/frame_sinks/external_begin_frame_source_android.h b/components/viz/service/frame_sinks/external_begin_frame_source_android.h index 9f82eed..db50069 100644 --- a/components/viz/service/frame_sinks/external_begin_frame_source_android.h +++ b/components/viz/service/frame_sinks/external_begin_frame_source_android.h
@@ -21,6 +21,12 @@ public ExternalBeginFrameSourceClient { public: ExternalBeginFrameSourceAndroid(uint32_t restart_id, float refresh_rate); + + ExternalBeginFrameSourceAndroid(const ExternalBeginFrameSourceAndroid&) = + delete; + ExternalBeginFrameSourceAndroid& operator=( + const ExternalBeginFrameSourceAndroid&) = delete; + ~ExternalBeginFrameSourceAndroid() override; void OnVSync(JNIEnv* env, @@ -37,8 +43,6 @@ base::android::ScopedJavaGlobalRef<jobject> j_object_; BeginFrameArgsGenerator begin_frame_args_generator_; - - DISALLOW_COPY_AND_ASSIGN(ExternalBeginFrameSourceAndroid); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/components/viz/service/frame_sinks/frame_sink_manager_impl.h index 61801ed1..b2aa0da 100644 --- a/components/viz/service/frame_sinks/frame_sink_manager_impl.h +++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.h
@@ -85,6 +85,10 @@ FrameSinkManagerImpl( SharedBitmapManager* shared_bitmap_manager, OutputSurfaceProvider* output_surface_provider = nullptr); + + FrameSinkManagerImpl(const FrameSinkManagerImpl&) = delete; + FrameSinkManagerImpl& operator=(const FrameSinkManagerImpl&) = delete; + ~FrameSinkManagerImpl() override; CompositorFrameSinkImpl* GetFrameSinkImpl(const FrameSinkId& id); @@ -405,8 +409,6 @@ base::ObserverList<FrameSinkObserver>::Unchecked observer_list_; gfx::RenderingPipeline* gpu_pipeline_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FrameSinkManagerImpl); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/gpu_vsync_begin_frame_source.h b/components/viz/service/frame_sinks/gpu_vsync_begin_frame_source.h index a8a74d18..2d32a882 100644 --- a/components/viz/service/frame_sinks/gpu_vsync_begin_frame_source.h +++ b/components/viz/service/frame_sinks/gpu_vsync_begin_frame_source.h
@@ -24,6 +24,10 @@ public ExternalBeginFrameSourceClient { public: GpuVSyncBeginFrameSource(uint32_t restart_id, OutputSurface* output_surface); + + GpuVSyncBeginFrameSource(const GpuVSyncBeginFrameSource&) = delete; + GpuVSyncBeginFrameSource& operator=(const GpuVSyncBeginFrameSource&) = delete; + ~GpuVSyncBeginFrameSource() override; // ExternalBeginFrameSource overrides. @@ -42,8 +46,6 @@ bool run_at_half_refresh_rate_ = false; bool skip_next_vsync_ = false; base::TimeDelta vsync_interval_ = BeginFrameArgs::DefaultInterval(); - - DISALLOW_COPY_AND_ASSIGN(GpuVSyncBeginFrameSource); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h index b0707817..e5550e1 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.h
@@ -55,6 +55,10 @@ const DebugRendererSettings* debug_settings, gfx::RenderingPipeline* gpu_pipeline); + RootCompositorFrameSinkImpl(const RootCompositorFrameSinkImpl&) = delete; + RootCompositorFrameSinkImpl& operator=(const RootCompositorFrameSinkImpl&) = + delete; + ~RootCompositorFrameSinkImpl() override; // mojom::DisplayPrivate: @@ -180,8 +184,6 @@ #if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS) gfx::Size last_swap_pixel_size_; #endif - - DISALLOW_COPY_AND_ASSIGN(RootCompositorFrameSinkImpl); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/surface_resource_holder.h b/components/viz/service/frame_sinks/surface_resource_holder.h index 9c9af03..6929465 100644 --- a/components/viz/service/frame_sinks/surface_resource_holder.h +++ b/components/viz/service/frame_sinks/surface_resource_holder.h
@@ -24,6 +24,10 @@ class VIZ_SERVICE_EXPORT SurfaceResourceHolder { public: explicit SurfaceResourceHolder(SurfaceResourceHolderClient* client); + + SurfaceResourceHolder(const SurfaceResourceHolder&) = delete; + SurfaceResourceHolder& operator=(const SurfaceResourceHolder&) = delete; + ~SurfaceResourceHolder(); void Reset(); @@ -46,8 +50,6 @@ using ResourceIdInfoMap = std::unordered_map<ResourceId, ResourceRefs, ResourceIdHasher>; ResourceIdInfoMap resource_id_info_map_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceResourceHolder); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc index 8e2d4ed..1568b406 100644 --- a/components/viz/service/frame_sinks/surface_synchronization_unittest.cc +++ b/components/viz/service/frame_sinks/surface_synchronization_unittest.cc
@@ -64,6 +64,11 @@ SurfaceSynchronizationTest() : frame_sink_manager_(&shared_bitmap_manager_), surface_observer_(false) {} + + SurfaceSynchronizationTest(const SurfaceSynchronizationTest&) = delete; + SurfaceSynchronizationTest& operator=(const SurfaceSynchronizationTest&) = + delete; + ~SurfaceSynchronizationTest() override {} CompositorFrameSinkSupport& display_support() { @@ -261,8 +266,6 @@ FrameSinkIdHash> supports_; SurfaceIdAllocatorSet allocator_set_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceSynchronizationTest); }; // The display root surface should have a surface reference from the top-level
diff --git a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h index 1248524..7ad5aeb 100644 --- a/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h +++ b/components/viz/service/frame_sinks/video_capture/frame_sink_video_capturer_impl.h
@@ -84,6 +84,10 @@ std::unique_ptr<media::VideoCaptureOracle> oracle, bool log_to_webrtc); + FrameSinkVideoCapturerImpl(const FrameSinkVideoCapturerImpl&) = delete; + FrameSinkVideoCapturerImpl& operator=(const FrameSinkVideoCapturerImpl&) = + delete; + ~FrameSinkVideoCapturerImpl() final; // The currently-requested frame sink for capture. The frame sink manager @@ -358,8 +362,6 @@ // A weak pointer factory used for cancelling the results from any in-flight // copy output requests. base::WeakPtrFactory<FrameSinkVideoCapturerImpl> capture_weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FrameSinkVideoCapturerImpl); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h b/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h index 6c9ce607d..d52cf6a 100644 --- a/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h +++ b/components/viz/service/frame_sinks/video_capture/in_flight_frame_delivery.h
@@ -23,6 +23,9 @@ base::OnceCallback<void(const media::VideoCaptureFeedback&)> feedback_callback); + InFlightFrameDelivery(const InFlightFrameDelivery&) = delete; + InFlightFrameDelivery& operator=(const InFlightFrameDelivery&) = delete; + ~InFlightFrameDelivery() final; // mojom::FrameSinkVideoConsumerFrameCallbacks implementation: @@ -33,8 +36,6 @@ base::OnceClosure post_delivery_callback_; base::OnceCallback<void(const media::VideoCaptureFeedback&)> feedback_callback_; - - DISALLOW_COPY_AND_ASSIGN(InFlightFrameDelivery); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h b/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h index a60b9e5..eb96d2b 100644 --- a/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h +++ b/components/viz/service/frame_sinks/video_capture/interprocess_frame_pool.h
@@ -32,6 +32,10 @@ // |capacity| is the maximum number of pooled VideoFrames; but they can be of // any byte size. explicit InterprocessFramePool(int capacity); + + InterprocessFramePool(const InterprocessFramePool&) = delete; + InterprocessFramePool& operator=(const InterprocessFramePool&) = delete; + ~InterprocessFramePool(); // Reserves a buffer from the pool and creates a VideoFrame to wrap its shared @@ -123,8 +127,6 @@ SEQUENCE_CHECKER(sequence_checker_); base::WeakPtrFactory<InterprocessFramePool> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(InterprocessFramePool); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/video_detector.h b/components/viz/service/frame_sinks/video_detector.h index f135405..234c9c0 100644 --- a/components/viz/service/frame_sinks/video_detector.h +++ b/components/viz/service/frame_sinks/video_detector.h
@@ -33,6 +33,10 @@ SurfaceManager* surface_manager, const base::TickClock* tick_clock = base::DefaultTickClock::GetInstance(), scoped_refptr<base::SequencedTaskRunner> task_runner = nullptr); + + VideoDetector(const VideoDetector&) = delete; + VideoDetector& operator=(const VideoDetector&) = delete; + ~VideoDetector() override; // Adds an observer. The observer can be removed by closing the mojo @@ -101,8 +105,6 @@ mojo::RemoteSet<mojom::VideoDetectorObserver> observers_; SurfaceManager* const surface_manager_; - - DISALLOW_COPY_AND_ASSIGN(VideoDetector); }; } // namespace viz
diff --git a/components/viz/service/frame_sinks/video_detector_unittest.cc b/components/viz/service/frame_sinks/video_detector_unittest.cc index f0c462a..b86b6d1 100644 --- a/components/viz/service/frame_sinks/video_detector_unittest.cc +++ b/components/viz/service/frame_sinks/video_detector_unittest.cc
@@ -86,6 +86,9 @@ false, false) {} + VideoDetectorTest(const VideoDetectorTest&) = delete; + VideoDetectorTest& operator=(const VideoDetectorTest&) = delete; + ~VideoDetectorTest() override = default; void SetUp() override { @@ -214,8 +217,6 @@ SurfaceAggregator surface_aggregator_; std::unique_ptr<CompositorFrameSinkSupport> root_frame_sink_; std::set<CompositorFrameSinkSupport*> embedded_clients_; - - DISALLOW_COPY_AND_ASSIGN(VideoDetectorTest); }; constexpr gfx::Rect VideoDetectorTest::kMinRect;
diff --git a/components/viz/service/gl/gpu_service_impl.h b/components/viz/service/gl/gpu_service_impl.h index e075735..d6e0b7a 100644 --- a/components/viz/service/gl/gpu_service_impl.h +++ b/components/viz/service/gl/gpu_service_impl.h
@@ -100,6 +100,9 @@ gpu::VulkanImplementation* vulkan_implementation, base::OnceCallback<void(ExitCode)> exit_callback); + GpuServiceImpl(const GpuServiceImpl&) = delete; + GpuServiceImpl& operator=(const GpuServiceImpl&) = delete; + ~GpuServiceImpl() override; void UpdateGPUInfo(); @@ -469,8 +472,6 @@ base::WeakPtr<GpuServiceImpl> weak_ptr_; base::WeakPtrFactory<GpuServiceImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(GpuServiceImpl); }; } // namespace viz
diff --git a/components/viz/service/gl/gpu_service_impl_unittest.cc b/components/viz/service/gl/gpu_service_impl_unittest.cc index dc472a9..7b20601b 100644 --- a/components/viz/service/gl/gpu_service_impl_unittest.cc +++ b/components/viz/service/gl/gpu_service_impl_unittest.cc
@@ -44,6 +44,10 @@ : io_thread_("TestIOThread"), wait_(base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED) {} + + GpuServiceTest(const GpuServiceTest&) = delete; + GpuServiceTest& operator=(const GpuServiceTest&) = delete; + ~GpuServiceTest() override {} GpuServiceImpl* gpu_service() { return gpu_service_.get(); } @@ -91,8 +95,6 @@ base::Thread io_thread_; std::unique_ptr<GpuServiceImpl> gpu_service_; base::WaitableEvent wait_; - - DISALLOW_COPY_AND_ASSIGN(GpuServiceTest); }; // Tests that GpuServiceImpl can be destroyed before Bind() succeeds on the IO
diff --git a/components/viz/service/gl/info_collection_gpu_service_impl.h b/components/viz/service/gl/info_collection_gpu_service_impl.h index 52800ca..2b7661f6 100644 --- a/components/viz/service/gl/info_collection_gpu_service_impl.h +++ b/components/viz/service/gl/info_collection_gpu_service_impl.h
@@ -31,6 +31,10 @@ const gpu::GPUInfo::GPUDevice& gpu_device, mojo::PendingReceiver<mojom::InfoCollectionGpuService> pending_receiver); + InfoCollectionGpuServiceImpl(const InfoCollectionGpuServiceImpl&) = delete; + InfoCollectionGpuServiceImpl& operator=(const InfoCollectionGpuServiceImpl&) = + delete; + ~InfoCollectionGpuServiceImpl() override; void RequestDxDiagNodeInfo(RequestDxDiagNodeInfoCallback callback) override; @@ -66,8 +70,6 @@ // Should only be accessed on the IO thread after creation. mojo::Receiver<mojom::InfoCollectionGpuService> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(InfoCollectionGpuServiceImpl); }; } // namespace viz
diff --git a/components/viz/service/hit_test/hit_test_aggregator.h b/components/viz/service/hit_test/hit_test_aggregator.h index 2900db3..c2211a1 100644 --- a/components/viz/service/hit_test/hit_test_aggregator.h +++ b/components/viz/service/hit_test/hit_test_aggregator.h
@@ -35,6 +35,10 @@ const FrameSinkId& frame_sink_id, uint32_t initial_region_size = 100, uint32_t max_region_size = 100 * 100); + + HitTestAggregator(const HitTestAggregator&) = delete; + HitTestAggregator& operator=(const HitTestAggregator&) = delete; + ~HitTestAggregator(); // Called after surfaces have been aggregated into the DisplayFrame. @@ -111,8 +115,6 @@ // Handles the case when this object is deleted after // the PostTaskAggregation call is scheduled but before invocation. base::WeakPtrFactory<HitTestAggregator> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(HitTestAggregator); }; } // namespace viz
diff --git a/components/viz/service/hit_test/hit_test_aggregator_unittest.cc b/components/viz/service/hit_test/hit_test_aggregator_unittest.cc index 47a5b50..f429d50 100644 --- a/components/viz/service/hit_test/hit_test_aggregator_unittest.cc +++ b/components/viz/service/hit_test/hit_test_aggregator_unittest.cc
@@ -30,6 +30,10 @@ class TestHostFrameSinkManager : public HostFrameSinkManager { public: TestHostFrameSinkManager() = default; + + TestHostFrameSinkManager(const TestHostFrameSinkManager&) = delete; + TestHostFrameSinkManager& operator=(const TestHostFrameSinkManager&) = delete; + ~TestHostFrameSinkManager() override = default; void OnAggregatedHitTestRegionListUpdated( @@ -46,14 +50,16 @@ private: FrameSinkId buffer_frame_sink_id_; std::vector<AggregatedHitTestRegion> active_list_; - - DISALLOW_COPY_AND_ASSIGN(TestHostFrameSinkManager); }; class TestFrameSinkManagerImpl : public FrameSinkManagerImpl { public: explicit TestFrameSinkManagerImpl(SharedBitmapManager* shared_bitmap_manager) : FrameSinkManagerImpl(shared_bitmap_manager) {} + + TestFrameSinkManagerImpl(const TestFrameSinkManagerImpl&) = delete; + TestFrameSinkManagerImpl& operator=(const TestFrameSinkManagerImpl&) = delete; + ~TestFrameSinkManagerImpl() override = default; void SetLocalClient(TestHostFrameSinkManager* client) { @@ -72,8 +78,6 @@ private: TestHostFrameSinkManager* host_client_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(TestFrameSinkManagerImpl); }; } // namespace @@ -105,6 +109,10 @@ class HitTestAggregatorTest : public testing::Test { public: HitTestAggregatorTest() = default; + + HitTestAggregatorTest(const HitTestAggregatorTest&) = delete; + HitTestAggregatorTest& operator=(const HitTestAggregatorTest&) = delete; + ~HitTestAggregatorTest() override = default; // testing::Test: @@ -225,8 +233,6 @@ local_surface_id_lookup_delegate_; std::unique_ptr<CompositorFrameSinkSupport> support_; SurfaceIdAllocatorSet allocator_set_; - - DISALLOW_COPY_AND_ASSIGN(HitTestAggregatorTest); }; // TODO(gklassen): Add tests for 3D use cases as suggested by and with
diff --git a/components/viz/service/hit_test/hit_test_manager.h b/components/viz/service/hit_test/hit_test_manager.h index c056341a..e182690 100644 --- a/components/viz/service/hit_test/hit_test_manager.h +++ b/components/viz/service/hit_test/hit_test_manager.h
@@ -26,6 +26,10 @@ class VIZ_SERVICE_EXPORT HitTestManager : public SurfaceObserver { public: explicit HitTestManager(SurfaceManager* surface_manager); + + HitTestManager(const HitTestManager&) = delete; + HitTestManager& operator=(const HitTestManager&) = delete; + ~HitTestManager() override; // SurfaceObserver: @@ -100,8 +104,6 @@ // HitTestAggregators to stay in sync with the HitTestManager and only // aggregate when there is new hit-test data. uint64_t submit_hit_test_region_list_index_ = 0; - - DISALLOW_COPY_AND_ASSIGN(HitTestManager); }; } // namespace viz
diff --git a/components/viz/service/main/viz_compositor_thread_runner_impl.h b/components/viz/service/main/viz_compositor_thread_runner_impl.h index ec7de9d..a3bfd94 100644 --- a/components/viz/service/main/viz_compositor_thread_runner_impl.h +++ b/components/viz/service/main/viz_compositor_thread_runner_impl.h
@@ -35,6 +35,11 @@ class VizCompositorThreadRunnerImpl : public VizCompositorThreadRunner { public: VizCompositorThreadRunnerImpl(); + + VizCompositorThreadRunnerImpl(const VizCompositorThreadRunnerImpl&) = delete; + VizCompositorThreadRunnerImpl& operator=( + const VizCompositorThreadRunnerImpl&) = delete; + // Performs teardown on thread and then stops thread. ~VizCompositorThreadRunnerImpl() override; @@ -63,8 +68,6 @@ std::unique_ptr<VizCompositorThreadType> thread_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - - DISALLOW_COPY_AND_ASSIGN(VizCompositorThreadRunnerImpl); }; } // namespace viz
diff --git a/components/viz/service/main/viz_main_impl.h b/components/viz/service/main/viz_main_impl.h index 0c5ac029..ba155899 100644 --- a/components/viz/service/main/viz_main_impl.h +++ b/components/viz/service/main/viz_main_impl.h
@@ -69,6 +69,10 @@ public: ExternalDependencies(); ExternalDependencies(ExternalDependencies&& other); + + ExternalDependencies(const ExternalDependencies&) = delete; + ExternalDependencies& operator=(const ExternalDependencies&) = delete; + ~ExternalDependencies(); ExternalDependencies& operator=(ExternalDependencies&& other); @@ -96,14 +100,15 @@ scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner; std::unique_ptr<ukm::MojoUkmRecorder> ukm_recorder; VizCompositorThreadRunner* viz_compositor_thread_runner = nullptr; - - private: - DISALLOW_COPY_AND_ASSIGN(ExternalDependencies); }; VizMainImpl(Delegate* delegate, ExternalDependencies dependencies, std::unique_ptr<gpu::GpuInit> gpu_init); + + VizMainImpl(const VizMainImpl&) = delete; + VizMainImpl& operator=(const VizMainImpl&) = delete; + // Destruction must happen on the GPU thread. ~VizMainImpl() override; @@ -198,8 +203,6 @@ discardable_shared_memory_manager_; std::unique_ptr<gfx::RenderingPipeline> gpu_pipeline_; - - DISALLOW_COPY_AND_ASSIGN(VizMainImpl); }; } // namespace viz
diff --git a/components/viz/service/surfaces/referenced_surface_tracker_unittest.cc b/components/viz/service/surfaces/referenced_surface_tracker_unittest.cc index 25f55de..4f76798 100644 --- a/components/viz/service/surfaces/referenced_surface_tracker_unittest.cc +++ b/components/viz/service/surfaces/referenced_surface_tracker_unittest.cc
@@ -40,6 +40,11 @@ class ReferencedSurfaceTrackerTest : public testing::Test { public: ReferencedSurfaceTrackerTest() {} + + ReferencedSurfaceTrackerTest(const ReferencedSurfaceTrackerTest&) = delete; + ReferencedSurfaceTrackerTest& operator=(const ReferencedSurfaceTrackerTest&) = + delete; + ~ReferencedSurfaceTrackerTest() override {} const std::vector<SurfaceReference>& references_to_remove() const { @@ -64,8 +69,6 @@ private: std::vector<SurfaceReference> references_to_add_; std::vector<SurfaceReference> references_to_remove_; - - DISALLOW_COPY_AND_ASSIGN(ReferencedSurfaceTrackerTest); }; TEST_F(ReferencedSurfaceTrackerTest, AddSurfaceReference) {
diff --git a/components/viz/service/surfaces/surface.h b/components/viz/service/surfaces/surface.h index c587556..7f26f972 100644 --- a/components/viz/service/surfaces/surface.h +++ b/components/viz/service/surfaces/surface.h
@@ -84,6 +84,10 @@ public: PresentationHelper(base::WeakPtr<SurfaceClient> surface_client, uint32_t frame_token); + + PresentationHelper(const PresentationHelper&) = delete; + PresentationHelper& operator=(const PresentationHelper&) = delete; + ~PresentationHelper(); void DidPresent(base::TimeTicks draw_start_timestamp, @@ -93,8 +97,6 @@ private: base::WeakPtr<SurfaceClient> surface_client_; const uint32_t frame_token_; - - DISALLOW_COPY_AND_ASSIGN(PresentationHelper); }; using PresentedCallback =
diff --git a/components/viz/service/surfaces/surface_allocation_group.h b/components/viz/service/surfaces/surface_allocation_group.h index bd69a4f..56fc0466 100644 --- a/components/viz/service/surfaces/surface_allocation_group.h +++ b/components/viz/service/surfaces/surface_allocation_group.h
@@ -32,6 +32,10 @@ SurfaceAllocationGroup(SurfaceManager* surface_manager, const FrameSinkId& submitter, const base::UnguessableToken& embed_token); + + SurfaceAllocationGroup(const SurfaceAllocationGroup&) = delete; + SurfaceAllocationGroup& operator=(const SurfaceAllocationGroup&) = delete; + ~SurfaceAllocationGroup(); // Returns the ID of the FrameSink that is submitting to surfaces in this @@ -175,8 +179,6 @@ // The last SurfaceId of this allocation group that was ever referenced by the // active or pending frame of a surface. SurfaceId last_reference_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceAllocationGroup); }; } // namespace viz
diff --git a/components/viz/service/surfaces/surface_client.h b/components/viz/service/surfaces/surface_client.h index a3305ac..6d58791 100644 --- a/components/viz/service/surfaces/surface_client.h +++ b/components/viz/service/surfaces/surface_client.h
@@ -34,6 +34,9 @@ public: SurfaceClient() = default; + SurfaceClient(const SurfaceClient&) = delete; + SurfaceClient& operator=(const SurfaceClient&) = delete; + virtual ~SurfaceClient() = default; // Called when |surface| has a new CompositorFrame available for display. @@ -90,9 +93,6 @@ base::TimeTicks expected_display_time) = 0; virtual bool IsVideoCaptureStarted() = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SurfaceClient); }; } // namespace viz
diff --git a/components/viz/service/surfaces/surface_dependency_deadline.h b/components/viz/service/surfaces/surface_dependency_deadline.h index b329129..71fc86b 100644 --- a/components/viz/service/surfaces/surface_dependency_deadline.h +++ b/components/viz/service/surfaces/surface_dependency_deadline.h
@@ -22,6 +22,11 @@ class VIZ_SERVICE_EXPORT SurfaceDependencyDeadline { public: explicit SurfaceDependencyDeadline(const base::TickClock* tick_clock); + + SurfaceDependencyDeadline(const SurfaceDependencyDeadline&) = delete; + SurfaceDependencyDeadline& operator=(const SurfaceDependencyDeadline&) = + delete; + ~SurfaceDependencyDeadline(); // Sets up a deadline in wall time where @@ -51,8 +56,6 @@ const base::TickClock* tick_clock_; base::TimeTicks start_time_; absl::optional<base::TimeTicks> deadline_; - - DISALLOW_COPY_AND_ASSIGN(SurfaceDependencyDeadline); }; } // namespace viz
diff --git a/components/viz/service/surfaces/surface_manager.h b/components/viz/service/surfaces/surface_manager.h index fb99d740..38bc594 100644 --- a/components/viz/service/surfaces/surface_manager.h +++ b/components/viz/service/surfaces/surface_manager.h
@@ -49,6 +49,10 @@ public: SurfaceManager(SurfaceManagerDelegate* delegate, absl::optional<uint32_t> activation_deadline_in_frames); + + SurfaceManager(const SurfaceManager&) = delete; + SurfaceManager& operator=(const SurfaceManager&) = delete; + ~SurfaceManager(); #if DCHECK_IS_ON() @@ -323,8 +327,6 @@ bool allocation_groups_need_garbage_collection_ = false; base::WeakPtrFactory<SurfaceManager> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(SurfaceManager); }; } // namespace viz
diff --git a/components/viz/test/compositor_frame_helpers.h b/components/viz/test/compositor_frame_helpers.h index b28edc01..5953b644 100644 --- a/components/viz/test/compositor_frame_helpers.h +++ b/components/viz/test/compositor_frame_helpers.h
@@ -136,6 +136,10 @@ class CompositorFrameBuilder { public: CompositorFrameBuilder(); + + CompositorFrameBuilder(const CompositorFrameBuilder&) = delete; + CompositorFrameBuilder& operator=(const CompositorFrameBuilder&) = delete; + ~CompositorFrameBuilder(); // Builds the CompositorFrame and leaves |this| in an invalid state. This can @@ -185,8 +189,6 @@ absl::optional<CompositorFrame> frame_; CompositorRenderPassId::Generator render_pass_id_generator_; - - DISALLOW_COPY_AND_ASSIGN(CompositorFrameBuilder); }; // Creates a CompositorFrame that has a render pass with 20x20 output_rect and
diff --git a/components/viz/test/fake_compositor_frame_sink_client.h b/components/viz/test/fake_compositor_frame_sink_client.h index 71af948..c2a51cee 100644 --- a/components/viz/test/fake_compositor_frame_sink_client.h +++ b/components/viz/test/fake_compositor_frame_sink_client.h
@@ -18,6 +18,11 @@ class FakeCompositorFrameSinkClient : public mojom::CompositorFrameSinkClient { public: FakeCompositorFrameSinkClient(); + + FakeCompositorFrameSinkClient(const FakeCompositorFrameSinkClient&) = delete; + FakeCompositorFrameSinkClient& operator=( + const FakeCompositorFrameSinkClient&) = delete; + ~FakeCompositorFrameSinkClient() override; mojo::PendingRemote<mojom::CompositorFrameSinkClient> BindInterfaceRemote(); @@ -43,8 +48,6 @@ std::vector<ReturnedResource> returned_resources_; mojo::Receiver<mojom::CompositorFrameSinkClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeCompositorFrameSinkClient); }; } // namespace viz
diff --git a/components/viz/test/fake_delay_based_time_source.h b/components/viz/test/fake_delay_based_time_source.h index a8edd32b..c7aacebd 100644 --- a/components/viz/test/fake_delay_based_time_source.h +++ b/components/viz/test/fake_delay_based_time_source.h
@@ -34,6 +34,10 @@ public: FakeDelayBasedTimeSource(const base::TickClock* now_src, base::SingleThreadTaskRunner* task_runner); + + FakeDelayBasedTimeSource(const FakeDelayBasedTimeSource&) = delete; + FakeDelayBasedTimeSource& operator=(const FakeDelayBasedTimeSource&) = delete; + ~FakeDelayBasedTimeSource() override; // Overridden from DelayBasedTimeSource @@ -43,8 +47,6 @@ private: // Not owned. const base::TickClock* now_src_; - - DISALLOW_COPY_AND_ASSIGN(FakeDelayBasedTimeSource); }; } // namespace viz
diff --git a/components/viz/test/fake_display_client.h b/components/viz/test/fake_display_client.h index d1e36c1b..a62e137 100644 --- a/components/viz/test/fake_display_client.h +++ b/components/viz/test/fake_display_client.h
@@ -15,6 +15,10 @@ class FakeDisplayClient : public mojom::DisplayClient { public: FakeDisplayClient(); + + FakeDisplayClient(const FakeDisplayClient&) = delete; + FakeDisplayClient& operator=(const FakeDisplayClient&) = delete; + ~FakeDisplayClient() override; mojo::PendingRemote<mojom::DisplayClient> BindRemote(); @@ -36,8 +40,6 @@ private: mojo::Receiver<mojom::DisplayClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeDisplayClient); }; } // namespace viz
diff --git a/components/viz/test/fake_host_frame_sink_client.h b/components/viz/test/fake_host_frame_sink_client.h index be5e4fe3..52410dd 100644 --- a/components/viz/test/fake_host_frame_sink_client.h +++ b/components/viz/test/fake_host_frame_sink_client.h
@@ -16,6 +16,10 @@ class FakeHostFrameSinkClient : public HostFrameSinkClient { public: FakeHostFrameSinkClient(); + + FakeHostFrameSinkClient(const FakeHostFrameSinkClient&) = delete; + FakeHostFrameSinkClient& operator=(const FakeHostFrameSinkClient&) = delete; + ~FakeHostFrameSinkClient() override; // HostFrameSinkClient implementation. @@ -26,7 +30,6 @@ private: uint32_t last_frame_token_seen_ = 0u; - DISALLOW_COPY_AND_ASSIGN(FakeHostFrameSinkClient); }; } // namespace viz
diff --git a/components/viz/test/fake_skia_output_surface.h b/components/viz/test/fake_skia_output_surface.h index 0fa7b6a..796a64c 100644 --- a/components/viz/test/fake_skia_output_surface.h +++ b/components/viz/test/fake_skia_output_surface.h
@@ -38,6 +38,9 @@ return base::WrapUnique(new FakeSkiaOutputSurface(std::move(provider))); } + FakeSkiaOutputSurface(const FakeSkiaOutputSurface&) = delete; + FakeSkiaOutputSurface& operator=(const FakeSkiaOutputSurface&) = delete; + ~FakeSkiaOutputSurface() override; // OutputSurface implementation: @@ -187,8 +190,6 @@ THREAD_CHECKER(thread_checker_); base::WeakPtrFactory<FakeSkiaOutputSurface> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(FakeSkiaOutputSurface); }; } // namespace viz
diff --git a/components/viz/test/gpu_host_impl_test_api.h b/components/viz/test/gpu_host_impl_test_api.h index 5d2e0f35..e512eae6 100644 --- a/components/viz/test/gpu_host_impl_test_api.h +++ b/components/viz/test/gpu_host_impl_test_api.h
@@ -14,6 +14,10 @@ class GpuHostImplTestApi { public: explicit GpuHostImplTestApi(GpuHostImpl* gpu_host); + + GpuHostImplTestApi(const GpuHostImplTestApi&) = delete; + GpuHostImplTestApi& operator=(const GpuHostImplTestApi&) = delete; + ~GpuHostImplTestApi(); // Waits until all messages to the mojo::Remote<mojom::GpuService> have been @@ -23,8 +27,6 @@ private: GpuHostImpl* gpu_host_; - - DISALLOW_COPY_AND_ASSIGN(GpuHostImplTestApi); }; } // namespace viz
diff --git a/components/viz/test/host_frame_sink_manager_test_api.h b/components/viz/test/host_frame_sink_manager_test_api.h index 0c6bae5..7cc3790c 100644 --- a/components/viz/test/host_frame_sink_manager_test_api.h +++ b/components/viz/test/host_frame_sink_manager_test_api.h
@@ -21,6 +21,11 @@ public: explicit HostFrameSinkManagerTestApi( HostFrameSinkManager* host_frame_sink_manager); + + HostFrameSinkManagerTestApi(const HostFrameSinkManagerTestApi&) = delete; + HostFrameSinkManagerTestApi& operator=(const HostFrameSinkManagerTestApi&) = + delete; + ~HostFrameSinkManagerTestApi() = default; // Clears out the currently set hit test queries, and overrides it with |map|. @@ -31,8 +36,6 @@ private: // Not owned. HostFrameSinkManager* host_frame_sink_manager_; - - DISALLOW_COPY_AND_ASSIGN(HostFrameSinkManagerTestApi); }; } // namespace viz
diff --git a/components/viz/test/mock_compositor_frame_sink_client.h b/components/viz/test/mock_compositor_frame_sink_client.h index 66247c0..f722b89 100644 --- a/components/viz/test/mock_compositor_frame_sink_client.h +++ b/components/viz/test/mock_compositor_frame_sink_client.h
@@ -20,6 +20,11 @@ class MockCompositorFrameSinkClient : public mojom::CompositorFrameSinkClient { public: MockCompositorFrameSinkClient(); + + MockCompositorFrameSinkClient(const MockCompositorFrameSinkClient&) = delete; + MockCompositorFrameSinkClient& operator=( + const MockCompositorFrameSinkClient&) = delete; + ~MockCompositorFrameSinkClient() override; void set_disconnect_handler(base::OnceClosure error_handler) { @@ -43,8 +48,6 @@ private: mojo::Receiver<mojom::CompositorFrameSinkClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockCompositorFrameSinkClient); }; } // namespace viz
diff --git a/components/viz/test/mock_display_client.h b/components/viz/test/mock_display_client.h index 5fb2297c..e594328d 100644 --- a/components/viz/test/mock_display_client.h +++ b/components/viz/test/mock_display_client.h
@@ -20,6 +20,10 @@ class MockDisplayClient : public mojom::DisplayClient { public: MockDisplayClient(); + + MockDisplayClient(const MockDisplayClient&) = delete; + MockDisplayClient& operator=(const MockDisplayClient&) = delete; + ~MockDisplayClient() override; mojo::PendingRemote<mojom::DisplayClient> BindRemote(); @@ -46,8 +50,6 @@ private: mojo::Receiver<mojom::DisplayClient> receiver_{this}; - - DISALLOW_COPY_AND_ASSIGN(MockDisplayClient); }; } // namespace viz
diff --git a/components/viz/test/test_context_provider.cc b/components/viz/test/test_context_provider.cc index ed29ca5..5f7e07b 100644 --- a/components/viz/test/test_context_provider.cc +++ b/components/viz/test/test_context_provider.cc
@@ -50,6 +50,12 @@ std::string additional_extensions = std::string()) : extension_string_( BuildExtensionString(std::move(additional_extensions))) {} + + TestGLES2InterfaceForContextProvider( + const TestGLES2InterfaceForContextProvider&) = delete; + TestGLES2InterfaceForContextProvider& operator=( + const TestGLES2InterfaceForContextProvider&) = delete; + ~TestGLES2InterfaceForContextProvider() override = default; // TestGLES2Interface: @@ -114,8 +120,6 @@ } const std::string extension_string_; - - DISALLOW_COPY_AND_ASSIGN(TestGLES2InterfaceForContextProvider); }; } // namespace
diff --git a/components/viz/test/test_context_support.h b/components/viz/test/test_context_support.h index 1cdc9fb3..ab6172c 100644 --- a/components/viz/test/test_context_support.h +++ b/components/viz/test/test_context_support.h
@@ -27,6 +27,10 @@ class TestContextSupport : public gpu::ContextSupport { public: TestContextSupport(); + + TestContextSupport(const TestContextSupport&) = delete; + TestContextSupport& operator=(const TestContextSupport&) = delete; + ~TestContextSupport() override; // gpu::ContextSupport implementation. @@ -115,8 +119,6 @@ bool out_of_order_callbacks_; base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(TestContextSupport); }; } // namespace viz
diff --git a/components/viz/test/test_frame_sink_manager.h b/components/viz/test/test_frame_sink_manager.h index fcc0b87..8f2595b 100644 --- a/components/viz/test/test_frame_sink_manager.h +++ b/components/viz/test/test_frame_sink_manager.h
@@ -22,6 +22,10 @@ class TestFrameSinkManagerImpl : public mojom::FrameSinkManager { public: TestFrameSinkManagerImpl(); + + TestFrameSinkManagerImpl(const TestFrameSinkManagerImpl&) = delete; + TestFrameSinkManagerImpl& operator=(const TestFrameSinkManagerImpl&) = delete; + ~TestFrameSinkManagerImpl() override; void BindReceiver(mojo::PendingReceiver<mojom::FrameSinkManager> receiver, @@ -77,8 +81,6 @@ mojo::Receiver<mojom::FrameSinkManager> receiver_{this}; mojo::Remote<mojom::FrameSinkManagerClient> client_; - - DISALLOW_COPY_AND_ASSIGN(TestFrameSinkManagerImpl); }; } // namespace viz
diff --git a/components/viz/test/test_gpu_memory_buffer_manager.h b/components/viz/test/test_gpu_memory_buffer_manager.h index e7332ae..0945359fc 100644 --- a/components/viz/test/test_gpu_memory_buffer_manager.h +++ b/components/viz/test/test_gpu_memory_buffer_manager.h
@@ -17,6 +17,11 @@ class TestGpuMemoryBufferManager : public gpu::GpuMemoryBufferManager { public: TestGpuMemoryBufferManager(); + + TestGpuMemoryBufferManager(const TestGpuMemoryBufferManager&) = delete; + TestGpuMemoryBufferManager& operator=(const TestGpuMemoryBufferManager&) = + delete; + ~TestGpuMemoryBufferManager() override; std::unique_ptr<TestGpuMemoryBufferManager> @@ -65,8 +70,6 @@ std::map<int, TestGpuMemoryBufferManager*> clients_; bool fail_on_create_ = false; - - DISALLOW_COPY_AND_ASSIGN(TestGpuMemoryBufferManager); }; } // namespace viz
diff --git a/components/viz/test/test_gpu_service_holder.cc b/components/viz/test/test_gpu_service_holder.cc index a585242..efd11a2 100644 --- a/components/viz/test/test_gpu_service_holder.cc +++ b/components/viz/test/test_gpu_service_holder.cc
@@ -59,6 +59,9 @@ base::test::TaskEnvironment::AddDestructionObserver(this); } + InstanceResetter(const InstanceResetter&) = delete; + InstanceResetter& operator=(const InstanceResetter&) = delete; + ~InstanceResetter() override { base::test::TaskEnvironment::RemoveDestructionObserver(this); } @@ -87,8 +90,6 @@ private: bool reset_by_task_env = false; - - DISALLOW_COPY_AND_ASSIGN(InstanceResetter); }; } // namespace
diff --git a/components/viz/test/test_gpu_service_holder.h b/components/viz/test/test_gpu_service_holder.h index f064e25..29046ef 100644 --- a/components/viz/test/test_gpu_service_holder.h +++ b/components/viz/test/test_gpu_service_holder.h
@@ -59,6 +59,10 @@ static void DoNotResetOnTestExit(); explicit TestGpuServiceHolder(const gpu::GpuPreferences& preferences); + + TestGpuServiceHolder(const TestGpuServiceHolder&) = delete; + TestGpuServiceHolder& operator=(const TestGpuServiceHolder&) = delete; + ~TestGpuServiceHolder() override; scoped_refptr<base::SingleThreadTaskRunner> gpu_thread_task_runner() { @@ -112,8 +116,6 @@ #if BUILDFLAG(ENABLE_VULKAN) std::unique_ptr<gpu::VulkanImplementation> vulkan_implementation_; #endif - - DISALLOW_COPY_AND_ASSIGN(TestGpuServiceHolder); }; } // namespace viz
diff --git a/components/viz/test/test_latest_local_surface_id_lookup_delegate.h b/components/viz/test/test_latest_local_surface_id_lookup_delegate.h index 5c20295..0f3baaae 100644 --- a/components/viz/test/test_latest_local_surface_id_lookup_delegate.h +++ b/components/viz/test/test_latest_local_surface_id_lookup_delegate.h
@@ -16,6 +16,12 @@ : public LatestLocalSurfaceIdLookupDelegate { public: TestLatestLocalSurfaceIdLookupDelegate(); + + TestLatestLocalSurfaceIdLookupDelegate( + const TestLatestLocalSurfaceIdLookupDelegate&) = delete; + TestLatestLocalSurfaceIdLookupDelegate& operator=( + const TestLatestLocalSurfaceIdLookupDelegate&) = delete; + ~TestLatestLocalSurfaceIdLookupDelegate() override; // LatestLocalSurfaceIdLookupDelegate: @@ -26,8 +32,6 @@ private: base::flat_map<FrameSinkId, LocalSurfaceId> surface_id_map_; - - DISALLOW_COPY_AND_ASSIGN(TestLatestLocalSurfaceIdLookupDelegate); }; } // namespace viz
diff --git a/components/viz/test/test_output_surface_provider.h b/components/viz/test/test_output_surface_provider.h index 66e671a..4598955 100644 --- a/components/viz/test/test_output_surface_provider.h +++ b/components/viz/test/test_output_surface_provider.h
@@ -15,6 +15,11 @@ class TestOutputSurfaceProvider : public OutputSurfaceProvider { public: TestOutputSurfaceProvider(); + + TestOutputSurfaceProvider(const TestOutputSurfaceProvider&) = delete; + TestOutputSurfaceProvider& operator=(const TestOutputSurfaceProvider&) = + delete; + ~TestOutputSurfaceProvider() override; // OutputSurfaceProvider implementation. @@ -29,9 +34,6 @@ DisplayCompositorMemoryAndTaskController* display_controller, const RendererSettings& renderer_settings, const DebugRendererSettings* debug_settings) override; - - private: - DISALLOW_COPY_AND_ASSIGN(TestOutputSurfaceProvider); }; } // namespace viz
diff --git a/components/viz/test/viz_test_suite.h b/components/viz/test/viz_test_suite.h index 2f9a686..c9e0080 100644 --- a/components/viz/test/viz_test_suite.h +++ b/components/viz/test/viz_test_suite.h
@@ -21,6 +21,10 @@ class VizTestSuite : public base::TestSuite { public: VizTestSuite(int argc, char** argv); + + VizTestSuite(const VizTestSuite&) = delete; + VizTestSuite& operator=(const VizTestSuite&) = delete; + ~VizTestSuite() override; static void RunUntilIdle(); @@ -35,8 +39,6 @@ std::unique_ptr<ui::PlatformEventSource> platform_event_source_; base::TestDiscardableMemoryAllocator discardable_memory_allocator_; - - DISALLOW_COPY_AND_ASSIGN(VizTestSuite); }; } // namespace viz
diff --git a/components/web_cache/renderer/web_cache_impl.h b/components/web_cache/renderer/web_cache_impl.h index b8d5445..03ba70e 100644 --- a/components/web_cache/renderer/web_cache_impl.h +++ b/components/web_cache/renderer/web_cache_impl.h
@@ -22,6 +22,10 @@ class WebCacheImpl : public mojom::WebCache { public: WebCacheImpl(); + + WebCacheImpl(const WebCacheImpl&) = delete; + WebCacheImpl& operator=(const WebCacheImpl&) = delete; + ~WebCacheImpl() override; void BindReceiver(mojo::PendingReceiver<mojom::WebCache> web_cache_receiver); @@ -51,8 +55,6 @@ mojo::ReceiverSet<mojom::WebCache> receivers_; absl::optional<base::MemoryPressureListener> memory_pressure_listener_; - - DISALLOW_COPY_AND_ASSIGN(WebCacheImpl); }; } // namespace web_cache
diff --git a/components/web_modal/single_web_contents_dialog_manager.h b/components/web_modal/single_web_contents_dialog_manager.h index 7d85368..9c6b00a 100644 --- a/components/web_modal/single_web_contents_dialog_manager.h +++ b/components/web_modal/single_web_contents_dialog_manager.h
@@ -21,6 +21,12 @@ class SingleWebContentsDialogManagerDelegate { public: SingleWebContentsDialogManagerDelegate() {} + + SingleWebContentsDialogManagerDelegate( + const SingleWebContentsDialogManagerDelegate&) = delete; + SingleWebContentsDialogManagerDelegate& operator=( + const SingleWebContentsDialogManagerDelegate&) = delete; + virtual ~SingleWebContentsDialogManagerDelegate() {} virtual content::WebContents* GetWebContents() const = 0; @@ -28,9 +34,6 @@ // Notify the delegate that the dialog is closing. The native // manager will be deleted before the end of this call. virtual void WillClose(gfx::NativeWindow dialog) = 0; - - private: - DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManagerDelegate); }; // Provides an interface for platform-specific UI implementation for the web @@ -42,6 +45,11 @@ // notify its delegate (WillClose method). class SingleWebContentsDialogManager { public: + SingleWebContentsDialogManager(const SingleWebContentsDialogManager&) = + delete; + SingleWebContentsDialogManager& operator=( + const SingleWebContentsDialogManager&) = delete; + virtual ~SingleWebContentsDialogManager() {} // Makes the web contents modal dialog visible. Only one web contents modal @@ -70,9 +78,6 @@ protected: SingleWebContentsDialogManager() {} - - private: - DISALLOW_COPY_AND_ASSIGN(SingleWebContentsDialogManager); }; } // namespace web_modal
diff --git a/components/web_modal/test_web_contents_modal_dialog_host.h b/components/web_modal/test_web_contents_modal_dialog_host.h index 8348f68d..7f5737fe 100644 --- a/components/web_modal/test_web_contents_modal_dialog_host.h +++ b/components/web_modal/test_web_contents_modal_dialog_host.h
@@ -17,6 +17,12 @@ class TestWebContentsModalDialogHost : public WebContentsModalDialogHost { public: explicit TestWebContentsModalDialogHost(gfx::NativeView host_view); + + TestWebContentsModalDialogHost(const TestWebContentsModalDialogHost&) = + delete; + TestWebContentsModalDialogHost& operator=( + const TestWebContentsModalDialogHost&) = delete; + ~TestWebContentsModalDialogHost() override; // WebContentsModalDialogHost: @@ -33,8 +39,6 @@ private: gfx::NativeView host_view_; gfx::Size max_dialog_size_; - - DISALLOW_COPY_AND_ASSIGN(TestWebContentsModalDialogHost); }; } // namespace web_modal
diff --git a/components/web_modal/web_contents_modal_dialog_manager.h b/components/web_modal/web_contents_modal_dialog_manager.h index 75002be..c10101fd 100644 --- a/components/web_modal/web_contents_modal_dialog_manager.h +++ b/components/web_modal/web_contents_modal_dialog_manager.h
@@ -26,6 +26,10 @@ public content::WebContentsObserver, public content::WebContentsUserData<WebContentsModalDialogManager> { public: + WebContentsModalDialogManager(const WebContentsModalDialogManager&) = delete; + WebContentsModalDialogManager& operator=( + const WebContentsModalDialogManager&) = delete; + ~WebContentsModalDialogManager() override; WebContentsModalDialogManagerDelegate* delegate() const { return delegate_; } @@ -107,8 +111,6 @@ bool closing_all_dialogs_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManager); }; } // namespace web_modal
diff --git a/components/web_package/web_bundle_parser.cc b/components/web_package/web_bundle_parser.cc index 3486d8b..75677249 100644 --- a/components/web_package/web_bundle_parser.cc +++ b/components/web_package/web_bundle_parser.cc
@@ -304,10 +304,12 @@ class WebBundleParser::SharedBundleDataSource::Observer { public: Observer() {} + + Observer(const Observer&) = delete; + Observer& operator=(const Observer&) = delete; + virtual ~Observer() {} virtual void OnDisconnect() = 0; - - DISALLOW_COPY_AND_ASSIGN(Observer); }; // A parser for bundle's metadata. This class owns itself and will self destruct @@ -320,6 +322,10 @@ : data_source_(data_source), callback_(std::move(callback)) { data_source_->AddObserver(this); } + + MetadataParser(const MetadataParser&) = delete; + MetadataParser& operator=(const MetadataParser&) = delete; + ~MetadataParser() override { data_source_->RemoveObserver(this); } void Start() { @@ -1141,8 +1147,6 @@ mojom::BundleMetadataPtr metadata_; bool bundle_version_is_b1_ = false; base::WeakPtrFactory<MetadataParser> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MetadataParser); }; // A parser for reading single item from the responses section. This class owns @@ -1160,6 +1164,10 @@ callback_(std::move(callback)) { data_source_->AddObserver(this); } + + ResponseParser(const ResponseParser&) = delete; + ResponseParser& operator=(const ResponseParser&) = delete; + ~ResponseParser() override { data_source_->RemoveObserver(this); } void Start(uint64_t buffer_size = kInitialBufferSizeForResponse) { @@ -1309,8 +1317,6 @@ ParseResponseCallback callback_; base::WeakPtrFactory<ResponseParser> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ResponseParser); }; WebBundleParser::SharedBundleDataSource::SharedBundleDataSource(
diff --git a/components/web_package/web_bundle_parser.h b/components/web_package/web_bundle_parser.h index 26927d8..4804495 100644 --- a/components/web_package/web_bundle_parser.h +++ b/components/web_package/web_bundle_parser.h
@@ -18,6 +18,10 @@ public: WebBundleParser(mojo::PendingReceiver<mojom::WebBundleParser> receiver, mojo::PendingRemote<mojom::BundleDataSource> data_source); + + WebBundleParser(const WebBundleParser&) = delete; + WebBundleParser& operator=(const WebBundleParser&) = delete; + ~WebBundleParser() override; private: @@ -60,8 +64,6 @@ mojo::Receiver<mojom::WebBundleParser> receiver_; scoped_refptr<SharedBundleDataSource> data_source_; - - DISALLOW_COPY_AND_ASSIGN(WebBundleParser); }; } // namespace web_package
diff --git a/components/web_package/web_bundle_parser_factory.h b/components/web_package/web_bundle_parser_factory.h index 3c4d806..e2191b5 100644 --- a/components/web_package/web_bundle_parser_factory.h +++ b/components/web_package/web_bundle_parser_factory.h
@@ -18,6 +18,10 @@ class WebBundleParserFactory : public mojom::WebBundleParserFactory { public: WebBundleParserFactory(); + + WebBundleParserFactory(const WebBundleParserFactory&) = delete; + WebBundleParserFactory& operator=(const WebBundleParserFactory&) = delete; + ~WebBundleParserFactory() override; std::unique_ptr<mojom::BundleDataSource> CreateFileDataSourceForTesting( @@ -31,8 +35,6 @@ void GetParserForDataSource( mojo::PendingReceiver<mojom::WebBundleParser> receiver, mojo::PendingRemote<mojom::BundleDataSource> data_source) override; - - DISALLOW_COPY_AND_ASSIGN(WebBundleParserFactory); }; } // namespace web_package
diff --git a/components/web_resource/eula_accepted_notifier.h b/components/web_resource/eula_accepted_notifier.h index 3dcdf1e..47baec8 100644 --- a/components/web_resource/eula_accepted_notifier.h +++ b/components/web_resource/eula_accepted_notifier.h
@@ -24,6 +24,10 @@ }; explicit EulaAcceptedNotifier(PrefService* local_state); + + EulaAcceptedNotifier(const EulaAcceptedNotifier&) = delete; + EulaAcceptedNotifier& operator=(const EulaAcceptedNotifier&) = delete; + virtual ~EulaAcceptedNotifier(); // Initializes this class with the given |observer|. Must be called before @@ -55,8 +59,6 @@ // Observer of the EULA accepted notification. Observer* observer_; - - DISALLOW_COPY_AND_ASSIGN(EulaAcceptedNotifier); }; } // namespace web_resource
diff --git a/components/web_resource/resource_request_allowed_notifier.h b/components/web_resource/resource_request_allowed_notifier.h index 91113376..970fd48 100644 --- a/components/web_resource/resource_request_allowed_notifier.h +++ b/components/web_resource/resource_request_allowed_notifier.h
@@ -68,6 +68,12 @@ PrefService* local_state, const char* disable_network_switch, NetworkConnectionTrackerGetter network_connection_tracker_getter); + + ResourceRequestAllowedNotifier(const ResourceRequestAllowedNotifier&) = + delete; + ResourceRequestAllowedNotifier& operator=( + const ResourceRequestAllowedNotifier&) = delete; + ~ResourceRequestAllowedNotifier() override; // Sets |observer| as the service to be notified by this instance, and @@ -139,8 +145,6 @@ bool connection_initialized_ = false; base::WeakPtrFactory<ResourceRequestAllowedNotifier> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ResourceRequestAllowedNotifier); }; extern const base::Feature kResourceRequestAllowedMigration;
diff --git a/components/web_resource/resource_request_allowed_notifier_test_util.h b/components/web_resource/resource_request_allowed_notifier_test_util.h index 9cd1c143..fa5c3a6 100644 --- a/components/web_resource/resource_request_allowed_notifier_test_util.h +++ b/components/web_resource/resource_request_allowed_notifier_test_util.h
@@ -28,6 +28,11 @@ TestRequestAllowedNotifier( PrefService* local_state, network::NetworkConnectionTracker* network_connection_tracker); + + TestRequestAllowedNotifier(const TestRequestAllowedNotifier&) = delete; + TestRequestAllowedNotifier& operator=(const TestRequestAllowedNotifier&) = + delete; + ~TestRequestAllowedNotifier() override; // A version of |Init()| that accepts a custom EulaAcceptedNotifier. @@ -50,8 +55,6 @@ std::unique_ptr<EulaAcceptedNotifier> test_eula_notifier_; bool override_requests_allowed_; bool requests_allowed_; - - DISALLOW_COPY_AND_ASSIGN(TestRequestAllowedNotifier); }; } // namespace web_resource
diff --git a/components/web_resource/resource_request_allowed_notifier_unittest.cc b/components/web_resource/resource_request_allowed_notifier_unittest.cc index 79d6d4b..9c51269 100644 --- a/components/web_resource/resource_request_allowed_notifier_unittest.cc +++ b/components/web_resource/resource_request_allowed_notifier_unittest.cc
@@ -22,6 +22,10 @@ : EulaAcceptedNotifier(nullptr), eula_accepted_(false) { } + + TestEulaAcceptedNotifier(const TestEulaAcceptedNotifier&) = delete; + TestEulaAcceptedNotifier& operator=(const TestEulaAcceptedNotifier&) = delete; + ~TestEulaAcceptedNotifier() override {} bool IsEulaAccepted() override { return eula_accepted_; } @@ -36,8 +40,6 @@ private: bool eula_accepted_; - - DISALLOW_COPY_AND_ASSIGN(TestEulaAcceptedNotifier); }; enum class ConnectionTrackerResponseMode { @@ -67,6 +69,12 @@ resource_request_allowed_notifier_.InitWithEulaAcceptNotifier( this, base::WrapUnique(eula_notifier_)); } + + ResourceRequestAllowedNotifierTest( + const ResourceRequestAllowedNotifierTest&) = delete; + ResourceRequestAllowedNotifierTest& operator=( + const ResourceRequestAllowedNotifierTest&) = delete; + ~ResourceRequestAllowedNotifierTest() override {} bool was_notified() const { return was_notified_; } @@ -125,8 +133,6 @@ TestingPrefServiceSimple prefs_; TestEulaAcceptedNotifier* eula_notifier_; // Weak, owned by RRAN. bool was_notified_; - - DISALLOW_COPY_AND_ASSIGN(ResourceRequestAllowedNotifierTest); }; TEST_P(ResourceRequestAllowedNotifierTest, NotifyOnInitialNetworkState) {
diff --git a/components/web_resource/web_resource_service.h b/components/web_resource/web_resource_service.h index 32eaa79..54cfddd4 100644 --- a/components/web_resource/web_resource_service.h +++ b/components/web_resource/web_resource_service.h
@@ -52,6 +52,9 @@ ResourceRequestAllowedNotifier::NetworkConnectionTrackerGetter network_connection_tracker_getter); + WebResourceService(const WebResourceService&) = delete; + WebResourceService& operator=(const WebResourceService&) = delete; + ~WebResourceService() override; // Sleep until cache needs to be updated, but always for at least @@ -136,8 +139,6 @@ // So that we can delay our start so as not to affect start-up time; also, // so that we can schedule future cache updates. base::WeakPtrFactory<WebResourceService> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(WebResourceService); }; } // namespace web_resource
diff --git a/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc b/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc index 6e3abfc..0575186 100644 --- a/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc +++ b/components/webapps/browser/android/add_to_homescreen_data_fetcher_unittest.cc
@@ -56,6 +56,10 @@ : is_webapk_compatible_(false), title_available_(false), data_available_(false) {} + + ObserverWaiter(const ObserverWaiter&) = delete; + ObserverWaiter& operator=(const ObserverWaiter&) = delete; + ~ObserverWaiter() override {} // Waits till the OnDataAvailable() callback is called. @@ -99,8 +103,6 @@ bool title_available_; bool data_available_; base::RepeatingClosure quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(ObserverWaiter); }; // Builds WebAPK compatible blink::Manifest. @@ -207,6 +209,12 @@ : public content::RenderViewHostTestHarness { public: AddToHomescreenDataFetcherTest() {} + + AddToHomescreenDataFetcherTest(const AddToHomescreenDataFetcherTest&) = + delete; + AddToHomescreenDataFetcherTest& operator=( + const AddToHomescreenDataFetcherTest&) = delete; + ~AddToHomescreenDataFetcherTest() override {} void SetUp() override { @@ -314,8 +322,6 @@ TestInstallableManager* installable_manager_; NullLargeFaviconProvider null_large_favicon_provider_; - - DISALLOW_COPY_AND_ASSIGN(AddToHomescreenDataFetcherTest); }; TEST_F(AddToHomescreenDataFetcherTest, EmptyManifest) {
diff --git a/components/webapps/browser/android/installable/installable_ambient_badge_infobar.h b/components/webapps/browser/android/installable/installable_ambient_badge_infobar.h index a0c20e7..465e7d7 100644 --- a/components/webapps/browser/android/installable/installable_ambient_badge_infobar.h +++ b/components/webapps/browser/android/installable/installable_ambient_badge_infobar.h
@@ -20,6 +20,12 @@ public: explicit InstallableAmbientBadgeInfoBar( std::unique_ptr<InstallableAmbientBadgeInfoBarDelegate> delegate); + + InstallableAmbientBadgeInfoBar(const InstallableAmbientBadgeInfoBar&) = + delete; + InstallableAmbientBadgeInfoBar& operator=( + const InstallableAmbientBadgeInfoBar&) = delete; + ~InstallableAmbientBadgeInfoBar() override; void AddToHomescreen(JNIEnv* env, @@ -33,8 +39,6 @@ JNIEnv* env, const ResourceIdMapper& resource_id_mapper) override; void ProcessButton(int action) override; - - DISALLOW_COPY_AND_ASSIGN(InstallableAmbientBadgeInfoBar); }; } // namespace webapps
diff --git a/components/webapps/browser/android/installable/installable_ambient_badge_infobar_delegate.h b/components/webapps/browser/android/installable/installable_ambient_badge_infobar_delegate.h index 9bfb6196..3d4cb9b 100644 --- a/components/webapps/browser/android/installable/installable_ambient_badge_infobar_delegate.h +++ b/components/webapps/browser/android/installable/installable_ambient_badge_infobar_delegate.h
@@ -38,6 +38,11 @@ virtual ~Client() {} }; + InstallableAmbientBadgeInfoBarDelegate( + const InstallableAmbientBadgeInfoBarDelegate&) = delete; + InstallableAmbientBadgeInfoBarDelegate& operator=( + const InstallableAmbientBadgeInfoBarDelegate&) = delete; + ~InstallableAmbientBadgeInfoBarDelegate() override; // Returns a pointer to the InstallableAmbientBadgeInfoBar if it is currently @@ -75,8 +80,6 @@ const SkBitmap primary_icon_; const bool is_primary_icon_maskable_; const GURL& start_url_; - - DISALLOW_COPY_AND_ASSIGN(InstallableAmbientBadgeInfoBarDelegate); }; } // namespace webapps
diff --git a/components/webapps/browser/installable/installable_manager.h b/components/webapps/browser/installable/installable_manager.h index ca8134b1..7784874e 100644 --- a/components/webapps/browser/installable/installable_manager.h +++ b/components/webapps/browser/installable/installable_manager.h
@@ -38,6 +38,10 @@ public content::WebContentsUserData<InstallableManager> { public: explicit InstallableManager(content::WebContents* web_contents); + + InstallableManager(const InstallableManager&) = delete; + InstallableManager& operator=(const InstallableManager&) = delete; + ~InstallableManager() override; // Returns the minimum icon size in pixels for a site to be installable. @@ -283,8 +287,6 @@ base::WeakPtrFactory<InstallableManager> weak_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(InstallableManager); }; } // namespace webapps
diff --git a/components/webcrypto/webcrypto_impl.h b/components/webcrypto/webcrypto_impl.h index 1dd6021..68321eb4 100644 --- a/components/webcrypto/webcrypto_impl.h +++ b/components/webcrypto/webcrypto_impl.h
@@ -24,6 +24,9 @@ public: WebCryptoImpl(); + WebCryptoImpl(const WebCryptoImpl&) = delete; + WebCryptoImpl& operator=(const WebCryptoImpl&) = delete; + ~WebCryptoImpl() override; void Encrypt( @@ -118,9 +121,6 @@ bool SerializeKeyForClone(const blink::WebCryptoKey& key, blink::WebVector<unsigned char>& key_data) override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl); }; } // namespace webcrypto
diff --git a/components/webdata/common/web_data_request_manager.h b/components/webdata/common/web_data_request_manager.h index cb35849..c8780f41 100644 --- a/components/webdata/common/web_data_request_manager.h +++ b/components/webdata/common/web_data_request_manager.h
@@ -35,6 +35,9 @@ ////////////////////////////////////////////////////////////////////////////// class WebDataRequest { public: + WebDataRequest(const WebDataRequest&) = delete; + WebDataRequest& operator=(const WebDataRequest&) = delete; + virtual ~WebDataRequest(); // Returns the identifier for this request. @@ -82,8 +85,6 @@ // Identifier for this request. const WebDataServiceBase::Handle handle_; - - DISALLOW_COPY_AND_ASSIGN(WebDataRequest); }; //////////////////////////////////////////////////////////////////////////////
diff --git a/components/webdata/common/web_data_results.h b/components/webdata/common/web_data_results.h index 9d9a6188..ab0906f2 100644 --- a/components/webdata/common/web_data_results.h +++ b/components/webdata/common/web_data_results.h
@@ -57,6 +57,9 @@ // class WEBDATA_EXPORT WDTypedResult { public: + WDTypedResult(const WDTypedResult&) = delete; + WDTypedResult& operator=(const WDTypedResult&) = delete; + virtual ~WDTypedResult() {} // Return the result type. @@ -67,7 +70,6 @@ private: WDResultType type_; - DISALLOW_COPY_AND_ASSIGN(WDTypedResult); }; // A result containing one specific pointer or literal value. @@ -78,6 +80,9 @@ WDResult(WDResultType type, T&& v) : WDTypedResult(type), value_(std::move(v)) {} + WDResult(const WDResult&) = delete; + WDResult& operator=(const WDResult&) = delete; + ~WDResult() override {} // Return a single value result. @@ -86,8 +91,6 @@ private: T value_; - - DISALLOW_COPY_AND_ASSIGN(WDResult); }; #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_RESULTS_H_
diff --git a/components/webdata/common/web_database.h b/components/webdata/common/web_database.h index 5b0fbab..9c146d36 100644 --- a/components/webdata/common/web_database.h +++ b/components/webdata/common/web_database.h
@@ -31,6 +31,10 @@ static const base::FilePath::CharType kInMemoryPath[]; WebDatabase(); + + WebDatabase(const WebDatabase&) = delete; + WebDatabase& operator=(const WebDatabase&) = delete; + virtual ~WebDatabase(); // Adds a database table. Ownership remains with the caller, which @@ -88,8 +92,6 @@ // object. Non-owning. typedef std::map<WebDatabaseTable::TypeKey, WebDatabaseTable*> TableMap; TableMap tables_; - - DISALLOW_COPY_AND_ASSIGN(WebDatabase); }; #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_H_
diff --git a/components/webdata/common/web_database_migration_unittest.cc b/components/webdata/common/web_database_migration_unittest.cc index 49ac5cf..8357af1 100644 --- a/components/webdata/common/web_database_migration_unittest.cc +++ b/components/webdata/common/web_database_migration_unittest.cc
@@ -52,6 +52,10 @@ class WebDatabaseMigrationTest : public testing::Test { public: WebDatabaseMigrationTest() {} + + WebDatabaseMigrationTest(const WebDatabaseMigrationTest&) = delete; + WebDatabaseMigrationTest& operator=(const WebDatabaseMigrationTest&) = delete; + ~WebDatabaseMigrationTest() override {} void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); } @@ -120,8 +124,6 @@ private: base::ScopedTempDir temp_dir_; - - DISALLOW_COPY_AND_ASSIGN(WebDatabaseMigrationTest); }; const int WebDatabaseMigrationTest::kCurrentTestedVersionNumber = 97;
diff --git a/components/webdata/common/web_database_table.h b/components/webdata/common/web_database_table.h index 0e28420..c2ebc7f 100644 --- a/components/webdata/common/web_database_table.h +++ b/components/webdata/common/web_database_table.h
@@ -24,6 +24,10 @@ // The object is not ready for use until Init() has been called. WebDatabaseTable(); + + WebDatabaseTable(const WebDatabaseTable&) = delete; + WebDatabaseTable& operator=(const WebDatabaseTable&) = delete; + virtual ~WebDatabaseTable(); // Retrieves the TypeKey for the concrete subtype. @@ -60,9 +64,6 @@ // ~WebDatabaseTable. sql::Database* db_; sql::MetaTable* meta_table_; - - private: - DISALLOW_COPY_AND_ASSIGN(WebDatabaseTable); }; #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATABASE_TABLE_H_
diff --git a/components/webdata_services/web_data_service_wrapper.h b/components/webdata_services/web_data_service_wrapper.h index 7ce2d8f..188493ce 100644 --- a/components/webdata_services/web_data_service_wrapper.h +++ b/components/webdata_services/web_data_service_wrapper.h
@@ -67,6 +67,9 @@ const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, const ShowErrorCallback& show_error_callback); + WebDataServiceWrapper(const WebDataServiceWrapper&) = delete; + WebDataServiceWrapper& operator=(const WebDataServiceWrapper&) = delete; + ~WebDataServiceWrapper() override; // KeyedService: @@ -102,8 +105,6 @@ scoped_refptr<payments::PaymentManifestWebDataService> payment_manifest_web_data_; #endif - - DISALLOW_COPY_AND_ASSIGN(WebDataServiceWrapper); }; #endif // COMPONENTS_WEBDATA_SERVICES_WEB_DATA_SERVICE_WRAPPER_H_
diff --git a/components/webxr/android/arcore_device_provider.h b/components/webxr/android/arcore_device_provider.h index 5f3dc33..668269d 100644 --- a/components/webxr/android/arcore_device_provider.h +++ b/components/webxr/android/arcore_device_provider.h
@@ -24,6 +24,10 @@ public: explicit ArCoreDeviceProvider( webxr::ArCompositorDelegateProvider compositor_delegate_provider); + + ArCoreDeviceProvider(const ArCoreDeviceProvider&) = delete; + ArCoreDeviceProvider& operator=(const ArCoreDeviceProvider&) = delete; + ~ArCoreDeviceProvider() override; void Initialize( base::RepeatingCallback<void( @@ -42,7 +46,6 @@ std::unique_ptr<device::ArCoreDevice> arcore_device_; bool initialized_ = false; - DISALLOW_COPY_AND_ASSIGN(ArCoreDeviceProvider); }; } // namespace webxr
diff --git a/components/webxr/mailbox_to_surface_bridge_impl.h b/components/webxr/mailbox_to_surface_bridge_impl.h index 81f41e21..618cfb8d 100644 --- a/components/webxr/mailbox_to_surface_bridge_impl.h +++ b/components/webxr/mailbox_to_surface_bridge_impl.h
@@ -37,6 +37,11 @@ // must be called consistently on a single GL thread. This is verified by // DCHECKs. MailboxToSurfaceBridgeImpl(); + + MailboxToSurfaceBridgeImpl(const MailboxToSurfaceBridgeImpl&) = delete; + MailboxToSurfaceBridgeImpl& operator=(const MailboxToSurfaceBridgeImpl&) = + delete; + ~MailboxToSurfaceBridgeImpl() override; bool IsConnected() override; @@ -109,8 +114,6 @@ // Must be last. base::WeakPtrFactory<MailboxToSurfaceBridgeImpl> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(MailboxToSurfaceBridgeImpl); }; class MailboxToSurfaceBridgeFactoryImpl
diff --git a/components/wifi/fake_wifi_service.h b/components/wifi/fake_wifi_service.h index e86d466..9191113 100644 --- a/components/wifi/fake_wifi_service.h +++ b/components/wifi/fake_wifi_service.h
@@ -20,6 +20,10 @@ class FakeWiFiService : public WiFiService { public: FakeWiFiService(); + + FakeWiFiService(const FakeWiFiService&) = delete; + FakeWiFiService& operator=(const FakeWiFiService&) = delete; + ~FakeWiFiService() override; void Initialize( @@ -75,8 +79,6 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner_; NetworkGuidListCallback networks_changed_observer_; NetworkGuidListCallback network_list_changed_observer_; - - DISALLOW_COPY_AND_ASSIGN(FakeWiFiService); }; } // namespace wifi
diff --git a/components/wifi/wifi_service.h b/components/wifi/wifi_service.h index ce2eeeb..39462c5 100644 --- a/components/wifi/wifi_service.h +++ b/components/wifi/wifi_service.h
@@ -32,6 +32,9 @@ using NetworkGuidListCallback = base::RepeatingCallback<void(const NetworkGuidList& network_guid_list)>; + WiFiService(const WiFiService&) = delete; + WiFiService& operator=(const WiFiService&) = delete; + virtual ~WiFiService() {} // Initialize WiFiService, store |task_runner| for posting worker tasks. @@ -136,9 +139,6 @@ static const char kErrorNotImplemented[]; static const char kErrorScanForNetworksWithName[]; static const char kErrorWiFiService[]; - - private: - DISALLOW_COPY_AND_ASSIGN(WiFiService); }; } // namespace wifi
diff --git a/components/wifi/wifi_service_mac.mm b/components/wifi/wifi_service_mac.mm index ced378da..aa5bbd6 100644 --- a/components/wifi/wifi_service_mac.mm +++ b/components/wifi/wifi_service_mac.mm
@@ -31,6 +31,10 @@ class WiFiServiceMac : public WiFiService { public: WiFiServiceMac(); + + WiFiServiceMac(const WiFiServiceMac&) = delete; + WiFiServiceMac& operator=(const WiFiServiceMac&) = delete; + ~WiFiServiceMac() override; // WiFiService interface implementation. @@ -153,8 +157,6 @@ std::string connected_network_guid_; // Temporary storage of network properties indexed by |network_guid|. base::DictionaryValue network_properties_; - - DISALLOW_COPY_AND_ASSIGN(WiFiServiceMac); }; WiFiServiceMac::WiFiServiceMac() : wlan_observer_(nil) {
diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc index 5c53d34..9651b76 100644 --- a/components/wifi/wifi_service_win.cc +++ b/components/wifi/wifi_service_win.cc
@@ -186,6 +186,10 @@ class WiFiServiceImpl : public WiFiService { public: WiFiServiceImpl(); + + WiFiServiceImpl(const WiFiServiceImpl&) = delete; + WiFiServiceImpl& operator=(const WiFiServiceImpl&) = delete; + ~WiFiServiceImpl() override; // WiFiService interface implementation. @@ -487,7 +491,6 @@ static const int kMaxAttempts = 100; // Delay between attempts to check that network has connected successfully. static const int kAttemptDelayMs = 100; - DISALLOW_COPY_AND_ASSIGN(WiFiServiceImpl); }; WiFiServiceImpl::WiFiServiceImpl()
diff --git a/components/zoom/test/zoom_test_utils.h b/components/zoom/test/zoom_test_utils.h index 62d2c198..c1311fa 100644 --- a/components/zoom/test/zoom_test_utils.h +++ b/components/zoom/test/zoom_test_utils.h
@@ -39,6 +39,9 @@ content::WebContents* web_contents, const ZoomController::ZoomChangedEventData& expected_event_data); + ZoomChangedWatcher(const ZoomChangedWatcher&) = delete; + ZoomChangedWatcher& operator=(const ZoomChangedWatcher&) = delete; + ~ZoomChangedWatcher() override; void Wait(); @@ -52,8 +55,6 @@ ZoomEventPred predicate_; scoped_refptr<content::MessageLoopRunner> message_loop_runner_; bool change_received_ = false; - - DISALLOW_COPY_AND_ASSIGN(ZoomChangedWatcher); }; } // namespace zoom
diff --git a/components/zoom/zoom_controller.h b/components/zoom/zoom_controller.h index 5813f24..d17fde05 100644 --- a/components/zoom/zoom_controller.h +++ b/components/zoom/zoom_controller.h
@@ -93,6 +93,9 @@ // given WebContents*. static double GetZoomLevelForWebContents(content::WebContents* web_contents); + ZoomController(const ZoomController&) = delete; + ZoomController& operator=(const ZoomController&) = delete; + ~ZoomController() override; ZoomMode zoom_mode() const { return zoom_mode_; } @@ -197,8 +200,6 @@ base::CallbackListSubscription zoom_subscription_; WEB_CONTENTS_USER_DATA_KEY_DECL(); - - DISALLOW_COPY_AND_ASSIGN(ZoomController); }; } // namespace zoom
diff --git a/components/zoom/zoom_event_manager.h b/components/zoom/zoom_event_manager.h index ecddd2a7..a3f2367 100644 --- a/components/zoom/zoom_event_manager.h +++ b/components/zoom/zoom_event_manager.h
@@ -26,6 +26,10 @@ class ZoomEventManager : public base::SupportsUserData::Data { public: ZoomEventManager(); + + ZoomEventManager(const ZoomEventManager&) = delete; + ZoomEventManager& operator=(const ZoomEventManager&) = delete; + ~ZoomEventManager() override; // Returns the ZoomEventManager for the specified BrowserContext. This @@ -64,8 +68,6 @@ zoom_level_changed_callbacks_; base::ObserverList<ZoomEventManagerObserver>::Unchecked observers_; base::WeakPtrFactory<ZoomEventManager> weak_ptr_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(ZoomEventManager); }; } // namespace zoom
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index f524b15..d5ac86e 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -1002,22 +1002,21 @@ // Teardown may start in PostMainMessageLoopRun, and during teardown we // need to be able to perform IO. - base::ThreadRestrictions::SetIOAllowed(true); + base::PermanentThreadAllowance::AllowBlocking(); GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce( - base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed), true)); + FROM_HERE, base::BindOnce(base::IgnoreResult( + &base::PermanentThreadAllowance::AllowBlocking))); // Also allow waiting to join threads. - // TODO(https://crbug.com/800808): Ideally this (and the above SetIOAllowed() - // would be scoped allowances). That would be one of the first step to ensure - // no persistent work is being done after ThreadPoolInstance::Shutdown() in - // order to move towards atomic shutdown. - base::ThreadRestrictions::SetWaitAllowed(true); + // TODO(crbug.com/800808): Ideally this (and the above AllowBlocking() would + // be scoped allowances). That would be one of the first step to ensure no + // persistent work is being done after ThreadPoolInstance::Shutdown() in order + // to move towards atomic shutdown. + base::PermanentThreadAllowance::AllowBaseSyncPrimitives(); GetIOThreadTaskRunner({})->PostTask( FROM_HERE, - base::BindOnce( - base::IgnoreResult(&base::ThreadRestrictions::SetWaitAllowed), true)); + base::BindOnce(base::IgnoreResult( + &base::PermanentThreadAllowance::AllowBaseSyncPrimitives))); if (RenderProcessHost::run_renderer_in_process()) RenderProcessHostImpl::ShutDownInProcessRenderer();
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.cc b/content/browser/dom_storage/dom_storage_context_wrapper.cc index ef055a7..4faffb9 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper.cc
@@ -15,7 +15,9 @@ #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner.h" #include "base/single_thread_task_runner.h" +#include "base/strings/strcat.h" #include "base/strings/utf_string_conversions.h" +#include "base/syslog_logging.h" #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "components/services/storage/dom_storage/local_storage_impl.h" @@ -238,7 +240,14 @@ void DOMStorageContextWrapper::OpenLocalStorage( const blink::StorageKey& storage_key, - mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { + mojo::PendingReceiver<blink::mojom::StorageArea> receiver, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback) { + if (!IsRequestValid(StorageType::kLocalStorage, storage_key, + std::move(security_policy_handle), + std::move(bad_message_callback))) { + return; + } DCHECK(local_storage_control_); local_storage_control_->BindStorageArea(storage_key, std::move(receiver)); if (storage_policy_observer_) { @@ -258,24 +267,39 @@ } void DOMStorageContextWrapper::BindStorageArea( - ChildProcessSecurityPolicyImpl::Handle security_policy_handle, const blink::StorageKey& storage_key, const std::string& namespace_id, - mojo::ReportBadMessageCallback bad_message_callback, - mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { - // TODO(https://crbug.com/1199077): Pass the real StorageKey when - // ChildProcessSecurityPolicyImpl is converted. - if (!security_policy_handle.CanAccessDataForOrigin(storage_key.origin())) { - std::move(bad_message_callback) - .Run("Access denied for sessionStorage request"); + mojo::PendingReceiver<blink::mojom::StorageArea> receiver, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback) { + if (!IsRequestValid(StorageType::kSessionStorage, storage_key, + std::move(security_policy_handle), + std::move(bad_message_callback))) { return; } - DCHECK(session_storage_control_); session_storage_control_->BindStorageArea( storage_key, namespace_id, std::move(receiver), base::DoNothing()); } +bool DOMStorageContextWrapper::IsRequestValid( + const StorageType type, + const blink::StorageKey& storage_key, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback) { + const std::string type_string = + type == StorageType::kLocalStorage ? "localStorage" : "sessionStorage"; + // TODO(https://crbug.com/1199077): Pass the real StorageKey when + // ChildProcessSecurityPolicyImpl is converted. + if (!security_policy_handle.CanAccessDataForOrigin(storage_key.origin())) { + SYSLOG(WARNING) << "Denying illegal " << type_string << " request."; + std::move(bad_message_callback) + .Run(base::StrCat({"Access denied for ", type_string, " request"})); + return false; + } + return true; +} + void DOMStorageContextWrapper::RecoverFromStorageServiceCrash() { DCHECK(partition_); MaybeBindSessionStorageControl();
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h index 1765f8c..7649500 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper.h +++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -100,17 +100,19 @@ void OpenLocalStorage( const blink::StorageKey& storage_key, - mojo::PendingReceiver<blink::mojom::StorageArea> receiver); + mojo::PendingReceiver<blink::mojom::StorageArea> receiver, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback); void BindNamespace( const std::string& namespace_id, mojo::ReportBadMessageCallback bad_message_callback, mojo::PendingReceiver<blink::mojom::SessionStorageNamespace> receiver); void BindStorageArea( - ChildProcessSecurityPolicyImpl::Handle security_policy_handle, const blink::StorageKey& storage_key, const std::string& namespace_id, - mojo::ReportBadMessageCallback bad_message_callback, - mojo::PendingReceiver<blink::mojom::StorageArea> receiver); + mojo::PendingReceiver<blink::mojom::StorageArea> receiver, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback); // Pushes information about known Session Storage namespaces down to the // Storage Service instance after a crash. This in turn allows renderer @@ -147,6 +149,16 @@ void ApplyPolicyUpdates( std::vector<storage::mojom::StoragePolicyUpdatePtr> policy_updates); + enum class StorageType { + kLocalStorage, + kSessionStorage, + }; + bool IsRequestValid( + const StorageType type, + const blink::StorageKey& storage_key, + ChildProcessSecurityPolicyImpl::Handle security_policy_handle, + mojo::ReportBadMessageCallback bad_message_callback); + // Since the tab restore code keeps a reference to the session namespaces // of recently closed tabs (see sessions::ContentPlatformSpecificTabData and // sessions::TabRestoreService), a SessionStorageNamespaceImpl can outlive the
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc b/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc index c7c208b..36734d2 100644 --- a/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc +++ b/content/browser/dom_storage/dom_storage_context_wrapper_unittest.cc
@@ -59,7 +59,10 @@ } protected: - void OnBadMessage(const std::string& reason) { bad_message_called_ = true; } + void OnBadMessage(const std::string& reason) { + bad_message_called_ = true; + bad_message_ = reason; + } mojo::ReportBadMessageCallback MakeBadMessageCallback() { return base::BindOnce(&DOMStorageContextWrapperTest::OnBadMessage, @@ -82,18 +85,33 @@ TestBrowserContext browser_context_; scoped_refptr<DOMStorageContextWrapper> context_; bool bad_message_called_ = false; + std::string bad_message_; }; -TEST_F(DOMStorageContextWrapperTest, ProcessLockedToOtherStorageKey) { - // Tries to open an area with a process that is locked to a different - // StorageKey and verifies the bad message callback. - +// Tries to open a local storage area with a process that is locked to a +// different StorageKey and verifies the bad message callback. +TEST_F(DOMStorageContextWrapperTest, + OpenLocalStorageProcessLockedToOtherStorageKey) { mojo::Remote<blink::mojom::StorageArea> area; - context_->BindStorageArea(CreateSecurityPolicyHandle(kTestProcessIdOrigin1), - test_storage_key2_, test_namespace_id_, - MakeBadMessageCallback(), - area.BindNewPipeAndPassReceiver()); + context_->OpenLocalStorage(test_storage_key2_, + area.BindNewPipeAndPassReceiver(), + CreateSecurityPolicyHandle(kTestProcessIdOrigin1), + MakeBadMessageCallback()); EXPECT_TRUE(bad_message_called_); + EXPECT_EQ(bad_message_, "Access denied for localStorage request"); +} + +// Tries to open a session storage area with a process that is locked to a +// different StorageKey and verifies the bad message callback. +TEST_F(DOMStorageContextWrapperTest, + BindStorageAreaProcessLockedToOtherStorageKey) { + mojo::Remote<blink::mojom::StorageArea> area; + context_->BindStorageArea(test_storage_key2_, test_namespace_id_, + area.BindNewPipeAndPassReceiver(), + CreateSecurityPolicyHandle(kTestProcessIdOrigin1), + MakeBadMessageCallback()); + EXPECT_TRUE(bad_message_called_); + EXPECT_EQ(bad_message_, "Access denied for sessionStorage request"); } } // namespace content
diff --git a/content/browser/file_system_access/file_system_access_file_writer_impl.cc b/content/browser/file_system_access/file_system_access_file_writer_impl.cc index 2d90010..f8543afa 100644 --- a/content/browser/file_system_access/file_system_access_file_writer_impl.cc +++ b/content/browser/file_system_access/file_system_access_file_writer_impl.cc
@@ -551,9 +551,9 @@ base::SequencedTaskRunnerHandle::Get(), std::move(callback)); manager()->operation_runner().PostTaskWithThisObject( - FROM_HERE, base::BindOnce(&HashCalculator::CreateAndStart, - base::WrapRefCounted(file_system_context()), - std::move(wrapped_callback), swap_url())); + base::BindOnce(&HashCalculator::CreateAndStart, + base::WrapRefCounted(file_system_context()), + std::move(wrapped_callback), swap_url())); } base::WeakPtr<FileSystemAccessHandleBase>
diff --git a/content/browser/file_system_access/file_system_access_manager_impl.cc b/content/browser/file_system_access/file_system_access_manager_impl.cc index 2292720..4a2aed3 100644 --- a/content/browser/file_system_access/file_system_access_manager_impl.cc +++ b/content/browser/file_system_access/file_system_access_manager_impl.cc
@@ -1226,7 +1226,6 @@ CreateFileSystemURLFromPath(entries.front().type, entries.front().path); operation_runner().PostTaskWithThisObject( - FROM_HERE, base::BindOnce( &CreateAndTruncateFile, fs_url, base::BindOnce(
diff --git a/content/browser/isolated_origin_browsertest.cc b/content/browser/isolated_origin_browsertest.cc index 21137a1..a7c4b41b 100644 --- a/content/browser/isolated_origin_browsertest.cc +++ b/content/browser/isolated_origin_browsertest.cc
@@ -56,6 +56,7 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/features.h" +#include "third_party/blink/public/common/storage_key/storage_key.h" #include "third_party/blink/public/mojom/broadcastchannel/broadcast_channel.mojom-test-utils.h" #include "third_party/blink/public/mojom/broadcastchannel/broadcast_channel.mojom.h" #include "third_party/blink/public/mojom/dom_storage/dom_storage.mojom-test-utils.h" @@ -3266,8 +3267,8 @@ } } -// This class allows intercepting the OpenLocalStorage method and changing -// the parameters to the real implementation of it. +// This class allows intercepting the BindStorageArea and OpenLocalStorage +// methods in order to test what happens when parameters are changed. class StoragePartitonInterceptor : public blink::mojom::DomStorageInterceptorForTesting, public RenderProcessHostObserver { @@ -3275,8 +3276,8 @@ StoragePartitonInterceptor( RenderProcessHostImpl* rph, mojo::PendingReceiver<blink::mojom::DomStorage> receiver, - const url::Origin& origin_to_inject) - : origin_to_inject_(origin_to_inject) { + const blink::StorageKey& storage_key_to_inject) + : storage_key_to_inject_(storage_key_to_inject) { StoragePartitionImpl* storage_partition = static_cast<StoragePartitionImpl*>(rph->GetStoragePartition()); @@ -3314,31 +3315,66 @@ return dom_storage_; } - // Override this method to allow changing the origin. It simulates a + // Override this method to allow changing the `storage_key`. It simulates a // renderer process sending incorrect data to the browser process, so // security checks can be tested. void OpenLocalStorage( - const url::Origin& origin, + const blink::StorageKey& storage_key, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) override { - GetForwardingInterface()->OpenLocalStorage(origin_to_inject_, + GetForwardingInterface()->OpenLocalStorage(storage_key_to_inject_, std::move(receiver)); } + // Override this method to allow changing the `storage_key`. It simulates a + // renderer process sending incorrect data to the browser process, so + // security checks can be tested. + void BindSessionStorageArea( + const blink::StorageKey& storage_key, + const std::string& namespace_id, + mojo::PendingReceiver<blink::mojom::StorageArea> receiver) override { + GetForwardingInterface()->BindSessionStorageArea( + storage_key_to_inject_, namespace_id, std::move(receiver)); + } + private: // Keep a pointer to the original implementation of the service, so all // calls can be forwarded to it. blink::mojom::DomStorage* dom_storage_; - url::Origin origin_to_inject_; + blink::StorageKey storage_key_to_inject_; }; void CreateTestDomStorageBackend( - const url::Origin& origin_to_inject, + const blink::StorageKey& storage_key_to_inject, RenderProcessHostImpl* rph, mojo::PendingReceiver<blink::mojom::DomStorage> receiver) { // This object will register as RenderProcessHostObserver, so it will // clean itself automatically on process exit. - new StoragePartitonInterceptor(rph, std::move(receiver), origin_to_inject); + new StoragePartitonInterceptor(rph, std::move(receiver), + storage_key_to_inject); +} + +// Verify that a renderer process cannot read sessionStorage of another origin. +IN_PROC_BROWSER_TEST_F(IsolatedOriginTest, + SessionStorageOriginEnforcement_WrongOrigin) { + auto mismatched_storage_key = + blink::StorageKey::CreateFromStringForTesting("http://bar.com"); + RenderProcessHostImpl::SetDomStorageBinderForTesting(base::BindRepeating( + &CreateTestDomStorageBackend, mismatched_storage_key)); + + GURL isolated_url( + embedded_test_server()->GetURL("isolated.foo.com", "/title1.html")); + EXPECT_TRUE(IsIsolatedOrigin(url::Origin::Create(isolated_url))); + EXPECT_TRUE(NavigateToURL(shell(), isolated_url)); + + content::RenderProcessHostBadIpcMessageWaiter kill_waiter( + shell()->web_contents()->GetMainFrame()->GetProcess()); + // Use ignore_result here, since on Android the renderer process is + // terminated, but ExecuteScript still returns true. It properly returns + // false on all other platforms. + ignore_result(ExecJs(shell()->web_contents()->GetMainFrame(), + "sessionStorage.length;")); + EXPECT_EQ(bad_message::RPH_MOJO_PROCESS_ERROR, kill_waiter.Wait()); } // Verify that an isolated renderer process cannot read localStorage of an @@ -3346,10 +3382,11 @@ IN_PROC_BROWSER_TEST_F( IsolatedOriginTest, LocalStorageOriginEnforcement_IsolatedAccessingNonIsolated) { - auto mismatched_origin = url::Origin::Create(GURL("http://abc.foo.com")); - EXPECT_FALSE(IsIsolatedOrigin(mismatched_origin)); - RenderProcessHostImpl::SetDomStorageBinderForTesting( - base::BindRepeating(&CreateTestDomStorageBackend, mismatched_origin)); + auto mismatched_storage_key = + blink::StorageKey::CreateFromStringForTesting("http://abc.foo.com"); + EXPECT_FALSE(IsIsolatedOrigin(mismatched_storage_key.origin())); + RenderProcessHostImpl::SetDomStorageBinderForTesting(base::BindRepeating( + &CreateTestDomStorageBackend, mismatched_storage_key)); GURL isolated_url( embedded_test_server()->GetURL("isolated.foo.com", "/title1.html")); @@ -3385,15 +3422,16 @@ IN_PROC_BROWSER_TEST_F( IsolatedOriginTest, MAYBE_LocalStorageOriginEnforcement_NonIsolatedAccessingIsolated) { - auto isolated_origin = url::Origin::Create(GURL("http://isolated.foo.com")); - EXPECT_TRUE(IsIsolatedOrigin(isolated_origin)); + auto isolated_storage_key = + blink::StorageKey::CreateFromStringForTesting("http://isolated.foo.com"); + EXPECT_TRUE(IsIsolatedOrigin(isolated_storage_key.origin())); GURL nonisolated_url( embedded_test_server()->GetURL("non-isolated.com", "/title1.html")); EXPECT_FALSE(IsIsolatedOrigin(url::Origin::Create(nonisolated_url))); RenderProcessHostImpl::SetDomStorageBinderForTesting( - base::BindRepeating(&CreateTestDomStorageBackend, isolated_origin)); + base::BindRepeating(&CreateTestDomStorageBackend, isolated_storage_key)); EXPECT_TRUE(NavigateToURL(shell(), nonisolated_url)); content::RenderProcessHostBadIpcMessageWaiter kill_waiter( @@ -3412,9 +3450,10 @@ LocalStorageOriginEnforcement_OpaqueOrigin) { url::Origin precursor_origin = url::Origin::Create(GURL("https://non-isolated.com")); - url::Origin opaque_origin = precursor_origin.DeriveNewOpaqueOrigin(); + blink::StorageKey opaque_storage_key = + blink::StorageKey(precursor_origin.DeriveNewOpaqueOrigin()); RenderProcessHostImpl::SetDomStorageBinderForTesting( - base::BindRepeating(&CreateTestDomStorageBackend, opaque_origin)); + base::BindRepeating(&CreateTestDomStorageBackend, opaque_storage_key)); GURL isolated_url( embedded_test_server()->GetURL("isolated.foo.com", "/title1.html"));
diff --git a/content/browser/metrics/histogram_synchronizer.cc b/content/browser/metrics/histogram_synchronizer.cc index 6210df1..657613c 100644 --- a/content/browser/metrics/histogram_synchronizer.cc +++ b/content/browser/metrics/histogram_synchronizer.cc
@@ -16,7 +16,6 @@ #include "base/pickle.h" #include "base/single_thread_task_runner.h" #include "base/threading/thread.h" -#include "base/threading/thread_restrictions.h" #include "content/browser/metrics/histogram_controller.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h"
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index 2fbba3b..a5edae3 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -363,6 +363,17 @@ local_surface_id_allocator_.UpdateFromChild(*child_local_surface_id); } else { local_surface_id_allocator_.GenerateId(); + // When a rotation begins while hidden, the Renderer will report the amount + // of time spent performing layout of the incremental surfaces. We cache the + // first viz::LocalSurfaceId sent, and then update |hidden_rotation_time_| + // for all subsequent cc::RenderFrameMetadata reported until the rotation + // completes. + if (!is_showing_ && in_rotation_ && + !first_hidden_local_surface_id_.is_valid()) { + hidden_rotation_time_ = base::TimeDelta(); + first_hidden_local_surface_id_ = + local_surface_id_allocator_.GetCurrentLocalSurfaceId(); + } } // If we still have an invalid viz::LocalSurfaceId, then we are hidden and @@ -428,6 +439,25 @@ void RenderWidgetHostViewAndroid::OnRenderFrameMetadataChangedBeforeActivation( const cc::RenderFrameMetadata& metadata) { + // If we began Surface Synchronization while hidden, the Renderer will report + // the time spent performing the incremental layouts. The record those here, + // to be included with the final time spend completing rotation in + // OnRenderFrameMetadataChangedAfterActivation. + if (first_hidden_local_surface_id_.is_valid() && + metadata.local_surface_id->is_valid()) { + auto local_surface_id = metadata.local_surface_id.value(); + // We stop recording layout times once the surface is expected as the final + // one for rotation. For that surface we are interested in the full time + // until activation. Which will include layout and rendering. + if (!rotation_metrics_.empty() && + local_surface_id.IsSameOrNewerThan(rotation_metrics_.front().second)) { + first_hidden_local_surface_id_ = viz::LocalSurfaceId(); + } else if (metadata.local_surface_id->IsSameOrNewerThan( + first_hidden_local_surface_id_)) { + hidden_rotation_time_ += metadata.visual_properties_update_duration; + } + } + bool is_transparent = metadata.has_transparent_background; SkColor root_background_color = metadata.root_background_color; @@ -643,14 +673,36 @@ // We want to know of these long tail rotation times. if (activated_local_surface_id.IsSameOrNewerThan( rotation_target.second)) { - TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP0( + // The duration for a rotation encompasses two separate spans of time, + // depending on whether or not we were `is_showing_` at the start of + // rotation. + // + // For a visible rotation `rotation_target.first` denotes the start of + // the rotation event handled in BeginRotationBatching. + // + // For a hidden rotation we ignore this initial event, as the Renderer + // can continue to be hidden for a long time. In these cases the + // `rotation_target.first` denotes when ShowInternal is called. + // + // From these, until `activation_time`, we can determine the length of + // time that the Renderer is visible, until the post rotation surface is + // first displayed. + // + // For hidden rotations, the Renderer may be doing additional, partial, + // layouts. This is tracked in `hidden_rotation_time_`. This extra work + // will be removed once `is_surface_sync_throttling_` is the default. + auto duration = + activation_time - rotation_target.first + hidden_rotation_time_; + TRACE_EVENT_NESTABLE_ASYNC_END_WITH_TIMESTAMP1( "viz", "RenderWidgetHostViewAndroid::RotationEmbed", - TRACE_ID_LOCAL(rotation_target.second.hash()), activation_time); + TRACE_ID_LOCAL(rotation_target.second.hash()), activation_time, + "duration(ms)", duration.InMillisecondsF()); // Report the total time from the first notification of rotation // beginning, until the Renderer has submitted and activated a // corresponding surface. UMA_HISTOGRAM_TIMES("Android.Rotation.BeginToRendererFrameActivation", - activation_time - rotation_target.first); + duration); + hidden_rotation_time_ = base::TimeDelta(); rotation_metrics_.pop_front(); } else { // The embedded surface may have updated the @@ -1621,7 +1673,12 @@ rotation_metrics_.erase(rotation_metrics_.begin(), rotation_metrics_.begin() + skipped_rotations); } + // If a rotation occurred while we were hidden, we do not want to include + // all of that idle time in the rotation metrics. However we do want to have + // the "RotationBegin" tracing event. So end the tracing event, before + // setting the starting time of the rotation. EndRotationBatching(); + rotation_metrics_.begin()->first = base::TimeTicks::Now(); BeginRotationEmbed(); } } @@ -2724,18 +2781,19 @@ // visual properties. Completing in EndRotationBatching, where the full new // set of properties is known. Trace the duration of that. const auto delta = rotation_metrics_.back().first - base::TimeTicks(); - TRACE_EVENT_NESTABLE_ASYNC_BEGIN0( + TRACE_EVENT_NESTABLE_ASYNC_BEGIN1( "viz", "RenderWidgetHostViewAndroid::RotationBegin", - TRACE_ID_LOCAL(delta.InNanoseconds())); + TRACE_ID_LOCAL(delta.InNanoseconds()), "visible", is_showing_); } void RenderWidgetHostViewAndroid::EndRotationBatching() { in_rotation_ = false; DCHECK(!rotation_metrics_.empty()); const auto delta = rotation_metrics_.back().first - base::TimeTicks(); - TRACE_EVENT_NESTABLE_ASYNC_END0("viz", - "RenderWidgetHostViewAndroid::RotationBegin", - TRACE_ID_LOCAL(delta.InNanoseconds())); + TRACE_EVENT_NESTABLE_ASYNC_END1( + "viz", "RenderWidgetHostViewAndroid::RotationBegin", + TRACE_ID_LOCAL(delta.InNanoseconds()), "local_surface_id", + local_surface_id_allocator_.GetCurrentLocalSurfaceId().ToString()); } void RenderWidgetHostViewAndroid::BeginRotationEmbed() {
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index 7165044b..b61bacd 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -579,6 +579,12 @@ // another before the first has displayed. This can occur on pages that have // long layout and rendering time. std::deque<std::pair<base::TimeTicks, viz::LocalSurfaceId>> rotation_metrics_; + // Tracks the first surface that was allocated for rotation while hidden. + // Along with the total time the Renderer spent performing updates for these + // incremental surfaces. + viz::LocalSurfaceId first_hidden_local_surface_id_; + base::TimeDelta hidden_rotation_time_; + // If true, then content was displayed before the completion of the initial // navigation. After any content has been displayed, we need to allocate a new // surface for all subsequent navigations.
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc index a7f081e..ca36bb2 100644 --- a/content/browser/service_worker/service_worker_version.cc +++ b/content/browser/service_worker/service_worker_version.cc
@@ -1875,11 +1875,18 @@ } void ServiceWorkerVersion::StartWorkerInternal() { - DCHECK(context_); DCHECK_EQ(EmbeddedWorkerStatus::STOPPED, running_status()); DCHECK(inflight_requests_.IsEmpty()); DCHECK(request_timeouts_.empty()); + // Don't try to start a new worker thread if the `context_` has been + // destroyed. This can happen during browser shutdown or if corruption + // forced a storage reset. + if (!context_) { + FinishStartWorker(blink::ServiceWorkerStatusCode::kErrorAbort); + return; + } + StartTimeoutTimer(); // Set expiration time in advance so that the service worker can
diff --git a/content/browser/speech/tts_controller_impl.cc b/content/browser/speech/tts_controller_impl.cc index 2473f93..0aa180b 100644 --- a/content/browser/speech/tts_controller_impl.cc +++ b/content/browser/speech/tts_controller_impl.cc
@@ -78,6 +78,10 @@ return TtsControllerImpl::GetInstance(); } +void TtsController::SkipAddNetworkChangeObserverForTests(bool enabled) { + return TtsControllerImpl::SkipAddNetworkChangeObserverForTests(enabled); +} + // IMPORTANT! // These values are written to logs. Do not renumber or delete // existing items; add new entries to the end of the list. @@ -103,16 +107,26 @@ // // static +bool TtsControllerImpl::skip_add_network_change_observer_for_tests_ = false; + +// static TtsControllerImpl* TtsControllerImpl::GetInstance() { return base::Singleton<TtsControllerImpl>::get(); } +// static +void TtsControllerImpl::SkipAddNetworkChangeObserverForTests(bool enabled) { + TtsControllerImpl::skip_add_network_change_observer_for_tests_ = enabled; +} + void TtsControllerImpl::SetStopSpeakingWhenHidden(bool value) { stop_speaking_when_hidden_ = value; } TtsControllerImpl::TtsControllerImpl() { - net::NetworkChangeNotifier::AddNetworkChangeObserver(this); + if (!skip_add_network_change_observer_for_tests_) { + net::NetworkChangeNotifier::AddNetworkChangeObserver(this); + } OnNetworkChanged(net::NetworkChangeNotifier::GetConnectionType()); }
diff --git a/content/browser/speech/tts_controller_impl.h b/content/browser/speech/tts_controller_impl.h index 9877b29b..d319b2d 100644 --- a/content/browser/speech/tts_controller_impl.h +++ b/content/browser/speech/tts_controller_impl.h
@@ -46,6 +46,8 @@ // Get the single instance of this class. static TtsControllerImpl* GetInstance(); + static void SkipAddNetworkChangeObserverForTests(bool enabled); + void SetStopSpeakingWhenHidden(bool value); // TtsController methods @@ -194,6 +196,10 @@ // Whether to allow remote voices. bool allow_remote_voices_ = false; + // Skip |AddNetworkChangeObserver| call during the creation of tts_controller + // for unittests as network change notifier wouldn't have been created. + static bool skip_add_network_change_observer_for_tests_; + DISALLOW_COPY_AND_ASSIGN(TtsControllerImpl); };
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 6d4c231..346aa17 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -25,7 +25,6 @@ #include "base/run_loop.h" #include "base/sequenced_task_runner.h" #include "base/single_thread_task_runner.h" -#include "base/syslog_logging.h" #include "base/task/thread_pool.h" #include "base/threading/sequence_local_storage_slot.h" #include "base/time/default_clock.h" @@ -1685,20 +1684,14 @@ } void StoragePartitionImpl::OpenLocalStorage( - const url::Origin& origin, + const blink::StorageKey& storage_key, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { DCHECK(initialized_); - const auto& security_policy_handle = dom_storage_receivers_.current_context(); - if (!security_policy_handle->CanAccessDataForOrigin(origin)) { - SYSLOG(WARNING) << "Killing renderer: illegal localStorage request."; - dom_storage_receivers_.ReportBadMessage( - "Access denied for localStorage request"); - return; - } + ChildProcessSecurityPolicyImpl::Handle security_policy_handle = + dom_storage_receivers_.current_context()->Duplicate(); dom_storage_context_->OpenLocalStorage( - // TODO(https://crbug.com/1199077): Pass the real StorageKey - // when StoragePartitionImpl is converted. - blink::StorageKey(origin), std::move(receiver)); + storage_key, std::move(receiver), std::move(security_policy_handle), + dom_storage_receivers_.GetBadMessageCallback()); } void StoragePartitionImpl::BindSessionStorageNamespace( @@ -1711,18 +1704,16 @@ } void StoragePartitionImpl::BindSessionStorageArea( - const url::Origin& origin, + const blink::StorageKey& storage_key, const std::string& namespace_id, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { DCHECK(initialized_); ChildProcessSecurityPolicyImpl::Handle security_policy_handle = dom_storage_receivers_.current_context()->Duplicate(); dom_storage_context_->BindStorageArea( + storage_key, namespace_id, std::move(receiver), std::move(security_policy_handle), - // TODO(https://crbug.com/1199077): Pass the real StorageKey - // when StoragePartitionImpl is converted. - blink::StorageKey(origin), namespace_id, - dom_storage_receivers_.GetBadMessageCallback(), std::move(receiver)); + dom_storage_receivers_.GetBadMessageCallback()); } void StoragePartitionImpl::OnAuthRequired( @@ -2829,10 +2820,10 @@ const blink::StorageKey& storage_key, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) { DCHECK(initialized_); - DCHECK(ChildProcessSecurityPolicyImpl::GetInstance() - ->CreateHandle(process_id) - .CanAccessDataForOrigin(storage_key.origin())); - dom_storage_context_->OpenLocalStorage(storage_key, std::move(receiver)); + auto handle = + ChildProcessSecurityPolicyImpl::GetInstance()->CreateHandle(process_id); + dom_storage_context_->OpenLocalStorage(storage_key, std::move(receiver), + std::move(handle), base::DoNothing()); } void StoragePartitionImpl::BindSessionStorageAreaForProcess( @@ -2843,10 +2834,9 @@ DCHECK(initialized_); auto handle = ChildProcessSecurityPolicyImpl::GetInstance()->CreateHandle(process_id); - DCHECK(handle.CanAccessDataForOrigin(storage_key.origin())); - dom_storage_context_->BindStorageArea(std::move(handle), storage_key, - namespace_id, base::DoNothing(), - std::move(receiver)); + dom_storage_context_->BindStorageArea(storage_key, namespace_id, + std::move(receiver), std::move(handle), + base::DoNothing()); } void StoragePartitionImpl::
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h index bb5d7de..7e67cc0 100644 --- a/content/browser/storage_partition_impl.h +++ b/content/browser/storage_partition_impl.h
@@ -228,14 +228,16 @@ // blink::mojom::DomStorage interface. void OpenLocalStorage( - const url::Origin& origin, + const blink::StorageKey& storage_key, + // TODO(https://crbug.com/1212808): add local_frame_token mojo::PendingReceiver<blink::mojom::StorageArea> receiver) override; void BindSessionStorageNamespace( const std::string& namespace_id, mojo::PendingReceiver<blink::mojom::SessionStorageNamespace> receiver) override; void BindSessionStorageArea( - const url::Origin& origin, + const blink::StorageKey& storage_key, + // TODO(https://crbug.com/1212808): add local_frame_token const std::string& namespace_id, mojo::PendingReceiver<blink::mojom::StorageArea> receiver) override;
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc index 9684166..a7d5c599 100644 --- a/content/browser/storage_partition_impl_unittest.cc +++ b/content/browser/storage_partition_impl_unittest.cc
@@ -299,7 +299,6 @@ base::RunLoop populate_loop; database->database().PostTaskWithThisObject( - FROM_HERE, base::BindLambdaForTesting([&](const storage::DomStorageDatabase& db) { PopulateDatabase(db, origin1, origin2, origin3); populate_loop.Quit();
diff --git a/content/public/browser/tts_controller.h b/content/public/browser/tts_controller.h index 2d2803cfc..2c2b201 100644 --- a/content/public/browser/tts_controller.h +++ b/content/public/browser/tts_controller.h
@@ -90,6 +90,8 @@ // Get the single instance of this class. static TtsController* GetInstance(); + static void SkipAddNetworkChangeObserverForTests(bool enabled); + // Returns true if we're currently speaking an utterance. virtual bool IsSpeaking() = 0;
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc index 763c495..04eea709 100644 --- a/content/public/test/browser_test_base.cc +++ b/content/public/test/browser_test_base.cc
@@ -705,7 +705,7 @@ // Like in BrowserMainLoop::ShutdownThreadsAndCleanUp(), allow IO during main // thread tear down. - base::ThreadRestrictions::SetIOAllowed(true); + base::PermanentThreadAllowance::AllowBlocking(); base::PostTaskAndroid::SignalNativeSchedulerShutdownForTesting(); BrowserTaskExecutor::Shutdown();
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index c0a0041..f85f514e 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -199,7 +199,6 @@ namespace { using ::base::PassKey; -using ::base::ThreadRestrictions; using ::blink::WebDocument; using ::blink::WebFrame; using ::blink::WebNetworkStateNotifier; @@ -882,10 +881,8 @@ blink_platform_impl_->CreateAndSetCompositorThread(); compositor_task_runner_ = blink_platform_impl_->CompositorThreadTaskRunner(); - compositor_task_runner_->PostTask( - FROM_HERE, - base::BindOnce(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), - false)); + compositor_task_runner_->PostTask(FROM_HERE, + base::BindOnce(&base::DisallowBlocking)); GetContentClient()->renderer()->PostCompositorThreadCreated( compositor_task_runner_.get()); }
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt index 405b208..b772eb19 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt
@@ -869,11 +869,9 @@ # Mac. Vulkan backend. crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/canvas/canvas-test.html [ Failure ] -crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/canvas/webgl-to-2d-canvas.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/context/premultiplyalpha-test.html [ Failure ] crbug.com/1099978 [ mac angle-swiftshader passthrough ] conformance/extensions/oes-texture-float-with-video.html [ Failure ] crbug.com/1099978 [ mac angle-swiftshader passthrough ] conformance/extensions/oes-texture-half-float-with-video.html [ Failure ] -crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/rendering/draw-webgl-to-canvas-2d-repeatedly.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] @@ -882,9 +880,7 @@ crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/image_bitmap_from_video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/misc/gl-pixelstorei.html [ Failure ] -crbug.com/swiftshader/154 [ mac angle-swiftshader passthrough ] conformance/textures/misc/tex-image-canvas-corruption.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/misc/texture-npot-video.html [ Failure ] -crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/misc/texture-video-transparent.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/video/tex-2d-luminance_alpha-luminance_alpha-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/video/tex-2d-luminance-luminance-unsigned_byte.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html [ Failure ] @@ -893,9 +889,6 @@ crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html [ Failure ] crbug.com/1099979 [ mac angle-swiftshader passthrough ] conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html [ Failure ] -crbug.com/1134756 [ mac angle-swiftshader passthrough ] conformance/textures/misc/copy-tex-image-2d-formats.html [ Failure ] -crbug.com/1134756 [ mac angle-swiftshader passthrough ] conformance/misc/uninitialized-test.html [ Failure ] -crbug.com/1134756 [ mac angle-swiftshader passthrough ] conformance/textures/misc/copy-tex-image-and-sub-image-2d.html [ Failure ] crbug.com/1190853 [ mac angle-swiftshader passthrough ] conformance/textures/misc/video-rotation.html [ Failure ]
diff --git a/content/utility/speech/BUILD.gn b/content/utility/speech/BUILD.gn index 35b7a9f..be1e4e2e 100644 --- a/content/utility/speech/BUILD.gn +++ b/content/utility/speech/BUILD.gn
@@ -11,6 +11,7 @@ deps = [ "//base", "//components/component_updater:component_updater", + "//components/soda:buildflags", "//components/soda:constants", "//sandbox/linux:sandbox_services", ]
diff --git a/content/utility/speech/speech_recognition_sandbox_hook_linux.cc b/content/utility/speech/speech_recognition_sandbox_hook_linux.cc index 25dd004..c7440d4 100644 --- a/content/utility/speech/speech_recognition_sandbox_hook_linux.cc +++ b/content/utility/speech/speech_recognition_sandbox_hook_linux.cc
@@ -6,6 +6,7 @@ #include <dlfcn.h> +#include "components/soda/buildflags.h" #include "components/soda/constants.h" #include "sandbox/linux/syscall_broker/broker_command.h" #include "sandbox/linux/syscall_broker/broker_file_permission.h" @@ -36,6 +37,14 @@ language_packs_dir.AsEndingWithSeparator().value())); } +#if BUILDFLAG(ENABLE_SODA) + auto test_resources_dir = GetSodaTestResourcesDirectory(); + if (!test_resources_dir.empty()) { + permissions.push_back(BrokerFilePermission::ReadOnlyRecursive( + test_resources_dir.AsEndingWithSeparator().value())); + } +#endif + return permissions; } @@ -43,6 +52,12 @@ bool SpeechRecognitionPreSandboxHook( sandbox::policy::SandboxLinux::Options options) { +#if BUILDFLAG(ENABLE_SODA) + void* soda_test_library = dlopen(GetSodaTestBinaryPath().value().c_str(), + RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); + DCHECK(soda_test_library); +#endif + void* soda_library = dlopen(GetSodaBinaryPath().value().c_str(), RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE); DCHECK(soda_library);
diff --git a/docs/testing/chromeos_debugging_tips.md b/docs/testing/chromeos_debugging_tips.md index b067bed..14ff123 100644 --- a/docs/testing/chromeos_debugging_tips.md +++ b/docs/testing/chromeos_debugging_tips.md
@@ -18,22 +18,22 @@ of these integration tests on Chrome's waterfalls. If you find one of these tests failing (likely in the `chrome_all_tast_tests` step), you can: -- **Inspect the failed test's log snippet**: There should be a log link for -each failed test with failure information. eg: For this [failed build], opening -the [ui.WindowControl] log link contains stack traces and error messages. +- **Inspect the failed test's log snippet**: There should be a log snippet for +each failed test in the `Test Results` tab in the build UI. eg: For this +[failed build], clicking on the `policy.IncognitoModeAvailability` expands to +include stack traces and error messages. - **View browser & system logs**: A common cause of failure on Chrome's builders are browser crashes. When this happens, each test's log snippets will simply contain warnings like "[Chrome probably crashed]". To debug these crashes, -navigate to the test's Isolated output, listed in the build under the test -step's [shard #0 isolated out] link. There you'll find expanded logs for every -test. For example, the [tests/ui.WindowControl/messages] log has more info -than its earlier snippet. Additionally, you can find system logs under -the `system_logs/` prefix. To find a system log for a particular test, match +expand the list of attached artifacts for the test by clicking the `Artifacts` +link under the failed test in the `Test Results` tab. There you'll find an +extended log for the test under `log.txt`. Additionally, you can find system +logs included in that list. To find a system log for a particular test, match the timestamps printed in the test's log with the timestamps present in the -system log filename. For instance, the previous `ui.WindowControl` failure -matches the [system_logs/chrome/chrome_20201029-195153] browser log, which -contains the culprit Chrome crash and backtrace. +system log filename. For instance, the previous `example.ChromeFixture` failure +matches the [chrome/chrome_20210920-051805] browser log, which contains the +culprit Chrome crash and backtrace. - **Symbolizing a browser crash dump**: See [below](#symbolizing-a-crash-dump). @@ -121,12 +121,9 @@ [linux-chromeos]: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/chromeos_build_instructions.md [Tast]: https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/README.md -[failed build]: https://ci.chromium.org/p/chromium/builders/ci/chromeos-kevin-rel/29791 -[ui.WindowControl]: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8865053459542681936/+/steps/chrome_all_tast_tests_on_ChromeOS/0/logs/Deterministic_failure:_ui.WindowControl__status_FAILURE_/0 -[Chrome probably crashed]: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8905974915785988832/+/steps/chrome_all_tast_tests__retry_shards_with_patch__on_ChromeOS/0/logs/Deterministic_failure:_ui.ChromeLogin__status_FAILURE_/0 -[shard #0 isolated out]: https://isolateserver.appspot.com/browse?namespace=default-gzip&hash=3d35c273195f640c69b1cf0d15d19d9868e3f593 -[tests/ui.WindowControl/messages]: https://isolateserver.appspot.com/browse?namespace=default-gzip&digest=baefbcfd24c02b3ada4617d259dc6b4220b413b9&as=messages -[system_logs/chrome/chrome_20201029-195153]: https://isolateserver.appspot.com/browse?namespace=default-gzip&digest=272166c85f190c336a9885f0267cbdea912e31da&as=chrome_20201029-195153 +[failed build]: https://ci.chromium.org/ui/p/chromium/builders/ci/chromeos-kevin-rel/37300/test-results +[Chrome probably crashed]: https://luci-milo.appspot.com/ui/inv/build-8835572137562508161/test-results?q=example.ChromeFixture +[chrome/chrome_20210920-051805]: https://luci-milo.appspot.com/ui/artifact/raw/invocations/task-chromium-swarm.appspot.com-561bed66572a9411/artifacts/chrome%2Fchrome_20210920-051805 [attribute]: https://chromium.googlesource.com/chromiumos/platform/tast/+/HEAD/docs/test_attributes.md [this list]: https://codesearch.chromium.org/chromium/src/chromeos/tast_control.gni [Chrome uprev]: https://chromium.googlesource.com/chromiumos/docs/+/HEAD/chrome_commit_pipeline.md#the-chrome-os-commit-pipeline-for-chrome-changes
diff --git a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc index 588a35e0..8aff607 100644 --- a/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc +++ b/extensions/browser/api/bluetooth_socket/bluetooth_socket_api_unittest.cc
@@ -34,7 +34,8 @@ // Tests bluetoothSocket.create() and bluetoothSocket.close(). // Regression test for https://crbug.com/831651. -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. +// TODO(https://crbug.com/1251347): Port //device/bluetooth to Fuchsia to enable +// bluetooth extensions. #if defined(OS_FUCHSIA) #define MAYBE_CreateThenClose DISABLED_CreateThenClose #else
diff --git a/extensions/browser/api/web_request/web_request_proxying_webtransport.cc b/extensions/browser/api/web_request/web_request_proxying_webtransport.cc index 1124711..97d1bd7 100644 --- a/extensions/browser/api/web_request/web_request_proxying_webtransport.cc +++ b/extensions/browser/api/web_request/web_request_proxying_webtransport.cc
@@ -194,9 +194,7 @@ int error_code = net::ERR_ABORTED; if (error.has_value()) { - int webtransport_error_code = error.value().net_error; - if (webtransport_error_code != net::OK) - error_code = webtransport_error_code; + error_code = error->net_error; } OnError(error_code); // `this` is deleted.
diff --git a/extensions/common/api/_permission_features.json b/extensions/common/api/_permission_features.json index 6b1d8974..8e22d93 100644 --- a/extensions/common/api/_permission_features.json +++ b/extensions/common/api/_permission_features.json
@@ -194,7 +194,7 @@ "extension_types": ["extension"] }, "declarativeNetRequestWithHostAccess": { - "channel": "trunk", + "channel": "stable", "extension_types": ["extension"] }, "declarativeNetRequestFeedback": {
diff --git a/extensions/common/features/feature.cc b/extensions/common/features/feature.cc index 6c3795d4..56b627b6 100644 --- a/extensions/common/features/feature.cc +++ b/extensions/common/features/feature.cc
@@ -32,6 +32,8 @@ return MACOSX_PLATFORM; #elif defined(OS_WIN) return WIN_PLATFORM; +#elif defined(OS_FUCHSIA) + return FUCHSIA_PLATFORM; #else return UNSPECIFIED_PLATFORM; #endif
diff --git a/extensions/common/features/feature.h b/extensions/common/features/feature.h index 0aeb612..4b3a48f 100644 --- a/extensions/common/features/feature.h +++ b/extensions/common/features/feature.h
@@ -49,7 +49,8 @@ LACROS_PLATFORM, LINUX_PLATFORM, MACOSX_PLATFORM, - WIN_PLATFORM + WIN_PLATFORM, + FUCHSIA_PLATFORM, }; // Whether a feature is available in a given situation or not, and if not,
diff --git a/extensions/common/features/feature_provider_unittest.cc b/extensions/common/features/feature_provider_unittest.cc index 9110b61..20995e3 100644 --- a/extensions/common/features/feature_provider_unittest.cc +++ b/extensions/common/features/feature_provider_unittest.cc
@@ -97,14 +97,7 @@ } // Tests that real permission features have the correct availability for an app. -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. -#if defined(OS_FUCHSIA) -#define MAYBE_PermissionFeatureAvailability \ - DISABLED_PermissionFeatureAvailability -#else -#define MAYBE_PermissionFeatureAvailability PermissionFeatureAvailability -#endif -TEST(FeatureProviderTest, MAYBE_PermissionFeatureAvailability) { +TEST(FeatureProviderTest, PermissionFeatureAvailability) { const FeatureProvider* provider = FeatureProvider::GetByName("permission"); scoped_refptr<const Extension> app = @@ -123,6 +116,9 @@ // A permission only available to whitelisted extensions returns availability // NOT_FOUND_IN_WHITELIST. + // TODO(https://crbug.com/1251347): Port //device/bluetooth to Fuchsia to + // enable bluetooth extensions. +#if !defined(OS_FUCHSIA) feature = provider->GetFeature("bluetoothPrivate"); ASSERT_TRUE(feature); EXPECT_EQ(Feature::NOT_FOUND_IN_WHITELIST, @@ -130,6 +126,7 @@ ->IsAvailableToContext(app.get(), Feature::UNSPECIFIED_CONTEXT, GURL()) .result()); +#endif // !defined(OS_FUCHSIA) // A permission that isn't part of the manifest returns NOT_PRESENT. feature = provider->GetFeature("serial");
diff --git a/extensions/common/manifest_constants.cc b/extensions/common/manifest_constants.cc index 6433dba4..199be32 100644 --- a/extensions/common/manifest_constants.cc +++ b/extensions/common/manifest_constants.cc
@@ -267,13 +267,10 @@ "The chrome_style option cannot be used with manifest version 3."; const char kChromeVersionTooLow[] = "This extension requires * version * or greater."; - -// TODO(crbug.com/1034407): Include the declarativeNetRequestWithHostAccess -// permission here once it lands on Stable. const char kDeclarativeNetRequestPermissionNeeded[] = - "The extension requires the 'declarativeNetRequest' permission for the '*' " - "manifest key."; - + "The extension requires the 'declarativeNetRequest' or the " + "'declarativeNetRequestWithHostAccess' permission for the '*' manifest " + "key."; const char kDefaultStateShouldNotBeSet[] = "The default_state key cannot be set for browser_action or page_action " "keys.";
diff --git a/extensions/renderer/bindings/api_binding_unittest.cc b/extensions/renderer/bindings/api_binding_unittest.cc index 101f6b3..94032c2 100644 --- a/extensions/renderer/bindings/api_binding_unittest.cc +++ b/extensions/renderer/bindings/api_binding_unittest.cc
@@ -685,13 +685,7 @@ EXPECT_FALSE(has_nonexistent_event.FromJust()); } -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. -#if defined(OS_FUCHSIA) -#define MAYBE_TestProperties DISABLED_TestProperties -#else -#define MAYBE_TestProperties TestProperties -#endif -TEST_F(APIBindingUnittest, MAYBE_TestProperties) { +TEST_F(APIBindingUnittest, TestProperties) { SetProperties( "{" " 'prop1': { 'value': 17, 'type': 'integer' }," @@ -715,7 +709,7 @@ " 'notLinuxOrLacros': {" " 'value': 'nonlinux'," " 'type': 'string'," - " 'platforms': ['win', 'mac', 'chromeos']" + " 'platforms': ['win', 'mac', 'chromeos', 'fuchsia']" " }" "}"); InitializeBinding();
diff --git a/extensions/renderer/bindings/api_binding_util.cc b/extensions/renderer/bindings/api_binding_util.cc index 537f3bb..8fd2b76 100644 --- a/extensions/renderer/bindings/api_binding_util.cc +++ b/extensions/renderer/bindings/api_binding_util.cc
@@ -136,6 +136,8 @@ return "mac"; #elif defined(OS_WIN) return "win"; +#elif defined(OS_FUCHSIA) + return "fuchsia"; #else NOTREACHED(); return std::string();
diff --git a/extensions/renderer/native_extension_bindings_system_unittest.cc b/extensions/renderer/native_extension_bindings_system_unittest.cc index bbe7d7b..e53f3d1 100644 --- a/extensions/renderer/native_extension_bindings_system_unittest.cc +++ b/extensions/renderer/native_extension_bindings_system_unittest.cc
@@ -926,7 +926,8 @@ // Tests that a context having access to an aliased API (like networking.onc) // does not allow for accessing the source API (networkingPrivate) directly. -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. +// TODO(https://crbug.com/1251349): Port //components/wifi to Fuchsia to enable +// networking and networkingPrivate extensions. #if defined(OS_FUCHSIA) #define MAYBE_AccessToAliasSourceDoesntGiveAliasAccess \ DISABLED_AccessToAliasSourceDoesntGiveAliasAccess @@ -966,7 +967,8 @@ // Tests that a context having access to the source for an aliased API does not // allow for accessing the alias. -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. +// TODO(https://crbug.com/1251349): Port //components/wifi to Fuchsia to enable +// networking and networkingPrivate extensions. #if defined(OS_FUCHSIA) #define MAYBE_AccessToAliasDoesntGiveAliasSourceAccess \ DISABLED_AccessToAliasDoesntGiveAliasSourceAccess @@ -1005,7 +1007,8 @@ // Test that if an extension has access to both an alias and an alias source, // the objects on the API are different. -// TODO(https://crbug.com/1243780): Define a platform for extensions on Fuchsia. +// TODO(https://crbug.com/1251349): Port //components/wifi to Fuchsia to enable +// networking and networkingPrivate extensions. #if defined(OS_FUCHSIA) #define MAYBE_AliasedAPIsAreDifferentObjects \ DISABLED_AliasedAPIsAreDifferentObjects
diff --git a/fuchsia/cipd/BUILD.gn b/fuchsia/cipd/BUILD.gn index 23f23b3d..f198c42 100644 --- a/fuchsia/cipd/BUILD.gn +++ b/fuchsia/cipd/BUILD.gn
@@ -12,6 +12,8 @@ import("//third_party/fuchsia-sdk/sdk/build/build_id_dir.gni") import("//third_party/fuchsia-sdk/sdk/build/cipd.gni") +visibility = [ ":*" ] + # gn binary location. if (host_os == "mac") { _gn_path = "//buildtools/mac/gn" @@ -192,8 +194,6 @@ rebase_path(_stripped_chromedriver_file, root_build_dir), rebase_path(prog_name, root_build_dir), ] - - visibility = [ ":*" ] } cipd_archive("chromedriver") { @@ -206,9 +206,13 @@ sources = [ _stripped_chromedriver_file ] } -group("test_packages_for_deps") { +cipd_archive("tests") { + _manifest_path = "${target_gen_dir}/test_manifest.json" + package_basename = "tests" + description = "Prebuilt Chromium tests for Fuchsia." testonly = true - public_deps = [ + + deps = [ "//base:base_unittests_pkg", "//fuchsia/engine:web_engine_integration_tests_pkg", "//fuchsia/runners:cast_runner_integration_tests_pkg", @@ -219,15 +223,6 @@ "//skia:skia_unittests_pkg", "//third_party/blink/common:blink_common_unittests_pkg", ] -} - -cipd_archive("tests") { - _manifest_path = "${target_gen_dir}/test_manifest.json" - package_basename = "tests" - description = "Prebuilt Chromium tests for Fuchsia." - testonly = true - - deps = [ ":test_packages_for_deps" ] far_sources = [ "${root_gen_dir}/base/base_unittests/base_unittests.far", @@ -266,15 +261,9 @@ "${target_gen_dir}/${_debug_symbols_archive_name}/${_build_ids_target}" build_id_dir(_build_ids_target) { - testonly = true + testonly = true # Some of the archives contain test packages. output_path = _debug_symbols_outdir - deps = [ - ":test_packages_for_deps", - "//fuchsia/engine:web_engine", - "//fuchsia/engine:web_engine_shell_pkg", - "//fuchsia/runners:cast_runner_pkg", - "//fuchsia/runners:web_runner_pkg", - ] + deps = [ ":archives_with_symbols" ] } fuchsia_cipd_package(_debug_symbols_archive_name) { @@ -291,27 +280,44 @@ } cipd_archive("clear_key_cdm") { + testonly = true package_basename = "libclearkeycdm" description = "Prebuilt libclearkeycdm.so binary for Fuchsia." - testonly = true - deps = [ "//media/cdm/library_cdm/clear_key_cdm:clear_key_cdm" ] sources = [ "${root_out_dir}/lib/libclearkeycdm.so" ] } -group("cipd") { - # Must be testonly because debug symbols depends on test package symbols. - testonly = true +# A group for production archives to ensure nothing is testonly. +group("production_archives") { deps = [ ":castrunner", + ":webrunner", + ] +} + +# Used by both the main group as well as :debug_symbols. +group("archives_with_symbols") { + testonly = true # tests and web_engine_shell are testonly. + deps = [ + ":production_archives", + ":tests", + ":web_engine_shell", + ] +} + +group("cipd") { + testonly = true # Some archives are testonly. + deps = [ + ":archives_with_symbols", + + # Symbols are not uploaded for the following. ":chromedriver", ":clear_key_cdm", ":debug_symbols", ":http", - ":tests", - ":web_engine_shell", - ":webrunner", ] + visibility = [] # Required to replace the file default. + visibility = [ "//fuchsia:gn_all" ] }
diff --git a/fuchsia/runners/cast/cast_component.h b/fuchsia/runners/cast/cast_component.h index 350ed4d..ed34c5dd 100644 --- a/fuchsia/runners/cast/cast_component.h +++ b/fuchsia/runners/cast/cast_component.h
@@ -10,12 +10,14 @@ #include <fuchsia/media/cpp/fidl.h> #include <fuchsia/web/cpp/fidl.h> #include <lib/fidl/cpp/binding.h> + #include <memory> #include <string> #include <utility> #include <vector> #include "base/fuchsia/startup_context.h" +#include "base/gtest_prod_util.h" #include "base/message_loop/message_pump_for_io.h" #include "base/message_loop/message_pump_fuchsia.h" #include "fuchsia/fidl/chromium/cast/cpp/fidl.h"
diff --git a/gpu/command_buffer/service/wrapped_sk_image.cc b/gpu/command_buffer/service/wrapped_sk_image.cc index e3b4ced..a709dbb 100644 --- a/gpu/command_buffer/service/wrapped_sk_image.cc +++ b/gpu/command_buffer/service/wrapped_sk_image.cc
@@ -59,6 +59,44 @@ kOpaque_SkAlphaType); } +uint64_t BackendTextureTracingID(const GrBackendTexture& backend_texture) { + switch (backend_texture.backend()) { + case GrBackendApi::kOpenGL: { + GrGLTextureInfo tex_info; + if (backend_texture.getGLTextureInfo(&tex_info)) + return tex_info.fID; + break; + } +#if defined(OS_MAC) + case GrBackendApi::kMetal: { + GrMtlTextureInfo image_info; + if (backend_texture.getMtlTextureInfo(&image_info)) + return reinterpret_cast<uint64_t>(image_info.fTexture.get()); + break; + } +#endif +#if BUILDFLAG(ENABLE_VULKAN) + case GrBackendApi::kVulkan: { + GrVkImageInfo image_info; + if (backend_texture.getVkImageInfo(&image_info)) + return reinterpret_cast<uint64_t>(image_info.fImage); + break; + } +#endif +#if BUILDFLAG(SKIA_USE_DAWN) + case GrBackendApi::kDawn: { + GrDawnTextureInfo tex_info; + if (backend_texture.getDawnTextureInfo(&tex_info)) + return reinterpret_cast<uint64_t>(tex_info.fTexture.Get()); + break; + } +#endif + default: + break; + } + return 0; +} + class WrappedSkImage : public ClearTrackingSharedImageBacking { public: ~WrappedSkImage() override { @@ -265,42 +303,7 @@ } promise_texture_ = SkPromiseImageTexture::Make(backend_texture_); - - switch (backend_texture_.backend()) { - case GrBackendApi::kOpenGL: { - GrGLTextureInfo tex_info; - if (backend_texture_.getGLTextureInfo(&tex_info)) - tracing_id_ = tex_info.fID; - break; - } -#if defined(OS_MAC) - case GrBackendApi::kMetal: { - GrMtlTextureInfo image_info; - if (backend_texture_.getMtlTextureInfo(&image_info)) - tracing_id_ = reinterpret_cast<uint64_t>(image_info.fTexture.get()); - break; - } -#endif -#if BUILDFLAG(ENABLE_VULKAN) - case GrBackendApi::kVulkan: { - GrVkImageInfo image_info; - if (backend_texture_.getVkImageInfo(&image_info)) - tracing_id_ = reinterpret_cast<uint64_t>(image_info.fImage); - break; - } -#endif -#if BUILDFLAG(SKIA_USE_DAWN) - case GrBackendApi::kDawn: { - GrDawnTextureInfo tex_info; - if (backend_texture_.getDawnTextureInfo(&tex_info)) - tracing_id_ = reinterpret_cast<uint64_t>(tex_info.fTexture.Get()); - break; - } -#endif - default: - NOTREACHED(); - return false; - } + tracing_id_ = BackendTextureTracingID(backend_texture_); return true; }
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index a53658ee..1c40532 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -77,7 +77,7 @@ service_account: "chromium-cipd-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -169,7 +169,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -261,7 +261,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -353,7 +353,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -445,7 +445,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -537,7 +537,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -629,7 +629,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -721,7 +721,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -813,7 +813,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -909,7 +909,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1007,7 +1007,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1103,7 +1103,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1199,7 +1199,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1295,7 +1295,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1391,7 +1391,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1487,7 +1487,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1583,7 +1583,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1679,7 +1679,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1775,7 +1775,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1871,7 +1871,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -1967,7 +1967,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2062,7 +2062,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2158,7 +2158,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2254,7 +2254,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2350,7 +2350,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2446,7 +2446,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2542,7 +2542,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2634,7 +2634,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2730,7 +2730,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -2826,7 +2826,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_isolate" @@ -2928,7 +2928,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3024,7 +3024,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3120,7 +3120,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3216,7 +3216,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3306,7 +3306,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3402,7 +3402,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3498,7 +3498,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3594,7 +3594,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3690,7 +3690,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3786,7 +3786,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3882,7 +3882,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -3978,7 +3978,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4070,7 +4070,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4170,7 +4170,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4260,7 +4260,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4350,7 +4350,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4442,7 +4442,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4534,7 +4534,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4620,7 +4620,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4706,7 +4706,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4792,7 +4792,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4878,7 +4878,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -4967,7 +4967,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5056,7 +5056,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5142,7 +5142,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5228,7 +5228,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5314,7 +5314,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5400,7 +5400,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5486,7 +5486,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5572,7 +5572,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5664,7 +5664,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5756,7 +5756,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5848,7 +5848,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -5934,7 +5934,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6020,7 +6020,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6106,7 +6106,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6192,7 +6192,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6284,7 +6284,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6376,7 +6376,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6462,7 +6462,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6548,7 +6548,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6634,7 +6634,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6720,7 +6720,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6816,7 +6816,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -6912,7 +6912,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7007,7 +7007,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7103,7 +7103,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7199,7 +7199,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7295,7 +7295,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7391,7 +7391,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7487,7 +7487,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7583,7 +7583,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7679,7 +7679,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7775,7 +7775,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7868,7 +7868,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -7961,7 +7961,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8057,7 +8057,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8153,7 +8153,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8249,7 +8249,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8345,7 +8345,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8441,7 +8441,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8537,7 +8537,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8632,7 +8632,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8727,7 +8727,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8819,7 +8819,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -8911,7 +8911,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9006,7 +9006,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9101,7 +9101,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9191,7 +9191,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9281,7 +9281,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9377,7 +9377,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9469,7 +9469,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9561,7 +9561,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9653,7 +9653,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9745,7 +9745,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9836,7 +9836,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -9928,7 +9928,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10020,7 +10020,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10112,7 +10112,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10204,7 +10204,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10296,7 +10296,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10388,7 +10388,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10478,7 +10478,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10569,7 +10569,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10665,7 +10665,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10761,7 +10761,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10857,7 +10857,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -10953,7 +10953,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11046,7 +11046,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11138,7 +11138,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11234,7 +11234,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11330,7 +11330,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11422,7 +11422,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11514,7 +11514,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11609,7 +11609,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11704,7 +11704,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11800,7 +11800,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11896,7 +11896,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -11992,7 +11992,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12087,7 +12087,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12183,7 +12183,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12279,7 +12279,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12368,7 +12368,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12458,7 +12458,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12548,7 +12548,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12638,7 +12638,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12734,7 +12734,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12824,7 +12824,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -12914,7 +12914,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13004,7 +13004,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13094,7 +13094,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13190,7 +13190,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13280,7 +13280,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13370,7 +13370,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13460,7 +13460,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13550,7 +13550,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13646,7 +13646,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13742,7 +13742,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13838,7 +13838,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -13934,7 +13934,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14030,7 +14030,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14119,7 +14119,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14215,7 +14215,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14307,7 +14307,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14401,7 +14401,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14497,7 +14497,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14593,7 +14593,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14689,7 +14689,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14785,7 +14785,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14874,7 +14874,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -14970,7 +14970,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15062,7 +15062,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15158,7 +15158,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15254,7 +15254,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15346,7 +15346,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15438,7 +15438,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15528,7 +15528,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15618,7 +15618,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15711,7 +15711,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15805,7 +15805,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15897,7 +15897,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -15989,7 +15989,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16078,7 +16078,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16167,7 +16167,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16256,7 +16256,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16346,7 +16346,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16436,7 +16436,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16526,7 +16526,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16616,7 +16616,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16709,7 +16709,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16799,7 +16799,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16889,7 +16889,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -16979,7 +16979,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17069,7 +17069,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17159,7 +17159,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17249,7 +17249,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17342,7 +17342,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17432,7 +17432,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17521,7 +17521,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17610,7 +17610,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17699,7 +17699,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17788,7 +17788,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17877,7 +17877,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -17966,7 +17966,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18055,7 +18055,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18144,7 +18144,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18233,7 +18233,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18322,7 +18322,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18411,7 +18411,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18500,7 +18500,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18596,7 +18596,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18692,7 +18692,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18784,7 +18784,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18876,7 +18876,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -18968,7 +18968,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19059,7 +19059,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19155,7 +19155,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19251,7 +19251,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19347,7 +19347,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19439,7 +19439,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19531,7 +19531,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19626,7 +19626,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19718,7 +19718,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19812,7 +19812,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -19907,7 +19907,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20001,7 +20001,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20095,7 +20095,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20190,7 +20190,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20284,7 +20284,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20374,7 +20374,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20464,7 +20464,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20554,7 +20554,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20644,7 +20644,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20734,7 +20734,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20824,7 +20824,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -20914,7 +20914,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21004,7 +21004,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21094,7 +21094,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21184,7 +21184,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21274,7 +21274,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21364,7 +21364,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21454,7 +21454,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21543,7 +21543,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21633,7 +21633,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21723,7 +21723,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21813,7 +21813,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21903,7 +21903,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -21993,7 +21993,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22084,7 +22084,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22175,7 +22175,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22266,7 +22266,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22357,7 +22357,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22447,7 +22447,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22536,7 +22536,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22626,7 +22626,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22716,7 +22716,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22806,7 +22806,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22896,7 +22896,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -22986,7 +22986,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23075,7 +23075,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23165,7 +23165,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23255,7 +23255,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23345,7 +23345,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23439,7 +23439,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23533,7 +23533,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23625,7 +23625,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23717,7 +23717,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23809,7 +23809,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23901,7 +23901,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -23993,7 +23993,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24089,7 +24089,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24185,7 +24185,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24281,7 +24281,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24375,7 +24375,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24466,7 +24466,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24561,7 +24561,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24652,7 +24652,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24743,7 +24743,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24837,7 +24837,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -24931,7 +24931,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25025,7 +25025,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25120,7 +25120,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25211,7 +25211,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25304,7 +25304,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25394,7 +25394,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25484,7 +25484,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25574,7 +25574,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25664,7 +25664,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25754,7 +25754,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25844,7 +25844,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -25934,7 +25934,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26024,7 +26024,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26114,7 +26114,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26204,7 +26204,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26300,7 +26300,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26390,7 +26390,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26484,7 +26484,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26578,7 +26578,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26663,7 +26663,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26752,7 +26752,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26841,7 +26841,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -26930,7 +26930,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27020,7 +27020,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27110,7 +27110,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27200,7 +27200,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27295,7 +27295,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27390,7 +27390,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27485,7 +27485,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27581,7 +27581,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27673,7 +27673,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27769,7 +27769,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27861,7 +27861,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -27950,7 +27950,7 @@ service_account: "chromium-cipd-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28043,7 +28043,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28130,7 +28130,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28223,7 +28223,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28310,7 +28310,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28405,7 +28405,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28500,7 +28500,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28596,7 +28596,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28693,7 +28693,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28791,7 +28791,7 @@ service_account: "chromium-cipd-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28883,7 +28883,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -28975,7 +28975,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29071,7 +29071,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29167,7 +29167,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29266,7 +29266,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29365,7 +29365,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29461,7 +29461,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29557,7 +29557,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29653,7 +29653,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29749,7 +29749,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29845,7 +29845,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -29941,7 +29941,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30037,7 +30037,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30133,7 +30133,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30225,7 +30225,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30321,7 +30321,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30417,7 +30417,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30513,7 +30513,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30609,7 +30609,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30705,7 +30705,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30801,7 +30801,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30897,7 +30897,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -30993,7 +30993,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31089,7 +31089,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31183,7 +31183,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31279,7 +31279,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31375,7 +31375,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31471,7 +31471,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31563,7 +31563,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31656,7 +31656,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31752,7 +31752,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -31936,7 +31936,7 @@ service_account: "chromium-cipd-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32028,7 +32028,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32120,7 +32120,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32216,7 +32216,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32312,7 +32312,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32408,7 +32408,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32500,7 +32500,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32592,7 +32592,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32684,7 +32684,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32780,7 +32780,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32876,7 +32876,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -32968,7 +32968,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33060,7 +33060,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33152,7 +33152,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33247,7 +33247,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33342,7 +33342,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33437,7 +33437,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33532,7 +33532,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33627,7 +33627,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33719,7 +33719,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33814,7 +33814,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -33909,7 +33909,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34001,7 +34001,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34096,7 +34096,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34191,7 +34191,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34286,7 +34286,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34379,7 +34379,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34475,7 +34475,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34570,7 +34570,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34662,7 +34662,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34754,7 +34754,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34846,7 +34846,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -34938,7 +34938,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35030,7 +35030,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35124,7 +35124,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35220,7 +35220,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35316,7 +35316,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35411,7 +35411,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35498,7 +35498,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35592,7 +35592,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35690,7 +35690,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35788,7 +35788,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35891,7 +35891,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -35985,7 +35985,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36083,7 +36083,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36177,7 +36177,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36275,7 +36275,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36369,7 +36369,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36463,7 +36463,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36557,7 +36557,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36651,7 +36651,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36745,7 +36745,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36839,7 +36839,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -36959,7 +36959,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37054,7 +37054,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37146,7 +37146,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37240,7 +37240,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37332,7 +37332,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37427,7 +37427,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37520,7 +37520,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37613,7 +37613,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37700,7 +37700,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37787,7 +37787,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37874,7 +37874,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -37961,7 +37961,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38053,7 +38053,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38148,7 +38148,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38243,7 +38243,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38366,7 +38366,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38474,7 +38474,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38566,7 +38566,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38662,7 +38662,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38758,7 +38758,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38850,7 +38850,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -38942,7 +38942,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39034,7 +39034,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39126,7 +39126,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39215,7 +39215,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39304,7 +39304,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39399,7 +39399,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39498,7 +39498,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39593,7 +39593,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39688,7 +39688,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39783,7 +39783,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -39967,7 +39967,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40066,7 +40066,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40158,7 +40158,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40257,7 +40257,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40353,7 +40353,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40445,7 +40445,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40534,7 +40534,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40626,7 +40626,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40721,7 +40721,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40813,7 +40813,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -40907,7 +40907,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41006,7 +41006,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41101,7 +41101,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41193,7 +41193,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41285,7 +41285,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41377,7 +41377,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41472,7 +41472,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41564,7 +41564,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41658,7 +41658,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41754,7 +41754,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41846,7 +41846,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -41941,7 +41941,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42036,7 +42036,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42131,7 +42131,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42226,7 +42226,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42322,7 +42322,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42418,7 +42418,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42510,7 +42510,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42600,7 +42600,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42693,7 +42693,7 @@ experimental: YES experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42786,7 +42786,7 @@ experimental: YES experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42879,7 +42879,7 @@ experimental: YES experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -42975,7 +42975,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43062,7 +43062,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43152,7 +43152,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43239,7 +43239,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43332,7 +43332,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43425,7 +43425,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43518,7 +43518,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43611,7 +43611,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43700,7 +43700,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43792,7 +43792,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43884,7 +43884,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -43976,7 +43976,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44074,7 +44074,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44164,7 +44164,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44254,7 +44254,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44346,7 +44346,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44438,7 +44438,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44528,7 +44528,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44618,7 +44618,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44710,7 +44710,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44799,7 +44799,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44888,7 +44888,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -44978,7 +44978,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45070,7 +45070,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45162,7 +45162,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45254,7 +45254,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45346,7 +45346,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45438,7 +45438,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45530,7 +45530,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45622,7 +45622,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45714,7 +45714,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45806,7 +45806,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45898,7 +45898,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -45987,7 +45987,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46079,7 +46079,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46171,7 +46171,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46267,7 +46267,7 @@ service_account: "component-mapping-updater@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46351,7 +46351,7 @@ service_account: "chromium-cipd-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46444,7 +46444,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46537,7 +46537,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46630,7 +46630,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46723,7 +46723,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46815,7 +46815,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -46909,7 +46909,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47003,7 +47003,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47099,7 +47099,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47191,7 +47191,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47283,7 +47283,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47372,7 +47372,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47461,7 +47461,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47556,7 +47556,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47651,7 +47651,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47745,7 +47745,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47836,7 +47836,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -47928,7 +47928,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48023,7 +48023,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48118,7 +48118,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48213,7 +48213,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48308,7 +48308,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48403,7 +48403,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48498,7 +48498,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48593,7 +48593,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48685,7 +48685,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48777,7 +48777,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48869,7 +48869,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -48956,7 +48956,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49043,7 +49043,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49130,7 +49130,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49217,7 +49217,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49316,7 +49316,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49408,7 +49408,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49500,7 +49500,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49592,7 +49592,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49686,7 +49686,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49780,7 +49780,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49872,7 +49872,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -49966,7 +49966,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50058,7 +50058,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50150,7 +50150,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50242,7 +50242,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50334,7 +50334,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50421,7 +50421,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50508,7 +50508,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50595,7 +50595,7 @@ service_account: "chromium-ci-gpu-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50687,7 +50687,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -50779,7 +50779,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -54353,7 +54353,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas" @@ -54444,7 +54444,7 @@ service_account: "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" experiments { key: "chromium.chromium_tests.use_gitiles_trigger" - value: 10 + value: 50 } experiments { key: "chromium.chromium_tests.use_rbe_cas"
diff --git a/infra/config/lib/ci.star b/infra/config/lib/ci.star index 350ff4d3..69ae57ed 100644 --- a/infra/config/lib/ci.star +++ b/infra/config/lib/ci.star
@@ -115,7 +115,7 @@ experiments = dict(experiments or {}) # TODO(crbug.com/1249938) Promote out of experiment for all builders - experiments.setdefault("chromium.chromium_tests.use_gitiles_trigger", 10) + experiments.setdefault("chromium.chromium_tests.use_gitiles_trigger", 50) # TODO(crbug.com/1135718): Promote out of experiment for all builders. experiments.setdefault("chromium.chromium_tests.use_rdb_results", 100)
diff --git a/infra/config/subprojects/goma/OWNERS b/infra/config/subprojects/goma/OWNERS index d35e35f..f9b879b 100644 --- a/infra/config/subprojects/goma/OWNERS +++ b/infra/config/subprojects/goma/OWNERS
@@ -1,6 +1,7 @@ +jojwang@chromium.org +jojwang@google.com +jwata@google.com tikuta@chromium.org tikuta@google.com ukai@chromium.org ukai@google.com -yyanagisawa@chromium.org -yyanagisawa@google.com
diff --git a/ios/chrome/browser/commerce/OWNERS b/ios/chrome/browser/commerce/OWNERS index d0ed117..46d14df 100644 --- a/ios/chrome/browser/commerce/OWNERS +++ b/ios/chrome/browser/commerce/OWNERS
@@ -1 +1,2 @@ file://chrome/browser/persisted_state_db/OWNERS +xingliu@chromium.org
diff --git a/ios/chrome/browser/ui/commerce/OWNERS b/ios/chrome/browser/ui/commerce/OWNERS index d0ed117..46d14df 100644 --- a/ios/chrome/browser/ui/commerce/OWNERS +++ b/ios/chrome/browser/ui/commerce/OWNERS
@@ -1 +1,2 @@ file://chrome/browser/persisted_state_db/OWNERS +xingliu@chromium.org
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h index b5175e4..75f6d3a 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.h
@@ -16,7 +16,6 @@ @class DiscoverFeedMetricsRecorder; @protocol NewTabPageCommands; @protocol NewTabPageControllerDelegate; -@protocol NewTabPageFeedDelegate; @class NTPHomeMediator; @protocol ThumbStripSupporting; @class ViewRevealingVerticalPanHandler; @@ -55,12 +54,12 @@ // Command handler for NTP related commands. @property(nonatomic, weak) id<NewTabPageCommands> ntpCommandHandler; -// Delegate for providing information relating to the feed. -@property(nonatomic, weak) id<NewTabPageFeedDelegate> ntpFeedDelegate; - // Bubble presenter for displaying IPH bubbles relating to the NTP. @property(nonatomic, strong) BubblePresenter* bubblePresenter; +// Whether the feed is enabled and visible. +@property(nonatomic, assign, getter=isFeedVisible) BOOL feedVisible; + // Metrics recorder for the Discover feed events related to ContentSuggestions. @property(nonatomic, strong) DiscoverFeedMetricsRecorder* discoverFeedMetricsRecorder;
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm index 4bfabcd9..cd10ff7 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_coordinator.mm
@@ -66,7 +66,6 @@ #import "ios/chrome/browser/ui/ntp/new_tab_page_commands.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_constants.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h" -#import "ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h" #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h" #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h" @@ -268,11 +267,9 @@ } self.suggestionsViewController = [[ContentSuggestionsViewController alloc] - initWithStyle:CollectionViewControllerStyleDefault - offset:offset - feedVisible:[self isFeedVisible] - refactoredFeedVisible:[self.ntpFeedDelegate - isNTPRefactoredAndFeedVisible]]; + initWithStyle:CollectionViewControllerStyleDefault + offset:offset + feedVisible:[self isFeedVisible]]; [self.suggestionsViewController setDataSource:self.contentSuggestionsMediator]; self.suggestionsViewController.suggestionCommandHandler = self.ntpMediator; @@ -324,24 +321,8 @@ // synchronizer instead. self.suggestionsViewController.headerProvider = self.headerController; - if ([self.ntpFeedDelegate isNTPRefactoredAndFeedVisible]) { - self.suggestionsViewController.collectionView.accessibilityIdentifier = - kContentSuggestionsCollectionIdentifier; - } else { - self.suggestionsViewController.collectionView.accessibilityIdentifier = - kNTPCollectionViewIdentifier; - } - - if (![self.ntpFeedDelegate isNTPRefactoredAndFeedVisible]) { - self.headerCollectionInteractionHandler = - [[ContentSuggestionsHeaderSynchronizer alloc] - initWithCollectionController:self.suggestionsViewController - headerController:self.headerController]; - self.ntpMediator.headerCollectionInteractionHandler = - self.headerCollectionInteractionHandler; - DCHECK(!self.ntpMediator.primaryViewController); - self.ntpMediator.primaryViewController = self.suggestionsViewController; - } + self.suggestionsViewController.collectionView.accessibilityIdentifier = + kContentSuggestionsCollectionIdentifier; self.dragDropHandler = [[URLDragDropHandler alloc] init]; self.dragDropHandler.dropDelegate = self; @@ -518,10 +499,7 @@ IDS_IOS_DISCOVER_FEED_MENU_TURN_OFF_ITEM) action:^{ [weakSelf setDiscoverFeedVisible:NO]; - if ([weakSelf.ntpFeedDelegate - isNTPRefactoredAndFeedVisible]) { - [weakSelf.ntpCommandHandler updateDiscoverFeedVisibility]; - } + [weakSelf.ntpCommandHandler updateDiscoverFeedVisibility]; } style:UIAlertActionStyleDestructive]; } else { @@ -530,10 +508,7 @@ IDS_IOS_DISCOVER_FEED_MENU_TURN_ON_ITEM) action:^{ [weakSelf setDiscoverFeedVisible:YES]; - if ([weakSelf.ntpFeedDelegate - isNTPRefactoredAndFeedVisible]) { - [weakSelf.ntpCommandHandler updateDiscoverFeedVisibility]; - } + [weakSelf.ntpCommandHandler updateDiscoverFeedVisibility]; } style:UIAlertActionStyleDefault]; } @@ -597,11 +572,7 @@ - (void)returnToRecentTabWasAdded { [self.ntpCommandHandler updateDiscoverFeedLayout]; - if ([self.ntpFeedDelegate isNTPRefactoredAndFeedVisible]) { - [self.ntpCommandHandler setContentOffsetToTop]; - } else { - [self.suggestionsViewController setContentOffset:0]; - } + [self.ntpCommandHandler setContentOffsetToTop]; } #pragma mark - ContentSuggestionsHeaderCommands @@ -843,15 +814,6 @@ self.suggestionsViewController.feedVisible = [self isFeedVisible]; } -// YES if the NTP feed is currently visible. -// TODO(crbug.com/1173610): Move this to the NTPCoordinator so all of the -// visibility logic lives in there. -- (BOOL)isFeedVisible { - return self.contentSuggestionsEnabled && - [self.contentSuggestionsExpanded value] && - !tests_hook::DisableDiscoverFeed(); -} - #pragma mark - AppStateObserver - (void)appState:(AppState*)appState
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm index c510a33..896139e 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_egtest.mm
@@ -44,16 +44,6 @@ const char kPageURL[] = "/test-page.html"; const char kPageTitle[] = "Page title!"; -// Scrolls the collection view in order to have the toolbar menu icon visible. -void ScrollUp() { - [[[EarlGrey - selectElementWithMatcher:grey_allOf(chrome_test_util::ToolsMenuButton(), - grey_sufficientlyVisible(), nil)] - usingSearchAction:grey_scrollInDirection(kGREYDirectionUp, 150) - onElementWithMatcher:chrome_test_util::NTPCollectionView()] - assertWithMatcher:grey_notNil()]; -} - // Provides responses for redirect and changed window location URLs. std::unique_ptr<net::test_server::HttpResponse> StandardResponse( const net::test_server::HttpRequest& request) { @@ -69,21 +59,6 @@ return std::move(http_response); } -// Select the cell with the |matcher| by scrolling the collection. -// 200 is a reasonable scroll displacement that works for all UI elements, while -// not being too slow. -GREYElementInteraction* CellWithMatcher(id<GREYMatcher> matcher) { - // Start the scroll from the middle of the screen in case the bottom of the - // screen is obscured by the bottom toolbar. - id<GREYAction> action = - grey_scrollInDirectionWithStartPoint(kGREYDirectionDown, 230, 0.5, 0.5); - return [[EarlGrey - selectElementWithMatcher:grey_allOf(matcher, grey_sufficientlyVisible(), - nil)] - usingSearchAction:action - onElementWithMatcher:chrome_test_util::NTPCollectionView()]; -} - } // namespace #pragma mark - TestCase @@ -135,144 +110,6 @@ #pragma mark - Tests -// Tests that the additional items (when more is pressed) are kept when -// switching tabs. -- (void)testAdditionalItemsKept { - if (IsDiscoverFeedEnabled()) { - EARL_GREY_TEST_DISABLED(@"Legacy Feed Test."); - } - // Set server up. - self.testServer->RegisterRequestHandler( - base::BindRepeating(&StandardResponse)); - GREYAssertTrue(self.testServer->Start(), @"Test server failed to start."); - const GURL pageURL = self.testServer->GetURL(kPageURL); - - // Add 3 suggestions, persisted accross page loads. - [NewTabPageAppInterface addNumberOfSuggestions:3 - additionalSuggestionsURL:net::NSURLWithGURL(pageURL)]; - - // Tap on more, which adds 10 elements. - [CellWithMatcher(chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_SUGGESTIONS_FOOTER_TITLE)) performAction:grey_tap()]; - - // Make sure some items are loaded. - [CellWithMatcher(grey_accessibilityID(@"AdditionalSuggestion2")) - assertWithMatcher:grey_notNil()]; - - // Open a new Tab. - ScrollUp(); - [ChromeEarlGreyUI openNewTab]; - [ChromeEarlGrey waitForMainTabCount:2]; - - // Go back to the previous tab. - [ChromeEarlGrey selectTabAtIndex:0]; - - // Make sure the additional items are still displayed. - [CellWithMatcher(grey_accessibilityID(@"AdditionalSuggestion2")) - assertWithMatcher:grey_notNil()]; -} - -// Tests that when the page is reloaded using the tools menu, the suggestions -// are updated. -- (void)testReloadPage { - if (IsDiscoverFeedEnabled()) { - EARL_GREY_TEST_DISABLED(@"Legacy Feed Test."); - } - // Add 2 suggestions, persisted accross page loads. - [NewTabPageAppInterface addNumberOfSuggestions:2 - additionalSuggestionsURL:nil]; - - // Change the suggestions to have one the second one. - [NewTabPageAppInterface addSuggestionNumber:2]; - - // Check that the first suggestion is still displayed. - [CellWithMatcher(grey_accessibilityID(@"http://chromium.org/1")) - assertWithMatcher:grey_notNil()]; - - // Reload the page using the tools menu. - [ChromeEarlGreyUI reload]; - - // Check that the first suggestion is no longer displayed. - [CellWithMatcher(grey_accessibilityID(@"http://chromium.org/1")) - assertWithMatcher:grey_nil()]; - [CellWithMatcher(grey_accessibilityID(@"http://chromium.org/2")) - assertWithMatcher:grey_notNil()]; -} - -// Tests that when tapping a suggestion, it is opened. When going back, the -// disposition of the collection takes into account the previous scroll, even -// when more is tapped. -- (void)testOpenPageAndGoBackWithMoreContent { - if (IsDiscoverFeedEnabled()) { - EARL_GREY_TEST_DISABLED(@"Legacy Feed Test."); - } - // Set server up. - self.testServer->RegisterRequestHandler( - base::BindRepeating(&StandardResponse)); - GREYAssertTrue(self.testServer->Start(), @"Test server failed to start."); - const GURL pageURL = self.testServer->GetURL(kPageURL); - - // Add 3 suggestions, persisted accross page loads. - [NewTabPageAppInterface addNumberOfSuggestions:3 - additionalSuggestionsURL:net::NSURLWithGURL(pageURL)]; - - // Tap on more, which adds 10 elements. - [CellWithMatcher(chrome_test_util::ButtonWithAccessibilityLabelId( - IDS_IOS_CONTENT_SUGGESTIONS_FOOTER_TITLE)) performAction:grey_tap()]; - - // Make sure to scroll to the bottom. - [CellWithMatcher(grey_accessibilityID(kContentSuggestionsLearnMoreIdentifier)) - assertWithMatcher:grey_notNil()]; - - // Open the last item. After the extra space of the last suggestion is - // removed, this test case fails on iPhoneX. Double-Tap on the last suggestion - // is a workaround. - // TODO(crbug.com/979143): Find out the reason and fix it. Also consider - // converting the test case to EG2 or deprecating MDCCollectionView. - [CellWithMatcher(grey_accessibilityID(@"AdditionalSuggestion9")) - performAction:grey_doubleTap()]; - - // Check that the page has been opened. - [ChromeEarlGrey waitForWebStateContainingText:kPageLoadedString]; - [[EarlGrey selectElementWithMatcher:chrome_test_util::OmniboxText( - pageURL.GetContent())] - assertWithMatcher:grey_notNil()]; - [ChromeEarlGrey waitForMainTabCount:1]; - [ChromeEarlGrey waitForIncognitoTabCount:0]; - - // Go back. - [[EarlGrey selectElementWithMatcher:chrome_test_util::BackButton()] - performAction:grey_tap()]; - - // Check that the first items are visible as the collection should be - // scrolled. - [[EarlGrey - selectElementWithMatcher:grey_accessibilityID(@"http://chromium.org/3")] - assertWithMatcher:grey_sufficientlyVisible()]; -} - -// Tests that the "Learn More" cell is present only if there is a suggestion in -// the section. -- (void)testLearnMore { - if (IsDiscoverFeedEnabled()) { - EARL_GREY_TEST_DISABLED(@"Legacy Feed Test."); - } - id<GREYAction> action = - grey_scrollInDirectionWithStartPoint(kGREYDirectionDown, 200, 0.5, 0.5); - [[[EarlGrey - selectElementWithMatcher:grey_accessibilityID( - kContentSuggestionsLearnMoreIdentifier)] - usingSearchAction:action - onElementWithMatcher:chrome_test_util::NTPCollectionView()] - assertWithMatcher:grey_nil()]; - - [NewTabPageAppInterface addNumberOfSuggestions:1 - additionalSuggestionsURL:nil]; - - [CellWithMatcher(grey_accessibilityID(kContentSuggestionsLearnMoreIdentifier)) - assertWithMatcher:grey_sufficientlyVisible()]; -} - // Tests the "Open in New Tab" action of the Most Visited context menu. - (void)testMostVisitedNewTab { [self setupMostVisitedTileLongPress];
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.h index efe324c..fc4ee5f 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.h
@@ -35,10 +35,10 @@ // Creates layout with |offset| as additional height. Allows the view's height // to be increased enough to maintain the scroll position. Only needed if // Discover feed is visible. -// TODO(crbug.com/1200303): Change |refactoredFeedVisible| to only represent -// feed visibility after launch. -- (instancetype)initWithOffset:(CGFloat)offset - refactoredFeedVisible:(BOOL)visible; +- (instancetype)initWithOffset:(CGFloat)offset; + +// Minimum height of the NTP scroll view to allow for scrolling to omnibox. +- (CGFloat)minimumNTPHeight; @end
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.mm index f1273625..feed631 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_layout.mm
@@ -15,32 +15,17 @@ #error "This file requires ARC support." #endif -@interface ContentSuggestionsLayout () - -// YES if the Discover Feed is currently visible. -@property(nonatomic, assign, getter=isRefactoredFeedVisible) - BOOL refactoredFeedVisible; - -@end - @implementation ContentSuggestionsLayout -- (instancetype)initWithOffset:(CGFloat)offset - refactoredFeedVisible:(BOOL)visible { +- (instancetype)initWithOffset:(CGFloat)offset { if (self = [super init]) { - _refactoredFeedVisible = visible; _offset = offset; } return self; } -- (CGSize)collectionViewContentSize { - if ([self isRefactoredFeedVisible]) { - // In the refactored NTP and when the Feed is visible, we don't want to - // extend the view height beyond its content. - return [super collectionViewContentSize]; - } - CGFloat collectionViewHeight = self.collectionView.bounds.size.height; +- (CGFloat)minimumNTPHeight { + CGFloat collectionViewHeight = self.parentCollectionView.bounds.size.height; CGFloat headerHeight = [self firstHeaderHeight]; // The minimum height for the collection view content should be the height of @@ -64,16 +49,7 @@ self.ntpHeight += additionalHeight; } - CGSize contentSize = [super collectionViewContentSize]; - if (contentSize.height < minimumHeight) { - contentSize.height = minimumHeight; - // Increases the minimum height to allow the page to scroll to the cached - // position. - if (self.offset > 0) { - contentSize.height += self.offset; - } - } - return contentSize; + return minimumHeight; } - (NSArray*)layoutAttributesForElementsInRect:(CGRect)rect { @@ -124,13 +100,8 @@ if ([kind isEqualToString:UICollectionElementKindSectionHeader] && indexPath.section == 0) { - CGFloat contentOffset; - if ([self isRefactoredFeedVisible]) { - contentOffset = self.parentCollectionView.contentOffset.y + - self.collectionView.contentSize.height; - } else { - contentOffset = self.collectionView.contentOffset.y; - } + CGFloat contentOffset = self.parentCollectionView.contentOffset.y + + self.collectionView.contentSize.height; CGFloat headerHeight = CGRectGetHeight(attributes.frame); CGPoint origin = attributes.frame.origin; @@ -146,13 +117,10 @@ [UIApplication sharedApplication].preferredContentSizeCategory) - self.collectionView.safeAreaInsets.top; - if ([self isRefactoredFeedVisible]) { - minY = [self.omniboxPositioner stickyOmniboxHeight]; - } + minY = [self.omniboxPositioner stickyOmniboxHeight]; // TODO(crbug.com/1114792): Remove mentioned of "refactored" from the // variable name once this launches. - BOOL hasScrolledIntoRefactoredDiscoverFeed = - [self isRefactoredFeedVisible] && self.isScrolledIntoFeed; + BOOL hasScrolledIntoRefactoredDiscoverFeed = self.isScrolledIntoFeed; if (contentOffset > minY && !hasScrolledIntoRefactoredDiscoverFeed) { origin.y = contentOffset - minY; }
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h index 7b7e043..a6e00bc1 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.h
@@ -39,13 +39,9 @@ // Inits view controller with |offset| to maintain scroll position if needed. // Offset is only required if Discover feed is visible. // |feedVisible| is YES if feed is enabled and visible. -// |refactoredFeedVisible| is YES if the feed is visible using the refactored -// NTP. -// TODO(crbug.com/1200303): Remove |refactoredFeedVisible| after launch. - (instancetype)initWithStyle:(CollectionViewControllerStyle)style offset:(CGFloat)offset feedVisible:(BOOL)visible - refactoredFeedVisible:(BOOL)refactoredFeedVisible NS_DESIGNATED_INITIALIZER; - (instancetype)initWithLayout:(UICollectionViewLayout*)layout
diff --git a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm index fe07348..e2b1a87a 100644 --- a/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm +++ b/ios/chrome/browser/ui/content_suggestions/content_suggestions_view_controller.mm
@@ -112,13 +112,10 @@ - (instancetype)initWithStyle:(CollectionViewControllerStyle)style offset:(CGFloat)offset - feedVisible:(BOOL)visible - refactoredFeedVisible:(BOOL)refactoredFeedVisible { + feedVisible:(BOOL)visible { _offset = offset; _feedVisible = visible; - _layout = - [[ContentSuggestionsLayout alloc] initWithOffset:offset - refactoredFeedVisible:refactoredFeedVisible]; + _layout = [[ContentSuggestionsLayout alloc] initWithOffset:offset]; self = [super initWithLayout:_layout style:style]; if (self) { _collectionUpdater = [[ContentSuggestionsCollectionUpdater alloc] init]; @@ -288,9 +285,6 @@ [self.collectionView.collectionViewLayout invalidateLayout]; // Ensure initial fake omnibox layout. [self.headerSynchronizer updateFakeOmniboxForScrollPosition]; - // TODO(crbug.com/1114792): Plumb the collection view. - self.layout.parentCollectionView = - static_cast<UICollectionView*>(self.view.superview); } - (void)viewDidAppear:(BOOL)animated {
diff --git a/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm index efbdeffe..8ac190a 100644 --- a/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm +++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm
@@ -547,14 +547,6 @@ // Get the collection and its layout. UICollectionView* collectionView = [NewTabPageAppInterface collectionView]; - id<UICollectionViewDelegateFlowLayout> delegate = - (id<UICollectionViewDelegateFlowLayout>)(collectionView.delegate); - CGFloat headerHeight = - [delegate collectionView:collectionView - layout:collectionView.collectionViewLayout - referenceSizeForHeaderInSection:0] - .height; - // Offset before the tap. CGPoint origin = collectionView.contentOffset; @@ -567,9 +559,7 @@ // Make sure the fake omnibox has been hidden and the collection has moved. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] assertWithMatcher:grey_not(grey_sufficientlyVisible())]; - - CGFloat top = [NewTabPageAppInterface collectionView].safeAreaInsets.top; - GREYAssertTrue(offsetAfterTap.y >= origin.y + headerHeight - (60 + top), + GREYAssertTrue(offsetAfterTap.y >= origin.y, @"The collection has not moved."); // Unfocus the omnibox.
diff --git a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h index 95e216b..fd78332 100644 --- a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h +++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.h
@@ -29,7 +29,6 @@ @class ContentSuggestionsMediator; @class ContentSuggestionsViewController; @protocol LogoVendor; -@protocol NewTabPageFeedDelegate; @class NewTabPageViewController; @protocol NTPHomeConsumer; @class NTPHomeMetrics; @@ -96,9 +95,6 @@ // The browser. @property(nonatomic, assign) Browser* browser; -// Delegate for providing information relating to the feed. -@property(nonatomic, weak) id<NewTabPageFeedDelegate> ntpFeedDelegate; - // Inits the mediator. - (void)setUp;
diff --git a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm index 1e104cc..0db9b24b 100644 --- a/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm +++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_mediator.mm
@@ -48,7 +48,6 @@ #import "ios/chrome/browser/ui/default_promo/default_browser_utils.h" #import "ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h" #include "ios/chrome/browser/ui/ntp/metrics.h" -#import "ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_header_constants.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_view_controller.h" #import "ios/chrome/browser/ui/ntp/notification_promo_whats_new.h" @@ -563,10 +562,8 @@ // TODO(crbug.com/1114792): Create a protocol to stop having references to // both of these ViewControllers directly. UICollectionView* collectionView = - [self.ntpFeedDelegate isNTPRefactoredAndFeedVisible] - ? self.ntpViewController.discoverFeedWrapperViewController - .feedCollectionView - : self.suggestionsViewController.collectionView; + self.ntpViewController.discoverFeedWrapperViewController + .contentCollectionView; UIEdgeInsets contentInset = collectionView.contentInset; CGPoint contentOffset = collectionView.contentOffset; if ([self.suggestionsMediator mostRecentTabStartSurfaceTileIsShowing]) { @@ -599,17 +596,11 @@ CGFloat offset = item ? item->GetPageDisplayState().scroll_state().content_offset().y : 0; CGFloat minimumOffset = - [self.ntpFeedDelegate isNTPRefactoredAndFeedVisible] - ? -self.ntpViewController.contentSuggestionsContentHeight - : 0; + -self.ntpViewController.contentSuggestionsContentHeight; // TODO(crbug.com/1114792): Create a protocol to stop having references to // both of these ViewControllers directly. if (offset > minimumOffset) { - if ([self.ntpFeedDelegate isNTPRefactoredAndFeedVisible]) { - [self.ntpViewController setSavedContentOffset:offset]; - } else { - [self.suggestionsViewController setContentOffset:offset]; - } + [self.ntpViewController setSavedContentOffset:offset]; } }
diff --git a/ios/chrome/browser/ui/ntp/BUILD.gn b/ios/chrome/browser/ui/ntp/BUILD.gn index 0158e6a..4a66b79 100644 --- a/ios/chrome/browser/ui/ntp/BUILD.gn +++ b/ios/chrome/browser/ui/ntp/BUILD.gn
@@ -7,7 +7,6 @@ "new_tab_page_commands.h", "new_tab_page_content_delegate.h", "new_tab_page_controller_delegate.h", - "new_tab_page_feed_delegate.h", "new_tab_page_omnibox_positioning.h", ] configs += [ "//build/config/compiler:enable_arc" ]
diff --git a/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h b/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h index 27eec92..b0474a76 100644 --- a/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h +++ b/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h
@@ -15,9 +15,9 @@ // view controller that is wrapped by this view controller. @property(nonatomic, strong, readonly) UIViewController* discoverFeed; -// Collection view that contains the feed articles. Is a subview of -// |self.discoverFeed|. -@property(nonatomic, weak, readonly) UICollectionView* feedCollectionView; +// The containing collection view of the NTP. Can either be the Discover feed if +// the feed is visible, or an empty collection view if not. +@property(nonatomic, weak) UICollectionView* contentCollectionView; // Initializes view controller with the Discover feed view controller // originating from the Discover feed provider.
diff --git a/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.mm b/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.mm index 4d7aa31f..67f840f 100644 --- a/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.mm +++ b/ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.mm
@@ -4,6 +4,7 @@ #import <UIKit/UIKit.h> +#import "ios/chrome/browser/ui/content_suggestions/ntp_home_constant.h" #import "ios/chrome/browser/ui/ntp/discover_feed_wrapper_view_controller.h" #import "ios/chrome/common/ui/util/constraints_ui_util.h" @@ -17,17 +18,17 @@ (UIViewController*)discoverFeed { self = [super initWithNibName:nil bundle:nil]; if (self) { - // TODO(crbug.com/1114792): Handle case where feed is disabled, replacing it - // with a regular scroll view. - _discoverFeed = discoverFeed; + if (discoverFeed) { + _discoverFeed = discoverFeed; - // Iterates through subviews to find collection view containing feed - // articles. - // TODO(crbug.com/1085419): Once the CollectionView is cleanly exposed, - // remove this loop. - for (UIView* view in _discoverFeed.view.subviews) { - if ([view isKindOfClass:[UICollectionView class]]) { - _feedCollectionView = static_cast<UICollectionView*>(view); + // Iterates through subviews to find collection view containing feed + // articles. + // TODO(crbug.com/1085419): Once the CollectionView is cleanly exposed, + // remove this loop. + for (UIView* view in _discoverFeed.view.subviews) { + if ([view isKindOfClass:[UICollectionView class]]) { + _contentCollectionView = static_cast<UICollectionView*>(view); + } } } } @@ -37,17 +38,41 @@ - (void)viewDidLoad { [super viewDidLoad]; - // |discoverFeed| is not guaranteed to not be nil, so we check to prevent - // crashing when attempting to it as a child view controller. + // Configure appropriate collection view based on feed visibility. If + // |discoverFeed| exists, then the feed must be enabled and visible. if (self.discoverFeed) { - UIView* discoverView = self.discoverFeed.view; - [self.discoverFeed willMoveToParentViewController:self]; - [self addChildViewController:self.discoverFeed]; - [self.view addSubview:discoverView]; - [self.discoverFeed didMoveToParentViewController:self]; - discoverView.translatesAutoresizingMaskIntoConstraints = NO; - AddSameConstraints(discoverView, self.view); + [self configureDiscoverFeedAsWrapper]; + } else { + [self configureEmptyCollectionAsWrapper]; } } +#pragma mark - Private + +// If the feed is visible, we configure the feed's collection view and view +// controller to be used in the NTP. +- (void)configureDiscoverFeedAsWrapper { + UIView* discoverView = self.discoverFeed.view; + [self.discoverFeed willMoveToParentViewController:self]; + [self addChildViewController:self.discoverFeed]; + [self.view addSubview:discoverView]; + [self.discoverFeed didMoveToParentViewController:self]; + discoverView.translatesAutoresizingMaskIntoConstraints = NO; + AddSameConstraints(discoverView, self.view); +} + +// If the feed is not visible, we prepare the empty collection view to be used +// in the NTP. +- (void)configureEmptyCollectionAsWrapper { + UICollectionViewLayout* layout = [[UICollectionViewLayout alloc] init]; + UICollectionView* emptyCollectionView = + [[UICollectionView alloc] initWithFrame:CGRectZero + collectionViewLayout:layout]; + [self.view addSubview:emptyCollectionView]; + self.contentCollectionView = emptyCollectionView; + self.contentCollectionView.backgroundColor = ntp_home::kNTPBackgroundColor(); + self.contentCollectionView.translatesAutoresizingMaskIntoConstraints = NO; + AddSameConstraints(self.contentCollectionView, self.view); +} + @end
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_content_delegate.h b/ios/chrome/browser/ui/ntp/new_tab_page_content_delegate.h index 1d9bd7a3..0821fcd 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_content_delegate.h +++ b/ios/chrome/browser/ui/ntp/new_tab_page_content_delegate.h
@@ -11,6 +11,9 @@ // Reloads content suggestions collection view. - (void)reloadContentSuggestions; +// Whether or not the Discover feed is visible. +- (BOOL)isFeedVisible; + @end #endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_CONTENT_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm index b22d81e..c37d2c17 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_coordinator.mm
@@ -44,7 +44,6 @@ #import "ios/chrome/browser/ui/ntp/new_tab_page_commands.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_content_delegate.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_feature.h" -#import "ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h" #import "ios/chrome/browser/ui/ntp/new_tab_page_view_controller.h" #import "ios/chrome/browser/ui/overscroll_actions/overscroll_actions_controller.h" #import "ios/chrome/browser/ui/settings/utils/pref_backed_boolean.h" @@ -67,7 +66,6 @@ DiscoverFeedPreviewDelegate, NewTabPageCommands, NewTabPageContentDelegate, - NewTabPageFeedDelegate, OverscrollActionsControllerDelegate, PrefObserverDelegate, SceneStateObserver> { @@ -214,7 +212,6 @@ self.browser, self.webState) voiceSearchAvailability:&_voiceSearchAvailability]; self.ntpMediator.browser = self.browser; - self.ntpMediator.ntpFeedDelegate = self; self.contentSuggestionsCoordinator = [[ContentSuggestionsCoordinator alloc] initWithBaseViewController:nil @@ -224,7 +221,6 @@ self.contentSuggestionsCoordinator.panGestureHandler = self.panGestureHandler; self.contentSuggestionsCoordinator.ntpMediator = self.ntpMediator; self.contentSuggestionsCoordinator.ntpCommandHandler = self; - self.contentSuggestionsCoordinator.ntpFeedDelegate = self; self.contentSuggestionsCoordinator.bubblePresenter = self.bubblePresenter; DiscoverFeedMetricsRecorder* discoverFeedMetricsRecorder; @@ -240,9 +236,10 @@ discoverFeedMetricsRecorder; } + self.ntpViewController = [[NewTabPageViewController alloc] init]; + // Requests a Discover feed here if the correct flags and prefs are enabled. - if ([self shouldUseRefactoredNTP]) { - self.ntpViewController = [[NewTabPageViewController alloc] init]; + if ([self shouldFeedBeVisible]) { DiscoverFeedViewControllerConfiguration* viewControllerConfig = [[DiscoverFeedViewControllerConfiguration alloc] init]; viewControllerConfig.browser = self.browser; @@ -254,17 +251,11 @@ ->NewFeedViewControllerWithConfiguration(viewControllerConfig); } - if (self.discoverFeedViewController) { - [self.contentSuggestionsCoordinator start]; - [self configureNTPAsMainViewController]; - self.ntpViewController.discoverFeedMetricsRecorder = - discoverFeedMetricsRecorder; - } else { - self.ntpViewController = nil; - [self.contentSuggestionsCoordinator start]; - [self configureMainViewControllerUsing:self.contentSuggestionsCoordinator - .viewController]; - } + self.contentSuggestionsCoordinator.feedVisible = [self isFeedVisible]; + [self.contentSuggestionsCoordinator start]; + [self configureNTPAsMainViewController]; + self.ntpViewController.discoverFeedMetricsRecorder = + discoverFeedMetricsRecorder; base::RecordAction(base::UserMetricsAction("MobileNTPShowMostVisited")); SceneState* sceneState = @@ -293,11 +284,9 @@ self.contentSuggestionsCoordinator = nil; self.incognitoViewController = nil; self.ntpViewController = nil; - if (IsRefactoredNTP()) { - ios::GetChromeBrowserProvider() - .GetDiscoverFeedProvider() - ->RemoveFeedViewController(self.discoverFeedViewController); - } + ios::GetChromeBrowserProvider() + .GetDiscoverFeedProvider() + ->RemoveFeedViewController(self.discoverFeedViewController); self.discoverFeedWrapperViewController = nil; self.discoverFeedViewController = nil; @@ -408,9 +397,7 @@ } - (id<ThumbStripSupporting>)thumbStripSupporting { - return self.discoverFeedViewController - ? self.ntpViewController - : self.contentSuggestionsCoordinator.thumbStripSupporting; + return self.ntpViewController; } #pragma mark - Public Methods @@ -423,11 +410,7 @@ if (!self.contentSuggestionsCoordinator) { return; } - if (self.discoverFeedViewController) { - [self.ntpViewController stopScrolling]; - } else { - [self.contentSuggestionsCoordinator stopScrolling]; - } + [self.ntpViewController stopScrolling]; } - (UIEdgeInsets)contentInset { @@ -439,11 +422,8 @@ } - (void)willUpdateSnapshot { - if (self.contentSuggestionsCoordinator.started && - self.discoverFeedViewController) { + if (self.contentSuggestionsCoordinator.started) { [self.ntpViewController willUpdateSnapshot]; - } else { - [self.contentSuggestionsCoordinator willUpdateSnapshot]; } } @@ -456,9 +436,7 @@ } - (void)reload { - if (self.discoverFeedViewController) { - ios::GetChromeBrowserProvider().GetDiscoverFeedProvider()->RefreshFeed(); - } + ios::GetChromeBrowserProvider().GetDiscoverFeedProvider()->RefreshFeed(); [self reloadContentSuggestions]; } @@ -497,7 +475,7 @@ - (void)updateDiscoverFeedLayout { // If this coordinator has not finished [self start], the below will start // viewDidLoad before the UI is ready, failing DCHECKS. - if (self.started && self.discoverFeedViewController) { + if (self.started) { [self.containedViewController.view setNeedsLayout]; [self.containedViewController.view layoutIfNeeded]; [self.ntpViewController updateContentSuggestionForCurrentLayout]; @@ -526,7 +504,6 @@ #pragma mark - BooleanObserver - (void)booleanDidChange:(id<ObservableBoolean>)observableBoolean { - DCHECK(IsRefactoredNTP()); [self updateDiscoverFeedVisibility]; } @@ -622,39 +599,32 @@ [self.contentSuggestionsCoordinator reload]; } +- (BOOL)isFeedVisible { + return [self shouldFeedBeVisible] && self.discoverFeedViewController; +} + #pragma mark - PrefObserverDelegate - (void)onPreferenceChanged:(const std::string&)preferenceName { - if (IsRefactoredNTP() && - (preferenceName == prefs::kArticlesForYouEnabled || - preferenceName == prefs::kNTPContentSuggestionsEnabled)) { + if (preferenceName == prefs::kArticlesForYouEnabled || + preferenceName == prefs::kNTPContentSuggestionsEnabled) { [self updateDiscoverFeedVisibility]; } - if (self.discoverFeedViewController && - preferenceName == - DefaultSearchManager::kDefaultSearchProviderDataPrefName) { + if (preferenceName == + DefaultSearchManager::kDefaultSearchProviderDataPrefName) { [self updateDiscoverFeedLayout]; } } -#pragma mark - NewTabPageFeedDelegate - -- (BOOL)isNTPRefactoredAndFeedVisible { - return [self shouldUseRefactoredNTP] && self.discoverFeedViewController; -} - #pragma mark - Private -// Whether or not the refactored NTP should be used based on user prefs. -// Does not check if feed is valid, which would would then not use the -// refactored NTP. -- (BOOL)shouldUseRefactoredNTP { +// Determines whether the feed should be fetched based on the user prefs. +- (BOOL)shouldFeedBeVisible { BOOL isFeedEnabled = self.prefService->GetBoolean(prefs::kArticlesForYouEnabled) && self.prefService->GetBoolean(prefs::kNTPContentSuggestionsEnabled); - return IsRefactoredNTP() && [self.discoverFeedExpanded value] && - isFeedEnabled && !tests_hook::DisableDiscoverFeed(); + return isFeedEnabled && [self.discoverFeedExpanded value]; } @end
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h b/ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h deleted file mode 100644 index b894d36..0000000 --- a/ios/chrome/browser/ui/ntp/new_tab_page_feed_delegate.h +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_FEED_DELEGATE_H_ -#define IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_FEED_DELEGATE_H_ - -// Delegate for providing feed information to the content suggestions. -@protocol NewTabPageFeedDelegate - -// YES if we're using the refactored NTP and the Discover Feed is visible. -- (BOOL)isNTPRefactoredAndFeedVisible; - -@end - -#endif // IOS_CHROME_BROWSER_UI_NTP_NEW_TAB_PAGE_FEED_DELEGATE_H_
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_view_controller.mm b/ios/chrome/browser/ui/ntp/new_tab_page_view_controller.mm index b4392469..12c6144 100644 --- a/ios/chrome/browser/ui/ntp/new_tab_page_view_controller.mm +++ b/ios/chrome/browser/ui/ntp/new_tab_page_view_controller.mm
@@ -38,6 +38,7 @@ } @interface NewTabPageViewController () <NewTabPageOmniboxPositioning, + UICollectionViewDelegate, UIGestureRecognizerDelegate> // The overscroll actions controller managing accelerators over the toolbar. @@ -114,17 +115,20 @@ discoverFeedView.translatesAutoresizingMaskIntoConstraints = NO; AddSameConstraints(discoverFeedView, self.view); + UIViewController* parentViewController = + [self.ntpContentDelegate isFeedVisible] + ? self.discoverFeedWrapperViewController.discoverFeed + : self.discoverFeedWrapperViewController; + [self.contentSuggestionsViewController - willMoveToParentViewController:self.discoverFeedWrapperViewController - .discoverFeed]; - [self.discoverFeedWrapperViewController.discoverFeed + willMoveToParentViewController:parentViewController]; + [parentViewController addChildViewController:self.contentSuggestionsViewController]; [self.collectionView addSubview:self.contentSuggestionsViewController.view]; [self.contentSuggestionsViewController - didMoveToParentViewController:self.discoverFeedWrapperViewController - .discoverFeed]; + didMoveToParentViewController:parentViewController]; - // TODO(crbug.com/1170995): The feedCollectionView width might be narrower + // TODO(crbug.com/1170995): The contentCollectionView width might be narrower // than the ContentSuggestions view. This causes elements to be hidden. As a // temporary workaround set clipsToBounds to NO to display these elements, and // add a gesture recognizer to interact with them. @@ -151,6 +155,14 @@ .collectionViewLayout); _contentSuggestionsLayout.isScrolledIntoFeed = self.isScrolledIntoFeed; _contentSuggestionsLayout.omniboxPositioner = self; + _contentSuggestionsLayout.parentCollectionView = self.collectionView; + + // If the feed is not visible, we control the delegate ourself (since it is + // otherwise controlled by the DiscoverProvider). + if (![self.ntpContentDelegate isFeedVisible]) { + self.discoverFeedWrapperViewController.contentCollectionView.delegate = + self; + } [self registerNotifications]; } @@ -174,25 +186,7 @@ // ContentSuggestions View will look broken for a second before its properly // laid out. if (!self.contentSuggestionsHeightConstraint) { - UIView* containerView = - self.discoverFeedWrapperViewController.discoverFeed.view; - UIView* contentSuggestionsView = self.contentSuggestionsViewController.view; - contentSuggestionsView.translatesAutoresizingMaskIntoConstraints = NO; - - self.contentSuggestionsHeightConstraint = - [contentSuggestionsView.heightAnchor - constraintEqualToConstant:self.contentSuggestionsViewController - .collectionView.contentSize.height]; - - [NSLayoutConstraint activateConstraints:@[ - [self.collectionView.topAnchor - constraintEqualToAnchor:contentSuggestionsView.bottomAnchor], - [containerView.safeAreaLayoutGuide.leadingAnchor - constraintEqualToAnchor:contentSuggestionsView.leadingAnchor], - [containerView.safeAreaLayoutGuide.trailingAnchor - constraintEqualToAnchor:contentSuggestionsView.trailingAnchor], - self.contentSuggestionsHeightConstraint, - ]]; + [self applyCollectionViewConstraints]; } [self updateContentSuggestionForCurrentLayout]; @@ -210,6 +204,10 @@ self.shouldFocusFakebox = NO; } + if (![self.ntpContentDelegate isFeedVisible]) { + [self setMinimumHeight]; + } + self.viewDidAppear = YES; } @@ -277,6 +275,9 @@ weakSelf.collectionView.contentOffset.y < pinnedOffsetY) { weakSelf.collectionView.contentOffset = CGPointMake(0, pinnedOffsetY); } + if (![self.ntpContentDelegate isFeedVisible]) { + [self setMinimumHeight]; + } }; [coordinator animateAlongsideTransition:alongsideBlock @@ -445,7 +446,7 @@ #pragma mark - ContentSuggestionsCollectionControlling - (UICollectionView*)collectionView { - return self.discoverFeedWrapperViewController.feedCollectionView; + return self.discoverFeedWrapperViewController.contentCollectionView; } #pragma mark - NewTabPageOmniboxPositioning @@ -644,6 +645,40 @@ } } +// Applies constraints to the NTP collection view, along with the constraints +// for the content suggestions within it. +- (void)applyCollectionViewConstraints { + UIView* containerView = + [self.ntpContentDelegate isFeedVisible] + ? self.discoverFeedWrapperViewController.discoverFeed.view + : self.view; + UIView* contentSuggestionsView = self.contentSuggestionsViewController.view; + contentSuggestionsView.translatesAutoresizingMaskIntoConstraints = NO; + + self.contentSuggestionsHeightConstraint = [contentSuggestionsView.heightAnchor + constraintEqualToConstant:self.contentSuggestionsViewController + .collectionView.contentSize.height]; + + [NSLayoutConstraint activateConstraints:@[ + [self.collectionView.topAnchor + constraintEqualToAnchor:contentSuggestionsView.bottomAnchor], + [containerView.safeAreaLayoutGuide.leadingAnchor + constraintEqualToAnchor:contentSuggestionsView.leadingAnchor], + [containerView.safeAreaLayoutGuide.trailingAnchor + constraintEqualToAnchor:contentSuggestionsView.trailingAnchor], + self.contentSuggestionsHeightConstraint, + ]]; +} + +// Sets minimum height for the NTP collection view, allowing it to scroll enough +// to focus the omnibox. +- (void)setMinimumHeight { + self.collectionView.contentSize = + CGSizeMake(self.view.frame.size.width, + [self.contentSuggestionsLayout minimumNTPHeight] - + [self adjustedContentSuggestionsHeight]); +} + #pragma mark - Helpers // Content suggestions height adjusted with the safe area top insets.
diff --git a/ios/chrome/browser/ui/safe_mode/safe_mode_view_controller_unittest.mm b/ios/chrome/browser/ui/safe_mode/safe_mode_view_controller_unittest.mm index 0a36e17..4eb7eb24 100644 --- a/ios/chrome/browser/ui/safe_mode/safe_mode_view_controller_unittest.mm +++ b/ios/chrome/browser/ui/safe_mode/safe_mode_view_controller_unittest.mm
@@ -58,13 +58,7 @@ // reports to upload. +[SafeModeViewController hasSuggestions] does not depend // on the value of crash_helper::IsEnabled or // crash_helper::IsUploadingEnabled. -// TODO(crbug.com/1173776): The test fails on device. -#if TARGET_IPHONE_SIMULATOR -#define MAYBE_HasSuggestions HasSuggestions -#else -#define MAYBE_HasSuggestions DISABLED_HasSuggestions -#endif -TEST_F(SafeModeViewControllerTest, MAYBE_HasSuggestions) { +TEST_F(SafeModeViewControllerTest, HasSuggestions) { // Test when crash reporter is disabled. crash_helper::SetUserEnabledUploading(false); EXPECT_FALSE([SafeModeViewController hasSuggestions]);
diff --git a/ios/web/init/web_main_loop.mm b/ios/web/init/web_main_loop.mm index 80a4e49..92ab430 100644 --- a/ios/web/init/web_main_loop.mm +++ b/ios/web/init/web_main_loop.mm
@@ -155,22 +155,21 @@ // Teardown may start in PostMainMessageLoopRun, and during teardown we // need to be able to perform IO. - base::ThreadRestrictions::SetIOAllowed(true); - base::PostTask( - FROM_HERE, {WebThread::IO}, - base::BindOnce( - base::IgnoreResult(&base::ThreadRestrictions::SetIOAllowed), true)); + base::PermanentThreadAllowance::AllowBlocking(); + base::PostTask(FROM_HERE, {WebThread::IO}, + base::BindOnce(base::IgnoreResult( + &base::PermanentThreadAllowance::AllowBlocking))); // Also allow waiting to join threads. - // TODO(crbug.com/800808): Ideally this (and the above SetIOAllowed() - // would be scoped allowances). That would be one of the first step to ensure - // no persistent work is being done after ThreadPoolInstance::Shutdown() in - // order to move towards atomic shutdown. - base::ThreadRestrictions::SetWaitAllowed(true); + // TODO(crbug.com/800808): Ideally this (and the above AllowBlocking() would + // be scoped allowances). That would be one of the first step to ensure no + // persistent work is being done after ThreadPoolInstance::Shutdown() in order + // to move towards atomic shutdown. + base::PermanentThreadAllowance::AllowBaseSyncPrimitives(); base::PostTask( FROM_HERE, {WebThread::IO}, - base::BindOnce( - base::IgnoreResult(&base::ThreadRestrictions::SetWaitAllowed), true)); + base::BindOnce(base::IgnoreResult( + &base::PermanentThreadAllowance::AllowBaseSyncPrimitives))); if (parts_) { parts_->PostMainMessageLoopRun();
diff --git a/media/capture/video/file_video_capture_device_factory.cc b/media/capture/video/file_video_capture_device_factory.cc index e318860..7c47a23 100644 --- a/media/capture/video/file_video_capture_device_factory.cc +++ b/media/capture/video/file_video_capture_device_factory.cc
@@ -43,7 +43,7 @@ void FileVideoCaptureDeviceFactory::GetDevicesInfo( GetDevicesInfoCallback callback) { DCHECK(thread_checker_.CalledOnValidThread()); - base::ThreadRestrictions::SetIOAllowed(true); + base::ScopedAllowBlocking allow_blocking; std::vector<VideoCaptureDeviceInfo> devices_info;
diff --git a/media/gpu/chromeos/image_processor.cc b/media/gpu/chromeos/image_processor.cc index 6c40df02..1109a68 100644 --- a/media/gpu/chromeos/image_processor.cc +++ b/media/gpu/chromeos/image_processor.cc
@@ -39,7 +39,13 @@ return false; } - // TODO(b/195351653): Add visible_rect check here. + if (frame.visible_rect() != config.visible_rect) { + VLOGF(1) << "Invalid frame visible rectangle=" + << frame.visible_rect().ToString() + << ", expected=" << config.visible_rect.ToString(); + return false; + } + return true; }
diff --git a/media/gpu/vaapi/vaapi_image_processor_backend.cc b/media/gpu/vaapi/vaapi_image_processor_backend.cc index f5e104d..b127c64 100644 --- a/media/gpu/vaapi/vaapi_image_processor_backend.cc +++ b/media/gpu/vaapi/vaapi_image_processor_backend.cc
@@ -46,8 +46,6 @@ VLOGF(2) << "Unsupported visible size: " << visible_size.ToString(); return false; } - // TODO(b/195351653): this check only makes sense if - // ImageProcessor::Process() validates the visible rectangle for each frame. if (!gfx::Rect(config.size).Contains(config.visible_rect)) { VLOGF(2) << "The frame size (" << config.size.ToString() << ") does not contain the visible rect (" @@ -156,6 +154,47 @@ VaapiImageProcessorBackend::~VaapiImageProcessorBackend() { DCHECK_CALLED_ON_VALID_SEQUENCE(backend_sequence_checker_); + + // To clear |allocated_va_surfaces_|, we have to first DestroyContext(). + vaapi_wrapper_->DestroyContext(); + allocated_va_surfaces_.clear(); +} + +const VASurface* VaapiImageProcessorBackend::GetSurfaceForVideoFrame( + scoped_refptr<VideoFrame> frame, + bool use_protected) { + if (frame->storage_type() != VideoFrame::STORAGE_GPU_MEMORY_BUFFER || + !frame->HasGpuMemoryBuffer()) { + return nullptr; + } + + const gfx::GpuMemoryBufferId gmb_id = frame->GetGpuMemoryBuffer()->GetId(); + if (base::Contains(allocated_va_surfaces_, gmb_id)) { + const VASurface* surface = allocated_va_surfaces_[gmb_id].get(); + CHECK_EQ(frame->GetGpuMemoryBuffer()->GetSize(), surface->size()); + const unsigned int format = VaapiWrapper::BufferFormatToVARTFormat( + frame->GetGpuMemoryBuffer()->GetFormat()); + CHECK_NE(format, 0u); + CHECK_EQ(format, surface->format()); + return surface; + } + + scoped_refptr<gfx::NativePixmap> pixmap = + CreateNativePixmapDmaBuf(frame.get()); + if (!pixmap) { + VLOGF(1) << "Failed to create NativePixmap from VideoFrame"; + return nullptr; + } + + auto va_surface = vaapi_wrapper_->CreateVASurfaceForPixmap(std::move(pixmap), + use_protected); + if (!va_surface) { + VLOGF(1) << "Failed to create VASurface from NativePixmap"; + return nullptr; + } + + allocated_va_surfaces_[gmb_id] = std::move(va_surface); + return allocated_va_surfaces_[gmb_id].get(); } void VaapiImageProcessorBackend::Process(scoped_refptr<VideoFrame> input_frame, @@ -181,33 +220,23 @@ } #endif // BUILDFLAG(IS_CHROMEOS_ASH) - DCHECK(input_frame); - DCHECK(output_frame); - scoped_refptr<gfx::NativePixmap> input_pixmap = - CreateNativePixmapDmaBuf(input_frame.get()); - if (!input_pixmap) { - VLOGF(1) << "Failed to create NativePixmap from VideoFrame"; + if (needs_context_ && !vaapi_wrapper_->CreateContext(gfx::Size())) { + VLOGF(1) << "Failed to create context for VPP"; error_cb_.Run(); return; } + needs_context_ = false; - auto src_va_surface = vaapi_wrapper_->CreateVASurfaceForPixmap( - std::move(input_pixmap), use_protected); + DCHECK(input_frame); + DCHECK(output_frame); + const VASurface* src_va_surface = + GetSurfaceForVideoFrame(input_frame, use_protected); if (!src_va_surface) { error_cb_.Run(); return; } - - scoped_refptr<gfx::NativePixmap> output_pixmap = - CreateNativePixmapDmaBuf(output_frame.get()); - if (!output_pixmap) { - VLOGF(1) << "Failed to create NativePixmap from VideoFrame"; - error_cb_.Run(); - return; - } - - auto dst_va_surface = vaapi_wrapper_->CreateVASurfaceForPixmap( - std::move(output_pixmap), use_protected); + const VASurface* dst_va_surface = + GetSurfaceForVideoFrame(output_frame, use_protected); if (!dst_va_surface) { error_cb_.Run(); return; @@ -246,4 +275,14 @@ std::move(cb).Run(std::move(output_frame)); } +void VaapiImageProcessorBackend::Reset() { + DVLOGF(4); + DCHECK_CALLED_ON_VALID_SEQUENCE(backend_sequence_checker_); + + // To clear |allocated_va_surfaces_|, we have to first DestroyContext(). + vaapi_wrapper_->DestroyContext(); + allocated_va_surfaces_.clear(); + needs_context_ = true; +} + } // namespace media
diff --git a/media/gpu/vaapi/vaapi_image_processor_backend.h b/media/gpu/vaapi/vaapi_image_processor_backend.h index 7a30e1c8..a72b9a0 100644 --- a/media/gpu/vaapi/vaapi_image_processor_backend.h +++ b/media/gpu/vaapi/vaapi_image_processor_backend.h
@@ -7,13 +7,16 @@ #include <memory> +#include "base/containers/small_map.h" #include "base/macros.h" #include "media/gpu/chromeos/image_processor_backend.h" #include "media/gpu/media_gpu_export.h" +#include "ui/gfx/gpu_memory_buffer.h" namespace media { class VaapiWrapper; +class VASurface; // ImageProcessor that is hardware accelerated with VA-API. This ImageProcessor // supports only dma-buf and GpuMemoryBuffer VideoFrames for both input and @@ -41,6 +44,7 @@ void Process(scoped_refptr<VideoFrame> input_frame, scoped_refptr<VideoFrame> output_frame, FrameReadyCB cb) override; + void Reset() override; private: VaapiImageProcessorBackend( @@ -53,7 +57,19 @@ scoped_refptr<base::SequencedTaskRunner> backend_task_runner); ~VaapiImageProcessorBackend() override; + const VASurface* GetSurfaceForVideoFrame(scoped_refptr<VideoFrame> frame, + bool use_protected); + const scoped_refptr<VaapiWrapper> vaapi_wrapper_; + bool needs_context_ = false; + + // VASurfaces are created via importing dma-bufs into libva using + // |vaapi_wrapper_|->CreateVASurfaceForPixmap(). The following map keeps those + // VASurfaces for reuse according to the expectations of libva + // vaDestroySurfaces(): "Surfaces can only be destroyed after all contexts + // using these surfaces have been destroyed." + base::small_map<std::map<gfx::GpuMemoryBufferId, scoped_refptr<VASurface>>> + allocated_va_surfaces_; }; } // namespace media
diff --git a/media/gpu/vaapi/vaapi_video_encode_accelerator.cc b/media/gpu/vaapi/vaapi_video_encode_accelerator.cc index c05b6a3..eaf1d47 100644 --- a/media/gpu/vaapi/vaapi_video_encode_accelerator.cc +++ b/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
@@ -543,6 +543,8 @@ std::vector<scoped_refptr<VASurface>>* reconstructed_surfaces) { DCHECK_CALLED_ON_VALID_SEQUENCE(encoder_sequence_checker_); DCHECK(native_input_mode_); + TRACE_EVENT0("media,gpu", "VAVEA::CreateSurfacesForGpuMemoryBuffer"); + if (frame.storage_type() != VideoFrame::STORAGE_GPU_MEMORY_BUFFER) { NOTIFY_ERROR(kPlatformFailureError, "Unexpected storage: " @@ -556,22 +558,29 @@ return false; } - // Create VASurface from GpuMemory-based VideoFrame. - scoped_refptr<gfx::NativePixmap> pixmap = CreateNativePixmapDmaBuf(&frame); - if (!pixmap) { - NOTIFY_ERROR(kPlatformFailureError, - "Failed to create NativePixmap from VideoFrame"); - return false; - } + scoped_refptr<VASurface> source_surface; + { + TRACE_EVENT0("media,gpu", "VAVEA::ImportGpuMemoryBufferToVASurface"); - scoped_refptr<VASurface> source_surface = - vaapi_wrapper_->CreateVASurfaceForPixmap(std::move(pixmap)); - if (!source_surface) { - NOTIFY_ERROR(kPlatformFailureError, "Failed to create VASurface"); - return false; + // Create VASurface from GpuMemory-based VideoFrame. + scoped_refptr<gfx::NativePixmap> pixmap = CreateNativePixmapDmaBuf(&frame); + if (!pixmap) { + NOTIFY_ERROR(kPlatformFailureError, + "Failed to create NativePixmap from VideoFrame"); + return false; + } + + source_surface = + vaapi_wrapper_->CreateVASurfaceForPixmap(std::move(pixmap)); + if (!source_surface) { + NOTIFY_ERROR(kPlatformFailureError, "Failed to create VASurface"); + return false; + } } // Create input and reconstructed surfaces. + TRACE_EVENT1("media,gpu", "VAVEA::ConstructSurfaces", "the number of layers", + spatial_layer_resolutions.size()); input_surfaces->reserve(spatial_layer_resolutions.size()); reconstructed_surfaces->reserve(spatial_layer_resolutions.size()); for (const gfx::Size& encode_size : spatial_layer_resolutions) { @@ -616,6 +625,7 @@ DCHECK_CALLED_ON_VALID_SEQUENCE(encoder_sequence_checker_); DCHECK(!native_input_mode_); DCHECK(frame.IsMappable()); + TRACE_EVENT0("media,gpu", "VAVEA::CreateSurfacesForShmem"); if (expected_input_coded_size_ != frame.coded_size()) { // In non-zero copy mode, the coded size of the incoming frame should be @@ -770,12 +780,18 @@ DCHECK(frame); DCHECK(input_surface && reconstructed_surface); - auto coded_buffer = vaapi_wrapper_->CreateVABuffer(VAEncCodedBufferType, - output_buffer_byte_size_); - if (!coded_buffer) { - NOTIFY_ERROR(kPlatformFailureError, "Failed creating coded buffer"); - return nullptr; + std::unique_ptr<ScopedVABuffer> coded_buffer; + { + TRACE_EVENT1("media,gpu", "VAVEA::CreateVABuffer", "buffer size", + output_buffer_byte_size_); + coded_buffer = vaapi_wrapper_->CreateVABuffer(VAEncCodedBufferType, + output_buffer_byte_size_); + if (!coded_buffer) { + NOTIFY_ERROR(kPlatformFailureError, "Failed creating coded buffer"); + return nullptr; + } } + scoped_refptr<CodecPicture> picture; switch (output_codec_) { case VideoCodec::kH264: @@ -872,8 +888,10 @@ } TRACE_EVENT0("media,gpu", "VAVEA::FromExecuteToReturn"); - TRACE_EVENT0("media,gpu", "VAVEA::Execute"); - job->Execute(); + { + TRACE_EVENT0("media,gpu", "VAVEA::Execute"); + job->Execute(); + } submitted_encode_jobs_.push(std::move(job)); TryToReturnBitstreamBuffer();
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc index e528b0f..5ded0ea 100644 --- a/media/gpu/vaapi/vaapi_wrapper.cc +++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -884,7 +884,8 @@ } const uint32_t packed_header_attributes = - (VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE); + (VA_ENC_PACKED_HEADER_SEQUENCE | VA_ENC_PACKED_HEADER_PICTURE | + VA_ENC_PACKED_HEADER_SLICE); if ((packed_header_attributes & attrib.value) == packed_header_attributes) { required_attribs->push_back( {VAConfigAttribEncPackedHeaders, packed_header_attributes}); @@ -2817,6 +2818,9 @@ } #endif // BUILDFLAG(IS_CHROMEOS_ASH) + TRACE_EVENT2("media,gpu", "VaapiWrapper::BlitSurface", "src_rect", + src_rect->ToString(), "dest_rect", dest_rect->ToString()); + VAStatus va_res = vaBeginPicture(va_display_, va_context_id_, va_surface_dest.id()); VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVABeginPicture, false);
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc index 6511b13c..937ee26 100644 --- a/net/base/network_change_notifier.cc +++ b/net/base/network_change_notifier.cc
@@ -107,10 +107,7 @@ : params_(params), have_announced_(false), last_announced_connection_type_(CONNECTION_NONE), - pending_connection_type_(CONNECTION_NONE) {} - - void Init() { - DCHECK(thread_checker_.CalledOnValidThread()); + pending_connection_type_(CONNECTION_NONE) { DCHECK(g_network_change_notifier); AddConnectionTypeObserver(this); AddIPAddressObserver(this); @@ -183,6 +180,69 @@ base::ThreadChecker thread_checker_; }; +// Holds the collection of observer lists used by NetworkChangeNotifier. +class NetworkChangeNotifier::ObserverList { + public: + ObserverList() + : ip_address_observer_list_(new base::ObserverListThreadSafe< + NetworkChangeNotifier::IPAddressObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + connection_type_observer_list_( + new base::ObserverListThreadSafe< + NetworkChangeNotifier::ConnectionTypeObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + resolver_state_observer_list_(new base::ObserverListThreadSafe< + NetworkChangeNotifier::DNSObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + network_change_observer_list_( + new base::ObserverListThreadSafe< + NetworkChangeNotifier::NetworkChangeObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + max_bandwidth_observer_list_( + new base::ObserverListThreadSafe< + NetworkChangeNotifier::MaxBandwidthObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + network_observer_list_(new base::ObserverListThreadSafe< + NetworkChangeNotifier::NetworkObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + connection_cost_observer_list_( + new base::ObserverListThreadSafe< + NetworkChangeNotifier::ConnectionCostObserver>( + base::ObserverListPolicy::EXISTING_ONLY)), + connection_cost_observers_added_(false) {} + + ObserverList(const ObserverList&) = delete; + ObserverList& operator=(const ObserverList&) = delete; + ~ObserverList() = default; + + const scoped_refptr< + base::ObserverListThreadSafe<NetworkChangeNotifier::IPAddressObserver>> + ip_address_observer_list_; + const scoped_refptr<base::ObserverListThreadSafe< + NetworkChangeNotifier::ConnectionTypeObserver>> + connection_type_observer_list_; + const scoped_refptr< + base::ObserverListThreadSafe<NetworkChangeNotifier::DNSObserver>> + resolver_state_observer_list_; + const scoped_refptr<base::ObserverListThreadSafe< + NetworkChangeNotifier::NetworkChangeObserver>> + network_change_observer_list_; + const scoped_refptr< + base::ObserverListThreadSafe<NetworkChangeNotifier::MaxBandwidthObserver>> + max_bandwidth_observer_list_; + const scoped_refptr< + base::ObserverListThreadSafe<NetworkChangeNotifier::NetworkObserver>> + network_observer_list_; + const scoped_refptr<base::ObserverListThreadSafe< + NetworkChangeNotifier::ConnectionCostObserver>> + connection_cost_observer_list_; + + // Indicates if connection cost observer was added before + // network_change_notifier was initialized, if so ConnectionCostObserverAdded + // is invoked from constructor. + std::atomic_bool connection_cost_observers_added_; +}; + class NetworkChangeNotifier::SystemDnsConfigObserver : public SystemDnsConfigChangeNotifier::Observer { public: @@ -223,9 +283,11 @@ std::unique_ptr<NetworkChangeNotifier> NetworkChangeNotifier::CreateIfNeeded( NetworkChangeNotifier::ConnectionType initial_type, NetworkChangeNotifier::ConnectionSubtype initial_subtype) { - base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); - if (g_network_change_notifier) - return nullptr; + { + base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); + if (g_network_change_notifier) + return nullptr; + } if (g_network_change_notifier_factory) return g_network_change_notifier_factory->CreateInstance(); @@ -517,10 +579,11 @@ // static std::unique_ptr<NetworkChangeNotifier> NetworkChangeNotifier::CreateMockIfNeeded() { - base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); - if (g_network_change_notifier) - return nullptr; - + { + base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); + if (g_network_change_notifier) + return nullptr; + } // Use an empty noop SystemDnsConfigChangeNotifier to disable actual system // DNS configuration notifications. return std::make_unique<MockNetworkChangeNotifier>( @@ -555,70 +618,54 @@ default; void NetworkChangeNotifier::AddIPAddressObserver(IPAddressObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->ip_address_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().ip_address_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddConnectionTypeObserver( ConnectionTypeObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->connection_type_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().connection_type_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddDNSObserver(DNSObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->resolver_state_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().resolver_state_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddNetworkChangeObserver( NetworkChangeObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->network_change_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().network_change_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddMaxBandwidthObserver( MaxBandwidthObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->max_bandwidth_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().max_bandwidth_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddNetworkObserver(NetworkObserver* observer) { + base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); DCHECK(AreNetworkHandlesSupported()); - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->network_observer_list_; - observer->observer_list_->AddObserver(observer); - } + DCHECK(!observer->observer_list_); + observer->observer_list_ = GetObserverList().network_observer_list_; + observer->observer_list_->AddObserver(observer); } void NetworkChangeNotifier::AddConnectionCostObserver( ConnectionCostObserver* observer) { - if (g_network_change_notifier && - g_network_change_notifier->can_add_observers_) { - observer->observer_list_ = - g_network_change_notifier->connection_cost_observer_list_; - observer->observer_list_->AddObserver(observer); + DCHECK(!observer->observer_list_); + GetObserverList().connection_cost_observers_added_ = true; + observer->observer_list_ = GetObserverList().connection_cost_observer_list_; + observer->observer_list_->AddObserver(observer); + base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); + if (g_network_change_notifier) { g_network_change_notifier->ConnectionCostObserverAdded(); } } @@ -735,42 +782,27 @@ /*= NetworkChangeCalculatorParams()*/, SystemDnsConfigChangeNotifier* system_dns_config_notifier /*= nullptr */, bool omit_observers_in_constructor_for_testing /*= false */) - : ip_address_observer_list_( - new base::ObserverListThreadSafe<IPAddressObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - connection_type_observer_list_( - new base::ObserverListThreadSafe<ConnectionTypeObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - resolver_state_observer_list_( - new base::ObserverListThreadSafe<DNSObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - network_change_observer_list_( - new base::ObserverListThreadSafe<NetworkChangeObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - max_bandwidth_observer_list_( - new base::ObserverListThreadSafe<MaxBandwidthObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - network_observer_list_(new base::ObserverListThreadSafe<NetworkObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - connection_cost_observer_list_( - new base::ObserverListThreadSafe<ConnectionCostObserver>( - base::ObserverListPolicy::EXISTING_ONLY)), - system_dns_config_notifier_(system_dns_config_notifier), - system_dns_config_observer_(std::make_unique<SystemDnsConfigObserver>()), - network_change_calculator_(new NetworkChangeCalculator(params)), - can_add_observers_(!omit_observers_in_constructor_for_testing) { - if (!system_dns_config_notifier_) { - static base::NoDestructor<SystemDnsConfigChangeNotifier> singleton{}; - system_dns_config_notifier_ = singleton.get(); + : system_dns_config_notifier_(system_dns_config_notifier), + system_dns_config_observer_(std::make_unique<SystemDnsConfigObserver>()) { + { + base::AutoLock auto_lock(NetworkChangeNotifierCreationLock()); + if (!system_dns_config_notifier_) { + static base::NoDestructor<SystemDnsConfigChangeNotifier> singleton{}; + system_dns_config_notifier_ = singleton.get(); + } + + DCHECK(!g_network_change_notifier); + g_network_change_notifier = this; + + system_dns_config_notifier_->AddObserver(system_dns_config_observer_.get()); + if (GetObserverList().connection_cost_observers_added_) { + g_network_change_notifier->ConnectionCostObserverAdded(); + } } - - DCHECK(!g_network_change_notifier); - g_network_change_notifier = this; - network_change_calculator_->Init(); - - system_dns_config_notifier_->AddObserver(system_dns_config_observer_.get()); - - can_add_observers_ = true; + if (!omit_observers_in_constructor_for_testing) { + network_change_calculator_ = + std::make_unique<NetworkChangeCalculator>(params); + } } #if defined(OS_LINUX) || defined(OS_CHROMEOS) @@ -910,30 +942,31 @@ } void NetworkChangeNotifier::NotifyObserversOfIPAddressChangeImpl() { - ip_address_observer_list_->Notify(FROM_HERE, - &IPAddressObserver::OnIPAddressChanged); + GetObserverList().ip_address_observer_list_->Notify( + FROM_HERE, &IPAddressObserver::OnIPAddressChanged); } void NetworkChangeNotifier::NotifyObserversOfConnectionTypeChangeImpl( ConnectionType type) { - connection_type_observer_list_->Notify( + GetObserverList().connection_type_observer_list_->Notify( FROM_HERE, &ConnectionTypeObserver::OnConnectionTypeChanged, type); } void NetworkChangeNotifier::NotifyObserversOfNetworkChangeImpl( ConnectionType type) { - network_change_observer_list_->Notify( + GetObserverList().network_change_observer_list_->Notify( FROM_HERE, &NetworkChangeObserver::OnNetworkChanged, type); } void NetworkChangeNotifier::NotifyObserversOfDNSChangeImpl() { - resolver_state_observer_list_->Notify(FROM_HERE, &DNSObserver::OnDNSChanged); + GetObserverList().resolver_state_observer_list_->Notify( + FROM_HERE, &DNSObserver::OnDNSChanged); } void NetworkChangeNotifier::NotifyObserversOfMaxBandwidthChangeImpl( double max_bandwidth_mbps, ConnectionType type) { - max_bandwidth_observer_list_->Notify( + GetObserverList().max_bandwidth_observer_list_->Notify( FROM_HERE, &MaxBandwidthObserver::OnMaxBandwidthChanged, max_bandwidth_mbps, type); } @@ -943,19 +976,19 @@ NetworkHandle network) { switch (type) { case NetworkChangeType::kConnected: - network_observer_list_->Notify( + GetObserverList().network_observer_list_->Notify( FROM_HERE, &NetworkObserver::OnNetworkConnected, network); break; case NetworkChangeType::kDisconnected: - network_observer_list_->Notify( + GetObserverList().network_observer_list_->Notify( FROM_HERE, &NetworkObserver::OnNetworkDisconnected, network); break; case NetworkChangeType::kSoonToDisconnect: - network_observer_list_->Notify( + GetObserverList().network_observer_list_->Notify( FROM_HERE, &NetworkObserver::OnNetworkSoonToDisconnect, network); break; case NetworkChangeType::kMadeDefault: - network_observer_list_->Notify( + GetObserverList().network_observer_list_->Notify( FROM_HERE, &NetworkObserver::OnNetworkMadeDefault, network); break; } @@ -963,7 +996,7 @@ void NetworkChangeNotifier::NotifyObserversOfConnectionCostChangeImpl( ConnectionCost cost) { - connection_cost_observer_list_->Notify( + GetObserverList().connection_cost_observer_list_->Notify( FROM_HERE, &ConnectionCostObserver::OnConnectionCostChanged, cost); } @@ -978,4 +1011,10 @@ g_network_change_notifier = network_change_notifier_; } +// static +NetworkChangeNotifier::ObserverList& NetworkChangeNotifier::GetObserverList() { + static base::NoDestructor<NetworkChangeNotifier::ObserverList> observers; + return *observers; +} + } // namespace net
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h index 3dc9787..61d1546 100644 --- a/net/base/network_change_notifier.h +++ b/net/base/network_change_notifier.h
@@ -453,7 +453,8 @@ // thread on which this is called is the thread on which |observer| will be // called back with notifications. This is safe to call if Create() has not // been called (as long as it doesn't race the Create() call on another - // thread), in which case it will simply do nothing. + // thread), in which case it will add the observers to the static observer + // list and be notified once the network change notifier is created. // DEPRECATED. IPAddressObserver is deprecated. Please use // NetworkChangeObserver instead. crbug.com/754695. @@ -636,6 +637,9 @@ class NetworkChangeCalculator; class SystemDnsConfigObserver; + class ObserverList; + + static ObserverList& GetObserverList(); void NotifyObserversOfIPAddressChangeImpl(); void NotifyObserversOfConnectionTypeChangeImpl(ConnectionType type); @@ -647,21 +651,6 @@ NetworkHandle network); void NotifyObserversOfConnectionCostChangeImpl(ConnectionCost cost); - const scoped_refptr<base::ObserverListThreadSafe<IPAddressObserver>> - ip_address_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<ConnectionTypeObserver>> - connection_type_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<DNSObserver>> - resolver_state_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<NetworkChangeObserver>> - network_change_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<MaxBandwidthObserver>> - max_bandwidth_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<NetworkObserver>> - network_observer_list_; - const scoped_refptr<base::ObserverListThreadSafe<ConnectionCostObserver>> - connection_cost_observer_list_; - SystemDnsConfigChangeNotifier* system_dns_config_notifier_; std::unique_ptr<SystemDnsConfigObserver> system_dns_config_observer_; @@ -673,10 +662,6 @@ // Indicates if this instance cleared g_network_change_notifier_ yet. bool cleared_global_pointer_ = false; - - // Whether observers can be added. This may only be false during construction - // in tests. See comment above the constructor. - bool can_add_observers_; }; } // namespace net
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 9f5d67b..a538758 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc
@@ -58,6 +58,7 @@ #include "net/test/gtest_util.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/abseil-cpp/absl/types/optional.h" using disk_cache::EntryResult; using net::test::IsError; @@ -805,13 +806,15 @@ base::DeleteFile(filename); net::TestCompletionCallback cb; - bool prev = base::ThreadRestrictions::SetIOAllowed(false); + // Blocking shouldn't be needed to create the cache. + absl::optional<base::ScopedDisallowBlocking> disallow_blocking( + absl::in_place); std::unique_ptr<disk_cache::BackendImpl> cache( std::make_unique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr, net::DISK_CACHE, nullptr)); int rv = cache->Init(cb.callback()); EXPECT_THAT(cb.GetResult(rv), IsError(net::ERR_FAILED)); - base::ThreadRestrictions::SetIOAllowed(prev); + disallow_blocking.reset(); cache.reset(); DisableIntegrityCheck(); @@ -2598,15 +2601,16 @@ SetNewEviction(); net::TestCompletionCallback cb; - bool prev = base::ThreadRestrictions::SetIOAllowed(false); - base::FilePath path(cache_path_); - int rv = disk_cache::CreateCacheBackend( - net::DISK_CACHE, net::CACHE_BACKEND_BLOCKFILE, path, 0, - disk_cache::ResetHandling::kResetOnError, nullptr, &cache_, - cb.callback()); - path.clear(); // Make sure path was captured by the previous call. - ASSERT_THAT(cb.GetResult(rv), IsOk()); - base::ThreadRestrictions::SetIOAllowed(prev); + { + base::ScopedDisallowBlocking disallow_blocking; + base::FilePath path(cache_path_); + int rv = disk_cache::CreateCacheBackend( + net::DISK_CACHE, net::CACHE_BACKEND_BLOCKFILE, path, 0, + disk_cache::ResetHandling::kResetOnError, nullptr, &cache_, + cb.callback()); + path.clear(); // Make sure path was captured by the previous call. + ASSERT_THAT(cb.GetResult(rv), IsOk()); + } cache_.reset(); EXPECT_TRUE(CheckCacheIntegrity(cache_path_, new_eviction_, /*max_size = */ 0, mask_));
diff --git a/remoting/host/chromoting_host_context.cc b/remoting/host/chromoting_host_context.cc index 6e4dc104c..4fa67425 100644 --- a/remoting/host/chromoting_host_context.cc +++ b/remoting/host/chromoting_host_context.cc
@@ -22,9 +22,9 @@ namespace { void DisallowBlockingOperations() { - base::ThreadRestrictions::SetIOAllowed(false); + base::DisallowBlocking(); // TODO(crbug.com/793486): Re-enable after the underlying issue is fixed. - // base::ThreadRestrictions::DisallowBaseSyncPrimitives(); + // base::DisallowBaseSyncPrimitives(); } } // namespace
diff --git a/sql/transaction.cc b/sql/transaction.cc index bdbc093..65666ffd 100644 --- a/sql/transaction.cc +++ b/sql/transaction.cc
@@ -16,29 +16,52 @@ Transaction::~Transaction() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); +#if DCHECK_IS_ON() + DCHECK(begin_called_) + << "Begin() not called immediately after Transaction creation"; +#endif // DCHECK_IS_ON() + if (is_active_) database_.RollbackTransaction(); } bool Transaction::Begin() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(!is_active_) << "Beginning a transaction twice!"; +#if DCHECK_IS_ON() + DCHECK(!begin_called_) << __func__ << " already called"; + begin_called_ = true; +#endif // DCHECK_IS_ON() + + DCHECK(!is_active_); is_active_ = database_.BeginTransaction(); return is_active_; } void Transaction::Rollback() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(is_active_) << "Attempting to roll back a nonexistent transaction. " - << "Did you call Begin() and check its return?"; +#if DCHECK_IS_ON() + DCHECK(begin_called_) << __func__ << " called before Begin()"; + DCHECK(!commit_called_) << __func__ << " called after Commit()"; + DCHECK(!rollback_called_) << __func__ << " called twice"; + rollback_called_ = true; +#endif // DCHECK_IS_ON() + + DCHECK(is_active_) << __func__ << " called after Begin() failed"; is_active_ = false; + database_.RollbackTransaction(); } bool Transaction::Commit() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - DCHECK(is_active_) << "Attempting to commit a nonexistent transaction. " - << "Did you call Begin() and check its return?"; +#if DCHECK_IS_ON() + DCHECK(begin_called_) << __func__ << " called before Begin()"; + DCHECK(!rollback_called_) << __func__ << " called after Rollback()"; + DCHECK(!commit_called_) << __func__ << " called after Commit()"; + commit_called_ = true; +#endif // DCHECK_IS_ON() + + DCHECK(is_active_) << __func__ << " called after Begin() failed"; is_active_ = false; return database_.CommitTransaction(); }
diff --git a/sql/transaction.h b/sql/transaction.h index 16f6993..9100ad2 100644 --- a/sql/transaction.h +++ b/sql/transaction.h
@@ -5,6 +5,7 @@ #ifndef SQL_TRANSACTION_H_ #define SQL_TRANSACTION_H_ +#include "base/check.h" #include "base/component_export.h" #include "base/sequence_checker.h" #include "base/thread_annotations.h" @@ -89,6 +90,12 @@ Database& database_ GUARDED_BY_CONTEXT(sequence_checker_); +#if DCHECK_IS_ON() + bool begin_called_ GUARDED_BY_CONTEXT(sequence_checker_) = false; + bool commit_called_ GUARDED_BY_CONTEXT(sequence_checker_) = false; + bool rollback_called_ GUARDED_BY_CONTEXT(sequence_checker_) = false; +#endif // DCHECK_IS_ON() + // True between a successful Begin() and a Commit() / Rollback() call. bool is_active_ GUARDED_BY_CONTEXT(sequence_checker_) = false; };
diff --git a/storage/browser/blob/blob_storage_context_unittest.cc b/storage/browser/blob/blob_storage_context_unittest.cc index 6b9fb19..d738694 100644 --- a/storage/browser/blob/blob_storage_context_unittest.cc +++ b/storage/browser/blob/blob_storage_context_unittest.cc
@@ -35,6 +35,7 @@ #include "storage/browser/test/fake_blob_data_handle.h" #include "storage/browser/test/test_file_system_context.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/abseil-cpp/absl/types/optional.h" namespace storage { namespace { @@ -79,7 +80,7 @@ void SetUp() override { ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); - base::ThreadRestrictions::SetIOAllowed(false); + disallow_blocking_.emplace(); context_ = std::make_unique<BlobStorageContext>(); file_system_context_ = CreateFileSystemContextForTesting( /*quota_manager_proxy=*/nullptr, base::FilePath()); @@ -88,7 +89,7 @@ void TearDown() override { base::RunLoop().RunUntilIdle(); RunFileTasks(); - base::ThreadRestrictions::SetIOAllowed(true); + disallow_blocking_.reset(); ASSERT_TRUE(temp_dir_.Delete()); } @@ -140,6 +141,7 @@ std::vector<FileCreationInfo> files_; base::ScopedTempDir temp_dir_; + absl::optional<base::ScopedDisallowBlocking> disallow_blocking_; scoped_refptr<TestSimpleTaskRunner> file_runner_ = new TestSimpleTaskRunner(); scoped_refptr<FileSystemContext> file_system_context_;
diff --git a/storage/browser/database/database_tracker_unittest.cc b/storage/browser/database/database_tracker_unittest.cc index f269067c0..6bb3d26 100644 --- a/storage/browser/database/database_tracker_unittest.cc +++ b/storage/browser/database/database_tracker_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "storage/browser/database/database_tracker.h" + #include <stddef.h> #include <stdint.h> @@ -12,6 +14,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" +#include "base/gtest_prod_util.h" #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" #include "base/run_loop.h" @@ -22,7 +25,6 @@ #include "base/time/time.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" -#include "storage/browser/database/database_tracker.h" #include "storage/browser/quota/quota_client_type.h" #include "storage/browser/quota/quota_manager_proxy.h" #include "storage/browser/test/mock_special_storage_policy.h"
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 984bf1f..0ad11f7 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -1792,7 +1792,6 @@ "test_id_prefix": "ninja://chrome/test:chrome_sizes/" }, { - "experiment_percentage": 100, "isolate_name": "variations_smoke_tests", "merge": { "args": [], @@ -3698,7 +3697,6 @@ "test_id_prefix": "ninja://chrome/test:chrome_sizes/" }, { - "experiment_percentage": 100, "isolate_name": "variations_smoke_tests", "merge": { "args": [],
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 21d837fd..3fdb85e 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -5763,7 +5763,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -5850,7 +5850,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -6024,7 +6024,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -6111,7 +6111,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -6298,8 +6298,7 @@ "isolated_scripts": [ { "args": [ - "--avd-config=../../tools/android/avd/proto/generic_android28.textpb", - "--log-wptreport" + "--avd-config=../../tools/android/avd/proto/generic_android28.textpb" ], "isolate_name": "system_webview_wpt", "merge": {
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 74649810..2623a9f 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -57207,7 +57207,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -57295,7 +57295,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -57471,7 +57471,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -57559,7 +57559,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -57808,7 +57808,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -57895,7 +57895,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58069,7 +58069,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58156,7 +58156,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58405,7 +58405,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58492,7 +58492,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58666,7 +58666,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M94", - "revision": "version:94.0.4606.55" + "revision": "version:94.0.4606.57" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -58753,7 +58753,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M95", - "revision": "version:95.0.4638.14" + "revision": "version:95.0.4638.15" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json index 590d6a7..2d4f82e 100644 --- a/testing/buildbot/chromium.clang.json +++ b/testing/buildbot/chromium.clang.json
@@ -10653,7 +10653,7 @@ "--browser=web-engine-shell", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "fuchsia_telemetry_gpu_integration_test", "merge": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index c1e9ec5f..cacc54c 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -27511,7 +27511,7 @@ "--browser=web-engine-shell", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating", "--device=aemu" ], "isolate_name": "fuchsia_telemetry_gpu_integration_test", @@ -29583,7 +29583,7 @@ "--browser=web-engine-shell", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating", "--device=fvdl" ], "isolate_name": "fuchsia_telemetry_gpu_integration_test",
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 29833622..66f2b50 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -2467,7 +2467,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -2510,7 +2510,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -4794,7 +4794,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -4838,7 +4838,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -6335,7 +6335,7 @@ "--browser=cros-chrome", "--passthrough", "-v", - "--extra-browser-args=--log-level=0 --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating", + "--extra-browser-args=--log-level=0 --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating", "--remote=127.0.0.1", "--remote-ssh-port=9222" ], @@ -7019,7 +7019,7 @@ "--browser=cros-chrome", "--passthrough", "-v", - "--extra-browser-args=--log-level=0 --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating", + "--extra-browser-args=--log-level=0 --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating", "--remote=variable_chromeos_device_hostname" ], "isolate_name": "telemetry_gpu_integration_test", @@ -7614,7 +7614,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating --enable-features=UseOzonePlatform --ozone-platform=wayland", + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating --enable-features=UseOzonePlatform --ozone-platform=wayland", "--xvfb", "--no-xvfb", "--use-weston", @@ -8862,7 +8862,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -9623,7 +9623,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -10473,7 +10473,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -11105,7 +11105,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -11773,7 +11773,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -12405,7 +12405,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -15710,7 +15710,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -15749,7 +15749,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -17309,7 +17309,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -17353,7 +17353,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -18753,7 +18753,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -18789,7 +18789,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -20117,7 +20117,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -20153,7 +20153,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -22793,7 +22793,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -22831,7 +22831,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -24235,7 +24235,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -24273,7 +24273,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -25518,7 +25518,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -25554,7 +25554,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -27320,7 +27320,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -27364,7 +27364,7 @@ "--browser=android-chromium", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test_android_chrome", "merge": { @@ -28019,7 +28019,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -28336,7 +28336,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -28866,7 +28866,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -28902,7 +28902,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -29616,7 +29616,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -29654,7 +29654,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -30187,7 +30187,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -30225,7 +30225,7 @@ "--browser=release", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=validating" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=validating" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -30574,7 +30574,7 @@ "--browser=release_x64", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -31130,7 +31130,7 @@ "--browser=release_x64", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -32897,7 +32897,7 @@ "--browser=release_x64", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -34864,7 +34864,7 @@ "--browser=release_x64", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": { @@ -35776,7 +35776,7 @@ "--browser=release_x64", "--passthrough", "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" + "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle" ], "isolate_name": "telemetry_gpu_integration_test", "merge": {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 0c9c249..b419bec 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -2801,9 +2801,6 @@ 'system_webview_wpt': { 'modifications': { 'android-webview-pie-x86-wpt-fyi-rel': { - 'args': [ - '--log-wptreport', - ], 'swarming': { 'shards': 18, },
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 927e94f..2ab73e7f 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -523,8 +523,6 @@ 'enable': True, 'result_format': 'single' }, - # TODO(crbug.com/1233603): Remove once the test is not flaky anymore. - 'experiment_percentage': 100, }, }, @@ -1770,7 +1768,7 @@ 'name': 'mediapipe_validating_tests', 'telemetry_test_name': 'mediapipe', 'args': [ - '--extra-browser-args=--force_high_performance_gpu --use-cmd-decoder=validating', + '--extra-browser-args=--force_higher_performance_gpu --use-cmd-decoder=validating', ], 'mixins': [ 'has_native_resultdb_integration', @@ -2953,7 +2951,7 @@ 'name': 'mediapipe_passthrough_tests', 'telemetry_test_name': 'mediapipe', 'args': [ - '--extra-browser-args=--force_high_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle', + '--extra-browser-args=--force_higher_performance_gpu --use-cmd-decoder=passthrough --use-gl=angle', ], 'chromeos_args': [ '$$MAGIC_SUBSTITUTION_ChromeOSTelemetryRemote', @@ -2976,7 +2974,7 @@ 'name': 'mediapipe_validating_tests', 'telemetry_test_name': 'mediapipe', 'args': [ - '--extra-browser-args=--force_high_performance_gpu --use-cmd-decoder=validating', + '--extra-browser-args=--force_higher_performance_gpu --use-cmd-decoder=validating', ], 'chromeos_args': [ '$$MAGIC_SUBSTITUTION_ChromeOSTelemetryRemote',
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index c15e20a..8a2c350 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -387,7 +387,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M95', - 'revision': 'version:95.0.4638.14', + 'revision': 'version:95.0.4638.15', } ], }, @@ -411,7 +411,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M94', - 'revision': 'version:94.0.4606.55', + 'revision': 'version:94.0.4606.57', } ], }, @@ -459,7 +459,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M95', - 'revision': 'version:95.0.4638.14', + 'revision': 'version:95.0.4638.15', } ], }, @@ -483,7 +483,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M94', - 'revision': 'version:94.0.4606.55', + 'revision': 'version:94.0.4606.57', } ], }, @@ -531,7 +531,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M95', - 'revision': 'version:95.0.4638.14', + 'revision': 'version:95.0.4638.15', } ], }, @@ -555,7 +555,7 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M94', - 'revision': 'version:94.0.4606.55', + 'revision': 'version:94.0.4606.57', } ], },
diff --git a/testing/scripts/run_finch_smoke_tests_android.py b/testing/scripts/run_finch_smoke_tests_android.py index 3cd7c7b..bdab9376 100755 --- a/testing/scripts/run_finch_smoke_tests_android.py +++ b/testing/scripts/run_finch_smoke_tests_android.py
@@ -63,10 +63,14 @@ 'StrictMode:D', 'WebView*:v' ] - logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) +class TestResult(object): + Pass = 'PASS' + Fail = 'FAIL' + + @lru_cache def get_package_name(apk_path): """Get package name from apk @@ -91,10 +95,13 @@ Returns: None """ - device.Uninstall(get_package_name(options.webview_shell_apk)) - device.Install(options.webview_shell_apk, reinstall=True) - with webview_app.UseWebViewProvider(device, - options.webview_provider_apk): + device.Uninstall(get_package_name(options.browser_apk)) + device.Install(options.browser_apk, reinstall=True) + if options.webview_provider_apk: + with webview_app.UseWebViewProvider(device, + options.webview_provider_apk): + yield + else: yield @@ -108,7 +115,7 @@ Returns: None """ - shell_pkg_name = get_package_name(options.webview_shell_apk) + shell_pkg_name = get_package_name(options.browser_apk) app_data_dir = posixpath.join( device.GetApplicationDataDirectory(shell_pkg_name), 'app_webview') device.RunShellCommand(['mkdir', '-p', app_data_dir], run_as=shell_pkg_name) @@ -130,22 +137,22 @@ device.RunShellCommand(['chown', user_id, seed_new_path], as_root=True) -def run_tests(device, options, test_suffix, webview_flags): +def run_tests(device, options, test_suffix, flags): """Run browser test on test device Args: device: Interface for device options: Command line options test_suffix: Suffix for log output - webview_flags: Flags for webview browser + flags: Flags for browser Returns: True if browser did not crash or False if the browser crashed """ - webview_flags.ReplaceFlags(['--webview-verbose-logging']) - shell_pkg_name = get_package_name(options.webview_shell_apk) + flags.ReplaceFlags(options.browser_command_line_arg) + browser_pkg_name = get_package_name(options.browser_apk) activity_name = ( - '%s/org.chromium.webview_shell.WebViewBrowserActivity' % shell_pkg_name) + '%s/%s' % (browser_pkg_name, options.browser_activity_name)) logger.info('Starting activity %s' % activity_name) device.RunShellCommand([ @@ -167,7 +174,7 @@ else: logger.error('Browser is not running ' + test_suffix) - device.ForceStop(shell_pkg_name) + device.ForceStop(browser_pkg_name) device.ForceStop(get_package_name(options.webview_provider_apk)) return browser_runs @@ -185,32 +192,32 @@ zygotes = device.ListProcesses('zygote') zygote_pids = set(p.pid for p in zygotes) assert zygote_pids, 'No Android zygote found' - processes = device.ListProcesses(get_package_name(options.webview_shell_apk)) + processes = device.ListProcesses(get_package_name(options.browser_apk)) return [p for p in processes if p.ppid in zygote_pids] -def get_json_results(w_seed_res, wo_seed_res): +def get_json_results(with_seed_res, without_seed_res): """Get json results for test suite Args: - w_seed_res: Test result with seed installed - wo_seed_res: Test result with no seed installed + with_seed_res: Test result with seed installed + without_seed_res: Test result with no seed installed Returns: JSON results dictionary """ json_results = {'version': 3, 'interrupted': False} - json_results['tests'] = {'webview_finch_smoke_tests': {}} - json_results['tests']['webview_finch_smoke_tests']['test_wo_seed'] = ( - {'expected': 'PASS', 'actual': wo_seed_res}) - json_results['tests']['webview_finch_smoke_tests']['test_w_seed'] = ( - {'expected': 'PASS', 'actual': w_seed_res}) + json_results['tests'] = {'finch_smoke_tests': {}} + json_results['tests']['finch_smoke_tests']['test_without_seed'] = ( + {'expected': TestResult.Pass, 'actual': without_seed_res}) + json_results['tests']['finch_smoke_tests']['test_with_seed'] = ( + {'expected': TestResult.Pass, 'actual': with_seed_res}) json_results['num_failures_by_type'] = {} - json_results['num_failures_by_type'].setdefault(w_seed_res, 0) - json_results['num_failures_by_type'].setdefault(wo_seed_res, 0) - json_results['num_failures_by_type'][w_seed_res] += 1 - json_results['num_failures_by_type'][wo_seed_res] += 1 + json_results['num_failures_by_type'].setdefault(with_seed_res, 0) + json_results['num_failures_by_type'].setdefault(without_seed_res, 0) + json_results['num_failures_by_type'][with_seed_res] += 1 + json_results['num_failures_by_type'][without_seed_res] += 1 json_results['seconds_since_epoch'] = int(time.time()) return json_results @@ -222,14 +229,37 @@ parser.add_argument('--finch-seed-path', default=TEST_SEED_PATH, type=os.path.realpath, help='Path to the finch seed') - parser.add_argument('--webview-shell-apk', - help='Path to the WebView shell apk', + parser.add_argument('--browser-apk', + '--webview-shell-apk', + '--weblayer-shell-apk', + help='Path to the browser apk', type=os.path.realpath, required=True) parser.add_argument('--webview-provider-apk', - required=True, type=os.path.realpath, help='Path to the WebView provider apk') + parser.add_argument('--browser-command-line-arg', + # TODO(rmhasan): Remove default values after + # adding arguments to test suites. Also make + # this argument required. + default=['--webview-verbose-logging'], + action='append', + help='Browser command line argument') + parser.add_argument('--browser-activity-name', + action='store', + help='Browser activity name', + # TODO(rmhasan): After adding this argument to + # all test suites, remove the default value. Also + # make this argument required. + default=('org.chromium.webview_shell.' + 'WebViewBrowserActivity')) + parser.add_argument('--command-line-file-name', + action='store', + # TODO(rmhasan): Remove default value after adding + # argument to all test suites. Also make this argument + # required. + default='webview-command-line', + help='Command line file name') parser.add_argument('--write-full-results-to', '--isolated-script-test-output', action='store', @@ -252,27 +282,27 @@ device.adb, output_file=os.path.join( os.path.dirname(options.write_full_results_to), - 'webview_finch_logcat.txt'), + 'finch_smoke_tests_logcat.txt'), filter_specs=_LOGCAT_FILTERS) log_mon.Start() - webview_flags = flag_changer.FlagChanger(device, 'webview-command-line') + flags = flag_changer.FlagChanger(device, options.command_line_file_name) device.RunShellCommand( - ['pm', 'clear', get_package_name(options.webview_shell_apk)], + ['pm', 'clear', get_package_name(options.browser_apk)], check_return=True) tests_pass = False - w_seed_res = 'FAIL' - wo_seed_res = 'FAIL' - if run_tests(device, options, 'without finch seed', webview_flags) != 0: + with_seed_res = TestResult.Fail + without_seed_res = TestResult.Fail + if run_tests(device, options, 'without finch seed', flags) != 0: install_seed(device, options) - tests_pass = run_tests(device, options, 'with finch seed', webview_flags) - wo_seed_res = 'PASS' + tests_pass = run_tests(device, options, 'with finch seed', flags) + without_seed_res = TestResult.Pass if tests_pass: - w_seed_res = 'PASS' + with_seed_res = TestResult.Pass log_mon.Stop() - json_results = get_json_results(w_seed_res, wo_seed_res) + json_results = get_json_results(with_seed_res, without_seed_res) with open(options.write_full_results_to, 'w') as json_out: json_out.write(json.dumps(json_results, indent=4))
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 4b6bdf2..73dc285b 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -6910,26 +6910,6 @@ ] } ], - "ProcessHostOnUI": [ - { - "platforms": [ - "android", - "android_webview", - "chromeos", - "linux", - "mac", - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "ProcessHostOnUI" - ] - } - ] - } - ], "ProtoDBSharedMigration": [ { "platforms": [ @@ -8278,22 +8258,6 @@ ] } ], - "SwipeToMoveCursor": [ - { - "platforms": [ - "android", - "android_webview" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "SwipeToMoveCursor" - ] - } - ] - } - ], "SyncInstanceIDTokenTTL": [ { "platforms": [
diff --git a/third_party/android_build_tools/bundletool/3pp/3pp.pb b/third_party/android_build_tools/bundletool/3pp/3pp.pb index d3009dd9..c339106 100644 --- a/third_party/android_build_tools/bundletool/3pp/3pp.pb +++ b/third_party/android_build_tools/bundletool/3pp/3pp.pb
@@ -4,7 +4,6 @@ create { source { script { name: "fetch.py" } - patch_version: "cr0" } }
diff --git a/third_party/android_build_tools/bundletool/3pp/fetch.py b/third_party/android_build_tools/bundletool/3pp/fetch.py index 4c5735b..8ec13dd 100755 --- a/third_party/android_build_tools/bundletool/3pp/fetch.py +++ b/third_party/android_build_tools/bundletool/3pp/fetch.py
@@ -34,8 +34,11 @@ partial_manifest = { 'url': urls, - 'ext': '', # Used only if recipe needs to extract. - 'name': [urls[0].split('/')[-1]], # Used as the file name. + # Used only if recipe needs to extract. + 'ext': '', + # Use constant filename, so as to not need to update filepaths when + # bundletool is autorolled. + 'name': ['bundletool.jar'], } print(json.dumps(partial_manifest))
diff --git a/third_party/blink/public/mojom/dom_storage/dom_storage.mojom b/third_party/blink/public/mojom/dom_storage/dom_storage.mojom index 3b3bea5d..5f5906c6 100644 --- a/third_party/blink/public/mojom/dom_storage/dom_storage.mojom +++ b/third_party/blink/public/mojom/dom_storage/dom_storage.mojom
@@ -6,7 +6,7 @@ import "third_party/blink/public/mojom/dom_storage/session_storage_namespace.mojom"; import "third_party/blink/public/mojom/dom_storage/storage_area.mojom"; -import "url/mojom/origin.mojom"; +import "third_party/blink/public/mojom/storage_key/storage_key.mojom"; // This interface is used by renderers to bootstrap their connection to the // browser's DOM Storage implementation. @@ -23,10 +23,11 @@ // interface and a corresponding DomStorageClient interface pointing back at the // renderer. interface DomStorage { - // Binds to a StorageArea interface for Local Storage within `origin`, which - // must be validated by the browser to ensure the renderer is allowed to - // access that origin's data. - OpenLocalStorage(url.mojom.Origin origin, + // Binds to a StorageArea interface for Local Storage within `storage_key`. + // `storage_key` must be validated by the browser to ensure the renderer is + // allowed to access that StorageKey's data. + OpenLocalStorage(blink.mojom.StorageKey storage_key, + // TODO(https://crbug.com/1212808): add local_frame_token pending_receiver<StorageArea> area); // Binds a control interface for Session Storage within the identified @@ -35,11 +36,12 @@ string namespace_id, pending_receiver<SessionStorageNamespace> receiver); - // Binds to a StorageArea interface for Session Storage within the identified - // namespace and origin. The given origin must be validated by the browser to - // ensure the renderer is allowed to access that origin's data. + // Binds to a StorageArea interface for Session Storage within `storage_key` + // and `namespace_id`. `storage_key` must be validated by the browser to + // ensure the renderer is allowed to access that StorageKey's data. BindSessionStorageArea( - url.mojom.Origin origin, + blink.mojom.StorageKey storage_key, + // TODO(https://crbug.com/1212808): add local_frame_token string namespace_id, pending_receiver<StorageArea> session_namespace); };
diff --git a/third_party/blink/public/mojom/web_feature/web_feature.mojom b/third_party/blink/public/mojom/web_feature/web_feature.mojom index 1be190f..7df9a8da 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -3345,6 +3345,10 @@ kCanvasRenderingContext2DHasOverdraw = 4035, kDigitalGoodsConsume = 4036, kDigitalGoodsListPurchaseHistory = 4037, + kWebShareContainingFiles = 4038, + kWebShareContainingTitle = 4039, + kWebShareContainingText = 4040, + kWebShareContainingUrl = 4041, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/web/web_settings.h b/third_party/blink/public/web/web_settings.h index 73a644e..1be59e7 100644 --- a/third_party/blink/public/web/web_settings.h +++ b/third_party/blink/public/web/web_settings.h
@@ -285,6 +285,7 @@ virtual void SetAccessibilityIncludeSvgGElement(bool) = 0; virtual void SetWebXRImmersiveArAllowed(bool) = 0; virtual void SetLitePageSubresourceRedirectOrigin(const WebString&) = 0; + virtual void SetNeedsMinPreferredLogicalWidth(bool) = 0; protected: ~WebSettings() = default;
diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni index 2a4020a..5d040fb 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni
@@ -511,8 +511,6 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_hid_report_info.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_hid_report_item.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_hid_report_item.h", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_hit_region_options.cc", - "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_hit_region_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_idb_database_info.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_idb_database_info.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_idb_index_parameters.cc",
diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index ac62fa4..c9d7f4b3 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni
@@ -95,7 +95,6 @@ "//third_party/blink/renderer/modules/canvas/canvas2d/canvas_pattern.idl", "//third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl", "//third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_settings.idl", - "//third_party/blink/renderer/modules/canvas/canvas2d/hit_region_options.idl", "//third_party/blink/renderer/modules/canvas/canvas2d/path_2d.idl", "//third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl", "//third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module.idl", @@ -1182,7 +1181,6 @@ static_idl_files_in_modules_for_testing = get_path_info( [ "//third_party/blink/renderer/modules/accessibility/testing/internals_accessibility.idl", - "//third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.idl", "//third_party/blink/renderer/modules/mediastream/testing/internals_media_stream.idl", "//third_party/blink/renderer/modules/netinfo/testing/internals_net_info.idl", "//third_party/blink/renderer/modules/peerconnection/testing/internals_rtc_certificate.idl",
diff --git a/third_party/blink/renderer/core/app_history/app_history.cc b/third_party/blink/renderer/core/app_history/app_history.cc index 62a21ef..d818d76 100644 --- a/third_party/blink/renderer/core/app_history/app_history.cc +++ b/third_party/blink/renderer/core/app_history/app_history.cc
@@ -10,7 +10,6 @@ #include "third_party/blink/public/web/web_frame_load_type.h" #include "third_party/blink/renderer/bindings/core/v8/script_function.h" #include "third_party/blink/renderer/bindings/core/v8/script_promise.h" -#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" #include "third_party/blink/renderer/bindings/core/v8/script_value.h" #include "third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_event_init.h" #include "third_party/blink/renderer/bindings/core/v8/v8_app_history_navigate_options.h" @@ -19,6 +18,7 @@ #include "third_party/blink/renderer/bindings/core/v8/v8_app_history_transition.h" #include "third_party/blink/renderer/bindings/core/v8/v8_app_history_update_current_options.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h" +#include "third_party/blink/renderer/core/app_history/app_history_api_navigation.h" #include "third_party/blink/renderer/core/app_history/app_history_destination.h" #include "third_party/blink/renderer/core/app_history/app_history_entry.h" #include "third_party/blink/renderer/core/app_history/app_history_navigate_event.h" @@ -38,114 +38,6 @@ namespace blink { -class AppHistoryApiNavigation final - : public GarbageCollected<AppHistoryApiNavigation> { - public: - AppHistoryApiNavigation(ScriptState* script_state, - AppHistory* app_history, - AppHistoryNavigationOptions* options, - const String& key, - scoped_refptr<SerializedScriptValue> state = nullptr) - : info(options->getInfoOr( - ScriptValue(script_state->GetIsolate(), - v8::Undefined(script_state->GetIsolate())))), - serialized_state(std::move(state)), - key(key), - app_history_(app_history), - committed_resolver_( - MakeGarbageCollected<ScriptPromiseResolver>(script_state)), - finished_resolver_( - MakeGarbageCollected<ScriptPromiseResolver>(script_state)), - result_(AppHistoryResult::Create()) { - result_->setCommitted(committed_resolver_->Promise()); - result_->setFinished(finished_resolver_->Promise()); - } - - ScriptValue info; - scoped_refptr<SerializedScriptValue> serialized_state; - String key; - - void NotifyAboutTheCommittedToEntry(AppHistoryEntry* entry) { - DCHECK_EQ(committed_to_entry_, nullptr); - committed_to_entry_ = entry; - - committed_resolver_->Resolve(committed_to_entry_); - - if (did_finish_before_commit_) { - ResolveFinishedPromise(); - } - } - - void ResolveFinishedPromise() { - if (!app_history_) - return; - - if (!committed_to_entry_) { - did_finish_before_commit_ = true; - return; - } - - finished_resolver_->Resolve(committed_to_entry_); - - app_history_->CleanupApiNavigation(*this); - app_history_ = nullptr; - } - - void RejectFinishedPromise(const ScriptValue& value) { - if (!app_history_) - return; - - finished_resolver_->Reject(value); - - if (committed_resolver_) { - // We never hit NotifyAboutTheCommittedToEntry(), so we should reject that - // too. - committed_resolver_->Reject(value); - } - - app_history_->CleanupApiNavigation(*this); - app_history_ = nullptr; - } - - void CleanupForCrossDocument() { - committed_resolver_->Detach(); - finished_resolver_->Detach(); - - DCHECK_EQ(committed_to_entry_, nullptr); - - serialized_state.reset(); - - app_history_->CleanupApiNavigation(*this); - app_history_ = nullptr; - } - - // Note: even though this returns the same AppHistoryResult every time, the - // bindings layer will create a new JS object for each distinct AppHistory - // method call, so we still match the specified semantics. - AppHistoryResult* GetAppHistoryResult() { return result_; } - - void Trace(Visitor* visitor) const { - visitor->Trace(info); - visitor->Trace(app_history_); - visitor->Trace(committed_to_entry_); - visitor->Trace(committed_resolver_); - visitor->Trace(finished_resolver_); - visitor->Trace(result_); - } - - private: - Member<AppHistory> app_history_; - Member<AppHistoryEntry> committed_to_entry_; - Member<ScriptPromiseResolver> committed_resolver_; - Member<ScriptPromiseResolver> finished_resolver_; - Member<AppHistoryResult> result_; - - // In same-document traversal cases ResolveFinishedPromise() can be called - // before NotifyAboutTheCommittedToEntry(). This tracks that, to let us ensure - // NotifyAboutTheCommittedToEntry() can also resolve the finished promise. - bool did_finish_before_commit_ = false; -}; - class NavigateReaction final : public ScriptFunction { public: enum class ResolveType { kFulfill, kReject }; @@ -511,9 +403,8 @@ "Navigation was aborted"); } - if (navigation->serialized_state) { - current()->GetItem()->SetAppHistoryState( - std::move(navigation->serialized_state)); + if (SerializedScriptValue* state = navigation->TakeSerializedState()) { + current()->GetItem()->SetAppHistoryState(state); } return navigation->GetAppHistoryResult(); } @@ -690,8 +581,8 @@ SerializedScriptValue* destination_state = nullptr; if (destination_item) destination_state = destination_item->GetAppHistoryState(); - else if (ongoing_navigation_ && ongoing_navigation_->serialized_state) - destination_state = ongoing_navigation_->serialized_state.get(); + else if (ongoing_navigation_) + destination_state = ongoing_navigation_->GetSerializedState(); AppHistoryDestination* destination = MakeGarbageCollected<AppHistoryDestination>( url, event_type != NavigateEventType::kCrossDocument, @@ -720,7 +611,7 @@ init->setFormData(FormData::Create(form, ASSERT_NO_EXCEPTION)); } if (ongoing_navigation_) - init->setInfo(ongoing_navigation_->info); + init->setInfo(ongoing_navigation_->GetInfo()); init->setSignal(MakeGarbageCollected<AbortSignal>(GetSupplementable())); auto* navigate_event = AppHistoryNavigateEvent::Create( GetSupplementable(), event_type_names::kNavigate, init); @@ -803,9 +694,9 @@ void AppHistory::RejectPromiseAndFireNavigateErrorEvent( AppHistoryApiNavigation* navigation, ScriptValue value) { - if (navigation) { + if (navigation) navigation->RejectFinishedPromise(value); - } + auto* isolate = GetSupplementable()->GetIsolate(); v8::Local<v8::Message> message = v8::Exception::CreateMessage(isolate, value.V8Value()); @@ -822,9 +713,9 @@ if (&navigation == ongoing_navigation_) { ongoing_navigation_ = nullptr; } else { - DCHECK(!navigation.key.IsNull()); - DCHECK(upcoming_traversals_.Contains(navigation.key)); - upcoming_traversals_.erase(navigation.key); + DCHECK(!navigation.GetKey().IsNull()); + DCHECK(upcoming_traversals_.Contains(navigation.GetKey())); + upcoming_traversals_.erase(navigation.GetKey()); } } @@ -840,8 +731,6 @@ ongoing_navigation_signal_ = nullptr; } - if (navigation) - navigation->serialized_state.reset(); RejectPromiseAndFireNavigateErrorEvent( navigation, ScriptValue::From(script_state, MakeGarbageCollected<DOMException>(
diff --git a/third_party/blink/renderer/core/app_history/app_history_api_navigation.cc b/third_party/blink/renderer/core/app_history/app_history_api_navigation.cc new file mode 100644 index 0000000..7fdda90 --- /dev/null +++ b/third_party/blink/renderer/core/app_history/app_history_api_navigation.cc
@@ -0,0 +1,105 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "third_party/blink/renderer/core/app_history/app_history_api_navigation.h" + +#include "base/check_op.h" +#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h" +#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_app_history_navigation_options.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_app_history_result.h" +#include "third_party/blink/renderer/core/app_history/app_history.h" +#include "third_party/blink/renderer/core/app_history/app_history_entry.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" + +namespace blink { + +AppHistoryApiNavigation::AppHistoryApiNavigation( + ScriptState* script_state, + AppHistory* app_history, + AppHistoryNavigationOptions* options, + const String& key, + scoped_refptr<SerializedScriptValue> state) + : serialized_state_(std::move(state)), + info_(options->getInfoOr( + ScriptValue(script_state->GetIsolate(), + v8::Undefined(script_state->GetIsolate())))), + key_(key), + app_history_(app_history), + committed_resolver_( + MakeGarbageCollected<ScriptPromiseResolver>(script_state)), + finished_resolver_( + MakeGarbageCollected<ScriptPromiseResolver>(script_state)), + result_(AppHistoryResult::Create()) { + result_->setCommitted(committed_resolver_->Promise()); + result_->setFinished(finished_resolver_->Promise()); +} + +void AppHistoryApiNavigation::NotifyAboutTheCommittedToEntry( + AppHistoryEntry* entry) { + DCHECK_EQ(committed_to_entry_, nullptr); + committed_to_entry_ = entry; + + committed_resolver_->Resolve(committed_to_entry_); + + if (did_finish_before_commit_) { + ResolveFinishedPromise(); + } +} + +void AppHistoryApiNavigation::ResolveFinishedPromise() { + if (!app_history_) + return; + + if (!committed_to_entry_) { + did_finish_before_commit_ = true; + return; + } + + finished_resolver_->Resolve(committed_to_entry_); + + app_history_->CleanupApiNavigation(*this); + app_history_ = nullptr; +} + +void AppHistoryApiNavigation::RejectFinishedPromise(const ScriptValue& value) { + if (!app_history_) + return; + + finished_resolver_->Reject(value); + + if (committed_resolver_) { + // We never hit NotifyAboutTheCommittedToEntry(), so we should reject that + // too. + committed_resolver_->Reject(value); + } + + serialized_state_.reset(); + + app_history_->CleanupApiNavigation(*this); + app_history_ = nullptr; +} + +void AppHistoryApiNavigation::CleanupForCrossDocument() { + DCHECK_EQ(committed_to_entry_, nullptr); + + committed_resolver_->Detach(); + finished_resolver_->Detach(); + + serialized_state_.reset(); + + app_history_->CleanupApiNavigation(*this); + app_history_ = nullptr; +} + +void AppHistoryApiNavigation::Trace(Visitor* visitor) const { + visitor->Trace(info_); + visitor->Trace(app_history_); + visitor->Trace(committed_to_entry_); + visitor->Trace(committed_resolver_); + visitor->Trace(finished_resolver_); + visitor->Trace(result_); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/app_history/app_history_api_navigation.h b/third_party/blink/renderer/core/app_history/app_history_api_navigation.h new file mode 100644 index 0000000..d906c4a --- /dev/null +++ b/third_party/blink/renderer/core/app_history/app_history_api_navigation.h
@@ -0,0 +1,73 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_APP_HISTORY_APP_HISTORY_API_NAVIGATION_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_APP_HISTORY_APP_HISTORY_API_NAVIGATION_H_ + +#include "base/memory/scoped_refptr.h" +#include "third_party/blink/renderer/bindings/core/v8/script_value.h" +#include "third_party/blink/renderer/platform/heap/heap_allocator.h" +#include "third_party/blink/renderer/platform/heap/member.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + +namespace blink { + +class AppHistory; +class AppHistoryEntry; +class AppHistoryResult; +class AppHistoryNavigationOptions; +class ScriptState; +class ScriptPromiseResolver; +class SerializedScriptValue; + +class AppHistoryApiNavigation final + : public GarbageCollected<AppHistoryApiNavigation> { + public: + AppHistoryApiNavigation(ScriptState*, + AppHistory*, + AppHistoryNavigationOptions*, + const String& key, + scoped_refptr<SerializedScriptValue> state = nullptr); + + void NotifyAboutTheCommittedToEntry(AppHistoryEntry*); + void ResolveFinishedPromise(); + void RejectFinishedPromise(const ScriptValue& value); + void CleanupForCrossDocument(); + + // Note: even though this returns the same AppHistoryResult every time, the + // bindings layer will create a new JS object for each distinct AppHistory + // method call, so we still match the specified semantics. + AppHistoryResult* GetAppHistoryResult() const { return result_; } + + const ScriptValue& GetInfo() const { return info_; } + const String& GetKey() const { return key_; } + + SerializedScriptValue* TakeSerializedState() { + return serialized_state_.release(); + } + SerializedScriptValue* GetSerializedState() const { + return serialized_state_.get(); + } + + void Trace(Visitor* visitor) const; + + private: + scoped_refptr<SerializedScriptValue> serialized_state_; + ScriptValue info_; + String key_; + Member<AppHistory> app_history_; + Member<AppHistoryEntry> committed_to_entry_; + Member<ScriptPromiseResolver> committed_resolver_; + Member<ScriptPromiseResolver> finished_resolver_; + Member<AppHistoryResult> result_; + + // In same-document traversal cases ResolveFinishedPromise() can be called + // before NotifyAboutTheCommittedToEntry(). This tracks that, to let us ensure + // NotifyAboutTheCommittedToEntry() can also resolve the finished promise. + bool did_finish_before_commit_ = false; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_APP_HISTORY_APP_HISTORY_API_NAVIGATION_H_
diff --git a/third_party/blink/renderer/core/app_history/build.gni b/third_party/blink/renderer/core/app_history/build.gni index d20f778..2487b07 100644 --- a/third_party/blink/renderer/core/app_history/build.gni +++ b/third_party/blink/renderer/core/app_history/build.gni
@@ -5,6 +5,8 @@ blink_core_sources_app_history = [ "app_history.cc", "app_history.h", + "app_history_api_navigation.cc", + "app_history_api_navigation.h", "app_history_destination.h", "app_history_entry.cc", "app_history_entry.h",
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc index 1e9b36c..bbb594e 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4332,16 +4332,6 @@ result.InnerElement()); } - if (auto* canvas = DynamicTo<HTMLCanvasElement>(result.InnerNode())) { - HitTestCanvasResult* hit_test_canvas_result = - canvas->GetControlAndIdIfHitRegionExists( - result.PointInInnerNodeFrame()); - if (hit_test_canvas_result->GetControl()) { - result.SetInnerNode(hit_test_canvas_result->GetControl()); - } - result.SetCanvasRegionId(hit_test_canvas_result->GetId()); - } - return MouseEventWithHitTestResults(event, location, result); }
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.cc b/third_party/blink/renderer/core/execution_context/execution_context.cc index 2c5ff56..f71c1794 100644 --- a/third_party/blink/renderer/core/execution_context/execution_context.cc +++ b/third_party/blink/renderer/core/execution_context/execution_context.cc
@@ -586,21 +586,28 @@ bool ExecutionContext::IsFeatureEnabled( mojom::blink::PermissionsPolicyFeature feature, - ReportOptions report_on_failure, - const String& message) const { + ReportOptions report_option, + const String& message) { bool should_report; bool enabled = security_context_.IsFeatureEnabled(feature, &should_report); - if (should_report && report_on_failure == ReportOptions::kReportOnFailure) { + if (should_report && report_option == ReportOptions::kReportOnFailure) { mojom::blink::PolicyDisposition disposition = enabled ? mojom::blink::PolicyDisposition::kReport : mojom::blink::PolicyDisposition::kEnforce; + ReportPermissionsPolicyViolation(feature, disposition, message); } return enabled; } bool ExecutionContext::IsFeatureEnabled( + mojom::blink::PermissionsPolicyFeature feature) const { + bool should_report; + return security_context_.IsFeatureEnabled(feature, &should_report); +} + +bool ExecutionContext::IsFeatureEnabled( mojom::blink::DocumentPolicyFeature feature, ReportOptions report_option, const String& message,
diff --git a/third_party/blink/renderer/core/execution_context/execution_context.h b/third_party/blink/renderer/core/execution_context/execution_context.h index 25bfbaa..87a98170 100644 --- a/third_party/blink/renderer/core/execution_context/execution_context.h +++ b/third_party/blink/renderer/core/execution_context/execution_context.h
@@ -332,10 +332,12 @@ // Report-To endpoints, via ReportPermissionsPolicyViolation(), if the feature // is disabled. The optional ConsoleMessage will be sent to the console if // present, or else a default message will be used instead. + bool IsFeatureEnabled(mojom::blink::PermissionsPolicyFeature) const; bool IsFeatureEnabled( mojom::blink::PermissionsPolicyFeature, - ReportOptions report_on_failure = ReportOptions::kDoNotReport, - const String& message = g_empty_string) const; + ReportOptions report_option = ReportOptions::kDoNotReport, + const String& message = g_empty_string); + bool IsFeatureEnabled( mojom::blink::DocumentPolicyFeature, ReportOptions report_option = ReportOptions::kDoNotReport,
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.cc b/third_party/blink/renderer/core/exported/web_settings_impl.cc index 8580bfa..6d1afeee 100644 --- a/third_party/blink/renderer/core/exported/web_settings_impl.cc +++ b/third_party/blink/renderer/core/exported/web_settings_impl.cc
@@ -814,4 +814,8 @@ settings_->SetLitePageSubresourceRedirectOrigin(origin); } +void WebSettingsImpl::SetNeedsMinPreferredLogicalWidth(bool enabled) { + settings_->SetNeedsMinPreferredLogicalWidth(enabled); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.h b/third_party/blink/renderer/core/exported/web_settings_impl.h index f4468e25..12965679 100644 --- a/third_party/blink/renderer/core/exported/web_settings_impl.h +++ b/third_party/blink/renderer/core/exported/web_settings_impl.h
@@ -233,6 +233,7 @@ void SetAccessibilityIncludeSvgGElement(bool) override; void SetWebXRImmersiveArAllowed(bool webxr_immersive_ar_allowed) override; void SetLitePageSubresourceRedirectOrigin(const WebString&) override; + void SetNeedsMinPreferredLogicalWidth(bool) override; bool RenderVSyncNotificationEnabled() const { return render_v_sync_notification_enabled_;
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc index 7995eb1..5abb37f 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -2745,7 +2745,7 @@ auto* main_local_frame = DynamicTo<LocalFrame>(page_->MainFrame()); Document* document = main_local_frame->GetDocument(); - if (!document || !document->GetLayoutView() || !document->documentElement() || + if (!document || !document->documentElement() || !document->documentElement()->GetLayoutBox()) return gfx::Size(); @@ -2753,11 +2753,10 @@ DCHECK(!document->NeedsLayoutTreeUpdate() && !document->View()->NeedsLayout()); - // Needed for computing MinPreferredWidth. - FontCachePurgePreventer fontCachePurgePreventer; - int width_scaled = document->GetLayoutView() - ->PreferredLogicalWidths() - .min_size.Round(); // Already accounts for zoom. + int width_scaled = document->View() + ->MinPreferredLogicalWidth() + .Round(); // Already accounts for zoom. + int height_scaled = document->documentElement()->GetLayoutBox()->ScrollHeight().Round(); return gfx::Size(width_scaled, height_scaled); @@ -2787,6 +2786,9 @@ void WebViewImpl::EnablePreferredSizeChangedMode() { if (send_preferred_size_changes_) return; + + page_->GetSettings().SetNeedsMinPreferredLogicalWidth(true); + send_preferred_size_changes_ = true; needs_preferred_size_update_ = true;
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc index 92d781a..8f3e40f3 100644 --- a/third_party/blink/renderer/core/exported/web_view_test.cc +++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -4585,6 +4585,7 @@ url_test_helpers::RegisterMockedURLLoad( ToKURL(url), test::CoreTestDataPath("specify_size.html")); WebView* web_view = web_view_helper_.InitializeAndLoad(url); + web_view->EnablePreferredSizeChangedMode(); gfx::Size size = web_view->ContentsPreferredMinimumSize(); EXPECT_EQ(100, size.width()); @@ -4614,6 +4615,7 @@ url_test_helpers::RegisterMockedURLLoad( ToKURL(url), test::CoreTestDataPath("specify_size.html")); web_view = web_view_helper_.InitializeAndLoad(url); + web_view->EnablePreferredSizeChangedMode(); web_view->SetZoomLevel(PageZoomFactorToZoomLevel(1)); UpdateAllLifecyclePhases(); @@ -4633,6 +4635,7 @@ </body> </html>)HTML", url_test_helpers::ToKURL("http://example.com/")); + web_view->EnablePreferredSizeChangedMode(); gfx::Size size = web_view->ContentsPreferredMinimumSize(); EXPECT_EQ(99, size.width()); @@ -4656,18 +4659,17 @@ </div> )HTML", base_url); + web_view->EnablePreferredSizeChangedMode(); gfx::Size size = web_view->ContentsPreferredMinimumSize(); - if (RuntimeEnabledFeatures::LayoutNGEnabled()) - EXPECT_EQ(0, size.width()); - else - EXPECT_EQ(100, size.width()); - + EXPECT_EQ(100, size.width()); EXPECT_EQ(100, size.height()); } TEST_F(WebViewTest, PreferredSizeWithNGGridSkipped) { WebViewImpl* web_view = web_view_helper_.Initialize(); + web_view->GetSettings()->SetNeedsMinPreferredLogicalWidth(true); + WebURL base_url = url_test_helpers::ToKURL("http://example.com/"); frame_test_helpers::LoadHTMLString(web_view->MainFrameImpl(), R"HTML(<!DOCTYPE html> @@ -4712,6 +4714,7 @@ </body> )HTML", base_url); + web_view->EnablePreferredSizeChangedMode(); gfx::Size size = web_view->ContentsPreferredMinimumSize(); EXPECT_EQ(200, size.width()); @@ -4729,6 +4732,7 @@ </body> )HTML", base_url); + web_view->EnablePreferredSizeChangedMode(); gfx::Size size = web_view->ContentsPreferredMinimumSize(); EXPECT_EQ(200, size.width());
diff --git a/third_party/blink/renderer/core/frame/device_single_window_event_controller.cc b/third_party/blink/renderer/core/frame/device_single_window_event_controller.cc index 271af57ad..525d77c7 100644 --- a/third_party/blink/renderer/core/frame/device_single_window_event_controller.cc +++ b/third_party/blink/renderer/core/frame/device_single_window_event_controller.cc
@@ -88,7 +88,7 @@ bool DeviceSingleWindowEventController::CheckPolicyFeatures( const Vector<mojom::blink::PermissionsPolicyFeature>& features) const { - const LocalDOMWindow& window = GetWindow(); + LocalDOMWindow& window = GetWindow(); return std::all_of(features.begin(), features.end(), [&window](mojom::blink::PermissionsPolicyFeature feature) { return window.IsFeatureEnabled(
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc index 70c61685..62f9bec 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -793,6 +793,13 @@ // functions so that a single human could understand what layout() is actually // doing. + if (const auto* settings = frame_->GetSettings()) { + if (settings->GetNeedsMinPreferredLogicalWidth()) { + min_preferred_logical_width_ = + GetLayoutView()->PreferredLogicalWidths().min_size; + } + } + { // TODO(szager): Remove this after diagnosing crash. DocumentLifecycle::CheckNoTransitionScope check_no_transition(Lifecycle());
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.h b/third_party/blink/renderer/core/frame/local_frame_view.h index d3e13735..b11d3bb 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.h +++ b/third_party/blink/renderer/core/frame/local_frame_view.h
@@ -209,6 +209,10 @@ void UpdateStyleAndLayout(); + LayoutUnit MinPreferredLogicalWidth() const { + return min_preferred_logical_width_; + } + // Marks this frame, and ancestor frames, as needing one intersection // observervation. This overrides throttling for one frame, up to // kLayoutClean. The order of these enums is important - they must proceed @@ -425,6 +429,7 @@ void IncrementVisuallyNonEmptyPixelCount(const IntSize&); bool IsVisuallyNonEmpty() const { return is_visually_non_empty_; } void SetIsVisuallyNonEmpty() { is_visually_non_empty_ = true; } + void EnableAutoSizeMode(const IntSize& min_size, const IntSize& max_size); void DisableAutoSizeMode(); @@ -1065,6 +1070,8 @@ bool needs_update_geometries_; + LayoutUnit min_preferred_logical_width_; + #if DCHECK_IS_ON() // Verified when finalizing. bool has_been_disposed_ = false;
diff --git a/third_party/blink/renderer/core/frame/settings.json5 b/third_party/blink/renderer/core/frame/settings.json5 index aa180d1..95701949 100644 --- a/third_party/blink/renderer/core/frame/settings.json5 +++ b/third_party/blink/renderer/core/frame/settings.json5
@@ -1099,5 +1099,10 @@ name: "LitePageSubresourceRedirectOrigin", type: "String", }, + { + name: "needsMinPreferredLogicalWidth", + initial: false, + invalidate: ["NeedsMinPreferredLogicalWidth"], + }, ], }
diff --git a/third_party/blink/renderer/core/frame/settings_delegate.h b/third_party/blink/renderer/core/frame/settings_delegate.h index e631601..7f5c9f76 100644 --- a/third_party/blink/renderer/core/frame/settings_delegate.h +++ b/third_party/blink/renderer/core/frame/settings_delegate.h
@@ -73,6 +73,7 @@ kSpatialNavigation, kUniversalAccess, kVisionDeficiency, + kNeedsMinPreferredLogicalWidth, }; virtual void SettingsChanged(ChangeType) = 0;
diff --git a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h index 2ead316..79ba5ef 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h +++ b/third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h
@@ -207,15 +207,9 @@ virtual void ClearRect(double x, double y, double width, double height) {} virtual void DidSetSurfaceSize() {} virtual void SetShouldAntialias(bool) {} - virtual unsigned HitRegionsCount() const { return 0; } virtual void setFont(const String&) {} virtual void StyleDidChange(const ComputedStyle* old_style, const ComputedStyle& new_style) {} - virtual HitTestCanvasResult* GetControlAndIdIfHitRegionExists( - const PhysicalOffset& location) { - NOTREACHED(); - return MakeGarbageCollected<HitTestCanvasResult>(String(), nullptr); - } virtual String GetIdFromControl(const Element* element) { return String(); } virtual void ResetUsageTracking() {}
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc index f0b01e0..8feea66 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.cc
@@ -1428,86 +1428,6 @@ return GetPage() && GetPage()->IsPageVisible(); } -bool HTMLCanvasElement::IsSupportedInteractiveCanvasFallback( - const Element& element) { - if (!element.IsDescendantOf(this)) - return false; - - // An element is a supported interactive canvas fallback element if it is one - // of the following: - // https://html.spec.whatwg.org/C/#supported-interactive-canvas-fallback-element - - // An a element that represents a hyperlink and that does not have any img - // descendants. - if (IsA<HTMLAnchorElement>(element)) - return !Traversal<HTMLImageElement>::FirstWithin(element); - - // A button element - if (IsA<HTMLButtonElement>(element)) - return true; - - // An input element whose type attribute is in one of the Checkbox or Radio - // Button states. An input element that is a button but its type attribute is - // not in the Image Button state. - if (auto* input_element = DynamicTo<HTMLInputElement>(element)) { - if (input_element->type() == input_type_names::kCheckbox || - input_element->type() == input_type_names::kRadio || - input_element->IsTextButton()) { - return true; - } - } - - // A select element with a "multiple" attribute or with a display size greater - // than 1. - if (auto* select_element = DynamicTo<HTMLSelectElement>(element)) { - if (select_element->IsMultiple() || select_element->size() > 1) - return true; - } - - // An option element that is in a list of options of a select element with a - // "multiple" attribute or with a display size greater than 1. - const auto* parent_select = - IsA<HTMLOptionElement>(element) - ? DynamicTo<HTMLSelectElement>(element.parentNode()) - : nullptr; - - if (parent_select && - (parent_select->IsMultiple() || parent_select->size() > 1)) - return true; - - // An element that would not be interactive content except for having the - // tabindex attribute specified. - if (element.FastHasAttribute(html_names::kTabindexAttr)) - return true; - - // A non-interactive table, caption, thead, tbody, tfoot, tr, td, or th - // element. - if (IsA<HTMLTableElement>(element) || - element.HasTagName(html_names::kCaptionTag) || - element.HasTagName(html_names::kTheadTag) || - element.HasTagName(html_names::kTbodyTag) || - element.HasTagName(html_names::kTfootTag) || - element.HasTagName(html_names::kTrTag) || - element.HasTagName(html_names::kTdTag) || - element.HasTagName(html_names::kThTag)) - return true; - - return false; -} - -HitTestCanvasResult* HTMLCanvasElement::GetControlAndIdIfHitRegionExists( - const PhysicalOffset& location) { - if (IsRenderingContext2D()) - return context_->GetControlAndIdIfHitRegionExists(location); - return MakeGarbageCollected<HitTestCanvasResult>(String(), nullptr); -} - -String HTMLCanvasElement::GetIdFromControl(const Element* element) { - if (context_) - return context_->GetIdFromControl(element); - return String(); -} - bool HTMLCanvasElement::CreateLayer() { DCHECK(!surface_layer_bridge_); LocalFrame* frame = GetDocument().GetFrame();
diff --git a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h index 5b3439d..c8a10e2 100644 --- a/third_party/blink/renderer/core/html/canvas/html_canvas_element.h +++ b/third_party/blink/renderer/core/html/canvas/html_canvas_element.h
@@ -70,7 +70,6 @@ class CanvasRenderingContext; class CanvasRenderingContextFactory; class GraphicsContext; -class HitTestCanvasResult; class HTMLCanvasElement; class ImageBitmapOptions; class IntSize; @@ -261,11 +260,6 @@ void NotifyListenersCanvasChanged(); - // For Canvas HitRegions - bool IsSupportedInteractiveCanvasFallback(const Element&); - HitTestCanvasResult* GetControlAndIdIfHitRegionExists(const PhysicalOffset&); - String GetIdFromControl(const Element*); - // For OffscreenCanvas that controls this html canvas element ::blink::SurfaceLayerBridge* SurfaceLayerBridge() const { return surface_layer_bridge_.get();
diff --git a/third_party/blink/renderer/core/input/mouse_event_manager.cc b/third_party/blink/renderer/core/input/mouse_event_manager.cc index 426b1113..08f8974f 100644 --- a/third_party/blink/renderer/core/input/mouse_event_manager.cc +++ b/third_party/blink/renderer/core/input/mouse_event_manager.cc
@@ -58,20 +58,7 @@ namespace { String CanvasRegionId(Node* node, const WebMouseEvent& mouse_event) { - auto* element = DynamicTo<Element>(node); - if (!element) - return String(); - - if (!element->IsInCanvasSubtree()) - return String(); - - HTMLCanvasElement* canvas = - Traversal<HTMLCanvasElement>::FirstAncestorOrSelf(*element); - // In this case, the event target is canvas and mouse rerouting doesn't - // happen. - if (canvas == element) - return String(); - return canvas->GetIdFromControl(element); + return String(); } void UpdateMouseMovementXY(const WebMouseEvent& mouse_event,
diff --git a/third_party/blink/renderer/core/input/pointer_event_manager.cc b/third_party/blink/renderer/core/input/pointer_event_manager.cc index 4de90471..1e19f0fe 100644 --- a/third_party/blink/renderer/core/input/pointer_event_manager.cc +++ b/third_party/blink/renderer/core/input/pointer_event_manager.cc
@@ -434,14 +434,6 @@ Element* target = hit_test_tesult.InnerElement(); if (target) { pointer_event_target.target_frame = target->GetDocument().GetFrame(); - if (auto* canvas = DynamicTo<HTMLCanvasElement>(target)) { - HitTestCanvasResult* hit_test_canvas_result = - canvas->GetControlAndIdIfHitRegionExists( - hit_test_tesult.PointInInnerNodeFrame()); - if (hit_test_canvas_result->GetControl()) - target = hit_test_canvas_result->GetControl(); - pointer_event_target.region = hit_test_canvas_result->GetId(); - } pointer_event_target.target_element = target; } } else {
diff --git a/third_party/blink/renderer/core/input/touch_event_manager.cc b/third_party/blink/renderer/core/input/touch_event_manager.cc index 9260b09..0e9575d 100644 --- a/third_party/blink/renderer/core/input/touch_event_manager.cc +++ b/third_party/blink/renderer/core/input/touch_event_manager.cc
@@ -544,14 +544,6 @@ Node* node = result.InnerNode(); if (!node) return; - if (auto* canvas = DynamicTo<HTMLCanvasElement>(node)) { - HitTestCanvasResult* hit_test_canvas_result = - canvas->GetControlAndIdIfHitRegionExists( - result.PointInInnerNodeFrame()); - if (hit_test_canvas_result->GetControl()) - node = hit_test_canvas_result->GetControl(); - region = hit_test_canvas_result->GetId(); - } // Touch events should not go to text nodes. if (node->IsTextNode()) node = FlatTreeTraversal::Parent(*node);
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.cc index bbfa326..0f24de6 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.cc
@@ -347,33 +347,58 @@ } } + scoped_refptr<const NGLayoutResult> result; + bool is_past_end = BreakToken() && BreakToken()->IsAtBlockEnd(); + + LayoutUnit max_content_block_size = LayoutUnit::Max(); + if (adjusted_padding_box_size.block_size == kIndefiniteSize) { + max_content_block_size = + ResolveMaxBlockLength(ConstraintSpace(), Style(), BorderPadding(), + Style().LogicalMaxHeight()); + } + + // If we are past the block-end and had previously laid out the content with a + // block-size limitation, skip the normal layout call and apply the block-size + // limitation for all future fragments. + if (!is_past_end || max_content_block_size == LayoutUnit::Max()) { + auto child_space = CreateConstraintSpaceForFieldsetContent( + fieldset_content, adjusted_padding_box_size, intrinsic_block_size_); + result = fieldset_content.Layout(child_space, content_break_token, + early_break_in_child); + } + // If the following conditions meet, the content should be laid out with // a block-size limitation: // - The FIELDSET block-size is indefinite. // - It has max-block-size. // - The intrinsic block-size of the content is larger than the // max-block-size. - if (adjusted_padding_box_size.block_size == kIndefiniteSize) { - LayoutUnit max_content_block_size = - ResolveMaxBlockLength(ConstraintSpace(), Style(), BorderPadding(), - Style().LogicalMaxHeight()); - if (max_content_block_size != LayoutUnit::Max()) { - max_content_block_size -= BorderPadding().BlockSum(); + if (max_content_block_size != LayoutUnit::Max() && + (!result || result->Status() == NGLayoutResult::kSuccess)) { + DCHECK_EQ(adjusted_padding_box_size.block_size, kIndefiniteSize); + max_content_block_size -= BorderPadding().BlockSum(); - auto child_measure_space = CreateConstraintSpaceForFieldsetContent( - fieldset_content, adjusted_padding_box_size, intrinsic_block_size_, - NGCacheSlot::kMeasure); - LayoutUnit intrinsic_content_block_size = - fieldset_content.Layout(child_measure_space)->IntrinsicBlockSize(); - if (intrinsic_content_block_size > max_content_block_size) - adjusted_padding_box_size.block_size = max_content_block_size; + if (result) { + const auto& fragment = result->PhysicalFragment(); + LayoutUnit total_block_size = + NGFragment(writing_direction_, fragment).BlockSize(); + if (content_break_token) + total_block_size += content_break_token->ConsumedBlockSize(); + if (total_block_size >= max_content_block_size) + result = nullptr; + } else { + DCHECK(is_past_end); + } + + if (!result) { + adjusted_padding_box_size.block_size = max_content_block_size; + auto adjusted_child_space = CreateConstraintSpaceForFieldsetContent( + fieldset_content, adjusted_padding_box_size, intrinsic_block_size_); + result = fieldset_content.Layout( + adjusted_child_space, content_break_token, early_break_in_child); } } - auto child_space = CreateConstraintSpaceForFieldsetContent( - fieldset_content, adjusted_padding_box_size, intrinsic_block_size_, - NGCacheSlot::kLayout); - auto result = fieldset_content.Layout(child_space, content_break_token, - early_break_in_child); + DCHECK(result); NGBreakStatus break_status = NGBreakStatus::kContinue; if (ConstraintSpace().HasBlockFragmentation() && !early_break_) { @@ -483,13 +508,11 @@ NGFieldsetLayoutAlgorithm::CreateConstraintSpaceForFieldsetContent( NGBlockNode fieldset_content, LogicalSize padding_box_size, - LayoutUnit block_offset, - NGCacheSlot slot) { + LayoutUnit block_offset) { DCHECK(fieldset_content.CreatesNewFormattingContext()); NGConstraintSpaceBuilder builder( ConstraintSpace(), fieldset_content.Style().GetWritingDirection(), /* is_new_fc */ true); - builder.SetCacheSlot(slot); builder.SetAvailableSize(padding_box_size); builder.SetInlineAutoBehavior(NGAutoBehavior::kStretchImplicit); // We pass the container's PercentageResolutionSize because percentage @@ -503,8 +526,7 @@ ConstraintSpace().PercentageResolutionSize()); builder.SetIsFixedBlockSize(padding_box_size.block_size != kIndefiniteSize); - if (ConstraintSpace().HasBlockFragmentation() && - slot != NGCacheSlot::kMeasure) { + if (ConstraintSpace().HasBlockFragmentation()) { SetupSpaceBuilderForFragmentation(ConstraintSpace(), fieldset_content, block_offset, &builder, /* is_new_fc */ true);
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.h b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.h index a79a1cc..f865721 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.h +++ b/third_party/blink/renderer/core/layout/ng/ng_fieldset_layout_algorithm.h
@@ -52,8 +52,7 @@ const NGConstraintSpace CreateConstraintSpaceForFieldsetContent( NGBlockNode fieldset_content, LogicalSize padding_box_size, - LayoutUnit block_offset, - NGCacheSlot slot); + LayoutUnit block_offset); // Return the amount of block space available in the current fragmentainer // for the node being laid out by this algorithm.
diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/renderer/core/page/page.cc index 3afca24..10858b8bd 100644 --- a/third_party/blink/renderer/core/page/page.cc +++ b/third_party/blink/renderer/core/page/page.cc
@@ -821,6 +821,14 @@ main_local_frame->GetDocument()->VisionDeficiencyChanged(); break; } + case ChangeType::kNeedsMinPreferredLogicalWidth: + if (auto* local_frame = DynamicTo<LocalFrame>(MainFrame())) { + if (LocalFrameView* view = local_frame->View()) { + view->SetNeedsLayout(); + view->ScheduleRelayout(); + } + } + break; } }
diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn index 256bec313..9e2f8a3 100644 --- a/third_party/blink/renderer/modules/BUILD.gn +++ b/third_party/blink/renderer/modules/BUILD.gn
@@ -199,8 +199,6 @@ sources = [ "accessibility/testing/internals_accessibility.cc", "accessibility/testing/internals_accessibility.h", - "canvas/canvas2d/testing/internals_canvas_rendering_context_2d.cc", - "canvas/canvas2d/testing/internals_canvas_rendering_context_2d.h", "mediastream/testing/internals_media_stream.cc", "mediastream/testing/internals_media_stream.h", "netinfo/testing/internals_net_info.cc",
diff --git a/third_party/blink/renderer/modules/canvas/BUILD.gn b/third_party/blink/renderer/modules/canvas/BUILD.gn index 807fd66..ca6c394c 100644 --- a/third_party/blink/renderer/modules/canvas/BUILD.gn +++ b/third_party/blink/renderer/modules/canvas/BUILD.gn
@@ -33,8 +33,6 @@ "canvas2d/canvas_style.h", "canvas2d/clip_list.cc", "canvas2d/clip_list.h", - "canvas2d/hit_region.cc", - "canvas2d/hit_region.h", "canvas2d/identifiability_study_helper.cc", "canvas2d/identifiability_study_helper.h", "canvas2d/path_2d.cc",
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc index 601a952..6093f1e 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
@@ -62,7 +62,6 @@ #include "third_party/blink/renderer/core/scroll/scroll_alignment.h" #include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h" #include "third_party/blink/renderer/modules/canvas/canvas2d/canvas_style.h" -#include "third_party/blink/renderer/modules/canvas/canvas2d/hit_region.h" #include "third_party/blink/renderer/modules/canvas/canvas2d/path_2d.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/fonts/font_cache.h" @@ -241,7 +240,6 @@ } void CanvasRenderingContext2D::Trace(Visitor* visitor) const { - visitor->Trace(hit_region_manager_); visitor->Trace(filter_operations_); CanvasRenderingContext::Trace(visitor); BaseRenderingContext2D::Trace(visitor); @@ -396,17 +394,6 @@ double width, double height) { BaseRenderingContext2D::clearRect(x, y, width, height); - - if (UNLIKELY(hit_region_manager_) && LIKELY(std::isfinite(x)) && - LIKELY(std::isfinite(y)) && LIKELY(std::isfinite(width)) && - LIKELY(std::isfinite(height))) { - FloatRect rect(clampTo<float>(x), clampTo<float>(y), clampTo<float>(width), - clampTo<float>(height)); - auto transform = GetState().GetAffineTransform(); - PostDeferrableAction(WTF::Bind(&HitRegionManager::RemoveHitRegionsInRect, - WrapPersistent(hit_region_manager_.Get()), - rect, transform)); - } } sk_sp<PaintFilter> CanvasRenderingContext2D::StateGetFilter() { @@ -679,45 +666,6 @@ return ::blink::ParseColorOrCurrentColor(color, color_string, canvas()); } -HitTestCanvasResult* CanvasRenderingContext2D::GetControlAndIdIfHitRegionExists( - const PhysicalOffset& location) { - if (HitRegionsCount() <= 0) - return MakeGarbageCollected<HitTestCanvasResult>(String(), nullptr); - - LayoutBox* box = canvas()->GetLayoutBox(); - FloatPoint local_pos(box->AbsoluteToLocalPoint(location)); - if (box->StyleRef().HasBorder() || box->StyleRef().MayHavePadding()) - local_pos.Move(FloatSize(-box->PhysicalContentBoxOffset())); - float scaleWidth = box->ContentWidth().ToFloat() == 0.0f - ? 1.0f - : canvas()->width() / box->ContentWidth(); - float scaleHeight = box->ContentHeight().ToFloat() == 0.0f - ? 1.0f - : canvas()->height() / box->ContentHeight(); - local_pos.Scale(scaleWidth, scaleHeight); - - HitRegion* hit_region = HitRegionAtPoint(local_pos); - if (hit_region) { - Element* control = hit_region->Control(); - if (control && canvas()->IsSupportedInteractiveCanvasFallback(*control)) { - return MakeGarbageCollected<HitTestCanvasResult>(hit_region->Id(), - hit_region->Control()); - } - return MakeGarbageCollected<HitTestCanvasResult>(hit_region->Id(), nullptr); - } - return MakeGarbageCollected<HitTestCanvasResult>(String(), nullptr); -} - -String CanvasRenderingContext2D::GetIdFromControl(const Element* element) { - if (HitRegionsCount() <= 0) - return String(); - - if (HitRegion* hit_region = - hit_region_manager_->GetHitRegionByControl(element)) - return hit_region->Id(); - return String(); -} - static inline TextDirection ToTextDirection( CanvasRenderingContext2DState::Direction direction, HTMLCanvasElement* canvas, @@ -1247,83 +1195,6 @@ ax_object_cache->SetCanvasObjectBounds(canvas(), element, element_rect); } -void CanvasRenderingContext2D::addHitRegion(const HitRegionOptions* options, - ExceptionState& exception_state) { - if (options->id().IsEmpty() && !options->control()) { - exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError, - "Both id and control are null."); - return; - } - - if (options->control() && - !canvas()->IsSupportedInteractiveCanvasFallback(*options->control())) { - exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError, - "The control is neither null nor a " - "supported interactive canvas fallback " - "element."); - return; - } - - Path hit_region_path = options->path() ? options->path()->GetPath() : path_; - - cc::PaintCanvas* c = GetOrCreatePaintCanvas(); - - if (hit_region_path.IsEmpty() || !c || !IsTransformInvertible() || - c->isClipEmpty()) { - exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError, - "The specified path has no pixels."); - return; - } - - hit_region_path.Transform(GetState().GetAffineTransform()); - - if (GetState().HasClip()) { - hit_region_path = - GetState().IntersectPathWithClip(hit_region_path.GetSkPath()); - if (hit_region_path.IsEmpty()) { - exception_state.ThrowDOMException(DOMExceptionCode::kNotSupportedError, - "The specified path has no pixels."); - } - } - - if (!hit_region_manager_) - hit_region_manager_ = MakeGarbageCollected<HitRegionManager>(); - - // Remove previous region (with id or control) - hit_region_manager_->RemoveHitRegionById(options->id()); - hit_region_manager_->RemoveHitRegionByControl(options->control()); - - auto* hit_region = MakeGarbageCollected<HitRegion>(hit_region_path, options); - Element* element = hit_region->Control(); - if (element && element->IsDescendantOf(canvas())) - UpdateElementAccessibility(hit_region->GetPath(), hit_region->Control()); - hit_region_manager_->AddHitRegion(hit_region); -} - -void CanvasRenderingContext2D::removeHitRegion(const String& id) { - if (hit_region_manager_) - hit_region_manager_->RemoveHitRegionById(id); -} - -void CanvasRenderingContext2D::clearHitRegions() { - if (hit_region_manager_) - hit_region_manager_->RemoveAllHitRegions(); -} - -HitRegion* CanvasRenderingContext2D::HitRegionAtPoint(const FloatPoint& point) { - if (hit_region_manager_) - return hit_region_manager_->GetHitRegionAtPoint(point); - - return nullptr; -} - -unsigned CanvasRenderingContext2D::HitRegionsCount() const { - if (hit_region_manager_) - return hit_region_manager_->GetHitRegionsCount(); - - return 0; -} - // TODO(aaronhk) This is only used for the size heuristic. Delete this function // once always accelerate fully lands. void CanvasRenderingContext2D::DisableAcceleration() {
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h index 3d5ee9e..d1d81b5a 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
@@ -60,10 +60,6 @@ class Element; class ExceptionState; class Font; -class HitRegion; -class HitRegionOptions; -class HitRegionManager; -class HitTestCanvasResult; class Path2D; class TextMetrics; @@ -147,12 +143,6 @@ void drawFocusIfNeeded(Element*); void drawFocusIfNeeded(Path2D*, Element*); - void addHitRegion(const HitRegionOptions*, ExceptionState&); - void removeHitRegion(const String& id); - void clearHitRegions(); - HitRegion* HitRegionAtPoint(const FloatPoint&); - unsigned HitRegionsCount() const override; - void LoseContext(LostContextMode) override; void DidSetSurfaceSize() override; @@ -163,9 +153,6 @@ void StyleDidChange(const ComputedStyle* old_style, const ComputedStyle& new_style) override; - HitTestCanvasResult* GetControlAndIdIfHitRegionExists( - const PhysicalOffset& location) override; - String GetIdFromControl(const Element*) override; // SVGResourceClient implementation void ResourceContentChanged(SVGResource*) override; @@ -298,8 +285,6 @@ cc::Layer* CcLayer() const override; bool IsCanvas2DBufferValid() const override; - Member<HitRegionManager> hit_region_manager_; - FilterOperations filter_operations_; HashMap<String, FontDescription> fonts_resolved_using_current_style_; bool should_prune_local_font_cache_;
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl index 2ca0843..a11aab4 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.idl
@@ -141,11 +141,6 @@ [CallWith=ScriptState, RaisesException] void drawImage(CanvasImageSource image, unrestricted double x, unrestricted double y, unrestricted double width, unrestricted double height); [CallWith=ScriptState, RaisesException] void drawImage(CanvasImageSource image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh); - // hit regions - [RuntimeEnabled=CanvasHitRegion, RaisesException] void addHitRegion(optional HitRegionOptions options = {}); - [RuntimeEnabled=CanvasHitRegion] void removeHitRegion(DOMString id); - [RuntimeEnabled=CanvasHitRegion] void clearHitRegions(); - // pixel manipulation [RaisesException] ImageData createImageData(ImageData imagedata); [RaisesException] ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh);
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_api_test.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_api_test.cc index 2c9af9c..0bc004d 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_api_test.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d_api_test.cc
@@ -12,7 +12,6 @@ #include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h" #include "third_party/blink/public/common/privacy_budget/identifiability_study_settings_provider.h" #include "third_party/blink/renderer/bindings/core/v8/v8_union_float32array_uint16array_uint8clampedarray.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_hit_region_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_union_csscolorvalue_canvasgradient_canvaspattern_string.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_union_cssimagevalue_htmlcanvaselement_htmlimageelement_htmlvideoelement_imagebitmap_offscreencanvas_svgimageelement_videoframe.h" #include "third_party/blink/renderer/core/accessibility/ax_context.h" @@ -346,60 +345,6 @@ EXPECT_TRUE(canvas->RenderingContext()->IsRenderingContext2D()); } -TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForAddHitRegion) { - ResetCanvasForAccessibilityRectTest(GetDocument()); - AXContext ax_context(GetDocument(), ui::kAXModeComplete); - - Element* button_element = GetDocument().getElementById("button"); - auto* canvas = To<HTMLCanvasElement>(GetDocument().getElementById("canvas")); - CanvasRenderingContext2D* context = - static_cast<CanvasRenderingContext2D*>(canvas->RenderingContext()); - - NonThrowableExceptionState exception_state; - HitRegionOptions* options = HitRegionOptions::Create(); - options->setControl(button_element); - - context->beginPath(); - context->rect(10, 10, 40, 40); - context->addHitRegion(options, exception_state); - - auto* ax_object_cache = - To<AXObjectCacheImpl>(GetDocument().ExistingAXObjectCache()); - AXObject* ax_object = ax_object_cache->GetOrCreate(button_element); - - LayoutRect ax_bounds = ax_object->GetBoundsInFrameCoordinates(); - EXPECT_EQ(25, ax_bounds.X().ToInt()); - EXPECT_EQ(25, ax_bounds.Y().ToInt()); - EXPECT_EQ(40, ax_bounds.Width().ToInt()); - EXPECT_EQ(40, ax_bounds.Height().ToInt()); -} - -TEST_F(CanvasRenderingContext2DAPITest, - AccessibilityRectTestForDrawFocusIfNeeded) { - ResetCanvasForAccessibilityRectTest(GetDocument()); - AXContext ax_context(GetDocument(), ui::kAXModeComplete); - - Element* button_element = GetDocument().getElementById("button"); - auto* canvas = To<HTMLCanvasElement>(GetDocument().getElementById("canvas")); - CanvasRenderingContext2D* context = - static_cast<CanvasRenderingContext2D*>(canvas->RenderingContext()); - - GetDocument().UpdateStyleAndLayoutTreeForNode(canvas); - - context->beginPath(); - context->rect(10, 10, 40, 40); - context->drawFocusIfNeeded(button_element); - - auto* ax_object_cache = - To<AXObjectCacheImpl>(GetDocument().ExistingAXObjectCache()); - AXObject* ax_object = ax_object_cache->GetOrCreate(button_element); - - LayoutRect ax_bounds = ax_object->GetBoundsInFrameCoordinates(); - EXPECT_EQ(25, ax_bounds.X().ToInt()); - EXPECT_EQ(25, ax_bounds.Y().ToInt()); - EXPECT_EQ(40, ax_bounds.Width().ToInt()); - EXPECT_EQ(40, ax_bounds.Height().ToInt()); -} // A IdentifiabilityStudySettingsProvider implementation that opts-into study // participation.
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.cc b/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.cc deleted file mode 100644 index 22b9fa7..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.cc +++ /dev/null
@@ -1,130 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/blink/renderer/modules/canvas/canvas2d/hit_region.h" - -#include "base/check.h" -#include "third_party/blink/renderer/core/accessibility/ax_object_cache.h" - -namespace blink { - -HitRegion::HitRegion(const Path& path, const HitRegionOptions* options) - : id_(options->id().IsEmpty() ? String() : options->id()), - control_(options->control()), - path_(path) { - if (options->fillRule() != "evenodd") - fill_rule_ = RULE_NONZERO; - else - fill_rule_ = RULE_EVENODD; -} - -bool HitRegion::Contains(const FloatPoint& point) const { - return path_.Contains(point, fill_rule_); -} - -void HitRegion::RemovePixels(const Path& clear_area) { - path_.SubtractPath(clear_area); -} - -void HitRegion::Trace(Visitor* visitor) const { - visitor->Trace(control_); -} - -void HitRegionManager::AddHitRegion(HitRegion* hit_region) { - hit_region_list_.insert(hit_region); - - if (!hit_region->Id().IsEmpty()) - hit_region_id_map_.Set(hit_region->Id(), hit_region); - - if (hit_region->Control()) - hit_region_control_map_.Set(hit_region->Control(), hit_region); -} - -void HitRegionManager::RemoveHitRegion(HitRegion* hit_region) { - if (!hit_region) - return; - - if (!hit_region->Id().IsEmpty()) - hit_region_id_map_.erase(hit_region->Id()); - - if (hit_region->Control()) - hit_region_control_map_.erase(hit_region->Control()); - - hit_region_list_.erase(hit_region); -} - -void HitRegionManager::RemoveHitRegionById(const String& id) { - if (!id.IsEmpty()) - RemoveHitRegion(GetHitRegionById(id)); -} - -void HitRegionManager::RemoveHitRegionByControl(const Element* control) { - if (control) - RemoveHitRegion(GetHitRegionByControl(control)); -} - -void HitRegionManager::RemoveHitRegionsInRect(const FloatRect& rect, - const AffineTransform& ctm) { - Path clear_area; - clear_area.AddRect(rect); - clear_area.Transform(ctm); - - HitRegionIterator it_end = hit_region_list_.rend(); - HitRegionList to_be_removed; - - for (HitRegionIterator it = hit_region_list_.rbegin(); it != it_end; ++it) { - HitRegion* hit_region = *it; - hit_region->RemovePixels(clear_area); - if (hit_region->GetPath().IsEmpty()) - to_be_removed.insert(hit_region); - } - - it_end = to_be_removed.rend(); - for (HitRegionIterator it = to_be_removed.rbegin(); it != it_end; ++it) - RemoveHitRegion(it->Get()); -} - -void HitRegionManager::RemoveAllHitRegions() { - hit_region_list_.clear(); - hit_region_id_map_.clear(); - hit_region_control_map_.clear(); -} - -HitRegion* HitRegionManager::GetHitRegionById(const String& id) const { - DCHECK(id); - auto it = hit_region_id_map_.find(id); - return it != hit_region_id_map_.end() ? it->value : nullptr; -} - -HitRegion* HitRegionManager::GetHitRegionByControl( - const Element* control) const { - DCHECK(control); - auto it = hit_region_control_map_.find(control); - return it != hit_region_control_map_.end() ? it->value : nullptr; -} - -HitRegion* HitRegionManager::GetHitRegionAtPoint( - const FloatPoint& point) const { - HitRegionIterator it_end = hit_region_list_.rend(); - - for (HitRegionIterator it = hit_region_list_.rbegin(); it != it_end; ++it) { - HitRegion* hit_region = *it; - if (hit_region->Contains(point)) - return hit_region; - } - - return nullptr; -} - -unsigned HitRegionManager::GetHitRegionsCount() const { - return hit_region_list_.size(); -} - -void HitRegionManager::Trace(Visitor* visitor) const { - visitor->Trace(hit_region_list_); - visitor->Trace(hit_region_id_map_); - visitor->Trace(hit_region_control_map_); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.h b/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.h deleted file mode 100644 index e089b06..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region.h +++ /dev/null
@@ -1,77 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_HIT_REGION_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_HIT_REGION_H_ - -#include "base/macros.h" -#include "base/memory/scoped_refptr.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_hit_region_options.h" -#include "third_party/blink/renderer/core/dom/element.h" -#include "third_party/blink/renderer/platform/graphics/path.h" -#include "third_party/blink/renderer/platform/heap/handle.h" -#include "third_party/blink/renderer/platform/wtf/linked_hash_set.h" - -namespace blink { - -class HitRegion final : public GarbageCollected<HitRegion> { - public: - HitRegion(const Path&, const HitRegionOptions*); - virtual ~HitRegion() = default; - - void RemovePixels(const Path&); - - bool Contains(const FloatPoint&) const; - - const String& Id() const { return id_; } - const Path& GetPath() const { return path_; } - Element* Control() const { return control_.Get(); } - - void Trace(Visitor*) const; - - private: - String id_; - Member<Element> control_; - Path path_; - WindRule fill_rule_; -}; - -class HitRegionManager final : public GarbageCollected<HitRegionManager> { - public: - HitRegionManager() = default; - ~HitRegionManager() {} - - void AddHitRegion(HitRegion*); - - void RemoveHitRegion(HitRegion*); - void RemoveHitRegionById(const String& id); - void RemoveHitRegionByControl(const Element*); - void RemoveHitRegionsInRect(const FloatRect&, const AffineTransform&); - void RemoveAllHitRegions(); - - HitRegion* GetHitRegionById(const String& id) const; - HitRegion* GetHitRegionByControl(const Element*) const; - HitRegion* GetHitRegionAtPoint(const FloatPoint&) const; - - unsigned GetHitRegionsCount() const; - - void Trace(Visitor*) const; - - private: - typedef HeapLinkedHashSet<Member<HitRegion>> HitRegionList; - typedef HitRegionList::const_reverse_iterator HitRegionIterator; - typedef HeapHashMap<String, Member<HitRegion>> HitRegionIdMap; - typedef HeapHashMap<Member<const Element>, Member<HitRegion>> - HitRegionControlMap; - - HitRegionList hit_region_list_; - HitRegionIdMap hit_region_id_map_; - HitRegionControlMap hit_region_control_map_; - - DISALLOW_COPY_AND_ASSIGN(HitRegionManager); -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_HIT_REGION_H_
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region_options.idl b/third_party/blink/renderer/modules/canvas/canvas2d/hit_region_options.idl deleted file mode 100644 index 46c738e1..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/hit_region_options.idl +++ /dev/null
@@ -1,13 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Spec: https://html.spec.whatwg.org/C/#hitregionoptions - -dictionary HitRegionOptions { - Path2D? path = null; - CanvasFillRule fillRule = "nonzero"; - DOMString id = ""; - Element? control = null; - // We don't use parentID, label and role yet. -};
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.cc deleted file mode 100644 index 7e2e0c29..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.cc +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.h" - -#include "third_party/blink/renderer/core/testing/internals.h" -#include "third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h" - -namespace blink { - -uint32_t InternalsCanvasRenderingContext2D::countHitRegions( - Internals&, - CanvasRenderingContext2D* context) { - return context->HitRegionsCount(); -} - -} // namespace blink
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.h deleted file mode 100644 index 04734b95..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.h +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_TESTING_INTERNALS_CANVAS_RENDERING_CONTEXT_2D_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_TESTING_INTERNALS_CANVAS_RENDERING_CONTEXT_2D_H_ - -#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" - -namespace blink { - -class CanvasRenderingContext2D; -class Internals; - -class InternalsCanvasRenderingContext2D { - STATIC_ONLY(InternalsCanvasRenderingContext2D); - - public: - static uint32_t countHitRegions(Internals&, CanvasRenderingContext2D*); -}; - -} // namespace blink - -#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_TESTING_INTERNALS_CANVAS_RENDERING_CONTEXT_2D_H_
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.idl b/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.idl deleted file mode 100644 index cbe0cac..0000000 --- a/third_party/blink/renderer/modules/canvas/canvas2d/testing/internals_canvas_rendering_context_2d.idl +++ /dev/null
@@ -1,9 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - ImplementedAs=InternalsCanvasRenderingContext2D -] partial interface Internals { - unsigned long countHitRegions(CanvasRenderingContext2D context); -};
diff --git a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc index 0010809..272cdb0bb 100644 --- a/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc +++ b/third_party/blink/renderer/modules/clipboard/clipboard_promise.cc
@@ -413,7 +413,7 @@ ExecutionContext* context = GetExecutionContext(); if (!context) return; - const LocalDOMWindow& window = *To<LocalDOMWindow>(context); + LocalDOMWindow& window = *To<LocalDOMWindow>(context); DCHECK(window.IsSecureContext()); // [SecureContext] in IDL if (!window.document()->hasFocus()) {
diff --git a/third_party/blink/renderer/modules/closewatcher/close_watcher.cc b/third_party/blink/renderer/modules/closewatcher/close_watcher.cc index fbddb10..5f4f851 100644 --- a/third_party/blink/renderer/modules/closewatcher/close_watcher.cc +++ b/third_party/blink/renderer/modules/closewatcher/close_watcher.cc
@@ -68,6 +68,13 @@ CloseWatcher* CloseWatcher::Create(ScriptState* script_state, ExceptionState& exception_state) { LocalDOMWindow* window = LocalDOMWindow::From(script_state); + if (!window->GetFrame()) { + exception_state.ThrowDOMException( + DOMExceptionCode::kInvalidStateError, + "CloseWatchers cannot be created in detached Windows."); + return nullptr; + } + WatcherStack& stack = WatcherStack::From(*window); if (stack.HasActiveWatcher() && !LocalFrame::HasTransientUserActivation(window->GetFrame())) { @@ -105,7 +112,8 @@ void CloseWatcher::Close() { if (IsClosed()) return; - WatcherStack::From(*DomWindow()).Remove(this); + if (DomWindow()) + WatcherStack::From(*DomWindow()).Remove(this); state_ = State::kClosed; DispatchEvent(*Event::Create(event_type_names::kClose)); } @@ -113,7 +121,8 @@ void CloseWatcher::destroy() { if (IsClosed()) return; - WatcherStack::From(*DomWindow()).Remove(this); + if (DomWindow()) + WatcherStack::From(*DomWindow()).Remove(this); state_ = State::kClosed; }
diff --git a/third_party/blink/renderer/modules/manifest/manifest_parser.cc b/third_party/blink/renderer/modules/manifest/manifest_parser.cc index e2f7f8e..6187cba5 100644 --- a/third_party/blink/renderer/modules/manifest/manifest_parser.cc +++ b/third_party/blink/renderer/modules/manifest/manifest_parser.cc
@@ -7,6 +7,7 @@ #include <string> #include "base/feature_list.h" +#include "base/strings/stringprintf.h" #include "net/base/mime_util.h" #include "net/base/registry_controlled_domains/registry_controlled_domain.h" #include "third_party/blink/public/common/features.h" @@ -1027,7 +1028,16 @@ for (wtf_size_t i = 0; i < accept->size(); ++i) { JSONObject::Entry entry = accept->at(i); + + // Validate the MIME type. String& mimetype = entry.first; + std::string top_level_mime_type; + if (!net::ParseMimeTypeWithoutParameter(mimetype.Utf8(), + &top_level_mime_type, nullptr) || + !net::IsValidTopLevelMimeType(top_level_mime_type)) { + AddErrorInfo("invalid MIME type: " + mimetype); + continue; + } Vector<String> extensions; String extension;
diff --git a/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc b/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc index 49b9cdf..4708643 100644 --- a/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc +++ b/third_party/blink/renderer/modules/manifest/manifest_parser_unittest.cc
@@ -2205,6 +2205,44 @@ EXPECT_EQ(0u, file_handlers[0]->accept.find("image/png")->value.size()); } + // Invalid MIME types and those with parameters are stripped. + { + auto& manifest = ParseManifest( + R"({ + "file_handlers": [ + { + "name": "Foo", + "icons": [{ "src": "foo.jpg" }], + "action": "/files", + "accept": { + "image_png": ".png", + "foo/bar": ".foo", + "application/foobar;parameter=25": ".foobar", + "application/its+xml": ".itsml" + } + } + ] + })"); + auto& file_handlers = manifest->file_handlers; + + ASSERT_EQ(3u, GetErrorCount()); + EXPECT_EQ("invalid MIME type: image_png", errors()[0]); + EXPECT_EQ("invalid MIME type: foo/bar", errors()[1]); + EXPECT_EQ("invalid MIME type: application/foobar;parameter=25", + errors()[2]); + ASSERT_EQ(1u, file_handlers.size()); + + EXPECT_EQ("Foo", file_handlers[0]->name); + EXPECT_EQ("http://foo.com/foo.jpg", + file_handlers[0]->icons[0]->src.GetString()); + EXPECT_EQ(KURL("http://foo.com/files"), file_handlers[0]->action); + ASSERT_EQ(1U, file_handlers[0]->accept.size()); + ASSERT_TRUE(file_handlers[0]->accept.Contains("application/its+xml")); + EXPECT_EQ(0u, file_handlers[0] + ->accept.find("application/its+xml") + ->value.Contains(".foobar")); + } + // Extensions specified as a single string is valid. { auto& manifest = ParseManifest(
diff --git a/third_party/blink/renderer/modules/mediastream/media_devices.cc b/third_party/blink/renderer/modules/mediastream/media_devices.cc index 799af5c..3e1eae2f 100644 --- a/third_party/blink/renderer/modules/mediastream/media_devices.cc +++ b/third_party/blink/renderer/modules/mediastream/media_devices.cc
@@ -235,7 +235,7 @@ ScriptState* script_state, const MediaStreamConstraints* options, ExceptionState& exception_state) { - const ExecutionContext* const context = GetExecutionContext(); + ExecutionContext* const context = GetExecutionContext(); if (!context) { exception_state.ThrowDOMException( DOMExceptionCode::kNotSupportedError,
diff --git a/third_party/blink/renderer/modules/payments/payment_request.cc b/third_party/blink/renderer/modules/payments/payment_request.cc index 152129d0..cfad7b6 100644 --- a/third_party/blink/renderer/modules/payments/payment_request.cc +++ b/third_party/blink/renderer/modules/payments/payment_request.cc
@@ -737,7 +737,7 @@ } } -bool AllowedToUsePaymentRequest(const ExecutionContext* execution_context) { +bool AllowedToUsePaymentRequest(ExecutionContext* execution_context) { // To determine whether a Document object |document| is allowed to use the // feature indicated by attribute name |allowpaymentrequest|, run these steps:
diff --git a/third_party/blink/renderer/modules/storage/storage_controller_test.cc b/third_party/blink/renderer/modules/storage/storage_controller_test.cc index b89f41ed..a4403990 100644 --- a/third_party/blink/renderer/modules/storage/storage_controller_test.cc +++ b/third_party/blink/renderer/modules/storage/storage_controller_test.cc
@@ -23,6 +23,7 @@ #include "third_party/blink/renderer/modules/storage/testing/fake_area_source.h" #include "third_party/blink/renderer/modules/storage/testing/mock_storage_area.h" #include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h" +#include "third_party/blink/renderer/platform/storage/blink_storage_key.h" #include "third_party/blink/renderer/platform/testing/scoped_mocked_url.h" #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h" #include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h" @@ -36,14 +37,14 @@ public: // mojom::blink::DomStorage implementation: void OpenLocalStorage( - const scoped_refptr<const SecurityOrigin>& origin, + const blink::BlinkStorageKey& storage_key, mojo::PendingReceiver<mojom::blink::StorageArea> receiver) override {} void BindSessionStorageNamespace( const String& namespace_id, mojo::PendingReceiver<mojom::blink::SessionStorageNamespace> receiver) override {} void BindSessionStorageArea( - const scoped_refptr<const SecurityOrigin>& origin, + const blink::BlinkStorageKey& storage_key, const String& namespace_id, mojo::PendingReceiver<mojom::blink::StorageArea> receiver) override { session_storage_opens++;
diff --git a/third_party/blink/renderer/modules/storage/storage_namespace.cc b/third_party/blink/renderer/modules/storage/storage_namespace.cc index 5ac4e71..da487a2 100644 --- a/third_party/blink/renderer/modules/storage/storage_namespace.cc +++ b/third_party/blink/renderer/modules/storage/storage_namespace.cc
@@ -222,13 +222,14 @@ mojo::PendingReceiver<mojom::blink::StorageArea> receiver) { if (IsSessionStorage()) { controller_->dom_storage()->BindSessionStorageArea( - // TODO(https://crbug.com/1212808) Refactor and pass FrameID as well. - local_dom_window.GetSecurityOrigin(), namespace_id_, - std::move(receiver)); + local_dom_window.GetStorageKey(), + // TODO(https://crbug.com/1212808): add local_frame_token + namespace_id_, std::move(receiver)); } else { controller_->dom_storage()->OpenLocalStorage( - // TODO(https://crbug.com/1212808) Refactor and pass FrameID as well. - local_dom_window.GetSecurityOrigin(), std::move(receiver)); + local_dom_window.GetStorageKey(), + // TODO(https://crbug.com/1212808): add local_frame_token + std::move(receiver)); } }
diff --git a/third_party/blink/renderer/modules/webshare/navigator_share.cc b/third_party/blink/renderer/modules/webshare/navigator_share.cc index 58933b7..2ec1945 100644 --- a/third_party/blink/renderer/modules/webshare/navigator_share.cc +++ b/third_party/blink/renderer/modules/webshare/navigator_share.cc
@@ -296,6 +296,15 @@ } } + if (has_files) + UseCounter::Count(execution_context, WebFeature::kWebShareContainingFiles); + if (data->hasTitle()) + UseCounter::Count(execution_context, WebFeature::kWebShareContainingTitle); + if (data->hasText()) + UseCounter::Count(execution_context, WebFeature::kWebShareContainingText); + if (data->hasUrl()) + UseCounter::Count(execution_context, WebFeature::kWebShareContainingUrl); + auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); ShareClientImpl* client =
diff --git a/third_party/blink/renderer/modules/webshare/navigator_share_test.cc b/third_party/blink/renderer/modules/webshare/navigator_share_test.cc index d54a09b7..86a6b257 100644 --- a/third_party/blink/renderer/modules/webshare/navigator_share_test.cc +++ b/third_party/blink/renderer/modules/webshare/navigator_share_test.cc
@@ -152,6 +152,9 @@ EXPECT_EQ(mock_share_service().text(), message); EXPECT_EQ(mock_share_service().url(), KURL(url)); EXPECT_EQ(mock_share_service().files().size(), 0U); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingTitle)); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingText)); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingUrl)); EXPECT_TRUE( GetDocument().IsUseCounted(WebFeature::kWebShareSuccessfulWithoutFiles)); } @@ -186,6 +189,7 @@ EXPECT_EQ(mock_share_service().files()[0]->blob->GetType(), content_type); EXPECT_EQ(mock_share_service().files()[0]->blob->size(), file_contents.length()); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingFiles)); EXPECT_TRUE(GetDocument().IsUseCounted( WebFeature::kWebShareSuccessfulContainingFiles)); } @@ -197,6 +201,7 @@ mock_share_service().set_error(mojom::blink::ShareError::CANCELED); Share(share_data); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingTitle)); EXPECT_TRUE(GetDocument().IsUseCounted( WebFeature::kWebShareUnsuccessfulWithoutFiles)); } @@ -206,15 +211,20 @@ const String content_type = "text/csv"; const String file_contents = "1,2,3"; + const String url = "https://example.site"; + HeapVector<Member<File>> files; files.push_back(CreateSampleFile(ExecutionContext::From(GetScriptState()), file_name, content_type, file_contents)); ShareData share_data; share_data.setFiles(files); + share_data.setUrl(url); mock_share_service().set_error(mojom::blink::ShareError::CANCELED); Share(share_data); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingFiles)); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kWebShareContainingUrl)); EXPECT_TRUE(GetDocument().IsUseCounted( WebFeature::kWebShareUnsuccessfulContainingFiles)); }
diff --git a/third_party/blink/renderer/modules/xr/xr_system.cc b/third_party/blink/renderer/modules/xr/xr_system.cc index 3e35217c..22afed9 100644 --- a/third_party/blink/renderer/modules/xr/xr_system.cc +++ b/third_party/blink/renderer/modules/xr/xr_system.cc
@@ -264,7 +264,7 @@ } } -bool HasRequiredPermissionsPolicy(const ExecutionContext* context, +bool HasRequiredPermissionsPolicy(ExecutionContext* context, device::mojom::XRSessionFeature feature) { if (!context) return false;
diff --git a/third_party/blink/renderer/platform/widget/widget_base.cc b/third_party/blink/renderer/platform/widget/widget_base.cc index 2254ea3..8f151c42 100644 --- a/third_party/blink/renderer/platform/widget/widget_base.cc +++ b/third_party/blink/renderer/platform/widget/widget_base.cc
@@ -404,7 +404,10 @@ gfx::ScaleToCeiledSize(visual_properties.visible_viewport_size, screen_info.device_scale_factor)); + base::TimeTicks update_start = base::TimeTicks::Now(); client_->UpdateVisualProperties(visual_properties); + base::TimeDelta update_duration = base::TimeTicks::Now() - update_start; + LayerTreeHost()->SetVisualPropertiesUpdateDuration(update_duration); } void WidgetBase::UpdateScreenRects(const gfx::Rect& widget_screen_rect,
diff --git a/third_party/blink/renderer/platform/wtf/sequence_bound_test.cc b/third_party/blink/renderer/platform/wtf/sequence_bound_test.cc index 3470014..4a73091 100644 --- a/third_party/blink/renderer/platform/wtf/sequence_bound_test.cc +++ b/third_party/blink/renderer/platform/wtf/sequence_bound_test.cc
@@ -39,8 +39,7 @@ base::ThreadPool::CreateSingleThreadTaskRunner({})); sequence_bound.AsyncCall(&Foo::Bar).WithArgs(5); - sequence_bound.PostTaskWithThisObject(FROM_HERE, - CrossThreadBindOnce([](Foo* foo) {})); + sequence_bound.PostTaskWithThisObject(CrossThreadBindOnce([](Foo* foo) {})); int test_value = -1; base::RunLoop run_loop;
diff --git a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py index a92ed3fb..ddf63a92 100755 --- a/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py +++ b/third_party/blink/tools/blinkpy/presubmit/audit_non_blink_usage.py
@@ -1430,6 +1430,7 @@ { 'paths': ['third_party/blink/renderer/modules/manifest/'], 'allowed': [ + 'net::IsValidTopLevelMimeType', 'net::ParseMimeTypeWithoutParameter', 'net::registry_controlled_domains::.+', ],
diff --git a/third_party/blink/web_tests/ASANExpectations b/third_party/blink/web_tests/ASANExpectations index 829fca98..3b14569 100644 --- a/third_party/blink/web_tests/ASANExpectations +++ b/third_party/blink/web_tests/ASANExpectations
@@ -23,7 +23,6 @@ # #0 0x7f48eb06f7c5 in DocumentOpenInDestroyStream::NPP_DestroyStream crbug.com/166932 [ Linux ] plugins/embed-attributes-setting.html [ Skip ] crbug.com/166932 [ Linux ] plugins/embed-attributes-style.html [ Skip ] -crbug.com/166932 [ Linux ] plugins/fullscreen-plugins-dont-reload.html [ Skip ] # These have been failing since at least chrome r203901, blink r151723 (no memory errors, just text failure): crbug.com/231357 [ Linux ] editing/execCommand/switch-list-type-with-orphaned-li.html [ Failure ]
diff --git a/third_party/blink/web_tests/LeakExpectations b/third_party/blink/web_tests/LeakExpectations index 01f8f42..cc1aed8 100644 --- a/third_party/blink/web_tests/LeakExpectations +++ b/third_party/blink/web_tests/LeakExpectations
@@ -55,9 +55,6 @@ # ----------------------------------------------------------------- crbug.com/836278 [ Linux ] external/wpt/html/canvas/offscreen/manual/convert-to-blob/offscreencanvas.convert.to.blob.html [ Pass Failure ] -# Moved from TestExpectations (Sheriff 2018-05-31) -crbug.com/848354 [ Linux ] plugins/fullscreen-plugins-dont-reload.html [ Pass Failure ] - # Sheriff 2018-08-17 crbug.com/847114 [ Linux ] http/tests/devtools/tracing/decode-resize.js [ Pass Failure ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index fe8de38..a886de0 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -6795,7 +6795,6 @@ crbug.com/1244896 [ Mac ] fast/mediacapturefromelement/CanvasCaptureMediaStream-set-size-too-large.html [ Pass Timeout ] # Sheriff 2021-08-25 -crbug.com/1243128 [ Win ] external/wpt/editing/run/justifyright.html?4001-last [ Failure ] crbug.com/1243128 [ Win ] external/wpt/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html [ Failure ] crbug.com/1243128 [ Win ] external/wpt/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html [ Failure ] crbug.com/1243128 [ Win ] external/wpt/web-share/disabled-by-permissions-policy.https.sub.html [ Failure ]
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser-manual.html b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser-manual.html index e568cc53..690b4ba 100644 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser-manual.html +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser-manual.html
@@ -3,7 +3,8 @@ <link rel="help" href="https://w3c.github.io/manifest#display-member" /> <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-browser" /> <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" /> -<link rel="manifest" href="display-member-media-feature-browser.webmanifest" /> +<link rel="manifest" href="resources/display-member-media-feature-browser.webmanifest" /> +<script src="resources/display-member-media-feature-manual.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <h1>Testing support for "browser" value of display member + media feature</h1> <style>
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser.webmanifest deleted file mode 100644 index 1b63337..0000000 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser.webmanifest +++ /dev/null
@@ -1,3 +0,0 @@ -{ - "display": "browser" -}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen-manual.html b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen-manual.html index 77f41b0a..a6db6667 100644 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen-manual.html +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen-manual.html
@@ -3,7 +3,8 @@ <link rel="help" href="https://w3c.github.io/manifest#display-member" /> <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-fullscreen" /> <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" /> -<link rel="manifest" href="display-member-media-feature-fullscreen.webmanifest" /> +<link rel="manifest" href="resources/display-member-media-feature-fullscreen.webmanifest" /> +<script src="resources/display-member-media-feature-manual.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <h1>Testing support for "fullscreen" value of display member + media feature</h1> <style>
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen.webmanifest deleted file mode 100644 index a39466df..0000000 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen.webmanifest +++ /dev/null
@@ -1,3 +0,0 @@ -{ - "display": "fullscreen" -}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui-manual.html b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui-manual.html index b0a67d78..b645d6c 100644 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui-manual.html +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui-manual.html
@@ -3,7 +3,8 @@ <link rel="help" href="https://w3c.github.io/manifest#display-member" /> <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-minimal-ui" /> <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" /> -<link rel="manifest" href="display-member-media-feature-minimal-ui.webmanifest" /> +<link rel="manifest" href="resources/display-member-media-feature-minimal-ui.webmanifest" /> +<script src="resources/display-member-media-feature-manual.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <h1>Testing support for "minimal-ui" value of display member + media feature</h1> <style>
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui.webmanifest deleted file mode 100644 index 471f5d5d..0000000 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui.webmanifest +++ /dev/null
@@ -1,3 +0,0 @@ -{ - "display": "minimal-ui" -}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-service-worker.js b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-service-worker.js new file mode 100644 index 0000000..5720e3c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-service-worker.js
@@ -0,0 +1,55 @@ +// Some user agents only offer app installation if there is a SW and it handles +// offline requests. + +const cacheVersion = "1.2"; +const CACHE_NAME = `cache-v${cacheVersion}`; + +// The resources cached by this service worker. +const resources = [ + "display-member-media-feature-browser-manual.html", + "display-member-media-feature-fullscreen-manual.html", + "display-member-media-feature-minimal-ui-manual.html", + "display-member-media-feature-standalone-manual.html", + "display-member-media-feature-service-worker.js", + "resources/display-member-media-feature-manual.js", + "resources/icon.png", +]; + +// Load all resources for this service worker. +const precache = async () => { + const cache = await caches.open(CACHE_NAME); + await cache.addAll(resources); +}; + +// Get a resource from the cache. +const fromCache = async request => { + const cache = await caches.open(CACHE_NAME); + return await cache.match(request.url); +}; + +// Attempt to get resources from the network first, fallback to the cache if we're +// offline. +const networkFallbackToCache = async request => { + try { + const response = await fetch(request); + if (response.ok) return response; + } catch (err) {} + return await fromCache(request); +}; + +// When we have a new service worker, update the caches and swap immediately. +self.addEventListener("install", e => { + e.waitUntil(precache().then(() => self.skipWaiting())); +}); + +// Claim existing clients. +self.addEventListener("activate", e => { + e.waitUntil(self.clients.claim()); +}); + +// When a resource need to be fetched, check whether it is +// contained in the cache and return the cached version, otherwise +// get it from the network. +self.addEventListener("fetch", e => { + e.respondWith(networkFallbackToCache(e.request)); +});
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone-manual.html b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone-manual.html index b62007b..c820091 100644 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone-manual.html +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone-manual.html
@@ -3,7 +3,8 @@ <link rel="help" href="https://w3c.github.io/manifest#display-member" /> <link rel="help" href="https://w3c.github.io/manifest/#the-display-mode-media-feature" /> <link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-standalone" /> -<link rel="manifest" href="display-member-media-feature-standalone.webmanifest" /> +<link rel="manifest" href="resources/display-member-media-feature-standalone.webmanifest" /> +<script src="resources/display-member-media-feature-manual.js"></script> <meta name="viewport" content="width=device-width, initial-scale=1"> <h1>Testing support for "standalone" value of display member + media feature</h1> <style>
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone.webmanifest deleted file mode 100644 index 891bd79f..0000000 --- a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone.webmanifest +++ /dev/null
@@ -1,3 +0,0 @@ -{ - "display": "standalone" -}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-browser.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-browser.webmanifest new file mode 100644 index 0000000..9e1f6a3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-browser.webmanifest
@@ -0,0 +1,11 @@ +{ + "name": "Display member media feature WPT", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192" + } + ], + "start_url": "../display-member-media-feature-browser-manual.html", + "display": "browser" +}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser.webmanifest.headers b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-browser.webmanifest.headers similarity index 100% rename from third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-browser.webmanifest.headers rename to third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-browser.webmanifest.headers
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-fullscreen.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-fullscreen.webmanifest new file mode 100644 index 0000000..3954538 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-fullscreen.webmanifest
@@ -0,0 +1,11 @@ +{ + "name": "Display member media feature WPT", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192" + } + ], + "start_url": "../display-member-media-feature-fullscreen-manual.html", + "display": "fullscreen" +} \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen.webmanifest.headers b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-fullscreen.webmanifest.headers similarity index 100% rename from third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-fullscreen.webmanifest.headers rename to third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-fullscreen.webmanifest.headers
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-manual.js b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-manual.js new file mode 100644 index 0000000..60723d5a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-manual.js
@@ -0,0 +1,4 @@ +if ('serviceWorker' in navigator) { + navigator.serviceWorker.register( + 'display-member-media-feature-service-worker.js'); +}
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-minimal-ui.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-minimal-ui.webmanifest new file mode 100644 index 0000000..9463941a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-minimal-ui.webmanifest
@@ -0,0 +1,11 @@ +{ + "name": "Display member media feature WPT", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192" + } + ], + "start_url": "../display-member-media-feature-minimal-ui-manual.html", + "display": "minimal-ui" +} \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui.webmanifest.headers b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-minimal-ui.webmanifest.headers similarity index 100% rename from third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-minimal-ui.webmanifest.headers rename to third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-minimal-ui.webmanifest.headers
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-standalone.webmanifest b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-standalone.webmanifest new file mode 100644 index 0000000..a8269e9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-standalone.webmanifest
@@ -0,0 +1,11 @@ +{ + "name": "Display member media feature WPT", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192" + } + ], + "start_url": "../display-member-media-feature-standalone-manual.html", + "display": "standalone" +} \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone.webmanifest.headers b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-standalone.webmanifest.headers similarity index 100% rename from third_party/blink/web_tests/external/wpt/appmanifest/display-member/display-member-media-feature-standalone.webmanifest.headers rename to third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/display-member-media-feature-standalone.webmanifest.headers
diff --git a/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/icon.png b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/icon.png new file mode 100644 index 0000000..267cba8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/appmanifest/display-member/resources/icon.png Binary files differ
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/fieldset-007.html b/third_party/blink/web_tests/external/wpt/css/css-break/fieldset-007.html new file mode 100644 index 0000000..37bd1ac --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/fieldset-007.html
@@ -0,0 +1,12 @@ +<!DOCTYPE html> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#fragmentation-model"> +<link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> +<style> + fieldset { margin:0; border:none; padding:0; } +</style> +<p>Test passes if there is a filled green square.</p> +<div style="columns:5; column-gap:20px; column-rule:20px solid green; column-fill:auto; width:180px; height:100px;"> + <fieldset style="max-height:100px;"> + <div style="height:300px; background:green;"></div> + </fieldset> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-break/overflow-clip-012.html b/third_party/blink/web_tests/external/wpt/css/css-break/overflow-clip-012.html new file mode 100644 index 0000000..0038ce3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-break/overflow-clip-012.html
@@ -0,0 +1,33 @@ +<!DOCTYPE html> +<link rel="help" href="https://www.w3.org/TR/css-break-3/#fragmentation-model"> +<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#overflow-properties"> +<link rel="match" href="../reference/ref-filled-green-100px-square-only.html"> +<style> + #multicol { + columns: 2; + column-fill: auto; + column-gap: 0px; + height: 100px; + width: 100px; + } + fieldset { + overflow: clip; + margin: 0; + border: none; + padding: 0; + max-height: 200px; + } + fieldset > div { + contain: size; + width: 50px; + background: green; + } +</style> +<p>Test passes if there is a filled green square.</p> +<div id="multicol"> + <fieldset> + <div style="height:50px;"></div> + <div style="position:absolute; height:50px;"></div> + <div style="height:150px;"></div> + </fieldset> +</div>
diff --git a/third_party/blink/web_tests/platform/linux/external/wpt/editing/run/justifyright_4001-last-expected.txt b/third_party/blink/web_tests/external/wpt/editing/run/justifyright_4001-last-expected.txt similarity index 100% rename from third_party/blink/web_tests/platform/linux/external/wpt/editing/run/justifyright_4001-last-expected.txt rename to third_party/blink/web_tests/external/wpt/editing/run/justifyright_4001-last-expected.txt
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01.html deleted file mode 100644 index 5e4502fd..0000000 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/addHitRegions-NotSupportedError-01.html +++ /dev/null
@@ -1,89 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<title>Hit regions: addHitRegion throws NotSupportedError</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -</head> -<body> -<div id="log"></div> -<div style="display: none"><canvas id="canvas"><button id="button">button</button></canvas></div> - -<script> -test(function () { - assert_throws_dom("NotSupportedError", - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // Shapes are painted without affecting the current default path, - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.fillRect(25, 25, 25, 25); - - // If the specified path has no pixels, throw a NotSupportedError exception and abort these steps. - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#hit-regions - context.addHitRegion({ id: "notsupportederror_fillRect", control: button }) - }, "fillRect should not affect current default path and NotSupportedError should be thrown."); -}, "fillRect should not affect current default path and NotSupportedError should be thrown."); - -test(function () { - assert_throws_dom("NotSupportedError", - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // "Shapes are painted without affecting the current default path," - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.strokeRect(75, 25, 25, 25); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#hit-regions - context.addHitRegion({ id: "notsupportederror_strokeRect", control: button }) - }, "strokeRect should not affect current default path and NotSupportedError should be thrown."); -}, "strokeRect should not affect current default path and NotSupportedError should be thrown."); - -test(function() { - assert_throws_dom("NotSupportedError", - function () { - var canvas = document.getElementById("canvas"); - // Reset context - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - - // "These shapes are painted without affecting the current path" - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.fillText("fillText", 25, 100); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-text-to-the-canvas - context.addHitRegion({ id: "notsupportederror_fillText", control: button }); - }, "fillText should not affect current default path and NotSupportedError should be thrown."); -}, "fillText should not affect current default path and NotSupportedError should be thrown."); - -test(function() { - assert_throws_dom("NotSupportedError", - function () { - var canvas = document.getElementById("canvas"); - canvas.width = canvas.width; - var button = document.getElementById("button"); - var context = canvas.getContext("2d"); - // "These shapes are painted without affecting the current path" - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-rectangles-to-the-canvas - context.strokeText("strokeText", 75, 100); - - // "If the specified path has no pixels, throw a NotSupportedError exception and abort these steps." - // http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas_CR/#drawing-text-to-the-canvas - context.addHitRegion({ id: "notsupportederror_strokeText", control: button }); - }, "strokeText should not affect current default path and NotSupportedError shuld be thrown."); -}, "strokeText should not affect current default path and NotSupportedError shuld be thrown."); -</script> -</body> -</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/hitregions-members-exist.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/hitregions-members-exist.html deleted file mode 100644 index b9203f5..0000000 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/hit-regions/hitregions-members-exist.html +++ /dev/null
@@ -1,29 +0,0 @@ -<!DOCTYPE html> -<title>Canvas test: 2d.hitregions.members.exist</title> -<meta name="author" content="Constantine Kim"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<body> - -<h1>2d.hitregions.members.exist</h1> -<canvas></canvas> -<div id="log"></div> -<script> -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.addHitRegion, 'function'); -}, 'context.addHitRegion Exists'); - -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.removeHitRegion, 'function'); -}, 'context.removeHitRegion Exists'); - -test(function () { - var ctx = document.createElement('canvas').getContext('2d'); - assert_equals(typeof ctx.clearHitRegions, 'function'); -}, 'context.clearHitRegions Exists'); - -</script> -</body> -</html> \ No newline at end of file
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-accessibility-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-accessibility-test.html deleted file mode 100644 index 2bfebb7..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-accessibility-test.html +++ /dev/null
@@ -1,92 +0,0 @@ -<head> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<body> -<canvas id="canvas"> - <button id="button1"></button> - <div id="container1"> - <button id="button2"></button> - <button id="button3"></button> - </div> - <div id="container2"> - <div id="container3"> - <button id="button4"></button> - <button id="button5"></button> - </div> - <button id="button6"></button> - </div> -</canvas> -<script> - -var canvas = document.getElementById("canvas"); -var context = canvas.getContext("2d"); - -function drawRectAndAddHitRegion(testItem) { - var control = testItem['control']; - var x = testItem['x']; - var y = testItem['y']; - var width = testItem['width']; - var height = testItem['height']; - if (window.accessibilityController) - window["ax" + control] = accessibilityController.accessibleElementById(control); - - context.beginPath(); - context.rect(x, y, width, height); - context.fill(); - context.addHitRegion({ - id : control, - control : document.getElementById(control) - }); -} - -function testAccessibilityRect(testItem) { - var control = testItem['control']; - var x = testItem['x']; - var y = testItem['y']; - var width = testItem['width']; - var height = testItem['height']; - - if (window.accessibilityController && !window["ax" + control]) - window["ax" + control] = accessibilityController.accessibleElementById(control); - - assert_equals(eval("ax" + control + ".x"), x); - assert_equals(eval("ax" + control + ".y"), y); - assert_equals(eval("ax" + control + ".width"), width); - assert_equals(eval("ax" + control + ".height"), height); -} - -var drawRectAndAddHitRegionTests = [ - ['drawRectAndAddHitRegion 1', {control: "button1", x: 0, y: 0, width: 200, height: 200}], - ['drawRectAndAddHitRegion 2', {control: "button2", x: 0, y: 0, width: 100, height: 50}], - ['drawRectAndAddHitRegion 3', {control: "button3", x: 40, y: 20, width: 50, height: 70}], - ['drawRectAndAddHitRegion 4', {control: "button4", x: 0, y: 0, width: 100, height: 50}], - ['drawRectAndAddHitRegion 5', {control: "button5", x: 40, y: 20, width: 50, height: 70}], - ['drawRectAndAddHitRegion 6', {control: "button6", x: 20, y: 10, width: 140, height: 30}], - ['drawRectAndAddHitRegion 7', {control: "button7", x: 0, y: 0, width: 200, height: 200}], -]; - -var accessibilityRectTests = [ - // Just one button tests. - ['testAccessibilityRect 1', {control: "button1", x: 8, y: 8, width: 200, height: 200}], - // The container1 has two buttons. - ['testAccessibilityRect 2', {control: "button2", x: 8, y: 8, width: 100, height: 50}], - ['testAccessibilityRect 3', {control: "button3", x: 48, y: 28, width: 50, height: 70}], - ['testAccessibilityRect 4', {control: "container1", x: 8, y: 8, width: 100, height: 90}], - // After removing button2 from the container1. - ['testAccessibilityRect 5', {control: "container1", x: 48, y: 28, width: 50, height: 70}], - // Depth-two container tests. - ['testAccessibilityRect 6', {control: "button4", x: 8, y: 8, width: 100, height: 50}], - ['testAccessibilityRect 7', {control: "button5", x: 48, y: 28, width: 50, height: 70}], - ['testAccessibilityRect 8', {control: "button6", x: 28, y: 18, width: 140, height: 30}], - ['testAccessibilityRect 9', {control: "container2", x: 8, y: 8, width: 160, height: 90}], - ['testAccessibilityRect 10', {control: "container3", x: 8, y: 8, width: 100, height: 90}], -]; - -generate_tests(drawRectAndAddHitRegion, drawRectAndAddHitRegionTests); - -generate_tests(testAccessibilityRect, accessibilityRectTests.slice(0,4)); - -document.getElementById("container1").removeChild(document.getElementById("button2")); -generate_tests(testAccessibilityRect, accessibilityRectTests.slice(4));; -</script> -</body>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-basic-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-basic-test.html deleted file mode 100644 index 25a687a..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-basic-test.html +++ /dev/null
@@ -1,38 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Basic Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -createFace(context); - -coroutine(function*() { - setup({ explicit_done : true, explicit_timeout : true }); - - generate_tests(assert_equals, [ - [ 'face1', yield clickOrTouch(100, 100), 'face' ], - [ 'nose', yield clickOrTouch(200, 200), 'nose' ], - [ 'mouth', yield clickOrTouch(127, 242), 'mouth' ], - [ 'eye1', yield clickOrTouch(150, 125), 'eye' ], - [ 'eye2', yield clickOrTouch(250, 125), 'eye' ], - [ 'face2', yield clickOrTouch(200, 120), 'face' ], - [ 'null', yield clickOrTouch(20, 10), null ] - ]); - - done(); -}); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clear-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clear-test.html deleted file mode 100644 index 484f248a..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clear-test.html +++ /dev/null
@@ -1,91 +0,0 @@ -<script src='../../resources/testharness.js'></script> -<script src='../../resources/testharnessreport.js'></script> -<body> -<canvas id='canvas' width='400' height='400'> - <button id='yellow'></button> -</canvas> -<script src='./resources/canvas-hit-region-event.js'></script> -<script> - -test(function(t) { - var canvas = document.getElementById('canvas'); - var context = canvas.getContext('2d'); - - assert_equals(internals.countHitRegions(context), 0); - - context.fillStyle = 'red'; - context.rect(0, 0, 100, 100); - context.fill(); - context.addHitRegion({ id : 'red' }); - assert_equals(internals.countHitRegions(context), 1); - - context.beginPath(); - context.fillStyle = 'yellow'; - context.rect(100, 100, 50, 50); - context.fill(); - context.addHitRegion({ id : 'yellow', control : document.getElementById('yellow') }); - assert_equals(internals.countHitRegions(context), 2); - - assert_equals(clickCanvas(60, 60), 'red'); - assert_equals(clickCanvas(120, 120), 'yellow'); - - context.clearRect(50, 50, 50, 50); - assert_equals(internals.countHitRegions(context), 2); - assert_equals(clickCanvas(60, 60), null); - assert_equals(clickCanvas(120, 120), 'yellow'); - - context.clearRect(100, 100, 50, 50); - assert_equals(internals.countHitRegions(context), 1); - assert_equals(clickCanvas(120, 120), null); - - context.beginPath(); - context.fillStyle = 'red'; - context.rect(60, 60, 40, 40); - context.fill(); - assert_equals(clickCanvas(40, 40), 'red'); - - context.addHitRegion({ id : 'red' }); - assert_equals(internals.countHitRegions(context), 1); - assert_equals(clickCanvas(62, 62), 'red'); - assert_equals(clickCanvas(40, 40), null); - - context.beginPath(); - context.fillStyle = 'yellow'; - context.rect(0, 0, 50, 50); - context.fill(); - context.addHitRegion({ id : 'yellow', control : document.getElementById('yellow') }); - assert_equals(internals.countHitRegions(context), 2); - assert_equals(clickCanvas(40, 40), 'yellow'); - - context.beginPath(); - context.fillStyle = 'yellow'; - context.rect(100, 0, 50, 50); - context.fill(); - context.addHitRegion({ control : document.getElementById('yellow') }); - assert_equals(internals.countHitRegions(context), 2); - assert_equals(clickCanvas(40, 40), null); - assert_equals(clickCanvas(101, 1), null); - - context.beginPath(); - context.fillStyle = 'blue'; - context.rect(100, 50, 20, 20); - context.fill(); - context.addHitRegion({ id : 'blue' }); - assert_equals(internals.countHitRegions(context), 3); - assert_equals(clickCanvas(101, 51), 'blue'); - - context.removeHitRegion('blue'); - assert_equals(internals.countHitRegions(context), 2); - assert_equals(clickCanvas(101, 51), null); - - context.clearHitRegions(); - assert_equals(internals.countHitRegions(context), 0); - assert_equals(clickCanvas(62, 62), null); - - context.clearRect(0, 0, 400, 400); - assert_equals(internals.countHitRegions(context), 0); - -}, 'Test canvas hit regions: clear test.'); - -</script> -</body>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clip-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clip-test.html deleted file mode 100644 index 1fa5083..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-clip-test.html +++ /dev/null
@@ -1,126 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Clip Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -function create_simple_rect_region_with_clip() { - context.clearRect(0, 0, 400, 400); - context.save(); - context.beginPath(); - context.rect(0, 0, 100, 100); - context.clip(); - context.beginPath(); - context.rect(50, 50, 100, 100); - context.fill(); - context.addHitRegion({ id : 'clip' }); - context.restore(); -} - -function create_non_rect_region_with_clip() { - context.clearRect(0, 0, 400, 400); - context.save(); - context.beginPath(); - context.arc(50, 50, 50, 0, Math.PI * 2); - context.clip(); - context.beginPath(); - context.rect(0, 0, 100, 100); - context.fill(); - context.addHitRegion({ id : 'clip' }); - context.restore(); -} - -function create_non_rect_region_with_multiple_clips() { - context.clearRect(0, 0, 400, 400); - context.save(); - context.beginPath(); - context.rect(0, 0, 100, 100); - context.clip(); - context.beginPath(); - context.arc(100, 50, 50, 0, Math.PI * 2); - context.clip(); - context.beginPath(); - context.rect(0, 0, 150, 50); - context.fill(); - context.addHitRegion({ id : "clip" }); - context.restore(); -} - -function no_pixel_test1() { - context.clearRect(0, 0, 400, 400); - context.save(); - context.beginPath(); - context.rect(0, 0, 100, 100); - context.clip(); - context.beginPath(); - context.rect(100, 100, 100, 100); - context.addHitRegion({ id : 'clip' }); - context.restore(); -} - -function no_pixel_test2() { - context.save(); - context.beginPath(); - context.rect(0, 0, 50, 50); - context.rect(100, 0, 50, 50); - context.clip(); - context.beginPath(); - context.arc(75, 75, 30, 0, Math.PI * 2); - context.addHitRegion({ id : 'clip' }); - context.restore(); -} - -coroutine(function*() { - setup({ explicit_done : true, explicit_timeout : true }); - - create_simple_rect_region_with_clip(); - generate_tests(assert_equals, [ - [ 'null1', yield clickOrTouch(10, 10), null ], - [ 'clip1', yield clickOrTouch(60, 60), 'clip' ] - ]); - - create_non_rect_region_with_clip(); - generate_tests(assert_equals, [ - [ 'null2', yield clickOrTouch(0, 0), null ], - [ 'null3', yield clickOrTouch(100, 0), null ], - [ 'null4', yield clickOrTouch(100, 100), null ], - [ 'null5', yield clickOrTouch(0, 100), null ], - [ 'clip2', yield clickOrTouch(50, 50), 'clip' ] - ]); - - create_non_rect_region_with_multiple_clips(); - generate_tests(assert_equals, [ - [ 'null6', yield clickOrTouch(00, 0), null ], - [ 'clip3', yield clickOrTouch(100, 0), 'clip' ], - [ 'null7', yield clickOrTouch(100, 100), null ], - [ 'null8', yield clickOrTouch(0, 100), null ], - [ 'null9', yield clickOrTouch(50, 0), null ], - [ 'null10', yield clickOrTouch(150, 0), null ], - [ 'null11', yield clickOrTouch(150, 100), null ], - [ 'null12', yield clickOrTouch(50, 100), null ], - [ 'clip4', yield clickOrTouch(50, 50), 'clip' ], - [ 'clip5', yield clickOrTouch(100, 50), 'clip' ], - ]); - - generate_tests(assert_throws_dom, [ - [ 'no pixel test1', 'NotSupportedError', no_pixel_test1 ], - [ 'no pixel test2', 'NotSupportedError', no_pixel_test2 ], - ]); - - done(); -}); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-css-transform-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-css-transform-test.html deleted file mode 100644 index db6d78e3..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-css-transform-test.html +++ /dev/null
@@ -1,146 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion CSS Size/Transform Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -createFace(context); - -function transformX(x, y, degree) -{ - var paddingLeft = parseInt(canvas.style.paddingLeft) || 0; - var borderLeft = parseInt(canvas.style.borderLeft) || 0; - var cssWidth = parseInt(canvas.style.width) || canvas.width; - var scale = canvas.width == 0 ? 1 : cssWidth / canvas.width; - var tx = x; - if (degree) { - var cos = Math.cos(degree * Math.PI / 180); - var sin = Math.sin(degree * Math.PI / 180); - tx = (x - canvas.width / 2) * cos - - (y - canvas.height / 2) * sin + - canvas.width / 2; - } - return paddingLeft + borderLeft + tx * scale; -} - -function transformY(x, y, degree) -{ - var paddingTop = parseInt(canvas.style.paddingTop) || 0; - var borderTop = parseInt(canvas.style.borderTop) || 0; - var cssHeight = parseInt(canvas.style.height) || canvas.height; - var scale = canvas.height == 0 ? 1 : cssHeight / canvas.height; - var ty = y; - if (degree) { - var cos = Math.cos(degree * Math.PI / 180); - var sin = Math.sin(degree * Math.PI / 180); - var ty = (x - canvas.width / 2) * sin + - (y - canvas.height / 2) * cos + - canvas.height / 2; - } - return paddingTop + borderTop + ty * scale; -} - -function hit_region_with_css_test(test_set) { - return new Promise(function(resolve, reject) { - coroutine(function*() { - var tests = []; - for (var i = 0; i < test_set.length; i++) { - var x = parseInt(transformX(test_set[i].x, test_set[i].y, test_set[i].rotate)); - var y = parseInt(transformY(test_set[i].x, test_set[i].y, test_set[i].rotate)); - tests.push([ test_set[i].name, yield clickOrTouch(x, y), test_set[i].id ]); - } - generate_tests(assert_equals, tests, 'ssss'); - resolve(); - }); - }); -} - -coroutine(function*() { - setup({ explicit_done : true, explicit_timeout : true }); - - var test_set1 = [ - { id : 'face', x : 100, y : 100, name : 'face1' }, - { id : 'nose', x : 200, y : 200, name : 'nose1' }, - { id : 'mouth', x : 127, y : 242, name : 'mouth1' }, - { id : 'eye', x : 150, y : 125, name : 'eye1' }, - { id : 'eye', x : 250, y : 125, name : 'eye2' }, - { id : 'face', x : 200, y : 120, name : 'face2' }, - { id : null, x : 20, y : 10, name: 'null1' } - ]; - yield hit_region_with_css_test(test_set1); - - canvas.style.width = '200px'; - canvas.style.height = '200px'; - var test_set2 = [ - { id : 'face', x : 100, y : 100, name : 'face3' }, - { id : 'nose', x : 200, y : 200, name : 'nose2' }, - { id : 'mouth', x : 127, y : 242, name : 'mouth2' }, - { id : 'eye', x : 150, y : 125, name : 'eye3' }, - { id : 'eye', x : 250, y : 125, name : 'eye4' }, - { id : 'face', x : 200, y : 120, name : 'face4' }, - { id : null, x : 20, y : 10, name: 'null2' } - ]; - yield hit_region_with_css_test(test_set2); - - canvas.style.padding = '100px'; - var test_set3 = [ - { id : 'face', x : 100, y : 100, name : 'face5' }, - { id : 'nose', x : 200, y : 200, name : 'nose3' }, - { id : 'mouth', x : 127, y : 242, name : 'mouth3' }, - { id : 'eye', x : 150, y : 125, name : 'eye5' }, - { id : 'eye', x : 250, y : 125, name : 'eye6' }, - { id : 'face', x : 200, y : 120, name : 'face6' }, - { id : null, x : 20, y : 10, name: 'null3' } - ]; - yield hit_region_with_css_test(test_set3); - - canvas.style.border = '100px solid black'; - var test_set4 = [ - { id : 'face', x : 100, y : 100, name : 'face7' }, - { id : 'nose', x : 200, y : 200, name : 'nose4' }, - { id : 'mouth', x : 127, y : 242, name : 'mouth4' }, - { id : 'eye', x : 150, y : 125, name : 'eye7' }, - { id : 'eye', x : 250, y : 125, name : 'eye8' }, - { id : 'face', x : 200, y : 120, name : 'face8' }, - { id : null, x : 20, y : 10, name: 'null4' } - ]; - yield hit_region_with_css_test(test_set4); - - var test_set_with_rotate = [ - { id : 'face', x : 100, y : 100, rotate : 72, name : 'face9' }, - { id : 'nose', x : 200, y : 200, rotate : 72, name : 'nose5' }, - { id : 'mouth', x : 127, y : 242, rotate : 72, name : 'mouth5' }, - { id : 'eye', x : 150, y : 125, rotate : 72, name : 'eye9' }, - { id : 'eye', x : 250, y : 125, rotate : 72, name : 'eye10' }, - { id : 'face', x : 200, y : 120, rotate : 72, name : 'face10' }, - { id : null, x : 20, y : 10, rotate : 72, name : 'null5' } - ]; - canvas.style.transform = 'rotate(72deg)'; - yield hit_region_with_css_test(test_set_with_rotate); - - canvas.width = '0'; - canvas.height = '0'; - canvas.style.width = "0px"; - canvas.style.height = "0px"; - var test_divide_zero = [ - { id : null, x : 20, y : 10, name: 'null' } - ]; - yield hit_region_with_css_test(test_divide_zero); - - done(); -}); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-device-pixel-ratio-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-device-pixel-ratio-test.html deleted file mode 100644 index 6db8ecd7..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-device-pixel-ratio-test.html +++ /dev/null
@@ -1,53 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion devicePixelRatio Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -createFace(context); - -coroutine(function*() { - setup({ explicit_done : true, explicit_timeout : true }); - - generate_tests(assert_equals, [ - [ 'devicePixelRatio1', devicePixelRatio, 1 ], - [ 'face1', yield clickOrTouch(100, 100), 'face' ], - [ 'nose1', yield clickOrTouch(200, 200), 'nose' ], - [ 'mouth1', yield clickOrTouch(127, 242), 'mouth' ], - [ 'eye1', yield clickOrTouch(150, 125), 'eye' ], - [ 'eye2', yield clickOrTouch(250, 125), 'eye' ], - [ 'face2', yield clickOrTouch(200, 120), 'face' ], - [ 'null1', yield clickOrTouch(20, 10), null ] - ]); - - if (window.testRunner) - testRunner.setPageZoomFactor(2.0); - - generate_tests(assert_equals, [ - [ 'devicePixelRatio2', devicePixelRatio, 2 ], - [ 'face3', yield clickOrTouch(200, 200), 'face' ], - [ 'nose2', yield clickOrTouch(400, 400), 'nose' ], - [ 'mouth2', yield clickOrTouch(254, 484), 'mouth' ], - [ 'eye3', yield clickOrTouch(300, 250), 'eye' ], - [ 'eye4', yield clickOrTouch(500, 250), 'eye' ], - [ 'face4', yield clickOrTouch(400, 240), 'face' ], - [ 'null2', yield clickOrTouch(40, 20), null ] - ]); - - done(); -}); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-event-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-event-test.html deleted file mode 100644 index 93947520..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-event-test.html +++ /dev/null
@@ -1,312 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Event Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"> - <button id="button"></button> - <button id="button2"></button> -</canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var button = document.querySelector('canvas > #button'); -var button2 = document.querySelector('canvas > #button2'); -var context = canvas.getContext('2d'); - -function assert_event_equivalent(actual, expected) { - assert_equals(actual.type, expected.type); - assert_equals(actual.target, expected.target); - if (actual.region !== undefined) - assert_equals(actual.region, expected.region); - else - assert_equals(actual.changedTouches[0].region, expected.region); -} - -function assert_event_array_equivalent(actual, expected) { - assert_true(Array.isArray(actual)); - assert_equals(actual.length, expected.length); - for (var i = 0; i < actual.length; i++) - assert_event_equivalent(actual[i], expected[i]); -} - -async_test(function() { - var fallback_element = document.createElement('button'); - canvas.appendChild(fallback_element); - - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 50, 50); - context.fill(); - context.addHitRegion({ id: 'button', control: fallback_element }); - - var expected = [ - { type: 'mousedown', target: fallback_element, region: 'button' } - ]; - var actual = []; - fallback_element.addEventListener('mousedown', e => actual.push(e)); - - if (eventSender) { - eventSender.mouseMoveTo(40, 10); - eventSender.mouseDown(); - eventSender.mouseUp(); - } - - // After the following code, the fallback element is no longer descendant of canvas. - fallback_element.parentNode.parentNode.appendChild(fallback_element); - - if (eventSender) { - eventSender.mouseMoveTo(40, 10); - eventSender.mouseDown(); - eventSender.mouseUp(); - } - - assert_event_array_equivalent(actual, expected); - this.done(); -}, 'If the control is not descendant of canvas, event should not be fired.'); - -async_test(function() { - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 50, 50); - context.fill(); - context.addHitRegion({ id: 'button' }); - - var expected = [ - { type: 'click', target: canvas, region: 'button' }, - { type: 'click', target: canvas, region: 'button' }, - ]; - var actual = []; - - canvas.addEventListener('click', e => { canvas.style.width = '0px'; actual.push(e); }); - canvas.addEventListener('click', e => { actual.push(e); canvas.style.width = '400px'; }); - - if (eventSender) { - eventSender.mouseMoveTo(40, 10); - eventSender.mouseDown(); - eventSender.mouseUp(); - } - - assert_event_array_equivalent(actual, expected); - this.done(); -}, 'The event object should not be changed even if mutate the DOM.'); - -async_test(function() { - context.rect(1, 1, 50, 50); - context.fill(); - context.addHitRegion({ id: 'button', control: button }); - - var expected = [ - { type: 'mouseover', target: button, region: 'button' }, - { type: 'mouseenter', target: button, region: 'button' }, - { type: 'mousemove', target: button, region: 'button' }, - { type: 'mousemove', target: button, region: 'button' }, - { type: 'mousedown', target: button, region: 'button' }, - { type: 'mouseup', target: button, region: 'button' }, - { type: 'mouseout', target: button, region: 'button' }, - { type: 'mouseleave', target: button, region: 'button' }, - { type: 'touchstart', target: button, region: 'button' }, - { type: 'touchend', target: button, region: 'button' }, - ]; - var actual = []; - - button.addEventListener('mouseover', e => actual.push(e)); - button.addEventListener('mouseenter', e => actual.push(e)); - button.addEventListener('mousemove', e => actual.push(e)); - button.addEventListener('mousedown', e => actual.push(e)); - button.addEventListener('mouseup', e => actual.push(e)); - button.addEventListener('mouseout', e => actual.push(e)); - button.addEventListener('mouseleave', e => actual.push(e)); - button.addEventListener('touchstart', e => actual.push(e)); - button.addEventListener('touchend', e => actual.push(e)); - - if (eventSender) { - eventSender.mouseMoveTo(0, 0); - eventSender.mouseMoveTo(10, 10); - eventSender.mouseDown(); - eventSender.mouseUp(); - eventSender.mouseMoveTo(60, 60); - - eventSender.clearTouchPoints(); - eventSender.addTouchPoint(10, 10); - eventSender.touchStart(); - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - } - - assert_event_array_equivalent(actual, expected); - this.done(); -}, 'Rerouting mouse/touch event test'); - -async_test(function() { - context.rect(1, 1, 50, 50); - context.fill(); - context.addHitRegion({ control: button }); - - var expected = [ - { type: 'mouseover', target: button, region: null }, - { type: 'mouseenter', target: button, region: null }, - { type: 'mousemove', target: button, region: null }, - { type: 'mousemove', target: button, region: null }, - { type: 'mousedown', target: button, region: null }, - { type: 'mouseup', target: button, region: null }, - { type: 'mouseout', target: button, region: null }, - { type: 'mouseleave', target: button, region: null }, - { type: 'touchstart', target: button, region: null }, - { type: 'touchend', target: button, region: null }, - ]; - var actual = []; - - button.addEventListener('mouseover', e => actual.push(e)); - button.addEventListener('mouseenter', e => actual.push(e)); - button.addEventListener('mousemove', e => actual.push(e)); - button.addEventListener('mousedown', e => actual.push(e)); - button.addEventListener('mouseup', e => actual.push(e)); - button.addEventListener('mouseout', e => actual.push(e)); - button.addEventListener('mouseleave', e => actual.push(e)); - button.addEventListener('touchstart', e => actual.push(e)); - button.addEventListener('touchend', e => actual.push(e)); - - if (eventSender) { - eventSender.mouseMoveTo(0, 0); - eventSender.mouseMoveTo(10, 10); - eventSender.mouseDown(); - eventSender.mouseUp(); - eventSender.mouseMoveTo(60, 60); - - eventSender.clearTouchPoints(); - eventSender.addTouchPoint(10, 10); - eventSender.touchStart(); - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - } - - assert_event_array_equivalent(actual, expected); - this.done(); -}, 'Rerouting mouse/touch event test but the id of hit region is unset.'); - -async_test(function() { - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 50, 50); - context.fill(); - context.addHitRegion({ id: 'button', control: button }); - context.beginPath(); - context.rect(50, 0, 50, 50); - context.fill(); - context.addHitRegion({ id: 'button2', control: button2 }); - - var expected = [ - { type: 'mousemove', target: button, region: 'button' }, - { type: 'mousemove', target: button2, region: 'button2' }, - { type: 'touchmove', target: button, region: 'button' }, - { type: 'touchmove', target: button, region: 'button' }, - ]; - var actual = []; - - button.addEventListener('mousemove', e => actual.push(e)); - button2.addEventListener('mousemove', e => actual.push(e)); - button.addEventListener('touchmove', e => actual.push(e)); - button2.addEventListener('touchmove', () => assert_unreached()); - - if (eventSender) { - eventSender.mouseMoveTo(10, 10); - eventSender.mouseMoveTo(60, 10); - - eventSender.clearTouchPoints(); - eventSender.addTouchPoint(10, 10); - eventSender.touchStart(); - eventSender.updateTouchPoint(0, 11, 11); - eventSender.touchMove(); - eventSender.updateTouchPoint(0, 60, 10); - eventSender.touchMove(); - eventSender.releaseTouchPoint(0); - eventSender.touchEnd(); - } - - assert_event_array_equivalent(actual, expected); - this.done(); -}, 'Touch events are defined to have "implicit capture".'); - -async_test(function() { - var tmp_canvas = document.createElement('canvas'); - - var without_initializer = new MouseEvent('click'); - assert_equals(without_initializer.region, null); - - var default_value = new MouseEvent('click', {}); - assert_equals(default_value.region, null); - - var set_null = new MouseEvent('click', { region: null }); - assert_equals(set_null.region, null); - - var set_region = new MouseEvent('click', { region: 'test' }); - assert_equals(set_region.region, 'test'); - - var called = []; - tmp_canvas.addEventListener('click', e => { tmp_canvas.remove(); called.push(e.region) }); - tmp_canvas.addEventListener('click', e => { tmp_canvas.remove(); called.push(e.region) }); - - tmp_canvas.dispatchEvent(set_null); - tmp_canvas.dispatchEvent(set_region); - assert_array_equals(called, [ null, null, 'test', 'test' ]); - this.done(); -}, 'MouseEventInit.'); - -async_test(function() { - var tmp_canvas = document.createElement('canvas'); - - var touch1 = new Touch({ - identifier: 0, - target: tmp_canvas - }); - var touch2 = new Touch({ - identifier: 0, - target: tmp_canvas, - region: null - }); - var touch3 = new Touch({ - identifier: 0, - target: tmp_canvas, - region: 'touch' - }); - - var touch_event = new TouchEvent('touchstart', { - touches: [touch1, touch2, touch3], - targetTouches: [touch1, touch3] - }); - - assert_equals(touch_event.touches.length, 3); - assert_equals(touch_event.touches[0].region, null); - assert_equals(touch_event.touches[1].region, null); - assert_equals(touch_event.touches[2].region, 'touch'); - assert_equals(touch_event.targetTouches.length, 2); - assert_equals(touch_event.targetTouches[0].region, null); - assert_equals(touch_event.targetTouches[1].region, 'touch'); - - var called = []; - tmp_canvas.addEventListener('touchstart', function(e) { - tmp_canvas.remove(); - called.push(e.touches[0].region); - called.push(e.touches[1].region); - called.push(e.touches[2].region); - }); - - tmp_canvas.addEventListener('touchstart', function(e) { - tmp_canvas.remove(); - called.push(e.touches[0].region); - called.push(e.touches[1].region); - called.push(e.touches[2].region); - }); - - tmp_canvas.dispatchEvent(touch_event); - assert_array_equals(called, [ null, null, 'touch', null, null, 'touch' ]); - this.done(); -}, 'TouchEventInit.'); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-exception-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-exception-test.html deleted file mode 100644 index 2577ab2..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-exception-test.html +++ /dev/null
@@ -1,30 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Exception Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -generate_tests(assert_throws_dom, [ - [ 'context.addHitRegion()', 'NotSupportedError', function() { context.addHitRegion(); } ], - [ 'context.addHitRegion({ id : \'\' })', 'NotSupportedError', function() { context.addHitRegion({ id : '' }); } ], - [ 'context.addHitRegion({ id : undefined })', 'NotSupportedError', function() { context.addHitRegion({ id : undefined }); } ], - [ 'context.addHitRegion({ control : null })', 'NotSupportedError', function() { context.addHitRegion({ control : null }); } ], - [ 'context.addHitRegion({ control : undefined })', 'NotSupportedError', function() { context.addHitRegion({ control : undefined }); } ], - [ 'context.addHitRegion({ id : \'\', control : null })', 'NotSupportedError', function() { context.addHitRegion({ id : '', control : null }); } ], - [ 'context.addHitRegion({ id : undefined, control : null })', 'NotSupportedError', function() { context.addHitRegion({ id : undefined, control : null }); } ], - [ 'context.addHitRegion({ id : \'\', control : undefined })', 'NotSupportedError', function() { context.addHitRegion({ id : '', control : undefined }); } ], - [ 'context.addHitRegion({ id : undefined, control : undefined )', 'NotSupportedError', function() { context.addHitRegion({ id : undefined, control : undefined }); } ], -]); - -generate_tests(assert_throws_js, [ - [ 'context.addHitRegion({ control : {} })', TypeError, function() { context.addHitRegion({ control : {} }); } ], - [ 'context.addHitRegion({ id : \'\', control : {} })', TypeError, function() { context.addHitRegion({ id : '', control : {} }); } ], - [ 'context.addHitRegion({ id : undefined, control : {} })', TypeError, function() { context.addHitRegion({ id : undefined, control : {} }); } ], -]); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-1.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-1.html deleted file mode 100644 index 9afbeef5..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-1.html +++ /dev/null
@@ -1,72 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Canvas Fallback Element Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"> - <a id="a"></a> - <a id="a_with_image"><img></a> - <button id="button"></button> - <input id="checkbox" type="checkbox"> - <input id="radio" type="radio"> - <input id="input_button" type="button"> - <input id="input_image_button" type="image"> - <select id="empty_select"></select> - <select id="select_size_greater_than_1" size="2"></select> - <select id="select_multiple" multiple="multiple"></select> - <select> - <option id="option_with_select"></option> - </select> - <select multiple="multiple"> - <option id="option_with_select_multiple"></option> - </select> - <select size="2"> - <option id="option_with_select_size_greater_than_1"></option> - </select> - <p id="p"></p> - <p id="p_with_tabindex" tabindex="0"></p> - <table> - <caption></caption> - <thead><tr><th></th></tr></thead> - <tfoot><tr><td></td></tr></tfoot> - <tbody><tr><td></td></tr></tbody> - </table> -</canvas> -<button id="button_is_not_descendant_of_canvas"></button> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -function canvas_fallback_test(element, expected) { - test(function() { - var canvas = document.querySelector('canvas'); - var context = canvas.getContext('2d'); - - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 100, 100); - if (expected) { - assert_throws_dom(expected, function() { - context.addHitRegion({ control : element }); - }); - } else { - context.addHitRegion({ control : element }); - } - }, element.id); -} - -canvas_fallback_test(document.getElementById('button_is_not_descendant_of_canvas'), "NotSupportedError"); -canvas_fallback_test(document.querySelector('canvas'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('a')); -canvas_fallback_test(document.getElementById('a_with_image'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('button')); -canvas_fallback_test(document.getElementById('checkbox')); -canvas_fallback_test(document.getElementById('radio')); -canvas_fallback_test(document.getElementById('input_button')); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-2.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-2.html deleted file mode 100644 index 4d93694..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-2.html +++ /dev/null
@@ -1,73 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Canvas Fallback Element Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"> - <a id="a"></a> - <a id="a_with_image"><img></a> - <button id="button"></button> - <input id="checkbox" type="checkbox"> - <input id="radio" type="radio"> - <input id="input_button" type="button"> - <input id="input_image_button" type="image"> - <select id="empty_select"></select> - <select id="select_size_greater_than_1" size="2"></select> - <select id="select_multiple" multiple="multiple"></select> - <select> - <option id="option_with_select"></option> - </select> - <select multiple="multiple"> - <option id="option_with_select_multiple"></option> - </select> - <select size="2"> - <option id="option_with_select_size_greater_than_1"></option> - </select> - <p id="p"></p> - <p id="p_with_tabindex" tabindex="0"></p> - <table> - <caption></caption> - <thead><tr><th></th></tr></thead> - <tfoot><tr><td></td></tr></tfoot> - <tbody><tr><td></td></tr></tbody> - </table> -</canvas> -<button id="button_is_not_descendant_of_canvas"></button> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -function canvas_fallback_test(element, expected) { - test(function() { - var canvas = document.querySelector('canvas'); - var context = canvas.getContext('2d'); - - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 100, 100); - if (expected) { - assert_throws_dom(expected, function() { - context.addHitRegion({ control : element }); - }); - } else { - context.addHitRegion({ control : element }); - } - }, element.id); -} - -canvas_fallback_test(document.getElementById('input_image_button'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('empty_select'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('select_size_greater_than_1')); -canvas_fallback_test(document.getElementById('select_multiple')); -canvas_fallback_test(document.getElementById('option_with_select'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('option_with_select_multiple')); -canvas_fallback_test(document.getElementById('option_with_select_size_greater_than_1')); -canvas_fallback_test(document.getElementById('p'), "NotSupportedError"); -canvas_fallback_test(document.getElementById('p_with_tabindex')); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-3.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-3.html deleted file mode 100644 index 889397b..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fallback-element-test-3.html +++ /dev/null
@@ -1,72 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Canvas Fallback Element Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"> - <a id="a"></a> - <a id="a_with_image"><img></a> - <button id="button"></button> - <input id="checkbox" type="checkbox"> - <input id="radio" type="radio"> - <input id="input_button" type="button"> - <input id="input_image_button" type="image"> - <select id="empty_select"></select> - <select id="select_size_greater_than_1" size="2"></select> - <select id="select_multiple" multiple="multiple"></select> - <select> - <option id="option_with_select"></option> - </select> - <select multiple="multiple"> - <option id="option_with_select_multiple"></option> - </select> - <select size="2"> - <option id="option_with_select_size_greater_than_1"></option> - </select> - <p id="p"></p> - <p id="p_with_tabindex" tabindex="0"></p> - <table> - <caption></caption> - <thead><tr><th></th></tr></thead> - <tfoot><tr><td></td></tr></tfoot> - <tbody><tr><td></td></tr></tbody> - </table> -</canvas> -<button id="button_is_not_descendant_of_canvas"></button> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -function canvas_fallback_test(element, expected) { - test(function() { - var canvas = document.querySelector('canvas'); - var context = canvas.getContext('2d'); - - context.clearRect(0, 0, 400, 400); - context.rect(0, 0, 100, 100); - if (expected) { - assert_throws_dom(expected, function() { - context.addHitRegion({ control : element }); - }); - } else { - context.addHitRegion({ control : element }); - } - }, element.id); -} - -canvas_fallback_test(document.querySelector('canvas table')); -canvas_fallback_test(document.querySelector('canvas tr')); -canvas_fallback_test(document.querySelector('canvas th')); -canvas_fallback_test(document.querySelector('canvas td')); -canvas_fallback_test(document.querySelector('canvas thead')); -canvas_fallback_test(document.querySelector('canvas tfoot')); -canvas_fallback_test(document.querySelector('canvas tbody')); -canvas_fallback_test(document.querySelector('canvas caption')); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fill-rule-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fill-rule-test.html deleted file mode 100644 index 02e45731..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-fill-rule-test.html +++ /dev/null
@@ -1,71 +0,0 @@ -<script src='../../resources/testharness.js'></script> -<script src='../../resources/testharnessreport.js'></script> -<body> -<canvas id='canvas' width='400' height='400'> -</canvas> -<script src='./resources/canvas-hit-region-event.js'></script> -<script> -test(function(t) { - - var canvas = document.getElementById('canvas'); - var context = canvas.getContext('2d'); - - context.rect(20, 20, 60, 60); - context.rect(0, 0, 100, 100); - context.addHitRegion({ - id : 'nonzero' - // default fillRule - }); - - // default fillRule(nonzero) - assert_equals(clickCanvas(1, 1), 'nonzero'); - assert_equals(clickCanvas(99, 98), 'nonzero'); - assert_equals(clickCanvas(21, 21), 'nonzero'); - assert_equals(clickCanvas(50, 50), 'nonzero'); - - context.removeHitRegion('nonzero'); - - context.addHitRegion({ - id : 'evenodd', - fillRule : 'evenodd' - }); - - // fillRule = evenodd - assert_equals(clickCanvas(1, 1), 'evenodd'); - assert_equals(clickCanvas(99, 98), 'evenodd'); - assert_equals(clickCanvas(21, 21), null); - assert_equals(clickCanvas(50, 50), null); - - context.removeHitRegion('evenodd'); - - context.addHitRegion({ - id : 'nonzero', - fillRule : 'nonzero' - }); - - // fillRule = nonzero - assert_equals(clickCanvas(1, 1), 'nonzero'); - assert_equals(clickCanvas(99, 98), 'nonzero'); - assert_equals(clickCanvas(21, 21), 'nonzero'); - assert_equals(clickCanvas(50, 50), 'nonzero'); - - context.removeHitRegion('nonzero'); - - assert_throws_js(TypeError, function() { - context.addHitRegion({id : 'nonzero', fillRule : null}); - }); - - context.addHitRegion({ - id : 'nonzero', - fillRule : undefined - }); - - // fillRule = undefined, falls back to default (nonzero):'); - assert_equals(clickCanvas(1, 1), 'nonzero'); - assert_equals(clickCanvas(99, 98), 'nonzero'); - assert_equals(clickCanvas(21, 21), 'nonzero'); - assert_equals(clickCanvas(50, 50), 'nonzero'); - -}, 'Canvas Hit Regions: fillRule test'); -</script> -</body>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-test.html deleted file mode 100644 index 2b6407b..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-test.html +++ /dev/null
@@ -1,58 +0,0 @@ -<title>Canvas Hit Regions: path2d test</title> -<script src='../../resources/testharness.js'></script> -<script src='../../resources/testharnessreport.js'></script> -<body> -<canvas id='canvas' width='400' height='400'> - <button id='face'></button> - <button id='eyes'></button> -</canvas> - -<script src='./resources/canvas-hit-region-event.js'></script> -<script> - -test(function(t) { - var canvas = document.getElementById('canvas'); - var context = canvas.getContext('2d'); - - var face = new Path2D(); - context.fillStyle = 'pink'; - face.arc(200, 175, 150, 0, Math.PI * 2, true); - context.fill(face); - context.addHitRegion({ id : 'face', control : document.getElementById('face'), path : face }); - - var nose = new Path2D(); - context.fillStyle = 'black'; - context.globalAlpha = .5; - nose.moveTo(200, 165); - nose.lineTo(240, 205); - nose.lineTo(160, 205); - nose.closePath(); - context.fill(nose); - context.addHitRegion({ id : 'nose', path : nose }); - - var mouth = new Path2D(); - context.fillStyle = 'red'; - mouth.rect(125, 240, 150, 20); - context.fill(mouth); - context.addHitRegion({ id : 'mouth', path : mouth }); - - var eyes = new Path2D(); - context.globalAlpha = 1; - context.fillStyle = 'blue'; - eyes.arc(150, 125, 25, 0, Math.PI * 2, true); - eyes.arc(250, 125, 25, 0, Math.PI * 2, true); - context.fill(eyes); - context.addHitRegion({ id: 'eye', control : document.getElementById('eyes'), path : eyes }); - - // Hit detection and mouse event tests'); - assert_equals(clickCanvas(100, 100), 'face'); - assert_equals(clickCanvas(200, 200), 'nose'); - assert_equals(clickCanvas(127, 242), 'mouth'); - assert_equals(clickCanvas(150, 125), 'eye'); - assert_equals(clickCanvas(250, 125), 'eye'); - assert_equals(clickCanvas(200, 125), 'face'); - assert_equals(clickCanvas(20, 10), null); - -}, 'Test that createImageBitmap from a bitmaprenderer canvas produces correct result'); -</script> -</body>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-transform-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-transform-test.html deleted file mode 100644 index ac4849d..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-path2d-transform-test.html +++ /dev/null
@@ -1,153 +0,0 @@ -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<body> -<canvas id="canvas" width="400" height="400"></canvas> -<script src="./resources/canvas-hit-region-event.js"></script> -<script> -test(function(t) { - - var canvas = document.getElementById("canvas"); - var context = canvas.getContext("2d"); - var testSet = []; - - function clickTests(message, tests) - { - for (var i = 0; i < tests.length; i++) - testSet.push({ - actual : clickCanvas(tests[i].x, tests[i].y), - expected : tests[i].expected - }); - } - - function createHitRegion(transformMethod, isRect) - { - context.removeHitRegion("hit"); - context.save(); - transformMethod(); - context.addHitRegion({ - id : "hit", - path : drawSomething(isRect) - }); - context.restore(); - } - - function drawSomething(isRect) - { - var path = new Path2D(); - - if (isRect) { - path.rect(0, 0, 50, 50); - return path; - } - - // draw star - path.moveTo(0, -50); - path.lineTo(-15, -10); - path.lineTo(-50, -10); - path.lineTo(-15, 10); - path.lineTo(-35, 50); - path.lineTo(0, 20); - path.lineTo(35, 50); - path.lineTo(15, 10); - path.lineTo(50, -10); - path.lineTo(15, -10); - path.lineTo(0, -50); - return path; - } - - // Rectangle with context.translate() - createHitRegion(function() { - context.translate(20, 20); - }, true); - clickTests("Rectangle with context.translate():", [ - { x : 1, y : 1, expected : null }, - { x : 31, y : 21, expected : "hit" }, - { x : 51, y : 51, expected : "hit" }, - { x : 10, y : 5, expected : null }, - { x : 61, y : 61, expected : "hit" } - ]); - - // Rectangle with context.rotate() - createHitRegion(function() { - context.rotate(Math.PI * 0.25); // 45 degrees - }, true); - clickTests("Rectangle with context.rotate():", [ - { x : 20, y : 5, expected : null }, - { x : 0, y : 25, expected : "hit" }, - { x : 49, y : 49, expected : null }, - { x : 0, y : 51, expected : "hit" }, - ]); - - // Rectangle with context.scale() - createHitRegion(function() { - context.scale(2, 2); - }, true); - clickTests("Rectangle with context.scale():", [ - { x : 1, y : 1, expected : "hit" }, - { x : 49, y : 49, expected : "hit" }, - { x : 51, y : 51, expected : "hit" }, - { x : 99, y : 99, expected : "hit" }, - ]); - - // Non rectangle (star) with context.translate() - createHitRegion(function() { - context.translate(50, 50); - }, false); - clickTests("Non rectangle (star) with context.translate():", [ - { x : 26, y : 23, expected : null }, - { x : 82, y : 65, expected : null }, - { x : 51, y : 21, expected : "hit" }, - { x : 74, y : 49, expected : "hit" }, - { x : 49, y : 88, expected : null }, - { x : 13, y : 65, expected : null }, - { x : 66, y : 76, expected : "hit" }, - { x : 76, y : 23, expected : null }, - { x : 38, y : 76, expected : "hit" }, - { x : 28, y : 47, expected : "hit" }, - ]); - - // Non rectangle (star) with context.rotate() - createHitRegion(function() { - context.translate(50, 50); - context.rotate(Math.PI * 0.25); - }, false); - clickTests("Non rectangle (star) with context.rotate():", [ - { x : 26, y : 23, expected : "hit" }, - { x : 82, y : 65, expected : null }, - { x : 51, y : 21, expected : null }, - { x : 74, y : 49, expected : null }, - { x : 49, y : 88, expected : null }, - { x : 13, y : 65, expected : null }, - { x : 66, y : 76, expected : null }, - { x : 76, y : 23, expected : "hit" }, - { x : 38, y : 76, expected : "hit" }, - { x : 28, y : 47, expected : null }, - ]); - - // Non rectangle (star) with context.scale() - createHitRegion(function() { - context.translate(25, 25); - context.scale(0.5, 0.5); - }, false); - clickTests("Non rectangle (star) with context.scale():", [ - { x : 28, y : 13, expected : "hit" }, - { x : 38, y : 24, expected : "hit" }, - { x : 34, y : 38, expected : "hit" }, - { x : 13, y : 12, expected : null }, - { x : 36, y : 12, expected : null }, - { x : 40, y : 33, expected : null }, - { x : 9, y : 31, expected : null }, - { x : 18, y : 41, expected : "hit" }, - { x : 12, y : 25, expected : "hit" }, - { x : 25, y : 42, expected : null }, - ]); - - for (var i = 0; i < testSet.length; i++) { - var test = testSet[i]; - window.region = test.expected; - assert_equals(region, test.actual); - } - -}, 'Canvas Hit Regions: path2d with transform test'); -</script> -</body>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-scale-factor.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-scale-factor.html deleted file mode 100644 index 7816150d..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-scale-factor.html +++ /dev/null
@@ -1,55 +0,0 @@ -<!DOCTYPE html> -<title>HitRegion Scale Factor Test</title> -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<script src="./resources/test-helpers.js"></script> -<canvas width="400" height="400"></canvas> -<style> - -body { - margin : 0px; - padding : 0px; -} - -</style> -<script> - -var canvas = document.querySelector('canvas'); -var context = canvas.getContext('2d'); - -createFace(context); - -coroutine(function*() { - setup({ explicit_done : true, explicit_timeout : true }); - - generate_tests(assert_equals, [ - [ 'devicePixelRatio1', devicePixelRatio, 1 ], - [ 'face1', yield clickOrTouch(100, 100), 'face' ], - [ 'nose1', yield clickOrTouch(200, 200), 'nose' ], - [ 'mouth1', yield clickOrTouch(127, 242), 'mouth' ], - [ 'eye1', yield clickOrTouch(150, 125), 'eye' ], - [ 'eye2', yield clickOrTouch(250, 125), 'eye' ], - [ 'face2', yield clickOrTouch(200, 120), 'face' ], - [ 'null1', yield clickOrTouch(20, 10), null ] - ]); - - if (window.internals) { - internals.setPageScaleFactorLimits(2.0, 2.0); - internals.setPageScaleFactor(2.0); - } - - generate_tests(assert_equals, [ - [ 'devicePixelRatio2', devicePixelRatio, 1 ], - [ 'face3', yield clickOrTouch(200, 200), 'face' ], - [ 'nose2', yield clickOrTouch(400, 400), 'nose' ], - [ 'mouth2', yield clickOrTouch(254, 484), 'mouth' ], - [ 'eye3', yield clickOrTouch(300, 250), 'eye' ], - [ 'eye4', yield clickOrTouch(500, 250), 'eye' ], - [ 'face4', yield clickOrTouch(400, 240), 'face' ], - [ 'null2', yield clickOrTouch(40, 20), null ] - ]); - - done(); -}); - -</script>
diff --git a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-transform-test.html b/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-transform-test.html deleted file mode 100644 index c7a0e938..0000000 --- a/third_party/blink/web_tests/fast/canvas/canvas-hit-regions-transform-test.html +++ /dev/null
@@ -1,151 +0,0 @@ -<script src="../../resources/testharness.js"></script> -<script src="../../resources/testharnessreport.js"></script> -<body> -<canvas id="canvas" width="400" height="400"></canvas> -<script src="./resources/canvas-hit-region-event.js"></script> -<script> -test(function(t) { - - var canvas = document.getElementById("canvas"); - var context = canvas.getContext("2d"); - var testSet = []; - - function clickTests(message, tests) - { - for (var i = 0; i < tests.length; i++) - testSet.push({ - actual : clickCanvas(tests[i].x, tests[i].y), - expected : tests[i].expected - }); - } - - function createHitRegion(pathMethod) - { - context.removeHitRegion("hit"); - context.beginPath(); - context.save(); - pathMethod(); - context.restore(); - context.addHitRegion({ - id : "hit" - }); - } - - function drawStar() - { - context.beginPath(); - context.moveTo(0, -50); - context.lineTo(-15, -10); - context.lineTo(-50, -10); - context.lineTo(-15, 10); - context.lineTo(-35, 50); - context.lineTo(0, 20); - context.lineTo(35, 50); - context.lineTo(15, 10); - context.lineTo(50, -10); - context.lineTo(15, -10); - context.lineTo(0, -50); - } - - // Rectangle with context.translate() - createHitRegion(function() { - context.translate(20, 20); - context.rect(0, 0, 50, 50); - }); - clickTests("Rectangle with context.translate():", [ - { x : 1, y : 1, expected : null }, - { x : 31, y : 21, expected : "hit" }, - { x : 51, y : 51, expected : "hit" }, - { x : 10, y : 5, expected : null }, - { x : 61, y : 61, expected : "hit" } - ]); - - // Rectangle with context.rotate() - createHitRegion(function() { - context.rotate(Math.PI * 0.25); // 45 degrees - context.rect(0, 0, 50, 50); - }); - clickTests("Rectangle with context.rotate():", [ - { x : 20, y : 5, expected : null }, - { x : 0, y : 25, expected : "hit" }, - { x : 49, y : 49, expected : null }, - { x : 0, y : 51, expected : "hit" }, - ]); - - // Rectangle with context.scale() - createHitRegion(function() { - context.scale(2, 2); - context.rect(0, 0, 50, 50); - }); - clickTests("Rectangle with context.scale():", [ - { x : 1, y : 1, expected : "hit" }, - { x : 49, y : 49, expected : "hit" }, - { x : 51, y : 51, expected : "hit" }, - { x : 99, y : 99, expected : "hit" }, - ]); - - // Non rectangle (star) with context.translate() - createHitRegion(function() { - context.translate(50, 50); - drawStar(); - }); - clickTests("Non rectangle (star) with context.translate():", [ - { x : 26, y : 23, expected : null }, - { x : 82, y : 65, expected : null }, - { x : 51, y : 21, expected : "hit" }, - { x : 74, y : 49, expected : "hit" }, - { x : 49, y : 88, expected : null }, - { x : 13, y : 65, expected : null }, - { x : 66, y : 76, expected : "hit" }, - { x : 76, y : 23, expected : null }, - { x : 38, y : 76, expected : "hit" }, - { x : 28, y : 47, expected : "hit" }, - ]); - - // Non rectangle (star) with context.rotate() - createHitRegion(function() { - context.translate(50, 50); - context.rotate(Math.PI * 0.25); - drawStar(); - }); - clickTests("Non rectangle (star) with context.rotate():", [ - { x : 26, y : 23, expected : "hit" }, - { x : 82, y : 65, expected : null }, - { x : 51, y : 21, expected : null }, - { x : 74, y : 49, expected : null }, - { x : 49, y : 88, expected : null }, - { x : 13, y : 65, expected : null }, - { x : 66, y : 76, expected : null }, - { x : 76, y : 23, expected : "hit" }, - { x : 38, y : 76, expected : "hit" }, - { x : 28, y : 47, expected : null }, - ]); - - // Non rectangle (star) with context.scale() - createHitRegion(function() { - context.translate(25, 25); - context.scale(0.5, 0.5); - drawStar(); - }); - clickTests("Non rectangle (star) with context.scale():", [ - { x : 28, y : 13, expected : "hit" }, - { x : 38, y : 24, expected : "hit" }, - { x : 34, y : 38, expected : "hit" }, - { x : 13, y : 12, expected : null }, - { x : 36, y : 12, expected : null }, - { x : 40, y : 33, expected : null }, - { x : 9, y : 31, expected : null }, - { x : 18, y : 41, expected : "hit" }, - { x : 12, y : 25, expected : "hit" }, - { x : 25, y : 42, expected : null }, - ]); - - for (var i = 0; i < testSet.length; i++) { - var test = testSet[i]; - window.region = test.expected; - assert_equals(region, test.actual); - } - -}, 'Canvas Hit Regions: transform test'); -</script> -</body>
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id-expected.txt new file mode 100644 index 0000000..30af116 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id-expected.txt
@@ -0,0 +1,5 @@ +Test frame attirbution of requests from about:blank frames +http://127.0.0.1:8000/inspector-protocol/network/resources/test.css requested by http://127.0.0.1:8000/inspector-protocol/resources/inspector-protocol-page.html +http://127.0.0.1:8000/inspector-protocol/network/resources/test.css?url=about:blank requested by http://127.0.0.1:8000/inspector-protocol/resources/inspector-protocol-page.html +http://127.0.0.1:8000/inspector-protocol/network/resources/test.css?url=http://127.0.0.1:8000/inspector-protocol/fetch/../network/resources/simple-iframe.html requested by http://127.0.0.1:8000/inspector-protocol/network/resources/simple-iframe.html +
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id.js b/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id.js new file mode 100644 index 0000000..b3d6c11 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/fetch/about-blank-frame-id.js
@@ -0,0 +1,61 @@ +(async function(testRunner) { + const {session, dp} = await testRunner.startBlank( + `Test frame attirbution of requests from about:blank frames`); + + await Promise.all([ + dp.Runtime.enable(), + dp.Fetch.enable() + ]); + + dp.Fetch.onRequestPaused(event => { + dp.Fetch.continueRequest({requestId: event.params.requestId}) + }); + const appendStylesheet = function(doc, href) { + const stylesheet = doc.createElement('link'); + stylesheet.href = href; + stylesheet.rel = 'stylesheet'; + stylesheet.type = 'text/css'; + doc.head.appendChild(stylesheet); + } + session.evaluate(` + (${appendStylesheet.toString()})(document, '${testRunner.url('../network/resources/test.css')}')`); + + const topFrameRequest = (await dp.Fetch.onceRequestPaused()).params; + dp.Fetch.continueRequest({requestId: topFrameRequest.requestId}); + + async function makeRequestInFrame(url) { + // Load frame first, so we don't intercept request associated with it being loaded. + await session.evaluateAsync(`(function() { + const iframe = document.createElement('iframe'); + iframe.src = '${url}'; + const loadPromise = new Promise(resolve => iframe.addEventListener('load', resolve)); + document.body.appendChild(iframe); + window.lastFrame = iframe; + return loadPromise; + })()`); + session.evaluate(` + (${appendStylesheet.toString()})(window.lastFrame.contentDocument, + '${testRunner.url('../network/resources/test.css')}?url=${url}'); + `); + return (await dp.Fetch.onceRequestPaused()).params; + } + + const blankFrameRequest = await makeRequestInFrame('about:blank'); + const httpFrameRequest = await makeRequestInFrame(testRunner.url('../network/resources/simple-iframe.html')); + + const {frameTree} = (await dp.Page.getFrameTree()).result; + + const frameMap = new Map(); + function traverseFrameTree(root) { + frameMap.set(root.frame.id, root.frame.url); + for (const f of root.childFrames || []) + traverseFrameTree(f); + } + traverseFrameTree(frameTree); + + testRunner.log(`${topFrameRequest.request.url} requested by ${frameMap.get(topFrameRequest.frameId)}`); + testRunner.log(`${blankFrameRequest.request.url} requested by ${frameMap.get(blankFrameRequest.frameId)}`); + testRunner.log(`${httpFrameRequest.request.url} requested by ${frameMap.get(httpFrameRequest.frameId)}`); + + testRunner.completeTest(); +})
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/justifyright_4001-last-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/editing/run/justifyright_4001-last-expected.txt deleted file mode 100644 index a44c45ab..0000000 --- a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/justifyright_4001-last-expected.txt +++ /dev/null
@@ -1,761 +0,0 @@ -This is a testharness.js-based test. -Found 757 tests; 621 PASS, 136 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after assert_equals: Wrong result returned expected true but got false -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p align=\"right\">bar</p><p>extra</p>" but got "<p style=\"text-align:right\">foo</p><p align=\"right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") before assert_equals: Wrong result returned expected false but got true -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p align=\"right\">bar</p><p>extra</p>" but got "<p style=\"text-align:right\">foo</p><p align=\"right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div style=\"text-align:right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div style=\"text-align:right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div align=\"nonsense\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div align=\"nonsense\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div style=\"text-align:inherit\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" compare innerHTML -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<div style=\"text-align:end\">foo</div><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:start\">foo</div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:start\">foo</div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:right\">foo</div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:right\">foo</div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p>" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p>" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p></div>" but got "<p style=\"text-align:right\">foo</p> <div style=\"text-align:right\"><p>bar</p></div>" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p></div>" but got "<p style=\"text-align:right\">foo</p> <div align=\"right\"><p>bar</p></div>" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div align=\"right\"><p>baz</p></div>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div align=\"right\"><p>baz</p></div>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/platform/win10.1909/external/wpt/editing/run/justifyright_4001-last-expected.txt b/third_party/blink/web_tests/platform/win10.1909/external/wpt/editing/run/justifyright_4001-last-expected.txt deleted file mode 100644 index 4e79c28..0000000 --- a/third_party/blink/web_tests/platform/win10.1909/external/wpt/editing/run/justifyright_4001-last-expected.txt +++ /dev/null
@@ -1,813 +0,0 @@ -This is a testharness.js-based test. -Found 809 tests; 657 PASS, 152 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after assert_equals: Wrong result returned expected true but got false -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p align=\"right\">bar</p><p>extra</p>" but got "<p style=\"text-align:right\">foo</p><p align=\"right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") before assert_equals: Wrong result returned expected false but got true -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p align=\"right\">bar</p><p>extra</p>" but got "<p style=\"text-align:right\">foo</p><p align=\"right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p>[foo]<p align=right>bar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p align=\"right\">foo</p><div style=\"text-align:right\"><p>bar</p></div><p align=\"right\">baz</p><p>extra</p>" but got "<p align=\"right\">foo</p><p style=\"text-align:right\">bar</p><p align=\"right\">baz</p><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<p align=right>foo<p>[bar]<p align=right>baz<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div align=\"right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div style=\"text-align:right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right>[foo</div>bar]<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo<br>bar</div><p>extra</p>" but got "<div style=\"text-align:right\">foo</div><p style=\"text-align:right\">bar</p><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right>fo[o</div>b]ar<p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>[foo]</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<span style=\"text-align:right\">foo</span><p>extra</p>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") before assert_equals: Wrong result returned expected false but got true -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<span style=text-align:right>f[o]o</span><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><div style=\"text-align:left\" contenteditable=\"false\">bar</div><div style=\"text-align:right\">baz</div><p>extra</p>" but got "<div style=\"text-align:right\">foo<div style=\"text-align:right\" contenteditable=\"false\">bar</div>baz</div><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right>[foo<div style=text-align:left contenteditable=false>bar</div>baz]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div align=\"nonsense\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div align=\"nonsense\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div align=nonsense><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p></div><p>extra</p>" but got "<div style=\"text-align:inherit\"><p style=\"text-align:right\">foo</p></div><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:inherit><p>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><quasit><p>foo</p></quasit></div><p>extra</p>" but got "<quasit align=\"center\"><p style=\"text-align:right\">foo</p></quasit><p>extra</p>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<quasit align=center><p>[foo]</p></quasit><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" compare innerHTML -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\">foo</div><p>extra</p>" but got "<div style=\"text-align:end\">foo</div><p>extra</p>" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:start\">foo</div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:start\">foo</div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:start>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:right\">foo</div><p>extra</p>" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div dir=\"rtl\">foo</div><p>extra</p>" but got "<div dir=\"rtl\" style=\"text-align:right\">foo</div><p>extra</p>" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["justifyright",""]] "<div dir=rtl style=text-align:end>[foo]</div><p>extra" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p>" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p>" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p></div>" but got "<p style=\"text-align:right\">foo</p> <div style=\"text-align:right\"><p>bar</p></div>" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<p>[foo]</p> <div style=text-align:right><p>bar</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>": execCommand("justifyright", false, "") return value -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" checks for modifications to non-editable content -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p></div>" but got "<p style=\"text-align:right\">foo</p> <div align=\"right\"><p>bar</p></div>" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandIndeterm("justifyright") before -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandState("justifyright") before -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandIndeterm("justifyright") after -PASS [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandState("justifyright") after -FAIL [["justifyright",""]] "<p>[foo]</p> <div align=right><p>bar</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","div"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "true") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","true"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("stylewithcss", false, "false") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" checks for modifications to non-editable content -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div style=\"text-align:right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div style=\"text-align:right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div style=\"text-align:right\"><p>baz</p></div>" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("stylewithcss") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["stylewithcss","false"],["defaultparagraphseparator","p"],["justifyright",""]] "<div style=text-align:right><p>foo</div> <p>[bar]</p> <div style=text-align:right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("defaultparagraphseparator", false, "div") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div align=\"right\"><p>baz</p></div>" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","div"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("defaultparagraphseparator", false, "p") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>": execCommand("justifyright", false, "") return value -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" checks for modifications to non-editable content -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<div align=\"right\"><p>foo</p> <p>bar</p> <p>baz</p></div>" but got "<div align=\"right\"><p>foo</p></div> <p style=\"text-align:right\">bar</p> <div align=\"right\"><p>baz</p></div>" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("defaultparagraphseparator") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") before -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") before -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "left" but got "false" -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandIndeterm("justifyright") after -PASS [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandState("justifyright") after -FAIL [["defaultparagraphseparator","p"],["justifyright",""]] "<div align=right><p>foo</div> <p>[bar]</p> <div align=right><p>baz</div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" checks for modifications to non-editable content -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" compare innerHTML -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyleft") before -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyleft") before -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyleft") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyleft") after -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyleft") after -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyleft") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifycenter") before -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifycenter") before -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifycenter") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifycenter") after -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifycenter") after -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifycenter") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyfull") before -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyfull") before -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyfull") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyfull") after -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyfull") after -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyfull") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyright") before -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyright") before -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyright") after -PASS [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyright") after -FAIL [] "<div contenteditable=false align=right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" checks for modifications to non-editable content -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" compare innerHTML -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyleft") before -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyleft") before -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyleft") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyleft") after -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyleft") after -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyleft") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifycenter") before -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifycenter") before -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifycenter") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifycenter") after -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifycenter") after -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifycenter") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyfull") before -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyfull") before -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyfull") before assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyfull") after -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyfull") after -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyfull") after assert_equals: Wrong result returned expected "right" but got "false" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyright") before -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyright") before -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyright") before assert_equals: Wrong result returned expected "right" but got "true" -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandIndeterm("justifyright") after -PASS [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandState("justifyright") after -FAIL [] "<div contenteditable=false style=text-align:right><p contenteditable>f[]oo</p></div>" queryCommandValue("justifyright") after assert_equals: Wrong result returned expected "right" but got "true" -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload-expected.txt b/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload-expected.txt deleted file mode 100644 index eda241d..0000000 --- a/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -CONSOLE MESSAGE: Blink Test Plugin: initializing -go fullscreen - -There should only be one ALERT. If there were two, the plugin was reloaded during the transition to fullscreen.
diff --git a/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload.html b/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload.html deleted file mode 100644 index 9b9d897e..0000000 --- a/third_party/blink/web_tests/plugins/fullscreen-plugins-dont-reload.html +++ /dev/null
@@ -1,26 +0,0 @@ -<html> -<a id='link' href="javascript:document.querySelector('embed').webkitRequestFullScreen()">go -fullscreen</a> -<p> -There should only be one ALERT. If there were two, the plugin was reloaded -during the transition to fullscreen. -</p> -<embed type="application/x-blink-test-plugin"></embed> - -<script> -if (window.testRunner) { - testRunner.waitUntilDone(); - testRunner.dumpAsText(); - - var plugin = document.querySelector('embed'); - plugin.addEventListener('webkitfullscreenchange', function () { - internals.updateLayoutAndRunPostLayoutTasks(); - testRunner.notifyDone(); - }) - document.addEventListener('keydown', function () { - plugin.webkitRequestFullScreen(); - }) - eventSender.keyDown('a') -} -</script> -</html>
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index 86204f7..4c642a0 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -1110,13 +1110,11 @@ getter textBaseline getter textRendering getter wordSpacing - method addHitRegion method arc method arcTo method beginLayer method beginPath method bezierCurveTo - method clearHitRegions method clearRect method clip method closePath @@ -1148,7 +1146,6 @@ method putImageData method quadraticCurveTo method rect - method removeHitRegion method reset method resetTransform method restore
diff --git a/third_party/blink/web_tests/wpt_internal/close-watcher/frame-removal.html b/third_party/blink/web_tests/wpt_internal/close-watcher/frame-removal.html new file mode 100644 index 0000000..d5c6c8c --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/close-watcher/frame-removal.html
@@ -0,0 +1,59 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<body> +<script> +promise_test(async (t) => { + const i = await setupIframe(); + const watcher = new i.contentWindow.CloseWatcher(); + watcher.oncancel = () => i.remove(); + watcher.onclose = () => t.unreached_func("close event must not fire"); + + watcher.signalClosed(); +}, "detaching the iframe during the cancel event"); + +promise_test(async (t) => { + const i = await setupIframe(); + const watcher = new i.contentWindow.CloseWatcher(); + watcher.onclose = () => i.remove(); + + watcher.signalClosed(); +}, "detaching the iframe during the close event"); + +promise_test(async (t) => { + const i = await setupIframe(); + const watcher = new i.contentWindow.CloseWatcher(); + i.remove(); + + watcher.destroy(); +}, "detaching the iframe then calling destroy()"); + +promise_test(async (t) => { + const i = await setupIframe(); + const watcher = new i.contentWindow.CloseWatcher(); + watcher.oncancel = () => t.unreached_func("cancel event must not fire"); + watcher.onclose = () => t.unreached_func("close event must not fire"); + i.remove(); + + watcher.signalClosed(); +}, "detaching the iframe then calling signalClose()"); + +promise_test(async (t) => { + const i = await setupIframe(); + const iCloseWatcher = i.contentWindow.CloseWatcher; + const iDOMException = i.contentWindow.DOMException; + i.remove(); + + assert_throws_dom("InvalidStateError", iDOMException, () => new iCloseWatcher()); +}, "detaching the iframe then constructing a CloseWatcher"); + +function setupIframe() { + return new Promise(resolve => { + const i = document.createElement("iframe"); + i.onload = () => resolve(i); + i.src = "/common/blank.html"; + document.body.append(i); + }); +} +</script>
diff --git a/third_party/freetype/README.chromium b/third_party/freetype/README.chromium index 0496287..17cc57a6 100644 --- a/third_party/freetype/README.chromium +++ b/third_party/freetype/README.chromium
@@ -1,7 +1,7 @@ Name: FreeType URL: http://www.freetype.org/ -Version: VER-2-11-0-66-g5b626281f -Revision: 5b626281f1e6524dd87e3d5d6af795b39a8cc10b +Version: VER-2-11-0-86-g71969d1ed +Revision: 71969d1edfac78f2bd2f76f0210848d124f38ed0 CPEPrefix: cpe:/a:freetype:freetype:2.10.4 License: Custom license "inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses"
diff --git a/third_party/material_web_components/build_mwc_app.py b/third_party/material_web_components/build_mwc_app.py index 93f1e38..5ca45bb5 100755 --- a/third_party/material_web_components/build_mwc_app.py +++ b/third_party/material_web_components/build_mwc_app.py
@@ -106,7 +106,7 @@ export default ({{ plugins: [ plugin('{in_path}', '{host_url}', {exclude_list}, - {external_path_list}) ] + {external_path_list}, /* allowEmptyExtension= */ true) ] }}); '''.format(plugin_path=path_to_plugin.replace('\\', '/'), in_path=in_path.replace('\\', '/'),
diff --git a/tools/json_schema_compiler/feature_compiler.py b/tools/json_schema_compiler/feature_compiler.py index 6a94be1..b23dca5 100644 --- a/tools/json_schema_compiler/feature_compiler.py +++ b/tools/json_schema_compiler/feature_compiler.py
@@ -263,6 +263,7 @@ 'linux': 'Feature::LINUX_PLATFORM', 'mac': 'Feature::MACOSX_PLATFORM', 'win': 'Feature::WIN_PLATFORM', + 'fuchsia': 'Feature::FUCHSIA_PLATFORM', } } },
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 927cd23..8f0d1c8 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -34588,6 +34588,10 @@ <int value="4035" label="CanvasRenderingContext2DHasOverdraw"/> <int value="4036" label="DigitalGoodsConsume"/> <int value="4037" label="DigitalGoodsListPurchaseHistory"/> + <int value="4038" label="WebShareContainingFiles"/> + <int value="4039" label="WebShareContainingTitle"/> + <int value="4040" label="WebShareContainingText"/> + <int value="4041" label="WebShareContainingUrl"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -51006,6 +51010,8 @@ <int value="779086132" label="enable-data-reduction-proxy-alt"/> <int value="779703052" label="ChromeOSAmbientMode:enabled"/> <int value="779849093" label="OfflinePagesCTSuppressNotifications:disabled"/> + <int value="780177218" + label="AutofillEnableOfferNotificationForPromoCodes:disabled"/> <int value="780743733" label="QueryTilesLocalOrdering:disabled"/> <int value="781085897" label="IncognitoReauthenticationForAndroid:disabled"/> <int value="781573553" label="UnifiedPasswordManagerAndroid:enabled"/> @@ -51066,6 +51072,8 @@ <int value="839230937" label="AutofillEnableCardNicknameUpstream:disabled"/> <int value="839798268" label="SafeBrowsingTelemetryForApkDownloads:disabled"/> <int value="840057845" label="HardwareMediaKeyHandling:enabled"/> + <int value="840222947" + label="AutofillEnableOfferNotificationForPromoCodes:enabled"/> <int value="841276069" label="ChromeHomeDoodle:disabled"/> <int value="841343322" label="disable-new-korean-ime"/> <int value="841779535" label="password-export:enabled"/>
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index b36be8a..8ce1cea 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -4221,7 +4221,7 @@ </histogram> <histogram name="Android.WebView.Startup.InitType" - enum="AndroidWebViewInitType" expires_after="2021-09-21"> + enum="AndroidWebViewInitType" expires_after="2021-12-21"> <owner>torne@chromium.org</owner> <owner>src/android_webview/OWNERS</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 23519f3..4b9d279 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -1047,6 +1047,18 @@ </summary> </histogram> +<histogram name="Ash.Desks.UserHasUsedDesksRecently" enum="Boolean" + expires_after="2022-05-19"> + <owner>minch@chromium.org</owner> + <owner>janetmac@chromium.org</owner> + <summary> + Emitted true when first session started and detected user pref + `kUserHasUsedDesksRecently` has been set to true for the user. Will not emit + false otherwise. This will be used to count the number of users that + `kUserHasUsedDesksRecently` has been set to true. + </summary> +</histogram> + <histogram name="Ash.Desks.WeeklyActiveDesks" units="active desks" expires_after="2022-03-24"> <owner>chinsenj@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml index ecdf6a9..afd3a0b 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml
@@ -15143,6 +15143,7 @@ <affected-histogram name="SafeBrowsing.RT.HasTokenInRequest"/> <affected-histogram name="SafeBrowsing.RT.HasValidCacheManager"/> <affected-histogram name="SafeBrowsing.RT.IsLookupSuccessful"/> + <affected-histogram name="SafeBrowsing.RT.IsPopulationMbbOrEsb"/> <affected-histogram name="SafeBrowsing.RT.Network.Result"/> <affected-histogram name="SafeBrowsing.RT.Network.Time"/> <affected-histogram name="SafeBrowsing.RT.Request.Size"/>
diff --git a/tools/metrics/histograms/metadata/memory/histograms.xml b/tools/metrics/histograms/metadata/memory/histograms.xml index 6e956bb..3f72994 100644 --- a/tools/metrics/histograms/metadata/memory/histograms.xml +++ b/tools/metrics/histograms/metadata/memory/histograms.xml
@@ -281,7 +281,7 @@ </histogram> <histogram name="Memory.Browser.MemoryFootprint.Active" units="MB" - expires_after="2021-10-31"> + expires_after="2022-09-12"> <owner>justincohen@chromium.org</owner> <owner>olivierrobin@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index a082becd..d8590ec4 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -3452,7 +3452,7 @@ </histogram> <histogram name="ContextMenu.CancelSystemTouches" enum="BooleanHit" - expires_after="2021-12-26"> + expires_after="2022-01-02"> <owner>michaeldo@chromium.org</owner> <owner>src/ios/web/OWNERS</owner> <summary> @@ -3475,7 +3475,7 @@ </histogram> <histogram name="ContextMenu.DOMElementFrame" enum="ContextMenuDOMElementFrame" - expires_after="2021-10-04"> + expires_after="2022-01-02"> <owner>michaeldo@chromium.org</owner> <owner>src/ios/web/OWNERS</owner> <summary> @@ -3486,6 +3486,9 @@ <histogram name="ContextMenu.iOS.CopyImage" enum="ContextMenuIOSCopyImage" expires_after="2021-12-05"> + <obsolete> + Previously removed from code. + </obsolete> <owner>mrsuyi@chromium.org</owner> <owner>gambard@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml index 9e3451f8..05022753 100644 --- a/tools/metrics/histograms/metadata/safe_browsing/histograms.xml +++ b/tools/metrics/histograms/metadata/safe_browsing/histograms.xml
@@ -1379,6 +1379,16 @@ </summary> </histogram> +<histogram name="SafeBrowsing.RT.IsPopulationMbbOrEsb" enum="Boolean" + expires_after="2021-12-10"> + <owner>drubery@chromium.org</owner> + <owner>chrome-safebrowsing-alerts@google.com</owner> + <summary> + Records whether the user population field is from the enabled populations + (MBB and ESB) or not. Logged on every real time lookup. + </summary> +</histogram> + <histogram name="SafeBrowsing.RT.LocalMatch.Result" enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2022-02-06"> <owner>vakh@chromium.org</owner>
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index 1e5d89b..8e022f6c 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn
@@ -119,17 +119,6 @@ ] } -java_cpp_features("java_features_srcjar") { - # External code should depend on ":ui_features_java" instead. - visibility = [ ":*" ] - sources = [ "../base/ui_base_features.cc" ] - template = "java/src/org/chromium/ui/base/UiFeatures.java.tmpl" -} - -android_library("ui_features_java") { - srcjar_deps = [ ":java_features_srcjar" ] -} - java_strings_grd("ui_strings_grd") { grd_file = "java/strings/android_ui_strings.grd" outputs = [ "values/android_ui_strings.xml" ] +
diff --git a/ui/android/java/src/org/chromium/ui/base/UiFeatures.java.tmpl b/ui/android/java/src/org/chromium/ui/base/UiFeatures.java.tmpl deleted file mode 100644 index 9c3538b..0000000 --- a/ui/android/java/src/org/chromium/ui/base/UiFeatures.java.tmpl +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2020 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package org.chromium.ui.base; - -/** - * Constants for the names of UI Features. - */ -public final class UiFeatures {{ - -{NATIVE_FEATURES} - - // Prevent instantiation. - private UiFeatures() {{}} -}} \ No newline at end of file
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc index 8ae87b3..fab6ad29 100644 --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc
@@ -299,15 +299,12 @@ base::FEATURE_DISABLED_BY_DEFAULT}; bool IsSwipeToMoveCursorEnabled() { - static const bool enabled = - base::FeatureList::IsEnabled(kSwipeToMoveCursor) #if defined(OS_ANDROID) - && base::android::BuildInfo::GetInstance()->sdk_int() >= - base::android::SDK_VERSION_R; + return base::android::BuildInfo::GetInstance()->sdk_int() >= + base::android::SDK_VERSION_R; #else - ; + return base::FeatureList::IsEnabled(kSwipeToMoveCursor); #endif - return enabled; } bool ShouldApplyNativeOcclusionToCompositor() {
diff --git a/ui/chromeos/styles/cros_colors.json5 b/ui/chromeos/styles/cros_colors.json5 index 0d12b1f..44160394 100644 --- a/ui/chromeos/styles/cros_colors.json5 +++ b/ui/chromeos/styles/cros_colors.json5
@@ -99,9 +99,10 @@ light: "$google_red_600", dark: "$google_red_300", }, + light_icon_color_warning: "$google_yellow_300", icon_color_warning: { light: "$google_yellow_600", - dark: "$google_yellow_300", + dark: "$light_icon_color_warning", }, icon_color_positive: { light: "$google_green_600",
diff --git a/ui/events/event_utils.cc b/ui/events/event_utils.cc index 98a61ac4..f8ee007 100644 --- a/ui/events/event_utils.cc +++ b/ui/events/event_utils.cc
@@ -16,6 +16,8 @@ #include "ui/events/base_event_utils.h" #if defined(OS_WIN) +#include <windows.h> + #include "ui/events/win/events_win_utils.h" #endif
diff --git a/ui/events/event_utils.h b/ui/events/event_utils.h index 6c88d22..91bc7fcd 100644 --- a/ui/events/event_utils.h +++ b/ui/events/event_utils.h
@@ -23,7 +23,7 @@ #include "ui/gfx/native_widget_types.h" #if defined(OS_WIN) -#include <windows.h> +#include "base/win/windows_types.h" #endif namespace gfx {
diff --git a/ui/events/test/event_generator.cc b/ui/events/test/event_generator.cc index 06aac562..df028ef 100644 --- a/ui/events/test/event_generator.cc +++ b/ui/events/test/event_generator.cc
@@ -30,6 +30,8 @@ #endif #if defined(OS_WIN) +#include <windows.h> + #include "ui/events/keycodes/keyboard_code_conversion.h" #endif
diff --git a/ui/events/win/event_utils_win_unittest.cc b/ui/events/win/event_utils_win_unittest.cc index a280583..aeda9963 100644 --- a/ui/events/win/event_utils_win_unittest.cc +++ b/ui/events/win/event_utils_win_unittest.cc
@@ -4,7 +4,8 @@ #include "ui/events/event_utils.h" -#include "base/win/windows_types.h" +#include <windows.h> + #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/win/window_impl.h"
diff --git a/ui/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc index 1f735c18..ec2f417a 100644 --- a/ui/gtk/native_theme_gtk.cc +++ b/ui/gtk/native_theme_gtk.cc
@@ -189,8 +189,10 @@ // have a light variant and aren't affected by the setting. Because of this, // experimentally check if the theme is dark by checking if the window // background color is dark. - set_use_dark_colors(IsForcedDarkMode() || color_utils::IsDark(GetSystemColor( - kColorId_WindowBackground))); + const auto window_bg_color = SkColorFromColorId(kColorId_WindowBackground); + set_use_dark_colors( + IsForcedDarkMode() || + (window_bg_color && color_utils::IsDark(window_bg_color.value()))); set_preferred_color_scheme(CalculatePreferredColorScheme()); // GTK doesn't have a native high contrast setting. Rather, it's implied by